summaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-29 21:38:26 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-29 21:38:26 +0100
commita6b8976bb724f8c85dd5699d115d795f7b730298 (patch)
treeb9755c97cc1d8ab82d6e18c97c48da6b98f27992 /src/configure.in
parent2f6271b1e7cff985cac66f6850116bcf3fcccd58 (diff)
downloadvim-git-a6b8976bb724f8c85dd5699d115d795f7b730298.tar.gz
patch 7.4.1463v7.4.1463
Problem: Configure doesn't find isinf() and isnan() on some systems. Solution: Use a configure check that includes math.h.
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/configure.in b/src/configure.in
index c809427f9..b618b8c36 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -3565,7 +3565,7 @@ AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigvec strcasecmp strerror strftime stricmp strncasecmp \
strnicmp strpbrk strtol tgetent towlower towupper iswupper \
- usleep utime utimes isnan isinf)
+ usleep utime utimes)
AC_FUNC_FSEEKO
dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when
@@ -3668,6 +3668,33 @@ AC_TRY_LINK([
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOAT_FUNCS),
AC_MSG_RESULT(no))
+dnl isinf() and isnan() need to include header files and may need -lm.
+AC_MSG_CHECKING([for isinf()])
+AC_TRY_LINK([
+#ifdef HAVE_MATH_H
+# include <math.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#endif
+], [int r = isinf(1.11); ],
+ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISINF),
+ AC_MSG_RESULT(no))
+
+AC_MSG_CHECKING([for isnan()])
+AC_TRY_LINK([
+#ifdef HAVE_MATH_H
+# include <math.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#endif
+], [int r = isnan(1.11); ],
+ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISNAN),
+ AC_MSG_RESULT(no))
+
dnl Link with -lposix1e for ACL stuff; if not found, try -lacl for SGI
dnl when -lacl works, also try to use -lattr (required for Debian).
dnl On Solaris, use the acl_get/set functions in libsec, if present.