summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2012-08-23 22:54:32 +0000
committersthen <sthen@openbsd.org>2012-08-23 22:54:32 +0000
commit747af64612150e3d74990951cf26fe62e8b9e957 (patch)
tree859230dac71036a4f0b85494ddc85e97bbbbde22
parentresolve conflicts (diff)
downloadwireguard-openbsd-747af64612150e3d74990951cf26fe62e8b9e957.tar.xz
wireguard-openbsd-747af64612150e3d74990951cf26fe62e8b9e957.zip
copy cflags override code from newer unbound's configure.ac to ldns's
-rw-r--r--usr.sbin/unbound/ldns/configure.ac7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/unbound/ldns/configure.ac b/usr.sbin/unbound/ldns/configure.ac
index c9ef2f1a32c..625477117de 100644
--- a/usr.sbin/unbound/ldns/configure.ac
+++ b/usr.sbin/unbound/ldns/configure.ac
@@ -63,8 +63,11 @@ COPY_FILES($srcdir/$1/*.h, $2)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_LANG_C
-dnlACX_CHECK_COMPILER_FLAG(g, [CFLAGS="-g $CFLAGS"])
-dnlACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="-O2 $CFLAGS"])
+# 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
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"])