]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix -std option in configure script
authorVladislav Shchapov <vladislav@shchapov.ru>
Fri, 3 May 2024 17:03:21 +0000 (22:03 +0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 19 Jun 2024 12:15:54 +0000 (14:15 +0200)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
configure

index 7543fd81e10afc27c3744715ba7c8514f795170f..4958630f75e686c87ca9c761c4d4843bf2d48a07 100755 (executable)
--- 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