X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Ffloorf.m4;h=96c9b3bdc74277cf4707475c46f4480bf0fff184;hb=423d3cac13c30bb0d5f85e5fac6ab1406ed1731a;hp=c64382ff696f4ac22ff9e5c997fe905e2d8f1ba6;hpb=93c5ec22b9dcc15031556d647b5450fa6e645c21;p=gnulib.git diff --git a/m4/floorf.m4 b/m4/floorf.m4 index c64382ff6..96c9b3bdc 100644 --- a/m4/floorf.m4 +++ b/m4/floorf.m4 @@ -1,4 +1,4 @@ -# floorf.m4 serial 5 +# 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, @@ -20,9 +20,9 @@ AC_DEFUN([gl_FUNC_FLOORF], REPLACE_FLOORF=1 fi else - REPLACE_FLOORF=1 + HAVE_DECL_FLOORF=0 fi - if test $REPLACE_FLOORF = 1; then + if test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1; then AC_LIBOBJ([floorf]) FLOORF_LIBM= fi @@ -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 - float x;], - [x = floorf(x);], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + 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 - float x;], - [x = floorf(x);], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + float x;]], + [[x = floorf(x);]])], [gl_cv_func_floorf_libm="-lm"]) LIBS="$save_LIBS" fi