[Pkg-gnupg-commit] [gnupg2] 53/159: Only add the user supplied CFLAGS after running any autoconf tests.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Jan 27 13:23:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 02eb9fc9d5863abcfed6af704e618f8cac7cc2e8
Author: Neal H. Walfield <neal at g10code.com>
Date: Thu Dec 17 12:49:06 2015 +0100
Only add the user supplied CFLAGS after running any autoconf tests.
* configure.ac: Only add the user supplied CFLAGS after running any
autoconf tests.
--
Signed-off-by: Neal H. Walfield <neal at g10code.com>
If the user's CFLAGS include -Werror, then some configure tests fail.
To avoid this, we only add the user's CFLAGS after all of the
configure tests have run.
---
configure.ac | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/configure.ac b/configure.ac
index 77487b2..266eae5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,13 @@ AB_INIT
AC_GNU_SOURCE
+# Before we do anything with the C compiler, we first save the user's
+# CFLAGS (they are restored at the end of the configure script). This
+# is because some configure checks don't work with -Werror, but we'd
+# like to use -Werror with our build.
+CFLAGS_orig=$CFLAGS
+CFLAGS=
+
# Some status variables.
have_gpg_error=no
have_libgcrypt=no
@@ -1576,6 +1583,11 @@ AC_ARG_ENABLE(optimization,
fi])
#
+# Add user CFLAGS.
+#
+CFLAGS="$CFLAGS $CFLAGS_orig"
+
+#
# Decide what to build
#
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list