mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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@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.
This commit is contained in:
parent
1cceba163b
commit
02eb9fc9d5
12
configure.ac
12
configure.ac
@ -85,6 +85,13 @@ AB_INIT
|
|||||||
|
|
||||||
AC_GNU_SOURCE
|
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.
|
# Some status variables.
|
||||||
have_gpg_error=no
|
have_gpg_error=no
|
||||||
have_libgcrypt=no
|
have_libgcrypt=no
|
||||||
@ -1575,6 +1582,11 @@ AC_ARG_ENABLE(optimization,
|
|||||||
CFLAGS=`echo $CFLAGS | sed s/-O[[1-9]]\ /-O0\ /g`
|
CFLAGS=`echo $CFLAGS | sed s/-O[[1-9]]\ /-O0\ /g`
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add user CFLAGS.
|
||||||
|
#
|
||||||
|
CFLAGS="$CFLAGS $CFLAGS_orig"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Decide what to build
|
# Decide what to build
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user