X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fcheck-math-lib.m4;h=30bd2e4acc871603d45f7ffe6a4e9cd8ba81bb8e;hb=50933cccef270ca1f2d948700913830dba0b9a06;hp=313dace5fb49d871595b8f1a3b144e181967ef16;hpb=ca45caaa07c9e69f791a8e93199aeafa181e7572;p=gnulib.git diff --git a/m4/check-math-lib.m4 b/m4/check-math-lib.m4 index 313dace5f..30bd2e4ac 100644 --- a/m4/check-math-lib.m4 +++ b/m4/check-math-lib.m4 @@ -1,5 +1,5 @@ -# check-math-lib.m4 serial 2 -dnl Copyright (C) 2007 Free Software Foundation, Inc. +# check-math-lib.m4 serial 3 +dnl Copyright (C) 2007, 2009-2011 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. @@ -17,13 +17,13 @@ AC_DEFUN([gl_CHECK_MATH_LIB], [ $1=missing for libm in "" "-lm"; do LIBS="$save_LIBS $libm" - AC_TRY_LINK([ - #ifndef __NO_MATH_INLINES - # define __NO_MATH_INLINES 1 /* for glibc */ - #endif - #include - double x;], - [$2], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double x;]], + [$2])], [$1=$libm break]) done