summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 65d3671..f5c01cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,12 +80,18 @@ esac
80AM_CONDITIONAL(WIN32, test x$win32 = xtrue) 80AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
81 81
82# Check if we need libm for fmin 82# Check if we need libm for fmin
83CACHED_CFLAGS="$CFLAGS"
84CFLAGS="-O0"
83AC_CACHE_CHECK(if fmin is a builtin function, ac_cv_fmin_builtin, 85AC_CACHE_CHECK(if fmin is a builtin function, ac_cv_fmin_builtin,
84 AC_TRY_COMPILE([ 86 AC_TRY_LINK([
85 #include <math.h> 87 #include <math.h>
88 #include <float.h>
86 ], [ 89 ], [
87 fmin(0.1f, 0.2f); 90 double val = 3.1415f * 0.55555f;
91 double diff = fmin(val, DBL_MAX);
92 if (diff > 0) return 1;
88 ], ac_cv_fmin_builtin=yes, ac_cv_fmin_builtin=no)) 93 ], ac_cv_fmin_builtin=yes, ac_cv_fmin_builtin=no))
94CFLAGS="$CACHED_CFLAGS"
89 95
90# Check if struct tm has a tm_gmtoff member 96# Check if struct tm has a tm_gmtoff member
91AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, 97AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,