From: Mark Adler Date: Sun, 27 Mar 2022 20:47:33 +0000 (-0700) Subject: Check for cc masquerading as gcc or clang in configure. X-Git-Tag: v1.2.12~2 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=e9a52aa129efe3834383e415580716a7c4027f8d;p=zlib.git Check for cc masquerading as gcc or clang in configure. --- diff --git a/configure b/configure index 98156e7..52ff4a0 100755 --- a/configure +++ b/configure @@ -167,8 +167,14 @@ extern int getchar(); int hello() {return getchar();} EOF -test -z "$CC" && echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log -cc=${CC-${CROSS_PREFIX}gcc} +if test -z "$CC"; then + echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log + if ${CROSS_PREFIX}gcc -v >/dev/null 2>&1; then + cc=${CROSS_PREFIX}gcc + else + cc=${CROSS_PREFIX}cc + fi +fi cflags=${CFLAGS-"-O3"} # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure case "$cc" in