From: Adam Stylinski Date: Tue, 25 Jan 2022 05:16:37 +0000 (-0500) Subject: Make cmake and configure release flags consistent X-Git-Tag: 2.1.0-beta1~421 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33e5e297e745e3474cd038c7cf0eca9612969dd6;p=thirdparty%2Fzlib-ng.git Make cmake and configure release flags consistent CMake sufficiently appends -DNDEBUG to the preprocessor macros when not compiling with debug symbols. This turns off debug level assertions and has some other side effects. As such, we should equally append this define to the configure scripts' CFLAGS. --- diff --git a/configure b/configure index 215d0f286..e957aa0ba 100755 --- a/configure +++ b/configure @@ -396,6 +396,9 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then if test $debug -eq 1; then CFLAGS="${CFLAGS} -DZLIB_DEBUG" SFLAGS="${SFLAGS} -DZLIB_DEBUG" + else + CFLAGS="${CFLAGS} -DNDEBUG" + SFLAGS="${SFLAGS} -DNDEBUG" fi if test -z "$uname"; then uname=$((uname -s || echo unknown) 2>/dev/null)