From: Willem Toorop Date: Wed, 18 Jul 2012 14:02:41 +0000 (+0000) Subject: bugfix #454: Only set -g and -O2 CFLAGS when no CFLAGS was given. X-Git-Tag: release-1.6.14rc1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f1af15ac89d631c872f98fe711f4d67d2501539;p=thirdparty%2Fldns.git bugfix #454: Only set -g and -O2 CFLAGS when no CFLAGS was given. --- diff --git a/Changelog b/Changelog index fcb4833e..bd90ff2e 100644 --- a/Changelog +++ b/Changelog @@ -1,7 +1,7 @@ 1.6.14 * bugfix #459: Export only symbols defined in ldns_symbols * bugfix #458: Track all newly created signatures when signing. - * bugfix #454: Don't set -g and -O2 CFLAGS from configure. + * bugfix #454: Only set -g and -O2 CFLAGS when no CFLAGS was given. * bugfix #457: Memroy leak fix for ldns_key_new_frm_algorithm. * pyldns memory handling fixes and the python3/ldns-signzone.py examples script contribution from Karel Slany. diff --git a/configure.ac b/configure.ac index 26910565..c142e4e8 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,10 @@ COPY_FILES($srcdir/$1/*.h, $2) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_LANG_C +if test "x$CFLAGS" = "x" ; then +ACX_CHECK_COMPILER_FLAG(g, [CFLAGS="-g"]) +ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="-O2 $CFLAGS"]) +fi ACX_CHECK_COMPILER_FLAG(Wall, [CFLAGS="-Wall $CFLAGS"]) ACX_CHECK_COMPILER_FLAG(W, [CFLAGS="-W $CFLAGS"]) ACX_CHECK_COMPILER_FLAG(Wwrite-strings, [CFLAGS="-Wwrite-strings $CFLAGS"])