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, "$target")
6 AM_CONFIG_HEADER(config.h)
8 AM_INIT_AUTOMAKE(ntp, 4.0.98f)
11 ac_cv_var_oncore_ok=no
13 dnl Grab any initial CFLAGS so we can pick better defaults.
16 dnl we need to check for cross compile tools for vxWorks here
22 CFLAGS="$CFLAGS -DSYS_CYGWIN32"
27 CFLAGS="$CFLAGS -Wc,+Abi-socket"
37 # Quick and dirty sanity check
39 '') AC_MSG_ERROR(Please follow the directions in html/vxworks.html!)
42 CFLAGS="$CFLAGS -DSYS_VXWORKS"
48 dnl we need to check for cross compile tools for vxWorks here
56 CFLAGS="$CFLAGS -Wall"
57 # CFLAGS="$CFLAGS -Wtraditional"
58 CFLAGS="$CFLAGS -Wshadow"
59 # CFLAGS="$CFLAGS -Wwrite-strings"
60 CFLAGS="$CFLAGS -Wconversion"
61 CFLAGS="$CFLAGS -Wpointer-arith"
62 CFLAGS="$CFLAGS -Wcast-qual"
63 # CFLAGS="$CFLAGS -Wcast-align"
64 CFLAGS="$CFLAGS -Wstrict-prototypes"
66 AC_CACHE_CHECK(whether ${CC-cc} -pipe works, ac_cv_prog_cc_pipe,
67 [echo 'void f(){}' > conftest.c
68 if test -z "`${CC-cc} -pipe -c conftest.c 2>&1`" -a -s conftest.o; then
69 ac_cv_prog_cc_pipe=yes
76 case "$ac_cv_prog_cc_pipe" in
78 CFLAGS="$CFLAGS -pipe"
84 ac_busted_vpath_in_make=no
87 *-*-irix6.1*) # 64 bit only
89 *-*-irix6*) # 6.2 (and later?)
90 ac_busted_vpath_in_make=yes
91 # don't pass -n32 to gcc, it cannot handle and doesn't need it
92 if test "$GCC" != yes; then
97 '') CFLAGS="-O2 -g3 -n32" ;;
98 *) CFLAGS="$CFLAGS -n32" ;;
105 *) LDFLAGS="$LDFLAGS -n32" ;;
110 CFLAGS="$CFLAGS -posix" ;;
112 ac_busted_vpath_in_make=yes
114 dnl This is currently commented out by bor.
115 dnl The new versions of ReliantUNIX round adjtime() interval down
116 dnl to 1/100s (system tick). This makes tickadj actually useless.
117 dnl So, I'd better not use additional flags.
118 dnl I leave it here just in case anybody has better idea
119 dnl mips-sni-sysv4* )
121 dnl # Add flags for 64 bit file access to enable tickadj to access /dev/kmem
123 dnl if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then
124 dnl CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`"
129 case "$ac_busted_vpath_in_make$srcdir" in
132 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
134 AC_MSG_ERROR(building outside of the main directory requires GNU make)
145 AC_PROG_GCC_TRADITIONAL
150 AC_PATH_PROG(PATH_SH, sh)
154 ac_link="$ac_link $VX_KERNEL"
162 AC_CHECK_LIB(advapi32, main)
165 AC_CHECK_LIB(elf, nlist)
166 dnl AC_CHECK_LIB(kvm, main, , , -lelf)
167 AC_CHECK_LIB(kvm, main) dnl We already know about -lelf here...
168 AC_CHECK_LIB(ld, nlist)
169 AC_CHECK_LIB(mld, nlist)
170 AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
171 AC_CHECK_FUNC(openlog, , AC_CHECK_LIB(gen, openlog))
173 dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
174 dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
175 dnl so only use one of them
176 AC_CHECK_LIB(rt, sched_setscheduler, ,
177 AC_CHECK_LIB(posix4, sched_setscheduler))
178 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
181 AC_CHECK_HEADERS(bstring.h errno.h fcntl.h memory.h netdb.h poll.h resolv.h)
182 AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h termios.h)
183 AC_CHECK_HEADERS(timepps.h timex.h unistd.h utmp.h utmpx.h)
184 AC_CHECK_HEADERS(arpa/nameser.h net/if.h netinet/in.h netinet/ip.h)
185 AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO)])
186 AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h)
187 dnl AC_CHECK_HEADERS(sys/chudefs.h)
188 AC_CHECK_HEADERS(sys/clkdefs.h sys/file.h)
191 *) AC_CHECK_HEADERS(sys/ioctl.h)
194 AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h)
195 AC_CHECK_HEADERS(sys/ppstime.h sys/proc.h sys/resource.h sys/sched.h)
198 AC_CHECK_HEADERS(sys/sio.h)
201 AC_CHECK_HEADERS(sys/syssgi.h)
204 AC_CHECK_HEADERS(sys/select.h)
207 AC_CHECK_HEADERS(sys/sockio.h sys/stat.h sys/stream.h sys/stropts.h)
208 AC_CHECK_HEADERS(sys/sysctl.h sys/termios.h sys/time.h)
210 [#include <sys/timepps.h>
211 #ifdef PPS_API_VERS_1
214 ], AC_CHECK_HEADERS(sys/timepps.h))
215 AC_CHECK_HEADERS(sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.h)
219 AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h)
222 AC_CHECK_HEADERS(machine/inline.h sys/pcl720.h sys/i8253.h)
226 AC_CHECK_HEADER(nlist.h,
227 [AC_DEFINE(NLIST_STRUCT)
228 AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
229 [AC_TRY_COMPILE([#include <nlist.h>],
230 [struct nlist n; n.n_un.n_name = 0;],
231 ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
232 if test $ac_cv_struct_nlist_n_un = yes; then
233 AC_DEFINE(NLIST_NAME_UNION)
237 AC_CACHE_CHECK(for basic volatile support, ac_cv_c_volatile,
240 ac_cv_c_volatile=yes,
243 case "$ac_cv_c_volatile" in
246 *) AC_DEFINE(volatile,)
252 # Assume that solaris2 is Ansi C...
258 AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes,
260 extern int foo (short);
261 int foo(short i) { return i; }],[
262 int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no)
264 if test "$ac_cv_have_prototypes" = yes; then
265 AC_DEFINE(HAVE_PROTOTYPES)
278 AC_DEFINE(WORDS_BIGENDIAN)
280 *) AC_MSG_ERROR(Cross-compiling needs explicit byte order)
288 AC_CHECK_TYPE(time_t, long)
291 AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz,
292 [ac_cv_var_default_hz=100
294 alpha*-dec-osf4*|alpha*-dec-osf5*)
295 ac_cv_var_default_hz=1024
298 ac_cv_var_default_hz=256
301 AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz)
303 AC_CACHE_CHECK(if we need to override the system's value for HZ, ac_cv_var_override_hz,
304 [ac_cv_var_override_hz=no
306 alpha*-dec-osf4*|alpha*-dec-osf5*)
307 ac_cv_var_override_hz=yes
310 ac_cv_var_override_hz=yes
313 ac_cv_var_override_hz=yes
316 ac_cv_var_override_hz=yes
319 case "$ac_cv_var_override_hz" in
321 AC_DEFINE(OVERRIDE_HZ)
325 dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
326 dnl [AC_TRY_LINK([#include <sys/types.h>
327 dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;],
328 dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)])
329 dnl if test $su_cv_func_ut_host_in_utmp = yes; then
330 dnl AC_DEFINE(HAVE_UT_HOST)
333 dnl AC_MSG_CHECKING(if we can get the system boot time)
334 dnl AC_CACHE_VAL(su_cv_have_boot_time,
335 dnl [AC_EGREP_CPP(yes,
336 dnl [#ifdef HAVE_UTMPX_H
337 dnl #include <utmpx.h>
339 dnl #include <utmp.h>
344 dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)])
345 dnl AC_MSG_RESULT($su_cv_have_boot_time)
348 struct sigaction for sa_sigaction,
349 ac_cv_struct_sigaction_has_sa_sigaction,
352 [#include <signal.h>],
353 [struct sigaction act; act.sa_sigaction = 0;],
354 ac_cv_struct_sigaction_has_sa_sigaction=yes,
355 ac_cv_struct_sigaction_has_sa_sigaction=no
359 if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
360 AC_DEFINE(HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION)
363 AC_CACHE_CHECK(for struct ppsclockev, ac_cv_struct_ppsclockev,
365 #include <sys/types.h>
366 #ifdef HAVE_SYS_TERMIOS_H
367 # include <sys/termios.h>
369 #ifdef HAVE_SYS_TIME_H
370 # include <sys/time.h>
372 #ifdef HAVE_SYS_PPSCLOCK_H
373 # include <sys/ppsclock.h>
375 extern struct ppsclockev *pce;
376 return pce->serial;],
377 ac_cv_struct_ppsclockev=yes,
378 ac_cv_struct_ppsclockev=no)
380 if test $ac_cv_struct_ppsclockev = yes; then
381 AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV)
384 AC_CACHE_CHECK(struct sockaddr for sa_len, ac_cv_struct_sockaddr_has_sa_len,
386 #include <sys/types.h>
387 #include <sys/socket.h>],[
388 extern struct sockaddr *ps;
390 ac_cv_struct_sockaddr_has_sa_len=yes,
391 ac_cv_struct_sockaddr_has_sa_len=no)
393 if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
394 AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR)
397 AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz,
399 #include <sys/time.h>],[
400 extern struct clockinfo *pc;
402 ac_cv_struct_clockinfo_has_hz=yes,
403 ac_cv_struct_clockinfo_has_hz=no)
405 if test $ac_cv_struct_clockinfo_has_hz = yes; then
406 AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO)
409 AC_CACHE_CHECK(struct clockinfo for tickadj, ac_cv_struct_clockinfo_has_tickadj,
411 #include <sys/time.h>],[
412 extern struct clockinfo *pc;
413 return pc->tickadj;],
414 ac_cv_struct_clockinfo_has_tickadj=yes,
415 ac_cv_struct_clockinfo_has_tickadj=no)
417 if test $ac_cv_struct_clockinfo_has_tickadj = yes; then
418 AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO)
421 AC_CACHE_CHECK([for struct ntptimeval], ac_cv_struct_ntptimeval,
423 #include <sys/time.h>
424 #include <sys/timex.h>],
425 [struct ntptimeval n;],
426 ac_cv_struct_ntptimeval=yes, ac_cv_struct_ntptimeval=no)])
427 if test $ac_cv_struct_ntptimeval = yes; then
428 AC_DEFINE(HAVE_STRUCT_NTPTIMEVAL, 1, [Do we have struct ntptimeval?])
431 AC_CACHE_CHECK(struct ntptimeval for time.tv_nsec, ac_cv_struct_ntptimeval_tv_nsec,
433 #ifdef HAVE_SYS_TIME_H
434 #include <sys/time.h>
440 #ifdef HAVE_SYS_TIMEX_H
441 #include <sys/timex.h>
447 extern struct ntptimeval *ntv;
448 return ntv->time.tv_nsec;],
449 ac_cv_struct_ntptimeval_tv_nsec=yes,
450 ac_cv_struct_ntptimeval_tv_nsec=no)
452 if test "$ac_cv_struct_ntptimeval_tv_nsec" = "yes"; then
453 AC_DEFINE(HAVE_TV_NSEC_IN_NTPTIMEVAL)
456 AC_CACHE_CHECK([for struct timespec in struct ntptimeval], ac_cv_struct_ntptimeval_timespec,
457 [AC_TRY_COMPILE([#include <sys/time.h>
458 #include <sys/timex.h>],
459 [struct ntptimeval n; n.time.tv_nsec = 0;],
460 ac_cv_struct_ntptimeval_timespec=yes, ac_cv_struct_ntptimeval_timespec=no)])
461 if test $ac_cv_struct_ntptimeval_timespec = yes; then
462 AC_DEFINE(TIMESPEC_IN_NTPTIMEVAL, 1, [Does ntptimeval use struct timespec?])
466 AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
469 AC_CHECK_SIZEOF(signed char)
473 AC_CHECK_SIZEOF(signed char, 1)
475 *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_SIGNED_LONG)
487 AC_CHECK_SIZEOF(int, 4)
489 *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_INT)
497 AC_CHECK_SIZEOF(long)
501 AC_CHECK_SIZEOF(long, 4)
503 *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_LONG)
509 AC_CHECK_TYPE(s_char, signed char)
510 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
512 # We have a typedef for s_char. Might as well believe it...
515 # We have signed chars, can't say 'signed char', no s_char typedef.
516 AC_DEFINE(NEED_S_CHAR_TYPEDEF)
519 # We have signed chars, can say 'signed char', no s_char typedef.
520 AC_DEFINE(NEED_S_CHAR_TYPEDEF)
523 # We have unsigned chars, can't say 'signed char', no s_char typedef.
524 AC_MSG_ERROR(No way to specify a signed character!)
527 # We have unsigned chars, can say 'signed char', no s_char typedef.
528 AC_DEFINE(NEED_S_CHAR_TYPEDEF)
535 AC_CHECK_FUNCS(__adjtimex __ntp_gettime)
540 # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
541 # (returning ENOSYS). I didn't check 4.2. If, in the future,
542 # IBM pulls its thumbs out long enough to implement clock_settime,
543 # this conditional will need to change. Maybe use AC_TRY_RUN
544 # instead to try to set the time to itself and check errno.
546 *) AC_CHECK_FUNCS(clock_settime)
549 AC_CHECK_FUNCS(daemon getbootfile getdtablesize getrusage)
550 AC_CHECK_FUNCS(gettimeofday)
554 *) AC_CHECK_FUNCS(getuid)
557 AC_CHECK_FUNCS(K_open kvm_open memcpy memmove memset)
560 # Just stubs. Idiots.
562 *) AC_CHECK_FUNCS(mkstemp)
565 AC_REPLACE_FUNCS(mktime)
568 # Just a stub. Idiots.
571 # Just stubs in Irix. Idiots.
574 # Just stubs. Idiots.
576 alpha*-dec-osf4*|alpha*-dec-osf5*)
577 # mlockall is there, as a #define calling memlk via <sys/mman.h>
578 # Not easy to test for - cheat.
579 AC_CHECK_FUNCS(memlk, [ac_cv_func_mlockall='yes'])
580 AC_CHECK_FUNCS(mlockall)
582 *) AC_CHECK_FUNCS(mlockall)
585 AC_CHECK_FUNCS(nice nlist)
590 *) AC_CHECK_FUNCS(ntp_adjtime ntp_gettime)
593 AC_CHECK_FUNCS(plock pututline pututxline rtprio)
594 AC_CHECK_FUNCS(random srandom mrand48 srand48)
597 # Just a stub in AIX 4. Idiots.
600 # Just stubs in solaris2.5. Idiots.
602 *) AC_CHECK_FUNCS(sched_setscheduler)
605 AC_CHECK_FUNCS(setlinebuf)
606 AC_CHECK_FUNCS(setpgid setpriority setsid settimeofday setvbuf sigaction)
607 AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl)
608 AC_REPLACE_FUNCS(strerror)
611 # Just stubs. Idiots.
614 # Just stubs. Idiots.
617 # Just stubs. Idiots.
619 *) AC_CHECK_FUNCS(timer_create timer_settime)
626 *) AC_CHECK_FUNCS(umask)
629 AC_CHECK_FUNCS(uname updwtmp updwtmpx vsprintf)
631 AC_CACHE_CHECK(number of arguments to gettimeofday(), ac_cv_func_Xettimeofday_nargs,
632 [AC_TRY_COMPILE([#include <sys/time.h>],[
633 gettimeofday((struct timeval*)0,(struct timezone*)0);
634 settimeofday((struct timeval*)0,(struct timezone*)0);
636 ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1)
638 if test $ac_cv_func_Xettimeofday_nargs = 1; then
639 AC_DEFINE(SYSV_TIMEOFDAY)
642 AC_CACHE_CHECK(number of arguments taken by setpgrp(), ac_cv_func_setpgrp_nargs,
644 #ifdef HAVE_SYS_TYPES_H
645 # include <sys/types.h>
651 ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0)
653 if test $ac_cv_func_setpgrp_nargs = 0; then
654 AC_DEFINE(HAVE_SETPGRP_0)
658 CFLAGS="$CFLAGS -I$srcdir/include"
660 AC_CACHE_CHECK(argument pointer type of qsort()'s compare function and base,
661 ac_cv_func_qsort_argtype,
663 #include "l_stdlib.h"
665 #ifdef HAVE_PROTOTYPES
672 extern sortfunc P((const void *, const void *));
675 const void *b; { return 0; }
677 qsort(base, 2, sizeof(char *), sortfunc);
679 ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char)
681 case "$ac_cv_func_qsort_argtype" in
683 AC_DEFINE(QSORT_USES_VOID_P)
689 AC_CACHE_CHECK(if we need to declare 'errno', ac_cv_decl_errno,
690 [AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H
694 ac_cv_decl_errno=no, ac_cv_decl_errno=yes)])
695 case "$ac_cv_decl_errno" in
696 yes) AC_DEFINE(DECL_ERRNO) ;;
699 dnl FIXME: from ntpd/ntp_intres.c, but there's no info which header produces
700 dnl the clash. <resolv.h> isn't currently used.
702 dnl (prr) aix 4.3 defines h_errno as (*(int *)h_errno_which()) for
703 dnl MT purposes. This makes the line "extern int h_errno" choke
704 dnl the compiler. Hopefully adding !defined(h_errno) fixes this
705 dnl without breaking any other platforms.
707 AC_CACHE_CHECK(if we may declare 'h_errno', ac_cv_decl_h_errno,
708 [AC_TRY_COMPILE([#include <sys/types.h>
709 #ifdef HAVE_NETINET_IN_H
710 #include <netinet/in.h>
712 #ifdef HAVE_ARPA_NAMESER_H
713 #include <arpa/nameser.h>
721 [extern int h_errno;],
722 ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
723 case "$ac_cv_decl_h_errno" in
724 yes) AC_DEFINE(DECL_H_ERRNO) ;;
727 dnl See if char *sys_errlist[] is OK.
728 dnl If you get the quoting right on the next line, you tried something I didn't.
729 AC_CACHE_CHECK(if declaring 'char *sys_errlist[]' is ok, ac_cv_decl_sys_errlist,
730 [AC_TRY_COMPILE([#include <stdio.h>
734 changequote(<<, >>)dnl
735 <<extern char *sys_errlist[];>>
737 ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
738 case "$ac_cv_decl_sys_errlist" in
739 yes) AC_DEFINE(CHAR_SYS_ERRLIST) ;;
742 AC_CACHE_CHECK(if declaring 'syscall()' is ok, ac_cv_decl_syscall,
744 #ifdef HAVE_SYS_TYPES_H
745 # include <sys/types.h>
750 #ifdef HAVE_PROTOTYPES
756 [extern int syscall P((int, ...));],
757 ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)])
758 case "$ac_cv_decl_syscall" in
759 yes) AC_DEFINE(DECL_SYSCALL) ;;
764 AC_DEFINE(DECL_PLOCK_0)
765 AC_DEFINE(DECL_STIME_0)
768 AC_DEFINE(DECL_ADJTIME_0)
769 AC_DEFINE(DECL_BZERO_0)
770 AC_DEFINE(DECL_IOCTL_0)
771 AC_DEFINE(DECL_IPC_0)
772 AC_DEFINE(DECL_MEMMOVE_0)
773 AC_DEFINE(DECL_MKTEMP_0)
774 AC_DEFINE(DECL_RENAME_0)
775 AC_DEFINE(DECL_SELECT_0)
776 AC_DEFINE(DECL_SETITIMER_0)
777 AC_DEFINE(DECL_SETPRIORITY_0)
778 AC_DEFINE(DECL_STDIO_0)
779 AC_DEFINE(DECL_STRTOL_0)
780 AC_DEFINE(DECL_SYSLOG_0)
781 AC_DEFINE(DECL_TIME_0)
782 AC_DEFINE(DECL_TIMEOFDAY_0)
783 AC_DEFINE(DECL_TOLOWER_0)
786 AC_DEFINE(DECL_MKSTEMP_0)
787 AC_DEFINE(DECL_SETPRIORITY_1)
790 AC_DEFINE(DECL_TIMEOFDAY_0)
795 AC_DEFINE(DECL_ADJTIME_0)
796 AC_DEFINE(DECL_BCOPY_0)
797 AC_DEFINE(DECL_BZERO_0)
798 AC_DEFINE(DECL_IOCTL_0)
799 AC_DEFINE(DECL_IPC_0)
800 AC_DEFINE(DECL_MEMMOVE_0)
801 AC_DEFINE(DECL_MKTEMP_0)
802 AC_DEFINE(DECL_MKSTEMP_0)
803 AC_DEFINE(DECL_MRAND48_0)
804 AC_DEFINE(DECL_RENAME_0)
805 AC_DEFINE(DECL_SELECT_0)
806 AC_DEFINE(DECL_SETITIMER_0)
807 AC_DEFINE(DECL_SETPRIORITY_0)
808 AC_DEFINE(DECL_SIGVEC_0)
809 AC_DEFINE(DECL_SRAND48_0)
810 case "`basename $ac_cv_prog_CC`" in
812 *) AC_DEFINE(DECL_STDIO_0)
815 AC_DEFINE(DECL_STRTOL_0)
816 AC_DEFINE(DECL_SYSLOG_0)
817 AC_DEFINE(DECL_TIME_0)
818 AC_DEFINE(DECL_TIMEOFDAY_0)
819 AC_DEFINE(DECL_TOLOWER_0)
820 AC_DEFINE(DECL_TOUPPER_0)
823 AC_DEFINE(DECL_ADJTIME_0)
824 AC_DEFINE(DECL_BZERO_0)
825 AC_DEFINE(DECL_CFSETISPEED_0)
826 AC_DEFINE(DECL_IOCTL_0)
827 AC_DEFINE(DECL_IPC_0)
828 AC_DEFINE(DECL_MKTEMP_0)
829 AC_DEFINE(DECL_MRAND48_0)
830 AC_DEFINE(DECL_NLIST_0)
831 AC_DEFINE(DECL_PLOCK_0)
832 AC_DEFINE(DECL_SELECT_0)
833 AC_DEFINE(DECL_SETITIMER_0)
834 AC_DEFINE(DECL_SETPRIORITY_0)
835 AC_DEFINE(DECL_SRAND48_0)
836 AC_DEFINE(DECL_STIME_0)
837 AC_DEFINE(DECL_SYSLOG_0)
838 AC_DEFINE(DECL_TIMEOFDAY_0)
844 AC_DEFINE(TERMIOS_NEEDS__SVID3)
848 AC_CACHE_CHECK(if we should use a streams device for ifconfig,
849 ac_cv_var_use_streams_device_for_ifconfig,
850 ac_cv_var_use_streams_device_for_ifconfig=no)
852 AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop,
854 changequote(<<, >>)dnl
861 ac_cv_var_rcvbuf_slop=$ans])
862 case "$ac_cv_var_rcvbuf_slop" in
863 yes) AC_DEFINE(NEED_RCVBUF_SLOP) ;;
866 AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket,
876 ac_cv_var_open_bcast_socket=$ans])
877 case "$ac_cv_var_open_bcast_socket" in
878 yes) AC_DEFINE(OPEN_BCAST_SOCKET) ;;
881 AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig,
888 ac_cv_var_hpux_findconfig=$ans])
889 case "$ac_cv_var_hpux_findconfig" in
890 yes) AC_DEFINE(NEED_HPUX_FINDCONFIG) ;;
893 AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid,
894 [changequote(<<, >>)dnl
916 ac_cv_arg_setpgrp_negpid=$ans])
917 case "$ac_cv_arg_setpgrp_negpid" in
918 yes) AC_DEFINE(UDP_BACKWARDS_SETOWN) ;;
921 AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown,
938 ac_cv_func_ctty_for_f_setown=$ans])
939 case "$ac_cv_func_ctty_for_f_setown" in
940 yes) AC_DEFINE(USE_FSETOWNCTTY) ;;
944 AC_MSG_CHECKING(if we'll use clock_settime or settimeofday or stime)
945 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
948 ans='clock_settime()'
951 ntp_warning='But clock_settime() would be better (if we had it)'
955 ntp_warning='Which is the worst of the three'
960 $target) ntp_warning='Which leaves us with nothing to use!'
966 case "$ntp_warning" in
968 *) AC_MSG_WARN(*** $ntp_warning ***)
972 AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug,
980 ac_cv_var_syscall_bug=$ans])
981 case "$ac_cv_var_syscall_bug" in
982 yes) AC_DEFINE(SYSCALL_BUG) ;;
985 AC_CACHE_CHECK(for Streams/TLI, ac_cv_var_streams_tli,
986 [ case "$ac_cv_header_sys_stropts_h" in
989 # There must be a better way...
997 ac_cv_var_streams_tli=$ans])
998 case "$ac_cv_var_streams_tli" in
1000 AC_DEFINE(STREAMS_TLI)
1004 AC_CACHE_CHECK(for SIGIO, ac_cv_hdr_def_sigio,
1006 [#include <signal.h>
1010 ], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no))
1012 dnl Override those system that have a losing SIGIO
1013 AC_CACHE_CHECK(if we want to use signalled IO, ac_cv_var_signalled_io,
1015 case "$ac_cv_hdr_def_sigio" in
1019 alpha*-dec-osf4*|alpha*-dec-osf5*)
1049 ac_cv_var_signalled_io=$ans])
1050 case "$ac_cv_var_signalled_io" in
1051 yes) AC_DEFINE(HAVE_SIGNALED_IO) ;;
1054 AC_CACHE_CHECK(for SIGPOLL, ac_cv_hdr_def_sigpoll,
1056 [#include <signal.h>
1060 ], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no))
1062 AC_CACHE_CHECK(for SIGSYS, ac_cv_hdr_def_sigsys,
1064 [#include <signal.h>
1068 ], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no))
1070 AC_CACHE_CHECK(if we can use SIGPOLL for UDP I/O, ac_cv_var_use_udp_sigpoll,
1072 case "$ac_cv_hdr_def_sigpoll" in
1074 changequote(<<, >>)dnl
1109 changequote([, ])dnl
1112 ac_cv_var_use_udp_sigpoll=$ans])
1113 case "$ac_cv_var_use_udp_sigpoll" in
1114 yes) AC_DEFINE(USE_UDP_SIGPOLL) ;;
1117 AC_CACHE_CHECK(if we can use SIGPOLL for TTY I/O, ac_cv_var_use_tty_sigpoll,
1119 case "$ac_cv_hdr_def_sigpoll" in
1157 ac_cv_var_use_tty_sigpoll=$ans])
1158 case "$ac_cv_var_use_tty_sigpoll" in
1159 yes) AC_DEFINE(USE_TTY_SIGPOLL) ;;
1162 case "$ac_cv_header_sys_sio_h" in
1164 AC_CACHE_CHECK(sys/sio.h for TIOCDCDTIMESTAMP, ac_cv_hdr_def_tiocdcdtimestamp,
1166 [#include <sys/sio.h>
1167 #ifdef TIOCDCDTIMESTAMP
1170 ], ac_cv_hdr_def_tiocdcdtimestamp=yes, ac_cv_hdr_def_tiocdcdtimestamp=no))
1174 AC_CACHE_CHECK(if nlist() values might require extra indirection,
1175 ac_cv_var_nlist_extra_indirection,
1182 ac_cv_var_nlist_extra_indirection=$ans])
1183 case "$ac_cv_var_nlist_extra_indirection" in
1184 yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION) ;;
1187 AC_CACHE_CHECK(for a minimum recommended value of tickadj,
1188 ac_cv_var_min_rec_tickadj,
1195 ac_cv_var_min_rec_tickadj=$ans])
1196 case "$ac_cv_var_min_rec_tickadj" in
1198 *) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj) ;;
1201 AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR,
1202 ac_cv_var_no_parenb_ignpar,
1212 ac_cv_var_no_parenb_ignpar=$ans])
1213 case "$ac_cv_var_no_parenb_ignpar" in
1214 yes) AC_DEFINE(NO_PARENB_IGNPAR) ;;
1217 AC_MSG_CHECKING(if we're including debugging code)
1218 AC_ARG_ENABLE(debugging, [ --enable-debugging + include debugging code],
1219 [ntp_ok=$enableval], [ntp_ok=yes])
1220 if test "$ntp_ok" = "yes"; then
1223 AC_MSG_RESULT($ntp_ok)
1225 AC_MSG_CHECKING(for a the number of minutes in a DST adjustment)
1226 AC_ARG_ENABLE(dst_minutes, [ --enable-dst-minutes=60 + minutes per DST adjustment],
1227 [ans=$enableval], [ans=60])
1228 AC_DEFINE_UNQUOTED(DSTMINUTES, $ans)
1231 AC_CACHE_CHECK(if we have the tty_clk line discipline/streams module,
1233 [case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in
1234 *yes*) ac_cv_var_tty_clk=yes ;;
1236 case "$ac_cv_var_tty_clk" in
1237 yes) AC_DEFINE(TTYCLK) ;;
1240 AC_CACHE_CHECK(for the ppsclock streams module,
1242 ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev)
1243 case "$ac_cv_var_ppsclock" in
1244 yes) AC_DEFINE(PPS) ;;
1247 AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast,
1250 i386-sequent-sysv4) ;;
1251 *) AC_EGREP_CPP(yes,
1252 [#include <netinet/in.h>
1253 #ifdef IP_ADD_MEMBERSHIP
1256 ], ac_cv_var_mcast=yes) ;;
1258 case "$ac_cv_var_mcast" in
1259 yes) AC_DEFINE(MCAST) ;;
1262 AC_CACHE_CHECK([availability of ntp_{adj,get}time()], ac_cv_var_ntp_syscalls,
1263 [ac_cv_var_ntp_syscalls=no
1264 case "$ac_cv_func___adjtimex" in
1266 ac_cv_var_ntp_syscalls=libc
1268 *) case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime" in
1270 ac_cv_var_ntp_syscalls=libc
1272 *) AC_EGREP_CPP(yes,
1273 [#include <sys/syscall.h>
1274 #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
1277 ], ac_cv_var_ntp_syscalls=kernel)
1282 case "$ac_cv_var_ntp_syscalls" in
1284 AC_DEFINE(NTP_SYSCALLS_LIBC)
1287 AC_DEFINE(NTP_SYSCALLS_STD)
1293 AC_CACHE_CHECK(if sys/timex.h has STA_FLL, ac_cv_var_sta_fll,
1295 [#include <sys/timex.h>
1299 ], ac_cv_var_sta_fll=yes, ac_cv_var_sta_fll=no)])
1301 AC_CACHE_CHECK(if we have kernel PLL support, ac_cv_var_kernel_pll,
1302 [dnl ac_cv_var_ntp_syscalls is {no,libc,kernel}
1303 case "$ac_cv_header_sys_timex_h$ac_cv_struct_ntptimeval$ac_cv_var_sta_fll$ac_cv_var_ntp_syscalls" in
1305 ac_cv_var_kernel_pll=no
1307 *) ac_cv_var_kernel_pll=yes
1310 case "$ac_cv_var_kernel_pll" in
1312 AC_DEFINE(KERNEL_PLL)
1316 AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer,
1329 ac_cv_var_size_returned_in_buffer=$ans])
1330 case "$ac_cv_var_size_returned_in_buffer" in
1331 yes) AC_DEFINE(SIZE_RETURNED_IN_BUFFER) ;;
1334 dnl AC_CACHE_CHECK(if we want GDT surveying code, ac_cv_var_gdt_surveying,
1335 dnl [AC_ARG_ENABLE(gdt-surveying, [ --enable-gdt-surveying - include GDT survey code],
1336 dnl [ans=$enableval], [ans=no])
1337 dnl ac_cv_var_gdt_surveying=$ans])
1338 dnl case "$ac_cv_var_gdt_surveying" in
1339 dnl yes) AC_DEFINE(GDT_SURVEYING) ;;
1342 AC_CACHE_CHECK(if we want to use MD5 authentication, ac_cv_var_use_md5,
1343 [AC_ARG_ENABLE(md5, [ --enable-md5 + include support for MD5 keys],
1344 [ans=$enableval], [ans=yes])
1345 ac_cv_var_use_md5=$ans])
1346 case "$ac_cv_var_use_md5" in
1347 yes) AC_DEFINE(MD5) ;;
1350 # Check for ioctls TIOCGPPSEV
1351 AC_MSG_CHECKING(ioctl TIOCGPPSEV)
1352 if test "$ac_cv_header_termios_h" = "yes"; then
1354 [#include <termios.h>
1358 ], ntp_ok=yes, ntp_ok=no)
1363 if test "$ntp_ok" = "yes"; then
1364 AC_DEFINE(HAVE_TIOCGPPSEV)
1365 ac_cv_var_oncore_ok=yes
1367 AC_MSG_RESULT($ntp_ok)
1369 # Check for ioctls TIOCSPPS
1370 AC_MSG_CHECKING(ioctl TIOCSPPS)
1371 if test "$ac_cv_header_termios_h" = "yes"; then
1373 [#include <termios.h>
1377 ], ntp_ok=yes, ntp_ok=no)
1382 if test "$ntp_ok" = "yes"; then
1383 AC_DEFINE(HAVE_TIOCSPPS)
1385 AC_MSG_RESULT($ntp_ok)
1387 # Check for ioctls CIOGETEV
1388 AC_MSG_CHECKING(ioctl CIOGETEV)
1389 if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
1391 [#include <sys/ppsclock.h>
1395 ], ntp_ok=yes, ntp_ok=no)
1400 if test "$ntp_ok" = "yes"; then
1401 ac_cv_var_oncore_ok=yes
1402 AC_DEFINE(HAVE_CIOGETEV)
1404 AC_MSG_RESULT($ntp_ok)
1406 # Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
1407 # there is NO way that I can tell to tell if a given OS is using timespec or
1408 # timeval so just set it here for the one case that is KNOWN to use timespec.
1410 case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h" in
1412 AC_DEFINE(HAVE_PPSAPI)
1413 ac_cv_var_oncore_ok=yes
1414 AC_DEFINE(HAVE_TIMESPEC)
1418 # Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
1419 AC_CHECK_HEADER(linux/serial.h)
1420 AC_MSG_CHECKING(ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG)
1421 case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
1424 [#include <sys/time.h>
1427 #include <sys/ppsclock.h>
1428 #include <linux/serial.h>
1432 #ifdef ASYNC_PPS_CD_POS
1433 #ifdef ASYNC_PPS_CD_NEG
1448 if test "$ntp_ok" = "yes"; then
1449 AC_DEFINE(HAVE_TIO_SERIAL_STUFF)
1451 AC_MSG_RESULT($ntp_ok)
1453 dnl dnl These are for OPT_PROGRAMS in authstuff/
1454 dnl AC_SUBST(AUTHCERT)
1455 dnl AC_SUBST(AUTHSPEED)
1456 dnl AC_SUBST(MD5DRIVER)
1457 dnl AC_SUBST(KEYPARITY)
1458 dnl AC_SUBST(MAKEIPFP)
1459 dnl AC_SUBST(MAKEPC1)
1460 dnl AC_SUBST(MAKEPC2)
1461 dnl AC_SUBST(MAKESP)
1462 dnl AC_SUBST(MKRANDKEYS)
1463 dnl AC_SUBST(OMAKEIPFP)
1464 dnl AC_SUBST(UNIXCERT)
1468 # HPUX only, and by explicit request
1469 AC_MSG_CHECKING(Datum/Bancomm bc635/VME interface)
1470 AC_ARG_ENABLE(BANCOMM, [ --enable-BANCOMM - Datum/Bancomm bc635/VME interface],
1471 [ntp_ok=$enableval], [ntp_ok=no])
1472 if test "$ntp_ok" = "yes"; then
1474 AC_DEFINE(CLOCK_BANC)
1476 AC_MSG_RESULT($ntp_ok)
1477 case "$ntp_ok$target" in
1479 yes*) AC_WARN(*** But the expected answer is... no ***) ;;
1482 #HPUX only, and only by explicit request
1483 AC_MSG_CHECKING(TrueTime GPS receiver/VME interface)
1484 AC_ARG_ENABLE(GPSVME, [ --enable-GPSVME - TrueTime GPS receiver/VME interface],
1485 [ntp_ok=$enableval], [ntp_ok=no])
1486 if test "$ntp_ok" = "yes"; then
1488 AC_DEFINE(CLOCK_GPSVME)
1490 AC_MSG_RESULT($ntp_ok)
1491 case "$ntp_ok$target" in
1493 yes*) AC_WARN(*** But the expected answer is... no ***) ;;
1496 AC_MSG_CHECKING(for PCL720 clock support)
1497 case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
1499 AC_DEFINE(CLOCK_PPS720)
1508 AC_MSG_CHECKING(for SHM clock attached thru shared memory)
1509 AC_ARG_ENABLE(SHM, [ --enable-SHM - SHM clock attached thru shared memory],
1510 [ntp_ok=$enableval], [ntp_ok=no])
1511 if test "$ntp_ok" = "yes"; then
1513 AC_DEFINE(CLOCK_SHM)
1515 AC_MSG_RESULT($ntp_ok)
1517 AC_MSG_CHECKING(for default inclusion of all suitable non-PARSE clocks)
1518 AC_ARG_ENABLE(all-clocks, [ --enable-all-clocks + include all suitable non-PARSE clocks:],
1519 [ntp_eac=$enableval], [ntp_eac=yes])
1520 AC_MSG_RESULT($ntp_eac)
1522 AC_MSG_CHECKING(if we have support for PARSE clocks)
1523 case "$ac_cv_header_termio_h$ac_cv_header_termios_h" in
1530 AC_MSG_RESULT($ntp_canparse)
1532 # Requires modem control
1533 AC_MSG_CHECKING(ACTS modem service)
1534 AC_ARG_ENABLE(ACTS, [ --enable-ACTS + ACTS modem service],
1535 [ntp_ok=$enableval],
1537 [#include <termios.h>
1538 #ifdef HAVE_SYS_IOCTL_H
1539 #include <sys/ioctl.h>
1544 ], ntp_ok=$ntp_eac, ntp_ok=no)])
1545 if test "$ntp_ok" = "yes"; then
1547 AC_DEFINE(CLOCK_ACTS)
1549 AC_MSG_RESULT($ntp_ok)
1551 AC_MSG_CHECKING(Arbiter 1088A/B GPS receiver)
1552 AC_ARG_ENABLE(ARBITER, [ --enable-ARBITER + Arbiter 1088A/B GPS receiver],
1553 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1554 if test "$ntp_ok" = "yes"; then
1556 AC_DEFINE(CLOCK_ARBITER)
1558 AC_MSG_RESULT($ntp_ok)
1560 AC_MSG_CHECKING(Arcron MSF receiver)
1561 AC_ARG_ENABLE(ARCRON_MSF, [ --enable-ARCRON-MSF + Arcron MSF receiver],
1562 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1563 if test "$ntp_ok" = "yes"; then
1565 AC_DEFINE(CLOCK_ARCRON_MSF)
1567 AC_MSG_RESULT($ntp_ok)
1569 AC_MSG_CHECKING(Austron 2200A/2201A GPS receiver)
1570 AC_ARG_ENABLE(AS2201, [ --enable-AS2201 + Austron 2200A/2201A GPS receiver],
1571 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1572 if test "$ntp_ok" = "yes"; then
1574 AC_DEFINE(CLOCK_AS2201)
1576 AC_MSG_RESULT($ntp_ok)
1578 AC_MSG_CHECKING(PPS interface)
1579 AC_ARG_ENABLE(ATOM, [ --enable-ATOM + PPS interface],
1580 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1581 if test "$ntp_ok" = "yes"; then
1583 AC_DEFINE(CLOCK_ATOM)
1585 AC_MSG_RESULT($ntp_ok)
1587 AC_MSG_CHECKING(CHU modem/decoder)
1588 AC_ARG_ENABLE(CHU, [ --enable-CHU + CHU modem/decoder],
1589 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1590 if test "$ntp_ok" = "yes"; then
1592 AC_DEFINE(CLOCK_CHU)
1594 AC_MSG_RESULT($ntp_ok)
1595 ac_refclock_chu=$ntp_ok
1597 AC_MSG_CHECKING(CHU audio/decoder)
1598 AC_ARG_ENABLE(AUDIO-CHU, [ --enable-AUDIO-CHU s - CHU audio/decoder],
1599 [ntp_ok=$enableval], [ntp_ok=no])
1600 if test "$ntp_ok" = "yes"; then
1601 AC_DEFINE(AUDIO_CHU)
1603 AC_MSG_RESULT($ntp_ok)
1604 case "$ntp_ok$ac_refclock_chu$target" in
1605 yesyes*-*-sunos*) ;;
1606 yesyes*-*-solaris*) ;;
1607 yes*) AC_WARN(*** But the expected answer is...no ***) ;;
1611 AC_MSG_CHECKING(Datum Programmable Time System)
1612 AC_ARG_ENABLE(DATUM, [ --enable-DATUM s Datum Programmable Time System],
1613 [ntp_ok=$enableval],
1614 [case "$ac_cv_header_termios_h" in
1621 if test "$ntp_ok" = "yes"; then
1623 AC_DEFINE(CLOCK_DATUM)
1625 AC_MSG_RESULT($ntp_ok)
1627 # Requires modem control
1628 AC_MSG_CHECKING(Heath GC-1000 WWV/WWVH receiver)
1629 AC_ARG_ENABLE(HEATH, [ --enable-HEATH s Heath GC-1000 WWV/WWVH receiver],
1630 [ntp_ok=$enableval],
1632 [#include <termios.h>
1633 #ifdef HAVE_SYS_IOCTL_H
1634 #include <sys/ioctl.h>
1639 ], ntp_ok=$ntp_eac, ntp_ok=no)])
1640 if test "$ntp_ok" = "yes"; then
1642 AC_DEFINE(CLOCK_HEATH)
1644 AC_MSG_RESULT($ntp_ok)
1646 AC_MSG_CHECKING(HP 58503A GPS receiver)
1647 AC_ARG_ENABLE(HPGPS, [ --enable-HPGPS + HP 58503A GPS receiver],
1648 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1649 if test "$ntp_ok" = "yes"; then
1651 AC_DEFINE(CLOCK_HPGPS)
1653 AC_MSG_RESULT($ntp_ok)
1655 AC_MSG_CHECKING(Sun IRIG audio decoder)
1656 AC_ARG_ENABLE(IRIG, [ --enable-IRIG s Sun IRIG audio decoder],
1657 [ntp_ok=$enableval],
1658 [case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h" in
1665 if test "$ntp_ok" = "yes"; then
1667 AC_DEFINE(CLOCK_IRIG)
1669 AC_MSG_RESULT($ntp_ok)
1670 case "$ntp_ok$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h" in
1671 yesnono) AC_WARN(*** But the expected answer is... no ***) ;;
1674 AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver)
1675 AC_ARG_ENABLE(LEITCH, [ --enable-LEITCH + Leitch CSD 5300 Master Clock System Driver],
1676 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1677 if test "$ntp_ok" = "yes"; then
1679 AC_DEFINE(CLOCK_LEITCH)
1681 AC_MSG_RESULT($ntp_ok)
1683 AC_MSG_CHECKING(local clock reference)
1684 AC_ARG_ENABLE(LOCAL-CLOCK, [ --enable-LOCAL-CLOCK + local clock reference],
1685 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1686 if test "$ntp_ok" = "yes"; then
1688 AC_DEFINE(CLOCK_LOCAL)
1690 AC_MSG_RESULT($ntp_ok)
1692 AC_MSG_CHECKING(EES M201 MSF receiver)
1693 AC_ARG_ENABLE(MSFEES, [ --enable-MSFEES + EES M201 MSF receiver],
1694 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1695 if test "$ntp_ok" = "yes"; then
1697 AC_DEFINE(CLOCK_MSFEES)
1699 AC_MSG_RESULT($ntp_ok)
1702 AC_MSG_CHECKING(Magnavox MX4200 GPS receiver)
1703 AC_ARG_ENABLE(MX4200, [ --enable-MX4200 s Magnavox MX4200 GPS receiver],
1704 [ntp_ok=$enableval],
1705 [case "$ac_cv_var_ppsclock" in
1706 yes) ntp_ok=$ntp_eac
1711 if test "$ntp_ok" = "yes"; then
1713 AC_DEFINE(CLOCK_MX4200)
1715 AC_MSG_RESULT($ntp_ok)
1716 case "$ntp_ok$target" in
1717 yes*-*-ultrix*) AC_WARN(*** But the expected answer is... no ***) ;;
1720 AC_MSG_CHECKING(NMEA GPS receiver)
1721 AC_ARG_ENABLE(NMEA, [ --enable-NMEA + NMEA GPS receiver],
1722 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1723 if test "$ntp_ok" = "yes"; then
1725 AC_DEFINE(CLOCK_NMEA)
1727 AC_MSG_RESULT($ntp_ok)
1729 AC_MSG_CHECKING(for ONCORE Motorola VP/UT Oncore GPS)
1730 AC_ARG_ENABLE(ONCORE, [ --enable-ONCORE + Motorola VP/UT Oncore GPS receiver],
1731 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1732 case "$ac_cv_var_oncore_ok" in
1735 if test "$ntp_ok" = "yes"; then
1737 AC_DEFINE(CLOCK_ONCORE)
1739 AC_MSG_RESULT($ntp_ok)
1741 AC_MSG_CHECKING(for Palisade clock)
1742 AC_ARG_ENABLE(PALISADE, [ --enable-PALISADE + Palisade clock],
1743 [ntp_ok=$enableval],
1744 [case "$ac_cv_header_termios_h" in
1752 if test "$ntp_ok" = "yes"; then
1754 AC_DEFINE(CLOCK_PALISADE)
1756 AC_MSG_RESULT($ntp_ok)
1758 AC_MSG_CHECKING(PST/Traconex 1020 WWV/WWVH receiver)
1759 AC_ARG_ENABLE(PST, [ --enable-PST + PST/Traconex 1020 WWV/WWVH receiver],
1760 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1761 if test "$ntp_ok" = "yes"; then
1763 AC_DEFINE(CLOCK_PST)
1765 AC_MSG_RESULT($ntp_ok)
1768 AC_MSG_CHECKING(Rockwell Jupiter GPS receiver)
1769 AC_ARG_ENABLE(JUPITER, [ --enable-JUPITER s Rockwell Jupiter GPS receiver],
1770 [ntp_ok=$enableval],
1771 [case "$ac_cv_var_ppsclock" in
1772 # yes) ntp_ok=$ntp_eac
1777 if test "$ntp_ok" = "yes"; then
1779 AC_DEFINE(CLOCK_JUPITER)
1781 AC_MSG_RESULT($ntp_ok)
1782 case "$ntp_ok$target" in
1783 yes*-*-ultrix*) AC_WARN(*** But the expected answer is... no ***) ;;
1786 # Requires modem control
1787 AC_MSG_CHECKING(PTB modem service)
1788 AC_ARG_ENABLE(PTBACTS, [ --enable-PTBACTS s PTB modem service],
1789 [ntp_ok=$enableval],
1791 [#include <termios.h>
1792 #ifdef HAVE_SYS_IOCTL_H
1793 #include <sys/ioctl.h>
1798 ], ntp_ok=$ntp_eac, ntp_ok=no)])
1799 if test "$ntp_ok" = "yes"; then
1801 AC_DEFINE(CLOCK_PTBACTS)
1803 AC_MSG_RESULT($ntp_ok)
1805 AC_MSG_CHECKING(KSI/Odetics TPRO/S GPS receiver/IRIG interface)
1806 AC_ARG_ENABLE(TPRO, [ --enable-TPRO s KSI/Odetics TPRO/S GPS receiver/IRIG interface],
1807 [ntp_ok=$enableval],
1808 [case "$ac_cv_header_sys_tpro_h" in
1815 if test "$ntp_ok" = "yes"; then
1817 AC_DEFINE(CLOCK_TPRO)
1819 AC_MSG_RESULT($ntp_ok)
1820 case "$ntp_ok$ac_cv_header_sys_tpro" in
1821 yesno) AC_WARN(*** But the expected answer is... no ***) ;;
1824 AC_MSG_CHECKING(TRAK 8810 GPS receiver)
1825 AC_ARG_ENABLE(TRAK, [ --enable-TRAK + TRAK 8810 GPS receiver],
1826 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1827 if test "$ntp_ok" = "yes"; then
1829 AC_DEFINE(CLOCK_TRAK)
1831 AC_MSG_RESULT($ntp_ok)
1833 AC_MSG_CHECKING(Chrono-log K-series WWVB receiver)
1834 AC_ARG_ENABLE(CHRONOLOG, [ --enable-CHRONOLOG + Chrono-log K-series WWVB receiver],
1835 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1836 if test "$ntp_ok" = "yes"; then
1838 AC_DEFINE(CLOCK_CHRONOLOG)
1840 AC_MSG_RESULT($ntp_ok)
1842 AC_MSG_CHECKING(Dumb generic hh:mm:ss local clock)
1843 AC_ARG_ENABLE(DUMBCLOCK, [ --enable-DUMBCLOCK + Dumb generic hh:mm:ss local clock],
1844 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1845 if test "$ntp_ok" = "yes"; then
1847 AC_DEFINE(CLOCK_DUMBCLOCK)
1849 AC_MSG_RESULT($ntp_ok)
1851 # Not on a vax-dec-bsd
1852 AC_MSG_CHECKING(Kinemetrics/TrueTime receivers)
1853 AC_ARG_ENABLE(TRUETIME, [ --enable-TRUETIME s Kinemetrics/TrueTime receivers],
1854 [ntp_ok=$enableval],
1863 if test "$ntp_ok" = "yes"; then
1865 AC_DEFINE(CLOCK_TRUETIME)
1867 AC_MSG_RESULT($ntp_ok)
1868 case "$ntp_ok$target" in
1869 yesvax-dec-bsd) AC_WARN(*** But the expected answer is... no ***) ;;
1872 AC_MSG_CHECKING(Spectracom 8170/Netclock/2 WWVB receiver)
1873 AC_ARG_ENABLE(WWVB, [ --enable-WWVB + Spectracom 8170/Netclock/2 WWVB receiver],
1874 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1875 if test "$ntp_ok" = "yes"; then
1877 AC_DEFINE(CLOCK_WWVB)
1879 AC_MSG_RESULT($ntp_ok)
1881 AC_MSG_CHECKING(Ultralink M320 WWVB receiver)
1882 AC_ARG_ENABLE(ULINK, [ --enable-ULINK + Ultralink WWVB receiver],
1883 [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
1884 if test "$ntp_ok" = "yes"; then
1886 AC_DEFINE(CLOCK_ULINK)
1888 AC_MSG_RESULT($ntp_ok)
1890 # Requires modem control
1891 AC_MSG_CHECKING(USNO modem service)
1892 AC_ARG_ENABLE(USNO, [ --enable-USNO s USNO modem service],
1893 [ntp_ok=$enableval],
1895 [#include <termios.h>
1896 #ifdef HAVE_SYS_IOCTL_H
1897 #include <sys/ioctl.h>
1902 ], ntp_ok=$ntp_eac, ntp_ok=no)])
1903 if test "$ntp_ok" = "yes"; then
1905 AC_DEFINE(CLOCK_USNO)
1907 AC_MSG_RESULT($ntp_ok)
1909 AC_MSG_CHECKING(for default inclusion of all suitable PARSE clocks)
1910 AC_ARG_ENABLE(parse-clocks, [ --enable-parse-clocks - include all suitable PARSE clocks:],
1911 [ntp_eapc=$enableval],
1913 yes) ntp_eapc=$ntp_canparse ;;
1917 AC_MSG_RESULT($ntp_eapc)
1919 case "$ntp_eac$ntp_eapc$ntp_canparse" in
1921 AC_MSG_ERROR("--enable-parse-clocks" requires "--enable-all-clocks".)
1924 AC_MSG_ERROR(You said "--enable-parse-clocks" but PARSE isn't supported on this platform!)
1933 AC_MSG_CHECKING(Diem Computime Radio Clock)
1934 AC_ARG_ENABLE(COMPUTIME, [ --enable-COMPUTIME s Diem Computime Radio Clock],
1935 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
1936 if test "$ntp_ok" = "yes"; then
1939 AC_DEFINE(CLOCK_COMPUTIME)
1941 AC_MSG_RESULT($ntp_ok)
1942 case "$ntp_ok$ntp_canparse" in
1944 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
1948 AC_MSG_CHECKING(ELV/DCF7000 clock)
1949 AC_ARG_ENABLE(DCF7000, [ --enable-DCF7000 s ELV/DCF7000 clock],
1950 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
1951 if test "$ntp_ok" = "yes"; then
1954 AC_DEFINE(CLOCK_DCF7000)
1956 AC_MSG_RESULT($ntp_ok)
1957 case "$ntp_ok$ntp_canparse" in
1959 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
1963 AC_MSG_CHECKING(HOPF 6021 clock)
1964 AC_ARG_ENABLE(HOPF6021, [ --enable-HOPF6021 s HOPF 6021 clock],
1965 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
1966 if test "$ntp_ok" = "yes"; then
1969 AC_DEFINE(CLOCK_HOPF6021)
1971 AC_MSG_RESULT($ntp_ok)
1972 case "$ntp_ok$ntp_canparse" in
1974 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
1978 AC_MSG_CHECKING(Meinberg clocks)
1979 AC_ARG_ENABLE(MEINBERG, [ --enable-MEINBERG s Meinberg clocks],
1980 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
1981 if test "$ntp_ok" = "yes"; then
1984 AC_DEFINE(CLOCK_MEINBERG)
1986 AC_MSG_RESULT($ntp_ok)
1987 case "$ntp_ok$ntp_canparse" in
1989 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
1993 AC_MSG_CHECKING(DCF77 raw time code)
1994 AC_ARG_ENABLE(RAWDCF, [ --enable-RAWDCF s DCF77 raw time code],
1995 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
1996 if test "$ntp_ok" = "yes"; then
2001 AC_DEFINE(CLOCK_RAWDCF)
2003 AC_MSG_RESULT($ntp_ok)
2004 case "$ntp_ok$ntp_canparse" in
2006 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2010 case "$ntp_rawdcf" in
2012 AC_CACHE_CHECK(if we must enable parity for RAWDCF,
2013 ac_cv_var_rawdcf_parity,
2020 ac_cv_var_rawdcf_parity=$ans])
2021 case "$ac_cv_var_rawdcf_parity" in
2022 yes) AC_DEFINE(RAWDCF_NO_IGNPAR) ;;
2026 *) # HMS: Is this a good idea?
2027 ac_cv_var_rawdcf_parity=no
2031 AC_MSG_CHECKING(RCC 8000 clock)
2032 AC_ARG_ENABLE(RCC8000, [ --enable-RCC8000 s RCC 8000 clock],
2033 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2034 if test "$ntp_ok" = "yes"; then
2037 AC_DEFINE(CLOCK_RCC8000)
2039 AC_MSG_RESULT($ntp_ok)
2040 case "$ntp_ok$ntp_canparse" in
2042 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2046 AC_MSG_CHECKING(Schmid DCF77 clock)
2047 AC_ARG_ENABLE(SCHMID, [ --enable-SCHMID s Schmid DCF77 clock],
2048 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2049 if test "$ntp_ok" = "yes"; then
2052 AC_DEFINE(CLOCK_SCHMID)
2054 AC_MSG_RESULT($ntp_ok)
2055 case "$ntp_ok$ntp_canparse" in
2057 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2061 AC_MSG_CHECKING(Trimble GPS receiver/TAIP protocol)
2062 AC_ARG_ENABLE(TRIMTAIP, [ --enable-TRIMTAIP s Trimble GPS receiver/TAIP protocol],
2063 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2064 if test "$ntp_ok" = "yes"; then
2067 AC_DEFINE(CLOCK_TRIMTAIP)
2069 AC_MSG_RESULT($ntp_ok)
2070 case "$ntp_ok$ntp_canparse" in
2072 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2076 AC_MSG_CHECKING(Trimble GPS receiver/TSIP protocol)
2077 AC_ARG_ENABLE(TRIMTSIP, [ --enable-TRIMTSIP s Trimble GPS receiver/TSIP protocol],
2078 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2079 if test "$ntp_ok" = "yes"; then
2082 AC_DEFINE(CLOCK_TRIMTSIP)
2084 AC_MSG_RESULT($ntp_ok)
2085 case "$ntp_ok$ntp_canparse" in
2087 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2091 AC_MSG_CHECKING(WHARTON 400A Series clock)
2092 AC_ARG_ENABLE(WHARTON, [ --enable-WHARTON s WHARTON 400A Series clock],
2093 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2094 if test "$ntp_ok" = "yes"; then
2097 AC_DEFINE(CLOCK_WHARTON_400A)
2099 AC_MSG_RESULT($ntp_ok)
2100 case "$ntp_ok$ntp_canparse" in
2102 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2106 AC_MSG_CHECKING(VARITEXT clock)
2107 AC_ARG_ENABLE(VARITEXT, [ --enable-VARITEXT s VARITEXT clock],
2108 [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2109 if test "$ntp_ok" = "yes"; then
2112 AC_DEFINE(CLOCK_VARITEXT)
2114 AC_MSG_RESULT($ntp_ok)
2115 case "$ntp_ok$ntp_canparse" in
2117 AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2121 AC_SUBST(MAKE_LIBPARSE)
2122 AC_SUBST(MAKE_LIBPARSE_KERNEL)
2123 AC_SUBST(MAKE_CHECK_Y2K)
2124 AC_MSG_CHECKING(if we need to make and use the parse libraries)
2126 case "$ntp_libparse" in
2129 AC_DEFINE(CLOCK_PARSE)
2130 LIBPARSE=../libparse/libparse.a
2131 MAKE_LIBPARSE=libparse.a
2132 MAKE_CHECK_Y2K=check_y2k
2133 AC_DEFINE(PPS_SAMPLE)
2134 AC_DEFINE(CLOCK_ATOM)
2141 AC_SUBST(MAKE_LIBRSAREF)
2142 AC_MSG_CHECKING(if we need to make and use the RSAREF library)
2144 if test -f $srcdir/rsaref2/source/rsa.c
2147 LIBRSAREF=../librsaref/librsaref.a
2148 MAKE_LIBRSAREF=librsaref.a
2156 AC_MSG_CHECKING(if we can make dcf parse utilities)
2158 if test "$ntp_parseutil" = "yes"; then
2160 *-*-sunos4*|*-*-solaris2*|*-*-linux*)
2169 AC_SUBST(MAKE_PARSEKMODULE)
2170 AC_MSG_CHECKING(if we can build kernel streams modules for parse)
2172 case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
2176 case "$ac_cv_var_kernel_pll" in
2182 MAKE_PARSEKMODULE=parsestreams.loadable_module.o
2186 MAKE_PARSEKMODULE=parse
2193 AC_MSG_CHECKING(if we need basic refclock support)
2194 if test "$ntp_refclock" = "yes"; then
2197 AC_MSG_RESULT($ntp_refclock)
2199 dnl Things that can be made in clockstuff/
2200 AC_SUBST(PROPDELAY) dnl Set to "propdelay"
2201 AC_SUBST(CHUTEST) dnl Set to "chutest"
2202 AC_SUBST(CLKTEST) dnl Set to "clktest"
2204 AC_SUBST(MAKE_ADJTIMED)
2205 AC_MSG_CHECKING(if we want HP-UX adjtimed support)
2206 changequote(<<, >>)dnl
2214 changequote([, ])dnl
2215 if test "$ans" = "yes"; then
2216 MAKE_ADJTIMED=adjtimed
2217 AC_DEFINE(NEED_HPUX_ADJTIME)
2221 AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem,
2222 [AC_ARG_ENABLE(kmem, [ --enable-kmem s read /dev/kmem for tick and/or tickadj],
2224 [changequote(<<, >>)dnl
2225 case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
2236 *-*-domainos) # Won't be found...
2252 changequote([, ])dnl
2254 ac_cv_var_can_kmem=$ans])
2256 case "$ac_cv_var_can_kmem" in
2258 *) AC_DEFINE(NOKMEM) ;;
2261 AC_CACHE_CHECK(if adjtime is accurate, ac_cv_var_adjtime_is_accurate,
2262 [AC_ARG_ENABLE(accurate-adjtime, [ --enable-accurate-adjtime
2263 s the adjtime() call is accurate],
2265 [changequote(<<, >>)dnl
2273 mips-sgi-irix[456]*)
2294 changequote([, ])dnl
2296 ac_cv_var_adjtime_is_accurate=$ans])
2297 case "$ac_cv_var_adjtime_is_accurate" in
2298 yes) AC_DEFINE(ADJTIME_IS_ACCURATE) ;;
2301 AC_CACHE_CHECK([the name of 'tick' in the kernel],
2302 ac_cv_var_nlist_tick,
2303 [changequote(<<, >>)dnl
2306 m68*-hp-hpux*) # HP9000/300?
2331 changequote([, ])dnl
2332 ac_cv_var_nlist_tick=$ans])
2333 case "$ac_cv_var_nlist_tick" in
2334 ''|no) ;; # HMS: I think we can only get 'no' here...
2335 *) AC_DEFINE_UNQUOTED(K_TICK_NAME, "$ac_cv_var_nlist_tick") ;;
2338 AC_CACHE_CHECK([for the units of 'tick'],
2339 ac_cv_var_tick_nano,
2340 [changequote(<<, >>)dnl
2347 changequote([, ])dnl
2348 ac_cv_var_tick_nano=$ans])
2349 case "$ac_cv_var_tick_nano" in
2351 AC_DEFINE(TICK_NANO)
2355 AC_CACHE_CHECK([the name of 'tickadj' in the kernel],
2356 ac_cv_var_nlist_tickadj,
2357 [changequote(<<, >>)dnl
2360 m68*-hp-hpux*) # HP9000/300?
2388 ans=no # hrestime_adj
2394 changequote([, ])dnl
2395 ac_cv_var_nlist_tickadj=$ans])
2396 case "$ac_cv_var_nlist_tickadj" in
2397 ''|no) ;; # HMS: I think we can only get 'no' here...
2398 *) AC_DEFINE_UNQUOTED(K_TICKADJ_NAME, "$ac_cv_var_nlist_tickadj") ;;
2401 AC_CACHE_CHECK([for the units of 'tickadj'],
2402 ac_cv_var_tickadj_nano,
2403 [changequote(<<, >>)dnl
2410 changequote([, ])dnl
2411 ac_cv_var_tickadj_nano=$ans])
2412 case "$ac_cv_var_tickadj_nano" in
2414 AC_DEFINE(TICKADJ_NANO)
2418 AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel],
2419 ac_cv_var_nlist_dosynctodr,
2420 [changequote(<<, >>)dnl
2456 changequote([, ])dnl
2457 ac_cv_var_nlist_dosynctodr=$ans])
2458 case "$ac_cv_var_nlist_dosynctodr" in
2460 *) AC_DEFINE_UNQUOTED(K_DOSYNCTODR_NAME, "$ac_cv_var_nlist_dosynctodr")
2464 AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel],
2465 ac_cv_var_nlist_noprintf,
2466 [changequote(<<, >>)dnl
2496 changequote([, ])dnl
2497 ac_cv_var_nlist_noprintf=$ans])
2498 case "$ac_cv_var_nlist_noprintf" in
2500 *) AC_DEFINE_UNQUOTED(K_NOPRINTF_NAME, "$ac_cv_var_nlist_noprintf")
2504 dnl The tick/tickadj sections were written by Skippy, who never learned
2505 dnl that it's impolite (horridly gross) to show your guts in public.
2508 dnl 10000 80 Unixware
2509 dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE
2510 dnl 10000 150 sgi IRIX
2511 dnl 1000000L/hz 1000 RS6000 && NOKMEM
2512 dnl 1000000L/hz 668 DOMAINOS && NOKMEM
2513 dnl 1000000L/hz 500/HZ other && NOKMEM
2514 dnl txc.tick 1 Linux
2515 dnl (every / 10) 50 WinNT - tickadj is roughly 500/hz
2516 dnl 1000000L/hz (nlist) (Solaris && !ADJTIME_IS_ACCURATE),
2517 dnl (RS6000 && !NOKMEM), SINIX MIPS
2519 dnl But we'll only use these "values" if we can't find anything else.
2521 AC_CACHE_CHECK(for a default value for 'tick', ac_cv_var_tick,
2522 [AC_ARG_ENABLE(tick, [ --enable-tick=VALUE s force a value for 'tick'],
2544 ac_cv_var_tick=$ans])
2545 case "$ac_cv_var_tick" in
2546 ''|no) ;; # HMS: I think we can only get 'no' here...
2547 *) AC_DEFINE_UNQUOTED(PRESET_TICK, $ac_cv_var_tick) ;;
2550 AC_CACHE_CHECK(for a default value for 'tickadj', ac_cv_var_tickadj,
2551 [AC_ARG_ENABLE(tickadj, [ --enable-tickadj=VALUE s force a value for 'tickadj'],
2556 case "$ac_cv_var_adjtime_is_accurate" in
2557 yes) ans='tick/16' ;;
2567 case "$ac_cv_var_can_kmem" in
2571 *-*-domainos) # Skippy: won't be found...
2572 case "$ac_cv_var_can_kmem" in
2577 case "$ac_cv_var_adjtime_is_accurate" in
2578 yes) ans='tick/16' ;;
2588 case "$ac_cv_var_adjtime_is_accurate" in
2598 ac_cv_var_tickadj=$ans])
2599 case "$ac_cv_var_tickadj" in
2600 ''|no) ;; # HMS: I think we can only get 'no' here...
2601 *) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $ac_cv_var_tickadj) ;;
2604 # Newer versions of ReliantUNIX round adjtime() values down to
2605 # 1/100s (system tick). Sigh ...
2606 # Unfortunately, there is no easy way to know if particular release
2607 # has this "feature" or any obvious way to test for it.
2609 mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX_CLOCK) ;;
2613 *-*-sco3.2v5*) AC_DEFINE(SCO5_CLOCK) ;;
2616 ac_cv_make_tickadj=yes
2617 case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in
2618 nonono) # Don't read KMEM, no presets. Bogus.
2619 AC_MSG_WARN(Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj.)
2620 ac_cv_make_tickadj=no
2622 nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
2623 AC_MSG_WARN(Can't read kmem but no PRESET_TICK. No tickadj.)
2624 ac_cv_make_tickadj=no
2626 no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus.
2627 AC_MSG_WARN(Can't read kmem but no PRESET_TICKADJ. No tickadj.)
2628 ac_cv_make_tickadj=no
2630 no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool.
2632 yesnono) # Read KMEM, no presets. Cool.
2634 yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
2635 AC_MSG_WARN(PRESET_TICKADJ is defined but not PRESET_TICK. Please report this.)
2637 yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool.
2639 yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
2641 *) # Generally bogus.
2642 AC_MSG_ERROR(This shouldn't happen.)
2648 # tickadj is pretty useless on newer versions of ReliantUNIX
2650 ac_cv_make_tickadj=no
2653 # DLM says tickadj is a no-no starting with solaris2.5
2655 *-*-solaris2.[0-4]*) ;;
2656 *) ac_cv_make_tickadj=no ;;
2661 AC_SUBST(MAKE_TICKADJ)
2662 AC_CACHE_CHECK(if we want and can make the tickadj utility, ac_cv_make_tickadj,
2663 ac_cv_make_tickadj=yes)
2664 case "$ac_cv_make_tickadj" in
2666 MAKE_TICKADJ=tickadj
2670 AC_SUBST(MAKE_NTPTIME)
2671 AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime,
2673 *) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in
2683 ac_cv_make_ntptime=$ans])
2684 case "$ac_cv_make_ntptime" in
2686 MAKE_NTPTIME=ntptime
2690 AC_CACHE_CHECK(if we want UDP wildcard delivery, ac_cv_var_udp_wildcard_delivery,
2691 [AC_ARG_ENABLE(udp-wildcard, [ --enable-udp-wildcard s use UDP wildcard delivery],
2738 ac_cv_var_udp_wildcard_delivery=$ans])
2739 case "$ac_cv_var_udp_wildcard_delivery" in
2740 yes) AC_DEFINE(UDP_WILDCARD_DELIVERY) ;;
2746 *) case "$target" in
2748 LDFLAGS="$LDFLAGS -r"
2754 AC_CACHE_CHECK(if we should always slew the time, ac_cv_var_slew_always,
2755 [AC_ARG_ENABLE(slew-always, [ --enable-slew-always s always slew the time],
2757 [changequote(<<, >>)dnl
2768 *-*-openvms*) # HMS: won't be found
2774 changequote([, ])dnl
2776 ac_cv_var_slew_always=$ans])
2777 case "$ac_cv_var_slew_always" in
2778 yes) AC_DEFINE(SLEWALWAYS) ;;
2781 AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew,
2782 [AC_ARG_ENABLE(step-slew, [ --enable-step-slew s step and slew the time],
2784 [changequote(<<, >>)dnl
2795 *-*-solaris2.[012]*)
2798 *-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
2804 changequote([, ])dnl
2806 ac_cv_var_step_slew=$ans])
2807 case "$ac_cv_var_step_slew" in
2808 yes) AC_DEFINE(STEP_SLEW) ;;
2811 AC_CACHE_CHECK(if ntpdate should step the time, ac_cv_var_ntpdate_step,
2812 [AC_ARG_ENABLE(ntpdate-step, [ --enable-ntpdate-step s if ntpdate should step the time],
2814 [changequote(<<, >>)dnl
2822 changequote([, ])dnl
2824 ac_cv_var_ntpdate_step=$ans])
2825 case "$ac_cv_var_ntpdate_step" in
2826 yes) AC_DEFINE(FORCE_NTPDATE_STEP) ;;
2829 AC_CACHE_CHECK(if we should sync TODR clock every hour, ac_cv_var_sync_todr,
2830 [AC_ARG_ENABLE(hourly-todr-sync, [ --enable-hourly-todr-sync
2831 s if we should sync TODR hourly],
2837 *-*-openvms*) # HMS: won't be found
2843 ac_cv_var_sync_todr=$ans])
2844 case "$ac_cv_var_sync_todr" in
2845 yes) AC_DEFINE(DOSYNCTODR) ;;
2848 AC_CACHE_CHECK(if we should avoid kernel FLL bug, ac_cv_var_kernel_fll_bug,
2849 [AC_ARG_ENABLE(kernel-fll-bug, [ --enable-kernel-fll-bug s if we should avoid a kernel FLL bug],
2851 [changequote(<<, >>)dnl
2857 case "`uname -v`" in
2868 changequote([, ])dnl
2870 ac_cv_var_kernel_fll_bug=$ans])
2871 case "$ac_cv_var_kernel_fll_bug" in
2872 yes) AC_DEFINE(KERNEL_FLL_BUG) ;;
2878 *) case "$target" in
2880 LDFLAGS="$LDFLAGS -r"
2886 # This is necessary so that .o files in LIBOBJS are also built via
2887 # the ANSI2KNR-filtering rules.
2888 LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
2890 AC_OUTPUT(Makefile adjtimed/Makefile clockstuff/Makefile \
2891 include/Makefile kernel/Makefile kernel/sys/Makefile libntp/Makefile \
2892 libparse/Makefile librsaref/Makefile ntpd/Makefile ntpdc/Makefile \
2893 ntpdate/Makefile ntpq/Makefile ntptrace/Makefile parseutil/Makefile \
2894 scripts/Makefile scripts/mkver scripts/ntpver util/Makefile,
2895 [chmod +x scripts/ntpver scripts/mkver])
2896 #test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])