summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6a2f991c..2d3ad041 100644
--- a/configure.ac
+++ b/configure.ac
@@ -557,6 +557,26 @@ if test "x$ac_cv_header_sys_mman_h" != "xyes"; then
fi
AM_CONDITIONAL(USE_WIN32_MMAN, [test "x$ac_cv_have_decl_MapViewOfFile" = "xyes"])
+AC_CHECK_DECLS([sysconf], [], [], [[#include <unistd.h>]])
+AM_CONDITIONAL(HAVE_SYSCONF, [test "x$ac_cv_have_decl_sysconf" = "xyes"])
+if test "x$ac_cv_have_decl_sysconf" != "xyes"; then
+ AC_CHECK_DECLS([GetSystemInfo], [], [], [[#include <sysinfoapi.h>]])
+fi
+AM_CONDITIONAL(USE_WIN32_SYSCONF, [test "x$ac_cv_have_decl_GetSystemInfo" = "xyes"])
+
+if test "x$ac_cv_have_decl_GetSystemInfo" = "xyes"; then
+ AC_DEFINE([USE_WIN32_SYSCONF], [1], [Use sysconf replacement for win32])
+fi
+
+AH_VERBATIM([USE_WIN32_SYSCONF],
+ [/* Define sysconf(3) here if it is not available from a system header. */
+#undef USE_WIN32_SYSCONF
+#ifdef USE_WIN32_SYSCONF
+#define _SC_PAGESIZE 1
+long sysconf(int name);
+#endif
+])
+
dnl Check if we have <linux/bpf.h> for EM_BPF disassembly.
AC_CHECK_HEADERS(linux/bpf.h)
AM_CONDITIONAL(HAVE_LINUX_BPF_H, [test "x$ac_cv_header_linux_bpf_h" = "xyes"])