From: David MacKenzie Date: Wed, 25 May 1994 01:21:46 +0000 (+0000) Subject: (AC_MINUS_C_MINUS_O): If $CC=cc, don't duplicate X-Git-Tag: fsf-origin~587 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b9773c660439bddfad72ba2a1de5947d5af3ad7;p=thirdparty%2Fautoconf.git (AC_MINUS_C_MINUS_O): If $CC=cc, don't duplicate the check. From Jim Meyering. --- diff --git a/acspecific.m4 b/acspecific.m4 index 5a9e2e253..c07b6c6d2 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -87,7 +87,11 @@ fi ])dnl dnl define(AC_MINUS_C_MINUS_O, -[AC_CHECKING(whether $CC and cc understand -c and -o together) +[if test "x$CC" != xcc; then + AC_CHECKING(whether $CC and cc understand -c and -o together) +else + AC_CHECKING(whether cc understands -c and -o together) +fi echo 'foo(){}' > conftest.c # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an @@ -95,15 +99,17 @@ echo 'foo(){}' > conftest.c if ${CC-cc} -c conftest.c -o conftest.o >/dev/null 2>&1 \ && test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o >/dev/null 2>&1 then - # Test first that cc exists at all. - if cc -c conftest.c >/dev/null 2>&1 - then - if cc -c conftest.c -o conftest2.o >/dev/null 2>&1 && \ - test -f conftest2.o && cc -c conftest.c -o conftest2.o >/dev/null 2>&1 + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if cc -c conftest.c >/dev/null 2>&1 then - : - else - AC_DEFINE(NO_MINUS_C_MINUS_O) + if cc -c conftest.c -o conftest2.o >/dev/null 2>&1 && \ + test -f conftest2.o && cc -c conftest.c -o conftest2.o >/dev/null 2>&1 + then + : + else + AC_DEFINE(NO_MINUS_C_MINUS_O) + fi fi fi else diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 5a9e2e253..c07b6c6d2 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -87,7 +87,11 @@ fi ])dnl dnl define(AC_MINUS_C_MINUS_O, -[AC_CHECKING(whether $CC and cc understand -c and -o together) +[if test "x$CC" != xcc; then + AC_CHECKING(whether $CC and cc understand -c and -o together) +else + AC_CHECKING(whether cc understands -c and -o together) +fi echo 'foo(){}' > conftest.c # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an @@ -95,15 +99,17 @@ echo 'foo(){}' > conftest.c if ${CC-cc} -c conftest.c -o conftest.o >/dev/null 2>&1 \ && test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o >/dev/null 2>&1 then - # Test first that cc exists at all. - if cc -c conftest.c >/dev/null 2>&1 - then - if cc -c conftest.c -o conftest2.o >/dev/null 2>&1 && \ - test -f conftest2.o && cc -c conftest.c -o conftest2.o >/dev/null 2>&1 + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if cc -c conftest.c >/dev/null 2>&1 then - : - else - AC_DEFINE(NO_MINUS_C_MINUS_O) + if cc -c conftest.c -o conftest2.o >/dev/null 2>&1 && \ + test -f conftest2.o && cc -c conftest.c -o conftest2.o >/dev/null 2>&1 + then + : + else + AC_DEFINE(NO_MINUS_C_MINUS_O) + fi fi fi else