2 dnl Process this file with autoconf to produce a configure script.
3 m4_include([version.m4])
5 AC_INIT([ntp], [VERSION_NUMBER])
6 AC_CONFIG_MACRO_DIR([m4])
9 # Increment ntp_configure_cache_version by one for each change to
10 # configure.ac or .m4 files which invalidates cached values from
13 # If the change affects cache variables used only by the main NTP
14 # configure.ac, then only its version number should be bumped, while
15 # the subdir configure.ac version numbers should be unchanged. The
16 # same is true for a test/variable that is used only by one subdir
17 # being changed incompatibly; only that subdir's cache version needs
20 # If a change affects variables shared by all NTP configure scripts,
21 # please bump the version numbers of all three. If you are not sure,
22 # the safe choice is to bump all three on any cache-invalidating change.
24 # In order to avoid the risk of version stamp collision between -stable
25 # and -dev branches, do not simply increment the version, instead use
26 # the date YYYYMMDD optionally with -HHMM if there is more than one
29 ntp_configure_cache_version=20091117
31 # When the cache version of config.cache and configure do not
32 # match, NTP_CACHEVERSION will flush the cache.
34 NTP_CACHEVERSION([main], [$ntp_configure_cache_version])
39 dnl the 'build' machine is where we run configure and compile
40 dnl the 'host' machine is where the resulting stuff runs.
41 AC_DEFINE_UNQUOTED([STR_SYSTEM], ["$host"],
42 [canonical system (cpu-vendor-os) of where we should run])
43 AM_CONFIG_HEADER([config.h])
46 ntp_atom_ok=${ntp_atom_ok=no}
47 ntp_oncore_ok=${ntp_oncore_ok=no}
48 ntp_parse_ok=${ntp_parse_ok=no}
49 ntp_ripe_ncc_ok=${ntp_parse_ok=no}
50 ntp_jupiter_ok=${ntp_jupiter_ok=no}
52 dnl check these early to avoid autoconf warnings
56 # So far, the only shared library we might use is libopts.
57 # It's a small library - we might as well use a static version of it.
60 dnl we need to check for cross compile tools for vxWorks here
62 # Ralf Wildenhues: With per-target flags we need CC_C_O
63 # AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
68 # AC_PROG_CC_STDC has two functions. It attempts to find a compiler
69 # capable of C99, or failing that, for C89. CC is set afterward with
70 # the selected invocation, such as "gcc --std=gnu99". Also, the
71 # ac_cv_prog_cc_stdc variable is no if the compiler selected for CC
72 # does not accept C89.
76 case "$ac_cv_prog_cc_stdc" in
78 AC_MSG_WARN([ANSI C89/ISO C90 is the minimum to compile NTP ]
79 [version 4.2.5 and higher.])
82 # HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
85 CFLAGS="$CFLAGS -DSYS_CYGWIN32"
90 CFLAGS="$CFLAGS -Wc,+abi-socket"
95 CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
96 LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
100 # see "man standards".
101 # -D_XOPEN_SOURCE=500 is probably OK for c89 and before
102 # -D_XOPEN_SOURCE=600 seems OK for c99
103 #CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
104 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
113 # NTP has (so far) been relying on leading-edge autogen.
114 # Therefore, by default:
115 # - use the version we ship with
116 # - do not install it
117 # - build a static copy (AC_DISABLE_SHARED - done earlier)
118 case "${enable_local_libopts+set}" in
120 *) enable_local_libopts=yes ;;
122 case "${enable_libopts_install+set}" in
124 *) enable_libopts_install=no ;;
126 LIBOPTS_CHECK_NOBUILD([sntp/libopts])
131 [if $CC can handle @%:@warning],
132 [ntp_cv_cpp_warning],
134 [AC_LANG_PROGRAM([[]], [[#warning foo]])],
135 [ntp_cv_cpp_warning=yes],
136 [ntp_cv_cpp_warning=no]
139 case "$ntp_cv_cpp_warning" in
141 AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1],
142 [Should we avoid @%:@warning on option name collisions?])
147 SAVED_CFLAGS_NTP="$CFLAGS"
148 CFLAGS="$CFLAGS -Wstrict-overflow"
150 [if $CC can handle -Wstrict-overflow],
151 [ntp_cv_gcc_Wstrict_overflow],
153 [AC_LANG_PROGRAM([[]], [[]])],
154 [ntp_cv_gcc_Wstrict_overflow=yes],
155 [ntp_cv_gcc_Wstrict_overflow=no]
159 # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
162 CFLAGS="$SAVED_CFLAGS_NTP -Winit-self"
164 [if $CC can handle -Winit-self],
165 [ntp_cv_gcc_Winit_self],
168 [AC_LANG_PROGRAM([[]], [[]])],
169 [ntp_cv_gcc_Winit_self=yes],
170 [ntp_cv_gcc_Winit_self=no]
174 CFLAGS="$SAVED_CFLAGS_NTP"
175 AS_UNSET([SAVED_CFLAGS_NTP])
177 # $ntp_cv_gcc_Winit_self is tested later to add the
182 # Expose a cross-compilation indicator to makefiles
183 AM_CONDITIONAL([NTP_CROSSCOMPILE], [test $build != $host])
185 AC_MSG_CHECKING([for bin subdirectory])
192 [use_binsubdir="$withval"],
193 [use_binsubdir="bin"]
195 case "$use_binsubdir" in
201 AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
204 AC_MSG_RESULT([$use_binsubdir])
206 BINSUBDIR=$use_binsubdir
207 AC_SUBST([BINSUBDIR])
208 AM_CONDITIONAL([NTP_BINSUBDIR_IS_BIN], [test "bin" = "$BINSUBDIR"])
210 AC_MSG_CHECKING([for deprecated --with-arlib])
212 AS_HELP_STRING([--with-arlib], [- deprecated, arlib not distributed]),
213 [ans=$withval], [ans=no])
214 AC_MSG_RESULT([$ans])
218 AC_MSG_WARN([Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized.])
222 AS_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]),
223 [ans=$withval], [ans=x])
232 # HMS: Why isn't this $build?
233 # Well, that depends on if we need this for the build toolchain or
234 # for info in the host executable...
235 # I still have no idea which way this should go, but nobody has complained.
238 case "$need_dash_r" in
245 case "$need_dash_r" in
253 dnl we need to check for cross compile tools for vxWorks here
261 CFLAGS="$CFLAGS -Wall"
262 # CFLAGS="$CFLAGS -Wcast-align"
263 CFLAGS="$CFLAGS -Wcast-qual"
264 # CFLAGS="$CFLAGS -Wconversion"
265 # CFLAGS="$CFLAGS -Werror"
266 # CFLAGS="$CFLAGS -Wextra"
267 # CFLAGS="$CFLAGS -Wfloat-equal"
268 CFLAGS="$CFLAGS -Wmissing-prototypes"
269 CFLAGS="$CFLAGS -Wpointer-arith"
270 CFLAGS="$CFLAGS -Wshadow"
271 # CFLAGS="$CFLAGS -Wtraditional"
272 # CFLAGS="$CFLAGS -Wwrite-strings"
273 case "$ntp_cv_gcc_Winit_self" in
275 CFLAGS="$CFLAGS -Winit-self"
277 case "$ntp_cv_gcc_Wstrict_overflow" in
279 CFLAGS="$CFLAGS -Wstrict-overflow"
281 # -W[no-]strict-prototypes is added later depending on OpenSSL
284 ac_busted_vpath_in_make=no
287 *-*-irix6.1*) # 64 bit only
290 *-*-irix6*) # 6.2 (and later?)
291 ac_busted_vpath_in_make=yes
294 ac_busted_vpath_in_make=yes
297 ac_busted_vpath_in_make=yes
301 case "$ac_busted_vpath_in_make$srcdir" in
304 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
306 AC_MSG_ERROR([building outside of the main directory requires GNU make])
319 AC_PROG_GCC_TRADITIONAL
323 AC_PATH_PROG([PATH_PERL], [perl])
324 AC_PATH_PROG([PATH_SH], [sh])
325 AC_PATH_PROG([PATH_TEST], [test])
330 [--with-net-snmp-config],
345 AC_MSG_ERROR([--with-net-snmp-config takes either a name or an absolute path])
350 PROG_NET_SNMP_CONFIG=$ans
351 AC_MSG_CHECKING([for net-snmp-config path])
352 case "$PROG_NET_SNMP_CONFIG" in
355 PATH_NET_SNMP_CONFIG=$PROG_NET_SNMP_CONFIG
358 AC_PATH_PROG([PATH_NET_SNMP_CONFIG], [$PROG_NET_SNMP_CONFIG])
361 AC_MSG_RESULT([$PATH_NET_SNMP_CONFIG])
365 ac_link="$ac_link $VX_KERNEL"
371 AC_CHECK_FUNC([gethostent], ,
372 AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket]))
373 AC_CHECK_FUNC([openlog], ,
374 AC_SEARCH_LIBS([openlog], [gen], ,
375 AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])))
376 AC_SEARCH_LIBS([MD5Init], [md5 md])
377 AC_CHECK_FUNCS(MD5Init)
381 dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
382 dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
383 dnl so only use one of them. Linux (glibc-2.1.2 and -2.2.2, at least)
384 dnl does Strange Things with extra processes using the Posix-compatibility
385 dnl real-time library, so we don't want to use it.
387 dnl 081118 Harlan got tired of looking for a way to get the sched*()
388 dnl functions to link OK with either cc or gcc.
395 AC_CHECK_LIB([rt], [sched_setscheduler], [],
396 [AC_CHECK_LIB([posix4], [sched_setscheduler])])
400 AC_SEARCH_LIBS([setsockopt], [socket xnet])
401 AC_SEARCH_LIBS([res_init], [resolv], [], [], [-lsocket -lnsl])
404 AC_CHECK_LIB([resolv],[res_9_init])
408 AC_CHECK_FUNCS([res_init __res_init])
411 AC_CHECK_HEADERS([bstring.h])
416 [DNSServiceRegister],
417 [AC_DEFINE([HAVE_DNSREGISTRATION], [1],
418 [Use Rendezvous/DNS-SD registration])]
421 case "$ac_cv_lib_dns_sd_DNSServiceRegister" in
423 LIBS="-ldns_sd $LIBS"
425 AC_CHECK_HEADERS([errno.h fcntl.h ieeefp.h kvm.h math.h])
432 #ifdef HAVE_SYS_TYPES_H
433 # include <sys/types.h>
437 AC_CHECK_HEADERS([memory.h netdb.h poll.h])
438 AC_CHECK_HEADERS([sgtty.h stdlib.h string.h termio.h])
439 AC_CHECK_HEADERS([termios.h timepps.h timex.h unistd.h])
443 AC_CHECK_HEADERS([utmpx.h])
444 case "$ac_cv_header_utmpx_h" in
448 AC_CHECK_HEADERS([utmp.h])
453 AC_CHECK_HEADERS([utmp.h utmpx.h])
458 # On Suns only (so far) getpass() truncates the typed password to 8
459 # characters, but getpassphrase() allows up to 257. Most systems'
460 # getpass() does not truncate, at least not so as to affect ntpq and
461 # ntpdc password prompts.
463 # So check for getpassphrase(), but only on Sun operating systems.
466 *-*-sunos*|*-*-solaris*)
467 AC_CHECK_FUNCS([getpassphrase])
470 AC_CHECK_HEADERS([arpa/nameser.h])
471 AC_CHECK_HEADERS([sys/socket.h])
473 dnl HP-UX 11.31 on HPPA has a net/if.h that can't be compiled with gcc4
474 dnl due to an incomplete type (a union) mpinfou used in an array. gcc3
475 dnl compiles it without complaint. The mpinfou union is defined later
476 dnl in the resulting preprocessed source than the spu_info array in
477 dnl /usr/include/machine/sys/getppdp.h:
478 dnl extern union mpinfou spu_info[];
479 dnl triggering the error. Our strategy is on HP-UX only, test for
480 dnl net/netmp.h, which is the file included by net/if.h that leads to
481 dnl getppdp.h. If it is present but can't be compiled, try adding
482 dnl a duplicate definition of mpinfou, which should then allow the
483 dnl following net/if.h and net/if6.h tests to proceed normally.
484 dnl Using net/netmp.h allows us to avoid polluting test results for
494 case "$netmp_h_works" in
496 cat >>confdefs.h <<_ACEOF
497 #ifndef MPINFOU_PREDECLARED
498 # define MPINFOU_PREDECLARED
499 typedef union mpinfou { /* For lint */
500 struct pdk_mpinfo *pdkptr;
501 struct mpinfo *pikptr;
506 #ifndef MPINFOU_PREDECLARED
507 # define MPINFOU_PREDECLARED
508 typedef union mpinfou { /* For lint */
509 struct pdk_mpinfo *pdkptr;
510 struct mpinfo *pikptr;
521 AC_CHECK_HEADERS([linux/if_addr.h], [], [], [
522 #ifdef HAVE_SYS_SOCKET_H
523 # include <sys/socket.h>
528 AC_CHECK_HEADERS([net/if.h], [], [],
529 [#ifdef HAVE_SYS_SOCKET_H
530 #include <sys/socket.h>
533 AC_CHECK_HEADERS([net/if6.h])
534 AC_CHECK_HEADERS([net/route.h], [], [], [
535 #include <sys/types.h>
536 #include <sys/socket.h>
539 AC_CHECK_HEADERS([netinet/in_system.h netinet/in_systm.h netinet/in.h])
540 AC_CHECK_HEADERS([net/if_var.h], [], [],
541 [#if HAVE_SYS_TYPES_H
542 #include <sys/types.h>
544 #ifdef HAVE_SYS_SOCKET_H
545 #include <sys/socket.h>
547 #ifdef HAVE_NETINET_IN_H
548 #include <netinet/in.h>
554 AC_CHECK_HEADERS([netinet/ip.h netinet/in_var.h], [], [],
555 [#ifdef HAVE_SYS_TYPES_H
556 #include <sys/types.h>
558 #ifdef HAVE_SYS_SOCKET_H
559 #include <sys/socket.h>
564 #ifdef HAVE_NETINET_IN_H
565 #include <netinet/in.h>
567 #ifdef HAVE_NET_IF_VAR_H
568 #include <net/if_var.h>
570 #ifdef HAVE_NETINET_IN_SYSTM_H
571 #include <netinet/in_systm.h>
575 # Check for IPTOS_PREC
577 [IPPROTO_IP IP_TOS IPTOS_LOWDELAY],
582 #ifdef HAVE_SYS_TYPES_H
583 # include <sys/types.h>
585 #ifdef HAVE_NETINET_IP_H
586 # include <netinet/in.h>
587 # include <netinet/ip.h>
589 #if defined(IPPROTO_IP) && defined(IP_TOS) && defined(IPTOS_LOWDELAY)
597 case "$ntp_cv_ip_tos" in
599 AC_DEFINE([HAVE_IPTOS_SUPPORT], [1], [Do we have IPTOS support?])
602 AC_CHECK_HEADERS([netinfo/ni.h])
603 case "$ac_cv_header_netinfo_ni_h" in
605 AC_DEFINE([HAVE_NETINFO], [1], [NetInfo support?])
607 AC_CHECK_HEADERS([sun/audioio.h sys/audioio.h])
608 dnl AC_CHECK_HEADERS([sys/chudefs.h])
609 AC_CHECK_HEADERS([sys/clkdefs.h sys/file.h])
614 AC_CHECK_HEADERS([sys/ioctl.h])
617 AC_CHECK_HEADERS([sys/ipc.h sys/lock.h sys/mman.h])
618 AC_CHECK_HEADERS([sys/modem.h sys/param.h sys/ppsclock.h])
619 # HMS: Check sys/proc.h and sys/resource.h after some others
620 AC_CHECK_HEADERS([sys/ppstime.h sched.h])
621 case "$ac_cv_header_sched_h" in
625 AC_CHECK_HEADERS([sys/sched.h])
630 AC_CHECK_HEADERS([sys/sio.h])
633 # HMS: Check sys/shm.h after some others
634 AC_CHECK_HEADERS([sys/select.h sys/signal.h sys/sockio.h])
635 # HMS: Checked sys/socket.h earlier
640 AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h])
643 AC_CHECK_HEADERS([sys/stat.h sys/stream.h sys/stropts.h])
644 # sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
645 AC_CHECK_HEADERS([sys/sysctl.h], [], [],
646 [#if defined HAVE_SYS_PARAM_H
647 # include <sys/param.h>
649 AC_CHECK_HEADERS([sys/syssgi.h sys/systune.h])
650 AC_CHECK_HEADERS([sys/termios.h sys/time.h sys/signal.h])
654 #ifdef HAVE_SYS_TIME_H
655 # include <sys/time.h>
660 #include <sys/timepps.h>
661 #ifdef PPS_API_VERS_1
670 #ifdef HAVE_SYS_TIME_H
671 # include <sys/time.h>
679 AC_CHECK_HEADERS([sys/timers.h sys/tpro.h sys/types.h sys/wait.h])
683 AC_CHECK_HEADERS([/sys/sync/queue.h /sys/sync/sema.h])
686 AC_CHECK_HEADERS([machine/inline.h sys/pcl720.h sys/i8253.h])
692 AC_CHECK_FUNCS([__adjtimex __ntp_gettime])
695 case "$ac_cv_func___adjtimex" in
699 AC_CHECK_LIB([elf], [nlist]) dnl Only needed for tickadj...
700 dnl AC_CHECK_LIB(kvm, main, , , -lelf)
701 AC_CHECK_LIB([kvm], [main]) dnl We already know about -lelf here...
702 AC_CHECK_LIB([ld], [nlist])
703 AC_CHECK_LIB([mld], [nlist])
704 AC_CHECK_HEADERS([nlist.h sys/var.h])
705 case "$ac_cv_header_nlist_h" in
707 AC_DEFINE([NLIST_STRUCT], [1], [nlist stuff])
710 [for n_un in struct nlist],
711 [ntp_cv_struct_nlist_n_un],
722 [ntp_cv_struct_nlist_n_un=yes],
723 [ntp_cv_struct_nlist_n_un=no]
726 case "$ntp_cv_struct_nlist_n_un" in
728 AC_DEFINE([NLIST_NAME_UNION], [1],
729 [does struct nlist use a name union?])
734 AC_CHECK_HEADERS([sys/proc.h], [], [],
735 [#ifdef HAVE_SYS_TYPES_H
736 # include <sys/types.h>
738 #ifdef HAVE_SYS_TIME_H
739 # include <sys/time.h>
743 AC_CHECK_HEADERS([sys/resource.h], [], [],
744 [#ifdef HAVE_SYS_TIME_H
745 # include <sys/time.h>
749 AC_CHECK_HEADERS([sys/shm.h], [], [],
750 [#ifdef HAVE_SYS_TYPES_H
751 # include <sys/types.h>
753 #ifdef HAVE_SYS_IPC_H
754 # include <sys/ipc.h>
758 AC_CHECK_HEADERS([sys/timex.h], [], [],
760 # include <sys/time.h>
764 AC_CHECK_HEADERS([resolv.h], [], [],
765 [#ifdef HAVE_SYS_TYPES_H
766 #include <sys/types.h>
768 #ifdef HAVE_NETINET_IN_H
769 #include <netinet/in.h>
771 #ifdef HAVE_ARPA_NAMESER_H
772 #include <arpa/nameser.h>
777 [for basic volatile support],
787 [ntp_cv_c_volatile=yes],
788 [ntp_cv_c_volatile=no]
791 case "$ntp_cv_c_volatile" in
795 AC_DEFINE([volatile], [], [define away volatile?])
804 AC_CHECK_TYPES([time_t, long, uintptr_t])
805 AC_CHECK_SIZEOF([time_t])
807 AH_VERBATIM([TYPEDEF_UINTPTR_T],
808 [/* Provide a typedef for uintptr_t? */
809 #ifndef HAVE_UINTPTR_T
810 typedef unsigned int uintptr_t;
811 #define HAVE_UINTPTR_T 1
818 [ntp_cv_type_u_int8_t],
822 #ifdef HAVE_SYS_TYPES_H
823 # include <sys/types.h>
830 [ntp_cv_type_u_int8_t=yes],
831 [ntp_cv_type_u_int8_t=no]
834 case "$ntp_cv_type_u_int8_t" in
836 AC_DEFINE([HAVE_TYPE_U_INT8_T], [1], [Does u_int8_t exist?])
841 [ntp_cv_type_u_int64_t],
845 #ifdef HAVE_SYS_TYPES_H
846 # include <sys/types.h>
853 [ntp_cv_type_u_int64_t=yes],
854 [ntp_cv_type_u_int64_t=no]
857 case "$ntp_cv_type_u_int64_t" in
859 AC_DEFINE([HAVE_TYPE_U_INT64_T], [1], [Does u_int64_t exist?])
863 [for a fallback value for HZ],
866 ntp_cv_default_hz=100
868 alpha*-dec-osf4*|alpha*-dec-osf5*)
869 ntp_cv_default_hz=1024
872 ntp_cv_default_hz=256
877 AC_DEFINE_UNQUOTED([DEFAULT_HZ], [$ntp_cv_default_hz],
878 [What is the fallback value for HZ?])
881 [if we need to override the system's value for HZ],
882 [ntp_cv_override_hz],
884 ntp_cv_override_hz=no
886 alpha*-dec-osf4*|alpha*-dec-osf5*)
887 ntp_cv_override_hz=yes
890 ntp_cv_override_hz=yes
893 ntp_cv_override_hz=yes
896 ntp_cv_override_hz=yes
899 ntp_cv_override_hz=yes
904 case "$ntp_cv_override_hz" in
906 AC_DEFINE([OVERRIDE_HZ], [1],
907 [Do we need to override the system's idea of HZ?])
910 dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
911 dnl [AC_TRY_LINK([#include <sys/types.h>
912 dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;],
913 dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)])
914 dnl if test $su_cv_func_ut_host_in_utmp = yes; then
915 dnl AC_DEFINE(HAVE_UT_HOST)
918 dnl AC_MSG_CHECKING(if we can get the system boot time)
919 dnl AC_CACHE_VAL(su_cv_have_boot_time,
920 dnl [AC_EGREP_CPP(yes,
921 dnl [#ifdef HAVE_UTMPX_H
922 dnl #include <utmpx.h>
924 dnl #include <utmp.h>
929 dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)])
930 dnl AC_MSG_RESULT($su_cv_have_boot_time)
933 [for struct rt_msghdr],
934 [ntp_cv_struct_rt_msghdr],
938 #include <sys/types.h>
939 #include <sys/socket.h>
941 #include <net/route.h>
947 [ntp_cv_struct_rt_msghdr=yes],
948 [ntp_cv_struct_rt_msghdr=no]
959 #include <sys/socket.h>
960 #include <linux/rtnetlink.h>
971 case "$ntp_cv_struct_rt_msghdr$ntp_cv_rtattr" in
973 AC_DEFINE([HAS_ROUTING_SOCKET], [1],
974 [Do we have a routing socket (rt_msghdr or rtattr)?])
975 case "$ntp_cv_rtattr" in
977 AC_DEFINE([HAVE_RTNETLINK], [1],
978 [Do we have Linux routing socket?])
983 [struct sigaction for sa_sigaction],
984 [ntp_cv_struct_sigaction_has_sa_sigaction],
991 struct sigaction act;
992 act.sa_sigaction = 0;
995 [ntp_cv_struct_sigaction_has_sa_sigaction=yes],
996 [ntp_cv_struct_sigaction_has_sa_sigaction=no]
999 case "$ntp_cv_struct_sigaction_has_sa_sigaction" in
1001 AC_DEFINE([HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION], [1], [Obvious])
1005 [for struct ppsclockev],
1006 [ntp_cv_struct_ppsclockev],
1010 #ifdef HAVE_SYS_TYPES_H
1011 # include <sys/types.h>
1013 #ifdef HAVE_SYS_TERMIOS_H
1014 # include <sys/termios.h>
1016 #ifdef HAVE_SYS_TIME_H
1017 # include <sys/time.h>
1019 #ifdef HAVE_SYS_PPSCLOCK_H
1020 # include <sys/ppsclock.h>
1024 extern struct ppsclockev *pce;
1028 [ntp_cv_struct_ppsclockev=yes],
1029 [ntp_cv_struct_ppsclockev=no]
1032 case "$ntp_cv_struct_ppsclockev" in
1034 AC_DEFINE([HAVE_STRUCT_PPSCLOCKEV], [1],
1035 [Does a system header define struct ppsclockev?])
1039 [for struct sockaddr_storage],
1040 [ntp_cv_sockaddr_storage],
1044 #ifdef HAVE_SYS_TYPES_H
1045 # include <sys/types.h>
1047 #ifdef HAVE_SYS_SOCKET_H
1048 # include <sys/socket.h>
1050 #ifdef HAVE_NETINET_IN_H
1051 # include <netinet/in.h>
1055 struct sockaddr_storage n;
1058 [ntp_cv_sockaddr_storage=yes],
1059 [ntp_cv_sockaddr_storage=no]
1062 case "$ntp_cv_sockaddr_storage" in
1064 AC_DEFINE([HAVE_STRUCT_SOCKADDR_STORAGE], [1],
1065 [Does a system header define struct sockaddr_storage?])
1069 [for sockaddr_storage.ss_family],
1070 [ntp_cv_have_ss_family],
1074 #ifdef HAVE_SYS_TYPES_H
1075 # include <sys/types.h>
1077 #ifdef HAVE_SYS_SOCKET_H
1078 # include <sys/socket.h>
1080 #ifdef HAVE_NETINET_IN_H
1081 # include <netinet/in.h>
1085 struct sockaddr_storage s;
1089 [ntp_cv_have_ss_family=yes],
1090 [ntp_cv_have_ss_family=no]
1094 case "$ntp_cv_have_ss_family" in
1097 [for sockaddr_storage.__ss_family],
1098 [ntp_cv_have___ss_family],
1102 #ifdef HAVE_SYS_TYPES_H
1103 # include <sys/types.h>
1105 #ifdef HAVE_SYS_SOCKET_H
1106 # include <sys/socket.h>
1108 #ifdef HAVE_NETINET_IN_H
1109 # include <netinet/in.h>
1113 struct sockaddr_storage s;
1117 [ntp_cv_have___ss_family=yes],
1118 [ntp_cv_have___ss_family=no]
1121 case "$ntp_cv_have___ss_family" in
1123 AC_DEFINE([HAVE___SS_FAMILY_IN_SS], [1],
1124 [Does struct sockaddr_storage have __ss_family?])
1129 [HAVE___SS_FAMILY_IN_SS_VERBATIM],
1131 /* Handle sockaddr_storage.__ss_family */
1132 #ifdef HAVE___SS_FAMILY_IN_SS
1133 # define ss_family __ss_family
1134 #endif /* HAVE___SS_FAMILY_IN_SS */
1139 [for sockaddr_storage.ss_len],
1140 [ntp_cv_have_ss_len],
1144 #ifdef HAVE_SYS_TYPES_H
1145 # include <sys/types.h>
1147 #ifdef HAVE_SYS_SOCKET_H
1148 # include <sys/socket.h>
1150 #ifdef HAVE_NETINET_IN_H
1151 # include <netinet/in.h>
1155 struct sockaddr_storage s;
1159 [ntp_cv_have_ss_len=yes],
1160 [ntp_cv_have_ss_len=no]
1164 case "$ntp_cv_have_ss_len" in
1167 [for sockaddr_storage.__ss_len],
1168 [ntp_cv_have___ss_len],
1172 #ifdef HAVE_SYS_TYPES_H
1173 # include <sys/types.h>
1175 #ifdef HAVE_SYS_SOCKET_H
1176 # include <sys/socket.h>
1178 #ifdef HAVE_NETINET_IN_H
1179 # include <netinet/in.h>
1183 struct sockaddr_storage s;
1187 [ntp_cv_have___ss_len=yes],
1188 [ntp_cv_have___ss_len=no]
1191 case "$ntp_cv_have___ss_len" in
1193 AC_DEFINE([HAVE___SS_LEN_IN_SS], [1],
1194 [Does struct sockaddr_storage have __ss_len?])
1199 [HAVE___SS_LEN_IN_SS_VERBATIM],
1201 /* Handle sockaddr_storage.__ss_len */
1202 #ifdef HAVE___SS_LEN_IN_SS
1203 # define ss_len __ss_len
1204 #endif /* HAVE___SS_LEN_IN_SS */
1209 # Look for in_port_t.
1213 [isc_cv_have_in_port_t],
1217 #include <sys/types.h>
1218 #include <netinet/in.h>
1221 in_port_t port = 25;
1225 [isc_cv_have_in_port_t=yes],
1226 [isc_cv_have_in_port_t=no]
1229 case "$isc_cv_have_in_port_t" in
1231 AC_DEFINE([ISC_PLATFORM_NEEDPORTT], [1],
1232 [Declare in_port_t?])
1235 case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
1238 [for struct snd_size],
1239 [ntp_cv_struct_snd_size],
1243 #ifdef HAVE_MACHINE_SOUNDCARD_H
1244 # include <machine/soundcard.h>
1246 #ifdef HAVE_SYS_SOUNDCARD_H
1247 # include <sys/soundcard.h>
1251 extern struct snd_size *ss;
1252 return ss->rec_size;
1255 [ntp_cv_struct_snd_size=yes],
1256 [ntp_cv_struct_snd_size=no]
1259 case "$ntp_cv_struct_snd_size" in
1261 AC_DEFINE([HAVE_STRUCT_SND_SIZE], [1],
1262 [Do we have struct snd_size?])
1267 [struct clockinfo for hz],
1268 [ntp_cv_struct_clockinfo_has_hz],
1272 #include <sys/time.h>
1275 extern struct clockinfo *pc;
1279 [ntp_cv_struct_clockinfo_has_hz=yes],
1280 [ntp_cv_struct_clockinfo_has_hz=no]
1283 case "$ntp_cv_struct_clockinfo_has_hz" in
1285 AC_DEFINE([HAVE_HZ_IN_STRUCT_CLOCKINFO], [1], [Obvious])
1289 [struct clockinfo for tickadj],
1290 [ntp_cv_struct_clockinfo_has_hz],
1294 #include <sys/time.h>
1297 extern struct clockinfo *pc;
1301 [ntp_cv_struct_clockinfo_has_hz=yes],
1302 [ntp_cv_struct_clockinfo_has_hz=no]
1305 case "$ntp_cv_struct_clockinfo_has_hz" in
1307 AC_DEFINE([HAVE_TICKADJ_IN_STRUCT_CLOCKINFO], [1], [Obvious])
1311 [for struct timespec],
1312 [ntp_cv_struct_timespec],
1316 #include <sys/time.h>
1317 /* Under SunOS, timespec is in sys/timepps.h,
1318 which needs errno.h and FRAC */
1322 #ifdef HAVE_SYS_TIMEPPS_H
1323 # define FRAC 4294967296
1324 # include <sys/timepps.h>
1331 [ntp_cv_struct_timespec=yes],
1332 [ntp_cv_struct_timespec=no]
1335 case "$ntp_cv_struct_timespec" in
1337 AC_DEFINE([HAVE_STRUCT_TIMESPEC], [1], [struct timespec declared?])
1341 [for struct ntptimeval],
1342 [ntp_cv_struct_ntptimeval],
1346 #include <sys/time.h>
1347 #include <sys/timex.h>
1350 struct ntptimeval n;
1353 [ntp_cv_struct_ntptimeval=yes],
1354 [ntp_cv_struct_ntptimeval=no]
1357 case "$ntp_cv_struct_ntptimeval" in
1359 AC_DEFINE([HAVE_STRUCT_NTPTIMEVAL], [1],
1360 [Do we have struct ntptimeval?])
1364 [struct ntptimeval.time.tv_nsec],
1368 #ifdef HAVE_SYS_TIME_H
1369 #include <sys/time.h>
1375 #ifdef HAVE_SYS_TIMEX_H
1376 # include <sys/timex.h>
1378 # ifdef HAVE_TIMEX_H
1387 case "$ac_cv_c_inline" in
1391 AC_DEFINE([HAVE_INLINE], [1], [inline keyword or macro available])
1392 AC_SUBST([HAVE_INLINE])
1395 AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
1396 AC_CHECK_SIZEOF([signed char])
1397 AC_CHECK_TYPES([s_char])
1398 AC_CHECK_SIZEOF([int])
1399 AC_CHECK_SIZEOF([long])
1401 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
1403 # We have a typedef for s_char. Might as well believe it...
1406 # We have signed chars, can't say 'signed char', no s_char typedef.
1407 AC_DEFINE([NEED_S_CHAR_TYPEDEF], [1],
1408 [Do we need an s_char typedef?])
1411 # We have signed chars, can say 'signed char', no s_char typedef.
1412 AC_DEFINE([NEED_S_CHAR_TYPEDEF], [1],
1413 [Do we need an s_char typedef?])
1416 # We have unsigned chars, can't say 'signed char', no s_char typedef.
1417 AC_MSG_ERROR([No way to specify a signed character!])
1420 # We have unsigned chars, can say 'signed char', no s_char typedef.
1421 AC_DEFINE([NEED_S_CHAR_TYPEDEF], [1],
1422 [Do we need an s_char typedef?])
1429 # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
1430 # (returning ENOSYS). I didn't check 4.2. If, in the future,
1431 # IBM pulls its thumbs out long enough to implement clock_settime,
1432 # this conditional will need to change. Maybe use AC_TRY_RUN
1433 # instead to try to set the time to itself and check errno.
1436 AC_SEARCH_LIBS([clock_gettime], [rt])
1437 AC_CHECK_FUNCS([clock_gettime clock_settime])
1440 AC_CHECK_FUNCS([daemon])
1448 AC_MSG_CHECKING([for isfinite with <math.h>])
1465 AC_MSG_RESULT([$ans])
1468 AC_DEFINE([HAVE_ISFINITE], [1])
1474 AC_CHECK_FUNCS([getbootfile getclock getdtablesize])
1479 [--enable-getifaddrs],
1480 [s Enable the use of getifaddrs() [[yes|no|glibc]].
1481 glibc: Use getifaddrs() in glibc if you know it supports IPv6.]
1483 [want_getifaddrs="$enableval"],
1484 [want_getifaddrs="yes"]
1487 case $want_getifaddrs in
1490 # Do we have getifaddrs() ?
1494 # Some recent versions of glibc support getifaddrs() which does not
1495 # provide AF_INET6 addresses while the function provided by the USAGI
1496 # project handles the AF_INET6 case correctly. We need to avoid
1497 # using the former but prefer the latter unless overridden by
1498 # --enable-getifaddrs=glibc.
1499 case "$want_getifaddrs" in
1501 AC_CHECK_FUNCS([getifaddrs])
1505 LIBS="-L/usr/local/v6/lib $LIBS"
1514 LIBS="$LIBS -linet6"
1515 AC_DEFINE([HAVE_GETIFADDRS], [1])
1527 AC_CHECK_FUNCS([getifaddrs])
1532 [type of socklen arg for getsockname()],
1533 [ntp_cv_getsockname_socklen_type],
1535 getsockname_socklen_type_found=no
1536 for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
1537 for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
1541 #ifdef HAVE_SYS_TYPES_H
1542 # include <sys/types.h>
1544 #ifdef HAVE_SYS_SOCKET_H
1545 # include <sys/socket.h>
1549 getsockname(int, $getsockname_arg2,
1550 $ntp_cv_getsockname_socklen_type *);
1553 [getsockname_socklen_type_found=yes ; break 2],
1558 case "$getsockname_socklen_type_found" in
1560 ntp_cv_getsockname_socklen_type='socklen_t'
1562 AS_UNSET([getsockname_arg2])
1563 AS_UNSET([getsockname_socklen_type_found])
1566 AC_DEFINE_UNQUOTED([GETSOCKNAME_SOCKLEN_TYPE],
1567 [$ntp_cv_getsockname_socklen_type],
1568 [What is getsockname()'s socklen type?])
1570 AC_CHECK_FUNCS([getuid getrusage hstrerror])
1571 AC_CHECK_FUNC([gettimeofday], [], [
1573 *-*-mpeix*) ac_cv_func_gettimeofday=yes
1578 # Check for if_nametoindex() for IPv6 scoped addresses support
1582 AC_SEARCH_LIBS([if_nametoindex], [ipv6])
1584 AC_CHECK_FUNCS([if_nametoindex])
1585 case "$ac_cv_func_if_nametoindex" in
1587 AC_DEFINE([ISC_PLATFORM_HAVEIFNAMETOINDEX], [1],
1588 [ISC: do we have if_nametoindex()?])
1591 AC_SEARCH_LIBS([inet_ntop], [resolv], , , [-lsocket -lnsl])
1592 AC_CHECK_FUNC([inet_ntop], [],
1593 [AC_DEFINE([ISC_PLATFORM_NEEDNTOP], [1], [ISC: provide inet_ntop()])])
1594 AC_CHECK_FUNC([inet_pton], [],
1595 [AC_DEFINE([ISC_PLATFORM_NEEDPTON], [1], [ISC: provide inet_pton()])])
1597 case "$ac_cv_header_kvm_h" in
1599 AC_CHECK_FUNCS([kvm_open])
1603 AC_CHECK_FUNCS([memcpy memmove memset])
1606 # Just stubs. Idiots.
1608 *) AC_CHECK_FUNCS([mkstemp])
1611 AC_CHECK_FUNCS([mktime])
1614 # Just a stub. Idiots.
1617 # Just a stub in "old" Irix. Idiots.
1620 # there, but more trouble than it is worth for now (resolver problems)
1623 # Apparently there but not working in QNX. Idiots?
1626 # Just a stub. Idiots.
1628 alpha*-dec-osf4*|alpha*-dec-osf5*)
1629 # mlockall is there, as a #define calling memlk via <sys/mman.h>
1630 # Not easy to test for - cheat.
1631 AC_CHECK_FUNCS([memlk], [ac_cv_func_mlockall=yes])
1632 AC_CHECK_FUNCS([mlockall])
1634 *) AC_CHECK_FUNCS([mlockall])
1637 AC_CHECK_FUNCS([nice nlist])
1642 *) AC_CHECK_FUNCS([ntp_adjtime ntp_gettime])
1645 AC_CHECK_FUNCS([plock pututline pututxline readlink recvmsg rtprio])
1648 # Just a stub in AIX 4. Idiots.
1651 # Just stubs in solaris2.5. Idiots.
1653 *) AC_CHECK_FUNCS([sched_setscheduler])
1656 AC_CHECK_FUNCS([setlinebuf setpgid setpriority setsid])
1657 AC_CHECK_FUNCS([setrlimit])
1658 AC_CHECK_FUNCS([settimeofday], ,[
1660 *-*-mpeix*) ac_cv_func_settimeofday=yes
1663 AC_CHECK_FUNCS([setvbuf sigaction sigvec sigset sigsuspend stime strchr])
1664 AC_CHECK_FUNCS([sysconf sysctl snprintf strdup strerror strstr timegm])
1667 # Just stubs. Idiots.
1670 # Just stubs. Idiots.
1673 # Just stubs. Idiots.
1676 # Just stubs. Idiots.
1678 *) AC_CHECK_FUNCS([timer_create timer_settime])
1681 AC_CHECK_FUNCS([umask uname updwtmp updwtmpx vsnprintf vsprintf])
1685 # http://bugs.ntp.org/737
1686 case "$ac_cv_func_recvmsg" in
1689 [if we need extra help to define struct iovec],
1690 [ntp_cv_struct_iovec_help],
1693 for ntp_cv_struct_iovec_help in '0' '1'; do
1697 #ifdef HAVE_SYS_TYPES_H
1698 # include <sys/types.h>
1700 #ifdef HAVE_SYS_SOCKET_H
1701 # include <sys/socket.h>
1703 #if $ntp_cv_struct_iovec_help
1704 # include <sys/uio.h>
1716 x = recvmsg(s, &mh, flags);
1720 [compiled=yes ; break 1],
1726 ntp_cv_struct_iovec_help=0
1728 AS_UNSET([compiled])
1731 case "$ntp_cv_struct_iovec_help" in
1733 AC_DEFINE([HAVE_SYS_UIO_H], [1],
1734 [Use sys/uio.h for struct iovec help])
1740 AC_DEFINE([SPRINTF_CHAR], [1], [*s*printf() functions are char*])
1745 [number of arguments to gettimeofday()],
1746 [ntp_cv_func_Xettimeofday_nargs],
1750 #include <sys/time.h>
1757 [ntp_cv_func_Xettimeofday_nargs=2],
1758 [ntp_cv_func_Xettimeofday_nargs=1]
1761 case "$ntp_cv_func_Xettimeofday_nargs" in
1763 AC_DEFINE([SYSV_TIMEOFDAY], [1], [Does Xettimeofday take 1 arg?])
1767 [number of arguments taken by setpgrp()],
1768 [ntp_cv_func_setpgrp_nargs],
1772 #ifdef HAVE_SYS_TYPES_H
1773 # include <sys/types.h>
1775 #ifdef HAVE_UNISTD_H
1776 # include <unistd.h>
1783 [ntp_cv_func_setpgrp_nargs=2],
1784 [ntp_cv_func_setpgrp_nargs=0]
1787 case "$ntp_cv_func_setpgrp_nargs" in
1789 AC_DEFINE([HAVE_SETPGRP_0], [1],
1790 [define if setpgrp takes 0 arguments])
1793 dnl we require ANSI C which mandates void * here
1794 dnl we should clean up all uses of QSORT_USES_VOID_P so
1795 dnl this can be removed.
1796 AC_DEFINE([QSORT_USES_VOID_P], [1],
1797 [Does qsort expect to work on "void *" stuff?])
1800 [if we need to declare 'errno'],
1801 [ntp_cv_decl_errno],
1813 [ntp_cv_decl_errno=no],
1814 [ntp_cv_decl_errno=yes]
1817 case "$ntp_cv_decl_errno" in
1819 AC_DEFINE([DECL_ERRNO], [1], [Declare errno?])
1822 dnl (prr) aix 4.3 defines h_errno as (*(int *)h_errno_which()) for
1823 dnl MT purposes. This makes the line "extern int h_errno" choke
1824 dnl the compiler. Hopefully adding !defined(h_errno) fixes this
1825 dnl without breaking any other platforms.
1828 [if we may declare 'h_errno'],
1829 [ntp_cv_decl_h_errno],
1833 #include <sys/types.h>
1834 #ifdef HAVE_NETINET_IN_H
1835 # include <netinet/in.h>
1837 #ifdef HAVE_ARPA_NAMESER_H
1838 # include <arpa/nameser.h>
1843 #ifdef HAVE_RESOLV_H
1844 # include <resolv.h>
1851 [ntp_cv_decl_h_errno=yes],
1852 [ntp_cv_decl_h_errno=no]
1855 case "$ntp_cv_decl_h_errno" in
1857 AC_DEFINE([DECL_H_ERRNO], [1], [Declare h_errno?])
1861 [if declaring 'syscall()' is ok],
1862 [ntp_cv_decl_syscall],
1866 #ifdef HAVE_SYS_TYPES_H
1867 # include <sys/types.h>
1869 #ifdef HAVE_UNISTD_H
1870 # include <unistd.h>
1874 extern int syscall (int, ...);
1877 [ntp_cv_decl_syscall=yes],
1878 [ntp_cv_decl_syscall=no]
1881 case "$ntp_cv_decl_syscall" in
1883 AC_DEFINE([DECL_SYSCALL], [1], [Declare syscall()?])
1888 AC_DEFINE([DECL_HSTRERROR_0], [1], [Declaration style]) # Needed for XLC under AIX 4.3.2
1891 AC_DEFINE([DECL_ADJTIME_0], [1], [Declaration style])
1892 AC_DEFINE([DECL_INET_NTOA_0], [1], [Declaration style])
1893 AC_DEFINE([DECL_MKTEMP_0], [1], [Declaration style])
1894 AC_DEFINE([DECL_SELECT_0], [1], [Declaration style])
1895 AC_DEFINE([DECL_SETITIMER_0], [1], [Declaration style])
1896 AC_DEFINE([DECL_SYSLOG_0], [1], [Declaration style])
1897 AC_DEFINE([DECL_TIMEOFDAY_0], [1], [Declaration style])
1900 AC_DEFINE([DECL_PLOCK_0], [1], [Declaration style])
1901 AC_DEFINE([DECL_STIME_1], [1], [Declaration style])
1904 AC_DEFINE([DECL_ADJTIME_0], [1], [Declaration style])
1907 AC_DEFINE([DECL_ADJTIME_0], [1], [Declaration style])
1908 AC_DEFINE([DECL_BZERO_0], [1], [Declaration style])
1909 AC_DEFINE([DECL_IOCTL_0], [1], [Declaration style])
1910 AC_DEFINE([DECL_IPC_0], [1], [Declaration style])
1911 AC_DEFINE([DECL_MEMMOVE_0], [1], [Declaration style])
1912 AC_DEFINE([DECL_MKTEMP_0], [1], [Declaration style])
1913 AC_DEFINE([DECL_RENAME_0], [1], [Declaration style])
1914 AC_DEFINE([DECL_SELECT_0], [1], [Declaration style])
1915 AC_DEFINE([DECL_SETITIMER_0], [1], [Declaration style])
1916 AC_DEFINE([DECL_SETPRIORITY_0], [1], [Declaration style])
1917 AC_DEFINE([DECL_STDIO_0], [1], [Declaration style])
1918 AC_DEFINE([DECL_STRTOL_0], [1], [Declaration style])
1919 AC_DEFINE([DECL_SYSLOG_0], [1], [Declaration style])
1920 AC_DEFINE([DECL_TIME_0], [1], [Declaration style])
1921 AC_DEFINE([DECL_TIMEOFDAY_0], [1], [Declaration style])
1922 AC_DEFINE([DECL_TOLOWER_0], [1], [Declaration style])
1925 AC_DEFINE([DECL_MKSTEMP_0], [1], [Declaration style])
1926 AC_DEFINE([DECL_SETPRIORITY_1], [1], [Declaration style])
1929 AC_DEFINE([DECL_TIMEOFDAY_0], [1], [Declaration style])
1934 AC_DEFINE([DECL_ADJTIME_0], [1], [Declaration style])
1935 AC_DEFINE([DECL_BCOPY_0], [1], [Declaration style])
1936 AC_DEFINE([DECL_BZERO_0], [1], [Declaration style])
1937 AC_DEFINE([DECL_IOCTL_0], [1], [Declaration style])
1938 AC_DEFINE([DECL_IPC_0], [1], [Declaration style])
1939 AC_DEFINE([DECL_MEMMOVE_0], [1], [Declaration style])
1940 AC_DEFINE([DECL_MKTEMP_0], [1], [Declaration style])
1941 AC_DEFINE([DECL_MKSTEMP_0], [1], [Declaration style])
1942 AC_DEFINE([DECL_RENAME_0], [1], [Declaration style])
1943 AC_DEFINE([DECL_SELECT_0], [1], [Declaration style])
1944 AC_DEFINE([DECL_SETITIMER_0], [1], [Declaration style])
1945 AC_DEFINE([DECL_SETPRIORITY_0], [1], [Declaration style])
1946 AC_DEFINE([DECL_SIGVEC_0], [1], [Declaration style])
1947 case "`basename $ac_cv_prog_CC`" in
1949 *) AC_DEFINE([DECL_STDIO_0], [1], [Declaration style])
1952 AC_DEFINE([DECL_STRTOL_0], [1], [Declaration style])
1953 AC_DEFINE([DECL_SYSLOG_0], [1], [Declaration style])
1954 AC_DEFINE([DECL_TIME_0], [1], [Declaration style])
1955 AC_DEFINE([DECL_TIMEOFDAY_0], [1], [Declaration style])
1956 AC_DEFINE([DECL_TOLOWER_0], [1], [Declaration style])
1957 AC_DEFINE([DECL_TOUPPER_0], [1], [Declaration style])
1958 AC_DEFINE([DECL_STRERROR_0], [1], [Declaration style])
1961 AC_DEFINE([DECL_ADJTIME_0], [1], [Declaration style])
1962 AC_DEFINE([DECL_BZERO_0], [1], [Declaration style])
1963 AC_DEFINE([DECL_CFSETISPEED_0], [1], [Declaration style])
1964 AC_DEFINE([DECL_IOCTL_0], [1], [Declaration style])
1965 AC_DEFINE([DECL_IPC_0], [1], [Declaration style])
1966 AC_DEFINE([DECL_MKTEMP_0], [1], [Declaration style])
1967 AC_DEFINE([DECL_NLIST_0], [1], [Declaration style])
1968 AC_DEFINE([DECL_PLOCK_0], [1], [Declaration style])
1969 AC_DEFINE([DECL_SELECT_0], [1], [Declaration style])
1970 AC_DEFINE([DECL_SETITIMER_0], [1], [Declaration style])
1971 AC_DEFINE([DECL_SETPRIORITY_0], [1], [Declaration style])
1972 AC_DEFINE([DECL_STIME_0], [1], [Declaration style])
1973 AC_DEFINE([DECL_SYSLOG_0], [1], [Declaration style])
1974 AC_DEFINE([DECL_TIMEOFDAY_0], [1], [Declaration style])
1980 AC_DEFINE([TERMIOS_NEEDS__SVID3], [1],
1981 [Do we need to #define _SVID3 when we #include <termios.h>?])
1987 AC_DEFINE([NEED_RCVBUF_SLOP], [1],
1988 [Do we need extra room for SO_RCVBUF? (HPUX < 8)])
1991 dnl Using AC_CACHE_CHECK to honor preset ntp_cv_var_open_bcast_socket
1993 [if we will open the broadcast socket],
1994 [ntp_cv_var_open_bcast_socket],
2001 ntp_cv_var_open_bcast_socket=$ans
2004 case "$ntp_cv_var_open_bcast_socket" in
2006 AC_DEFINE([OPEN_BCAST_SOCKET], [1],
2007 [Should we open the broadcast socket?])
2012 AC_DEFINE([NEED_HPUX_FINDCONFIG], [1],
2013 [Do we want the HPUX FindConfig()?])
2016 dnl using AC_CACHE_CHECK to honor preset $ntp_cv_arg_setpgrp_negpid
2018 [if process groups are set with -pid],
2019 [ntp_cv_arg_setpgrp_negpid],
2041 ntp_cv_arg_setpgrp_negpid=$ans
2044 case "$ntp_cv_arg_setpgrp_negpid" in
2046 AC_DEFINE([UDP_BACKWARDS_SETOWN], [1],
2047 [Do we set process groups with -pid?])
2051 [if we need a ctty for F_SETOWN],
2052 [ntp_cv_func_ctty_for_f_setown],
2061 # NetBSD versions prior to 3.99.8 require a CTTY for F_SETOWN,
2062 # while later versions will fail a ioctl(TIOCSCTTY, 0) call in
2063 # some cases and so should not have USE_FSETOWNCTTY. "netbsd"
2064 # in $host may be followed by "aout", "ecoff", or "elf".
2065 *-*-netbsd*[a-z]3.[0-8]*|*-*-netbsd*[a-z][0-2].*|*-*-netbsd*[a-z]3.99.[0-7])
2068 *-*-netbsd3.[0-8]*|*-*-netbsd[0-2].*|*-*-netbsd3.99.[0-7])
2084 ntp_cv_func_ctty_for_f_setown=$ans
2087 case "$ntp_cv_func_ctty_for_f_setown" in
2089 AC_DEFINE([USE_FSETOWNCTTY], [1], [Must we have a CTTY for fsetown?])
2093 [if the OS clears cached routes when more specifics become available],
2094 [ntp_cv_os_routeupdates],
2104 ntp_cv_os_routeupdates=$ans
2107 case "$ntp_cv_os_routeupdates" in
2109 AC_DEFINE([OS_MISSES_SPECIFIC_ROUTE_UPDATES], [1],
2110 [need to recreate sockets on changed routing?])
2114 [if the wildcard socket needs REUSEADDR to bind other addresses],
2115 [ntp_cv_os_wildcardreuse],
2124 ntp_cv_os_wildcardreuse=$ans
2127 case "$ntp_cv_os_wildcardreuse" in
2129 AC_DEFINE([OS_NEEDS_REUSEADDR_FOR_IFADDRBIND], [1],
2130 [wildcard socket needs REUSEADDR to bind interface addresses])
2133 AC_MSG_CHECKING([if we'll use clock_settime or settimeofday or stime])
2136 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
2139 ans='clock_settime()'
2142 ntp_warning='But clock_settime() would be better (if we had it)'
2143 ans='settimeofday()'
2146 ntp_warning='Which is the worst of the three'
2152 ntp_warning='Which leaves us with nothing to use!'
2155 AC_MSG_RESULT([$ans])
2156 case "$ntp_warning" in
2160 AC_MSG_WARN([*** $ntp_warning ***])
2166 [ntp_cv_hdr_def_sigio],
2176 [ntp_cv_hdr_def_sigio=yes],
2177 [ntp_cv_hdr_def_sigio=no]
2181 dnl Override those system that have a losing SIGIO
2183 [if we want to use signalled IO],
2184 [ntp_cv_var_signalled_io],
2187 case "$ntp_cv_hdr_def_sigio" in
2191 alpha*-dec-osf4*|alpha*-dec-osf5*)
2230 ntp_cv_var_signalled_io=$ans
2233 case "$ntp_cv_var_signalled_io" in
2235 AC_DEFINE([HAVE_SIGNALED_IO], [1],
2236 [Can we use SIGIO for tcp and udp IO?])
2241 [ntp_cv_hdr_def_sigpoll],
2251 [ntp_cv_hdr_def_sigpoll=yes],
2252 [ntp_cv_hdr_def_sigpoll=no]
2258 [ntp_cv_hdr_def_sigsys],
2268 [ntp_cv_hdr_def_sigsys=yes],
2269 [ntp_cv_hdr_def_sigsys=no]
2274 [if we can use SIGPOLL for UDP I/O],
2275 [ntp_cv_var_use_udp_sigpoll],
2278 case "$ntp_cv_hdr_def_sigpoll" in
2328 ntp_cv_var_use_udp_sigpoll=$ans
2331 case "$ntp_cv_var_use_udp_sigpoll" in
2333 AC_DEFINE([USE_UDP_SIGPOLL], [1], [Can we use SIGPOLL for UDP?])
2337 [if we can use SIGPOLL for TTY I/O],
2338 [ntp_cv_var_use_tty_sigpoll],
2341 case "$ntp_cv_hdr_def_sigpoll" in
2388 ntp_cv_var_use_tty_sigpoll=$ans
2391 case "$ntp_cv_var_use_tty_sigpoll" in
2393 AC_DEFINE([USE_TTY_SIGPOLL], [1], [Can we use SIGPOLL for tty IO?])
2398 AC_DEFINE([NLIST_EXTRA_INDIRECTION], [1],
2399 [Might nlist() values require an extra level of indirection (AIX)?])
2403 [for a minimum recommended value of tickadj],
2404 [ntp_cv_var_min_rec_tickadj],
2412 ntp_cv_var_min_rec_tickadj=$ans
2415 case "$ntp_cv_var_min_rec_tickadj" in
2419 AC_DEFINE_UNQUOTED([MIN_REC_TICKADJ], [$ntp_cv_var_min_rec_tickadj],
2420 [Should we recommend a minimum value for tickadj?])
2424 [if the TTY code permits PARENB and IGNPAR],
2425 [ntp_cv_no_parenb_ignpar],
2435 i?86-*-freebsd[[123]].*)
2444 ntp_cv_no_parenb_ignpar=$ans
2447 case "$ntp_cv_no_parenb_ignpar" in
2449 AC_DEFINE([NO_PARENB_IGNPAR], [1],
2450 [Is there a problem using PARENB and IGNPAR?])
2453 AC_MSG_CHECKING([if we're including ntpd debugging code])
2457 [--enable-debugging],
2458 [+ include ntpd debugging code]
2460 [ntp_ok=$enableval],
2465 AC_DEFINE([DEBUG], [1], [Enable ntpd debugging code?])
2467 AC_MSG_RESULT([$ntp_ok])
2469 AC_MSG_CHECKING([if we're including processing time debugging code])
2473 [--enable-debug-timing],
2474 [- include processing time debugging code (costs performance)]
2476 [ntp_ok=$enableval],
2481 AC_DEFINE([DEBUG_TIMING], [1], [Enable processing time debugging?])
2483 AC_MSG_RESULT([$ntp_ok])
2485 AC_MSG_CHECKING([for a the number of minutes in a DST adjustment])
2489 [--enable-dst-minutes],
2490 [n minutes per DST adjustment @<:@60@:>@]) dnl @<:@ is [, @:>@ is ]
2495 AC_DEFINE_UNQUOTED([DSTMINUTES], [$ans],
2496 [The number of minutes in a DST adjustment])
2497 AC_MSG_RESULT([$ans])
2499 AC_MSG_CHECKING([if ntpd will retry permanent DNS failures])
2501 [ignore-dns-errors],
2503 [--enable-ignore-dns-errors],
2504 [- retry DNS queries on any error]
2511 AC_DEFINE([IGNORE_DNS_ERRORS], [1],
2512 [Retry queries on _any_ DNS error?])
2514 AC_MSG_RESULT([$ans])
2516 AC_MSG_CHECKING([if ntpd will use the deferred DNS lookup path])
2520 [--enable-force-defer-DNS],
2521 [- force all DNS lookups to take the deferred path]
2528 AC_DEFINE([FORCE_DEFER_DNS], [1], [Force deferred DNS lookups?])
2530 AC_MSG_RESULT([$ans])
2532 case "$ac_cv_header_sys_sio_h" in
2535 [sys/sio.h for TIOCDCDTIMESTAMP],
2536 [ntp_cv_hdr_def_tiocdcdtimestamp],
2540 #include <sys/sio.h>
2542 #ifdef TIOCDCDTIMESTAMP
2546 [ntp_cv_hdr_def_tiocdcdtimestamp=yes],
2547 [ntp_cv_hdr_def_tiocdcdtimestamp=no]
2553 [if we have the tty_clk line discipline/streams module],
2556 case "$ac_cv_header_sys_clkdefs_h$ntp_cv_hdr_def_tiocdcdtimestamp" in
2566 case "$ntp_cv_tty_clk" in
2568 AC_DEFINE([TTYCLK], [1],
2569 [Do we have the tty_clk line discipline/streams module?])
2572 AC_MSG_CHECKING([for the ppsclock streams module])
2573 case "$ntp_cv_struct_ppsclockev" in
2576 AC_DEFINE([PPS], [1],
2577 [Do we have the ppsclock streams module?])
2582 AC_MSG_RESULT([$ans])
2585 [for multicast IP support],
2596 #ifdef HAVE_NETINET_IN_H
2597 #include <netinet/in.h>
2601 struct ip_mreq ipmr;
2602 ipmr.imr_interface.s_addr = 0;
2605 [ntp_cv_multicast=yes],
2611 case "$ntp_cv_multicast" in
2613 AC_DEFINE([MCAST], [1], [Does the target support multicast IP?])
2615 [arg type needed for setsockopt() IP*_MULTICAST_LOOP],
2616 [ntp_cv_typeof_ip_multicast_loop],
2619 *-*-netbsd*|*-*-*linux*)
2620 ntp_cv_typeof_ip_multicast_loop=u_int
2623 ntp_cv_typeof_ip_multicast_loop=u_char
2627 AC_DEFINE_UNQUOTED([TYPEOF_IP_MULTICAST_LOOP],
2628 [$ntp_cv_typeof_ip_multicast_loop],
2629 [What type to use for setsockopt])
2633 [availability of ntp_{adj,get}time()],
2634 [ntp_cv_var_ntp_syscalls],
2636 ntp_cv_var_ntp_syscalls=no
2637 case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex" in
2639 ntp_cv_var_ntp_syscalls=libc
2642 ntp_cv_var_ntp_syscalls=inline
2648 #include <sys/syscall.h>
2650 #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
2654 [ntp_cv_var_ntp_syscalls=kernel]
2660 case "$ntp_cv_var_ntp_syscalls" in
2662 AC_DEFINE([NTP_SYSCALLS_LIBC], [1],
2663 [Do we have ntp_{adj,get}time in libc?])
2666 AC_DEFINE([NTP_SYSCALLS_STD], [1],
2667 [Do we have ntp_{adj,get}time in the kernel?])
2672 [if sys/timex.h has STA_FLL],
2673 [ntp_cv_var_sta_fll],
2677 #include <sys/timex.h>
2683 [ntp_cv_var_sta_fll=yes],
2684 [ntp_cv_var_sta_fll=no]
2689 [if we have kernel PLL support],
2690 [ntp_cv_var_kernel_pll],
2691 [dnl ntp_cv_var_ntp_syscalls is {no,libc,kernel}
2692 case "$ac_cv_header_sys_timex_h$ntp_cv_struct_ntptimeval$ntp_cv_var_sta_fll$ntp_cv_var_ntp_syscalls" in
2694 ntp_cv_var_kernel_pll=no
2696 *) ntp_cv_var_kernel_pll=yes
2701 case "$ntp_cv_var_kernel_pll" in
2703 AC_DEFINE([KERNEL_PLL], [1],
2704 [Does the kernel support precision time discipline?])
2708 [if SIOCGIFCONF returns buffer size in the buffer],
2709 [ntp_cv_size_returned_in_buffer],
2723 ntp_cv_size_returned_in_buffer=$ans
2726 case "$ntp_cv_size_returned_in_buffer" in
2728 AC_DEFINE([SIZE_RETURNED_IN_BUFFER], [1],
2729 [Does SIOCGIFCONF return size in the buffer?])
2732 # Check for ioctls TIOCGPPSEV
2733 AC_MSG_CHECKING([for TTY PPS ioctl TIOCGPPSEV])
2734 case "$ac_cv_header_termios_h" in
2739 #include <termios.h>
2755 AC_DEFINE([HAVE_TIOCGPPSEV], [1],
2756 [Do we have the TIOCGPPSEV ioctl (Solaris)?])
2758 AC_MSG_RESULT([$ntp_ok])
2760 # Check for ioctls TIOCSPPS
2761 AC_MSG_CHECKING([for TTY PPS ioctl TIOCSPPS])
2762 case "$ac_cv_header_termios_h" in
2767 #include <termios.h>
2783 AC_DEFINE([HAVE_TIOCSPPS], [1],
2784 [Do we have the TIOCSPPS ioctl (Solaris)?])
2786 AC_MSG_RESULT([$ntp_ok])
2788 # Check for ioctls CIOGETEV
2789 AC_MSG_CHECKING([for TTY PPS ioctl CIOGETEV])
2790 case "$ac_cv_header_sys_ppsclock_h" in
2795 #include <sys/ppsclock.h>
2811 AC_DEFINE([HAVE_CIOGETEV], [1],
2812 [Do we have the CIOGETEV ioctl (SunOS, Linux)?])
2814 AC_MSG_RESULT([$ntp_ok])
2816 # ATOM/PPSAPI stuff.
2820 # Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
2822 # The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
2823 # The PPSAPI needs struct timespec.
2824 # The PPSAPI also needs a timepps header.
2826 case "$ac_cv_c_inline$ntp_cv_struct_timespec" in
2828 case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h$host_os" in
2829 *yes* | *sunos* | *solaris* | *sco* | *netbsd* )
2830 AC_DEFINE(HAVE_PPSAPI, 1, [Do we have the PPS API per the Draft RFC?])
2840 # Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
2841 AC_CHECK_HEADER([linux/serial.h])
2842 case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
2844 AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
2848 #include <sys/time.h>
2850 #include <sys/ppsclock.h>
2851 #include <linux/serial.h>
2855 #ifdef ASYNC_PPS_CD_POS
2856 #ifdef ASYNC_PPS_CD_NEG
2868 AC_MSG_RESULT([$ntp_ok])
2876 AC_DEFINE([HAVE_TIO_SERIAL_STUFF], 1,
2877 [Do we have the TIO serial stuff?])
2880 # Check for SHMEM_STATUS support
2881 AC_MSG_CHECKING([SHMEM_STATUS support])
2882 case "$ac_cv_header_sys_mman_h" in
2892 AC_DEFINE([ONCORE_SHMEM_STATUS], [1],
2893 [Do we have support for SHMEM_STATUS?])
2895 AC_MSG_RESULT([$ntp_ok])
2899 # HPUX only, and by explicit request
2900 AC_MSG_CHECKING([Datum/Bancomm bc635/VME interface])
2905 [- Datum/Bancomm bc635/VME interface]
2907 [ntp_ok=$enableval],
2910 if test "$ntp_ok" = "yes"; then
2912 AC_DEFINE([CLOCK_BANC], [1], [Datum/Bancomm bc635/VME interface?])
2914 AC_MSG_RESULT([$ntp_ok])
2915 case "$ntp_ok$host" in
2917 yes*) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
2920 #HPUX only, and only by explicit request
2921 AC_MSG_CHECKING([TrueTime GPS receiver/VME interface])
2926 [- TrueTime GPS receiver/VME interface]
2928 [ntp_ok=$enableval],
2931 if test "$ntp_ok" = "yes"; then
2933 AC_DEFINE([CLOCK_GPSVME], 1, [TrueTime GPS receiver/VME interface?])
2935 AC_MSG_RESULT([$ntp_ok])
2936 case "$ntp_ok$host" in
2938 yes*) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
2941 AC_MSG_CHECKING([for PCL720 clock support])
2942 case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
2944 AC_DEFINE([CLOCK_PPS720], 1, [PCL 720 clock support])
2951 AC_MSG_RESULT([$ans])
2953 AC_MSG_CHECKING([for default inclusion of all suitable non-PARSE clocks])
2957 [--enable-all-clocks],
2958 [+ include all suitable non-PARSE clocks:]
2960 [ntp_eac=$enableval],
2963 AC_MSG_RESULT([$ntp_eac])
2965 # HMS: Should we also require ntp_parse_ok?
2966 AC_MSG_CHECKING([if we have support for PARSE clocks])
2967 case "$ntp_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
2974 AC_MSG_RESULT([$ntp_canparse])
2976 AC_MSG_CHECKING([if we have support for audio clocks])
2977 case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
2980 AC_DEFINE([HAVE_AUDIO], [], [Do we have audio support?])
2982 *) ntp_canaudio=no ;;
2984 AC_MSG_RESULT([$ntp_canaudio])
2986 AC_MSG_CHECKING([if we have support for the SHM refclock interface])
2987 case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
2993 AC_MSG_RESULT([$ntp_canshm])
2995 # Test for termios TIOCMBIS modem control (ACTS, Heath, Palisade)
2997 [for termios modem control],
2998 [ntp_cv_modem_control],
3002 #ifdef HAVE_UNISTD_H
3003 # include <unistd.h>
3005 #ifdef HAVE_TERMIOS_H
3006 # include <termios.h>
3008 #ifdef HAVE_SYS_IOCTL_H
3009 # include <sys/ioctl.h>
3013 int dtr = TIOCM_DTR;
3015 ioctl(1, TIOCMBIS, (char *)&dtr);
3018 [ntp_cv_modem_control=yes],
3019 [ntp_cv_modem_control=no]
3022 case "$ntp_eac::$ntp_cv_modem_control" in
3024 ntp_enable_all_modem_control_clocks=yes
3027 ntp_enable_all_modem_control_clocks=no
3031 # Requires modem control
3032 AC_MSG_CHECKING([ACTS modem service])
3037 [s ACTS modem service]
3039 [ntp_ok=$enableval],
3040 [ntp_ok=$ntp_enable_all_modem_control_clocks]
3042 if test "$ntp_ok" = "yes"; then
3044 AC_DEFINE([CLOCK_ACTS], [1], [ACTS modem service])
3046 AC_MSG_RESULT([$ntp_ok])
3048 AC_MSG_CHECKING([Arbiter 1088A/B GPS receiver])
3053 [+ Arbiter 1088A/B GPS receiver]
3055 [ntp_ok=$enableval],
3058 if test "$ntp_ok" = "yes"; then
3060 AC_DEFINE([CLOCK_ARBITER], [1], [Arbiter 1088A/B GPS receiver])
3062 AC_MSG_RESULT([$ntp_ok])
3064 AC_MSG_CHECKING([Arcron MSF receiver])
3068 [--enable-ARCRON-MSF],
3069 [+ Arcron MSF receiver]
3071 [ntp_ok=$enableval],
3074 if test "$ntp_ok" = "yes"; then
3076 AC_DEFINE([CLOCK_ARCRON_MSF], [1], [ARCRON support?])
3078 AC_MSG_RESULT([$ntp_ok])
3080 AC_MSG_CHECKING([Austron 2200A/2201A GPS receiver])
3085 [+ Austron 2200A/2201A GPS receiver]
3087 [ntp_ok=$enableval],
3090 if test "$ntp_ok" = "yes"; then
3092 AC_DEFINE([CLOCK_AS2201], [1], [Austron 2200A/2201A GPS receiver?])
3094 AC_MSG_RESULT([$ntp_ok])
3096 AC_MSG_CHECKING([ATOM PPS interface])
3101 [s ATOM PPS interface]
3103 [ntp_ok=$enableval],
3106 case "$ntp_atom_ok" in
3109 if test "$ntp_ok" = "yes"; then
3111 AC_DEFINE([CLOCK_ATOM], [1], [PPS interface?])
3113 AC_MSG_RESULT([$ntp_ok])
3115 AC_MSG_CHECKING([Chrono-log K-series WWVB receiver])
3119 [--enable-CHRONOLOG],
3120 [+ Chrono-log K-series WWVB receiver]
3122 [ntp_ok=$enableval],
3125 if test "$ntp_ok" = "yes"; then
3127 AC_DEFINE([CLOCK_CHRONOLOG], [1], [Chronolog K-series WWVB receiver?])
3129 AC_MSG_RESULT([$ntp_ok])
3131 AC_MSG_CHECKING([CHU modem/decoder])
3136 [+ CHU modem/decoder]
3138 [ntp_ok=$enableval],
3141 if test "$ntp_ok" = "yes"; then
3143 AC_DEFINE([CLOCK_CHU], [1], [CHU modem/decoder])
3145 AC_MSG_RESULT([$ntp_ok])
3146 ntp_refclock_chu=$ntp_ok
3148 AC_MSG_CHECKING([CHU audio/decoder])
3152 [--enable-AUDIO-CHU],
3153 [s CHU audio/decoder]
3155 [ntp_ok=$enableval],
3157 case "$ntp_eac$ntp_refclock_chu$ntp_canaudio" in
3163 if test "$ntp_ok" = "yes"; then
3164 AC_DEFINE([AUDIO_CHU], [1], [CHU audio/decoder?])
3166 AC_MSG_RESULT([$ntp_ok])
3167 # We used to check for sunos/solaris target...
3168 case "$ntp_ok$ntp_refclock_chu$ntp_canaudio" in
3169 yes*no*) AC_MSG_WARN([*** But the expected answer is...no ***])
3173 AC_MSG_CHECKING([Datum Programmable Time System])
3178 [s Datum Programmable Time System]
3180 [ntp_ok=$enableval],
3182 case "$ac_cv_header_termios_h" in
3191 if test "$ntp_ok" = "yes"; then
3193 AC_DEFINE([CLOCK_DATUM], [1], [Datum Programmable Time System?])
3195 AC_MSG_RESULT([$ntp_ok])
3197 AC_MSG_CHECKING([Dumb generic hh:mm:ss local clock])
3201 [--enable-DUMBCLOCK],
3202 [+ Dumb generic hh:mm:ss local clock]
3204 [ntp_ok=$enableval],
3207 if test "$ntp_ok" = "yes"; then
3209 AC_DEFINE([CLOCK_DUMBCLOCK], [1], [Dumb generic hh:mm:ss local clock?])
3211 AC_MSG_RESULT([$ntp_ok])
3213 AC_MSG_CHECKING([Forum Graphic GPS])
3218 [+ Forum Graphic GPS]
3220 [ntp_ok=$enableval],
3223 if test "$ntp_ok" = "yes"; then
3225 AC_DEFINE([CLOCK_FG], [1], [Forum Graphic GPS datating station driver?])
3227 AC_MSG_RESULT([$ntp_ok])
3229 # Requires modem control
3230 AC_MSG_CHECKING([Heath GC-1000 WWV/WWVH receiver])
3235 [s Heath GC-1000 WWV/WWVH receiver]
3237 [ntp_ok=$enableval],
3238 [ntp_ok=$ntp_enable_all_modem_control_clocks]
3240 if test "$ntp_ok" = "yes"; then
3242 AC_DEFINE([CLOCK_HEATH], [1], [Heath GC-1000 WWV/WWVH receiver?])
3244 AC_MSG_RESULT([$ntp_ok])
3246 AC_MSG_CHECKING([for hopf serial clock device])
3250 [--enable-HOPFSERIAL],
3251 [+ hopf serial clock device]
3253 [ntp_ok=$enableval],
3256 if test "$ntp_ok" = "yes"; then
3258 AC_DEFINE([CLOCK_HOPF_SERIAL], [1], [HOPF serial clock device?])
3260 AC_MSG_RESULT([$ntp_ok])
3262 AC_MSG_CHECKING([for hopf PCI clock 6039])
3267 [+ hopf 6039 PCI board]
3269 [ntp_ok=$enableval],
3272 if test "$ntp_ok" = "yes"; then
3274 AC_DEFINE([CLOCK_HOPF_PCI], [1], [HOPF PCI clock device?])
3276 AC_MSG_RESULT([$ntp_ok])
3278 AC_MSG_CHECKING([HP 58503A GPS receiver])
3283 [+ HP 58503A GPS receiver]
3285 [ntp_ok=$enableval],
3288 if test "$ntp_ok" = "yes"; then
3290 AC_DEFINE([CLOCK_HPGPS], 1, [HP 58503A GPS receiver?])
3292 AC_MSG_RESULT([$ntp_ok])
3294 AC_MSG_CHECKING([IRIG audio decoder])
3299 [s IRIG audio decoder]
3301 [ntp_ok=$enableval],
3303 case "$ntp_eac$ntp_canaudio" in
3309 if test "$ntp_ok" = "yes"; then
3311 AC_DEFINE([CLOCK_IRIG], [1], [IRIG audio decoder?])
3313 AC_MSG_RESULT([$ntp_ok])
3314 case "$ntp_ok$ntp_canaudio" in
3315 yesno) AC_MSG_WARN([*** But the expected answer is... no ***])
3318 AC_MSG_CHECKING([for JJY receiver])
3325 [ntp_ok=$enableval],
3328 if test "$ntp_ok" = "yes"; then
3330 AC_DEFINE([CLOCK_JJY], [1], [JJY receiver?])
3332 AC_MSG_RESULT([$ntp_ok])
3334 AC_MSG_CHECKING([Rockwell Jupiter GPS receiver])
3339 [s Rockwell Jupiter GPS receiver]
3341 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
3342 case "$ntp_jupiter_ok" in
3345 if test "$ntp_ok" = "yes"; then
3347 AC_DEFINE([CLOCK_JUPITER], [1], [Rockwell Jupiter GPS clock?])
3349 AC_MSG_RESULT([$ntp_ok])
3351 AC_MSG_CHECKING([Leitch CSD 5300 Master Clock System Driver])
3356 [+ Leitch CSD 5300 Master Clock System Driver]
3358 [ntp_ok=$enableval],
3361 if test "$ntp_ok" = "yes"; then
3363 AC_DEFINE([CLOCK_LEITCH], [1],
3364 [Leitch CSD 5300 Master Clock System Driver?])
3366 AC_MSG_RESULT([$ntp_ok])
3368 AC_MSG_CHECKING([local clock reference])
3372 [--enable-LOCAL-CLOCK],
3373 [+ local clock reference]
3375 [ntp_ok=$enableval],
3378 if test "$ntp_ok" = "yes"; then
3380 AC_DEFINE([CLOCK_LOCAL], [1], [local clock reference?])
3382 AC_MSG_RESULT([$ntp_ok])
3384 dnl Bug 340: longstanding unfixed bugs
3385 dnl AC_MSG_CHECKING([EES M201 MSF receiver])
3386 dnl AC_ARG_ENABLE([MSFEES],
3387 dnl [AS_HELP_STRING([--enable-MSFEES], [+ EES M201 MSF receiver])],
3388 dnl [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
3389 dnl if test "$ntp_ok" = "yes"; then
3390 dnl ntp_refclock=yes
3391 dnl AC_DEFINE([CLOCK_MSFEES], [1], [EES M201 MSF receiver])
3393 dnl AC_MSG_RESULT([$ntp_ok])
3396 AC_MSG_CHECKING([Magnavox MX4200 GPS receiver])
3401 [s Magnavox MX4200 GPS receiver]
3403 [ntp_ok=$enableval],
3405 case "$ac_cv_var_ppsclock" in
3415 if test "$ntp_ok" = "yes"; then
3417 AC_DEFINE([CLOCK_MX4200], [1], [Magnavox MX4200 GPS receiver])
3419 AC_MSG_RESULT([$ntp_ok])
3420 case "$ntp_ok$host" in
3421 yes*-*-ultrix*) AC_MSG_WARN([*** But the expected answer is... no ***])
3424 AC_MSG_CHECKING([for NeoClock4X receiver])
3428 [--enable-NEOCLOCK4X],
3429 [+ NeoClock4X DCF77 / TDF receiver]
3431 [ntp_ok=$enableval],
3434 if test "$ntp_ok" = "yes"; then
3436 AC_DEFINE([CLOCK_NEOCLOCK4X], [1], [NeoClock4X])
3438 AC_MSG_RESULT([$ntp_ok])
3440 AC_MSG_CHECKING([NMEA GPS receiver])
3445 [+ NMEA GPS receiver]
3447 [ntp_ok=$enableval],
3450 if test "$ntp_ok" = "yes"; then
3452 AC_DEFINE([CLOCK_NMEA], [1], [NMEA GPS receiver])
3454 AC_MSG_RESULT([$ntp_ok])
3456 AC_MSG_CHECKING([for ONCORE Motorola VP/UT Oncore GPS])
3461 [s Motorola VP/UT Oncore GPS receiver]
3463 [ntp_ok=$enableval],
3466 case "$ntp_oncore_ok" in
3469 if test "$ntp_ok" = "yes"; then
3471 AC_DEFINE([CLOCK_ONCORE], 1, [Motorola UT Oncore GPS])
3473 AC_MSG_RESULT([$ntp_ok])
3475 # Requires modem control
3476 AC_MSG_CHECKING([for Palisade clock])
3480 [--enable-PALISADE],
3483 [ntp_ok=$enableval],
3484 [ntp_ok=$ntp_enable_all_modem_control_clocks]
3486 if test "$ntp_ok" = "yes"; then
3488 AC_DEFINE([CLOCK_PALISADE], [1], [Palisade clock])
3490 AC_MSG_RESULT([$ntp_ok])
3492 AC_MSG_CHECKING([Conrad parallel port radio clock])
3497 [+ Conrad parallel port radio clock]
3499 [ntp_ok=$enableval],
3502 if test "$ntp_ok" = "yes"; then
3504 AC_DEFINE([CLOCK_PCF], [1], [Conrad parallel port radio clock])
3506 AC_MSG_RESULT([$ntp_ok])
3508 AC_MSG_CHECKING([PST/Traconex 1020 WWV/WWVH receiver])
3513 [+ PST/Traconex 1020 WWV/WWVH receiver]
3515 [ntp_ok=$enableval],
3518 if test "$ntp_ok" = "yes"; then
3520 AC_DEFINE([CLOCK_PST], [1], [PST/Traconex 1020 WWV/WWVH receiver])
3522 AC_MSG_RESULT([$ntp_ok])
3524 AC_MSG_CHECKING([RIPENCC specific Trimble driver])
3529 [- RIPENCC specific Trimble driver]
3531 [ntp_ok=$enableval],
3534 # 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
3535 case "$ntp_ripe_ncc_ok" in
3538 if test "$ntp_ok" = "yes"; then
3540 AC_DEFINE([CLOCK_RIPENCC], [],[RIPE NCC Trimble clock])
3542 AC_MSG_RESULT([$ntp_ok])
3544 # Danny Meyer says SHM compiles (with a few warnings) under Win32.
3545 # For *IX, we need sys/ipc.h and sys/shm.h.
3546 AC_MSG_CHECKING([for SHM clock attached thru shared memory])
3551 [s SHM clock attached thru shared memory]
3553 [ntp_ok=$enableval],
3555 case "$ntp_eac$ntp_canshm" in
3561 if test "$ntp_ok" = "yes"; then
3563 AC_DEFINE([CLOCK_SHM], [1], [clock thru shared memory])
3565 AC_MSG_RESULT([$ntp_ok])
3567 AC_MSG_CHECKING([Spectracom 8170/Netclock/2 WWVB receiver])
3571 [--enable-SPECTRACOM],
3572 [+ Spectracom 8170/Netclock/2 WWVB receiver]
3574 [ntp_ok=$enableval],
3577 if test "$ntp_ok" = "yes"; then
3579 AC_DEFINE([CLOCK_SPECTRACOM], [1],
3580 [Spectracom 8170/Netclock/2 WWVB receiver])
3582 AC_MSG_RESULT([$ntp_ok])
3584 AC_MSG_CHECKING([KSI/Odetics TPRO/S GPS receiver/IRIG interface])
3589 [s KSI/Odetics TPRO/S GPS receiver/IRIG interface]
3591 [ntp_ok=$enableval],
3593 case "$ac_cv_header_sys_tpro_h" in
3603 if test "$ntp_ok" = "yes"; then
3605 AC_DEFINE([CLOCK_TPRO], [1],
3606 [KSI/Odetics TPRO/S GPS receiver/IRIG interface])
3608 AC_MSG_RESULT([$ntp_ok])
3609 case "$ntp_ok$ac_cv_header_sys_tpro" in
3610 yesno) AC_MSG_WARN([*** But the expected answer is... no ***])
3613 dnl Bug 342: longstanding unfixed bugs
3614 dnl AC_MSG_CHECKING([TRAK 8810 GPS receiver])
3615 dnl AC_ARG_ENABLE([TRAK],
3616 dnl [AS_HELP_STRING([--enable-TRAK], [+ TRAK 8810 GPS receiver])],
3617 dnl [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
3618 dnl if test "$ntp_ok" = "yes"; then
3619 dnl ntp_refclock=yes
3620 dnl AC_DEFINE([CLOCK_TRAK], [1], [TRAK 8810 GPS receiver])
3622 dnl AC_MSG_RESULT([$ntp_ok])
3624 # Not on a vax-dec-bsd
3625 AC_MSG_CHECKING([Kinemetrics/TrueTime receivers])
3629 [--enable-TRUETIME],
3630 [s Kinemetrics/TrueTime receivers]
3632 [ntp_ok=$enableval],
3644 if test "$ntp_ok" = "yes"; then
3646 AC_DEFINE([CLOCK_TRUETIME], [1], [Kinemetrics/TrueTime receivers])
3648 AC_MSG_RESULT([$ntp_ok])
3649 case "$ntp_ok$host" in
3650 yesvax-dec-bsd) AC_MSG_WARN([*** But the expected answer is... no ***])
3653 AC_MSG_CHECKING([TrueTime 560 IRIG-B decoder])
3658 [- TrueTime 560 IRIG-B decoder]
3660 [ntp_ok=$enableval],
3663 if test "$ntp_ok" = "yes"; then
3665 AC_DEFINE([CLOCK_TT560], [], [TrueTime 560 IRIG-B decoder?])
3667 AC_MSG_RESULT([$ntp_ok])
3669 AC_MSG_CHECKING([Ultralink M320 WWVB receiver])
3674 [+ Ultralink WWVB receiver]
3676 [ntp_ok=$enableval],
3679 if test "$ntp_ok" = "yes"; then
3681 AC_DEFINE([CLOCK_ULINK], [1], [Ultralink M320 WWVB receiver?])
3683 AC_MSG_RESULT([$ntp_ok])
3685 AC_MSG_CHECKING([WWV receiver])
3690 [s WWV Audio receiver]
3692 [ntp_ok=$enableval],
3694 case "$ntp_eac$ntp_canaudio" in
3700 if test "$ntp_ok" = "yes"; then
3702 AC_DEFINE([CLOCK_WWV], [1], [WWV audio driver])
3704 AC_MSG_RESULT([$ntp_ok])
3705 case "$ntp_ok$ntp_canaudio" in
3706 yesno) AC_MSG_WARN([*** But the expected answer is... no ***])
3709 AC_MSG_CHECKING([for Zyfer receiver])
3714 [+ Zyfer GPStarplus receiver]
3716 [ntp_ok=$enableval],
3719 if test "$ntp_ok" = "yes"; then
3721 AC_DEFINE([CLOCK_ZYFER], [1], [Zyfer GPStarplus])
3723 AC_MSG_RESULT([$ntp_ok])
3725 AC_MSG_CHECKING([for default inclusion of all suitable PARSE clocks])
3729 [--enable-parse-clocks],
3730 [- include all suitable PARSE clocks:]
3732 [ntp_eapc=$enableval],
3735 yes) ntp_eapc=$ntp_canparse ;;
3738 # Delete the next line one of these days
3742 AC_MSG_RESULT($ntp_eapc)
3744 case "$ntp_eac$ntp_eapc$ntp_canparse" in
3746 AC_MSG_ERROR(["--enable-parse-clocks" requires "--enable-all-clocks".])
3749 AC_MSG_ERROR([You said "--enable-parse-clocks" but PARSE isn't supported on this platform!])
3757 AC_MSG_CHECKING([Diem Computime Radio Clock])
3761 [--enable-COMPUTIME],
3762 [s Diem Computime Radio Clock]
3764 [ntp_ok=$enableval],
3767 if test "$ntp_ok" = "yes"; then
3770 AC_DEFINE([CLOCK_COMPUTIME], [1], [Diems Computime Radio Clock?])
3772 AC_MSG_RESULT([$ntp_ok])
3773 case "$ntp_ok$ntp_canparse" in
3775 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3778 AC_MSG_CHECKING([ELV/DCF7000 clock])
3783 [s ELV/DCF7000 clock]
3785 [ntp_ok=$enableval],
3788 if test "$ntp_ok" = "yes"; then
3791 AC_DEFINE([CLOCK_DCF7000], [1], [ELV/DCF7000 clock?])
3793 AC_MSG_RESULT([$ntp_ok])
3794 case "$ntp_ok$ntp_canparse" in
3796 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3799 AC_MSG_CHECKING([HOPF 6021 clock])
3803 [--enable-HOPF6021],
3806 [ntp_ok=$enableval],
3809 if test "$ntp_ok" = "yes"; then
3812 AC_DEFINE([CLOCK_HOPF6021], [1], [HOPF 6021 clock?])
3814 AC_MSG_RESULT([$ntp_ok])
3815 case "$ntp_ok$ntp_canparse" in
3817 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3820 AC_MSG_CHECKING([Meinberg clocks])
3824 [--enable-MEINBERG],
3827 [ntp_ok=$enableval],
3830 if test "$ntp_ok" = "yes"; then
3833 AC_DEFINE([CLOCK_MEINBERG], [1], [Meinberg clocks])
3835 AC_MSG_RESULT([$ntp_ok])
3836 case "$ntp_ok$ntp_canparse" in
3838 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3841 AC_MSG_CHECKING([DCF77 raw time code])
3846 [s DCF77 raw time code]
3848 [ntp_ok=$enableval],
3851 if test "$ntp_ok" = "yes"; then
3856 AC_DEFINE([CLOCK_RAWDCF], [1], [DCF77 raw time code])
3858 AC_MSG_RESULT([$ntp_ok])
3859 case "$ntp_ok$ntp_canparse" in
3861 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3864 case "$ntp_rawdcf" in
3866 AC_CACHE_CHECK([if we must enable parity for RAWDCF],
3867 [ntp_cv_rawdcf_parity],
3875 ntp_cv_rawdcf_parity=$ans
3878 case "$ntp_cv_rawdcf_parity" in
3880 AC_DEFINE([RAWDCF_NO_IGNPAR], [1],
3881 [Should we not IGNPAR (Linux)?]) ;;
3885 AC_MSG_CHECKING([RCC 8000 clock])
3892 [ntp_ok=$enableval],
3895 if test "$ntp_ok" = "yes"; then
3898 AC_DEFINE([CLOCK_RCC8000], [1], [RCC 8000 clock])
3900 AC_MSG_RESULT([$ntp_ok])
3901 case "$ntp_ok$ntp_canparse" in
3903 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3906 AC_MSG_CHECKING([Schmid DCF77 clock])
3911 [s Schmid DCF77 clock]
3913 [ntp_ok=$enableval],
3916 if test "$ntp_ok" = "yes"; then
3919 AC_DEFINE([CLOCK_SCHMID], [1], [Schmid DCF77 clock])
3921 AC_MSG_RESULT([$ntp_ok])
3922 case "$ntp_ok$ntp_canparse" in
3924 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3927 AC_MSG_CHECKING([Trimble GPS receiver/TAIP protocol])
3931 [--enable-TRIMTAIP],
3932 [s Trimble GPS receiver/TAIP protocol]
3934 [ntp_ok=$enableval],
3937 if test "$ntp_ok" = "yes"; then
3940 AC_DEFINE([CLOCK_TRIMTAIP], [1],
3941 [Trimble GPS receiver/TAIP protocol])
3943 AC_MSG_RESULT([$ntp_ok])
3944 case "$ntp_ok$ntp_canparse" in
3946 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3949 AC_MSG_CHECKING([Trimble GPS receiver/TSIP protocol])
3953 [--enable-TRIMTSIP],
3954 [s Trimble GPS receiver/TSIP protocol]
3956 [ntp_ok=$enableval],
3959 if test "$ntp_ok" = "yes"; then
3962 AC_DEFINE([CLOCK_TRIMTSIP], [1],
3963 [Trimble GPS receiver/TSIP protocol])
3965 AC_MSG_RESULT([$ntp_ok])
3966 case "$ntp_ok$ntp_canparse" in
3968 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3971 AC_MSG_CHECKING([WHARTON 400A Series clock])
3976 [s WHARTON 400A Series clock]
3978 [ntp_ok=$enableval],
3981 if test "$ntp_ok" = "yes"; then
3984 AC_DEFINE([CLOCK_WHARTON_400A], [1], [WHARTON 400A Series clock])
3986 AC_MSG_RESULT([$ntp_ok])
3987 case "$ntp_ok$ntp_canparse" in
3989 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
3992 AC_MSG_CHECKING([VARITEXT clock])
3996 [--enable-VARITEXT],
3999 [ntp_ok=$enableval],
4002 if test "$ntp_ok" = "yes"; then
4005 AC_DEFINE([CLOCK_VARITEXT], [1], [VARITEXT clock])
4007 AC_MSG_RESULT([$ntp_ok])
4008 case "$ntp_ok$ntp_canparse" in
4010 AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
4013 AC_SUBST([LIBPARSE])
4014 AC_SUBST([MAKE_LIBPARSE])
4015 AC_SUBST([MAKE_LIBPARSE_KERNEL])
4016 AC_SUBST([MAKE_CHECK_Y2K])
4018 AC_MSG_CHECKING([if we need to make and use the parse libraries])
4020 case "$ntp_libparse" in
4023 AC_DEFINE([CLOCK_PARSE], [1], [PARSE driver interface])
4024 LIBPARSE=../libparse/libparse.a
4025 MAKE_LIBPARSE=libparse.a
4026 # HMS: check_y2k trips the 34 year problem now...
4027 false && MAKE_CHECK_Y2K=check_y2k
4029 AC_MSG_RESULT([$ans])
4033 AC_MSG_CHECKING([if we want to compile with ElectricFence])
4037 [--with-electricfence],
4038 [- compile with ElectricFence malloc debugger]
4046 LIBS="$LIBS \${top_builddir}/ElectricFence/libefence.a"
4047 EF_PROGS="eftest tstheap"
4048 AC_SUBST([EF_PROGS])
4054 AC_MSG_RESULT([$ans])
4056 AC_SUBST([MAKE_CHECK_LAYOUT])
4057 AC_MSG_CHECKING([if we want to run check-layout])
4058 case "$cross_compiling$PATH_PERL" in
4060 MAKE_CHECK_LAYOUT=check-layout
4067 AC_MSG_RESULT([$ans])
4071 AC_MSG_CHECKING([if we can make dcf parse utilities])
4073 if test "$ntp_parseutil" = "yes"; then
4075 *-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*)
4081 AC_MSG_RESULT([$ans])
4083 AC_SUBST([MAKE_PARSEKMODULE])
4084 AC_MSG_CHECKING([if we can build kernel streams modules for parse])
4086 case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
4090 case "$ntp_cv_var_kernel_pll" in
4092 AC_DEFINE([PPS_SYNC], [1], [PARSE kernel PLL PPS support])
4096 MAKE_PARSEKMODULE=parsestreams.loadable_module.o
4100 MAKE_PARSEKMODULE=parse
4101 AC_CHECK_HEADERS([strings.h])
4106 AC_MSG_RESULT([$ans])
4108 AC_MSG_CHECKING([if we need basic refclock support])
4109 if test "$ntp_refclock" = "yes"; then
4110 AC_DEFINE([REFCLOCK], [1], [Basic refclock support?])
4112 AC_MSG_RESULT($ntp_refclock)
4114 dnl Things that can be made in clockstuff/
4115 AC_SUBST([PROPDELAY]) dnl Set to "propdelay"
4116 AC_SUBST([CHUTEST]) dnl Set to "chutest"
4117 AC_SUBST([CLKTEST]) dnl Set to "clktest"
4119 AC_SUBST([MAKE_ADJTIMED])
4120 AC_MSG_CHECKING([if we want HP-UX adjtimed support])
4128 if test "$ans" = "yes"; then
4129 MAKE_ADJTIMED=adjtimed
4130 AC_DEFINE([NEED_HPUX_ADJTIME], [1],
4131 [Do we need HPUX adjtime() library support?])
4133 AC_MSG_RESULT([$ans])
4135 AC_MSG_CHECKING([if we want QNX adjtime support])
4143 if test "$ans" = "yes"; then
4144 AC_DEFINE([NEED_QNX_ADJTIME], [1],
4145 [Do we need the qnx adjtime call?])
4147 AC_MSG_RESULT([$ans])
4149 AC_MSG_CHECKING([if we can read kmem])
4151 # the default is to enable it if the system has the capability
4153 case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
4161 *-*-domainos) # Won't be found...
4181 # --enable-kmem / --disable-kmem controls if present
4186 [s read /dev/kmem for tick and/or tickadj]
4191 AC_MSG_RESULT([$ans])
4199 AC_DEFINE([NOKMEM], [1], [Should we NOT read /dev/kmem?])
4203 AC_MSG_CHECKING([if adjtime is accurate])
4205 # target-dependent defaults
4214 mips-sgi-irix[[456]]*)
4226 *-*-solaris2.[[01]])
4238 # --enable-accurate-adjtime / --disable-accurate-adjtime
4239 # override the default
4243 [--enable-accurate-adjtime],
4244 [s the adjtime() call is accurate]
4249 AC_MSG_RESULT([$ans])
4253 AC_DEFINE([ADJTIME_IS_ACCURATE], [1], [Is adjtime() accurate?])
4254 adjtime_is_accurate=yes
4257 adjtime_is_accurate=no
4262 [the name of 'tick' in the kernel],
4263 [ntp_cv_nlist_tick],
4267 m68*-hp-hpux*) # HP9000/300?
4295 ntp_cv_nlist_tick=$ans
4298 case "$ntp_cv_nlist_tick" in
4300 ;; # HMS: I think we can only get 'no' here...
4302 AC_DEFINE_UNQUOTED([K_TICK_NAME], ["$ntp_cv_nlist_tick"],
4303 [What is the name of TICK in the kernel?])
4307 [for the units of 'tick'],
4316 ntp_cv_tick_nano=$ans
4319 case "$ntp_cv_tick_nano" in
4321 AC_DEFINE([TICK_NANO], [1], [Is K_TICK_NAME in nanoseconds?])
4325 [the name of 'tickadj' in the kernel],
4326 [ntp_cv_nlist_tickadj],
4330 m68*-hp-hpux*) # HP9000/300?
4361 ans=no # hrestime_adj
4367 ntp_cv_nlist_tickadj=$ans
4370 case "$ntp_cv_nlist_tickadj" in
4372 ;; # HMS: I think we can only get 'no' here...
4374 AC_DEFINE_UNQUOTED([K_TICKADJ_NAME], ["$ntp_cv_nlist_tickadj"],
4375 [What is the name of TICKADJ in the kernel?])
4379 [for the units of 'tickadj'],
4380 [ntp_cv_tickadj_nano],
4388 ntp_cv_tickadj_nano=$ans
4391 case "$ntp_cv_tickadj_nano" in
4393 AC_DEFINE([TICKADJ_NANO], [1], [Is K_TICKADJ_NAME in nanoseconds?])
4397 [half-heartedly for 'dosynctodr' in the kernel],
4398 [ntp_cv_nlist_dosynctodr],
4438 ntp_cv_nlist_dosynctodr=$ans
4441 case "$ntp_cv_nlist_dosynctodr" in
4445 AC_DEFINE_UNQUOTED([K_DOSYNCTODR_NAME], ["$ntp_cv_nlist_dosynctodr"],
4446 [What is (probably) the name of DOSYNCTODR in the kernel?])
4451 [half-heartedly for 'noprintf' in the kernel],
4452 [ntp_cv_nlist_noprintf],
4486 ntp_cv_nlist_noprintf=$ans
4489 case "$ntp_cv_nlist_noprintf" in
4493 AC_DEFINE_UNQUOTED([K_NOPRINTF_NAME], ["$ntp_cv_nlist_noprintf"],
4494 [What is (probably) the name of NOPRINTF in the kernel?])
4498 dnl The tick/tickadj sections were written by Skippy, who never learned
4499 dnl that it's impolite (horridly gross) to show your guts in public.
4502 dnl 10000 80 Unixware
4503 dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE
4504 dnl 10000 150 sgi IRIX
4505 dnl 1000000L/hz 1000 RS6000 && NOKMEM
4506 dnl 1000000L/hz 668 DOMAINOS && NOKMEM
4507 dnl 1000000L/hz 500/HZ other && NOKMEM
4508 dnl txc.tick 1 Linux
4509 dnl (every / 10) 50 WinNT - tickadj is roughly 500/hz
4510 dnl 1000000L/hz (nlist) (Solaris && !ADJTIME_IS_ACCURATE),
4511 dnl (RS6000 && !NOKMEM), SINIX MIPS
4513 dnl But we'll only use these "values" if we can't find anything else.
4515 AC_MSG_CHECKING([for a default value for 'tick'])
4517 # target-dependent default for tick
4521 AC_MSG_ERROR([tick needs work for cygwin])
4549 [--enable-tick=VALUE],
4550 [s force a value for 'tick']
4555 AC_MSG_RESULT([$ans])
4559 ;; # HMS: I think we can only get 'no' here...
4561 AC_DEFINE_UNQUOTED([PRESET_TICK], [$ans],
4562 [Preset a value for 'tick'?])
4565 AC_MSG_CHECKING([for a default value for 'tickadj'])
4567 # target-specific default
4571 case "$adjtime_is_accurate" in
4585 *-*-domainos) # Skippy: won't be found...
4592 case "$adjtime_is_accurate" in
4616 [--enable-tickadj=VALUE],
4617 [s force a value for 'tickadj']
4622 AC_MSG_RESULT([$ans])
4624 default_tickadj=$ans
4626 case "$default_tickadj" in
4628 ;; # HMS: I think we can only get 'no' here...
4630 AC_DEFINE_UNQUOTED([PRESET_TICKADJ], [$default_tickadj],
4631 [Preset a value for 'tickadj'?]) ;;
4634 # Newer versions of ReliantUNIX round adjtime() values down to
4635 # 1/100s (system tick). Sigh ...
4636 # Unfortunately, there is no easy way to know if particular release
4637 # has this "feature" or any obvious way to test for it.
4640 AC_DEFINE([RELIANTUNIX_CLOCK], [1],
4641 [Do we want the ReliantUNIX clock hacks?])
4646 AC_DEFINE([SCO5_CLOCK], [1], [Do we want the SCO clock hacks?])
4649 ntp_cv_make_tickadj=yes
4650 case "$can_kmem$ac_cv_var_tick$default_tickadj" in
4651 nonono) # Don't read KMEM, no presets. Bogus.
4652 AC_MSG_WARN([Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj.])
4653 ntp_cv_make_tickadj=no
4655 nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
4656 AC_MSG_WARN([Can't read kmem but no PRESET_TICK. No tickadj.])
4657 ntp_cv_make_tickadj=no
4659 no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus.
4660 AC_MSG_WARN([Can't read kmem but no PRESET_TICKADJ. No tickadj.])
4661 ntp_cv_make_tickadj=no
4663 no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool.
4665 yesnono) # Read KMEM, no presets. Cool.
4667 yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
4668 AC_MSG_WARN([PRESET_TICKADJ is defined but not PRESET_TICK. Please report this.])
4670 yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool.
4672 yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
4674 *) # Generally bogus.
4675 AC_MSG_ERROR([This shouldn't happen.])
4679 AC_SUBST(MAKE_NTPTIME)
4680 AC_CACHE_CHECK([if we want and can make the ntptime utility], ac_cv_make_ntptime,
4682 *) case "$ntp_cv_struct_ntptimeval$ntp_cv_var_kernel_pll" in
4692 ac_cv_make_ntptime=$ans])
4693 case "$ac_cv_make_ntptime" in
4695 MAKE_NTPTIME=ntptime
4699 AC_SUBST([MAKE_TICKADJ])
4702 # tickadj is pretty useless on newer versions of ReliantUNIX
4704 ntp_cv_make_tickadj=no
4707 ntp_cv_make_tickadj=no
4710 # DLM says tickadj is a no-no starting with solaris2.5
4712 *-*-solaris2.1[[0-9]]*)
4713 ntp_cv_make_tickadj=no
4715 *-*-solaris2.[[0-4]]*) ;;
4716 *) ntp_cv_make_tickadj=no ;;
4720 ntp_cv_make_tickadj=no
4725 # Despite all the above, we always make tickadj. Setting
4726 # ntp_cv_make_tickadj before AC_CACHE_CHECK will cause a false
4727 # report that the configuration variable was cached. It may
4728 # be better to simply remove the hunk above, I did not want
4729 # to remove it if there is hope it will be used again.
4731 AS_UNSET([ntp_cv_make_tickadj])
4734 [if we want and can make the tickadj utility],
4735 [ntp_cv_make_tickadj],
4736 [ntp_cv_make_tickadj=yes]
4738 case "$ntp_cv_make_tickadj" in
4740 MAKE_TICKADJ=tickadj
4743 AC_SUBST([MAKE_TIMETRIM])
4745 [if we want and can make the timetrim utility],
4746 [ntp_cv_make_timetrim],
4750 ntp_cv_make_timetrim=yes
4753 ntp_cv_make_timetrim=yes
4756 ntp_cv_make_timetrim=no
4761 case "$ntp_cv_make_timetrim" in
4763 MAKE_TIMETRIM=timetrim
4766 AC_SUBST([MAKE_LIBNTPSIM])
4767 AC_SUBST([MAKE_NTPDSIM])
4769 AC_MSG_CHECKING([if we want to build the NTPD simulator])
4773 [--enable-simulator],
4774 [- build/install the NTPD simulator?]
4779 AC_MSG_RESULT([$ans])
4782 MAKE_NTPDSIM=ntpdsim
4783 MAKE_LIBNTPSIM=libntpsim.a
4791 LDFLAGS="$LDFLAGS -r"
4798 AC_MSG_CHECKING([if we want to build ntpsnmpd])
4803 [s Build ntpsnmpd MIB agent?]
4807 case "$PATH_NET_SNMP_CONFIG" in
4813 AC_MSG_RESULT([$ans])
4816 case "$PATH_NET_SNMP_CONFIG" in
4818 SNMP_LIBS=`$PATH_NET_SNMP_CONFIG --agent-libs`
4819 AC_SUBST([SNMP_LIBS])
4820 # HMS: we really want to separate CPPFLAGS and CFLAGS
4821 foo=`$PATH_NET_SNMP_CONFIG --cflags`
4827 SNMP_CPPFLAGS="$SNMP_CPPFLAGS $i"
4829 *) SNMP_CFLAGS="$SNMP_CFLAGS $i"
4833 AC_SUBST([SNMP_CPPFLAGS])
4834 AC_SUBST([SNMP_CFLAGS])
4837 save_CPPFLAGS=$CPPFLAGS
4840 CPPFLAGS=$SNMP_CPPFLAGS
4843 [net-snmp/net-snmp-config.h],
4844 [MAKE_NTPSNMPD=ntpsnmpd],
4845 [AC_MSG_WARN([net-snmp-config present but net-snmp headers are not available!])]
4848 # Do this last, as we're messing up LIBS.
4849 # check -lnetsnmp for netsnmp_daemonize
4850 LIBS=`$PATH_NET_SNMP_CONFIG --libs`
4853 [netsnmp_daemonize],
4859 AC_DEFINE([NEED_NETSNMP_DAEMONIZE], [1],
4860 [We need to provide netsnmp_daemonize()])
4864 CPPFLAGS=$save_CPPFLAGS
4868 AC_MSG_WARN([Cannot build ntpsnmpd - net-snmp-config cannot be found])
4873 AC_SUBST([MAKE_NTPSNMPD])
4876 AC_MSG_CHECKING([if we should always slew the time])
4878 # target-specific defaults
4890 *-*-openvms*) # HMS: won't be found
4897 # --enable-slew-always / --disable-slew-always overrides default
4902 [--enable-slew-always],
4903 [s always slew the time]
4908 AC_MSG_RESULT([$ans])
4912 AC_DEFINE([SLEWALWAYS], [1], [Slew always?])
4915 AC_MSG_CHECKING([if we should step and slew the time])
4927 *-*-solaris2.1[[0-9]]*)
4930 *-*-solaris2.[[012]]*)
4933 *-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
4943 [--enable-step-slew],
4944 [s step and slew the time]
4949 AC_MSG_RESULT([$ans])
4953 AC_DEFINE([STEP_SLEW], [1], [Step, then slew the clock?])
4956 AC_MSG_CHECKING([if ntpdate should step the time])
4968 [--enable-ntpdate-step],
4969 [s if ntpdate should step the time]
4974 AC_MSG_RESULT([$ans])
4978 AC_DEFINE([FORCE_NTPDATE_STEP], [1],
4979 [force ntpdate to step the clock if !defined(STEP_SLEW) ?])
4983 AC_MSG_CHECKING([if we should sync TODR clock every hour])
4989 *-*-openvms*) # HMS: won't be found
4999 [--enable-hourly-todr-sync],
5000 [s if we should sync TODR hourly]
5005 AC_MSG_RESULT([$ans])
5007 case "$ac_cv_var_sync_todr" in
5009 AC_DEFINE([DOSYNCTODR], [1], [synch TODR hourly?]) ;;
5013 AC_MSG_CHECKING([if we should avoid kernel FLL bug])
5026 # Generic_105181-17 and higher
5046 # Generic_106541-07 and higher
5063 [--enable-kernel-fll-bug],
5064 [s if we should avoid a kernel FLL bug]
5069 AC_MSG_RESULT([$ans])
5073 AC_DEFINE([KERNEL_FLL_BUG], [1], [Does the kernel have an FLL bug?])
5077 AC_MSG_CHECKING([if we want new session key behavior])
5081 [--enable-bug1243-fix],
5082 [+ use unmodified autokey session keys]
5087 AC_MSG_RESULT([$ans])
5090 AC_DEFINE([DISABLE_BUG1243_FIX], [1],
5091 [use old autokey session key behavior?])
5095 AC_MSG_CHECKING([if we should use the IRIG sawtooth filter])
5098 *-*-solaris2.[[89]])
5101 *-*-solaris2.1[[0-9]]*)
5110 [--enable-irig-sawtooth],
5111 [s if we should enable the IRIG sawtooth filter]
5116 AC_MSG_RESULT([$ans])
5120 AC_DEFINE([IRIG_SUCKS], [1],
5121 [Should we use the IRIG sawtooth filter?])
5125 AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
5131 [- if we should enable the NIST lockclock scheme]
5137 AC_MSG_RESULT([$ans])
5141 AC_DEFINE([LOCKCLOCK], [1],
5142 [Should we align with the NIST lockclock scheme?]) ;;
5146 AC_MSG_CHECKING([if we want support for Samba's signing daemon])
5151 [--enable-ntp-signd],
5152 [- Provide support for Samba's signing daemon, =/var/run/ntp_signd]
5158 AC_MSG_RESULT([$ans])
5165 ntp_signd_path=/var/run/ntp_signd
5168 ntp_signd_path="$ans"
5171 case "$ntp_signd_path" in
5175 AC_DEFINE([HAVE_NTP_SIGND], [1],
5176 [Do we want support for Samba's signing daemon?])
5177 AC_DEFINE_UNQUOTED([NTP_SIGND_PATH], ["$ntp_signd_path"],
5178 [Path to sign daemon rendezvous socket])
5182 AC_CHECK_HEADERS([sys/clockctl.h])
5195 [--enable-clockctl],
5196 [s Use /dev/clockctl for non-root clock control]
5198 [ntp_use_dev_clockctl=$enableval],
5199 [ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h]
5202 AC_MSG_CHECKING([[if we should use /dev/clockctl]])
5203 AC_MSG_RESULT([$ntp_use_dev_clockctl])
5206 AC_CHECK_HEADERS([sys/capability.h sys/prctl.h])
5208 AC_MSG_CHECKING([if we have linux capabilities (libcap)])
5210 case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
5214 ntp_have_linuxcaps=no
5216 *) ntp_have_linuxcaps=yes
5221 ntp_have_linuxcaps=no
5228 [--enable-linuxcaps],
5229 [+ Use Linux capabilities for non-root clock control]
5231 [ntp_have_linuxcaps=$enableval]
5234 AC_MSG_RESULT([$ntp_have_linuxcaps])
5236 case "$ntp_have_linuxcaps" in
5238 AC_DEFINE([HAVE_LINUX_CAPABILITIES], [1],
5239 [Do we have Linux capabilities?])
5243 case "$ntp_use_dev_clockctl$ntp_have_linuxcaps" in
5245 AC_DEFINE([HAVE_DROPROOT], [1],
5246 [Can we drop root privileges?])
5250 AC_CHECK_HEADERS([libscf.h])
5252 case "$ac_cv_header_libscf_h" in
5265 AC_DEFINE([HAVE_SOLARIS_PRIVS], [1],
5266 [Are Solaris privileges available?])
5271 [struct sockaddr for sa_len],
5272 [isc_cv_platform_havesalen],
5276 #include <sys/types.h>
5277 #include <sys/socket.h>
5280 extern struct sockaddr *ps;
5284 [isc_cv_platform_havesalen=yes],
5285 [isc_cv_platform_havesalen=no]
5288 case "$isc_cv_platform_havesalen" in
5290 AC_DEFINE([ISC_PLATFORM_HAVESALEN], [1],
5291 [struct sockaddr has sa_len?])
5302 case "$enable_ipv6" in
5308 AC_DEFINE([WANT_IPV6], [1], [configure --enable-ipv6])
5317 dnl [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion)
5320 AC_DEFINE([__APPLE_USE_RFC_3542], [1], [Are we _special_?])
5325 [for IPv6 structures],
5326 [isc_cv_found_ipv6],
5330 #include <sys/types.h>
5331 #include <sys/socket.h>
5332 #include <netinet/in.h>
5335 struct sockaddr_in6 sin6;
5338 [isc_cv_found_ipv6=yes],
5339 [isc_cv_found_ipv6=no]
5344 # See whether IPv6 support is provided via a Kame add-on.
5345 # This is done before other IPv6 linking tests so LIBS is properly set.
5347 AC_MSG_CHECKING([for Kame IPv6 support])
5354 [use_kame="$withval"],
5361 kame_path=/usr/local/v6
5364 kame_path="$use_kame"
5372 if test -f $kame_path/lib/libinet6.a; then
5373 AC_MSG_RESULT([$kame_path/lib/libinet6.a])
5374 LIBS="-L$kame_path/lib -linet6 $LIBS"
5376 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
5378 Please choose the proper path with the following command:
5380 configure --with-kame=PATH
5387 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
5388 # Including it on Kame-using platforms is very bad, though, because
5389 # Kame uses #error against direct inclusion. So include it on only
5390 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
5391 # This is done before the in6_pktinfo check because that's what
5392 # netinet6/in6.h is needed for.
5396 AC_DEFINE([ISC_PLATFORM_NEEDNETINET6IN6H], [1],
5397 [Do we need netinet6/in6.h?])
5398 isc_netinet6in6_hack="#include <netinet6/in6.h>"
5401 isc_netinet6in6_hack=""
5406 # This is similar to the netinet6/in6.h issue.
5409 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
5410 AC_DEFINE([ISC_PLATFORM_FIXIN6ISADDR], [1],
5411 [Do we need to fix in6isaddr?])
5412 isc_netinetin6_hack="#include <netinet/in6.h>"
5415 isc_netinetin6_hack=""
5420 case "$isc_cv_found_ipv6" in
5422 AC_DEFINE([ISC_PLATFORM_HAVEIPV6], [1], [have IPv6?])
5425 [isc_cv_have_in6_pktinfo],
5429 #include <sys/types.h>
5430 #include <sys/socket.h>
5431 #include <netinet/in.h>
5432 $isc_netinetin6_hack
5433 $isc_netinet6in6_hack
5436 struct in6_pktinfo xyzzy;
5439 [isc_cv_have_in6_pktinfo=yes],
5440 [isc_cv_have_in6_pktinfo=no]
5443 case "$isc_cv_have_in6_pktinfo" in
5445 AC_DEFINE([ISC_PLATFORM_HAVEIN6PKTINFO], [1],
5446 [have struct in6_pktinfo?])
5450 # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
5452 [for sockaddr_in6.sin6_scope_id],
5453 [isc_cv_have_sin6_scope_id],
5457 #include <sys/types.h>
5458 #include <sys/socket.h>
5459 #include <netinet/in.h>
5460 $isc_netinetin6_hack
5461 $isc_netinet6in6_hack
5464 struct sockaddr_in6 xyzzy;
5465 xyzzy.sin6_scope_id = 0;
5468 [isc_cv_have_sin6_scope_id=yes],
5469 [isc_cv_have_sin6_scope_id=no]
5473 case "$isc_cv_have_sin6_scope_id" in
5475 AC_DEFINE([ISC_PLATFORM_HAVESCOPEID], [1], [sin6_scope_id?])
5480 # We need this check run even without isc_cv_found_ipv6=yes
5484 [isc_cv_have_in6addr_any],
5488 #include <sys/types.h>
5489 #include <sys/socket.h>
5490 #include <netinet/in.h>
5491 $isc_netinetin6_hack
5492 $isc_netinet6in6_hack
5495 struct in6_addr in6;
5499 [isc_cv_have_in6addr_any=yes],
5500 [isc_cv_have_in6addr_any=no]
5504 case "$isc_cv_have_in6addr_any" in
5506 AC_DEFINE([ISC_PLATFORM_NEEDIN6ADDRANY], [1], [missing in6addr_any?])
5511 [for struct if_laddrconf],
5512 [isc_cv_struct_if_laddrconf],
5516 #include <sys/types.h>
5517 #include <net/if6.h>
5520 struct if_laddrconf a;
5523 [isc_cv_struct_if_laddrconf=yes],
5524 [isc_cv_struct_if_laddrconf=no]
5528 case "$isc_cv_struct_if_laddrconf" in
5530 AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRCONF], [1],
5531 [have struct if_laddrconf?])
5535 [for struct if_laddrreq],
5536 isc_cv_struct_if_laddrreq,
5540 #include <sys/types.h>
5541 #include <net/if6.h>
5544 struct if_laddrreq a;
5547 [isc_cv_struct_if_laddrreq=yes],
5548 [isc_cv_struct_if_laddrreq=no]
5552 case "$isc_cv_struct_if_laddrreq" in
5554 AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRREQ], [1],
5555 [have struct if_laddrreq?])
5559 # Look for a sysctl call to get the list of network interfaces.
5562 [for interface list sysctl],
5563 [ntp_cv_iflist_sysctl],
5567 #include <sys/param.h>
5568 #include <sys/sysctl.h>
5569 #include <sys/socket.h>
5570 #ifdef NET_RT_IFLIST
5574 [ntp_cv_iflist_sysctl=yes],
5575 [ntp_cv_iflist_sysctl=no]
5578 case "$ntp_cv_iflist_sysctl" in
5580 AC_DEFINE([HAVE_IFLIST_SYSCTL], [1], [have iflist_sysctl?])
5585 AC_MSG_CHECKING([if we want the saveconfig mechanism])
5589 [--enable-saveconfig],
5590 [+ saveconfig mechanism]
5592 [ntp_ok=$enableval],
5595 ntp_saveconfig_enabled=0
5596 if test "$ntp_ok" = "yes"; then
5597 ntp_saveconfig_enabled=1
5598 AC_DEFINE([SAVECONFIG], [1], [saveconfig mechanism])
5600 AM_CONDITIONAL([SAVECONFIG_ENABLED], [test x$ntp_saveconfig_enabled = x1])
5601 AC_MSG_RESULT([$ntp_ok])
5605 AC_DEFINE_DIR([NTP_KEYSDIR], [sysconfdir],
5606 [Default location of crypto key info])
5608 AC_CONFIG_FILES([Makefile])
5609 AC_CONFIG_FILES([ElectricFence/Makefile])
5610 AC_CONFIG_FILES([adjtimed/Makefile])
5611 AC_CONFIG_FILES([clockstuff/Makefile])
5612 AC_CONFIG_FILES([include/Makefile])
5613 AC_CONFIG_FILES([include/isc/Makefile])
5614 AC_CONFIG_FILES([kernel/Makefile])
5615 AC_CONFIG_FILES([kernel/sys/Makefile])
5616 AC_CONFIG_FILES([libntp/Makefile])
5617 AC_CONFIG_FILES([libparse/Makefile])
5618 AC_CONFIG_FILES([ntpd/Makefile])
5619 AC_CONFIG_FILES([ntpdate/Makefile])
5620 AC_CONFIG_FILES([ntpdc/Makefile])
5621 AC_CONFIG_FILES([ntpdc/nl.pl], [chmod +x ntpdc/nl.pl])
5622 AC_CONFIG_FILES([ntpq/Makefile])
5623 AC_CONFIG_FILES([ntpsnmpd/Makefile])
5624 AC_CONFIG_FILES([parseutil/Makefile])
5625 AC_CONFIG_FILES([scripts/Makefile])
5626 AC_CONFIG_FILES([scripts/calc_tickadj], [chmod +x scripts/calc_tickadj])
5627 AC_CONFIG_FILES([scripts/checktime], [chmod +x scripts/checktime])
5628 AC_CONFIG_FILES([scripts/freq_adj], [chmod +x scripts/freq_adj])
5629 AC_CONFIG_FILES([scripts/html2man], [chmod +x scripts/html2man])
5630 AC_CONFIG_FILES([scripts/mkver], [chmod +x scripts/mkver])
5631 AC_CONFIG_FILES([scripts/ntp-wait], [chmod +x scripts/ntp-wait])
5632 AC_CONFIG_FILES([scripts/ntpsweep], [chmod +x scripts/ntpsweep])
5633 AC_CONFIG_FILES([scripts/ntptrace], [chmod +x scripts/ntptrace])
5634 AC_CONFIG_FILES([scripts/ntpver], [chmod +x scripts/ntpver])
5635 AC_CONFIG_FILES([scripts/plot_summary], [chmod +x scripts/plot_summary])
5636 AC_CONFIG_FILES([scripts/summary], [chmod +x scripts/summary])
5637 AC_CONFIG_FILES([util/Makefile])
5639 AC_CONFIG_SUBDIRS([sntp])