changeset 37184:3f9fcbf929c7

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.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 23 Sep 2013 10:16:13 -0700
parents b296df26556b
children 32c233e31143
files ChangeLog m4/warnings.m4
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 12 16:23:31 2013 -0600
+++ b/ChangeLog	Mon Sep 23 10:16:13 2013 -0700
@@ -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
--- a/m4/warnings.m4	Thu Sep 12 16:23:31 2013 -0600
+++ b/m4/warnings.m4	Mon Sep 23 10:16:13 2013 -0700
@@ -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 @@
   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])