summaryrefslogtreecommitdiffstats
path: root/gettext-runtime/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-07-19 02:38:04 +0200
committerBruno Haible <bruno@clisp.org>2010-08-30 22:58:34 +0200
commita70dbe527164d7ba8e3e3803cea18c5da1e2b996 (patch)
tree5c8050e6dcd22dffdec99b3aa0353c17f4f1db5b /gettext-runtime/m4
parentb928057fe31331f8c16e5c6c972dc24902970989 (diff)
downloadexternal_gettext-a70dbe527164d7ba8e3e3803cea18c5da1e2b996.zip
external_gettext-a70dbe527164d7ba8e3e3803cea18c5da1e2b996.tar.gz
external_gettext-a70dbe527164d7ba8e3e3803cea18c5da1e2b996.tar.bz2
Modernize AC_TRY_COMPILE invocations.
Diffstat (limited to 'gettext-runtime/m4')
-rw-r--r--gettext-runtime/m4/ChangeLog16
-rw-r--r--gettext-runtime/m4/iconv.m411
-rw-r--r--gettext-runtime/m4/intl.m413
-rw-r--r--gettext-runtime/m4/intmax.m411
-rw-r--r--gettext-runtime/m4/inttypes-pri.m414
-rw-r--r--gettext-runtime/m4/inttypes_h.m417
-rw-r--r--gettext-runtime/m4/lock.m412
-rw-r--r--gettext-runtime/m4/size_max.m414
-rw-r--r--gettext-runtime/m4/stdint_h.m415
-rw-r--r--gettext-runtime/m4/visibility.m423
-rw-r--r--gettext-runtime/m4/wchar_t.m412
-rw-r--r--gettext-runtime/m4/wint_t.m412
12 files changed, 114 insertions, 56 deletions
diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog
index 3a5c0cb..c3baad2 100644
--- a/gettext-runtime/m4/ChangeLog
+++ b/gettext-runtime/m4/ChangeLog
@@ -1,3 +1,19 @@
+2010-07-18 Bruno Haible <bruno@clisp.org>
+
+ Modernize AC_TRY_COMPILE invocations.
+ * iconv.m4 (gl_iconv_AC_DEFUN): Use AC_COMPILE_IFELSE instead of
+ AC_TRY_COMPILE.
+ * intl.m4 (gt_CHECK_DECL): Likewise.
+ * intmax.m4 (gt_TYPE_INTMAX_T): Likewise.
+ * inttypes-pri.m4 (gt_INTTYPES_PRI): Likewise.
+ * inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
+ * lock.m4 (gl_LOCK): Likewise.
+ * size_max.m4 (gl_SIZE_MAX): Likewise.
+ * stdint_h.m4 (gl_AC_HEADER_STDINT_H): Likewise.
+ * visibility.m4 (gl_VISIBILITY): Likewise.
+ * wchar_t.m4 (gt_TYPE_WCHAR_T): Likewise.
+ * wint_t.m4 (gt_TYPE_WINT_T): Likewise.
+
2010-07-01 Christian Weisgerber <naddy@mips.inka.de> (tiny change)
Use AC_GNU_SOURCE as a fallback for AC_USE_SYSTEM_EXTENSIONS.
diff --git a/gettext-runtime/m4/iconv.m4 b/gettext-runtime/m4/iconv.m4
index e2041b9..1ec4f82 100644
--- a/gettext-runtime/m4/iconv.m4
+++ b/gettext-runtime/m4/iconv.m4
@@ -1,4 +1,4 @@
-# iconv.m4 serial 11 (gettext-0.18.1)
+# iconv.m4 serial 12 (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,
@@ -191,7 +191,9 @@ gl_iconv_AC_DEFUN([AM_ICONV],
if test "$am_cv_func_iconv" = yes; then
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL([am_cv_proto_iconv], [
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
#include <stdlib.h>
#include <iconv.h>
extern
@@ -203,7 +205,10 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
#else
size_t iconv();
#endif
-], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+ ]],
+ [[]])],
+ [am_cv_proto_iconv_arg1=""],
+ [am_cv_proto_iconv_arg1="const"])
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([
diff --git a/gettext-runtime/m4/intl.m4 b/gettext-runtime/m4/intl.m4
index 584f257..134981c 100644
--- a/gettext-runtime/m4/intl.m4
+++ b/gettext-runtime/m4/intl.m4
@@ -1,4 +1,4 @@
-# intl.m4 serial 18 (gettext-0.18.2)
+# intl.m4 serial 19 (gettext-0.18.2)
dnl Copyright (C) 1995-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,7 @@ dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009.
-AC_PREREQ([2.52])
+AC_PREREQ([2.53])
dnl Checks for all prerequisites of the intl subdirectory,
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
@@ -279,11 +279,16 @@ dnl Check whether a function is declared.
AC_DEFUN([gt_CHECK_DECL],
[
AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1],
- [AC_TRY_COMPILE([$2], [
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[$2]],
+ [[
#ifndef $1
char *p = (char *) $1;
#endif
-], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+ ]])],
+ [ac_cv_have_decl_$1=yes],
+ [ac_cv_have_decl_$1=no])])
if test $ac_cv_have_decl_$1 = yes; then
gt_value=1
else
diff --git a/gettext-runtime/m4/intmax.m4 b/gettext-runtime/m4/intmax.m4
index 74aaaf5..2c0f2af 100644
--- a/gettext-runtime/m4/intmax.m4
+++ b/gettext-runtime/m4/intmax.m4
@@ -1,4 +1,4 @@
-# intmax.m4 serial 5 (gettext-0.18)
+# intmax.m4 serial 6 (gettext-0.18.2)
dnl Copyright (C) 2002-2005, 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,
@@ -13,7 +13,9 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
- [AC_TRY_COMPILE([
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
#include <stddef.h>
#include <stdlib.h>
#if HAVE_STDINT_H_WITH_UINTMAX
@@ -22,8 +24,9 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
#if HAVE_INTTYPES_H_WITH_UINTMAX
#include <inttypes.h>
#endif
-], [intmax_t x = -1;
- return !x;],
+ ]],
+ [[intmax_t x = -1;
+ return !x;]])],
[gt_cv_c_intmax_t=yes],
[gt_cv_c_intmax_t=no])])
if test $gt_cv_c_intmax_t = yes; then
diff --git a/gettext-runtime/m4/inttypes-pri.m4 b/gettext-runtime/m4/inttypes-pri.m4
index 718a4f4..ee96bcd 100644
--- a/gettext-runtime/m4/inttypes-pri.m4
+++ b/gettext-runtime/m4/inttypes-pri.m4
@@ -1,4 +1,4 @@
-# inttypes-pri.m4 serial 6 (gettext-0.18)
+# inttypes-pri.m4 serial 7 (gettext-0.18.2)
dnl Copyright (C) 1997-2002, 2006, 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,
@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
-AC_PREREQ([2.52])
+AC_PREREQ([2.53])
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
# macros to non-string values. This is the case on AIX 4.3.3.
@@ -18,11 +18,17 @@ AC_DEFUN([gt_INTTYPES_PRI],
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
[gt_cv_inttypes_pri_broken],
[
- AC_TRY_COMPILE([#include <inttypes.h>
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <inttypes.h>
#ifdef PRId32
char *p = PRId32;
#endif
-], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes])
+ ]],
+ [[]])],
+ [gt_cv_inttypes_pri_broken=no],
+ [gt_cv_inttypes_pri_broken=yes])
])
fi
if test "$gt_cv_inttypes_pri_broken" = yes; then
diff --git a/gettext-runtime/m4/inttypes_h.m4 b/gettext-runtime/m4/inttypes_h.m4
index 782d77e..9d8f926 100644
--- a/gettext-runtime/m4/inttypes_h.m4
+++ b/gettext-runtime/m4/inttypes_h.m4
@@ -1,4 +1,4 @@
-# inttypes_h.m4 serial 9
+# inttypes_h.m4 serial 10
dnl Copyright (C) 1997-2004, 2006, 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,
@@ -12,12 +12,15 @@ dnl From Paul Eggert.
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
[
AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
- [AC_TRY_COMPILE(
- [#include <sys/types.h>
-#include <inttypes.h>],
- [uintmax_t i = (uintmax_t) -1; return !i;],
- [gl_cv_header_inttypes_h=yes],
- [gl_cv_header_inttypes_h=no])])
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <sys/types.h>
+#include <inttypes.h>
+ ]],
+ [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+ [gl_cv_header_inttypes_h=yes],
+ [gl_cv_header_inttypes_h=no])])
if test $gl_cv_header_inttypes_h = yes; then
AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
diff --git a/gettext-runtime/m4/lock.m4 b/gettext-runtime/m4/lock.m4
index 9da8465..f71c664 100644
--- a/gettext-runtime/m4/lock.m4
+++ b/gettext-runtime/m4/lock.m4
@@ -1,4 +1,4 @@
-# lock.m4 serial 10 (gettext-0.18)
+# lock.m4 serial 11 (gettext-0.18.2)
dnl Copyright (C) 2005-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,
@@ -18,13 +18,17 @@ AC_DEFUN([gl_LOCK],
[],
[#include <pthread.h>])
# glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
- AC_TRY_COMPILE([#include <pthread.h>],
- [#if __FreeBSD__ == 4
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [[#include <pthread.h>]],
+ [[
+#if __FreeBSD__ == 4
error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
#else
int x = (int)PTHREAD_MUTEX_RECURSIVE;
return !x;
-#endif],
+#endif
+ ]])],
[AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
[Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
fi
diff --git a/gettext-runtime/m4/size_max.m4 b/gettext-runtime/m4/size_max.m4
index ce992db..f3b1a9d 100644
--- a/gettext-runtime/m4/size_max.m4
+++ b/gettext-runtime/m4/size_max.m4
@@ -1,4 +1,4 @@
-# size_max.m4 serial 9
+# size_max.m4 serial 10
dnl Copyright (C) 2003, 2005-2006, 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,
@@ -34,10 +34,14 @@ Found it
if test $fits_in_uint = 1; then
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
- AC_TRY_COMPILE([#include <stddef.h>
- extern size_t foo;
- extern unsigned long foo;
- ], [], [fits_in_uint=0])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stddef.h>
+ extern size_t foo;
+ extern unsigned long foo;
+ ]],
+ [[]])],
+ [fits_in_uint=0])
fi
dnl We cannot use 'expr' to simplify this expression, because 'expr'
dnl works only with 'long' integers in the host environment, while we
diff --git a/gettext-runtime/m4/stdint_h.m4 b/gettext-runtime/m4/stdint_h.m4
index b8e3c6c..670c0cc 100644
--- a/gettext-runtime/m4/stdint_h.m4
+++ b/gettext-runtime/m4/stdint_h.m4
@@ -1,4 +1,4 @@
-# stdint_h.m4 serial 8
+# stdint_h.m4 serial 9
dnl Copyright (C) 1997-2004, 2006, 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,
@@ -12,12 +12,13 @@ dnl From Paul Eggert.
AC_DEFUN([gl_AC_HEADER_STDINT_H],
[
AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
- [AC_TRY_COMPILE(
- [#include <sys/types.h>
-#include <stdint.h>],
- [uintmax_t i = (uintmax_t) -1; return !i;],
- [gl_cv_header_stdint_h=yes],
- [gl_cv_header_stdint_h=no])])
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <stdint.h>]],
+ [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+ [gl_cv_header_stdint_h=yes],
+ [gl_cv_header_stdint_h=no])])
if test $gl_cv_header_stdint_h = yes; then
AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
diff --git a/gettext-runtime/m4/visibility.m4 b/gettext-runtime/m4/visibility.m4
index 077c476..19cd8f3 100644
--- a/gettext-runtime/m4/visibility.m4
+++ b/gettext-runtime/m4/visibility.m4
@@ -1,5 +1,5 @@
-# visibility.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc.
+# visibility.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2005, 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.
@@ -33,7 +33,8 @@ AC_DEFUN([gl_VISIBILITY],
AC_CACHE_VAL([gl_cv_cc_vis_werror], [
gl_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
- AC_TRY_COMPILE([], [],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
[gl_cv_cc_vis_werror=yes],
[gl_cv_cc_vis_werror=no])
CFLAGS="$gl_save_CFLAGS"])
@@ -51,13 +52,15 @@ AC_DEFUN([gl_VISIBILITY],
if test $gl_cv_cc_vis_werror = yes; then
CFLAGS="$CFLAGS -Werror"
fi
- AC_TRY_COMPILE(
- [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
- extern __attribute__((__visibility__("default"))) int exportedvar;
- extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
- extern __attribute__((__visibility__("default"))) int exportedfunc (void);
- void dummyfunc (void) {}],
- [],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ void dummyfunc (void) {}
+ ]],
+ [[]])],
[gl_cv_cc_visibility=yes],
[gl_cv_cc_visibility=no])
CFLAGS="$gl_save_CFLAGS"])
diff --git a/gettext-runtime/m4/wchar_t.m4 b/gettext-runtime/m4/wchar_t.m4
index ed804e6..a133e6a 100644
--- a/gettext-runtime/m4/wchar_t.m4
+++ b/gettext-runtime/m4/wchar_t.m4
@@ -1,4 +1,4 @@
-# wchar_t.m4 serial 3 (gettext-0.18)
+# wchar_t.m4 serial 4 (gettext-0.18.2)
dnl Copyright (C) 2002-2003, 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,
@@ -11,9 +11,13 @@ dnl Prerequisite: AC_PROG_CC
AC_DEFUN([gt_TYPE_WCHAR_T],
[
AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
- [AC_TRY_COMPILE([#include <stddef.h>
- wchar_t foo = (wchar_t)'\0';], ,
- [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';]],
+ [[]])],
+ [gt_cv_c_wchar_t=yes],
+ [gt_cv_c_wchar_t=no])])
if test $gt_cv_c_wchar_t = yes; then
AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
fi
diff --git a/gettext-runtime/m4/wint_t.m4 b/gettext-runtime/m4/wint_t.m4
index a6c7d15..58ef865 100644
--- a/gettext-runtime/m4/wint_t.m4
+++ b/gettext-runtime/m4/wint_t.m4
@@ -1,4 +1,4 @@
-# wint_t.m4 serial 4 (gettext-0.18)
+# wint_t.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2003, 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,
@@ -11,7 +11,9 @@ dnl Prerequisite: AC_PROG_CC
AC_DEFUN([gt_TYPE_WINT_T],
[
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
- [AC_TRY_COMPILE([
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
/* 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 included
@@ -20,8 +22,10 @@ AC_DEFUN([gt_TYPE_WINT_T],
#include <stdio.h>
#include <time.h>
#include <wchar.h>
- wint_t foo = (wchar_t)'\0';], ,
- [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
+ wint_t foo = (wchar_t)'\0';]],
+ [[]])],
+ [gt_cv_c_wint_t=yes],
+ [gt_cv_c_wint_t=no])])
if test $gt_cv_c_wint_t = yes; then
AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
fi