Changeset View
Changeset View
Standalone View
Standalone View
configure.ac
Show First 20 Lines • Show All 611 Lines • ▼ Show 20 Lines | |||||
fi | fi | ||||
dnl Check for endianness | dnl Check for endianness | ||||
AC_C_BIGENDIAN | AC_C_BIGENDIAN | ||||
dnl Check for pthread compile/link requirements | dnl Check for pthread compile/link requirements | ||||
AX_PTHREAD | AX_PTHREAD | ||||
# Check for off_t vs off64_t before AC_SYS_LARGEFILE gets called as it will | |||||
# change the output | |||||
AC_MSG_CHECKING(for if type off_t equals off64_t) | |||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | |||||
#include <type_traits>]], | |||||
[[ static_assert(std::is_same<off_t, off64_t>::value, ""); ]])], | |||||
[ AC_MSG_RESULT(yes); need_wrap_fcntl=no; AC_DEFINE(OFF_T_EQUALS_OFF64_T, 1,[Define this symbol if type off_t equals off64_t]) ], | |||||
[ AC_MSG_RESULT(no); need_wrap_fcntl=yes] | |||||
) | |||||
# The following macro will add the necessary defines to bitcoin-config.h, but | # The following macro will add the necessary defines to bitcoin-config.h, but | ||||
# they also need to be passed down to any subprojects. Pull the results out of | # they also need to be passed down to any subprojects. Pull the results out of | ||||
# the cache and add them to CPPFLAGS. | # the cache and add them to CPPFLAGS. | ||||
AC_SYS_LARGEFILE | AC_SYS_LARGEFILE | ||||
# detect POSIX or GNU variant of strerror_r | # detect POSIX or GNU variant of strerror_r | ||||
AC_FUNC_STRERROR_R | AC_FUNC_STRERROR_R | ||||
if test x$ac_cv_sys_file_offset_bits != x && | if test x$ac_cv_sys_file_offset_bits != x && | ||||
Show All 30 Lines | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE | ||||
#include <sys/select.h> | #include <sys/select.h> | ||||
extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])], | extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])], | ||||
[ fdelt_type="long unsigned int"], | [ fdelt_type="long unsigned int"], | ||||
[ fdelt_type="long int"]) | [ fdelt_type="long int"]) | ||||
AC_MSG_RESULT($fdelt_type) | AC_MSG_RESULT($fdelt_type) | ||||
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk]) | AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk]) | ||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"]) | AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"]) | ||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"]) | AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"]) | ||||
if test x$need_wrap_fcntl = xyes; then | |||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=fcntl]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=fcntl"]) | |||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=fcntl64]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=fcntl64"]) | |||||
fi | |||||
else | else | ||||
AC_SEARCH_LIBS([clock_gettime],[rt]) | AC_SEARCH_LIBS([clock_gettime],[rt]) | ||||
fi | fi | ||||
if test x$TARGET_OS != xwindows; then | if test x$TARGET_OS != xwindows; then | ||||
# All windows code is PIC, forcing it on just adds useless compile warnings | # All windows code is PIC, forcing it on just adds useless compile warnings | ||||
AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"]) | AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"]) | ||||
fi | fi | ||||
▲ Show 20 Lines • Show All 664 Lines • Show Last 20 Lines |