1dnl SNTP subpackage configure.ac -*- Autoconf -*- 2dnl 3m4_include([m4/version.m4]) 4AC_PREREQ([2.68]) 5AC_INIT( 6 [sntp], 7 [VERSION_NUMBER], 8 [https://bugs.ntp.org/], 9 [], 10 [https://www.ntp.org/]dnl 11) 12AC_CONFIG_MACRO_DIR([m4]) 13AC_CONFIG_AUX_DIR([libevent/build-aux]) 14AC_LANG([C]) 15 16# Bump sntp_configure_cache_version for each change to configure.ac or 17# .m4 files which invalidates cached values from previous configure 18# runs. 19# 20# If the change affects cache variables used only by the main NTP 21# configure.ac, then only its version number should be bumped, while 22# the subdir configure.ac version numbers should be unchanged. The 23# same is true for a test/variable that is used only by one subdir 24# being changed incompatibly; only that subdir's cache version needs 25# bumping. 26# 27# If a change affects variables shared by all NTP configure scripts, 28# please bump the version numbers of each. If you are not sure, the 29# safe choice is to bump all on any cache-invalidating change. 30# 31# In order to avoid the risk of version stamp collision between -stable 32# and -dev branches, do not simply increment the version, instead use 33# the date YYYYMMDD optionally with -HHMM if there is more than one 34# bump in a day. 35 36sntp_configure_cache_version=20240218 37 38# When the version of config.cache and configure do not 39# match, NTP_CACHEVERSION will flush the cache. 40 41NTP_CACHEVERSION([sntp], [$sntp_configure_cache_version]) 42 43AM_INIT_AUTOMAKE([1.15 foreign subdir-objects -Wall -Wno-gnu]) 44 45AM_SILENT_RULES([yes]) 46 47AC_CANONICAL_BUILD 48AC_CANONICAL_HOST 49dnl the 'build' machine is where we run configure and compile 50dnl the 'host' machine is where the resulting stuff runs. 51AC_DEFINE_UNQUOTED([STR_SYSTEM], "$host", [canonical system (cpu-vendor-os) of where we should run]) 52AC_CONFIG_HEADER([config.h]) 53dnl AC_ARG_PROGRAM 54 55NTP_PROG_CC 56NTP_COMPILER 57NTP_HARDEN 58 59NTP_LOCINFO() 60 61AM_PROG_AR 62 63NTP_LIBNTP 64 65LT_INIT([disable-shared]) 66AC_SUBST([LIBTOOL_DEPS]) 67 68NTP_WITHSNTP 69 70case "$SNTP" in 71 '') 72 SNTP_DB= 73 SNTP_DL= 74 SNTP_DS= 75 ;; 76esac 77 78### 79 80# NTP has (so far) been relying on leading-edge autogen. 81# Therefore, by default: 82# - use the version we ship with 83# - do not install it 84# - build a static copy (disable-shared - done earlier) 85case "${enable_local_libopts+set}" in 86 set) ;; 87 *) enable_local_libopts=yes ;; 88esac 89case "${enable_libopts_install+set}" in 90 set) ;; 91 *) enable_libopts_install=no ;; 92esac 93enable_nls=no 94LIBOPTS_CHECK 95 96# From when we only used libevent for sntp: 97#AM_COND_IF( 98# [BUILD_SNTP], 99# [NTP_LIBEVENT_CHECK], 100# [NTP_LIBEVENT_CHECK_NOBUILD] 101#) 102 103NTP_LIBEVENT_CHECK([2]) 104 105# Checks for libraries. 106 107dnl NTP_LIBNTP checks for inet_XtoY 108dnl AC_SEARCH_LIBS([inet_pton], [nsl]) 109 110dnl AC_SEARCH_LIBS([openlog], [gen syslog]) 111LIB_SYSLOG='' 112AC_SUBST([LIB_SYSLOG]) 113HMS_SEARCH_LIBS([LIB_SYSLOG], [openlog], [gen syslog]) 114 115# Checks for header files. 116AC_CHECK_HEADERS([netdb.h string.h strings.h syslog.h]) 117NTP_SYSEXITS_H 118NTP_FACILITYNAMES 119 120# Checks for typedefs, structures, and compiler characteristics. 121AC_HEADER_STDBOOL 122 123NTP_IPV6 124 125### 126 127# Hacks 128# these need work if we're to move libntp under sntp 129AC_DEFINE([HAVE_NO_NICE], 1, [sntp does not care about 'nice']) 130AC_DEFINE([HAVE_TERMIOS], 1, [sntp does not care about TTY stuff]) 131 132# Checks for library functions. 133AC_CHECK_FUNCS([socket]) 134 135NTP_UNITYBUILD 136 137SNTP_PROBLEM_TESTS 138 139# All libraries should be in various LIB_* variables now. 140#LIBS= 141# Sadly not. There is a gettext() check somewhere, and on Solaris this pulls 142# in -lintl -lgen, outside our "scope". 143 144AC_CONFIG_FILES([Makefile]) 145AC_CONFIG_FILES([include/Makefile]) 146AC_CONFIG_FILES([scripts/Makefile]) 147AC_CONFIG_FILES([tests/Makefile]) 148AC_CONFIG_FILES([tests/fileHandlingTest.h]) 149AC_CONFIG_FILES([unity/Makefile]) 150 151AC_OUTPUT 152