+
+dnl Test whether logl() works.
+dnl On OSF/1 5.1, logl(-0.0L) is NaN.
+AC_DEFUN([gl_FUNC_LOGL_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether logl works], [gl_cv_func_logl_works],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <math.h>
+volatile long double x;
+long double y;
+int main ()
+{
+ x = -0.0L;
+ y = logl (x);
+ if (!(y + y == y))
+ return 1;
+ return 0;
+}
+]])],
+ [gl_cv_func_logl_works=yes],
+ [gl_cv_func_logl_works=no],
+ [case "$host_os" in
+ osf*) gl_cv_func_logl_works="guessing no";;
+ *) gl_cv_func_logl_works="guessing yes";;
+ esac
+ ])
+ ])
+])