X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ffabsf.m4;h=c1415074c8fc9aa3767fd9e0d8122c20a5b4835e;hb=fa1db0dd22768f09a507674a30beb5b8a87bb35f;hp=7924758138a88685e0428d220435865719b35c44;hpb=7f26f4f75fc3aee7a5e351ecdf05278d9890ff3e;p=gnulib.git diff --git a/m4/fabsf.m4 b/m4/fabsf.m4 index 792475813..c1415074c 100644 --- a/m4/fabsf.m4 +++ b/m4/fabsf.m4 @@ -1,5 +1,5 @@ -# fabsf.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +# fabsf.m4 serial 3 +dnl Copyright (C) 2011-2013 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. @@ -9,15 +9,15 @@ AC_DEFUN([gl_FUNC_FABSF], AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_FABS]) - dnl Test whether fabsf() exists. Assume that fabsf(), if it exists, is - dnl defined in the same library as fabs(). - save_LIBS="$LIBS" - LIBS="$LIBS $FABS_LIBM" - AC_CHECK_FUNCS([fabsf]) - LIBS="$save_LIBS" - if test $ac_cv_func_fabsf = yes; then - FABSF_LIBM="$FABS_LIBM" - else + dnl Persuade glibc to declare fabsf(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + dnl Test whether fabsf() exists. We cannot assume that fabsf(), if it + dnl exists, is defined in the same library as fabs(). This is not the case + dnl on FreeBSD, NetBSD, OpenBSD. + gl_MATHFUNC([fabsf], [float], [(float)]) + if test $gl_cv_func_fabsf_no_libm = no \ + && test $gl_cv_func_fabsf_in_libm = no; then HAVE_FABSF=0 FABSF_LIBM="$FABS_LIBM" fi