diff options
Diffstat (limited to 'contrib/ntp/configure.ac')
-rw-r--r-- | contrib/ntp/configure.ac | 79 |
1 files changed, 77 insertions, 2 deletions
diff --git a/contrib/ntp/configure.ac b/contrib/ntp/configure.ac index dc5c7fcfd7035..de6043015b174 100644 --- a/contrib/ntp/configure.ac +++ b/contrib/ntp/configure.ac @@ -65,6 +65,7 @@ ntp_jupiter_ok=${ntp_jupiter_ok=no} NTP_PROG_CC AC_PROG_CPP +# Do we need CXX for anything besides google test? AC_PROG_CXX AC_PROG_YACC AC_PROG_CC_C_O @@ -180,6 +181,15 @@ case "$PROG_NET_SNMP_CONFIG" in esac AC_MSG_RESULT([$PATH_NET_SNMP_CONFIG]) +case "$PATH_NET_SNMP_CONFIG" in + /*) AC_CACHE_CHECK( + [for net-snmp version], + [ntp_cv_net_snmp_version], + [ntp_cv_net_snmp_version=`$PATH_NET_SNMP_CONFIG --version`] + ) + ;; +esac + case "$host" in *-*-vxworks*) ac_link="$ac_link $VX_KERNEL" @@ -291,7 +301,7 @@ AC_CHECK_HEADER( AC_CHECK_HEADERS([fcntl.h fnmatch.h ieeefp.h inttypes.h kvm.h math.h]) AC_CHECK_HEADERS([memory.h netdb.h poll.h]) -AC_CHECK_HEADERS([sgtty.h stdlib.h string.h termio.h]) +AC_CHECK_HEADERS([sgtty.h stdatomic.h stdlib.h string.h termio.h]) AC_CHECK_HEADERS([termios.h timepps.h timex.h unistd.h]) case "$host" in @@ -375,6 +385,28 @@ case "$host" in ;; esac +case "$ac_cv_header_stdatomic_h" in + yes) + AC_CHECK_FUNCS([atomic_thread_fence]) + AC_CACHE_CHECK( + [for atomic_thread_fence()], + [ntp_cv_func_atomic_thread_fence], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include <stdatomic.h> + ]], + [[ + atomic_thread_fence(memory_order_seq_cst); + ]] + )] + [ntp_cv_func_atomic_thread_fence=yes], + [ntp_cv_func_atomic_thread_fence=no] + )] + ) + ;; +esac + case "$host" in *-*-solaris2.6) # Broken... @@ -3426,6 +3458,9 @@ AC_CACHE_CHECK( *-sni-sysv*) ans=dosynctodr ;; + *-stratus-vos) + ans=no + ;; *-*-aix*) ans=dosynctodr ;; @@ -3480,6 +3515,9 @@ AC_CACHE_CHECK( *-sni-sysv*) ans=noprintf ;; + *-stratus-vos) + ans=no + ;; *-*-aix*) ans=noprintf ;; @@ -3873,6 +3911,11 @@ case "$ans" in case "$PATH_NET_SNMP_CONFIG" in /*) SNMP_LIBS=`$PATH_NET_SNMP_CONFIG --agent-libs` + # Bug 2815. This is a bit of a hack, but it works... + case "$ntp_cv_net_snmp_version" in + 5.3*) SNMP_LIBS=`echo $SNMP_LIBS | $SED -e 's/-lnetsnmpagent/-lnetsnmpagent -lnetsnmpmibs/'` + ;; + esac AC_SUBST([SNMP_LIBS]) # HMS: we really want to separate CPPFLAGS and CFLAGS foo=`$PATH_NET_SNMP_CONFIG --cflags` @@ -3986,6 +4029,9 @@ case "$host" in *-sni-sysv*) ans=yes ;; + *-stratus-vos) + ans=no + ;; *-univel-sysv*) ans=no ;; @@ -4306,6 +4352,31 @@ esac AM_CONDITIONAL([SAVECONFIG_ENABLED], [test x$ntp_saveconfig_enabled = x1]) AC_MSG_RESULT([$ntp_ok]) +### + +AC_MSG_CHECKING([if we want the experimental leap smear code]) +AC_ARG_ENABLE( + [leap-smear], + [AS_HELP_STRING( + [--enable-leap-smear], + [- experimental leap smear code] + )], + [ntp_ok=$enableval], + [ntp_ok=no] +) +ntp_leap_smear_enabled=0 +case "$ntp_ok" in + yes) + ntp_leap_smear_enabled=1 + AC_DEFINE([LEAP_SMEAR], [1], [leap smear mechanism]) + AC_SUBST([HAVE_LEAPSMEARINTERVAL]) + HAVE_LEAPSMEARINTERVAL="leapsmearinterval 0" + ;; +esac +AC_MSG_RESULT([$ntp_ok]) + +NTP_UNITYBUILD + dnl gtest is needed for our tests subdirs. It would be nice if we could dnl require a C++ compiler only if we will use gtest, but AC_PROG_CXX dnl can't be conditionalized. @@ -4326,7 +4397,7 @@ AC_CONFIG_FILES([kernel/sys/Makefile]) AC_CONFIG_FILES([libntp/Makefile]) AC_CONFIG_FILES([libparse/Makefile]) AC_CONFIG_FILES([ntpd/Makefile]) -AC_CONFIG_FILES([ntpd/complete.conf], [sed -e '/^rlimit$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf]) +AC_CONFIG_FILES([ntpd/complete.conf], [sed -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf]) AC_CONFIG_FILES([ntpdate/Makefile]) AC_CONFIG_FILES([ntpdc/Makefile]) AC_CONFIG_FILES([ntpdc/nl.pl], [chmod +x ntpdc/nl.pl]) @@ -4349,9 +4420,13 @@ AC_CONFIG_FILES([scripts/ntpver], [chmod +x scripts/ntpver]) AC_CONFIG_FILES([scripts/plot_summary], [chmod +x scripts/plot_summary]) AC_CONFIG_FILES([scripts/summary], [chmod +x scripts/summary]) AC_CONFIG_FILES([scripts/update-leap/Makefile]) +AC_CONFIG_FILES([scripts/update-leap/update-leap], [chmod +x scripts/update-leap/update-leap]) AC_CONFIG_FILES([tests/Makefile]) +AC_CONFIG_FILES([tests/bug-2803/Makefile]) AC_CONFIG_FILES([tests/libntp/Makefile]) AC_CONFIG_FILES([tests/ntpd/Makefile]) +AC_CONFIG_FILES([tests/sandbox/Makefile]) +AC_CONFIG_FILES([tests/sec-2853/Makefile]) AC_CONFIG_FILES([util/Makefile]) perllibdir="${datadir}/ntp/lib" |