]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
fix configure output when compiler is clang
authorSebastian Pop <s.pop@samsung.com>
Mon, 1 Apr 2019 18:21:18 +0000 (13:21 -0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 4 Apr 2019 08:11:46 +0000 (10:11 +0200)
The patch cleans up the expected errors that clutter the output of configure:

$ CC=clang ./configure
Checking for compiler... clang-6.0
clang: error: unknown argument: '-print-multiarch'
clang: error: no input files

With this patch the last two lines disappear.

configure

index b37123cefcf0c357d927364a6a0a6b285e8d6ced..f57f832791ff411ee6ef2e74908cff3477ad08e3 100755 (executable)
--- a/configure
+++ b/configure
@@ -266,7 +266,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
   CFLAGS="${CFLAGS} -std=c99"
 
   # Re-check ARCH if the compiler is a cross-compiler.
-  if $CC -print-multiarch && test -n "$($CC -print-multiarch)" 1> /dev/null 2>&1; then
+  if $CC -print-multiarch 1> /dev/null 2>&1 && test -n "$($CC -print-multiarch)" 1> /dev/null 2>&1; then
       CC_ARCH=`$CC $CFLAGS -print-multiarch | sed 's/-.*//g'`
   else
       CC_ARCH=`$CC $CFLAGS -dumpmachine | sed 's/-.*//g'`