When I wrote my reply I started to think that changing the order of the includes and such could make a difference and indeed it does. Now I have another interesting error, can't even get through configure:
configure:2116: $? = 0
configure:2118: g++ -v </dev/null >&5
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
configure:2121: $? = 0
configure:2123: g++ -V </dev/null >&5
g++: `-V' option must have argument
configure:2126: $? = 1
configure:2149: checking for C++ compiler default output file name
configure:2152: g++ -I/usr/local/include I/usr/sfw/include -I/opt/csw/include -L/usr/local/lib -R/usr/local/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/csw/lib -R/opt/csw/lib conftest.cc -lrt >&5
g++: I/usr/sfw/include: No such file or directory
configure:2155: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "aMule"
| #define PACKAGE_TARNAME "amule"
| #define PACKAGE_VERSION "2.2.6"
| #define PACKAGE_STRING "aMule 2.2.6"
| #define PACKAGE_BUGREPORT "
admin@amule.org"
| #define PACKAGE "amule"
| #define VERSION "2.2.6"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2194: error: C++ compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
This is with the following environment:
CPPFLAGS='-I/usr/local/include I/usr/sfw/include -I/opt/csw/include'
LDFLAGS='-L/usr/local/lib -R/usr/local/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/csw/lib -R/opt/csw/lib'
LD_LIBRARY_PATH=/usr/local/lib:/usr/sfw/lib:/usr/lib:/opt/csw/lib
PATH=/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/local/bin:/usr/csw/bin
So I reckon that maybe one of the variables must have /opt/csw before /opt/sfw, and another one use the reverse order. But which one should be wich?