summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-07-20 01:06:56 +0200
committerBruno Haible <bruno@clisp.org>2010-08-26 22:57:54 +0200
commit64865499c9cf8748356a0857a8481d74b394bd79 (patch)
tree4a05b4eb597b3f1042c085e4eb202f3736f1e088 /m4
parentec062d7a2671739dd977ebde3965fc93f8678a2e (diff)
downloadgnulib-64865499c9cf8748356a0857a8481d74b394bd79.tar.gz
Modernize AC_TRY_RUN invocations.
Diffstat (limited to 'm4')
-rw-r--r--m4/btowc.m412
-rw-r--r--m4/duplocale.m49
-rw-r--r--m4/exponentd.m49
-rw-r--r--m4/exponentf.m49
-rw-r--r--m4/exponentl.m47
-rw-r--r--m4/fopen.m47
-rw-r--r--m4/frexp.m417
-rw-r--r--m4/frexpl.m423
-rw-r--r--m4/ftello.m47
-rw-r--r--m4/iconv.m49
-rw-r--r--m4/iconv_open.m49
-rw-r--r--m4/intdiv0.m411
-rw-r--r--m4/isnanf.m47
-rw-r--r--m4/isnanl.m429
-rw-r--r--m4/ldexpl.m421
-rw-r--r--m4/mbrlen.m415
-rw-r--r--m4/mbrtowc.m428
-rw-r--r--m4/mbsrtowcs.m47
-rw-r--r--m4/open.m47
-rw-r--r--m4/printf-posix.m421
-rw-r--r--m4/printf.m4730
-rw-r--r--m4/signbit.m419
-rw-r--r--m4/stpncpy.m47
-rw-r--r--m4/threadlib.m47
-rw-r--r--m4/truncl.m47
-rw-r--r--m4/ttyname_r.m410
-rw-r--r--m4/wcrtomb.m47
-rw-r--r--m4/wcsrtombs.m412
-rw-r--r--m4/wctob.m415
-rw-r--r--m4/wcwidth.m47
30 files changed, 609 insertions, 476 deletions
diff --git a/m4/btowc.m4 b/m4/btowc.m4
index c4ee4e4197..b16b1f020a 100644
--- a/m4/btowc.m4
+++ b/m4/btowc.m4
@@ -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],
[:])
diff --git a/m4/duplocale.m4 b/m4/duplocale.m4
index e7e784e691..4fc6137579 100644
--- a/m4/duplocale.m4
+++ b/m4/duplocale.m4
@@ -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";;
diff --git a/m4/exponentd.m4 b/m4/exponentd.m4
index 5d44d0e02b..ad26ddf826 100644
--- a/m4/exponentd.m4
+++ b/m4/exponentd.m4
@@ -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"],
[
diff --git a/m4/exponentf.m4 b/m4/exponentf.m4
index 4d8063fae7..34cf1979c8 100644
--- a/m4/exponentf.m4
+++ b/m4/exponentf.m4
@@ -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"])
diff --git a/m4/exponentl.m4 b/m4/exponentl.m4
index a700d3ba60..b625fea059 100644
--- a/m4/exponentl.m4
+++ b/m4/exponentl.m4
@@ -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"],
[
diff --git a/m4/fopen.m4 b/m4/fopen.m4
index 757d4a1558..11e0f9a946 100644
--- a/m4/fopen.m4
+++ b/m4/fopen.m4
@@ -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
diff --git a/m4/frexp.m4 b/m4/frexp.m4
index 291348bf6f..530fdbcee5 100644
--- a/m4/frexp.m4
+++ b/m4/frexp.m4
@@ -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
+ ])
])
])
diff --git a/m4/frexpl.m4 b/m4/frexpl.m4
index f2e254c77b..633f056cd9 100644
--- a/m4/frexpl.m4
+++ b/m4/frexpl.m4
@@ -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
- ])
+ ])
])
])
diff --git a/m4/ftello.m4 b/m4/ftello.m4
index 38bcf437ee..33201a0107 100644
--- a/m4/ftello.m4
+++ b/m4/ftello.m4
@@ -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) ;;
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index b7f5bfe8b6..5e838b04b6 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -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
diff --git a/m4/iconv_open.m4 b/m4/iconv_open.m4
index 60f62ca51b..8219ecf5cb 100644
--- a/m4/iconv_open.m4
+++ b/m4/iconv_open.m4
@@ -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"
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
index 289c4df5ed..9b27ff1b79 100644
--- a/m4/intdiv0.m4
+++ b/m4/intdiv0.m4
@@ -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
diff --git a/m4/isnanf.m4 b/m4/isnanf.m4
index 1fce2eec52..c040090be9 100644
--- a/m4/isnanf.m4
+++ b/m4/isnanf.m4
@@ -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";;
diff --git a/m4/isnanl.m4 b/m4/isnanl.m4
index ad003abb5d..de7eafb049 100644
--- a/m4/isnanl.m4
+++ b/m4/isnanl.m4
@@ -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
+ ])
])
])
diff --git a/m4/ldexpl.m4 b/m4/ldexpl.m4
index aaa4eb5a62..0a4fe88b05 100644
--- a/m4/ldexpl.m4
+++ b/m4/ldexpl.m4
@@ -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
- ])
+ ])
])
])
diff --git a/m4/mbrlen.m4 b/m4/mbrlen.m4
index 81fc671da2..731c2b3189 100644
--- a/m4/mbrlen.m4
+++ b/m4/mbrlen.m4
@@ -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],
[])
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index 0f5939be1b..28b9c43bfa 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -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],
[:])
diff --git a/m4/mbsrtowcs.m4 b/m4/mbsrtowcs.m4
index f9c430f013..e854337ffd 100644
--- a/m4/mbsrtowcs.m4
+++ b/m4/mbsrtowcs.m4
@@ -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],
[:])
diff --git a/m4/open.m4 b/m4/open.m4
index 8731a25551..d402da994d 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -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
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
index 1eacf95ac8..2dc52a4862 100644
--- a/m4/printf-posix.m4
+++ b/m4/printf-posix.m4
@@ -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)
diff --git a/m4/printf.m4 b/m4/printf.m4
index 33f5aefb16..e850862c01 100644
--- a/m4/printf.m4
+++ b/m4/printf.m4
@@ -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
- ])
+ ])
])
])
diff --git a/m4/signbit.m4 b/m4/signbit.m4
index b86f453d35..1751253944 100644
--- a/m4/signbit.m4
+++ b/m4/signbit.m4
@@ -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"],
[
diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4
index 158cc087d9..701a82d986 100644
--- a/m4/stpncpy.m4
+++ b/m4/stpncpy.m4
@@ -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__
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index 01ee9ddb15..bff01bc5ee 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -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],
diff --git a/m4/truncl.m4 b/m4/truncl.m4
index a2a0695b52..583ca1359c 100644
--- a/m4/truncl.m4
+++ b/m4/truncl.m4
@@ -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";;
diff --git a/m4/ttyname_r.m4 b/m4/ttyname_r.m4
index c41d8ba81c..dc221ed142 100644
--- a/m4/ttyname_r.m4
+++ b/m4/ttyname_r.m4
@@ -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) ;;
diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4
index 6a2d772a32..0de262e612 100644
--- a/m4/wcrtomb.m4
+++ b/m4/wcrtomb.m4
@@ -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],
[:])
diff --git a/m4/wcsrtombs.m4 b/m4/wcsrtombs.m4
index fb769f2d62..f340a0570d 100644
--- a/m4/wcsrtombs.m4
+++ b/m4/wcsrtombs.m4
@@ -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],
[:])
diff --git a/m4/wctob.m4 b/m4/wctob.m4
index 3af3cc7bca..59e947a28c 100644
--- a/m4/wctob.m4
+++ b/m4/wctob.m4
@@ -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],
[:])
diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4
index ad5c6cc8e9..ac357f372e 100644
--- a/m4/wcwidth.m4
+++ b/m4/wcwidth.m4
@@ -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