From: Vladislav Shchapov Date: Fri, 3 May 2024 17:03:21 +0000 (+0500) Subject: Fix -std option in configure script X-Git-Tag: 2.2.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d27ff46e8acbbcbd20f2959342ea12434abfe768;p=thirdparty%2Fzlib-ng.git Fix -std option in configure script Signed-off-by: Vladislav Shchapov --- diff --git a/configure b/configure index 1c7a1ea4..620aebd5 100755 --- a/configure +++ b/configure @@ -300,7 +300,9 @@ show $cc -c $test.c if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then echo "$cc" | tee -a configure.log CC="$cc" - CFLAGS="${CFLAGS} -std=c11" + if test "${CFLAGS#*"-std="}" = "$CFLAGS" ; then + CFLAGS="${CFLAGS} -std=c11" + fi # Re-check ARCH if the compiler is a cross-compiler. if $CC -print-multiarch 1> /dev/null 2>&1 && test -n "$($CC -print-multiarch)" 1> /dev/null 2>&1; then