summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2022-03-27 13:47:33 -0700
committerMark Adler <madler@alumni.caltech.edu>2022-03-27 13:47:33 -0700
commite9a52aa129efe3834383e415580716a7c4027f8d (patch)
treeae8e611667c2fb64e21a1e98813ccba9a98a3315 /configure
parent1a1e8da703e28ea36873ef34dab0d90ff8f98393 (diff)
downloadzlib-e9a52aa129efe3834383e415580716a7c4027f8d.tar.gz
Check for cc masquerading as gcc or clang in configure.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 8 insertions, 2 deletions
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