]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use correct compiler version flag in the autoconf script
authorOndřej Surý <ondrej@sury.org>
Mon, 11 Oct 2021 19:18:49 +0000 (21:18 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 18 Oct 2021 10:45:25 +0000 (12:45 +0200)
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.

configure.ac

index d45e0300b4ae66688a418edcf1965f0c792c7a5e..a3b54cbd71fbb1968e071dbd1963e69bbf7fcbc0 100644 (file)
@@ -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"