]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix bug#454: Remove ACX_CHECK_COMPILER_FLAG from configure.ac,
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Jul 2012 08:51:35 +0000 (08:51 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Jul 2012 08:51:35 +0000 (08:51 +0000)
  if CFLAGS is specified at configure time then '-g -O2' is not
  appended to CFLAGS, so that the user can override them.

git-svn-id: file:///svn/unbound/trunk@2717 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
doc/Changelog

index f945757158cfd6a46b9fd8be1ff3082b05bd0656..714941bec3ed21797c7c5f9a8f44dd447f1ba895 100755 (executable)
--- a/configure
+++ b/configure
@@ -4215,6 +4215,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+# allow user to override the -g -O2 flags.
+if test "x$CFLAGS" = "x" ; then
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
@@ -4277,6 +4279,7 @@ $as_echo "no" >&6; }
 
 fi
 
+fi
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
index 1e1772ea0ca751a38a19d0dd0328767ced12d08f..94ebe4602d1ca9488c0109e6680b9bef911f1efe 100644 (file)
@@ -209,8 +209,11 @@ AC_DEFINE_UNQUOTED(RSRC_PACKAGE_VERSION, [$wnvs], [version number for resource f
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_LANG_C
+# allow user to override the -g -O2 flags.
+if test "x$CFLAGS" = "x" ; then
 ACX_CHECK_COMPILER_FLAG(g, [CFLAGS="$CFLAGS -g"])
 ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"])
+fi
 AC_PROG_CC
 ACX_DEPFLAG
 ACX_DETERMINE_EXT_FLAGS_UNBOUND
index c6672c4c68e6046a915f043fb2868fb94643341b..b4e8cf9235b25f7126764c3f92acdab2753ff9b1 100644 (file)
@@ -1,3 +1,8 @@
+19 July 2012: Willem
+       - Fix bug#454: Remove ACX_CHECK_COMPILER_FLAG from configure.ac,
+         if CFLAGS is specified at configure time then '-g -O2' is not
+         appended to CFLAGS, so that the user can override them.
+
 18 July 2012: Willem
        - Fix libunbound report of errors when in background mode.