From dabc95ccf62a6ebe1033a83c76ae6b9b91ce92dd Mon Sep 17 00:00:00 2001 From: rfm Date: Thu, 3 Sep 2015 14:23:20 +0000 Subject: [PATCH] check flags used at make configure time git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38967 72102866-910b-0410-8b05-ffd578937521 --- configure | 32 ++++++++++++++++++++++---------- configure.ac | 29 ++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 3d8d1ec29..0c2e5fa43 100755 --- a/configure +++ b/configure @@ -2747,6 +2747,28 @@ else fi +MAKECPPFLAGS=`gnustep-config --variable=CPPFLAGS` +if test "$CPPFLAGS" = ""; then + CPPFLAGS=$MAKECPPFLAGS + export CPPFLAGS +else + if test "$CPPFLAGS" != "$MAKECPPFLAGS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the link options ($CPPFLAGS) set to a different value from that used by gnustep-make ($MAKECPPFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again with your CPPFLAGS environment variable set to $MAKECPPFLAGS" >&5 +$as_echo "$as_me: WARNING: You are running configure with the link options ($CPPFLAGS) set to a different value from that used by gnustep-make ($MAKECPPFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again with your CPPFLAGS environment variable set to $MAKECPPFLAGS" >&2;} + fi +fi + +MAKELDFLAGS=`gnustep-config --variable=LDFLAGS` +if test "$LDFLAGS" = ""; then + LDFLAGS=$MAKELDFLAGS + export LDFLAGS +else + if test "$LDFLAGS" != "$MAKELDFLAGS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the link options ($LDFLAGS) set to a different value from that used by gnustep-make ($MAKELDFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use LDFLAGS=$LDFLAGS or run the gnustep-base configure again with your LDFLAGS environment variable set to $MAKELDFLAGS" >&5 +$as_echo "$as_me: WARNING: You are running configure with the link options ($LDFLAGS) set to a different value from that used by gnustep-make ($MAKELDFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use LDFLAGS=$LDFLAGS or run the gnustep-base configure again with your LDFLAGS environment variable set to $MAKELDFLAGS" >&2;} + fi +fi + # We shouldn't be loading GNUstep.sh here. It would load in a lot of # variables which might get confused with the ones that will be used # at runtime. We will load it later once we have determined (and @@ -4023,7 +4045,6 @@ LDFLAGS="$LDFLAGS -L$GNUSTEP_LOCAL_LIBRARIES -L$GNUSTEP_NETWORK_LIBRARIES -L$GNU MAKECC=`gnustep-config --variable=CC` MAKECPP=`gnustep-config --variable=CPP` MAKECXX=`gnustep-config --variable=CXX` -MAKELDFLAGS=`gnustep-config --variable=LDFLAGS` if test "$CC" = ""; then CC=$MAKECC export CC @@ -4051,15 +4072,6 @@ else $as_echo "$as_me: WARNING: You are running configure with the compiler ($CXX) set to a different value from that used by gnustep-make ($MAKECXX). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CXX=$CXX or run the gnustep-base configure again with your CXX environment variable set to $MAKECXX" >&2;} fi fi -if test "$LDFLAGS" = ""; then - LDFLAGS=$MAKELDFLAGS - export LDFLAGS -else - if test "$LDFLAGS" != "$MAKELDFLAGS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the link options ($LDFLAGS) set to a different value from that used by gnustep-make ($MAKELDFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use LDFLAGS=$LDFLAGS or run the gnustep-base configure again with your LDFLAGS environment variable set to $MAKELDFLAGS" >&5 -$as_echo "$as_me: WARNING: You are running configure with the link options ($LDFLAGS) set to a different value from that used by gnustep-make ($MAKELDFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use LDFLAGS=$LDFLAGS or run the gnustep-base configure again with your LDFLAGS environment variable set to $MAKELDFLAGS" >&2;} - fi -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/configure.ac b/configure.ac index 5c03402c8..a8deda663 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,26 @@ else fi AC_SUBST(BASE_NONFRAGILE_ABI) +MAKECPPFLAGS=`gnustep-config --variable=CPPFLAGS` +if test "$CPPFLAGS" = ""; then + CPPFLAGS=$MAKECPPFLAGS + export CPPFLAGS +else + if test "$CPPFLAGS" != "$MAKECPPFLAGS"; then + AC_MSG_WARN([You are running configure with the preprocessor options ($CPPFLAGS) set to a different value from that used by gnustep-make ($MAKECPPFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again with your CPPFLAGS environment variable set to $MAKECPPFLAGS]) + fi +fi + +MAKELDFLAGS=`gnustep-config --variable=LDFLAGS` +if test "$LDFLAGS" = ""; then + LDFLAGS=$MAKELDFLAGS + export LDFLAGS +else + if test "$LDFLAGS" != "$MAKELDFLAGS"; then + AC_MSG_WARN([You are running configure with the link options ($LDFLAGS) set to a different value from that used by gnustep-make ($MAKELDFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use LDFLAGS=$LDFLAGS or run the gnustep-base configure again with your LDFLAGS environment variable set to $MAKELDFLAGS]) + fi +fi + # We shouldn't be loading GNUstep.sh here. It would load in a lot of # variables which might get confused with the ones that will be used # at runtime. We will load it later once we have determined (and @@ -1056,7 +1076,6 @@ LDFLAGS="$LDFLAGS -L$GNUSTEP_LOCAL_LIBRARIES -L$GNUSTEP_NETWORK_LIBRARIES -L$GNU MAKECC=`gnustep-config --variable=CC` MAKECPP=`gnustep-config --variable=CPP` MAKECXX=`gnustep-config --variable=CXX` -MAKELDFLAGS=`gnustep-config --variable=LDFLAGS` if test "$CC" = ""; then CC=$MAKECC export CC @@ -1081,14 +1100,6 @@ else AC_MSG_WARN([You are running configure with the compiler ($CXX) set to a different value from that used by gnustep-make ($MAKECXX). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CXX=$CXX or run the gnustep-base configure again with your CXX environment variable set to $MAKECXX]) fi fi -if test "$LDFLAGS" = ""; then - LDFLAGS=$MAKELDFLAGS - export LDFLAGS -else - if test "$LDFLAGS" != "$MAKELDFLAGS"; then - AC_MSG_WARN([You are running configure with the link options ($LDFLAGS) set to a different value from that used by gnustep-make ($MAKELDFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use LDFLAGS=$LDFLAGS or run the gnustep-base configure again with your LDFLAGS environment variable set to $MAKELDFLAGS]) - fi -fi AC_PROG_CC AC_PROG_CPP AC_USE_SYSTEM_EXTENSIONS