Modernize AC_TRY_RUN invocations.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Jul 2010 23:06:56 +0000 (01:06 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 26 Aug 2010 20:57:54 +0000 (22:57 +0200)
31 files changed:
ChangeLog
m4/btowc.m4
m4/duplocale.m4
m4/exponentd.m4
m4/exponentf.m4
m4/exponentl.m4
m4/fopen.m4
m4/frexp.m4
m4/frexpl.m4
m4/ftello.m4
m4/iconv.m4
m4/iconv_open.m4
m4/intdiv0.m4
m4/isnanf.m4
m4/isnanl.m4
m4/ldexpl.m4
m4/mbrlen.m4
m4/mbrtowc.m4
m4/mbsrtowcs.m4
m4/open.m4
m4/printf-posix.m4
m4/printf.m4
m4/signbit.m4
m4/stpncpy.m4
m4/threadlib.m4
m4/truncl.m4
m4/ttyname_r.m4
m4/wcrtomb.m4
m4/wcsrtombs.m4
m4/wctob.m4
m4/wcwidth.m4

index 321c4ea..5b72904 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,49 @@
 2010-08-26  Bruno Haible  <bruno@clisp.org>
 
+       Modernize AC_TRY_RUN invocations.
+       * m4/btowc.m4 (gl_FUNC_BTOWC): Use AC_RUN_IFELSE instead of AC_TRY_RUN.
+       * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
+       * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise.
+       * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Likewise.
+       * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
+       * m4/fopen.m4 (gl_FUNC_FOPEN): Likewise.
+       * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
+       * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
+       * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
+       * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
+       * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Likewise.
+       * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
+       * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
+       * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
+       * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
+       * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL,
+       gl_MBRLEN_NUL_RETVAL): Likewise.
+       * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
+       gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL):
+       Likewise.
+       * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
+       * m4/open.m4 (gl_FUNC_OPEN): Likewise.
+       * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
+       gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
+       gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
+       gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
+       gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO, gl_PRINTF_PRECISION,
+       gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
+       gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99):
+       Likewise.
+       * m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
+       * m4/signbit.m4 (gl_SIGNBIT, gl_FLOATTYPE_SIGN_LOCATION): Likewise.
+       * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
+       * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
+       * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
+       * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
+       * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
+       * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION): Likewise.
+       * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
+       * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
+
+2010-08-26  Bruno Haible  <bruno@clisp.org>
+
        Modernize AC_TRY_LINK invocations.
        * m4/acosl.m4 (gl_FUNC_ACOSL): Use AC_LINK_IFELSE instead of
        AC_TRY_LINK.
index c4ee4e4..b16b1f0 100644 (file)
@@ -1,4 +1,4 @@
-# btowc.m4 serial 6
+# btowc.m4 serial 7
 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -26,7 +26,8 @@ AC_DEFUN([gl_FUNC_BTOWC],
     AC_CACHE_CHECK([whether btowc(0) is correct],
       [gl_cv_func_btowc_nul],
       [
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 #include <wchar.h>
@@ -35,7 +36,7 @@ int main ()
   if (btowc ('\0') != 0)
     return 1;
   return 0;
-}],
+}]])],
           [gl_cv_func_btowc_nul=yes],
           [gl_cv_func_btowc_nul=no],
           [
@@ -65,7 +66,8 @@ changequote(,)dnl
         esac
 changequote([,])dnl
         if test $LOCALE_FR != none; then
-          AC_TRY_RUN([
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <stdio.h>
 #include <string.h>
@@ -78,7 +80,7 @@ int main ()
         return 1;
     }
   return 0;
-}],
+}]])],
             [gl_cv_func_btowc_eof=yes],
             [gl_cv_func_btowc_eof=no],
             [:])
index e7e784e..4fc6137 100644 (file)
@@ -1,4 +1,4 @@
-# duplocale.m4 serial 3
+# duplocale.m4 serial 4
 dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,8 @@ AC_DEFUN([gl_FUNC_DUPLOCALE],
     AC_REQUIRE([gl_LOCALE_H])
     AC_CACHE_CHECK([whether duplocale(LC_GLOBAL_LOCALE) works],
       [gl_cv_func_duplocale_works],
-      [AC_TRY_RUN([
+      [AC_RUN_IFELSE(
+         [AC_LANG_SOURCE([[
 #include <locale.h>
 #if HAVE_XLOCALE_H
 # include <xlocale.h>
@@ -27,7 +28,9 @@ int main ()
   if (duplocale (LC_GLOBAL_LOCALE) == (locale_t)0)
     return 1;
   return 0;
-}], [gl_cv_func_duplocale_works=yes], [gl_cv_func_duplocale_works=no],
+}]])],
+         [gl_cv_func_duplocale_works=yes],
+         [gl_cv_func_duplocale_works=no],
          [dnl Guess it works except on glibc < 2.12 and AIX.
           case "$host_os" in
             aix*) gl_cv_func_duplocale_works="guessing no";;
index 5d44d0e..ad26ddf 100644 (file)
@@ -1,5 +1,5 @@
-# exponentd.m4 serial 1
-dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
+# exponentd.m4 serial 2
+dnl Copyright (C) 2007-2008, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,7 +8,8 @@ AC_DEFUN([gl_DOUBLE_EXPONENT_LOCATION],
   AC_CACHE_CHECK([where to find the exponent in a 'double'],
     [gl_cv_cc_double_expbit0],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <float.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -71,7 +72,7 @@ int main ()
   fprintf (fp, "unknown");
   return (fclose (fp) != 0);
 }
-        ],
+        ]])],
         [gl_cv_cc_double_expbit0=`cat conftest.out`],
         [gl_cv_cc_double_expbit0="unknown"],
         [
index 4d8063f..34cf197 100644 (file)
@@ -1,5 +1,5 @@
-# exponentf.m4 serial 1
-dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
+# exponentf.m4 serial 2
+dnl Copyright (C) 2007-2008, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,7 +8,8 @@ AC_DEFUN([gl_FLOAT_EXPONENT_LOCATION],
   AC_CACHE_CHECK([where to find the exponent in a 'float'],
     [gl_cv_cc_float_expbit0],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <float.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -72,7 +73,7 @@ int main ()
   fprintf (fp, "unknown");
   return (fclose (fp) != 0);
 }
-        ],
+        ]])],
         [gl_cv_cc_float_expbit0=`cat conftest.out`],
         [gl_cv_cc_float_expbit0="unknown"],
         [gl_cv_cc_float_expbit0="word 0 bit 23"])
index a700d3b..b625fea 100644 (file)
@@ -1,4 +1,4 @@
-# exponentl.m4 serial 2
+# exponentl.m4 serial 3
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,8 @@ AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION],
   AC_CACHE_CHECK([where to find the exponent in a 'long double'],
     [gl_cv_cc_long_double_expbit0],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <float.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -74,7 +75,7 @@ int main ()
   fprintf (fp, "unknown");
   return (fclose (fp) != 0);
 }
-        ],
+        ]])],
         [gl_cv_cc_long_double_expbit0=`cat conftest.out`],
         [gl_cv_cc_long_double_expbit0="unknown"],
         [
index 757d4a1..11e0f9a 100644 (file)
@@ -21,13 +21,16 @@ AC_DEFUN([gl_FUNC_FOPEN],
       AC_CACHE_CHECK([whether fopen recognizes a trailing slash],
         [gl_cv_func_fopen_slash],
         [
-          AC_TRY_RUN([
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
 #include <stddef.h>
 #include <stdio.h>
 int main ()
 {
   return fopen ("conftest.sl/", "w") != NULL;
-}], [gl_cv_func_fopen_slash=yes], [gl_cv_func_fopen_slash=no],
+}]])],
+            [gl_cv_func_fopen_slash=yes],
+            [gl_cv_func_fopen_slash=no],
             [
 changequote(,)dnl
              case "$host_os" in
index 291348b..530fdbc 100644 (file)
@@ -99,7 +99,8 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <float.h>
 #include <math.h>
 #include <string.h>
@@ -139,11 +140,13 @@ int main()
       return 1;
   }
   return 0;
-}], [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no],
-      [case "$host_os" in
-         netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
-         *)                        gl_cv_func_frexp_works="guessing yes";;
-       esac
-      ])
+}]])],
+        [gl_cv_func_frexp_works=yes],
+        [gl_cv_func_frexp_works=no],
+        [case "$host_os" in
+           netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+           *)                        gl_cv_func_frexp_works="guessing yes";;
+         esac
+        ])
     ])
 ])
index f2e254c..633f056 100644 (file)
@@ -1,4 +1,4 @@
-# frexpl.m4 serial 11
+# frexpl.m4 serial 12
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -112,7 +112,8 @@ AC_DEFUN([gl_FUNC_FREXPL_WORKS],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether frexpl works], [gl_cv_func_frexpl_works],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <float.h>
 #include <math.h>
 /* Override the values of <float.h>, like done in float.in.h.  */
@@ -182,15 +183,17 @@ int main()
       return 1;
   }
   return 0;
-}], [gl_cv_func_frexpl_works=yes], [gl_cv_func_frexpl_works=no],
-      [
+}]])],
+        [gl_cv_func_frexpl_works=yes],
+        [gl_cv_func_frexpl_works=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-         aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
-            gl_cv_func_frexpl_works="guessing no";;
-         *) gl_cv_func_frexpl_works="guessing yes";;
-       esac
+         case "$host_os" in
+           aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
+              gl_cv_func_frexpl_works="guessing no";;
+           *) gl_cv_func_frexpl_works="guessing yes";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
index 38bcf43..33201a0 100644 (file)
@@ -47,7 +47,8 @@ changequote(,)dnl
             *)        gl_cv_func_ftello_works="guessing yes" ;;
           esac
 changequote([,])dnl
-          AC_TRY_RUN([
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -104,7 +105,9 @@ main (void)
   /* The file's contents is now "foogarsh!".  */
 
   return 0;
-}], [gl_cv_func_ftello_works=yes], [gl_cv_func_ftello_works=no], [:])
+}]])],
+            [gl_cv_func_ftello_works=yes],
+            [gl_cv_func_ftello_works=no], [:])
         ])
       case "$gl_cv_func_ftello_works" in
         *yes) ;;
index b7f5bfe..5e838b0 100644 (file)
@@ -1,4 +1,4 @@
-# iconv.m4 serial 11c
+# iconv.m4 serial 14 (gettext-0.18.2)
 dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -72,7 +72,8 @@ AC_DEFUN([AM_ICONV_LINK],
       if test $am_cv_lib_iconv = yes; then
         LIBS="$LIBS $LIBICONV"
       fi
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <iconv.h>
 #include <string.h>
 int main ()
@@ -165,7 +166,9 @@ int main ()
       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
     return 1;
   return 0;
-}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+}]])],
+        [am_cv_func_iconv_works=yes],
+        [am_cv_func_iconv_works=no],
         [
 changequote(,)dnl
          case "$host_os" in
index 60f62ca..8219ecf 100644 (file)
@@ -1,4 +1,4 @@
-# iconv_open.m4 serial 7
+# iconv_open.m4 serial 8
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -63,7 +63,8 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN_UTF],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS $LIBICONV"
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <iconv.h>
 #include <errno.h>
 #include <stdio.h>
@@ -209,7 +210,9 @@ int main ()
     ASSERT (iconv_close (cd) == 0);
   }
   return 0;
-}], [gl_cv_func_iconv_supports_utf=yes], [gl_cv_func_iconv_supports_utf=no],
+}]])],
+          [gl_cv_func_iconv_supports_utf=yes],
+          [gl_cv_func_iconv_supports_utf=no],
           [
            dnl We know that GNU libiconv, GNU libc, and Solaris >= 9 do.
            dnl OSF/1 5.1 has these encodings, but inserts a BOM in the "to"
index 289c4df..9b27ff1 100644 (file)
@@ -1,5 +1,5 @@
-# intdiv0.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc.
+# intdiv0.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2002, 2007-2008, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -29,7 +29,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test -z "$gt_cv_int_divbyzero_sigfpe"; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <stdlib.h>
 #include <signal.h>
 
@@ -61,7 +62,9 @@ int main ()
   nan = y / y;
   exit (1);
 }
-], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no],
+]])],
+          [gt_cv_int_divbyzero_sigfpe=yes],
+          [gt_cv_int_divbyzero_sigfpe=no],
           [
             # Guess based on the CPU.
 changequote(,)dnl
index 1fce2ee..c040090 100644 (file)
@@ -124,7 +124,8 @@ AC_DEFUN([gl_ISNANF_WORKS],
   AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
   AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <math.h>
 #if __GNUC__ >= 4
 # undef isnanf
@@ -173,7 +174,9 @@ int main()
 #endif
 
   return 0;
-}], [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no],
+}]])],
+        [gl_cv_func_isnanf_works=yes],
+        [gl_cv_func_isnanf_works=no],
         [case "$host_os" in
            irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
            *)                gl_cv_func_isnanf_works="guessing yes";;
index ad003ab..de7eafb 100644 (file)
@@ -122,7 +122,8 @@ AC_DEFUN([gl_FUNC_ISNANL_WORKS],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <float.h>
 #include <limits.h>
 #include <math.h>
@@ -233,17 +234,19 @@ int main ()
 #endif
 
   return 0;
-}], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no],
-      [case "$host_cpu" in
-                               # Guess no on ia64, x86_64, i386.
-         ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
-         *)
-           case "$host_os" in
-             netbsd*) gl_cv_func_isnanl_works="guessing no";;
-             *)       gl_cv_func_isnanl_works="guessing yes";;
-           esac
-           ;;
-       esac
-      ])
+}]])],
+        [gl_cv_func_isnanl_works=yes],
+        [gl_cv_func_isnanl_works=no],
+        [case "$host_cpu" in
+                                 # Guess no on ia64, x86_64, i386.
+           ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
+           *)
+             case "$host_os" in
+               netbsd*) gl_cv_func_isnanl_works="guessing no";;
+               *)       gl_cv_func_isnanl_works="guessing yes";;
+             esac
+             ;;
+         esac
+        ])
     ])
 ])
index aaa4eb5..0a4fe88 100644 (file)
@@ -1,4 +1,4 @@
-# ldexpl.m4 serial 7
+# ldexpl.m4 serial 8
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -81,7 +81,8 @@ AC_DEFUN([gl_FUNC_LDEXPL_WORKS],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether ldexpl works], [gl_cv_func_ldexpl_works],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <math.h>
 extern long double ldexpl (long double, int);
 int main()
@@ -91,14 +92,16 @@ int main()
   volatile long double x2 = 1.73205L;
   volatile long double y2 = ldexpl (x2, 0);
   return (y1 != 0.5L) || (y2 != x2);
-}], [gl_cv_func_ldexpl_works=yes], [gl_cv_func_ldexpl_works=no],
-      [
+}]])],
+        [gl_cv_func_ldexpl_works=yes],
+        [gl_cv_func_ldexpl_works=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-         aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
-         *)               gl_cv_func_ldexpl_works="guessing yes";;
-       esac
+         case "$host_os" in
+           aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
+           *)               gl_cv_func_ldexpl_works="guessing yes";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
index 81fc671..731c2b3 100644 (file)
@@ -52,7 +52,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_JA != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -69,7 +70,7 @@ int main ()
           return 1;
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_mbrlen_incomplete_state=yes],
           [gl_cv_func_mbrlen_incomplete_state=no],
           [])
@@ -102,7 +103,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -137,7 +139,7 @@ int main ()
         }
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_mbrlen_retval=yes],
           [gl_cv_func_mbrlen_retval=no],
           [])
@@ -167,7 +169,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_ZH_CN != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -183,7 +186,7 @@ int main ()
         return 1;
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_mbrlen_nul_retval=yes],
           [gl_cv_func_mbrlen_nul_retval=no],
           [])
index 0f5939b..28b9c43 100644 (file)
@@ -108,7 +108,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_JA != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -126,7 +127,7 @@ int main ()
           return 1;
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_mbrtowc_incomplete_state=yes],
           [gl_cv_func_mbrtowc_incomplete_state=no],
           [:])
@@ -156,7 +157,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_ZH_CN != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
@@ -178,7 +180,7 @@ int main ()
         return 1;
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_mbrtowc_sanitycheck=yes],
           [gl_cv_func_mbrtowc_sanitycheck=no],
           [:])
@@ -208,7 +210,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_FR_UTF8 != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -228,7 +231,10 @@ int main ()
         return 1;
     }
   return 0;
-}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [:])
+}]])],
+          [gl_cv_func_mbrtowc_null_arg=yes],
+          [gl_cv_func_mbrtowc_null_arg=no],
+          [:])
       fi
     ])
 ])
@@ -258,7 +264,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -295,7 +302,7 @@ int main ()
         }
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_mbrtowc_retval=yes],
           [gl_cv_func_mbrtowc_retval=no],
           [:])
@@ -325,7 +332,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_ZH_CN != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -342,7 +350,7 @@ int main ()
         return 1;
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_mbrtowc_nul_retval=yes],
           [gl_cv_func_mbrtowc_nul_retval=no],
           [:])
index f9c430f..e854337 100644 (file)
@@ -1,4 +1,4 @@
-# mbsrtowcs.m4 serial 6
+# mbsrtowcs.m4 serial 7
 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -57,7 +57,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -108,7 +109,7 @@ int main ()
           }
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_mbsrtowcs_works=yes],
           [gl_cv_func_mbsrtowcs_works=no],
           [:])
index 8731a25..d402da9 100644 (file)
@@ -22,7 +22,8 @@ AC_DEFUN([gl_FUNC_OPEN],
             touch conftest.tmp
             ln -s conftest.tmp conftest.lnk
           fi
-          AC_TRY_RUN([
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
 #include <fcntl.h>
 #if HAVE_UNISTD_H
 # include <unistd.h>
@@ -33,7 +34,9 @@ int main ()
   if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
 #endif
   return open ("conftest.sl/", O_CREAT, 0600) >= 0;
-}], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no],
+}]])],
+            [gl_cv_func_open_slash=yes],
+            [gl_cv_func_open_slash=no],
             [
 changequote(,)dnl
              case "$host_os" in
index 1eacf95..2dc52a4 100644 (file)
@@ -1,4 +1,4 @@
-# printf-posix.m4 serial 5 (gettext-0.18)
+# printf-posix.m4 serial 6 (gettext-0.18.2)
 dnl Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,8 @@ AC_DEFUN([gt_PRINTF_POSIX],
   AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
     gt_cv_func_printf_posix,
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 /* The string "%2$d %1$d", with dollar characters protected from the shell's
@@ -25,16 +26,18 @@ int main ()
 {
   sprintf (buf, format, 33, 55);
   return (strcmp (buf, "55 33") != 0);
-}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
-      [
-        AC_EGREP_CPP([notposix], [
+}]])],
+        [gt_cv_func_printf_posix=yes],
+        [gt_cv_func_printf_posix=no],
+        [
+          AC_EGREP_CPP([notposix], [
 #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
   notposix
 #endif
-          ],
-          [gt_cv_func_printf_posix="guessing no"],
-          [gt_cv_func_printf_posix="guessing yes"])
-      ])
+            ],
+            [gt_cv_func_printf_posix="guessing no"],
+            [gt_cv_func_printf_posix="guessing yes"])
+        ])
     ])
   case $gt_cv_func_printf_posix in
     *yes)
index 33f5aef..e850862 100644 (file)
@@ -17,7 +17,8 @@ AC_DEFUN([gl_PRINTF_SIZES_C99],
   AC_CACHE_CHECK([whether printf supports size specifiers as in C99],
     [gl_cv_func_printf_sizes_c99],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stddef.h>
 #include <stdio.h>
 #include <string.h>
@@ -50,34 +51,36 @@ int main ()
       || strcmp (buf, "1.5 33") != 0)
     return 1;
   return 0;
-}], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no],
-      [
+}]])],
+        [gl_cv_func_printf_sizes_c99=yes],
+        [gl_cv_func_printf_sizes_c99=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
-                               # Guess yes on FreeBSD >= 5.
-         freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
-         freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
-                               # Guess yes on MacOS X >= 10.3.
-         darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
-         darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
-                               # Guess yes on OpenBSD >= 3.9.
-         openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
-                               gl_cv_func_printf_sizes_c99="guessing no";;
-         openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
-                               # Guess yes on Solaris >= 2.10.
-         solaris2.[0-9]*)      gl_cv_func_printf_sizes_c99="guessing no";;
-         solaris*)             gl_cv_func_printf_sizes_c99="guessing yes";;
-                               # Guess yes on NetBSD >= 3.
-         netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
-                               gl_cv_func_printf_sizes_c99="guessing no";;
-         netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_printf_sizes_c99="guessing no";;
-       esac
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
+           darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_printf_sizes_c99="guessing no";;
+           openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.10.
+           solaris2.[0-9]*)      gl_cv_func_printf_sizes_c99="guessing no";;
+           solaris*)             gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_printf_sizes_c99="guessing no";;
+           netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_printf_sizes_c99="guessing no";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -92,7 +95,8 @@ AC_DEFUN([gl_PRINTF_LONG_DOUBLE],
   AC_CACHE_CHECK([whether printf supports 'long double' arguments],
     [gl_cv_func_printf_long_double],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[10000];
@@ -111,16 +115,18 @@ int main ()
       || strcmp (buf, "1.75 33") != 0)
     return 1;
   return 0;
-}], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no],
-      [
+}]])],
+        [gl_cv_func_printf_long_double=yes],
+        [gl_cv_func_printf_long_double=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-         beos*)        gl_cv_func_printf_long_double="guessing no";;
-         mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
-         *)            gl_cv_func_printf_long_double="guessing yes";;
-       esac
+         case "$host_os" in
+           beos*)        gl_cv_func_printf_long_double="guessing no";;
+           mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
+           *)            gl_cv_func_printf_long_double="guessing yes";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -136,7 +142,8 @@ AC_DEFUN([gl_PRINTF_INFINITE],
   AC_CACHE_CHECK([whether printf supports infinite 'double' arguments],
     [gl_cv_func_printf_infinite],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static int
@@ -201,32 +208,34 @@ int main ()
         || strcmp (buf, "-0") != 0)
     return 1;
   return 0;
-}], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no],
-      [
+}]])],
+        [gl_cv_func_printf_infinite=yes],
+        [gl_cv_func_printf_infinite=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
-                               # Guess yes on FreeBSD >= 6.
-         freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
-         freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
-                               # Guess yes on MacOS X >= 10.3.
-         darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
-         darwin*)              gl_cv_func_printf_infinite="guessing yes";;
-                               # Guess yes on HP-UX >= 11.
-         hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
-         hpux*)                gl_cv_func_printf_infinite="guessing yes";;
-                               # Guess yes on NetBSD >= 3.
-         netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
-                               gl_cv_func_printf_infinite="guessing no";;
-         netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
-                               # Guess yes on BeOS.
-         beos*)                gl_cv_func_printf_infinite="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_printf_infinite="guessing no";;
-       esac
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on FreeBSD >= 6.
+           freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
+           darwin*)              gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on HP-UX >= 11.
+           hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
+           hpux*)                gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_printf_infinite="guessing no";;
+           netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_printf_infinite="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_printf_infinite="guessing no";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -252,7 +261,8 @@ AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE],
       AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments],
         [gl_cv_func_printf_infinite_long_double],
         [
-          AC_TRY_RUN([
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
 ]GL_NOCRASH[
 #include <float.h>
 #include <stdio.h>
@@ -414,38 +424,38 @@ int main ()
   }
 #endif
   return 0;
-}],
-          [gl_cv_func_printf_infinite_long_double=yes],
-          [gl_cv_func_printf_infinite_long_double=no],
-          [
+}]])],
+            [gl_cv_func_printf_infinite_long_double=yes],
+            [gl_cv_func_printf_infinite_long_double=no],
+            [
 changequote(,)dnl
-           case "$host_cpu" in
-                                   # Guess no on ia64, x86_64, i386.
-             ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
-             *)
-               case "$host_os" in
-                                       # Guess yes on glibc systems.
-                 *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                       # Guess yes on FreeBSD >= 6.
-                 freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
-                 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                       # Guess yes on MacOS X >= 10.3.
-                 darwin[1-6].*)        gl_cv_func_printf_infinite_long_double="guessing no";;
-                 darwin*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                       # Guess yes on HP-UX >= 11.
-                 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
-                 hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                       # Guess yes on NetBSD >= 3.
-                 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
-                                       gl_cv_func_printf_infinite_long_double="guessing no";;
-                 netbsd*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                       # If we don't know, assume the worst.
-                 *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
-               esac
-               ;;
-           esac
+             case "$host_cpu" in
+                                     # Guess no on ia64, x86_64, i386.
+               ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
+               *)
+                 case "$host_os" in
+                                         # Guess yes on glibc systems.
+                   *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess yes on FreeBSD >= 6.
+                   freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
+                   freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess yes on MacOS X >= 10.3.
+                   darwin[1-6].*)        gl_cv_func_printf_infinite_long_double="guessing no";;
+                   darwin*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess yes on HP-UX >= 11.
+                   hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
+                   hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess yes on NetBSD >= 3.
+                   netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                         gl_cv_func_printf_infinite_long_double="guessing no";;
+                   netbsd*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # If we don't know, assume the worst.
+                   *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
+                 esac
+                 ;;
+             esac
 changequote([,])dnl
-          ])
+            ])
         ])
       ;;
     *)
@@ -466,7 +476,8 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_A],
   AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives],
     [gl_cv_func_printf_directive_a],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[100];
@@ -512,26 +523,28 @@ int main ()
           && strcmp (buf, "0x8.0p-2") != 0))
     return 1;
   return 0;
-}], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no],
-      [
-       case "$host_os" in
-                               # Guess yes on glibc >= 2.5 systems.
-         *-gnu*)
-           AC_EGREP_CPP([BZ2908], [
-             #include <features.h>
-             #ifdef __GNU_LIBRARY__
-              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
-               BZ2908
-              #endif
-             #endif
-             ],
-             [gl_cv_func_printf_directive_a="guessing yes"],
-             [gl_cv_func_printf_directive_a="guessing no"])
-           ;;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_printf_directive_a="guessing no";;
-       esac
-      ])
+}]])],
+        [gl_cv_func_printf_directive_a=yes],
+        [gl_cv_func_printf_directive_a=no],
+        [
+         case "$host_os" in
+                                 # Guess yes on glibc >= 2.5 systems.
+           *-gnu*)
+             AC_EGREP_CPP([BZ2908], [
+               #include <features.h>
+               #ifdef __GNU_LIBRARY__
+                #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+                 BZ2908
+                #endif
+               #endif
+               ],
+               [gl_cv_func_printf_directive_a="guessing yes"],
+               [gl_cv_func_printf_directive_a="guessing no"])
+             ;;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_printf_directive_a="guessing no";;
+         esac
+        ])
     ])
 ])
 
@@ -546,7 +559,8 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_F],
   AC_CACHE_CHECK([whether printf supports the 'F' directive],
     [gl_cv_func_printf_directive_f],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[100];
@@ -563,26 +577,28 @@ int main ()
       || strcmp (buf, "1234") != 0)
     return 1;
   return 0;
-}], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no],
-      [
+}]])],
+        [gl_cv_func_printf_directive_f=yes],
+        [gl_cv_func_printf_directive_f=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
-                               # Guess yes on FreeBSD >= 6.
-         freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
-         freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
-                               # Guess yes on MacOS X >= 10.3.
-         darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
-         darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
-                               # Guess yes on Solaris >= 2.10.
-         solaris2.[0-9]*)      gl_cv_func_printf_directive_f="guessing no";;
-         solaris*)             gl_cv_func_printf_directive_f="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_printf_directive_f="guessing no";;
-       esac
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
+                                 # Guess yes on FreeBSD >= 6.
+           freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
+           darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
+                                 # Guess yes on Solaris >= 2.10.
+           solaris2.[0-9]*)      gl_cv_func_printf_directive_f="guessing no";;
+           solaris*)             gl_cv_func_printf_directive_f="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_printf_directive_f="guessing no";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -597,7 +613,8 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
   AC_CACHE_CHECK([whether printf supports the 'n' directive],
     [gl_cv_func_printf_directive_n],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char fmtstring[10];
@@ -614,14 +631,16 @@ int main ()
       || count != 4)
     return 1;
   return 0;
-}], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no],
-      [
+}]])],
+        [gl_cv_func_printf_directive_n=yes],
+        [gl_cv_func_printf_directive_n=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-         *)     gl_cv_func_printf_directive_n="guessing yes";;
-       esac
+         case "$host_os" in
+           *)     gl_cv_func_printf_directive_n="guessing yes";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -639,7 +658,8 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_LS],
   AC_CACHE_CHECK([whether printf supports the 'ls' directive],
     [gl_cv_func_printf_directive_ls],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
@@ -687,19 +707,21 @@ int main ()
       return 1;
   }
   return 0;
-}], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no],
-      [
+}]])],
+        [gl_cv_func_printf_directive_ls=yes],
+        [gl_cv_func_printf_directive_ls=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-         openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
-         irix*)           gl_cv_func_printf_directive_ls="guessing no";;
-         solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
-         cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
-         beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
-         *)               gl_cv_func_printf_directive_ls="guessing yes";;
-       esac
+         case "$host_os" in
+           openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
+           irix*)           gl_cv_func_printf_directive_ls="guessing no";;
+           solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
+           cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
+           beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
+           *)               gl_cv_func_printf_directive_ls="guessing yes";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -714,7 +736,8 @@ AC_DEFUN([gl_PRINTF_POSITIONS],
   AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions],
     [gl_cv_func_printf_positions],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 /* The string "%2$d %1$d", with dollar characters protected from the shell's
@@ -725,18 +748,20 @@ int main ()
 {
   sprintf (buf, format, 33, 55);
   return (strcmp (buf, "55 33") != 0);
-}], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no],
-      [
+}]])],
+        [gl_cv_func_printf_positions=yes],
+        [gl_cv_func_printf_positions=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-         netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
-                       gl_cv_func_printf_positions="guessing no";;
-         beos*)        gl_cv_func_printf_positions="guessing no";;
-         mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
-         *)            gl_cv_func_printf_positions="guessing yes";;
-       esac
+         case "$host_os" in
+           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+                         gl_cv_func_printf_positions="guessing no";;
+           beos*)        gl_cv_func_printf_positions="guessing no";;
+           mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+           *)            gl_cv_func_printf_positions="guessing yes";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -751,7 +776,8 @@ AC_DEFUN([gl_PRINTF_FLAG_GROUPING],
   AC_CACHE_CHECK([whether printf supports the grouping flag],
     [gl_cv_func_printf_flag_grouping],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[100];
@@ -761,17 +787,19 @@ int main ()
       || buf[strlen (buf) - 1] != '9')
     return 1;
   return 0;
-}], [gl_cv_func_printf_flag_grouping=yes], [gl_cv_func_printf_flag_grouping=no],
-      [
+}]])],
+        [gl_cv_func_printf_flag_grouping=yes],
+        [gl_cv_func_printf_flag_grouping=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-         cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
-         netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
-         mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
-         *)            gl_cv_func_printf_flag_grouping="guessing yes";;
-       esac
+         case "$host_os" in
+           cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
+           netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
+           mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+           *)            gl_cv_func_printf_flag_grouping="guessing yes";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -787,7 +815,8 @@ AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST],
   AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly],
     [gl_cv_func_printf_flag_leftadjust],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[100];
@@ -798,7 +827,7 @@ int main ()
       || strcmp (buf, "ab  c") != 0)
     return 1;
   return 0;
-}],
+}]])],
         [gl_cv_func_printf_flag_leftadjust=yes],
         [gl_cv_func_printf_flag_leftadjust=no],
         [
@@ -828,7 +857,8 @@ AC_DEFUN([gl_PRINTF_FLAG_ZERO],
   AC_CACHE_CHECK([whether printf supports the zero flag correctly],
     [gl_cv_func_printf_flag_zero],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[100];
@@ -839,19 +869,21 @@ int main ()
           && strcmp (buf, "  infinity") != 0))
     return 1;
   return 0;
-}], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no],
-      [
+}]])],
+        [gl_cv_func_printf_flag_zero=yes],
+        [gl_cv_func_printf_flag_zero=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-                 # Guess yes on glibc systems.
-         *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
-                 # Guess yes on BeOS.
-         beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
-                 # If we don't know, assume the worst.
-         *)      gl_cv_func_printf_flag_zero="guessing no";;
-       esac
+         case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+                   # Guess yes on BeOS.
+           beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_printf_flag_zero="guessing no";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -868,7 +900,8 @@ AC_DEFUN([gl_PRINTF_PRECISION],
   AC_CACHE_CHECK([whether printf supports large precisions],
     [gl_cv_func_printf_precision],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[5000];
@@ -881,17 +914,19 @@ int main ()
   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
     return 1;
   return 0;
-}], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no],
-      [
+}]])],
+        [gl_cv_func_printf_precision=yes],
+        [gl_cv_func_printf_precision=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-         # Guess no only on native Win32 and BeOS systems.
-         mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
-         beos*)        gl_cv_func_printf_precision="guessing no" ;;
-         *)            gl_cv_func_printf_precision="guessing yes" ;;
-       esac
+         case "$host_os" in
+           # Guess no only on native Win32 and BeOS systems.
+           mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+           beos*)        gl_cv_func_printf_precision="guessing no" ;;
+           *)            gl_cv_func_printf_precision="guessing yes" ;;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -1031,7 +1066,8 @@ AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
   AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
     [gl_cv_func_snprintf_truncation_c99],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[100];
@@ -1042,47 +1078,49 @@ int main ()
   if (memcmp (buf, "45\0DEF", 6) != 0)
     return 1;
   return 0;
-}], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no],
-      [
+}]])],
+        [gl_cv_func_snprintf_truncation_c99=yes],
+        [gl_cv_func_snprintf_truncation_c99=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on FreeBSD >= 5.
-         freebsd[1-4]*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
-         freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on MacOS X >= 10.3.
-         darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
-         darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on OpenBSD >= 3.9.
-         openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
-                               gl_cv_func_snprintf_truncation_c99="guessing no";;
-         openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on Solaris >= 2.6.
-         solaris2.[0-5]*)      gl_cv_func_snprintf_truncation_c99="guessing no";;
-         solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on AIX >= 4.
-         aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
-         aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on HP-UX >= 11.
-         hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
-         hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on IRIX >= 6.5.
-         irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on OSF/1 >= 5.
-         osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
-         osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on NetBSD >= 3.
-         netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
-                               gl_cv_func_snprintf_truncation_c99="guessing no";;
-         netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # Guess yes on BeOS.
-         beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_snprintf_truncation_c99="guessing no";;
-       esac
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
+           darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
+           openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.6.
+           solaris2.[0-5]*)      gl_cv_func_snprintf_truncation_c99="guessing no";;
+           solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
+           aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on HP-UX >= 11.
+           hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+           hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on IRIX >= 6.5.
+           irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on OSF/1 >= 5.
+           osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
+           osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_snprintf_truncation_c99="guessing no";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -1108,7 +1146,8 @@ AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99],
   AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
     [gl_cv_func_snprintf_retval_c99],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char buf[100];
@@ -1118,39 +1157,41 @@ int main ()
   if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
     return 1;
   return 0;
-}], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no],
-      [
+}]])],
+        [gl_cv_func_snprintf_retval_c99=yes],
+        [gl_cv_func_snprintf_retval_c99=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
-                               # Guess yes on FreeBSD >= 5.
-         freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
-         freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
-                               # Guess yes on MacOS X >= 10.3.
-         darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
-         darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
-                               # Guess yes on OpenBSD >= 3.9.
-         openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
-                               gl_cv_func_snprintf_retval_c99="guessing no";;
-         openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
-                               # Guess yes on Solaris >= 2.6.
-         solaris2.[0-5]*)      gl_cv_func_snprintf_retval_c99="guessing no";;
-         solaris*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
-                               # Guess yes on AIX >= 4.
-         aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
-         aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
-                               # Guess yes on NetBSD >= 3.
-         netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
-                               gl_cv_func_snprintf_retval_c99="guessing no";;
-         netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
-                               # Guess yes on BeOS.
-         beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
-       esac
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
+           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_snprintf_retval_c99="guessing no";;
+           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.6.
+           solaris2.[0-5]*)      gl_cv_func_snprintf_retval_c99="guessing no";;
+           solaris*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
+           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_retval_c99="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -1165,7 +1206,8 @@ AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
   AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive],
     [gl_cv_func_snprintf_directive_n],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 static char fmtstring[10];
@@ -1181,40 +1223,42 @@ int main ()
   if (count != 6)
     return 1;
   return 0;
-}], [gl_cv_func_snprintf_directive_n=yes], [gl_cv_func_snprintf_directive_n=no],
-      [
+}]])],
+        [gl_cv_func_snprintf_directive_n=yes],
+        [gl_cv_func_snprintf_directive_n=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # Guess yes on FreeBSD >= 5.
-         freebsd[1-4]*)        gl_cv_func_snprintf_directive_n="guessing no";;
-         freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # Guess yes on MacOS X >= 10.3.
-         darwin[1-6].*)        gl_cv_func_snprintf_directive_n="guessing no";;
-         darwin*)              gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # Guess yes on Solaris >= 2.6.
-         solaris2.[0-5]*)      gl_cv_func_snprintf_directive_n="guessing no";;
-         solaris*)             gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # Guess yes on AIX >= 4.
-         aix[1-3]*)            gl_cv_func_snprintf_directive_n="guessing no";;
-         aix*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # Guess yes on IRIX >= 6.5.
-         irix6.5)              gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # Guess yes on OSF/1 >= 5.
-         osf[3-4]*)            gl_cv_func_snprintf_directive_n="guessing no";;
-         osf*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # Guess yes on NetBSD >= 3.
-         netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
-                               gl_cv_func_snprintf_directive_n="guessing no";;
-         netbsd*)              gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # Guess yes on BeOS.
-         beos*)                gl_cv_func_snprintf_directive_n="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_snprintf_directive_n="guessing no";;
-       esac
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_snprintf_directive_n="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_directive_n="guessing no";;
+           darwin*)              gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on Solaris >= 2.6.
+           solaris2.[0-5]*)      gl_cv_func_snprintf_directive_n="guessing no";;
+           solaris*)             gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_directive_n="guessing no";;
+           aix*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on IRIX >= 6.5.
+           irix6.5)              gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on OSF/1 >= 5.
+           osf[3-4]*)            gl_cv_func_snprintf_directive_n="guessing no";;
+           osf*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_directive_n="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_snprintf_directive_n="guessing no";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
@@ -1229,17 +1273,18 @@ AC_DEFUN([gl_SNPRINTF_SIZE1],
   AC_CACHE_CHECK([whether snprintf respects a size of 1],
     [gl_cv_func_snprintf_size1],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 int main()
 {
   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
   snprintf (buf, 1, "%d", 12345);
   return buf[1] != 'E';
-}],
-      [gl_cv_func_snprintf_size1=yes],
-      [gl_cv_func_snprintf_size1=no],
-      [gl_cv_func_snprintf_size1="guessing yes"])
+}]])],
+        [gl_cv_func_snprintf_size1=yes],
+        [gl_cv_func_snprintf_size1=no],
+        [gl_cv_func_snprintf_size1="guessing yes"])
     ])
 ])
 
@@ -1286,7 +1331,8 @@ AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99],
   AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99],
     [gl_cv_func_vsnprintf_zerosize_c99],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdarg.h>
 #include <stdio.h>
 static int my_snprintf (char *buf, int size, const char *format, ...)
@@ -1303,43 +1349,43 @@ int main()
   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
   my_snprintf (buf, 0, "%d", 12345);
   return buf[0] != 'D';
-}],
-      [gl_cv_func_vsnprintf_zerosize_c99=yes],
-      [gl_cv_func_vsnprintf_zerosize_c99=no],
-      [
+}]])],
+        [gl_cv_func_vsnprintf_zerosize_c99=yes],
+        [gl_cv_func_vsnprintf_zerosize_c99=no],
+        [
 changequote(,)dnl
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on FreeBSD >= 5.
-         freebsd[1-4]*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
-         freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on MacOS X >= 10.3.
-         darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
-         darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on Cygwin.
-         cygwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on Solaris >= 2.6.
-         solaris2.[0-5]*)      gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
-         solaris*)             gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on AIX >= 4.
-         aix[1-3]*)            gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
-         aix*)                 gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on IRIX >= 6.5.
-         irix6.5)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on NetBSD >= 3.
-         netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
-                               gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
-         netbsd*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on BeOS.
-         beos*)                gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # Guess yes on mingw.
-         mingw* | pw*)         gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
-       esac
+         case "$host_os" in
+                                 # Guess yes on glibc systems.
+           *-gnu*)               gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on FreeBSD >= 5.
+           freebsd[1-4]*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on MacOS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on Cygwin.
+           cygwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.6.
+           solaris2.[0-5]*)      gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           solaris*)             gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           aix*)                 gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on IRIX >= 6.5.
+           irix6.5)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+           netbsd*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on mingw.
+           mingw* | pw*)         gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # If we don't know, assume the worst.
+           *)                    gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+         esac
 changequote([,])dnl
-      ])
+        ])
     ])
 ])
 
index b86f453..1751253 100644 (file)
@@ -9,7 +9,8 @@ AC_DEFUN([gl_SIGNBIT],
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <math.h>
 /* If signbit is defined as a function, don't use it, since calling it for
    'float' or 'long double' arguments would involve conversions.
@@ -23,7 +24,9 @@ AC_DEFUN([gl_SIGNBIT],
 #endif
 #include <string.h>
 ]gl_SIGNBIT_TEST_PROGRAM
-, [gl_cv_func_signbit=yes], [gl_cv_func_signbit=no],
+])],
+        [gl_cv_func_signbit=yes],
+        [gl_cv_func_signbit=no],
         [gl_cv_func_signbit="guessing no"])
     ])
   dnl GCC 4.0 and newer provides three built-ins for signbit.
@@ -32,7 +35,8 @@ AC_DEFUN([gl_SIGNBIT],
   dnl libc.
   AC_CACHE_CHECK([for signbit compiler built-ins], [gl_cv_func_signbit_gcc],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #if __GNUC__ >= 4
 # define signbit(x) \
    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
@@ -43,7 +47,9 @@ AC_DEFUN([gl_SIGNBIT],
 #endif
 #include <string.h>
 ]gl_SIGNBIT_TEST_PROGRAM
-, [gl_cv_func_signbit_gcc=yes], [gl_cv_func_signbit_gcc=no],
+])],
+        [gl_cv_func_signbit_gcc=yes],
+        [gl_cv_func_signbit_gcc=no],
         [gl_cv_func_signbit_gcc="guessing no"])
     ])
   dnl Use the compiler built-ins whenever possible, because they are more
@@ -217,7 +223,8 @@ AC_DEFUN([gl_FLOATTYPE_SIGN_LOCATION],
   AC_CACHE_CHECK([where to find the sign bit in a '$1'],
     [$2],
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stddef.h>
 #include <stdio.h>
 #define NWORDS \
@@ -270,7 +277,7 @@ int main ()
   fprintf (fp, "word %d bit %d", (int) k, (int) i);
   return (fclose (fp) != 0);
 }
-        ],
+        ]])],
         [$2=`cat conftest.out`],
         [$2="unknown"],
         [
index 158cc08..701a82d 100644 (file)
@@ -29,7 +29,8 @@ AC_DEFUN([gl_FUNC_STPNCPY],
   AC_CHECK_FUNCS_ONCE([stpncpy])
   if test $ac_cv_func_stpncpy = yes; then
     AC_CACHE_CHECK([for working stpncpy], [gl_cv_func_stpncpy], [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdlib.h>
 #include <string.h> /* for strcpy */
 /* The stpncpy prototype is missing in <string.h> on AIX 4.  */
@@ -50,7 +51,9 @@ int main () {
   if (stpncpy (dest, src, 7) != dest + 5) exit(1);
   exit(0);
 }
-], [gl_cv_func_stpncpy=yes], [gl_cv_func_stpncpy=no],
+]])],
+        [gl_cv_func_stpncpy=yes],
+        [gl_cv_func_stpncpy=no],
         [AC_EGREP_CPP([Thanks for using GNU], [
 #include <features.h>
 #ifdef __GNU_LIBRARY__
index 01ee9dd..bff01bc 100644 (file)
@@ -120,13 +120,16 @@ AC_DEFUN([gl_THREADLIB_BODY],
        if test $gl_cv_have_weak = maybe; then
          dnl Second, test whether it actually works. On Cygwin 1.7.2, with
          dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
-         AC_TRY_RUN([
+         AC_RUN_IFELSE(
+           [AC_LANG_SOURCE([[
 #include <stdio.h>
 #pragma weak fputs
 int main ()
 {
   return (fputs == NULL);
-}], [gl_cv_have_weak=yes], [gl_cv_have_weak=no],
+}]])],
+           [gl_cv_have_weak=yes],
+           [gl_cv_have_weak=no],
            [dnl When cross-compiling, assume that only ELF platforms support
             dnl weak symbols.
             AC_EGREP_CPP([Extensible Linking Format],
index a2a0695..583ca13 100644 (file)
@@ -46,14 +46,17 @@ AC_DEFUN([gl_FUNC_TRUNCL],
     LIBS="$LIBS $TRUNCL_LIBM"
     AC_CACHE_CHECK([whether truncl works], [gl_cv_func_truncl_works],
       [
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <math.h>
 long double x;
 int main()
 {
   x = truncl (0.0L);
   return 0;
-}], [gl_cv_func_truncl_works=yes], [gl_cv_func_truncl_works=no],
+}]])],
+          [gl_cv_func_truncl_works=yes],
+          [gl_cv_func_truncl_works=no],
           [case "$host_os" in
              osf4*) gl_cv_func_truncl_works="guessing no";;
              *)     gl_cv_func_truncl_works="guessing yes";;
index c41d8ba..dc221ed 100644 (file)
@@ -1,4 +1,4 @@
-# ttyname_r.m4 serial 3
+# ttyname_r.m4 serial 4
 dnl Copyright (C) 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -51,7 +51,8 @@ changequote(,)dnl
             *)        gl_cv_func_ttyname_r_works="guessing yes" ;;
           esac
 changequote([,])dnl
-          AC_TRY_RUN([
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
 #include <fcntl.h>
 #include <unistd.h>
 int
@@ -66,7 +67,10 @@ main (void)
   if (ttyname_r (fd, buf, sizeof (buf)) != 0)
     return 1;
   return 0;
-}], [gl_cv_func_ttyname_r_works=yes], [:], [:])
+}]])],
+            [gl_cv_func_ttyname_r_works=yes],
+            [:],
+            [:])
         ])
       case "$gl_cv_func_ttyname_r_works" in
         *yes) ;;
index 6a2d772..0de262e 100644 (file)
@@ -1,4 +1,4 @@
-# wcrtomb.m4 serial 5
+# wcrtomb.m4 serial 6
 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,7 +40,8 @@ changequote(,)dnl
           esac
 changequote([,])dnl
           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
-            AC_TRY_RUN([
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <stdio.h>
 #include <string.h>
@@ -68,7 +69,7 @@ int main ()
         return 1;
     }
   return 0;
-}],
+}]])],
               [gl_cv_func_wcrtomb_retval=yes],
               [gl_cv_func_wcrtomb_retval=no],
               [:])
index fb769f2..f340a05 100644 (file)
@@ -1,4 +1,4 @@
-# wcsrtombs.m4 serial 5
+# wcsrtombs.m4 serial 6
 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -68,7 +68,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_FR != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <stdlib.h>
 #include <wchar.h>
@@ -89,7 +90,7 @@ int main ()
         }
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_wcsrtombs_termination=yes],
           [gl_cv_func_wcsrtombs_termination=no],
           [:])
@@ -122,7 +123,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test $LOCALE_FR != none; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <stdlib.h>
 #include <wchar.h>
@@ -142,7 +144,7 @@ int main ()
         }
     }
   return 0;
-}],
+}]])],
           [gl_cv_func_wcsrtombs_null=yes],
           [gl_cv_func_wcsrtombs_null=no],
           [:])
index 3af3cc7..59e947a 100644 (file)
@@ -1,4 +1,4 @@
-# wctob.m4 serial 5
+# wctob.m4 serial 6
 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,8 @@ changequote(,)dnl
 changequote([,])dnl
         case "$host_os" in
           cygwin*)
-            AC_TRY_RUN([
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <wchar.h>
 
@@ -54,11 +55,15 @@ int main ()
   if (global != 0x12345678)
     return 2;
   return 0;
-}], [:], [gl_cv_func_wctob_works=no], [:])
+}]])],
+              [:],
+              [gl_cv_func_wctob_works=no],
+              [:])
             ;;
         esac
         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
-          AC_TRY_RUN([
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>
@@ -73,7 +78,7 @@ int main ()
           return 1;
     }
   return 0;
-}],
+}]])],
             [gl_cv_func_wctob_works=yes],
             [gl_cv_func_wctob_works=no],
             [:])
index ad5c6cc..ac357f3 100644 (file)
@@ -41,7 +41,8 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
     AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
       [gl_cv_func_wcwidth_works],
       [
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <locale.h>
 /* AIX 3.2.5 declares wcwidth in <string.h>. */
 #include <string.h>
@@ -66,7 +67,9 @@ int main ()
     if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0)
       return 1;
   return 0;
-}], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no],
+}]])],
+          [gl_cv_func_wcwidth_works=yes],
+          [gl_cv_func_wcwidth_works=no],
           [
 changequote(,)dnl
            case "$host_os" in