2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_FUNC_MODFL],
9 AC_REQUIRE([gl_MATH_H_DEFAULTS])
10 AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
12 dnl Test whether modfl() exists. We cannot assume that modfl(), if it
13 dnl exists, is defined in the same library as modf(). This is not the case
14 dnl on FreeBSD, Solaris.
15 gl_MATHFUNC([modfl], [long double], [(long double, long double *)])
16 if test $gl_cv_func_modfl_no_libm = no \
17 && test $gl_cv_func_modfl_in_libm = no; then
19 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
20 AC_REQUIRE([gl_FUNC_MODF])
21 MODFL_LIBM="$MODF_LIBM"
23 AC_REQUIRE([gl_FUNC_TRUNCL])
24 MODFL_LIBM="$TRUNCL_LIBM"
27 AC_SUBST([MODFL_LIBM])