From: Wouter Wijngaards Date: Thu, 19 Jul 2012 08:51:35 +0000 (+0000) Subject: - Fix bug#454: Remove ACX_CHECK_COMPILER_FLAG from configure.ac, X-Git-Tag: release-1.4.18rc1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68e7d81863d05717209594c2e3c6e706d70076fa;p=thirdparty%2Funbound.git - 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. git-svn-id: file:///svn/unbound/trunk@2717 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/configure b/configure index f94575715..714941bec 100755 --- 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' diff --git a/configure.ac b/configure.ac index 1e1772ea0..94ebe4602 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/doc/Changelog b/doc/Changelog index c6672c4c6..b4e8cf923 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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.