From: Ondřej Surý Date: Mon, 11 Oct 2021 19:18:49 +0000 (+0200) Subject: Use correct compiler version flag in the autoconf script X-Git-Tag: v9.17.20~41^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7eb208005fee18735c7ab6b3d05a7e8c2ab516d8;p=thirdparty%2Fbind9.git Use correct compiler version flag in the autoconf script The autoconf script prints used compiler version at the end of the configure script. Solaris native compiler doesn't support --version, and -V has to be used which in turn isn't supported by Gcc/Clang. Detect which version flag has to be used and call $CC with it. --- diff --git a/configure.ac b/configure.ac index d45e0300b4a..a3b54cbd71f 100644 --- a/configure.ac +++ b/configure.ac @@ -1668,7 +1668,11 @@ report() { echo " localstatedir: $localstatedir" echo "-------------------------------------------------------------------------------" echo "Compiler: $CC" - $CC --version 2>&1 | sed 's/^/ /' + AS_IF([test "$GCC" = "yes"], + [$CC --version 2>&1 | sed 's/^/ /'], + [AS_CASE([$host], + [*-solaris*],[$CC -V 2>&1 | sed 's/^/ /'], + [$CC --version 2>&1 | sed 's/^/ /'])]) echo "CFLAGS: $STD_CFLAGS $CFLAGS" echo "CPPFLAGS: $STD_CPPFLAGS $CPPFLAGS" echo "LDFLAGS: $LDFLAGS"