diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 663aaef..65d3671 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -79,6 +79,14 @@ case ${host_os} in | |||
| 79 | esac | 79 | esac |
| 80 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) | 80 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) |
| 81 | 81 | ||
| 82 | # Check if we need libm for fmin | ||
| 83 | AC_CACHE_CHECK(if fmin is a builtin function, ac_cv_fmin_builtin, | ||
| 84 | AC_TRY_COMPILE([ | ||
| 85 | #include <math.h> | ||
| 86 | ], [ | ||
| 87 | fmin(0.1f, 0.2f); | ||
| 88 | ], ac_cv_fmin_builtin=yes, ac_cv_fmin_builtin=no)) | ||
| 89 | |||
| 82 | # Check if struct tm has a tm_gmtoff member | 90 | # Check if struct tm has a tm_gmtoff member |
| 83 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, | 91 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, |
| 84 | AC_TRY_COMPILE([ | 92 | AC_TRY_COMPILE([ |
| @@ -139,6 +147,10 @@ AM_CONDITIONAL([HAVE_CYTHON],[test "x$cython_python_bindings" = "xyes"]) | |||
| 139 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden $PTHREAD_CFLAGS") | 147 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden $PTHREAD_CFLAGS") |
| 140 | GLOBAL_LDFLAGS="$PTHREAD_LIBS" | 148 | GLOBAL_LDFLAGS="$PTHREAD_LIBS" |
| 141 | 149 | ||
| 150 | if test "x$ac_cv_fmin_builtin" != "xyes"; then | ||
| 151 | GLOBAL_LDFLAGS+=" -lm" | ||
| 152 | fi | ||
| 153 | |||
| 142 | AC_ARG_ENABLE(debug, | 154 | AC_ARG_ENABLE(debug, |
| 143 | AS_HELP_STRING([--enable-debug], | 155 | AS_HELP_STRING([--enable-debug], |
| 144 | [enable debugging, default: no]), | 156 | [enable debugging, default: no]), |
