From e417aaf69817fcb4a73c38077853dc940a2deabc Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 24 Oct 2017 18:34:28 +0200 Subject: build: Do not mess with CFLAGS in configure. * configure.ac: Do not mess with the user provided CFLAGS. -- A problem was claimed with some configure tests if the user provided CFLAGS=-Werror. The commit introducing this Fixes-commit: 02eb9fc9d5863abcfed6af704e618f8cac7cc2e8 does not mention a concrete case. Anyway, messing with CFLAGS is a bad idea because configure tests will then test something different than what is used later (cf. autoconf manual). Tests which depend on the whether -Werror is used needsto be fixed. Note that in certain cases we modify CFLAGS. This is only done for some configure options or if the platform requires the use of special compiler flags (e.g. on HP/UX). GnuPG-bug-id: 2423 --- configure.ac | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 70c122615..1f933a729 100644 --- a/configure.ac +++ b/configure.ac @@ -89,12 +89,6 @@ 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 @@ -1700,11 +1694,6 @@ if test x"$gnupg_builddir_envvar" = x"yes"; then [This is only used with "make distcheck"]) fi -# -# Add user CFLAGS. -# -CFLAGS="$CFLAGS $CFLAGS_orig" - # # Decide what to build # -- cgit v1.2.3 From 812fe29bff42cf7dbd07e0becc55b2ada340dd97 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 24 Oct 2017 18:42:37 +0200 Subject: build: New configure option --enable-werror * configure.ac: Implement that option. -- This can be used as a workaround in case of bogus autoconf tests. GnuPG-bug-id: 2423 Signed-off-by: Werner Koch --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1f933a729..551c970b3 100644 --- a/configure.ac +++ b/configure.ac @@ -1665,6 +1665,17 @@ AC_ARG_ENABLE(optimization, CFLAGS=`echo $CFLAGS | sed s/-O[[1-9]]\ /-O0\ /g` fi]) +# +# Add -Werror to CFLAGS. This hack can be used to avoid problems with +# misbehaving autoconf tests in case the user supplied -Werror. +# +AC_ARG_ENABLE(werror, + AC_HELP_STRING([--enable-werror], + [append -Werror to CFLAGS]), + [if test $enableval = yes ; then + CFLAGS="$CFLAGS -Werror" + fi]) + # # Configure option --enable-all-tests # -- cgit v1.2.3 From b13972dfbf7224478652038725ab0d2cb41b7303 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 26 Oct 2017 11:19:45 +0900 Subject: Fix comment of configure. * configure.ac (BUILD_WITH_DIRMNGR): Comment fix. Signed-off-by: NIIBE Yutaka --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 551c970b3..dc1fc1afd 100644 --- a/configure.ac +++ b/configure.ac @@ -1754,7 +1754,7 @@ if test "$build_scdaemon" = yes ; then AC_DEFINE(BUILD_WITH_SCDAEMON,1,[Defined if SCDAEMON is to be build]) fi if test "$build_dirmngr" = yes ; then - AC_DEFINE(BUILD_WITH_DIRMNGR,1,[Defined if SCDAEMON is to be build]) + AC_DEFINE(BUILD_WITH_DIRMNGR,1,[Defined if DIRMNGR is to be build]) fi if test "$build_g13" = yes ; then AC_DEFINE(BUILD_WITH_G13,1,[Defined if G13 is to be build]) -- cgit v1.2.3