@@ -507,13 +507,15 @@ AC_PROG_CXX([$CPP_COMPILER])
507
507
508
508
if test "x$enable_cpp" = "xyes"; then
509
509
AX_CXX_COMPILE_STDCXX ( 11 ,, mandatory )
510
+ AX_CXX_COMPILE_STDCXX ( 17 ,, optional )
510
511
elif test "x$enable_cpp" = "xauto"; then
511
512
AX_CXX_COMPILE_STDCXX ( 11 ,, optional )
512
513
if test "x$HAVE_CXX11" = "x1"; then
513
514
enable_cpp=yes
514
515
else
515
516
enable_cpp=no
516
517
fi
518
+ AX_CXX_COMPILE_STDCXX ( 17 ,, optional )
517
519
fi
518
520
519
521
dnl ***************************************************************************
@@ -646,6 +648,9 @@ dnl User supplied CFLAGS come last
646
648
CFLAGS="${CFLAGS_ADD} ${ac_cv_env_CFLAGS_value}"
647
649
CXXFLAGS="${CXXFLAGS_ADD} ${ac_cv_env_CXXFLAGS_value}"
648
650
651
+ TEST_NO_INSTALL_FLAG="-no-install"
652
+ AC_SUBST ( TEST_NO_INSTALL_FLAG )
653
+
649
654
AC_SYS_LARGEFILE
650
655
651
656
# FIXME: skip tests on unsupported platforms/architectures...
@@ -675,6 +680,7 @@ case "$ostype" in
675
680
;;
676
681
Darwin)
677
682
MODULE_LDFLAGS="-avoid-version -dylib"
683
+ TEST_NO_INSTALL_FLAG="-no-fast-install"
678
684
# This flag might be a security issue, do not use in production code, unfortunately we still need it for criterion tests and the current mocking solution
679
685
if test "x$enable_tests" = "xyes"; then
680
686
LDFLAGS="$LDFLAGS -Wl,-flat_namespace"
@@ -724,8 +730,10 @@ dnl Check for --whole-archive flag
724
730
dnl ***************************************************************************
725
731
726
732
if test $ostype = "Darwin"; then
733
+ # -all_load loads all members of static archive libraries, it can't be selectively disabled (do not use -noall_load)
734
+ # use -force_load for each static library if mixed linking needs to be supported on macOS
727
735
WHOLE_ARCHIVE_OPT="-all_load"
728
- NO_WHOLE_ARCHIVE_OPT="-noall_load "
736
+ NO_WHOLE_ARCHIVE_OPT=""
729
737
else
730
738
WHOLE_ARCHIVE_OPT="--whole-archive"
731
739
NO_WHOLE_ARCHIVE_OPT="--no-whole-archive"
@@ -1103,9 +1111,12 @@ if test "x$enable_geoip2" = "xyes" || test "x$enable_geoip2" = "xauto"; then
1103
1111
AC_MSG_RESULT ( [ yes (MAXMINDDB_LIBS set, will use that.)] )
1104
1112
with_maxminddb="yes"
1105
1113
else
1106
- AC_MSG_CHECKING ( [ for MAXMINDDB] )
1107
- AC_CHECK_LIB ( maxminddb , MMDB_open , MAXMINDDB_LIBS="-lmaxminddb"; with_maxminddb="yes" , with_maxminddb="no" )
1108
- AC_SUBST ( MAXMINDDB_LIBS )
1114
+ PKG_CHECK_MODULES(MAXMINDDB, libmaxminddb, [ with_maxminddb="yes"] , [ with_maxminddb="no"] )
1115
+ if test "x$with_maxminddb" = "xno"; then
1116
+ AC_MSG_CHECKING ( [ for MAXMINDDB] )
1117
+ AC_CHECK_LIB ( maxminddb , MMDB_open , MAXMINDDB_LIBS="-lmaxminddb"; with_maxminddb="yes" , with_maxminddb="no" )
1118
+ AC_SUBST ( MAXMINDDB_LIBS )
1119
+ fi
1109
1120
fi
1110
1121
1111
1122
if test "x$with_maxminddb" = "xno" && test "x$enable_geoip2" = "xyes"; then
1211
1222
1212
1223
if test -n "$LIBNET_CONFIG" -a -x "$LIBNET_CONFIG"; then
1213
1224
LIBNET_CFLAGS="`$LIBNET_CONFIG --defines`"
1225
+ LIBNET_CFLAGS="$LIBNET_CFLAGS `$LIBNET_CONFIG --cflags`"
1214
1226
LIBNET_LIBS="`$LIBNET_CONFIG --libs`"
1215
1227
AC_MSG_RESULT ( yes )
1216
1228
dnl libnet-config does not provide the _DEFAULT_SOURCE define, that can cause warning during build
0 commit comments