configure.ac: Replace deprecated AC_TRY_LINK macro

This commit is contained in:
Javier Jardón 2011-10-17 01:40:35 +01:00
parent 4bf2a84e14
commit 41dc8f1d59
1 changed files with 21 additions and 12 deletions

View File

@ -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 <langinfo.h>], [
char c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
], nl_ok=yes, nl_ok=no)
AC_PREPROC_IFELSE(
[AC_LANG_SOURCE(
[[#include <langinfo.h>]],
[[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 <math.h>
# Check for finite or isfinite
AC_CHECK_FUNCS(finite, , [
AC_MSG_CHECKING(for finite in <math.h>)
AC_TRY_LINK([#include <math.h>], [double f = 0.0; finite (f)], [
AC_DEFINE(HAVE_FINITE, 1)
AC_MSG_RESULT(yes)], [
AC_MSG_RESULT(no)
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <math.h>]],
[[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 <math.h>)
AC_TRY_LINK([#include <math.h>], [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 <math.h>]],
[[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)