]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Modernize AC_TRY_RUN invocations.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Jul 2010 23:10:51 +0000 (01:10 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 30 Aug 2010 20:58:34 +0000 (22:58 +0200)
gettext-runtime/m4/ChangeLog
gettext-runtime/m4/iconv.m4
gettext-runtime/m4/intdiv0.m4
gettext-runtime/m4/printf-posix.m4
gettext-runtime/m4/threadlib.m4

index b3fa5810adc83d35bd24b646a4d694b68aa11c04..4cc615e032ebf337f3ae956c4308595b7bad0555 100644 (file)
@@ -1,3 +1,11 @@
+2010-07-19  Bruno Haible  <bruno@clisp.org>
+
+       Modernize AC_TRY_RUN invocations.
+       * iconv.m4 (AM_ICONV_LINK): Use AC_RUN_IFELSE instead of AC_TRY_RUN.
+       * intdiv0.m4 (gt_INTDIV0): Likewise.
+       * printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
+       * threadlib.m4 (gl_THREADLIB_BODY): Likewise.
+
 2010-07-19  Bruno Haible  <bruno@clisp.org>
 
        Modernize AC_TRY_LINK invocations.
index abba95bcf321a0cdad2188e11c617a8d7b8dca18..ffa037396241b42759e8dd93d66b2eda2e185343 100644 (file)
@@ -71,7 +71,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 ()
@@ -146,7 +147,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],
         [case "$host_os" in
            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
            *)            am_cv_func_iconv_works="guessing yes" ;;
index 289c4df5eda53b3afa4dd96d11149c42f69178d6..9b27ff1b79d144ecad2537a88e8098ba4b19002c 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 1eacf95ac8c60f701b3ba02e98d5b9bcf629a2be..2dc52a4862dcefa45d4078d8248bb6a38402a4dc 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 01ee9ddb156f3a6e4ed315534a51e78c9ce99579..bff01bc5eeaf13070806f0a04dff6e8162a4f6e0 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],