Modernize AC_TRY_LINK invocations.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Jul 2010 21:30:26 +0000 (23:30 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 26 Aug 2010 20:57:47 +0000 (22:57 +0200)
41 files changed:
ChangeLog
m4/acosl.m4
m4/argp.m4
m4/asinl.m4
m4/atanl.m4
m4/ceil.m4
m4/ceilf.m4
m4/ceill.m4
m4/codeset.m4
m4/cosl.m4
m4/expl.m4
m4/floor.m4
m4/floorf.m4
m4/floorl.m4
m4/frexp.m4
m4/frexpl.m4
m4/ftello.m4
m4/gettext.m4
m4/hostent.m4
m4/iconv.m4
m4/intl.m4
m4/intlmacosx.m4
m4/isnand.m4
m4/isnanf.m4
m4/isnanl.m4
m4/lcmessage.m4
m4/ldexpl.m4
m4/lib-link.m4
m4/logb.m4
m4/logl.m4
m4/printf-frexp.m4
m4/servent.m4
m4/signbit.m4
m4/sinl.m4
m4/sqrtl.m4
m4/tanl.m4
m4/threadlib.m4
m4/trunc.m4
m4/truncf.m4
m4/truncl.m4
modules/tsearch-tests

index 2e97ef5..321c4ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,53 @@
 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.
+       * m4/argp.m4 (gl_ARGP): Likewise.
+       * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
+       * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
+       * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Likewise.
+       * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
+       * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
+       * m4/codeset.m4 (AM_LANGINFO_CODESET): Likewise.
+       * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
+       * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
+       * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
+       * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Likewise.
+       * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
+       * m4/frexp.m4 (gl_FUNC_FREXP, gl_CHECK_FREXP_NO_LIBM): Likewise.
+       * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_CHECK_FREXPL_NO_LIBM): Likewise.
+       * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
+       * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
+       * m4/hostent.m4 (gl_HOSTENT): Likewise.
+       * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
+       * m4/intl.m4 (gt_INTL_SUBDIR_CORE): Likewise.
+       * m4/intlmacosx.m4 (gt_INTL_MACOSX): Likewise.
+       * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM, gl_HAVE_ISNAND_NO_LIBM):
+       Likewise.
+       * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM):
+       Likewise.
+       * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM):
+       Likewise.
+       * m4/lcmessage.m4 (gt_LC_MESSAGES): Likewise.
+       * m4/ldexpl.m4 (gl_FUNC_LDEXPL, gl_CHECK_LDEXPL_NO_LIBM): Likewise.
+       * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Likewise.
+       * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
+       * m4/logl.m4 (gl_FUNC_LOGL): Likewise.
+       * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Likewise.
+       * m4/servent.m4 (gl_SERVENT): Likewise.
+       * m4/signbit.m4 (gl_SIGNBIT): Likewise.
+       * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
+       * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
+       * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
+       * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
+       * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
+       * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
+       * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
+       * modules/tsearch-tests (configure.ac): Likewise.
+
+2010-08-26  Bruno Haible  <bruno@clisp.org>
+
        Modernize AC_TRY_COMPILE invocations.
        * m4/environ.m4 (gt_CHECK_VAR_DECL): Use AC_COMPILE_IFELSE instead of
        AC_TRY_COMPILE.
index 66cbd6c..1f6b5b7 100644 (file)
@@ -1,4 +1,4 @@
-# acosl.m4 serial 2
+# acosl.m4 serial 3
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_ACOSL],
   AC_CACHE_CHECK([whether acosl() can be used without linking with libm],
     [gl_cv_func_acosl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return acosl (x) > 1;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return acosl (x) > 1;]])],
         [gl_cv_func_acosl_no_libm=yes],
         [gl_cv_func_acosl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_ACOSL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return acosl (x) > 1;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return acosl (x) > 1;]])],
           [gl_cv_func_acosl_in_libm=yes],
           [gl_cv_func_acosl_in_libm=no])
         LIBS="$save_LIBS"
index 819425b..d3ca5ba 100644 (file)
@@ -1,5 +1,5 @@
-# argp.m4 serial 10
-dnl Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
+# argp.m4 serial 11
+dnl Copyright (C) 2003-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.
@@ -32,20 +32,20 @@ AC_DEFUN([gl_ARGP],
   # be defined and other not, I prefer to stay on the safe side and to
   # test each one separately.
   AC_MSG_CHECKING([whether program_invocation_name is defined])
-  AC_TRY_LINK([#include <argp.h>],
-              [ program_invocation_name = "test"; ],
-              AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1],
-                 [Define if program_invocation_name is defined])
-                 AC_MSG_RESULT([yes])],
-              [ AC_MSG_RESULT([no])] )
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <argp.h>]],
+                                  [[program_invocation_name = "test";]])],
+                 [AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1],
+                            [Define if program_invocation_name is defined])
+                  AC_MSG_RESULT([yes])],
+                 [AC_MSG_RESULT([no])])
 
   AC_MSG_CHECKING([whether program_invocation_short_name is defined])
-  AC_TRY_LINK([#include <argp.h>],
-              [ program_invocation_short_name = "test"; ],
-              AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
-                 [Define if program_invocation_short_name is defined])
-                 AC_MSG_RESULT([yes])],
-              [ AC_MSG_RESULT([no])] )
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <argp.h>]],
+                                  [[program_invocation_short_name = "test";]])],
+                 [AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
+                            [Define if program_invocation_short_name is defined])
+                  AC_MSG_RESULT([yes])],
+                 [AC_MSG_RESULT([no])])
 
   AC_CHECK_DECLS_ONCE([clearerr_unlocked])
   AC_CHECK_DECLS_ONCE([feof_unlocked])
index 1f5bc6d..1cb272c 100644 (file)
@@ -1,4 +1,4 @@
-# asinl.m4 serial 2
+# asinl.m4 serial 3
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_ASINL],
   AC_CACHE_CHECK([whether asinl() can be used without linking with libm],
     [gl_cv_func_asinl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return asinl (x) > 1;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return asinl (x) > 1;]])],
         [gl_cv_func_asinl_no_libm=yes],
         [gl_cv_func_asinl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_ASINL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return asinl (x) > 1;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return asinl (x) > 1;]])],
           [gl_cv_func_asinl_in_libm=yes],
           [gl_cv_func_asinl_in_libm=no])
         LIBS="$save_LIBS"
index 28cf7b3..3573a3c 100644 (file)
@@ -1,4 +1,4 @@
-# atanl.m4 serial 2
+# atanl.m4 serial 3
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_ATANL],
   AC_CACHE_CHECK([whether atanl() can be used without linking with libm],
     [gl_cv_func_atanl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return atanl (x) > 1;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return atanl (x) > 1;]])],
         [gl_cv_func_atanl_no_libm=yes],
         [gl_cv_func_atanl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_ATANL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return atanl (x) > 1;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return atanl (x) > 1;]])],
           [gl_cv_func_atanl_in_libm=yes],
           [gl_cv_func_atanl_in_libm=no])
         LIBS="$save_LIBS"
index 5981f39..306e6c7 100644 (file)
@@ -1,4 +1,4 @@
-# ceil.m4 serial 3
+# ceil.m4 serial 4
 dnl Copyright (C) 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,
@@ -20,24 +20,26 @@ AC_DEFUN([gl_FUNC_CEIL_LIBS],
 [
   gl_CACHE_VAL_SILENT([gl_cv_func_ceil_libm], [
     gl_cv_func_ceil_libm=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       double x;],
-      [x = ceil(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           double x;]],
+         [[x = ceil(x);]])],
       [gl_cv_func_ceil_libm=])
     if test "$gl_cv_func_ceil_libm" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         double x;],
-        [x = ceil(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             double x;]],
+           [[x = ceil(x);]])],
         [gl_cv_func_ceil_libm="-lm"])
       LIBS="$save_LIBS"
     fi
index b48fedb..a33b9aa 100644 (file)
@@ -1,4 +1,4 @@
-# ceilf.m4 serial 6
+# ceilf.m4 serial 7
 dnl Copyright (C) 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,
@@ -35,24 +35,26 @@ AC_DEFUN([gl_FUNC_CEILF_LIBS],
 [
   gl_CACHE_VAL_SILENT([gl_cv_func_ceilf_libm], [
     gl_cv_func_ceilf_libm=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       float x;],
-      [x = ceilf(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           float x;]],
+         [[x = ceilf(x);]])],
       [gl_cv_func_ceilf_libm=])
     if test "$gl_cv_func_ceilf_libm" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         float x;],
-        [x = ceilf(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             float x;]],
+           [[x = ceilf(x);]])],
         [gl_cv_func_ceilf_libm="-lm"])
       LIBS="$save_LIBS"
     fi
index 3d4612a..49aa376 100644 (file)
@@ -1,4 +1,4 @@
-# ceill.m4 serial 6
+# ceill.m4 serial 7
 dnl Copyright (C) 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,
@@ -35,24 +35,26 @@ AC_DEFUN([gl_FUNC_CEILL_LIBS],
 [
   gl_CACHE_VAL_SILENT([gl_cv_func_ceill_libm], [
     gl_cv_func_ceill_libm=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       long double x;],
-      [x = ceill(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           long double x;]],
+         [[x = ceill(x);]])],
       [gl_cv_func_ceill_libm=])
     if test "$gl_cv_func_ceill_libm" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         long double x;],
-        [x = ceill(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[x = ceill(x);]])],
         [gl_cv_func_ceill_libm="-lm"])
       LIBS="$save_LIBS"
     fi
index a53c042..f722b2e 100644 (file)
@@ -1,4 +1,4 @@
-# codeset.m4 serial 4 (gettext-0.18)
+# codeset.m4 serial 5 (gettext-0.18.2)
 dnl Copyright (C) 2000-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,
@@ -9,10 +9,12 @@ dnl From Bruno Haible.
 AC_DEFUN([AM_LANGINFO_CODESET],
 [
   AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
-    [AC_TRY_LINK([#include <langinfo.h>],
-      [char* cs = nl_langinfo(CODESET); return !cs;],
-      [am_cv_langinfo_codeset=yes],
-      [am_cv_langinfo_codeset=no])
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <langinfo.h>]],
+          [[char* cs = nl_langinfo(CODESET); return !cs;]])],
+       [am_cv_langinfo_codeset=yes],
+       [am_cv_langinfo_codeset=no])
     ])
   if test $am_cv_langinfo_codeset = yes; then
     AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
index 74c9e7c..69f3fbe 100644 (file)
@@ -1,4 +1,4 @@
-# cosl.m4 serial 2
+# cosl.m4 serial 3
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_COSL],
   AC_CACHE_CHECK([whether cosl() can be used without linking with libm],
     [gl_cv_func_cosl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return cosl (x) > 0.4;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return cosl (x) > 0.4;]])],
         [gl_cv_func_cosl_no_libm=yes],
         [gl_cv_func_cosl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_COSL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return cosl (x) > 0.4;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return cosl (x) > 0.4;]])],
           [gl_cv_func_cosl_in_libm=yes],
           [gl_cv_func_cosl_in_libm=no])
         LIBS="$save_LIBS"
index 698a9fb..ba1143e 100644 (file)
@@ -1,4 +1,4 @@
-# expl.m4 serial 1
+# expl.m4 serial 2
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_EXPL],
   AC_CACHE_CHECK([whether expl() can be used without linking with libm],
     [gl_cv_func_expl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return expl (x) > 1.5;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return expl (x) > 1.5;]])],
         [gl_cv_func_expl_no_libm=yes],
         [gl_cv_func_expl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_EXPL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return expl (x) > 1.5;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return expl (x) > 1.5;]])],
           [gl_cv_func_expl_in_libm=yes],
           [gl_cv_func_expl_in_libm=no])
         LIBS="$save_LIBS"
index ad6a1e4..7541335 100644 (file)
@@ -1,4 +1,4 @@
-# floor.m4 serial 3
+# floor.m4 serial 4
 dnl Copyright (C) 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,
@@ -20,24 +20,26 @@ AC_DEFUN([gl_FUNC_FLOOR_LIBS],
 [
   gl_CACHE_VAL_SILENT([gl_cv_func_floor_libm], [
     gl_cv_func_floor_libm=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       double x;],
-      [x = floor(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           double x;]],
+         [[x = floor(x);]])],
       [gl_cv_func_floor_libm=])
     if test "$gl_cv_func_floor_libm" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         double x;],
-        [x = floor(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             double x;]],
+           [[x = floor(x);]])],
         [gl_cv_func_floor_libm="-lm"])
       LIBS="$save_LIBS"
     fi
index fb17a5e..96c9b3b 100644 (file)
@@ -1,4 +1,4 @@
-# floorf.m4 serial 6
+# floorf.m4 serial 7
 dnl Copyright (C) 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,
@@ -35,24 +35,26 @@ AC_DEFUN([gl_FUNC_FLOORF_LIBS],
 [
   gl_CACHE_VAL_SILENT([gl_cv_func_floorf_libm], [
     gl_cv_func_floorf_libm=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       float x;],
-      [x = floorf(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           float x;]],
+         [[x = floorf(x);]])],
       [gl_cv_func_floorf_libm=])
     if test "$gl_cv_func_floorf_libm" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         float x;],
-        [x = floorf(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             float x;]],
+           [[x = floorf(x);]])],
         [gl_cv_func_floorf_libm="-lm"])
       LIBS="$save_LIBS"
     fi
index 9790b96..5bd62d0 100644 (file)
@@ -1,4 +1,4 @@
-# floorl.m4 serial 6
+# floorl.m4 serial 7
 dnl Copyright (C) 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,
@@ -35,24 +35,26 @@ AC_DEFUN([gl_FUNC_FLOORL_LIBS],
 [
   gl_CACHE_VAL_SILENT([gl_cv_func_floorl_libm], [
     gl_cv_func_floorl_libm=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       long double x;],
-      [x = floorl(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           long double x;]],
+         [[x = floorl(x);]])],
       [gl_cv_func_floorl_libm=])
     if test "$gl_cv_func_floorl_libm" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         long double x;],
-        [x = floorl(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[x = floorl(x);]])],
         [gl_cv_func_floorl_libm="-lm"])
       LIBS="$save_LIBS"
     fi
index 1f6d542..291348b 100644 (file)
@@ -1,4 +1,4 @@
-# frexp.m4 serial 8
+# frexp.m4 serial 9
 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,
@@ -15,9 +15,11 @@ AC_DEFUN([gl_FUNC_FREXP],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#include <math.h>
-                     double x;],
-                    [int e; return frexp (x, &e) > 0;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <math.h>
+               double x;]],
+             [[int e; return frexp (x, &e) > 0;]])],
           [gl_cv_func_frexp_in_libm=yes],
           [gl_cv_func_frexp_in_libm=no])
         LIBS="$save_LIBS"
@@ -78,9 +80,11 @@ AC_DEFUN([gl_CHECK_FREXP_NO_LIBM],
   AC_CACHE_CHECK([whether frexp() can be used without linking with libm],
     [gl_cv_func_frexp_no_libm],
     [
-      AC_TRY_LINK([#include <math.h>
-                   double x;],
-                  [int e; return frexp (x, &e) > 0;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             double x;]],
+           [[int e; return frexp (x, &e) > 0;]])],
         [gl_cv_func_frexp_no_libm=yes],
         [gl_cv_func_frexp_no_libm=no])
     ])
index 513c12f..f2e254c 100644 (file)
@@ -19,9 +19,11 @@ AC_DEFUN([gl_FUNC_FREXPL],
         [
           save_LIBS="$LIBS"
           LIBS="$LIBS -lm"
-          AC_TRY_LINK([#include <math.h>
-                       long double x;],
-                      [int e; return frexpl (x, &e) > 0;],
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <math.h>
+                 long double x;]],
+               [[int e; return frexpl (x, &e) > 0;]])],
             [gl_cv_func_frexpl_in_libm=yes],
             [gl_cv_func_frexpl_in_libm=no])
           LIBS="$save_LIBS"
@@ -90,9 +92,11 @@ AC_DEFUN([gl_CHECK_FREXPL_NO_LIBM],
   AC_CACHE_CHECK([whether frexpl() can be used without linking with libm],
     [gl_cv_func_frexpl_no_libm],
     [
-      AC_TRY_LINK([#include <math.h>
-                   long double x;],
-                  [int e; return frexpl (x, &e) > 0;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             long double x;]],
+           [[int e; return frexpl (x, &e) > 0;]])],
         [gl_cv_func_frexpl_no_libm=yes],
         [gl_cv_func_frexpl_no_libm=no])
     ])
index ae9a4e6..38bcf43 100644 (file)
@@ -1,4 +1,4 @@
-# ftello.m4 serial 7
+# ftello.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,
@@ -15,8 +15,12 @@ AC_DEFUN([gl_FUNC_FTELLO],
 
   AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello],
     [
-      AC_TRY_LINK([#include <stdio.h>], [ftello (stdin);],
-        [gl_cv_func_ftello=yes], [gl_cv_func_ftello=no])
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <stdio.h>]],
+           [[ftello (stdin);]])],
+        [gl_cv_func_ftello=yes],
+        [gl_cv_func_ftello=no])
     ])
   if test $gl_cv_func_ftello = no; then
     HAVE_FTELLO=0
index f84e6a5..979c52c 100644 (file)
@@ -1,4 +1,4 @@
-# gettext.m4 serial 63 (gettext-0.18)
+# gettext.m4 serial 64 (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,
@@ -157,12 +157,18 @@ changequote([,])dnl
         fi
 
         AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
-         [AC_TRY_LINK([#include <libintl.h>
+         [AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[
+#include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
-extern int *_nl_domain_bindings;],
-            [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+extern int *_nl_domain_bindings;
+               ]],
+               [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+               ]])],
             [eval "$gt_func_gnugettext_libc=yes"],
             [eval "$gt_func_gnugettext_libc=no"])])
 
@@ -183,35 +189,47 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b
             gt_save_LIBS="$LIBS"
             LIBS="$LIBS $LIBINTL"
             dnl Now see whether libintl exists and does not depend on libiconv.
-            AC_TRY_LINK([#include <libintl.h>
+            AC_LINK_IFELSE(
+              [AC_LANG_PROGRAM(
+                 [[
+#include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
 extern
 #ifdef __cplusplus
 "C"
 #endif
-const char *_nl_expand_alias (const char *);],
-              [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+const char *_nl_expand_alias (const char *);
+                 ]],
+                 [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+                 ]])],
               [eval "$gt_func_gnugettext_libintl=yes"],
               [eval "$gt_func_gnugettext_libintl=no"])
             dnl Now see whether libintl exists and depends on libiconv.
             if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
               LIBS="$LIBS $LIBICONV"
-              AC_TRY_LINK([#include <libintl.h>
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[
+#include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
 extern
 #ifdef __cplusplus
 "C"
 #endif
-const char *_nl_expand_alias (const char *);],
-                [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
-               [LIBINTL="$LIBINTL $LIBICONV"
-                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
-                eval "$gt_func_gnugettext_libintl=yes"
-               ])
+const char *_nl_expand_alias (const char *);
+                   ]],
+                   [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+                   ]])],
+                [LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
+                ])
             fi
             CPPFLAGS="$gt_save_CPPFLAGS"
             LIBS="$gt_save_LIBS"])
index 1111041..7104b30 100644 (file)
@@ -1,5 +1,5 @@
-# hostent.m4 serial 1
-dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# hostent.m4 serial 2
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -28,12 +28,16 @@ AC_DEFUN([gl_HOSTENT],
         [gl_cv_w32_gethostbyname=no
          gl_save_LIBS="$LIBS"
          LIBS="$LIBS -lws2_32"
-         AC_TRY_LINK([
+         AC_LINK_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
 #include <stddef.h>
-], [gethostbyname(NULL);], [gl_cv_w32_gethostbyname=yes])
+              ]],
+              [[gethostbyname(NULL);]])],
+           [gl_cv_w32_gethostbyname=yes])
          LIBS="$gl_save_LIBS"
         ])
       if test "$gl_cv_w32_gethostbyname" = "yes"; then
index 081b370..b7f5bfe 100644 (file)
@@ -30,27 +30,35 @@ AC_DEFUN([AM_ICONV_LINK],
   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
   dnl because if the user has installed libiconv and not disabled its use
   dnl via --without-libiconv-prefix, he wants to use it. The first
-  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
   am_save_CPPFLAGS="$CPPFLAGS"
   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
   AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
-    AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-      [iconv_t cd = iconv_open("","");
-       iconv(cd,NULL,NULL,NULL,NULL);
-       iconv_close(cd);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[
+#include <stdlib.h>
+#include <iconv.h>
+         ]],
+         [[iconv_t cd = iconv_open("","");
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);]])],
       [am_cv_func_iconv=yes])
     if test "$am_cv_func_iconv" != yes; then
       am_save_LIBS="$LIBS"
       LIBS="$LIBS $LIBICONV"
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[
+#include <stdlib.h>
+#include <iconv.h>
+           ]],
+           [[iconv_t cd = iconv_open("","");
+             iconv(cd,NULL,NULL,NULL,NULL);
+             iconv_close(cd);]])],
         [am_cv_lib_iconv=yes]
         [am_cv_func_iconv=yes])
       LIBS="$am_save_LIBS"
index c918e57..9767d16 100644 (file)
@@ -220,9 +220,10 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE],
   AC_REQUIRE([gt_INTTYPES_PRI])dnl
   AC_REQUIRE([gl_LOCK])dnl
 
-  AC_TRY_LINK(
-    [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
-    [],
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM(
+       [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]],
+       [[]])],
     [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
        [Define to 1 if the compiler understands __builtin_expect.])])
 
index dd91025..f0f7c98 100644 (file)
@@ -1,4 +1,4 @@
-# intlmacosx.m4 serial 3 (gettext-0.18)
+# intlmacosx.m4 serial 4 (gettext-0.18.2)
 dnl Copyright (C) 2004-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,
@@ -22,8 +22,10 @@ AC_DEFUN([gt_INTL_MACOSX],
     [gt_cv_func_CFPreferencesCopyAppValue],
     [gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
-     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
-       [CFPreferencesCopyAppValue(NULL, NULL)],
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFPreferences.h>]],
+          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
        [gt_cv_func_CFPreferencesCopyAppValue=yes],
        [gt_cv_func_CFPreferencesCopyAppValue=no])
      LIBS="$gt_save_LIBS"])
@@ -35,7 +37,10 @@ AC_DEFUN([gt_INTL_MACOSX],
   AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
     [gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
-     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFLocale.h>]],
+          [[CFLocaleCopyCurrent();]])],
        [gt_cv_func_CFLocaleCopyCurrent=yes],
        [gt_cv_func_CFLocaleCopyCurrent=no])
      LIBS="$gt_save_LIBS"])
index cd91628..31764f7 100644 (file)
@@ -1,4 +1,4 @@
-# isnand.m4 serial 6
+# isnand.m4 serial 7
 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,
@@ -58,16 +58,18 @@ AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM],
     [
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([#include <math.h>
-                   #if __GNUC__ >= 4
-                   # undef isnand
-                   # define isnand(x) __builtin_isnand ((double)(x))
-                   #elif defined isnan
-                   # undef isnand
-                   # define isnand(x) isnan ((double)(x))
-                   #endif
-                   double x;],
-                  [return isnand (x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             #if __GNUC__ >= 4
+             # undef isnand
+             # define isnand(x) __builtin_isnand ((double)(x))
+             #elif defined isnan
+             # undef isnand
+             # define isnand(x) isnan ((double)(x))
+             #endif
+             double x;]],
+           [[return isnand (x);]])],
         [gl_cv_func_isnand_in_libm=yes],
         [gl_cv_func_isnand_in_libm=no])
       LIBS="$save_LIBS"
@@ -79,16 +81,18 @@ AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM],
   AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm],
     [gl_cv_func_isnand_no_libm],
     [
-      AC_TRY_LINK([#include <math.h>
-                   #if __GNUC__ >= 4
-                   # undef isnand
-                   # define isnand(x) __builtin_isnan ((double)(x))
-                   #else
-                   # undef isnand
-                   # define isnand(x) isnan ((double)(x))
-                   #endif
-                   double x;],
-                  [return isnand (x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             #if __GNUC__ >= 4
+             # undef isnand
+             # define isnand(x) __builtin_isnan ((double)(x))
+             #else
+             # undef isnand
+             # define isnand(x) isnan ((double)(x))
+             #endif
+             double x;]],
+           [[return isnand (x);]])],
         [gl_cv_func_isnand_no_libm=yes],
         [gl_cv_func_isnand_no_libm=no])
     ])
index 1509fb4..1fce2ee 100644 (file)
@@ -1,4 +1,4 @@
-# isnanf.m4 serial 10
+# isnanf.m4 serial 11
 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,
@@ -71,16 +71,18 @@ AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM],
   AC_CACHE_CHECK([whether isnan(float) can be used without linking with libm],
     [gl_cv_func_isnanf_no_libm],
     [
-      AC_TRY_LINK([#include <math.h>
-                   #if __GNUC__ >= 4
-                   # undef isnanf
-                   # define isnanf(x) __builtin_isnanf ((float)(x))
-                   #elif defined isnan
-                   # undef isnanf
-                   # define isnanf(x) isnan ((float)(x))
-                   #endif
-                   float x;],
-                  [return isnanf (x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             #if __GNUC__ >= 4
+             # undef isnanf
+             # define isnanf(x) __builtin_isnanf ((float)(x))
+             #elif defined isnan
+             # undef isnanf
+             # define isnanf(x) isnan ((float)(x))
+             #endif
+             float x;]],
+           [[return isnanf (x);]])],
         [gl_cv_func_isnanf_no_libm=yes],
         [gl_cv_func_isnanf_no_libm=no])
     ])
@@ -94,16 +96,18 @@ AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM],
     [
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([#include <math.h>
-                   #if __GNUC__ >= 4
-                   # undef isnanf
-                   # define isnanf(x) __builtin_isnanf ((float)(x))
-                   #elif defined isnan
-                   # undef isnanf
-                   # define isnanf(x) isnan ((float)(x))
-                   #endif
-                   float x;],
-                  [return isnanf (x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             #if __GNUC__ >= 4
+             # undef isnanf
+             # define isnanf(x) __builtin_isnanf ((float)(x))
+             #elif defined isnan
+             # undef isnanf
+             # define isnanf(x) isnan ((float)(x))
+             #endif
+             float x;]],
+           [[return isnanf (x);]])],
         [gl_cv_func_isnanf_in_libm=yes],
         [gl_cv_func_isnanf_in_libm=no])
       LIBS="$save_LIBS"
index 25daeca..ad003ab 100644 (file)
@@ -1,4 +1,4 @@
-# isnanl.m4 serial 12
+# isnanl.m4 serial 13
 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,
@@ -67,16 +67,18 @@ AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM],
   AC_CACHE_CHECK([whether isnan(long double) can be used without linking with libm],
     [gl_cv_func_isnanl_no_libm],
     [
-      AC_TRY_LINK([#include <math.h>
-                   #if __GNUC__ >= 4
-                   # undef isnanl
-                   # define isnanl(x) __builtin_isnanl ((long double)(x))
-                   #elif defined isnan
-                   # undef isnanl
-                   # define isnanl(x) isnan ((long double)(x))
-                   #endif
-                   long double x;],
-                  [return isnanl (x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             #if __GNUC__ >= 4
+             # undef isnanl
+             # define isnanl(x) __builtin_isnanl ((long double)(x))
+             #elif defined isnan
+             # undef isnanl
+             # define isnanl(x) isnan ((long double)(x))
+             #endif
+             long double x;]],
+           [[return isnanl (x);]])],
         [gl_cv_func_isnanl_no_libm=yes],
         [gl_cv_func_isnanl_no_libm=no])
     ])
@@ -90,16 +92,18 @@ AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM],
     [
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([#include <math.h>
-                   #if __GNUC__ >= 4
-                   # undef isnanl
-                   # define isnanl(x) __builtin_isnanl ((long double)(x))
-                   #elif defined isnan
-                   # undef isnanl
-                   # define isnanl(x) isnan ((long double)(x))
-                   #endif
-                   long double x;],
-                  [return isnanl (x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             #if __GNUC__ >= 4
+             # undef isnanl
+             # define isnanl(x) __builtin_isnanl ((long double)(x))
+             #elif defined isnan
+             # undef isnanl
+             # define isnanl(x) isnan ((long double)(x))
+             #endif
+             long double x;]],
+           [[return isnanl (x);]])],
         [gl_cv_func_isnanl_in_libm=yes],
         [gl_cv_func_isnanl_in_libm=no])
       LIBS="$save_LIBS"
index 1a70543..232da73 100644 (file)
@@ -1,4 +1,4 @@
-# lcmessage.m4 serial 6 (gettext-0.18)
+# lcmessage.m4 serial 7 (gettext-0.18.2)
 dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -22,8 +22,12 @@ dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
 AC_DEFUN([gt_LC_MESSAGES],
 [
   AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
-    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>]],
+          [[return LC_MESSAGES]])],
+       [gt_cv_val_LC_MESSAGES=yes],
+       [gt_cv_val_LC_MESSAGES=no])])
   if test $gt_cv_val_LC_MESSAGES = yes; then
     AC_DEFINE([HAVE_LC_MESSAGES], [1],
       [Define if your <locale.h> file defines LC_MESSAGES.])
index 84f0977..aaa4eb5 100644 (file)
@@ -19,9 +19,11 @@ AC_DEFUN([gl_FUNC_LDEXPL],
         [
           save_LIBS="$LIBS"
           LIBS="$LIBS -lm"
-          AC_TRY_LINK([#include <math.h>
-                       long double x;],
-                      [return ldexpl (x, -1) > 0;],
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <math.h>
+                 long double x;]],
+               [[return ldexpl (x, -1) > 0;]])],
             [gl_cv_func_ldexpl_in_libm=yes],
             [gl_cv_func_ldexpl_in_libm=no])
           LIBS="$save_LIBS"
@@ -61,9 +63,11 @@ AC_DEFUN([gl_CHECK_LDEXPL_NO_LIBM],
   AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm],
     [gl_cv_func_ldexpl_no_libm],
     [
-      AC_TRY_LINK([#include <math.h>
-                   long double x;],
-                  [return ldexpl (x, -1) > 0;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             long double x;]],
+           [[return ldexpl (x, -1) > 0;]])],
         [gl_cv_func_ldexpl_no_libm=yes],
         [gl_cv_func_ldexpl_no_libm=no])
     ])
index 9f3be3a..2ea9d6d 100644 (file)
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 24 (gettext-0.18.2)
+# lib-link.m4 serial 25 (gettext-0.18.2)
 dnl Copyright (C) 2001-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,
@@ -85,7 +85,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
       *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
       *)       LIBS="$LIB[]NAME $LIBS" ;;
     esac
-    AC_TRY_LINK([$3], [$4],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[$3]], [[$4]])],
       [ac_cv_lib[]Name=yes],
       [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
     LIBS="$ac_save_LIBS"
index c5b6803..4dadd17 100644 (file)
@@ -1,4 +1,4 @@
-# logb.m4 serial 1
+# logb.m4 serial 2
 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,
@@ -14,26 +14,28 @@ AC_DEFUN([gl_FUNC_LOGB],
   fi
   dnl Test whether logb() can be used without libm.
   LOGB_LIBM=?
-  AC_TRY_LINK([
-     #ifndef __NO_MATH_INLINES
-     # define __NO_MATH_INLINES 1 /* for glibc */
-     #endif
-     #include <math.h>
-     extern double logb (double x);
-     double x;],
-    [x = logb(x);],
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM(
+       [[#ifndef __NO_MATH_INLINES
+         # define __NO_MATH_INLINES 1 /* for glibc */
+         #endif
+         #include <math.h>
+         extern double logb (double x);
+         double x;]],
+       [[x = logb(x);]])],
     [LOGB_LIBM=])
   if test "$LOGB_LIBM" = "?"; then
     save_LIBS="$LIBS"
     LIBS="$LIBS -lm"
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       extern double logb (double x);
-       double x;],
-      [x = logb(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           extern double logb (double x);
+           double x;]],
+         [[x = logb(x);]])],
       [LOGB_LIBM="-lm"])
     LIBS="$save_LIBS"
   fi
index eab591e..d951cdd 100644 (file)
@@ -1,4 +1,4 @@
-# logl.m4 serial 2
+# logl.m4 serial 3
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_LOGL],
   AC_CACHE_CHECK([whether logl() can be used without linking with libm],
     [gl_cv_func_logl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return logl (x) > 1;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return logl (x) > 1;]])],
         [gl_cv_func_logl_no_libm=yes],
         [gl_cv_func_logl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_LOGL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return logl (x) > 1;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return logl (x) > 1;]])],
           [gl_cv_func_logl_in_libm=yes],
           [gl_cv_func_logl_in_libm=no])
         LIBS="$save_LIBS"
index 009ee26..eb3c2db 100644 (file)
@@ -1,4 +1,4 @@
-# printf-frexp.m4 serial 4
+# printf-frexp.m4 serial 5
 dnl Copyright (C) 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,
@@ -22,10 +22,12 @@ AC_DEFUN([gl_FUNC_PRINTF_FREXP],
   AC_CACHE_CHECK([whether ldexp can be used without linking with libm],
     [gl_cv_func_ldexp_no_libm],
     [
-      AC_TRY_LINK([#include <math.h>
-                   double x;
-                   int y;],
-                  [return ldexp (x, y) < 1;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             double x;
+             int y;]],
+           [[return ldexp (x, y) < 1;]])],
         [gl_cv_func_ldexp_no_libm=yes],
         [gl_cv_func_ldexp_no_libm=no])
     ])
index 2ed961a..2486511 100644 (file)
@@ -1,5 +1,5 @@
-# servent.m4 serial 1
-dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# servent.m4 serial 2
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -30,12 +30,16 @@ AC_DEFUN([gl_SERVENT],
         [gl_cv_w32_getservbyname=no
          gl_save_LIBS="$LIBS"
          LIBS="$LIBS -lws2_32"
-         AC_TRY_LINK([
+         AC_LINK_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
 #include <stddef.h>
-], [getservbyname(NULL,NULL);], [gl_cv_w32_getservbyname=yes])
+              ]],
+              [[getservbyname(NULL,NULL);]])],
+           [gl_cv_w32_getservbyname=yes])
          LIBS="$gl_save_LIBS"
         ])
       if test "$gl_cv_w32_getservbyname" = "yes"; then
index 56ff825..b86f453 100644 (file)
@@ -1,4 +1,4 @@
-# signbit.m4 serial 6
+# signbit.m4 serial 7
 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,
@@ -67,9 +67,11 @@ AC_DEFUN([gl_SIGNBIT],
           AC_CACHE_CHECK([whether copysignf can be used without linking with libm],
             [gl_cv_func_copysignf_no_libm],
             [
-              AC_TRY_LINK([#include <math.h>
-                           float x, y;],
-                          [return copysignf (x, y) < 0;],
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[#include <math.h>
+                     float x, y;]],
+                   [[return copysignf (x, y) < 0;]])],
                 [gl_cv_func_copysignf_no_libm=yes],
                 [gl_cv_func_copysignf_no_libm=no])
             ])
@@ -87,9 +89,11 @@ AC_DEFUN([gl_SIGNBIT],
           AC_CACHE_CHECK([whether copysign can be used without linking with libm],
             [gl_cv_func_copysign_no_libm],
             [
-              AC_TRY_LINK([#include <math.h>
-                           double x, y;],
-                          [return copysign (x, y) < 0;],
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[#include <math.h>
+                     double x, y;]],
+                   [[return copysign (x, y) < 0;]])],
                 [gl_cv_func_copysign_no_libm=yes],
                 [gl_cv_func_copysign_no_libm=no])
             ])
@@ -107,9 +111,11 @@ AC_DEFUN([gl_SIGNBIT],
           AC_CACHE_CHECK([whether copysignl can be used without linking with libm],
             [gl_cv_func_copysignl_no_libm],
             [
-              AC_TRY_LINK([#include <math.h>
-                           long double x, y;],
-                          [return copysignl (x, y) < 0;],
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[#include <math.h>
+                     long double x, y;]],
+                   [[return copysignl (x, y) < 0;]])],
                 [gl_cv_func_copysignl_no_libm=yes],
                 [gl_cv_func_copysignl_no_libm=no])
             ])
index c9c0e5c..d77230a 100644 (file)
@@ -1,4 +1,4 @@
-# sinl.m4 serial 2
+# sinl.m4 serial 3
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_SINL],
   AC_CACHE_CHECK([whether sinl() can be used without linking with libm],
     [gl_cv_func_sinl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return sinl (x) > 0.4;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return sinl (x) > 0.4;]])],
         [gl_cv_func_sinl_no_libm=yes],
         [gl_cv_func_sinl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_SINL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return sinl (x) > 0.4;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return sinl (x) > 0.4;]])],
           [gl_cv_func_sinl_in_libm=yes],
           [gl_cv_func_sinl_in_libm=no])
         LIBS="$save_LIBS"
index 21b1c68..53c2600 100644 (file)
@@ -1,4 +1,4 @@
-# sqrtl.m4 serial 2
+# sqrtl.m4 serial 3
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_SQRTL],
   AC_CACHE_CHECK([whether sqrtl() can be used without linking with libm],
     [gl_cv_func_sqrtl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return sqrtl (x) > 0.4;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return sqrtl (x) > 0.4;]])],
         [gl_cv_func_sqrtl_no_libm=yes],
         [gl_cv_func_sqrtl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_SQRTL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return sqrtl (x) > 0.4;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return sqrtl (x) > 0.4;]])],
           [gl_cv_func_sqrtl_in_libm=yes],
           [gl_cv_func_sqrtl_in_libm=no])
         LIBS="$save_LIBS"
index 0e78505..0af27f7 100644 (file)
@@ -1,4 +1,4 @@
-# tanl.m4 serial 2
+# tanl.m4 serial 3
 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,
@@ -14,12 +14,14 @@ AC_DEFUN([gl_FUNC_TANL],
   AC_CACHE_CHECK([whether tanl() can be used without linking with libm],
     [gl_cv_func_tanl_no_libm],
     [
-      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                   # define __NO_MATH_INLINES 1 /* for glibc */
-                   #endif
-                   #include <math.h>
-                   long double x;],
-                  [return tanl (x) > 0.4;],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[return tanl (x) > 0.4;]])],
         [gl_cv_func_tanl_no_libm=yes],
         [gl_cv_func_tanl_no_libm=no])
     ])
@@ -29,12 +31,14 @@ AC_DEFUN([gl_FUNC_TANL],
       [
         save_LIBS="$LIBS"
         LIBS="$LIBS -lm"
-        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
-                     # define __NO_MATH_INLINES 1 /* for glibc */
-                     #endif
-                     #include <math.h>
-                     long double x;],
-                    [return tanl (x) > 0.4;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               long double x;]],
+             [[return tanl (x) > 0.4;]])],
           [gl_cv_func_tanl_in_libm=yes],
           [gl_cv_func_tanl_in_libm=no])
         LIBS="$save_LIBS"
index 05cc4ff..01ee9dd 100644 (file)
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 5 (gettext-0.18)
+# threadlib.m4 serial 6 (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,
@@ -80,7 +80,7 @@ changequote([,])dnl
         # groks <pthread.h>. cc also understands the flag -pthread, but
         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
         # 2. putting a flag into CPPFLAGS that has an effect on the linker
-        # causes the AC_TRY_LINK test below to succeed unexpectedly,
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
         ;;
@@ -111,8 +111,12 @@ AC_DEFUN([gl_THREADLIB_BODY],
       [gl_cv_have_weak],
       [gl_cv_have_weak=no
        dnl First, test whether the compiler accepts it syntactically.
-       AC_TRY_LINK([extern void xyzzy ();
-#pragma weak xyzzy], [xyzzy();], [gl_cv_have_weak=maybe])
+       AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[extern void xyzzy ();
+#pragma weak xyzzy]],
+            [[xyzzy();]])],
+         [gl_cv_have_weak=maybe])
        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.
@@ -148,9 +152,11 @@ int main ()
         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
         # the second one only in libpthread, and lock.c needs it.
-        AC_TRY_LINK([#include <pthread.h>],
-          [pthread_mutex_lock((pthread_mutex_t*)0);
-           pthread_mutexattr_init((pthread_mutexattr_t*)0);],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <pthread.h>]],
+             [[pthread_mutex_lock((pthread_mutex_t*)0);
+               pthread_mutexattr_init((pthread_mutexattr_t*)0);]])],
           [gl_have_pthread=yes])
         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
         # since it is defined as a macro on OSF/1.)
@@ -203,9 +209,13 @@ int main ()
         gl_have_solaristhread=
         gl_save_LIBS="$LIBS"
         LIBS="$LIBS -lthread"
-        AC_TRY_LINK([#include <thread.h>
-#include <synch.h>],
-          [thr_self();],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <thread.h>
+#include <synch.h>
+             ]],
+             [[thr_self();]])],
           [gl_have_solaristhread=yes])
         LIBS="$gl_save_LIBS"
         if test -n "$gl_have_solaristhread"; then
@@ -231,7 +241,9 @@ int main ()
       gl_have_pth=
       gl_save_LIBS="$LIBS"
       LIBS="$LIBS -lpth"
-      AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes])
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM([[#include <pth.h>]], [[pth_self();]])],
+        [gl_have_pth=yes])
       LIBS="$gl_save_LIBS"
       if test -n "$gl_have_pth"; then
         gl_threads_api=pth
index d0e81b9..0654d9c 100644 (file)
@@ -1,4 +1,4 @@
-# trunc.m4 serial 3
+# trunc.m4 serial 4
 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,
@@ -14,24 +14,26 @@ AC_DEFUN([gl_FUNC_TRUNC],
   if test "$ac_cv_have_decl_trunc" = yes; then
     dnl Test whether trunc() can be used without libm.
     TRUNC_LIBM=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       double x;],
-      [x = trunc(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           double x;]],
+         [[x = trunc(x);]])],
       [TRUNC_LIBM=])
     if test "$TRUNC_LIBM" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         double x;],
-        [x = trunc(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             double x;]],
+           [[x = trunc(x);]])],
         [TRUNC_LIBM="-lm"])
       LIBS="$save_LIBS"
     fi
index 1a22b4b..0b7c49a 100644 (file)
@@ -1,4 +1,4 @@
-# truncf.m4 serial 2
+# truncf.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,
@@ -14,24 +14,26 @@ AC_DEFUN([gl_FUNC_TRUNCF],
   if test "$ac_cv_have_decl_truncf" = yes; then
     dnl Test whether truncf() can be used without libm.
     TRUNCF_LIBM=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       float x;],
-      [x = truncf(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           float x;]],
+         [[x = truncf(x);]])],
       [TRUNCF_LIBM=])
     if test "$TRUNCF_LIBM" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         float x;],
-        [x = truncf(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             float x;]],
+           [[x = truncf(x);]])],
         [TRUNCF_LIBM="-lm"])
       LIBS="$save_LIBS"
     fi
index 49f0065..a2a0695 100644 (file)
@@ -15,24 +15,26 @@ AC_DEFUN([gl_FUNC_TRUNCL],
   if test "$ac_cv_have_decl_truncl" = yes; then
     dnl Test whether truncl() can be used without libm.
     TRUNCL_LIBM=?
-    AC_TRY_LINK([
-       #ifndef __NO_MATH_INLINES
-       # define __NO_MATH_INLINES 1 /* for glibc */
-       #endif
-       #include <math.h>
-       long double x;],
-      [x = truncl(x);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#ifndef __NO_MATH_INLINES
+           # define __NO_MATH_INLINES 1 /* for glibc */
+           #endif
+           #include <math.h>
+           long double x;]],
+         [[x = truncl(x);]])],
       [TRUNCL_LIBM=])
     if test "$TRUNCL_LIBM" = "?"; then
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([
-         #ifndef __NO_MATH_INLINES
-         # define __NO_MATH_INLINES 1 /* for glibc */
-         #endif
-         #include <math.h>
-         long double x;],
-        [x = truncl(x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             long double x;]],
+           [[x = truncl(x);]])],
         [TRUNCL_LIBM="-lm"])
       LIBS="$save_LIBS"
     fi
index 0c4de8b..ca32649 100644 (file)
@@ -8,13 +8,16 @@ stdint
 
 configure.ac:
 TEST_TSEARCH_LIBM=
-AC_TRY_LINK([
-   #ifndef __NO_MATH_INLINES
-   # define __NO_MATH_INLINES 1 /* for glibc */
-   #endif
-   #include <math.h>
-   double x;],
-  [x = log (x);], , [TEST_TSEARCH_LIBM=-lm])
+AC_LINK_IFELSE(
+  [AC_LANG_PROGRAM(
+     [[#ifndef __NO_MATH_INLINES
+       # define __NO_MATH_INLINES 1 /* for glibc */
+       #endif
+       #include <math.h>
+       double x;]],
+     [[x = log (x);]])],
+  [],
+  [TEST_TSEARCH_LIBM=-lm])
 AC_SUBST([TEST_TSEARCH_LIBM])
 AC_CHECK_FUNCS_ONCE([initstate])