summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Build/2022-07-26-18-13-34.gh-issue-94801.9fREfy.rst2
-rwxr-xr-xconfigure40
-rw-r--r--configure.ac26
3 files changed, 35 insertions, 33 deletions
diff --git a/Misc/NEWS.d/next/Build/2022-07-26-18-13-34.gh-issue-94801.9fREfy.rst b/Misc/NEWS.d/next/Build/2022-07-26-18-13-34.gh-issue-94801.9fREfy.rst
new file mode 100644
index 0000000..a58be30
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2022-07-26-18-13-34.gh-issue-94801.9fREfy.rst
@@ -0,0 +1,2 @@
+Fix a regression in ``configure`` script that caused some header checks to
+ignore custom ``CPPFLAGS``. The regression was introduced in :gh:`94802`.
diff --git a/configure b/configure
index be045f2..6190680 100755
--- a/configure
+++ b/configure
@@ -11273,7 +11273,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBUUID_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
@@ -11402,7 +11402,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBUUID_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
@@ -12122,7 +12122,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
ac_fn_c_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes; then :
@@ -12195,7 +12195,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
ac_fn_c_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes; then :
@@ -12879,7 +12879,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$LIBNSL_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBNSL_CFLAGS"
for ac_header in rpc/rpc.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_rpc_h" "$ac_includes_default"
@@ -13012,7 +13012,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$LIBSQLITE3_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
LDFLAGS="$LIBSQLITE3_LIBS $LDFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
@@ -13958,7 +13958,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$TCLTK_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
LIBS="$TCLTK_LIBS $LDFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14023,7 +14023,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$GDBM_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
LDFLAGS="$GDBM_LIBS $LDFLAGS"
for ac_header in gdbm.h
do :
@@ -16610,7 +16610,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $ZLIB_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
for ac_header in zlib.h
do :
@@ -16740,7 +16740,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $ZLIB_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
for ac_header in zlib.h
do :
@@ -16958,7 +16958,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $BZIP2_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
@@ -17041,7 +17041,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $BZIP2_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
@@ -17188,7 +17188,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBLZMA_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
@@ -17271,7 +17271,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBLZMA_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
@@ -18098,7 +18098,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$LIBCRYPT_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBCRYPT_CFLAGS"
LIBS="$LIBCRYPT_LIBS $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt or crypt_r" >&5
$as_echo_n "checking for crypt or crypt_r... " >&6; }
@@ -20687,7 +20687,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBREADLINE_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
@@ -20768,7 +20768,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBREADLINE_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
@@ -20921,7 +20921,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBEDIT_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
@@ -21004,7 +21004,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$CFLAGS $LIBEDIT_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
@@ -21113,7 +21113,7 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$READLINE_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
LIBS="$READLINE_LIBS $LIBS"
LIBS_SAVE=$LIBS
diff --git a/configure.ac b/configure.ac
index a952324..2c1b2dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3394,7 +3394,7 @@ AS_VAR_IF([have_uuid], [missing], [
AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE], [1])
], [
WITH_SAVE_ENV([
- CPPFLAGS="$CFLAGS $LIBUUID_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
AC_CHECK_HEADERS([uuid/uuid.h], [
PY_CHECK_LIB([uuid], [uuid_generate_time], [have_uuid=yes])
@@ -3625,7 +3625,7 @@ have_libffi=missing
AS_VAR_IF([with_system_ffi], [yes], [
PKG_CHECK_MODULES([LIBFFI], [libffi], [have_libffi=yes], [
WITH_SAVE_ENV([
- CPPFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
AC_CHECK_HEADER([ffi.h], [
AC_CHECK_LIB([ffi], [ffi_call], [
@@ -3798,7 +3798,7 @@ PKG_CHECK_MODULES([LIBNSL], [libnsl], [have_nis=yes], [
AS_VAR_IF([have_nis], [yes], [
WITH_SAVE_ENV([
- CPPFLAGS="$LIBNSL_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBNSL_CFLAGS"
AC_CHECK_HEADERS([rpc/rpc.h])
])
])
@@ -3831,7 +3831,7 @@ AC_DEFUN([PY_CHECK_SQLITE_FUNC], [
WITH_SAVE_ENV([
dnl bpo-45774/GH-29507: The CPP check in AC_CHECK_HEADER can fail on FreeBSD,
dnl hence CPPFLAGS instead of CFLAGS.
- CPPFLAGS="$LIBSQLITE3_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
LDFLAGS="$LIBSQLITE3_LIBS $LDFLAGS"
AC_CHECK_HEADER([sqlite3.h], [
@@ -3935,7 +3935,7 @@ AS_CASE([$ac_sys_system],
)
WITH_SAVE_ENV([
- CPPFLAGS="$TCLTK_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
LIBS="$TCLTK_LIBS $LDFLAGS"
AC_LINK_IFELSE([
@@ -3977,7 +3977,7 @@ dnl NOTE: gdbm does not provide a pkgconf file.
AC_ARG_VAR([GDBM_CFLAGS], [C compiler flags for gdbm])
AC_ARG_VAR([GDBM_LIBS], [additional linker flags for gdbm])
WITH_SAVE_ENV([
- CPPFLAGS="$GDBM_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
LDFLAGS="$GDBM_LIBS $LDFLAGS"
AC_CHECK_HEADERS([gdbm.h], [
AC_CHECK_LIB([gdbm], [gdbm_open], [
@@ -4830,7 +4830,7 @@ PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0], [
AC_DEFINE([HAVE_ZLIB_COPY], [1])
], [
WITH_SAVE_ENV([
- CPPFLAGS="$CFLAGS $ZLIB_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
AC_CHECK_HEADERS([zlib.h], [
PY_CHECK_LIB([z], [gzread], [have_zlib=yes], [have_zlib=no])
@@ -4854,7 +4854,7 @@ PY_CHECK_EMSCRIPTEN_PORT([BZIP2], [-sUSE_BZIP2])
PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
WITH_SAVE_ENV([
- CPPFLAGS="$CFLAGS $BZIP2_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
AC_CHECK_HEADERS([bzlib.h], [
AC_CHECK_LIB([bz2], [BZ2_bzCompress], [have_bzip2=yes], [have_bzip2=no])
@@ -4868,7 +4868,7 @@ PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
WITH_SAVE_ENV([
- CPPFLAGS="$CFLAGS $LIBLZMA_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
AC_CHECK_HEADERS([lzma.h], [
AC_CHECK_LIB([lzma], [lzma_easy_encoder], [have_liblzma=yes], [have_liblzma=no])
@@ -4960,7 +4960,7 @@ PKG_CHECK_MODULES([LIBCRYPT], [libxcrypt >= 3.1.1], [
])
WITH_SAVE_ENV([
- CPPFLAGS="$LIBCRYPT_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBCRYPT_CFLAGS"
LIBS="$LIBCRYPT_LIBS $LIBS"
AC_CACHE_CHECK([for crypt or crypt_r], [ac_cv_crypt_crypt], [
AC_LINK_IFELSE([AC_LANG_PROGRAM([
@@ -5845,7 +5845,7 @@ AS_VAR_IF([with_readline], [readline], [
READLINE_LIBS=$LIBREADLINE_LIBS
], [
WITH_SAVE_ENV([
- CPPFLAGS="$CFLAGS $LIBREADLINE_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
AC_CHECK_HEADERS([readline/readline.h], [
AC_CHECK_LIB([readline], [readline], [
@@ -5866,7 +5866,7 @@ AS_VAR_IF([with_readline], [edit], [
READLINE_LIBS=$LIBEDIT_LIBS
], [
WITH_SAVE_ENV([
- CPPFLAGS="$CFLAGS $LIBEDIT_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
AC_CHECK_HEADERS([editline/readline.h], [
AC_CHECK_LIB([edit], [readline], [
@@ -5890,7 +5890,7 @@ AS_VAR_IF([with_readline], [no], [
AC_MSG_RESULT([$with_readline (CFLAGS: $READLINE_CFLAGS, LIBS: $READLINE_LIBS)])
WITH_SAVE_ENV([
- CPPFLAGS="$READLINE_CFLAGS $CFLAGS"
+ CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
LIBS="$READLINE_LIBS $LIBS"
LIBS_SAVE=$LIBS