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