From: Aki Tuomi Date: Mon, 1 Sep 2014 10:13:06 +0000 (+0300) Subject: Fix definition and test whether D_FORTIFY_SOURCE gives warning X-Git-Tag: auth-3.4.0-rc2~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1692%2Fhead;p=thirdparty%2Fpdns.git Fix definition and test whether D_FORTIFY_SOURCE gives warning --- diff --git a/m4/pdns_d_fortify_source.m4 b/m4/pdns_d_fortify_source.m4 index 721c9cce09..7f90329a99 100644 --- a/m4/pdns_d_fortify_source.m4 +++ b/m4/pdns_d_fortify_source.m4 @@ -1,5 +1,5 @@ dnl -dnl Check for support for position independent executables +dnl Check for support D_FORTIFY_SOURCE dnl dnl Copyright (C) 2013 Red Hat, Inc. dnl @@ -19,8 +19,10 @@ dnl . dnl AC_DEFUN([AC_CC_D_FORTIFY_SOURCE],[ + OLD_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="-Wall -W -Werror $CXXFLAGS" gl_COMPILER_OPTION_IF([-D_FORTIFY_SOURCE=2], [ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" - CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2" - ]) + CXXFLAGS="$OLD_CXXFLAGS -D_FORTIFY_SOURCE=2" + ], [CXXFLAGS="$OLD_CXXFLAGS"], [AC_LANG_PROGRAM([[#include ]],[])]) ])