2 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(ntpd/ntp_refclock.c)
5 AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) string])
6 AM_CONFIG_HEADER(config.h)
8 AM_INIT_AUTOMAKE(ntp, 4.1.1b)
9 AC_PREREQ(2.52) # We need the cross-compile-aware SIZEOF stuff.
12 ac_cv_var_oncore_ok=no
13 ac_cv_var_ripe_ncc_ok=no
15 dnl Grab any initial CFLAGS so we can pick better defaults.
18 dnl we need to check for cross compile tools for vxWorks here
25 CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA"
28 CFLAGS="$CFLAGS -DSYS_CYGWIN32"
33 CFLAGS="$CFLAGS -Wc,+abi-socket"
40 CFLAGS="$CFLAGS -std1"
45 CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
46 LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
56 # Quick and dirty sanity check
58 '') AC_MSG_ERROR(Please follow the directions in html/vxworks.html!)
61 CFLAGS="$CFLAGS -DSYS_VXWORKS"
67 dnl we need to check for cross compile tools for vxWorks here
75 CFLAGS="$CFLAGS -Wall"
76 # CFLAGS="$CFLAGS -Wcast-align"
77 CFLAGS="$CFLAGS -Wcast-qual"
78 # CFLAGS="$CFLAGS -Wconversion"
79 # CFLAGS="$CFLAGS -Werror"
80 CFLAGS="$CFLAGS -Wmissing-prototypes"
81 CFLAGS="$CFLAGS -Wpointer-arith"
82 CFLAGS="$CFLAGS -Wshadow"
83 CFLAGS="$CFLAGS -Wstrict-prototypes"
84 # CFLAGS="$CFLAGS -Wtraditional"
85 # CFLAGS="$CFLAGS -Wwrite-strings"
87 AC_CACHE_CHECK(whether ${CC-cc} -pipe works, ac_cv_prog_cc_pipe,
88 [echo 'void f(){}' > conftest.c
89 if test -z "`${CC-cc} -pipe -c conftest.c 2>&1`" -a -s conftest.o; then
90 ac_cv_prog_cc_pipe=yes
97 case "$ac_cv_prog_cc_pipe" in
99 CFLAGS="$CFLAGS -pipe"
105 ac_busted_vpath_in_make=no
109 CFLAGS="$CFLAGS -posix"
111 *-*-irix6.1*) # 64 bit only
114 *-*-irix6*) # 6.2 (and later?)
115 ac_busted_vpath_in_make=yes
116 # don't pass -n32 to gcc, it cannot handle and doesn't need it
117 if test "$GCC" != yes; then
121 *) case "$iCFLAGS" in
122 '') CFLAGS="-O2 -g3 -n32" ;;
123 *) CFLAGS="$CFLAGS -n32" ;;
130 *) LDFLAGS="$LDFLAGS -n32" ;;
135 ac_busted_vpath_in_make=yes
137 dnl This is currently commented out by bor.
138 dnl The new versions of ReliantUNIX round adjtime() interval down
139 dnl to 1/100s (system tick). This makes tickadj actually useless.
140 dnl So, I'd better not use additional flags.
141 dnl I leave it here just in case anybody has better idea
142 dnl mips-sni-sysv4* )
144 dnl # Add flags for 64 bit file access to enable tickadj to access /dev/kmem
146 dnl if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then
147 dnl CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`"
152 case "$ac_busted_vpath_in_make$srcdir" in
155 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
157 AC_MSG_ERROR(building outside of the main directory requires GNU make)
168 AC_PROG_GCC_TRADITIONAL
173 AC_PATH_PROG(PATH_SH, sh)
174 AC_PATH_PROG(PATH_PERL, perl)
180 ac_link="$ac_link $VX_KERNEL"
188 AC_CHECK_LIB(advapi32, main)
191 AC_CHECK_LIB(elf, nlist) dnl Only needed for tickadj...
192 dnl AC_CHECK_LIB(kvm, main, , , -lelf)
193 AC_CHECK_LIB(kvm, main) dnl We already know about -lelf here...
194 AC_CHECK_LIB(ld, nlist)
195 AC_CHECK_LIB(mld, nlist)
196 AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
197 AC_CHECK_FUNC(openlog, ,
198 AC_CHECK_LIB(gen, openlog, ,
199 AC_CHECK_LIB(syslog, openlog, , , -lsocket)))
200 dnl HMS: What a hack...
201 AC_CHECK_HEADERS(readline/history.h readline/readline.h)
202 case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in
204 *) AC_CHECK_LIB(readline, readline, ,
205 AC_MSG_NOTICE([Trying again with -lcurses])
206 unset ac_cv_lib_readline_readline
207 AC_CHECK_LIB(readline, readline,
208 LIBS="-lreadline -lcurses $LIBS"
209 AC_DEFINE(HAVE_LIBREADLINE)
210 AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?])
215 dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
216 dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
217 dnl so only use one of them. Linux (glibc-2.1.2 and -2.2.2, at least)
218 dnl does Strange Things with extra processes using the Posix-compatibility
219 dnl real-time library, so we don't want to use it.
224 AC_CHECK_LIB(rt, sched_setscheduler, ,
225 AC_CHECK_LIB(posix4, sched_setscheduler))
229 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
232 AC_CHECK_HEADERS(bstring.h errno.h fcntl.h ieeefp.h math.h memory.h netdb.h)
233 AC_CHECK_HEADERS(poll.h resolv.h sched.h sgtty.h stdlib.h string.h termio.h)
234 AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h utmp.h utmpx.h)
235 AC_CHECK_HEADERS(arpa/nameser.h net/if.h netinet/in_system.h)
236 AC_CHECK_HEADERS(netinet/in_systm.h netinet/in.h netinet/ip.h)
237 AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO, 1, [NetInfo support?])])
238 AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h)
239 dnl AC_CHECK_HEADERS(sys/chudefs.h)
240 AC_CHECK_HEADERS(sys/clkdefs.h sys/file.h)
243 *) AC_CHECK_HEADERS(sys/ioctl.h)
246 AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h)
247 AC_CHECK_HEADERS(sys/ppstime.h sys/proc.h sys/resource.h sys/sched.h)
250 AC_CHECK_HEADERS(sys/sio.h)
253 AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/sockio.h)
254 AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h)
255 AC_CHECK_HEADERS(sys/stat.h sys/stream.h)
256 AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/syssgi.h sys/termios.h)
257 AC_CHECK_HEADERS(sys/time.h sys/signal.h)
259 [#include <sys/timepps.h>
260 #ifdef PPS_API_VERS_1
263 ], [AC_CHECK_HEADERS(sys/timepps.h)])
264 AC_CHECK_HEADERS(sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.h)
268 AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h)
271 AC_CHECK_HEADERS(machine/inline.h sys/pcl720.h sys/i8253.h)
275 AC_CHECK_HEADER(nlist.h,
276 [AC_DEFINE(NLIST_STRUCT, 1, [nlist stuff])
277 AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
278 [AC_TRY_COMPILE([#include <nlist.h>],
279 [struct nlist n; n.n_un.n_name = 0;],
280 ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
281 if test $ac_cv_struct_nlist_n_un = yes; then
282 AC_DEFINE(NLIST_NAME_UNION, 1, [does struct nlist use a name union?])
286 AC_CACHE_CHECK(for basic volatile support, ac_cv_c_volatile,
289 ac_cv_c_volatile=yes,
292 case "$ac_cv_c_volatile" in
295 *) AC_DEFINE(volatile, , [Does the compiler like "volatile"?])
301 # Assume that solaris2 is Ansi C...
307 AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes,
309 extern int foo (short);
310 int foo(short i) { return i; }],[
311 int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no)
313 if test "$ac_cv_have_prototypes" = yes; then
314 AC_DEFINE(HAVE_PROTOTYPES, 1, [Are function prototypes OK?])
323 i*86-*-*) # Was i*86-*-vxworks*
327 AC_DEFINE(WORDS_BIGENDIAN)
329 *) AC_MSG_ERROR(Cross-compiling needs explicit byte order)
337 AC_CHECK_TYPE(time_t, long)
340 AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz,
341 [ac_cv_var_default_hz=100
343 alpha*-dec-osf4*|alpha*-dec-osf5*)
344 ac_cv_var_default_hz=1024
347 ac_cv_var_default_hz=256
350 AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz, [What is the fallback value for HZ?])
352 AC_CACHE_CHECK(if we need to override the system's value for HZ, ac_cv_var_override_hz,
353 [ac_cv_var_override_hz=no
355 alpha*-dec-osf4*|alpha*-dec-osf5*)
356 ac_cv_var_override_hz=yes
359 ac_cv_var_override_hz=yes
362 ac_cv_var_override_hz=yes
365 ac_cv_var_override_hz=yes
368 case "$ac_cv_var_override_hz" in
370 AC_DEFINE(OVERRIDE_HZ, 1, [Do we need to override the system's idea of HZ?])
374 dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
375 dnl [AC_TRY_LINK([#include <sys/types.h>
376 dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;],
377 dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)])
378 dnl if test $su_cv_func_ut_host_in_utmp = yes; then
379 dnl AC_DEFINE(HAVE_UT_HOST)
382 dnl AC_MSG_CHECKING(if we can get the system boot time)
383 dnl AC_CACHE_VAL(su_cv_have_boot_time,
384 dnl [AC_EGREP_CPP(yes,
385 dnl [#ifdef HAVE_UTMPX_H
386 dnl #include <utmpx.h>
388 dnl #include <utmp.h>
393 dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)])
394 dnl AC_MSG_RESULT($su_cv_have_boot_time)
397 struct sigaction for sa_sigaction,
398 ac_cv_struct_sigaction_has_sa_sigaction,
401 [#include <signal.h>],
402 [struct sigaction act; act.sa_sigaction = 0;],
403 ac_cv_struct_sigaction_has_sa_sigaction=yes,
404 ac_cv_struct_sigaction_has_sa_sigaction=no
408 if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
409 AC_DEFINE(HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION, 1, [Obvious...])
412 AC_CACHE_CHECK(for struct ppsclockev, ac_cv_struct_ppsclockev,
414 #include <sys/types.h>
415 #ifdef HAVE_SYS_TERMIOS_H
416 # include <sys/termios.h>
418 #ifdef HAVE_SYS_TIME_H
419 # include <sys/time.h>
421 #ifdef HAVE_SYS_PPSCLOCK_H
422 # include <sys/ppsclock.h>
424 extern struct ppsclockev *pce;
425 return pce->serial;],
426 ac_cv_struct_ppsclockev=yes,
427 ac_cv_struct_ppsclockev=no)
429 if test $ac_cv_struct_ppsclockev = yes; then
430 AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV, 1, [Does a system header define struct ppsclockev?])
433 AC_CACHE_CHECK(struct sockaddr for sa_len, ac_cv_struct_sockaddr_has_sa_len,
435 #include <sys/types.h>
436 #include <sys/socket.h>],[
437 extern struct sockaddr *ps;
439 ac_cv_struct_sockaddr_has_sa_len=yes,
440 ac_cv_struct_sockaddr_has_sa_len=no)
442 if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
443 AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR, 1, [Should be obvious...])
446 case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
448 AC_CACHE_CHECK([for struct snd_size], ac_cv_struct_snd_size,
450 #ifdef HAVE_MACHINE_SOUNDCARD_H
451 # include <machine/soundcard.h>
453 #ifdef HAVE_SYS_SOUNDCARD_H
454 # include <sys/soundcard.h>
456 extern struct snd_size *ss;
457 return ss->rec_size;],
458 ac_cv_struct_snd_size=yes,
459 ac_cv_struct_snd_size=no)
461 case "$ac_cv_struct_snd_size" in
462 yes) AC_DEFINE(HAVE_STRUCT_SND_SIZE, 1,[Do we have struct snd_size?]) ;;
467 AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz,
469 #include <sys/time.h>],[
470 extern struct clockinfo *pc;
472 ac_cv_struct_clockinfo_has_hz=yes,
473 ac_cv_struct_clockinfo_has_hz=no)
475 if test $ac_cv_struct_clockinfo_has_hz = yes; then
476 AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
479 AC_CACHE_CHECK(struct clockinfo for tickadj, ac_cv_struct_clockinfo_has_tickadj,
481 #include <sys/time.h>],[
482 extern struct clockinfo *pc;
483 return pc->tickadj;],
484 ac_cv_struct_clockinfo_has_tickadj=yes,
485 ac_cv_struct_clockinfo_has_tickadj=no)
487 if test $ac_cv_struct_clockinfo_has_tickadj = yes; then
488 AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
491 AC_CACHE_CHECK([for struct timespec], ac_cv_struct_timespec,
493 #include <sys/time.h>
494 /* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */
498 #ifdef HAVE_SYS_TIMEPPS_H
499 # define FRAC 4294967296
500 # include <sys/timepps.h>
502 [struct timespec n;],
503 ac_cv_struct_timespec=yes, ac_cv_struct_timespec=no)])
504 if test $ac_cv_struct_timespec = yes; then
505 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, [Do we have struct timespec?])
508 AC_CACHE_CHECK([for struct ntptimeval], ac_cv_struct_ntptimeval,
510 #include <sys/time.h>
511 #include <sys/timex.h>],
512 [struct ntptimeval n;],
513 ac_cv_struct_ntptimeval=yes, ac_cv_struct_ntptimeval=no)])
514 if test $ac_cv_struct_ntptimeval = yes; then
515 AC_DEFINE(HAVE_STRUCT_NTPTIMEVAL, 1, [Do we have struct ntptimeval?])
518 AC_CHECK_MEMBERS([struct ntptimeval.time.tv_nsec], , ,
519 [#ifdef HAVE_SYS_TIME_H
520 #include <sys/time.h>
526 #ifdef HAVE_SYS_TIMEX_H
527 #include <sys/timex.h>
535 AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
536 AC_CHECK_SIZEOF(signed char)
538 AC_CHECK_SIZEOF(long)
540 AC_CHECK_TYPES([s_char])
541 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
543 # We have a typedef for s_char. Might as well believe it...
546 # We have signed chars, can't say 'signed char', no s_char typedef.
547 AC_DEFINE(NEED_S_CHAR_TYPEDEF, 1, [Do we need an s_char typedef?])
550 # We have signed chars, can say 'signed char', no s_char typedef.
551 AC_DEFINE(NEED_S_CHAR_TYPEDEF)
554 # We have unsigned chars, can't say 'signed char', no s_char typedef.
555 AC_MSG_ERROR(No way to specify a signed character!)
558 # We have unsigned chars, can say 'signed char', no s_char typedef.
559 AC_DEFINE(NEED_S_CHAR_TYPEDEF)
566 AC_CHECK_FUNCS(__adjtimex __ntp_gettime)
571 # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
572 # (returning ENOSYS). I didn't check 4.2. If, in the future,
573 # IBM pulls its thumbs out long enough to implement clock_settime,
574 # this conditional will need to change. Maybe use AC_TRY_RUN
575 # instead to try to set the time to itself and check errno.
577 *) AC_CHECK_FUNCS(clock_gettime clock_settime)
580 AC_CHECK_FUNCS(daemon)
581 AC_CHECK_FUNCS(finite, ,
582 [AC_CHECK_FUNCS(isfinite, ,
583 [AC_MSG_CHECKING(for isfinite with <math.h>)
586 AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)],
588 AC_DEFINE(HAVE_ISFINITE)],
591 AC_CHECK_FUNCS(getbootfile getclock getdtablesize getrusage)
592 AC_CHECK_FUNC(gettimeofday, ,[
594 *-*-mpeix*) ac_cv_func_gettimeofday=yes
600 *) AC_CHECK_FUNCS(getuid)
603 AC_CHECK_FUNCS(hstrerror K_open kvm_open memcpy memmove memset)
606 # Just stubs. Idiots.
608 *) AC_CHECK_FUNCS(mkstemp)
611 AC_CHECK_FUNCS(mktime)
614 # Just a stub. Idiots.
617 # Just a stub in Irix. Idiots.
620 # Apparently there but not working in QNX. Idiots?
623 # Just a stub. Idiots.
625 alpha*-dec-osf4*|alpha*-dec-osf5*)
626 # mlockall is there, as a #define calling memlk via <sys/mman.h>
627 # Not easy to test for - cheat.
628 AC_CHECK_FUNCS(memlk, [ac_cv_func_mlockall='yes'])
629 AC_CHECK_FUNCS(mlockall)
631 *) AC_CHECK_FUNCS(mlockall)
634 AC_CHECK_FUNCS(mrand48 srand48 nice nlist)
639 *) AC_CHECK_FUNCS(ntp_adjtime ntp_gettime)
642 AC_CHECK_FUNCS(plock pututline pututxline readlink rtprio)
643 case "$ac_cv_func_mrand48" in
645 *) AC_REPLACE_FUNCS(random) ;;
649 # Just a stub in AIX 4. Idiots.
652 # Just stubs in solaris2.5. Idiots.
654 *) AC_CHECK_FUNCS(sched_setscheduler)
657 AC_CHECK_FUNCS(setlinebuf setpgid setpriority setsid)
658 AC_CHECK_FUNCS(settimeofday, ,[
660 *-*-mpeix*) ac_cv_func_settimeofday=yes
663 AC_CHECK_FUNCS(setvbuf sigaction)
664 AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl)
665 AC_CHECK_FUNCS(snprintf strdup strerror strstr)
666 AC_CHECK_FUNCS(timegm)
669 # Just stubs. Idiots.
672 # Just stubs. Idiots.
675 # Just stubs. Idiots.
677 *) AC_CHECK_FUNCS(timer_create timer_settime)
684 *) AC_CHECK_FUNCS(umask)
687 AC_CHECK_FUNCS(uname updwtmp updwtmpx vsprintf)
689 AC_CACHE_CHECK(number of arguments to gettimeofday(), ac_cv_func_Xettimeofday_nargs,
690 [AC_TRY_COMPILE([#include <sys/time.h>],[
691 gettimeofday((struct timeval*)0,(struct timezone*)0);
692 settimeofday((struct timeval*)0,(struct timezone*)0);
694 ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1)
696 if test $ac_cv_func_Xettimeofday_nargs = 1; then
697 AC_DEFINE(SYSV_TIMEOFDAY, 1, [Does Xettimeofday take 1 arg?])
700 AC_CACHE_CHECK(number of arguments taken by setpgrp(), ac_cv_func_setpgrp_nargs,
702 #ifdef HAVE_SYS_TYPES_H
703 # include <sys/types.h>
709 ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0)
711 if test $ac_cv_func_setpgrp_nargs = 0; then
712 AC_DEFINE(HAVE_SETPGRP_0, 1, [define if setpgrp takes 0 arguments])
716 CFLAGS="$CFLAGS -I$srcdir/include"
718 AC_CACHE_CHECK(argument pointer type of qsort()'s compare function and base,
719 ac_cv_func_qsort_argtype,
721 #include "l_stdlib.h"
723 #ifdef HAVE_PROTOTYPES
730 extern sortfunc P((const void *, const void *));
733 const void *b; { return 0; }
735 qsort(base, 2, sizeof(char *), sortfunc);
737 ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char)
739 case "$ac_cv_func_qsort_argtype" in
741 AC_DEFINE(QSORT_USES_VOID_P, 1, [Does qsort expect to work on "void *" stuff?])
747 AC_CACHE_CHECK(if we need to declare 'errno', ac_cv_decl_errno,
748 [AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H
752 ac_cv_decl_errno=no, ac_cv_decl_errno=yes)])
753 case "$ac_cv_decl_errno" in
754 yes) AC_DEFINE(DECL_ERRNO, 1, [Declare errno?]) ;;
757 dnl FIXME: from ntpd/ntp_intres.c, but there's no info which header produces
758 dnl the clash. <resolv.h> isn't currently used.
760 dnl (prr) aix 4.3 defines h_errno as (*(int *)h_errno_which()) for
761 dnl MT purposes. This makes the line "extern int h_errno" choke
762 dnl the compiler. Hopefully adding !defined(h_errno) fixes this
763 dnl without breaking any other platforms.
765 AC_CACHE_CHECK(if we may declare 'h_errno', ac_cv_decl_h_errno,
766 [AC_TRY_COMPILE([#include <sys/types.h>
767 #ifdef HAVE_NETINET_IN_H
768 #include <netinet/in.h>
770 #ifdef HAVE_ARPA_NAMESER_H
771 #include <arpa/nameser.h>
779 [extern int h_errno;],
780 ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
781 case "$ac_cv_decl_h_errno" in
782 yes) AC_DEFINE(DECL_H_ERRNO, 1, [Declare h_errno?]) ;;
785 dnl See if char *sys_errlist[] is OK.
786 AC_CACHE_CHECK([[if declaring 'char *sys_errlist[]' is ok]], ac_cv_decl_sys_errlist,
787 [AC_TRY_COMPILE([#include <stdio.h>
791 [extern char *sys_errlist[];
793 ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
794 case "$ac_cv_decl_sys_errlist" in
795 yes) AC_DEFINE(CHAR_SYS_ERRLIST, 1, [Declare char *sys_errlist array]) ;;
798 AC_CACHE_CHECK(if declaring 'syscall()' is ok, ac_cv_decl_syscall,
800 #ifdef HAVE_SYS_TYPES_H
801 # include <sys/types.h>
806 #ifdef HAVE_PROTOTYPES
812 [extern int syscall P((int, ...));],
813 ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)])
814 case "$ac_cv_decl_syscall" in
815 yes) AC_DEFINE(DECL_SYSCALL, 1, [Declare syscall()?]) ;;
820 AC_DEFINE(DECL_HSTRERROR_0, 1, [Declaration style]) # Needed for XLC under AIX 4.3.2
823 AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
824 AC_DEFINE(DECL_INET_NTOA_0, 1, [Declaration style])
825 AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
826 AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
827 AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
828 AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
829 AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
830 AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
831 AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
834 AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
835 AC_DEFINE(DECL_STIME_1, 1, [Declaration style])
838 AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
841 AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
842 AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
843 AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
844 AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
845 AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
846 AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
847 AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
848 AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
849 AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
850 AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
851 AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
852 AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
853 AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
854 AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
855 AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
856 AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
859 AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
860 AC_DEFINE(DECL_SETPRIORITY_1, 1, [Declaration style])
863 AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
868 AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
869 AC_DEFINE(DECL_BCOPY_0, 1, [Declaration style])
870 AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
871 AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
872 AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
873 AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
874 AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
875 AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
876 AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
877 AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
878 AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
879 AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
880 AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
881 AC_DEFINE(DECL_SIGVEC_0, 1, [Declaration style])
882 AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
883 case "`basename $ac_cv_prog_CC`" in
885 *) AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
888 AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
889 AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
890 AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
891 AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
892 AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
893 AC_DEFINE(DECL_TOUPPER_0, 1, [Declaration style])
894 AC_DEFINE(DECL_STRERROR_0, 1, [Declaration style])
897 AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
898 AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
899 AC_DEFINE(DECL_CFSETISPEED_0, 1, [Declaration style])
900 AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
901 AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
902 AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
903 AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
904 AC_DEFINE(DECL_NLIST_0, 1, [Declaration style])
905 AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
906 AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
907 AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
908 AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
909 AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
910 AC_DEFINE(DECL_STIME_0, 1, [Declaration style])
911 AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
912 AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
918 AC_DEFINE(TERMIOS_NEEDS__SVID3, 1, [Do we need to #define _SVID3 when we #include <termios.h>?])
922 AC_CACHE_CHECK(if we should use a streams device for ifconfig,
923 ac_cv_var_use_streams_device_for_ifconfig,
924 ac_cv_var_use_streams_device_for_ifconfig=no)
926 AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop,
933 ac_cv_var_rcvbuf_slop=$ans])
934 case "$ac_cv_var_rcvbuf_slop" in
935 yes) AC_DEFINE(NEED_RCVBUF_SLOP, 1, [Do we need extra room for SO_RCVBUF? (HPUX <8)]) ;;
938 AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket,
948 ac_cv_var_open_bcast_socket=$ans])
949 case "$ac_cv_var_open_bcast_socket" in
950 yes) AC_DEFINE(OPEN_BCAST_SOCKET, 1, [Should we open the broadcast socket?]) ;;
953 AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig,
960 ac_cv_var_hpux_findconfig=$ans])
961 case "$ac_cv_var_hpux_findconfig" in
962 yes) AC_DEFINE(NEED_HPUX_FINDCONFIG, 1, [Do we want the HPUX FindConfig()?]) ;;
965 AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid,
986 ac_cv_arg_setpgrp_negpid=$ans])
987 case "$ac_cv_arg_setpgrp_negpid" in
988 yes) AC_DEFINE(UDP_BACKWARDS_SETOWN, 1, [Do we set process groups with -pid?]) ;;
991 AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown,
1011 ac_cv_func_ctty_for_f_setown=$ans])
1012 case "$ac_cv_func_ctty_for_f_setown" in
1013 yes) AC_DEFINE(USE_FSETOWNCTTY, 1, [Must we have a CTTY for fsetown?]) ;;
1017 AC_MSG_CHECKING(if we'll use clock_settime or settimeofday or stime)
1018 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
1021 ans='clock_settime()'
1024 ntp_warning='But clock_settime() would be better (if we had it)'
1025 ans='settimeofday()'
1028 ntp_warning='Which is the worst of the three'
1033 $host) ntp_warning='Which leaves us with nothing to use!'
1039 case "$ntp_warning" in
1041 *) AC_MSG_WARN(*** $ntp_warning ***)
1045 AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug,
1053 ac_cv_var_syscall_bug=$ans])
1054 case "$ac_cv_var_syscall_bug" in
1055 yes) AC_DEFINE(SYSCALL_BUG, 1, [Buggy syscall() (Solaris2.4)?]) ;;
1058 AC_CACHE_CHECK(for Streams/TLI, ac_cv_var_streams_tli,
1059 [ case "$ac_cv_header_sys_stropts_h" in
1062 # There must be a better way...
1070 ac_cv_var_streams_tli=$ans])
1071 case "$ac_cv_var_streams_tli" in
1073 AC_DEFINE(STREAMS_TLI, 1, [Do we have STREAMS/TLI? (Can we replace this with HAVE_SYS_STROPTS_H?)])
1077 AC_CACHE_CHECK(for SIGIO, ac_cv_hdr_def_sigio,
1079 [#include <signal.h>
1083 ], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no))
1085 dnl Override those system that have a losing SIGIO
1086 AC_CACHE_CHECK(if we want to use signalled IO, ac_cv_var_signalled_io,
1088 case "$ac_cv_hdr_def_sigio" in
1092 alpha*-dec-osf4*|alpha*-dec-osf5*)
1122 ac_cv_var_signalled_io=$ans])
1123 case "$ac_cv_var_signalled_io" in
1124 yes) AC_DEFINE(HAVE_SIGNALED_IO, 1, [Can we use SIGIO for tcp and udp IO?]) ;;
1127 AC_CACHE_CHECK(for SIGPOLL, ac_cv_hdr_def_sigpoll,
1129 [#include <signal.h>
1133 ], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no))
1135 AC_CACHE_CHECK(for SIGSYS, ac_cv_hdr_def_sigsys,
1137 [#include <signal.h>
1141 ], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no))
1143 AC_CACHE_CHECK(if we can use SIGPOLL for UDP I/O, ac_cv_var_use_udp_sigpoll,
1145 case "$ac_cv_hdr_def_sigpoll" in
1186 ac_cv_var_use_udp_sigpoll=$ans])
1187 case "$ac_cv_var_use_udp_sigpoll" in
1188 yes) AC_DEFINE(USE_UDP_SIGPOLL, 1, [Can we use SIGPOLL for UDP?]) ;;
1191 AC_CACHE_CHECK(if we can use SIGPOLL for TTY I/O, ac_cv_var_use_tty_sigpoll,
1193 case "$ac_cv_hdr_def_sigpoll" in
1234 ac_cv_var_use_tty_sigpoll=$ans])
1235 case "$ac_cv_var_use_tty_sigpoll" in
1236 yes) AC_DEFINE(USE_TTY_SIGPOLL, 1, [Can we use SIGPOLL for tty IO?]) ;;
1239 case "$ac_cv_header_sys_sio_h" in
1241 AC_CACHE_CHECK(sys/sio.h for TIOCDCDTIMESTAMP, ac_cv_hdr_def_tiocdcdtimestamp,
1243 [#include <sys/sio.h>
1244 #ifdef TIOCDCDTIMESTAMP
1247 ], ac_cv_hdr_def_tiocdcdtimestamp=yes, ac_cv_hdr_def_tiocdcdtimestamp=no))
1251 case "$ac_cv_hdr_def_tiocdcdtimestamp" in
1253 ac_cv_var_oncore_ok=yes
1257 AC_CACHE_CHECK(if nlist() values might require extra indirection,
1258 ac_cv_var_nlist_extra_indirection,
1265 ac_cv_var_nlist_extra_indirection=$ans])
1266 case "$ac_cv_var_nlist_extra_indirection" in
1267 yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION, 1, [Might nlist() values require an extra level of indirection (AIX)?]) ;;
1270 AC_CACHE_CHECK(for a minimum recommended value of tickadj,
1271 ac_cv_var_min_rec_tickadj,
1278 ac_cv_var_min_rec_tickadj=$ans])
1279 case "$ac_cv_var_min_rec_tickadj" in
1281 *) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj, [Should we recommend a minimum value for tickadj?]) ;;
1284 AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR,
1285 ac_cv_var_no_parenb_ignpar,
1294 i?86-*-freebsd[[123]].*)
1300 ac_cv_var_no_parenb_ignpar=$ans])
1301 case "$ac_cv_var_no_parenb_ignpar" in
1302 yes) AC_DEFINE(NO_PARENB_IGNPAR, 1, [Is there a problem using PARENB and IGNPAR (IRIX)?]) ;;
1305 AC_MSG_CHECKING(if we're including debugging code)
1306 AC_ARG_ENABLE(debugging, [ --enable-debugging + include debugging code],
1307 [ntp_ok=$enableval], [ntp_ok=yes])
1308 if test "$ntp_ok" = "yes"; then
1309 AC_DEFINE(DEBUG, 1, [Enable debugging?])
1311 AC_MSG_RESULT($ntp_ok)
1313 AC_MSG_CHECKING(for a the number of minutes in a DST adjustment)
1314 AC_ARG_ENABLE(dst_minutes, [ --enable-dst-minutes=60 + minutes per DST adjustment],
1315 [ans=$enableval], [ans=60])
1316 AC_DEFINE_UNQUOTED(DSTMINUTES, $ans, [The number of minutes in a DST adjustment])
1319 AC_CACHE_CHECK(if we have the tty_clk line discipline/streams module,
1321 [case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in
1322 *yes*) ac_cv_var_tty_clk=yes ;;
1324 case "$ac_cv_var_tty_clk" in
1325 yes) AC_DEFINE(TTYCLK, 1, [Do we have the tty_clk line discipline/streams module?]) ;;
1328 AC_CACHE_CHECK(for the ppsclock streams module,
1330 ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev)
1331 case "$ac_cv_var_ppsclock" in
1332 yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
1335 AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast,
1338 i386-sequent-sysv4) ;;
1339 *) AC_EGREP_CPP(yes,
1340 [#include <netinet/in.h>
1341 #ifdef IP_ADD_MEMBERSHIP
1344 ], ac_cv_var_mcast=yes) ;;
1346 case "$ac_cv_var_mcast" in
1347 yes) AC_DEFINE(MCAST, 1, [Does the kernel support multicasting IP?]) ;;
1350 AC_CACHE_CHECK([[availability of ntp_{adj,get}time()]], ac_cv_var_ntp_syscalls,
1351 [ac_cv_var_ntp_syscalls=no
1352 case "$ac_cv_func___adjtimex" in
1354 ac_cv_var_ntp_syscalls=libc
1356 *) case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime" in
1358 ac_cv_var_ntp_syscalls=libc
1360 *) AC_EGREP_CPP(yes,
1361 [#include <sys/syscall.h>
1362 #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
1365 ], ac_cv_var_ntp_syscalls=kernel)
1370 case "$ac_cv_var_ntp_syscalls" in
1372 AC_DEFINE(NTP_SYSCALLS_LIBC, 1, [Do we have ntp_{adj,get}time in libc?])
1375 AC_DEFINE(NTP_SYSCALLS_STD, 1, [Do we have ntp_{adj,get}time in the kernel?])
1381 AC_CACHE_CHECK(if sys/timex.h has STA_FLL, ac_cv_var_sta_fll,
1383 [#include <sys/timex.h>
1387 ], ac_cv_var_sta_fll=yes, ac_cv_var_sta_fll=no)])
1389 AC_CACHE_CHECK(if we have kernel PLL support, ac_cv_var_kernel_pll,
1390 [dnl ac_cv_var_ntp_syscalls is {no,libc,kernel}
1391 case "$ac_cv_header_sys_timex_h$ac_cv_struct_ntptimeval$ac_cv_var_sta_fll$ac_cv_var_ntp_syscalls" in
1393 ac_cv_var_kernel_pll=no
1395 *) ac_cv_var_kernel_pll=yes
1398 case "$ac_cv_var_kernel_pll" in
1400 AC_DEFINE(KERNEL_PLL, 1, [Does the kernel support precision time discipline?])
1404 AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer,
1417 ac_cv_var_size_returned_in_buffer=$ans])
1418 case "$ac_cv_var_size_returned_in_buffer" in
1419 yes) AC_DEFINE(SIZE_RETURNED_IN_BUFFER, 1, [Does SIOCGIFCONF return size in the buffer?]) ;;
1422 dnl AC_CACHE_CHECK(if we want GDT surveying code, ac_cv_var_gdt_surveying,
1423 dnl [AC_ARG_ENABLE(gdt-surveying, [ --enable-gdt-surveying - include GDT survey code],
1424 dnl [ans=$enableval], [ans=no])
1425 dnl ac_cv_var_gdt_surveying=$ans])
1426 dnl case "$ac_cv_var_gdt_surveying" in
1427 dnl yes) AC_DEFINE(GDT_SURVEYING, 1, [Include the GDT Surveying code?]) ;;
1430 # Check for ioctls TIOCGPPSEV
1431 AC_MSG_CHECKING(ioctl TIOCGPPSEV)
1432 if test "$ac_cv_header_termios_h" = "yes"; then
1434 [#include <termios.h>
1438 ], ntp_ok=yes, ntp_ok=no)
1442 if test "$ntp_ok" = "yes"; then
1443 AC_DEFINE(HAVE_TIOCGPPSEV, 1, [Do we have the TIOCGPPSEV ioctl (Solaris)?])
1444 ac_cv_var_oncore_ok=yes
1446 AC_MSG_RESULT($ntp_ok)
1448 # Check for ioctls TIOCSPPS
1449 AC_MSG_CHECKING(ioctl TIOCSPPS)
1450 if test "$ac_cv_header_termios_h" = "yes"; then
1452 [#include <termios.h>
1456 ], ntp_ok=yes, ntp_ok=no)
1461 if test "$ntp_ok" = "yes"; then
1462 AC_DEFINE(HAVE_TIOCSPPS, 1, [Do we have the TIOCSPPS ioctl (Solaris)?])
1464 AC_MSG_RESULT($ntp_ok)
1466 # Check for ioctls CIOGETEV
1467 AC_MSG_CHECKING(ioctl CIOGETEV)
1468 if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
1470 [#include <sys/ppsclock.h>
1474 ], ntp_ok=yes, ntp_ok=no)
1478 if test "$ntp_ok" = "yes"; then
1479 ac_cv_var_oncore_ok=yes
1480 AC_DEFINE(HAVE_CIOGETEV, 1, [Do we have the CIOGETEV ioctl (SunOS, Linux)?])
1482 AC_MSG_RESULT($ntp_ok)
1485 # ATOM/PPSAPI stuff.
1487 # ATOM used to require struct timespec, but that's been fixed now.
1489 # case "$ac_cv_struct_timespec" in
1491 # ac_cv_var_atom_ok=yes
1494 ac_cv_var_atom_ok=yes
1496 # Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
1498 # The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
1500 # The PPSAPI needs ATOM
1502 # The PPSAPI needs struct timespec.
1504 case "$ac_cv_c_inline$ac_cv_struct_timespec$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h" in
1506 AC_DEFINE(HAVE_PPSAPI, 1, [Do we have the PPS API per the Draft RFC?])
1507 ac_cv_var_oncore_ok=yes
1508 ac_cv_var_ripe_ncc_ok=yes
1512 # Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
1513 AC_CHECK_HEADER(linux/serial.h)
1514 AC_MSG_CHECKING(ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG)
1515 case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
1518 [#include <sys/time.h>
1521 #include <sys/ppsclock.h>
1522 #include <linux/serial.h>
1526 #ifdef ASYNC_PPS_CD_POS
1527 #ifdef ASYNC_PPS_CD_NEG
1541 if test "$ntp_ok" = "yes"; then
1542 AC_DEFINE(HAVE_TIO_SERIAL_STUFF, 1, [Do we have the TIO serial stuff?])
1544 AC_MSG_RESULT($ntp_ok)
1546 # Check for SHMEM_STATUS support
1547 AC_MSG_CHECKING(SHMEM_STATUS support)
1548 case "$ac_cv_header_sys_mman_h" in
1552 if test "$ntp_ok" = "yes"; then
1553 AC_DEFINE(ONCORE_SHMEM_STATUS, 1, [Do we have support for SHMEM_STATUS?])
1555 AC_MSG_RESULT($ntp_ok)
1557 dnl dnl These are for OPT_PROGRAMS in authstuff/
1558 dnl AC_SUBST(AUTHCERT)
1559 dnl AC_SUBST(AUTHSPEED)
1560 dnl AC_SUBST(MD5DRIVER)
1561 dnl AC_SUBST(KEYPARITY)
1562 dnl AC_SUBST(MAKEIPFP)
1563 dnl AC_SUBST(MAKEPC1)
1564 dnl AC_SUBST(MAKEPC2)
1565 dnl AC_SUBST(MAKESP)
1566 dnl AC_SUBST(MKRANDKEYS)
1567 dnl AC_SUBST(OMAKEIPFP)
1568 dnl AC_SUBST(UNIXCERT)
1572 # HPUX only, and by explicit request
1573 AC_MSG_CHECKING(Datum/Bancomm bc635/VME interface)
1574 AC_ARG_ENABLE(BANCOMM,
1575 AC_HELP_STRING([--enable-BANCOMM], [- Datum/Bancomm bc635/VME interface]),
1576 [ntp_ok=$enableval], [ntp_ok=no])
1577 if test "$ntp_ok" = "yes"; then
1579 AC_DEFINE(CLOCK_BANC, 1, [Datum/Bancomm bc635/VME interface?])
1581 AC_MSG_RESULT($ntp_ok)
1582 case "$ntp_ok$host" in
1584 yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1587 #HPUX only, and only by explicit request
1588 AC_MSG_CHECKING(TrueTime GPS receiver/VME interface)
1589 AC_ARG_ENABLE(GPSVME,
1590 AC_HELP_STRING([--enable-GPSVME], [- TrueTime GPS receiver/VME interface]),
1591 [ntp_ok=$enableval], [ntp_ok=no])
1592 if test "$ntp_ok" = "yes"; then
1594 AC_DEFINE(CLOCK_GPSVME, 1, [TrueTime GPS receiver/VME interface?])
1596 AC_MSG_RESULT($ntp_ok)
1597 case "$ntp_ok$host" in
1599 yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1602 AC_MSG_CHECKING(for PCL720 clock support)
1603 case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
1605 AC_DEFINE(CLOCK_PPS720, 1, [PCL 720 clock support])
1614 AC_MSG_CHECKING(for SHM clock attached thru shared memory)
1616 AC_HELP_STRING([--enable-SHM], [- SHM clock attached thru shared memory]),
1617 [ntp_ok=$enableval], [ntp_ok=no])
1618 if test "$ntp_ok" = "yes"; then
1620 AC_DEFINE(CLOCK_SHM, 1, [clock thru shared memory])
1622 AC_MSG_RESULT($ntp_ok)
1624 AC_MSG_CHECKING(for default inclusion of all suitable non-PARSE clocks)
1625 AC_ARG_ENABLE(all-clocks,
1626 AC_HELP_STRING([--enable-all-clocks], [+ include all suitable non-PARSE clocks:]),
1627 [ntp_eac=$enableval], [ntp_eac=yes])
1628 AC_MSG_RESULT($ntp_eac)
1630 AC_MSG_CHECKING(if we have support for PARSE clocks)
1631 case "$ac_cv_var_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
1638 AC_MSG_RESULT($ntp_canparse)
1640 AC_MSG_CHECKING([if we have support for audio clocks])
1641 case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h" in
1644 AC_DEFINE(HAVE_AUDIO, , [Do we have audio support?])
1646 *) ntp_canaudio=no ;;
1648 AC_MSG_RESULT($ntp_canaudio)
1650 # Requires modem control
1651 AC_MSG_CHECKING(ACTS modem service)
1653 AC_HELP_STRING([--enable-ACTS], [+ ACTS modem service]),
1654 [ntp_ok=$enableval],
1656 [#include <termios.h>
1657 #ifdef HAVE_SYS_IOCTL_H
1658 #include <sys/ioctl.h>
1663 ], ntp_ok=$ntp_eac, ntp_ok=no)])
1664 if test "$ntp_ok" = "yes"; then
1666 AC_DEFINE(CLOCK_ACTS, 1, [ACTS modem service])
1668 AC_MSG_RESULT($ntp_ok)
1670 AC_MSG_CHECKING(Arbiter 1088A/B GPS receiver)
1671 AC_ARG_ENABLE(ARBITER,
1672 AC_HELP_STRING([--enable-ARBITER], [+ Arbiter 1088A/B GPS receiver]),
1673 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1674 if test "$ntp_ok" = "yes"; then
1676 AC_DEFINE(CLOCK_ARBITER, 1, [Arbiter 1088A/B GPS receiver])
1678 AC_MSG_RESULT($ntp_ok)
1680 AC_MSG_CHECKING(Arcron MSF receiver)
1681 AC_ARG_ENABLE(ARCRON_MSF,
1682 AC_HELP_STRING([--enable-ARCRON-MSF], [+ Arcron MSF receiver]),
1683 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1684 if test "$ntp_ok" = "yes"; then
1686 AC_DEFINE(CLOCK_ARCRON_MSF, 1, [ARCRON support?])
1688 AC_MSG_RESULT($ntp_ok)
1690 AC_MSG_CHECKING(Austron 2200A/2201A GPS receiver)
1691 AC_ARG_ENABLE(AS2201,
1692 AC_HELP_STRING([--enable-AS2201], [+ Austron 2200A/2201A GPS receiver]),
1693 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1694 if test "$ntp_ok" = "yes"; then
1696 AC_DEFINE(CLOCK_AS2201, 1, [Austron 2200A/2201A GPS receiver?])
1698 AC_MSG_RESULT($ntp_ok)
1700 AC_MSG_CHECKING(ATOM PPS interface)
1702 AC_HELP_STRING([--enable-ATOM], [s ATOM PPS interface]),
1703 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1704 case "$ac_cv_var_atom_ok" in
1707 if test "$ntp_ok" = "yes"; then
1709 AC_DEFINE(CLOCK_ATOM, 1, [PPS interface?])
1711 AC_MSG_RESULT($ntp_ok)
1713 AC_MSG_CHECKING(Chrono-log K-series WWVB receiver)
1714 AC_ARG_ENABLE(CHRONOLOG,
1715 AC_HELP_STRING([--enable-CHRONOLOG], [+ Chrono-log K-series WWVB receiver]),
1716 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1717 if test "$ntp_ok" = "yes"; then
1719 AC_DEFINE(CLOCK_CHRONOLOG, 1, [Chronolog K-series WWVB receiver?])
1721 AC_MSG_RESULT($ntp_ok)
1723 AC_MSG_CHECKING(CHU modem/decoder)
1725 AC_HELP_STRING([--enable-CHU], [- CHU modem/decoder]),
1726 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1727 if test "$ntp_ok" = "yes"; then
1729 AC_DEFINE(CLOCK_CHU, 1, [CHU modem/decoder])
1731 AC_MSG_RESULT($ntp_ok)
1732 ac_refclock_chu=$ntp_ok
1734 AC_MSG_CHECKING(CHU audio/decoder)
1735 AC_ARG_ENABLE(AUDIO-CHU,
1736 AC_HELP_STRING([--enable-AUDIO-CHU], [s CHU audio/decoder]),
1737 [ntp_ok=$enableval],
1738 [case "$ntp_eac$ac_refclock_chu$ntp_canaudio" in
1742 if test "$ntp_ok" = "yes"; then
1743 AC_DEFINE(AUDIO_CHU, 1, [CHU audio/decoder?])
1745 AC_MSG_RESULT($ntp_ok)
1746 # We used to check for sunos/solaris target...
1747 case "$ntp_ok$ac_refclock_chu$ntp_canaudio" in
1748 yes*no*) AC_MSG_WARN(*** But the expected answer is...no ***) ;;
1752 AC_MSG_CHECKING(Datum Programmable Time System)
1753 AC_ARG_ENABLE(DATUM,
1754 AC_HELP_STRING([--enable-DATUM], [s Datum Programmable Time System]),
1755 [ntp_ok=$enableval],
1756 [case "$ac_cv_header_termios_h" in
1763 if test "$ntp_ok" = "yes"; then
1765 AC_DEFINE(CLOCK_DATUM, 1, [Datum Programmable Time System?])
1767 AC_MSG_RESULT($ntp_ok)
1769 AC_MSG_CHECKING(Dumb generic hh:mm:ss local clock)
1770 AC_ARG_ENABLE(DUMBCLOCK,
1771 AC_HELP_STRING([--enable-DUMBCLOCK], [+ Dumb generic hh:mm:ss local clock]),
1772 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1773 if test "$ntp_ok" = "yes"; then
1775 AC_DEFINE(CLOCK_DUMBCLOCK, 1, [Dumb generic hh:mm:ss local clock?])
1777 AC_MSG_RESULT($ntp_ok)
1779 AC_MSG_CHECKING(Forum Graphic GPS)
1781 AC_HELP_STRING([--enable-FG], [+ Forum Graphic GPS]),
1782 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1783 if test "$ntp_ok" = "yes"; then
1785 AC_DEFINE(CLOCK_FG, 1, [Forum Graphic GPS datating station driver?])
1787 AC_MSG_RESULT($ntp_ok)
1789 # Requires modem control
1790 AC_MSG_CHECKING(Heath GC-1000 WWV/WWVH receiver)
1791 AC_ARG_ENABLE(HEATH,
1792 AC_HELP_STRING([--enable-HEATH], [s Heath GC-1000 WWV/WWVH receiver]),
1793 [ntp_ok=$enableval],
1795 [#include <termios.h>
1796 #ifdef HAVE_SYS_IOCTL_H
1797 #include <sys/ioctl.h>
1802 ], ntp_ok=$ntp_eac, ntp_ok=no)])
1803 if test "$ntp_ok" = "yes"; then
1805 AC_DEFINE(CLOCK_HEATH, 1, [Heath GC-1000 WWV/WWVH receiver?])
1807 AC_MSG_RESULT($ntp_ok)
1809 AC_MSG_CHECKING(for hopf serial clock device)
1810 AC_ARG_ENABLE(HOPFSERIAL,
1811 AC_HELP_STRING([--enable-HOPFSERIAL], [+ hopf serial clock device]),
1812 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1813 if test "$ntp_ok" = "yes"; then
1815 AC_DEFINE(CLOCK_HOPF_SERIAL, 1, [HOPF serial clock device?])
1817 AC_MSG_RESULT($ntp_ok)
1819 AC_MSG_CHECKING(for hopf PCI clock 6039)
1820 AC_ARG_ENABLE(HOPFPCI,
1821 AC_HELP_STRING([--enable-HOPFPCI], [+ hopf 6039 PCI board]),
1822 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1823 if test "$ntp_ok" = "yes"; then
1825 AC_DEFINE(CLOCK_HOPF_PCI, 1, [HOPF PCI clock device?])
1827 AC_MSG_RESULT($ntp_ok)
1829 AC_MSG_CHECKING(HP 58503A GPS receiver)
1830 AC_ARG_ENABLE(HPGPS,
1831 AC_HELP_STRING([--enable-HPGPS], [+ HP 58503A GPS receiver]),
1832 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1833 if test "$ntp_ok" = "yes"; then
1835 AC_DEFINE(CLOCK_HPGPS, 1, [HP 58503A GPS receiver?])
1837 AC_MSG_RESULT($ntp_ok)
1839 AC_MSG_CHECKING(IRIG audio decoder)
1841 AC_HELP_STRING([--enable-IRIG], [s IRIG audio decoder]),
1842 [ntp_ok=$enableval],
1843 [case "$ntp_eac$ntp_canaudio" in
1847 if test "$ntp_ok" = "yes"; then
1849 AC_DEFINE(CLOCK_IRIG, 1, [IRIG audio decoder?])
1851 AC_MSG_RESULT($ntp_ok)
1852 case "$ntp_ok$ntp_canaudio" in
1853 yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1856 AC_MSG_CHECKING(for JJY receiver)
1858 AC_HELP_STRING([--enable-JJY], [+ JJY receiver]),
1859 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1860 if test "$ntp_ok" = "yes"; then
1862 AC_DEFINE(CLOCK_JJY, 1, [JJY receiver?])
1864 AC_MSG_RESULT($ntp_ok)
1867 AC_MSG_CHECKING(Rockwell Jupiter GPS receiver)
1868 AC_ARG_ENABLE(JUPITER,
1869 AC_HELP_STRING([--enable-JUPITER], [s Rockwell Jupiter GPS receiver]),
1870 [ntp_ok=$enableval],
1871 [case "$ac_cv_var_ppsclock" in
1872 # yes) ntp_ok=$ntp_eac
1877 if test "$ntp_ok" = "yes"; then
1879 AC_DEFINE(CLOCK_JUPITER, 1, [Rockwell Jupiter GPS clock?])
1881 AC_MSG_RESULT($ntp_ok)
1882 case "$ntp_ok$host" in
1883 yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1886 AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver)
1887 AC_ARG_ENABLE(LEITCH,
1888 AC_HELP_STRING([--enable-LEITCH], [+ Leitch CSD 5300 Master Clock System Driver]),
1889 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1890 if test "$ntp_ok" = "yes"; then
1892 AC_DEFINE(CLOCK_LEITCH, 1, [Leitch CSD 5300 Master Clock System Driver?])
1894 AC_MSG_RESULT($ntp_ok)
1896 AC_MSG_CHECKING(local clock reference)
1897 AC_ARG_ENABLE(LOCAL-CLOCK,
1898 AC_HELP_STRING([--enable-LOCAL-CLOCK], [+ local clock reference]),
1899 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1900 if test "$ntp_ok" = "yes"; then
1902 AC_DEFINE(CLOCK_LOCAL, 1, [local clock reference?])
1904 AC_MSG_RESULT($ntp_ok)
1906 AC_MSG_CHECKING(EES M201 MSF receiver)
1907 AC_ARG_ENABLE(MSFEES,
1908 AC_HELP_STRING([--enable-MSFEES], [+ EES M201 MSF receiver]),
1909 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1910 if test "$ntp_ok" = "yes"; then
1912 AC_DEFINE(CLOCK_MSFEES, 1, [EES M201 MSF receiver])
1914 AC_MSG_RESULT($ntp_ok)
1917 AC_MSG_CHECKING(Magnavox MX4200 GPS receiver)
1918 AC_ARG_ENABLE(MX4200,
1919 AC_HELP_STRING([--enable-MX4200 ], [s Magnavox MX4200 GPS receiver]),
1920 [ntp_ok=$enableval],
1921 [case "$ac_cv_var_ppsclock" in
1922 yes) ntp_ok=$ntp_eac
1927 if test "$ntp_ok" = "yes"; then
1929 AC_DEFINE(CLOCK_MX4200, 1, [Magnavox MX4200 GPS receiver])
1931 AC_MSG_RESULT($ntp_ok)
1932 case "$ntp_ok$host" in
1933 yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1936 AC_MSG_CHECKING(for NeoClock4X receiver)
1937 AC_ARG_ENABLE(NEOCLOCK4X,
1938 AC_HELP_STRING([--enable-NEOCLOCK4X], [- NeoClock4X DCF77 / TDF receiver]),
1939 [ntp_ok=$enableval], [ntp_ok=no])
1940 if test "$ntp_ok" = "yes"; then
1942 AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
1944 AC_MSG_RESULT($ntp_ok)
1946 AC_MSG_CHECKING(NMEA GPS receiver)
1948 AC_HELP_STRING([--enable-NMEA], [+ NMEA GPS receiver]),
1949 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1950 if test "$ntp_ok" = "yes"; then
1952 AC_DEFINE(CLOCK_NMEA, 1, [NMEA GPS receiver])
1954 AC_MSG_RESULT($ntp_ok)
1956 AC_MSG_CHECKING(for ONCORE Motorola VP/UT Oncore GPS)
1957 AC_ARG_ENABLE(ONCORE,
1958 AC_HELP_STRING([--enable-ONCORE], [s Motorola VP/UT Oncore GPS receiver]),
1959 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1960 case "$ac_cv_var_oncore_ok" in
1963 if test "$ntp_ok" = "yes"; then
1965 AC_DEFINE(CLOCK_ONCORE, 1, [Motorola UT Oncore GPS])
1967 AC_MSG_RESULT($ntp_ok)
1969 AC_MSG_CHECKING(for Palisade clock)
1970 AC_ARG_ENABLE(PALISADE,
1971 AC_HELP_STRING([--enable-PALISADE], [+ Palisade clock]),
1972 [ntp_ok=$enableval],
1973 [case "$ac_cv_header_termios_h" in
1981 if test "$ntp_ok" = "yes"; then
1983 AC_DEFINE(CLOCK_PALISADE, 1, [Palisade clock])
1985 AC_MSG_RESULT($ntp_ok)
1987 AC_MSG_CHECKING(Conrad parallel port radio clock)
1989 AC_HELP_STRING([--enable-PCF ], [+ Conrad parallel port radio clock]),
1990 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1991 if test "$ntp_ok" = "yes"; then
1993 AC_DEFINE(CLOCK_PCF, 1, [Conrad parallel port radio clock])
1995 AC_MSG_RESULT($ntp_ok)
1997 AC_MSG_CHECKING(PST/Traconex 1020 WWV/WWVH receiver)
1999 AC_HELP_STRING([--enable-PST], [+ PST/Traconex 1020 WWV/WWVH receiver]),
2000 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2001 if test "$ntp_ok" = "yes"; then
2003 AC_DEFINE(CLOCK_PST, 1, [PST/Traconex 1020 WWV/WWVH receiver])
2005 AC_MSG_RESULT($ntp_ok)
2007 # Requires modem control
2008 AC_MSG_CHECKING(PTB modem service)
2009 AC_ARG_ENABLE(PTBACTS,
2010 AC_HELP_STRING([--enable-PTBACTS], [s PTB modem service]),
2011 [ntp_ok=$enableval],
2013 [#include <termios.h>
2014 #ifdef HAVE_SYS_IOCTL_H
2015 #include <sys/ioctl.h>
2020 ], ntp_ok=$ntp_eac, ntp_ok=no)])
2021 if test "$ntp_ok" = "yes"; then
2023 AC_DEFINE(CLOCK_PTBACTS, 1, [PTB modem service])
2025 AC_MSG_RESULT($ntp_ok)
2027 AC_MSG_CHECKING(RIPENCC specific Trimble driver)
2028 AC_ARG_ENABLE(RIPENCC,
2029 AC_HELP_STRING([--enable-RIPENCC], [- RIPENCC specific Trimble driver]),
2030 [ntp_ok=$enableval], [ntp_ok=no])
2031 # 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
2032 case "$ac_cv_var_ripe_ncc_ok" in
2035 if test "$ntp_ok" = "yes"; then
2037 AC_DEFINE(CLOCK_RIPENCC, ,[RIPE NCC Trimble clock])
2039 AC_MSG_RESULT($ntp_ok)
2041 AC_MSG_CHECKING(Spectracom 8170/Netclock/2 WWVB receiver)
2042 AC_ARG_ENABLE(SPECTRACOM,
2043 AC_HELP_STRING([--enable-SPECTRACOM], [+ Spectracom 8170/Netclock/2 WWVB receiver]),
2044 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2045 if test "$ntp_ok" = "yes"; then
2047 AC_DEFINE(CLOCK_SPECTRACOM, 1, [Spectracom 8170/Netclock/2 WWVB receiver])
2049 AC_MSG_RESULT($ntp_ok)
2051 AC_MSG_CHECKING(KSI/Odetics TPRO/S GPS receiver/IRIG interface)
2053 AC_HELP_STRING([--enable-TPRO], [s KSI/Odetics TPRO/S GPS receiver/IRIG interface]),
2054 [ntp_ok=$enableval],
2055 [case "$ac_cv_header_sys_tpro_h" in
2062 if test "$ntp_ok" = "yes"; then
2064 AC_DEFINE(CLOCK_TPRO, 1, [KSI/Odetics TPRO/S GPS receiver/IRIG interface])
2066 AC_MSG_RESULT($ntp_ok)
2067 case "$ntp_ok$ac_cv_header_sys_tpro" in
2068 yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
2071 AC_MSG_CHECKING(TRAK 8810 GPS receiver)
2073 AC_HELP_STRING([--enable-TRAK], [+ TRAK 8810 GPS receiver]),
2074 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2075 if test "$ntp_ok" = "yes"; then
2077 AC_DEFINE(CLOCK_TRAK, 1, [TRAK 8810 GPS receiver])
2079 AC_MSG_RESULT($ntp_ok)
2081 # Not on a vax-dec-bsd
2082 AC_MSG_CHECKING(Kinemetrics/TrueTime receivers)
2083 AC_ARG_ENABLE(TRUETIME,
2084 AC_HELP_STRING([--enable-TRUETIME], [s Kinemetrics/TrueTime receivers]),
2085 [ntp_ok=$enableval],
2094 if test "$ntp_ok" = "yes"; then
2096 AC_DEFINE(CLOCK_TRUETIME, 1, [Kinemetrics/TrueTime receivers])
2098 AC_MSG_RESULT($ntp_ok)
2099 case "$ntp_ok$host" in
2100 yesvax-dec-bsd) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
2103 AC_MSG_CHECKING(TrueTime 560 IRIG-B decoder)
2104 AC_ARG_ENABLE(TT560,
2105 AC_HELP_STRING([--enable-TT560], [- TrueTime 560 IRIG-B decoder]),
2106 [ntp_ok=$enableval], [ntp_ok=no])
2107 if test "$ntp_ok" = "yes"; then
2109 AC_DEFINE(CLOCK_TT560, , [TrueTime 560 IRIG-B decoder?])
2111 AC_MSG_RESULT($ntp_ok)
2113 AC_MSG_CHECKING(Ultralink M320 WWVB receiver)
2114 AC_ARG_ENABLE(ULINK,
2115 AC_HELP_STRING([--enable-ULINK], [+ Ultralink WWVB receiver]),
2116 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2117 if test "$ntp_ok" = "yes"; then
2119 AC_DEFINE(CLOCK_ULINK, 1, [Ultralink M320 WWVB receiver])
2121 AC_MSG_RESULT($ntp_ok)
2123 # Requires modem control
2124 AC_MSG_CHECKING(USNO modem service)
2126 AC_HELP_STRING([--enable-USNO], [s USNO modem service]),
2127 [ntp_ok=$enableval],
2129 [#include <termios.h>
2130 #ifdef HAVE_SYS_IOCTL_H
2131 #include <sys/ioctl.h>
2136 ], ntp_ok=$ntp_eac, ntp_ok=no)])
2137 if test "$ntp_ok" = "yes"; then
2139 AC_DEFINE(CLOCK_USNO, 1, [USNO modem service])
2141 AC_MSG_RESULT($ntp_ok)
2143 AC_MSG_CHECKING(WWV receiver)
2145 AC_HELP_STRING([--enable-WWV], [+ WWV Audio receiver]),
2146 [ntp_ok=$enableval],
2147 [case "$ntp_eac$ntp_canaudio" in
2151 if test "$ntp_ok" = "yes"; then
2153 AC_DEFINE(CLOCK_WWV, 1, [WWV audio driver])
2155 AC_MSG_RESULT($ntp_ok)
2156 case "$ntp_ok$ntp_canaudio" in
2157 yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
2160 AC_MSG_CHECKING(for Zyfer receiver)
2161 AC_ARG_ENABLE(ZYFER,
2162 AC_HELP_STRING([--enable-ZYFER], [+ Zyfer GPStarplus receiver]),
2163 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2164 if test "$ntp_ok" = "yes"; then
2166 AC_DEFINE(CLOCK_ZYFER, 1, [Zyfer GPStarplus])
2168 AC_MSG_RESULT($ntp_ok)
2170 AC_MSG_CHECKING(for default inclusion of all suitable PARSE clocks)
2171 AC_ARG_ENABLE(parse-clocks, [ --enable-parse-clocks - include all suitable PARSE clocks:],
2172 [ntp_eapc=$enableval],
2174 yes) ntp_eapc=$ntp_canparse ;;
2178 AC_MSG_RESULT($ntp_eapc)
2180 case "$ntp_eac$ntp_eapc$ntp_canparse" in
2182 AC_MSG_ERROR("--enable-parse-clocks" requires "--enable-all-clocks".)
2185 AC_MSG_ERROR(You said "--enable-parse-clocks" but PARSE isn't supported on this platform!)
2194 AC_MSG_CHECKING(Diem Computime Radio Clock)
2195 AC_ARG_ENABLE(COMPUTIME,
2196 AC_HELP_STRING([--enable-COMPUTIME], [s Diem Computime Radio Clock]),
2197 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2198 if test "$ntp_ok" = "yes"; then
2201 AC_DEFINE(CLOCK_COMPUTIME, 1, [Diems Computime Radio Clock?])
2203 AC_MSG_RESULT($ntp_ok)
2204 case "$ntp_ok$ntp_canparse" in
2206 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2210 AC_MSG_CHECKING(ELV/DCF7000 clock)
2211 AC_ARG_ENABLE(DCF7000,
2212 AC_HELP_STRING([--enable-DCF7000], [s ELV/DCF7000 clock]),
2213 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2214 if test "$ntp_ok" = "yes"; then
2217 AC_DEFINE(CLOCK_DCF7000, 1, [ELV/DCF7000 clock?])
2219 AC_MSG_RESULT($ntp_ok)
2220 case "$ntp_ok$ntp_canparse" in
2222 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2226 AC_MSG_CHECKING(HOPF 6021 clock)
2227 AC_ARG_ENABLE(HOPF6021,
2228 AC_HELP_STRING([--enable-HOPF6021 ], [s HOPF 6021 clock]),
2229 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2230 if test "$ntp_ok" = "yes"; then
2233 AC_DEFINE(CLOCK_HOPF6021, 1, [HOPF 6021 clock?])
2235 AC_MSG_RESULT($ntp_ok)
2236 case "$ntp_ok$ntp_canparse" in
2238 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2242 AC_MSG_CHECKING(Meinberg clocks)
2243 AC_ARG_ENABLE(MEINBERG,
2244 AC_HELP_STRING([--enable-MEINBERG], [s Meinberg clocks]),
2245 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2246 if test "$ntp_ok" = "yes"; then
2249 AC_DEFINE(CLOCK_MEINBERG, 1, [Meinberg clocks])
2251 AC_MSG_RESULT($ntp_ok)
2252 case "$ntp_ok$ntp_canparse" in
2254 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2258 AC_MSG_CHECKING(DCF77 raw time code)
2259 AC_ARG_ENABLE(RAWDCF,
2260 AC_HELP_STRING([--enable-RAWDCF], [s DCF77 raw time code]),
2261 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2262 if test "$ntp_ok" = "yes"; then
2267 AC_DEFINE(CLOCK_RAWDCF, 1, [DCF77 raw time code])
2269 AC_MSG_RESULT($ntp_ok)
2270 case "$ntp_ok$ntp_canparse" in
2272 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2276 case "$ntp_rawdcf" in
2278 AC_CACHE_CHECK(if we must enable parity for RAWDCF,
2279 ac_cv_var_rawdcf_parity,
2286 ac_cv_var_rawdcf_parity=$ans])
2287 case "$ac_cv_var_rawdcf_parity" in
2288 yes) AC_DEFINE(RAWDCF_NO_IGNPAR, 1, [Should we not IGNPAR (Linux)?]) ;;
2292 *) # HMS: Is this a good idea?
2293 ac_cv_var_rawdcf_parity=no
2297 AC_MSG_CHECKING(RCC 8000 clock)
2298 AC_ARG_ENABLE(RCC8000,
2299 AC_HELP_STRING([--enable-RCC8000], [s RCC 8000 clock]),
2300 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2301 if test "$ntp_ok" = "yes"; then
2304 AC_DEFINE(CLOCK_RCC8000, 1, [RCC 8000 clock])
2306 AC_MSG_RESULT($ntp_ok)
2307 case "$ntp_ok$ntp_canparse" in
2309 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2313 AC_MSG_CHECKING(Schmid DCF77 clock)
2314 AC_ARG_ENABLE(SCHMID,
2315 AC_HELP_STRING([--enable-SCHMID ], [s Schmid DCF77 clock]),
2316 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2317 if test "$ntp_ok" = "yes"; then
2320 AC_DEFINE(CLOCK_SCHMID, 1, [Schmid DCF77 clock])
2322 AC_MSG_RESULT($ntp_ok)
2323 case "$ntp_ok$ntp_canparse" in
2325 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2329 AC_MSG_CHECKING(Trimble GPS receiver/TAIP protocol)
2330 AC_ARG_ENABLE(TRIMTAIP,
2331 AC_HELP_STRING([--enable-TRIMTAIP], [s Trimble GPS receiver/TAIP protocol]),
2332 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2333 if test "$ntp_ok" = "yes"; then
2336 AC_DEFINE(CLOCK_TRIMTAIP, 1, [Trimble GPS receiver/TAIP protocol])
2338 AC_MSG_RESULT($ntp_ok)
2339 case "$ntp_ok$ntp_canparse" in
2341 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2345 AC_MSG_CHECKING(Trimble GPS receiver/TSIP protocol)
2346 AC_ARG_ENABLE(TRIMTSIP,
2347 AC_HELP_STRING([--enable-TRIMTSIP], [s Trimble GPS receiver/TSIP protocol]),
2348 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2349 if test "$ntp_ok" = "yes"; then
2352 AC_DEFINE(CLOCK_TRIMTSIP, 1, [Trimble GPS receiver/TSIP protocol])
2354 AC_MSG_RESULT($ntp_ok)
2355 case "$ntp_ok$ntp_canparse" in
2357 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2361 AC_MSG_CHECKING(WHARTON 400A Series clock)
2362 AC_ARG_ENABLE(WHARTON,
2363 AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]),
2364 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2365 if test "$ntp_ok" = "yes"; then
2368 AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
2370 AC_MSG_RESULT($ntp_ok)
2371 case "$ntp_ok$ntp_canparse" in
2373 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2377 AC_MSG_CHECKING(VARITEXT clock)
2378 AC_ARG_ENABLE(VARITEXT,
2379 AC_HELP_STRING([--enable-VARITEXT], [s VARITEXT clock]),
2380 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2381 if test "$ntp_ok" = "yes"; then
2384 AC_DEFINE(CLOCK_VARITEXT, 1, [VARITEXT protocol])
2386 AC_MSG_RESULT($ntp_ok)
2387 case "$ntp_ok$ntp_canparse" in
2389 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2393 AC_SUBST(MAKE_LIBPARSE)
2394 AC_SUBST(MAKE_LIBPARSE_KERNEL)
2395 AC_SUBST(MAKE_CHECK_Y2K)
2396 AC_MSG_CHECKING(if we need to make and use the parse libraries)
2398 case "$ntp_libparse" in
2401 AC_DEFINE(CLOCK_PARSE, 1, [PARSE driver interface])
2402 LIBPARSE=../libparse/libparse.a
2403 MAKE_LIBPARSE=libparse.a
2404 MAKE_CHECK_Y2K=check_y2k
2405 AC_DEFINE(PPS_SAMPLE, 1, [PPS auxiliary interface for ATOM?])
2406 AC_DEFINE(CLOCK_ATOM)
2416 AC_SUBST(MAKE_LIBRSAREF)
2419 AC_SUBST(OPENSSL_INC)
2420 AC_SUBST(OPENSSL_LIB)
2422 AC_SUBST(MAKE_NTP_GENKEYS)
2424 AC_MSG_CHECKING(for openssl library directory)
2425 AC_ARG_WITH(openssl-libdir,
2426 AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]),
2427 [ans=$withval], [ans=yes])
2431 ans="/usr/lib /usr/local/lib /usr/local/ssl/lib"
2433 *) # Look where they said
2438 *) # Look for libcrypto.a and libssl.a:
2441 test -f $i/libcrypto.a -a -f $i/libssl.a && break
2456 AC_MSG_CHECKING(for openssl include directory)
2457 AC_ARG_WITH(openssl-incdir,
2458 AC_HELP_STRING([--with-openssl-incdir], [+ =/something/reasonable]),
2459 [ans=$withval], [ans=yes])
2463 ans="/usr/include /usr/local/include /usr/local/ssl/include"
2465 *) # Look where they said
2470 *) # look for openssl/opensslconf.h:
2473 test -f $i/openssl/opensslconf.h && break
2489 AC_HELP_STRING([--with-crypto], [+ ={autokey,rsaref}]),
2490 dnl AC_HELP_STRING([--with-crypto], [+ ={autokey,openssl,rsaref}]),
2491 [ans=$withval], [ans=yes])
2496 yes|rsaref) # Just "rsaref" when OpenSSL is ready
2500 if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
2504 # We have OpenSSL inc/lib - use them.
2506 CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
2507 LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
2508 LIBS="$LIBS -lcrypto"
2509 AC_DEFINE(DES, 1, [Use DES?])
2510 AC_DEFINE(OPENSSL, , [Use OpenSSL?])
2511 AC_DEFINE(PUBKEY, , [Public key?])
2518 if test -f $srcdir/rsaref2/source/digit.c
2522 RSASRCS="digit.c digit.h"
2525 if test -f $srcdir/rsaeuro1/source/rsaeuro.h
2528 RSAOBJS="md4c.o shsc.o"
2529 RSASRCS="md4c.c shsc.c"
2532 if test "$ans" = "rsaref"; then
2533 LIBRSAREF=../librsaref/librsaref.a
2534 MAKE_LIBRSAREF=librsaref.a
2535 AC_DEFINE(DES, 1, [Use DES?])
2537 AC_DEFINE(RSAREF, , [Use RSAREF?])
2543 AM_CONDITIONAL(isRSAREF, test x$RSADIR = xrsaref2)
2544 AM_CONDITIONAL(isRSAEURO, test x$RSADIR = xrsaeuro1)
2549 AC_DEFINE(AUTOKEY, , [Autokey?])
2553 AC_MSG_CHECKING(for the level of crypto support)
2556 AC_MSG_CHECKING(if we want to compile with ElectricFence)
2557 AC_ARG_WITH(electricfence, [ --with-electricfence - compile with ElectricFence malloc debugger],
2558 [ans=$withval], [ans=no])
2562 LIBS="$LIBS \${top_builddir}/ElectricFence/libefence.a"
2563 EF_PROGS="eftest tstheap"
2575 AC_MSG_CHECKING(if we can make dcf parse utilities)
2577 if test "$ntp_parseutil" = "yes"; then
2579 *-*-sunos4*|*-*-solaris2*|*-*-linux*)
2588 AC_SUBST(MAKE_PARSEKMODULE)
2589 AC_MSG_CHECKING(if we can build kernel streams modules for parse)
2591 case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
2595 case "$ac_cv_var_kernel_pll" in
2597 AC_DEFINE(PPS_SYNC, 1, [PARSE kernel PLL PPS support])
2601 MAKE_PARSEKMODULE=parsestreams.loadable_module.o
2605 MAKE_PARSEKMODULE=parse
2612 AC_MSG_CHECKING(if we need basic refclock support)
2613 if test "$ntp_refclock" = "yes"; then
2614 AC_DEFINE(REFCLOCK, 1, [Basic refclock support?])
2616 AC_MSG_RESULT($ntp_refclock)
2618 dnl Things that can be made in clockstuff/
2619 AC_SUBST(PROPDELAY) dnl Set to "propdelay"
2620 AC_SUBST(CHUTEST) dnl Set to "chutest"
2621 AC_SUBST(CLKTEST) dnl Set to "clktest"
2623 AC_SUBST(MAKE_ADJTIMED)
2624 AC_MSG_CHECKING(if we want HP-UX adjtimed support)
2632 if test "$ans" = "yes"; then
2633 MAKE_ADJTIMED=adjtimed
2634 AC_DEFINE(NEED_HPUX_ADJTIME, 1, [Do we need HPUX adjtime() library support?])
2638 AC_MSG_CHECKING(if we want QNX adjtime support)
2646 if test "$ans" = "yes"; then
2647 AC_DEFINE(NEED_QNX_ADJTIME, 1, [Do we need the qnx adjtime call?])
2651 AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem,
2652 [AC_ARG_ENABLE(kmem, [ --enable-kmem s read /dev/kmem for tick and/or tickadj],
2654 [case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
2665 *-*-domainos) # Won't be found...
2682 ac_cv_var_can_kmem=$ans])
2684 case "$ac_cv_var_can_kmem" in
2686 *) AC_DEFINE(NOKMEM, 1, [Should we NOT read /dev/kmem?]) ;;
2689 AC_CACHE_CHECK(if adjtime is accurate, ac_cv_var_adjtime_is_accurate,
2690 [AC_ARG_ENABLE(accurate-adjtime, [ --enable-accurate-adjtime
2691 s the adjtime() call is accurate],
2700 mips-sgi-irix[[456]]*)
2712 *-*-solaris2.[[01]]*)
2722 ac_cv_var_adjtime_is_accurate=$ans])
2723 case "$ac_cv_var_adjtime_is_accurate" in
2724 yes) AC_DEFINE(ADJTIME_IS_ACCURATE, 1, [Is adjtime() accurate?]) ;;
2727 AC_CACHE_CHECK([the name of 'tick' in the kernel],
2728 ac_cv_var_nlist_tick,
2731 m68*-hp-hpux*) # HP9000/300?
2759 ac_cv_var_nlist_tick=$ans])
2760 case "$ac_cv_var_nlist_tick" in
2761 ''|no) ;; # HMS: I think we can only get 'no' here...
2762 *) AC_DEFINE_UNQUOTED(K_TICK_NAME, "$ac_cv_var_nlist_tick", [What is the name of TICK in the kernel?]) ;;
2765 AC_CACHE_CHECK([for the units of 'tick'],
2766 ac_cv_var_tick_nano,
2773 ac_cv_var_tick_nano=$ans])
2774 case "$ac_cv_var_tick_nano" in
2776 AC_DEFINE(TICK_NANO, 1, [Is K_TICK_NAME in nanoseconds?])
2780 AC_CACHE_CHECK([the name of 'tickadj' in the kernel],
2781 ac_cv_var_nlist_tickadj,
2784 m68*-hp-hpux*) # HP9000/300?
2815 ans=no # hrestime_adj
2821 ac_cv_var_nlist_tickadj=$ans])
2822 case "$ac_cv_var_nlist_tickadj" in
2823 ''|no) ;; # HMS: I think we can only get 'no' here...
2824 *) AC_DEFINE_UNQUOTED(K_TICKADJ_NAME, "$ac_cv_var_nlist_tickadj", [What is the name of TICKADJ in the kernel?]) ;;
2827 AC_CACHE_CHECK([for the units of 'tickadj'],
2828 ac_cv_var_tickadj_nano,
2835 ac_cv_var_tickadj_nano=$ans])
2836 case "$ac_cv_var_tickadj_nano" in
2838 AC_DEFINE(TICKADJ_NANO, 1, [Is K_TICKADJ_NAME in nanoseconds?])
2842 AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel],
2843 ac_cv_var_nlist_dosynctodr,
2882 ac_cv_var_nlist_dosynctodr=$ans])
2883 case "$ac_cv_var_nlist_dosynctodr" in
2885 *) AC_DEFINE_UNQUOTED(K_DOSYNCTODR_NAME, "$ac_cv_var_nlist_dosynctodr", [What is (probably) the name of DOSYNCTODR in the kernel?])
2889 AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel],
2890 ac_cv_var_nlist_noprintf,
2923 ac_cv_var_nlist_noprintf=$ans])
2924 case "$ac_cv_var_nlist_noprintf" in
2926 *) AC_DEFINE_UNQUOTED(K_NOPRINTF_NAME, "$ac_cv_var_nlist_noprintf", [What is (probably) the name of NOPRINTF in the kernel?])
2930 dnl The tick/tickadj sections were written by Skippy, who never learned
2931 dnl that it's impolite (horridly gross) to show your guts in public.
2934 dnl 10000 80 Unixware
2935 dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE
2936 dnl 10000 150 sgi IRIX
2937 dnl 1000000L/hz 1000 RS6000 && NOKMEM
2938 dnl 1000000L/hz 668 DOMAINOS && NOKMEM
2939 dnl 1000000L/hz 500/HZ other && NOKMEM
2940 dnl txc.tick 1 Linux
2941 dnl (every / 10) 50 WinNT - tickadj is roughly 500/hz
2942 dnl 1000000L/hz (nlist) (Solaris && !ADJTIME_IS_ACCURATE),
2943 dnl (RS6000 && !NOKMEM), SINIX MIPS
2945 dnl But we'll only use these "values" if we can't find anything else.
2947 AC_CACHE_CHECK(for a default value for 'tick', ac_cv_var_tick,
2948 [AC_ARG_ENABLE(tick, [ --enable-tick=VALUE s force a value for 'tick'],
2973 ac_cv_var_tick=$ans])
2974 case "$ac_cv_var_tick" in
2975 ''|no) ;; # HMS: I think we can only get 'no' here...
2976 *) AC_DEFINE_UNQUOTED(PRESET_TICK, $ac_cv_var_tick, [Preset a value for 'tick'?]) ;;
2979 AC_CACHE_CHECK(for a default value for 'tickadj', ac_cv_var_tickadj,
2980 [AC_ARG_ENABLE(tickadj, [ --enable-tickadj=VALUE s force a value for 'tickadj'],
2985 case "$ac_cv_var_adjtime_is_accurate" in
2986 yes) ans='tick/16' ;;
2996 case "$ac_cv_var_can_kmem" in
3000 *-*-domainos) # Skippy: won't be found...
3001 case "$ac_cv_var_can_kmem" in
3006 case "$ac_cv_var_adjtime_is_accurate" in
3007 yes) ans='tick/16' ;;
3020 case "$ac_cv_var_adjtime_is_accurate" in
3030 ac_cv_var_tickadj=$ans])
3031 case "$ac_cv_var_tickadj" in
3032 ''|no) ;; # HMS: I think we can only get 'no' here...
3033 *) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $ac_cv_var_tickadj, [Preset a value for 'tickadj'?]) ;;
3036 # Newer versions of ReliantUNIX round adjtime() values down to
3037 # 1/100s (system tick). Sigh ...
3038 # Unfortunately, there is no easy way to know if particular release
3039 # has this "feature" or any obvious way to test for it.
3041 mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX_CLOCK, 1, [Do we want the ReliantUNIX clock hacks?]) ;;
3045 *-*-sco3.2v5*) AC_DEFINE(SCO5_CLOCK, 1, [Do we want the SCO clock hacks?]) ;;
3048 ac_cv_make_tickadj=yes
3049 case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in
3050 nonono) # Don't read KMEM, no presets. Bogus.
3051 AC_MSG_WARN(Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj.)
3052 ac_cv_make_tickadj=no
3054 nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
3055 AC_MSG_WARN(Can't read kmem but no PRESET_TICK. No tickadj.)
3056 ac_cv_make_tickadj=no
3058 no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus.
3059 AC_MSG_WARN(Can't read kmem but no PRESET_TICKADJ. No tickadj.)
3060 ac_cv_make_tickadj=no
3062 no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool.
3064 yesnono) # Read KMEM, no presets. Cool.
3066 yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
3067 AC_MSG_WARN(PRESET_TICKADJ is defined but not PRESET_TICK. Please report this.)
3069 yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool.
3071 yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
3073 *) # Generally bogus.
3074 AC_MSG_ERROR(This shouldn't happen.)
3078 AC_SUBST(MAKE_NTPTIME)
3079 AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime,
3081 *) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in
3091 ac_cv_make_ntptime=$ans])
3092 case "$ac_cv_make_ntptime" in
3094 MAKE_NTPTIME=ntptime
3098 AC_SUBST(MAKE_TICKADJ)
3101 # tickadj is pretty useless on newer versions of ReliantUNIX
3103 ac_cv_make_tickadj=no
3106 ac_cv_make_tickadj=no
3109 # DLM says tickadj is a no-no starting with solaris2.5
3111 *-*-solaris2.[0-4]*) ;;
3112 *) ac_cv_make_tickadj=no ;;
3116 AC_CACHE_CHECK(if we want and can make the tickadj utility, ac_cv_make_tickadj,
3117 ac_cv_make_tickadj=yes)
3118 case "$ac_cv_make_tickadj" in
3120 MAKE_TICKADJ=tickadj
3124 AC_SUBST(MAKE_TIMETRIM)
3125 AC_CACHE_CHECK(if we want and can make the timetrim utility, ac_cv_make_timetrim,
3128 ac_cv_make_timetrim=yes
3131 ac_cv_make_timetrim=no
3134 case "$ac_cv_make_timetrim" in
3136 MAKE_TIMETRIM=timetrim
3140 AC_CACHE_CHECK(if we want UDP wildcard delivery, ac_cv_var_udp_wildcard_delivery,
3141 [AC_ARG_ENABLE(udp-wildcard, [ --enable-udp-wildcard s use UDP wildcard delivery],
3191 ac_cv_var_udp_wildcard_delivery=$ans])
3192 case "$ac_cv_var_udp_wildcard_delivery" in
3193 yes) AC_DEFINE(UDP_WILDCARD_DELIVERY, 1, [use UDP Wildcard Delivery?]) ;;
3201 LDFLAGS="$LDFLAGS -r"
3207 AC_CACHE_CHECK(if we should always slew the time, ac_cv_var_slew_always,
3208 [AC_ARG_ENABLE(slew-always, [ --enable-slew-always s always slew the time],
3220 *-*-openvms*) # HMS: won't be found
3227 ac_cv_var_slew_always=$ans])
3228 case "$ac_cv_var_slew_always" in
3229 yes) AC_DEFINE(SLEWALWAYS, 1, [Slew always?]) ;;
3232 AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew,
3233 [AC_ARG_ENABLE(step-slew, [ --enable-step-slew s step and slew the time],
3245 *-*-solaris2.[[012]]*)
3248 *-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
3255 ac_cv_var_step_slew=$ans])
3256 case "$ac_cv_var_step_slew" in
3257 yes) AC_DEFINE(STEP_SLEW, 1, [Step, then slew the clock?]) ;;
3260 AC_CACHE_CHECK(if ntpdate should step the time, ac_cv_var_ntpdate_step,
3261 [AC_ARG_ENABLE(ntpdate-step, [ --enable-ntpdate-step s if ntpdate should step the time],
3271 ac_cv_var_ntpdate_step=$ans])
3272 case "$ac_cv_var_ntpdate_step" in
3273 yes) AC_DEFINE(FORCE_NTPDATE_STEP, 1, [force ntpdate to step the clock if !defined(STEP_SLEW) ?]) ;;
3276 AC_CACHE_CHECK(if we should sync TODR clock every hour, ac_cv_var_sync_todr,
3277 [AC_ARG_ENABLE(hourly-todr-sync, [ --enable-hourly-todr-sync
3278 s if we should sync TODR hourly],
3284 *-*-openvms*) # HMS: won't be found
3290 ac_cv_var_sync_todr=$ans])
3291 case "$ac_cv_var_sync_todr" in
3292 yes) AC_DEFINE(DOSYNCTODR, 1, [synch TODR hourly?]) ;;
3295 AC_CACHE_CHECK(if we should avoid kernel FLL bug, ac_cv_var_kernel_fll_bug,
3296 [AC_ARG_ENABLE(kernel-fll-bug, [ --enable-kernel-fll-bug s if we should avoid a kernel FLL bug],
3309 # Generic_105181-17 and higher
3329 # Generic_106541-07 and higher
3343 ac_cv_var_kernel_fll_bug=$ans])
3344 case "$ac_cv_var_kernel_fll_bug" in
3345 yes) AC_DEFINE(KERNEL_FLL_BUG, 1, [Does the kernel have an FLL bug?]) ;;
3353 LDFLAGS="$LDFLAGS -r"
3359 AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
3361 # HMS: I think we avoid this problem now...
3362 ## This is necessary so that .o files in LIBOBJS are also built via
3363 ## the ANSI2KNR-filtering rules.
3364 #LIB@&t@OBJS=`echo "$LIB@&t@OBJS" | sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
3366 AC_CONFIG_FILES(Makefile)
3367 AC_CONFIG_FILES(ElectricFence/Makefile)
3368 AC_CONFIG_FILES(adjtimed/Makefile)
3369 AC_CONFIG_FILES(clockstuff/Makefile)
3370 AC_CONFIG_FILES(include/Makefile)
3371 AC_CONFIG_FILES(kernel/Makefile)
3372 AC_CONFIG_FILES(kernel/sys/Makefile)
3373 AC_CONFIG_FILES(libntp/Makefile)
3374 AC_CONFIG_FILES(libparse/Makefile)
3375 AC_CONFIG_FILES(librsaref/Makefile)
3376 AC_CONFIG_FILES(ntpd/Makefile)
3377 AC_CONFIG_FILES(ntpdate/Makefile)
3378 AC_CONFIG_FILES(ntpdc/Makefile)
3379 AC_CONFIG_FILES(ntpq/Makefile)
3380 AC_CONFIG_FILES(ntptrace/Makefile)
3381 AC_CONFIG_FILES(parseutil/Makefile)
3382 AC_CONFIG_FILES(scripts/Makefile)
3383 AC_CONFIG_FILES(scripts/calc_tickadj)
3384 AC_CONFIG_FILES(scripts/checktime)
3385 AC_CONFIG_FILES(scripts/freq_adj)
3386 AC_CONFIG_FILES(scripts/mkver)
3387 AC_CONFIG_FILES(scripts/ntp-wait)
3388 AC_CONFIG_FILES(scripts/ntpsweep)
3389 AC_CONFIG_FILES(scripts/ntpver)
3390 AC_CONFIG_FILES(scripts/plot_summary)
3391 AC_CONFIG_FILES(scripts/summary)
3392 AC_CONFIG_FILES(util/Makefile)
3394 AC_CONFIG_COMMANDS(default, [[chmod +x scripts/calc_tickadj scripts/checktime scripts/freq_adj scripts/mkver scripts/ntp-wait scripts/ntpsweep scripts/ntpver scripts/plot_summary scripts/summary]], [])