summaryrefslogtreecommitdiff
path: root/m4/exp2l.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/exp2l.m4')
-rw-r--r--m4/exp2l.m411
1 files changed, 9 insertions, 2 deletions
diff --git a/m4/exp2l.m4 b/m4/exp2l.m4
index 605cd14c76..3104a58ea8 100644
--- a/m4/exp2l.m4
+++ b/m4/exp2l.m4
@@ -1,4 +1,4 @@
-# exp2l.m4 serial 2
+# exp2l.m4 serial 3
dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -28,6 +28,7 @@ AC_DEFUN([gl_FUNC_EXP2L],
AC_CHECK_DECL([exp2l], , [HAVE_DECL_EXP2L=0], [[#include <math.h>]])
m4_ifdef([gl_FUNC_EXP2L_IEEE], [
if test $gl_exp2l_required = ieee && test $REPLACE_EXP2L = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether exp2l works according to ISO C 99 with IEC 60559],
[gl_cv_func_exp2l_ieee],
[
@@ -62,7 +63,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_exp2l_ieee=yes],
[gl_cv_func_exp2l_ieee=no],
- [gl_cv_func_exp2l_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_exp2l_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_exp2l_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_exp2l_ieee" in