Scott Cantor wrote:
I've run into a number of configure issues in the past porting to various
platforms, particular when not using gcc/g++.

A couple of noteworthy ones on Solaris using Sun's compiler:

You have gcc-specific flags here:

if test "$enable_debug" = "yes" ; then
        CFLAGS="${CFLAGS} -g"
        CXXFLAGS="${CXXFLAGS} -g"
else
        CFLAGS="${CFLAGS} -O2 -DNDEBUG"
        CXXFLAGS="${CXXFLAGS} -O2 -DNDEBUG"
fi

Hmm. Ran into something similar the other day with -Werror vs. -errwarn. Will use the same solution.


-O2 isn't legal on Sun's compiler (it's -xO2) so I would suggest you add a
conditional around this for at least that flag and not include it unless gcc
is used.

I've now changed some things in configure.ac to set specific flag types depending on compiler, so will update to include this as well.


Also, for Sun CC, you can't properly link test cases that run with
AC_LANG(C) if your LDFLAGS already includes C++ code, like Xerces or Xalan.
This results in the openssl func checks failing because AC_LANG(C) appears
ahead of those tests.

I would suggest either moving the OpenSSL tests ahead of the C++ library
checks, or removing AC_LANG(C), which works ok too.

This is a new one on me - I've been building using SunCC and haven't run into this issue - or at least not that I've recognised. Will go back and have another look.

Cheers,
        Berin

Reply via email to