From 1c0408d9b97ca386bd0ec0dad756f9a939471e8b Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 17 May 2010 09:06:37 -0700 Subject: [PATCH] More configuration updates for OpenSolaris This patch updates the shared and PICFLAGS to support the Sun compiler. It also reorganizes how the dependency and warning flags are set. --- aclocal.m4 | 13 +++++++++++++ configure.in | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 2f66b94ea..1e563501b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -127,6 +127,13 @@ case "${host}" in *-*-darwin*) shared="-bundle -undefined suppress -flat_namespace" ;; + + *-*-solaris*) + if test ${using_sunpro} = 1 + then + shared="-G" + fi + ;; esac AC_SUBST(shared) AC_MSG_RESULT($shared) @@ -153,6 +160,12 @@ case "${host}" in PICFLAG=+z ;; + *-*-solaris*) + if test ${using_sunpro} = 1 + then + PICFLAG=-G + fi + ;; esac AC_SUBST(PICFLAG) AC_MSG_RESULT($PICFLAG) diff --git a/configure.in b/configure.in index da227e156..3f38afb14 100644 --- a/configure.in +++ b/configure.in @@ -58,10 +58,19 @@ AC_SUBST(EXEEXT) # Combined check for Microsoft-related bogosities; sets WIN32 if found AX_WIN32 -AC_CHECK_DECL(__SUNPRO_C, AC_SUBST(DEPENDENCY_FLAG, [-xMMD]), - AC_SUBST(DEPENDENCY_FLAG, [-MD])) -AC_CHECK_DECL(__SUNPRO_C, AC_SUBST(WARNING_FLAGS, []), - AC_SUBST(WARNING_FLAGS, ["-Wall -Wshadow"])) +# Check to see if we are using the SUN compiler. If so then configure +# some of the flags to match the SUN compiler syntax. This is also used +# in the aclocal.m4 file to configure the flags used to build and link +# dynamic libraries +AC_CHECK_DECL(__SUNPRO_C, using_sunpro=1, using_sunpro=0) +if test ${using_sunpro} = 1 +then +AC_SUBST(DEPENDENCY_FLAG, [-xMMD]) +AC_SUBST(WARNING_FLAGS, [""]) +else +AC_SUBST(DEPENDENCY_FLAG, [-MD]) +AC_SUBST(WARNING_FLAGS, ["-Wall -Wshadow"]) +fi AC_LANG(C++)