From 8371b539e2a4b2fb8470aacf867e230f256f11e4 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 8 Feb 2026 10:54:46 -0800 Subject: Allow --const to be used in configure without --warn. --- configure | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configure b/configure index daa4aa73..27c77c08 100755 --- a/configure +++ b/configure @@ -252,11 +252,13 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then SFLAGS="${SFLAGS} -m64" fi if test "$warn" -eq 1; then - if test "$zconst" -eq 1; then - CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -DZLIB_CONST" - else - CFLAGS="${CFLAGS} -Wall -Wextra" + CFLAGS="${CFLAGS} -Wall -Wextra" + fi + if test "$zconst" -eq 1; then + if test "$warn" -eq 1; then + CFLAGS="${CFLAGS} -Wcast-qual" fi + CFLAGS="${CFLAGS} -DZLIB_CONST" fi if test $address -eq 1; then CFLAGS="${CFLAGS} -g -fsanitize=address -fno-omit-frame-pointer" -- cgit v1.2.3-55-g6feb