From 41dc8f1d5908bdd311ef239a0a2d5be825590377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Mon, 17 Oct 2011 01:40:35 +0100 Subject: [PATCH] configure.ac: Replace deprecated AC_TRY_LINK macro --- configure.ac | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 71b17b9e07..cb9386f71f 100644 --- a/configure.ac +++ b/configure.ac @@ -432,9 +432,12 @@ AM_BINRELOC # _NL_MEASUREMENT_MEASUREMENT is an enum and not a define AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT]) -AC_TRY_LINK([#include ], [ -char c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT)); -], nl_ok=yes, nl_ok=no) +AC_PREPROC_IFELSE( + [AC_LANG_SOURCE( + [[#include ]], + [[char c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));]])], + [nl_ok=yes], + [nl_ok=no]) AC_MSG_RESULT($nl_ok) if test "$nl_ok" = "yes"; then AC_DEFINE(HAVE__NL_MEASUREMENT_MEASUREMENT, 1, @@ -619,15 +622,21 @@ AC_TRY_RUN([#include # Check for finite or isfinite AC_CHECK_FUNCS(finite, , [ AC_MSG_CHECKING(for finite in ) - AC_TRY_LINK([#include ], [double f = 0.0; finite (f)], [ - AC_DEFINE(HAVE_FINITE, 1) - AC_MSG_RESULT(yes)], [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING(for isfinite in ) - AC_TRY_LINK([#include ], [float f = 0.0; isfinite(f)], [ - AC_DEFINE(HAVE_ISFINITE, 1, - [Define to 1 if you have the isfinite function.]) - AC_MSG_RESULT(yes)], AC_MSG_RESULT(no))])]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[double f = 0.0; finite (f)]])], + [AC_DEFINE(HAVE_FINITE, 1) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) + AC_MSG_CHECKING(for isfinite in ) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[float f = 0.0; isfinite(f)]])], + [AC_DEFINE([HAVE_ISFINITE],[1],[Define to 1 if you have the isfinite function.]) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)])])]) AC_SUBST(HAVE_FINITE) AC_SUBST(HAVE_ISFINITE)