From dfb66044ed5488c61695ab7503b2648c97bf943d Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 17 May 2018 09:31:48 -0600 Subject: [PATCH] Define ZLIB_CONST so we get the const version of the API. --- configure | 32 ++++++++++++++++++++++++++++++++ configure.ac | 1 + 2 files changed, 33 insertions(+) diff --git a/configure b/configure index 2f26c53fd..d600035c6 100755 --- a/configure +++ b/configure @@ -6323,6 +6323,38 @@ else fi +if ${CPPFLAGS+:} false; then : + + case " $CPPFLAGS " in #( + *" -DZLIB_CONST "*) : + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -DZLIB_CONST"; } >&5 + (: CPPFLAGS already contains -DZLIB_CONST) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append CPPFLAGS " -DZLIB_CONST" + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 + (: CPPFLAGS="$CPPFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else + + CPPFLAGS=-DZLIB_CONST + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5 + (: CPPFLAGS="$CPPFLAGS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable environment resetting by default" >&5 $as_echo_n "checking whether to enable environment resetting by default... " >&6; } # Check whether --enable-env_reset was given. diff --git a/configure.ac b/configure.ac index 91eeb5d11..562f51acb 100644 --- a/configure.ac +++ b/configure.ac @@ -1420,6 +1420,7 @@ AC_ARG_ENABLE(env_debug, AC_ARG_ENABLE(zlib, [AS_HELP_STRING([--enable-zlib[[=PATH]]], [Whether to enable or disable zlib])], [], [enable_zlib=yes]) +AX_APPEND_FLAG([-DZLIB_CONST], [CPPFLAGS]) AC_MSG_CHECKING(whether to enable environment resetting by default) AC_ARG_ENABLE(env_reset, -- 2.40.0