Thanks Ferrar for continuing to work with me.My knowledge of compiling programs is limited as such.
But what I could figure out so far is:
1. AIX doesn't use LD_LIBRARY_PATH. It used LIBPATH
2. The libstdc++.so doesn't exist by itself, rather it is part of libstdc++.a and this file is present in /opt/freeware/lib/gcc/powerpc-ibm-aix5.2.0.0/4.0.0/libstdc++.a
So, I tried quite a few things based on your suggestions.
I tried to put the /opt/...../4.0.0 in my LIBPATH variable
I copied the libstdc++.a into /usr/lib
I made a soft link /usr/lib/libstdc++.so > the libstdc++.a in the /opt directory.
Each time I have tried to configure and make, and each time the namespaces line says NO.
There was no /usr/local directory by default, I created it with a soft link to /usr since there is a lib directory within /usr
I am sending you my config.log (that should probably contain more information) via email.
Please let me know if there is something else that I could try.
The only suggestion that I could get from elsewhere (for the namespaces problem) is to compile gcc from source, but I am sure there would be other issues that I might land into with that.
>This is the key line:
>
> checking whether the C++ compiler supports namespaces...
>no
>
>Your C++ compiler surely supports namespaces, so this
>strongly suggests something is going wrong with running
>compiled C++ programs. This is probably a library path
>issue. Make sure the environment variable LD_LIBRARY_PATH
>contains the location of the libstdc++.so file, which might
>be in /usr/local/lib; if it is, this command will do it for
>bash:
>
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
>
>and this will do for csh:
>
> setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib
>
>If you do that, does configure say that the compiler
>supports namespaces? If so, does it build successfully?