Changeset View
Changeset View
Standalone View
Standalone View
configure.ac
Show First 20 Lines • Show All 637 Lines • ▼ Show 20 Lines | |||||
fi | fi | ||||
AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"]) | AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"]) | ||||
AX_GCC_FUNC_ATTRIBUTE([visibility]) | AX_GCC_FUNC_ATTRIBUTE([visibility]) | ||||
AX_GCC_FUNC_ATTRIBUTE([dllexport]) | AX_GCC_FUNC_ATTRIBUTE([dllexport]) | ||||
AX_GCC_FUNC_ATTRIBUTE([dllimport]) | AX_GCC_FUNC_ATTRIBUTE([dllimport]) | ||||
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=yes; AC_DEFINE(OFF_T_EQUALS_OFF64_T, 1,[Define this symbol if type off_t equals off64_t]) ], | |||||
[ AC_MSG_RESULT(no)] | |||||
) | |||||
if test x$use_glibc_compat != xno; then | if test x$use_glibc_compat != xno; then | ||||
#glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link | #glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link | ||||
#in anyway for back-compat. | #in anyway for back-compat. | ||||
AC_CHECK_LIB([rt],[clock_gettime],, AC_MSG_ERROR(librt missing)) | AC_CHECK_LIB([rt],[clock_gettime],, AC_MSG_ERROR(librt missing)) | ||||
#__fdelt_chk's params and return type have changed from long unsigned int to long int. | #__fdelt_chk's params and return type have changed from long unsigned int to long int. | ||||
# See which one is present here. | # See which one is present here. | ||||
AC_MSG_CHECKING(__fdelt_chk type) | AC_MSG_CHECKING(__fdelt_chk type) | ||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE | ||||
#undef _FORTIFY_SOURCE | #undef _FORTIFY_SOURCE | ||||
#endif | #endif | ||||
#define _FORTIFY_SOURCE 2 | #define _FORTIFY_SOURCE 2 | ||||
#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 665 Lines • Show Last 20 Lines |