Changeset View
Changeset View
Standalone View
Standalone View
configure.ac
Show First 20 Lines • Show All 792 Lines • ▼ Show 20 Lines | |||||
fi | fi | ||||
dnl this flag screws up non-darwin gcc even when the check fails. special-case it. | dnl this flag screws up non-darwin gcc even when the check fails. special-case it. | ||||
if test x$TARGET_OS = xdarwin; then | if test x$TARGET_OS = xdarwin; then | ||||
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) | AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) | ||||
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"]) | AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"]) | ||||
fi | fi | ||||
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h]) | AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h]) | ||||
AC_CHECK_DECLS([getifaddrs, freeifaddrs],,, | AC_CHECK_DECLS([getifaddrs, freeifaddrs],,, | ||||
[#include <sys/types.h> | [#include <sys/types.h> | ||||
#include <ifaddrs.h>] | #include <ifaddrs.h>] | ||||
) | ) | ||||
AC_CHECK_DECLS([strnlen]) | AC_CHECK_DECLS([strnlen]) | ||||
# Check for daemon(3), unrelated to --with-daemon (although used by it) | # Check for daemon(3), unrelated to --with-daemon (although used by it) | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
AC_MSG_CHECKING(for getentropy via random.h) | AC_MSG_CHECKING(for getentropy via random.h) | ||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> | ||||
#include <sys/random.h>]], | #include <sys/random.h>]], | ||||
[[ getentropy(nullptr, 32) ]])], | [[ getentropy(nullptr, 32) ]])], | ||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_GETENTROPY_RAND, 1,[Define this symbol if the BSD getentropy system call is available with sys/random.h]) ], | [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_GETENTROPY_RAND, 1,[Define this symbol if the BSD getentropy system call is available with sys/random.h]) ], | ||||
[ AC_MSG_RESULT(no)] | [ AC_MSG_RESULT(no)] | ||||
) | ) | ||||
AC_MSG_CHECKING(for sysctl) | |||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | |||||
#include <sys/sysctl.h>]], | |||||
[[ static const int name[2] = {CTL_KERN, KERN_VERSION}; | |||||
#ifdef __linux__ | |||||
#error "Don't use sysctl on Linux, it's deprecated even when it works" | |||||
#endif | |||||
sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])], | |||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL, 1,[Define this symbol if the BSD sysctl() is available]) ], | |||||
[ AC_MSG_RESULT(no)] | |||||
) | |||||
AC_MSG_CHECKING(for sysctl KERN_ARND) | AC_MSG_CHECKING(for sysctl KERN_ARND) | ||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | ||||
#include <sys/sysctl.h>]], | #include <sys/sysctl.h>]], | ||||
[[ static const int name[2] = {CTL_KERN, KERN_ARND}; | [[ static const int name[2] = {CTL_KERN, KERN_ARND}; | ||||
sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])], | sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])], | ||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL_ARND, 1,[Define this symbol if the BSD sysctl(KERN_ARND) is available]) ], | [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL_ARND, 1,[Define this symbol if the BSD sysctl(KERN_ARND) is available]) ], | ||||
[ AC_MSG_RESULT(no)] | [ AC_MSG_RESULT(no)] | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 598 Lines • Show Last 20 Lines |