aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 45cd023bb1..3e508571e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,6 +108,12 @@ AC_ARG_ENABLE([lcov],
[use_lcov=yes],
[use_lcov=no])
+AC_ARG_ENABLE([glibc-back-compat],
+ [AS_HELP_STRING([--enable-glibc-back-compat],
+ [enable backwards compatibility with glibc and libstdc++])],
+ [use_glibc_compat=$enableval],
+ [use_glibc_compat=no])
+
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
@@ -319,6 +325,21 @@ fi
AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
+if test x$use_glibc_compat != xno; then
+
+ #__fdelt_chk's params and return type have changed from long unsigned int to long int.
+ # See which one is present here.
+ AC_MSG_CHECKING(__fdelt_chk type)
+ AC_TRY_COMPILE([#define __USE_FORTIFY_LEVEL 2
+ #include <sys/select.h>
+ extern "C" long unsigned int __fdelt_warn(long unsigned int);],[],
+ [ fdelt_type="long unsigned int"],
+ [ fdelt_type="long int"])
+ AC_MSG_RESULT($fdelt_type)
+ AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
+
+fi
+
if test x$use_hardening != xno; then
AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"])
@@ -691,6 +712,7 @@ AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
+AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])