warnings: port --enable-gcc-warnings to Solaris Studio 12.3
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Sep 2013 17:16:13 +0000 (10:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Sep 2013 17:16:39 +0000 (10:16 -0700)
Problem reported by Dagobert Michelsen via Eric Blake in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-09/msg00052.html>.
* m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use AC_LINK_IFELSE,
not AC_COMPILE_IFELSE.

ChangeLog
m4/warnings.m4

index 3288c7c..a963098 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-09-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       warnings: port --enable-gcc-warnings to Solaris Studio 12.3
+       Problem reported by Dagobert Michelsen via Eric Blake in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2013-09/msg00052.html>.
+       * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use AC_LINK_IFELSE,
+       not AC_COMPILE_IFELSE.
+
 2013-09-23  Eric Blake  <eblake@redhat.com>
 
        configmake: support new --runstatedir option
index 5f5da51..e3d239b 100644 (file)
@@ -1,4 +1,4 @@
-# warnings.m4 serial 10
+# warnings.m4 serial 11
 dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,9 +36,9 @@ AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
   gl_save_compiler_FLAGS="$gl_Flags"
   gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
     [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
-  AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
-                    [AS_VAR_SET(gl_Warn, [yes])],
-                    [AS_VAR_SET(gl_Warn, [no])])
+  AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
+                 [AS_VAR_SET(gl_Warn, [yes])],
+                 [AS_VAR_SET(gl_Warn, [no])])
   gl_Flags="$gl_save_compiler_FLAGS"
 ])
 AS_VAR_IF(gl_Warn, [yes], [$2], [$3])