From: Harlan Stenn Date: Tue, 4 Jun 2002 05:58:40 +0000 (-0400) Subject: Upgrade configure.in to the same technology used in ntp-dev. X-Git-Tag: NTP_4_1_1C_RC1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5e9e50fa720bff0d52fcde40c8fc28abe5cef56;p=thirdparty%2Fntp.git Upgrade configure.in to the same technology used in ntp-dev. Do the cross-compile stuff better. Order some of the refclocks better. Brought in some stuff from ntp-dev that we don't need, but it will make future merges easier. bk: 3cfc5710f8mqaQcxIv58cY9AEzZ-fw --- diff --git a/configure.in b/configure.in index 33a2198897..7fa3da0694 100644 --- a/configure.in +++ b/configure.in @@ -2,11 +2,11 @@ dnl -*-fundamental-*- dnl Process this file with autoconf to produce a configure script. AC_INIT(ntpd/ntp_refclock.c) AC_CANONICAL_SYSTEM -AC_DEFINE_UNQUOTED(STR_SYSTEM, "$target") +AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host") AM_CONFIG_HEADER(config.h) AC_ARG_PROGRAM AM_INIT_AUTOMAKE(ntp, 4.1.1a) -AC_PREREQ(2.49) +AC_PREREQ(2.52) # We need the cross-compile-aware SIZEOF stuff. ac_cv_var_oncore_ok=no ac_cv_var_atom_ok=no @@ -19,7 +19,7 @@ AC_PROG_CC AC_PROG_CC_STDC AC_PROG_CPP -case "$target" in +case "$host" in *-*-amigaos) CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA" ;; @@ -47,10 +47,10 @@ case "$target" in ;; esac -case "$host" in - $target) +case "$build" in + $host) ;; - *) case "$target" in + *) case "$host" in *-*-vxworks*) # Quick and dirty sanity check case "$VX_KERNEL" in @@ -103,7 +103,7 @@ esac ac_busted_vpath_in_make=no -case "$target" in +case "$host" in *-next-nextstep3) CFLAGS="$CFLAGS -posix" ;; @@ -174,7 +174,7 @@ AC_PATH_PROG(PATH_PERL, perl) hs_ULONG_CONST -case "$target" in +case "$host" in *-*-vxworks*) ac_link="$ac_link $VX_KERNEL" ;; @@ -182,7 +182,7 @@ esac AC_PROG_INSTALL -case "$target" in +case "$host" in *-pc-cygwin*) AC_CHECK_LIB(advapi32, main) ;; @@ -203,7 +203,7 @@ AC_CHECK_LIB(readline, readline, , AC_CHECK_LIB(readline, readline, LIBS="-lreadline -lcurses $LIBS" AC_DEFINE(HAVE_LIBREADLINE) - AC_DEFINE(HAVE_LIBCURSES) + AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?]) , , -lcurses)) dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt @@ -212,7 +212,7 @@ dnl so only use one of them. Linux (glibc-2.1.2 and -2.2.2, at least) dnl does Strange Things with extra processes using the Posix-compatibility dnl real-time library, so we don't want to use it. -case "$target" in +case "$host" in *-*-linux*) ;; *) AC_CHECK_LIB(rt, sched_setscheduler, , @@ -232,21 +232,23 @@ AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO)]) AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h) dnl AC_CHECK_HEADERS(sys/chudefs.h) AC_CHECK_HEADERS(sys/clkdefs.h sys/file.h) -case "$target" in +case "$host" in *-*-sunos4*) ;; *) AC_CHECK_HEADERS(sys/ioctl.h) ;; esac AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h) AC_CHECK_HEADERS(sys/ppstime.h sys/proc.h sys/resource.h sys/sched.h) -case "$target" in +case "$host" in *-*-sco*) AC_CHECK_HEADERS(sys/sio.h) ;; esac -AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/sockio.h sys/stat.h sys/stream.h) +AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/sockio.h) +AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h) +AC_CHECK_HEADERS(sys/stat.h sys/stream.h) AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/syssgi.h sys/termios.h) -AC_CHECK_HEADERS(sys/time.h) +AC_CHECK_HEADERS(sys/time.h sys/signal.h) AC_EGREP_CPP(yes, [#include #ifdef PPS_API_VERS_1 @@ -255,7 +257,7 @@ yes ], [AC_CHECK_HEADERS(sys/timepps.h)]) AC_CHECK_HEADERS(sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.h) AC_HEADER_TIME -case "$target" in +case "$host" in *-convex-*) AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h) ;; @@ -288,7 +290,7 @@ case "$ac_cv_c_volatile" in ;; esac -case "$target" in +case "$host" in sparc-*-solaris2*) # Assume that solaris2 is Ansi C... ;; @@ -307,12 +309,12 @@ if test "$ac_cv_have_prototypes" = yes; then fi AC_C_CONST -case "$host" in - $target) +case "$build" in + $host) AC_C_BIGENDIAN ;; - *) case "$target" in - i*86-*-vxworks*) + *) case "$host" in + i*86-*-*) # Was i*86-*-vxworks* # LITTLEENDIAN ;; *-*-vxworks*) @@ -331,7 +333,7 @@ AC_STRUCT_TM AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz, [ac_cv_var_default_hz=100 -case "$target" in +case "$host" in alpha*-dec-osf4*|alpha*-dec-osf5*) ac_cv_var_default_hz=1024 ;; @@ -343,7 +345,7 @@ AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz) AC_CACHE_CHECK(if we need to override the system's value for HZ, ac_cv_var_override_hz, [ac_cv_var_override_hz=no -case "$target" in +case "$host" in alpha*-dec-osf4*|alpha*-dec-osf5*) ac_cv_var_override_hz=yes ;; @@ -435,6 +437,27 @@ if test $ac_cv_struct_sockaddr_has_sa_len = yes; then AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR) fi +case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in + *yes*) + AC_CACHE_CHECK([for struct snd_size], ac_cv_struct_snd_size, +[AC_TRY_COMPILE([ +#ifdef HAVE_MACHINE_SOUNDCARD_H +# include +#endif +#ifdef HAVE_SYS_SOUNDCARD_H +# include +#endif],[ +extern struct snd_size *ss; +return ss->rec_size;], + ac_cv_struct_snd_size=yes, + ac_cv_struct_snd_size=no) +]) + case "$ac_cv_struct_snd_size" in + yes) AC_DEFINE(HAVE_STRUCT_SND_SIZE, 1,[Do we have struct snd_size?]) ;; + esac + ;; +esac + AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz, [AC_TRY_COMPILE([ #include ],[ @@ -504,47 +527,9 @@ AC_CHECK_MEMBERS([struct ntptimeval.time.tv_nsec], , , AC_C_INLINE AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE? -case "$host" in - $target) - AC_CHECK_SIZEOF(signed char) - ;; - *) case "$target" in - *-*-vxworks*) - AC_CHECK_SIZEOF(signed char, 1) - ;; - *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_SIGNED_LONG) - ;; - esac - ;; -esac - -case "$host" in - $target) - AC_CHECK_SIZEOF(int) - ;; - *) case "$target" in - *-*-vxworks*) - AC_CHECK_SIZEOF(int, 4) - ;; - *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_INT) - ;; - esac - ;; -esac - -case "$host" in - $target) - AC_CHECK_SIZEOF(long) - ;; - *) case "$target" in - *-*-vxworks*) - AC_CHECK_SIZEOF(long, 4) - ;; - *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_LONG) - ;; - esac - ;; -esac +AC_CHECK_SIZEOF(signed char) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) AC_CHECK_TYPES([s_char]) case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in @@ -570,12 +555,12 @@ case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in esac AC_TYPE_UID_T -case "$target" in +case "$host" in *-*-linux*) AC_CHECK_FUNCS(__adjtimex __ntp_gettime) ;; esac -case "$target" in +case "$host" in *-*-aix4*) # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub # (returning ENOSYS). I didn't check 4.2. If, in the future, @@ -599,34 +584,37 @@ AC_CHECK_FUNCS(finite, , LIBS=$_libs])]) AC_CHECK_FUNCS(getbootfile getclock getdtablesize getrusage) AC_CHECK_FUNC(gettimeofday, ,[ -case "$target" in +case "$host" in *-*-mpeix*) ac_cv_func_gettimeofday=yes ;; esac]) -case "$target" in +case "$host" in *-pc-cygwin*) ;; *) AC_CHECK_FUNCS(getuid) ;; esac AC_CHECK_FUNCS(hstrerror K_open kvm_open memcpy memmove memset) -case "$target" in +case "$host" in *-*-sco3.2v5.0.*) # Just stubs. Idiots. ;; *) AC_CHECK_FUNCS(mkstemp) ;; esac -AC_REPLACE_FUNCS(mktime) -case "$target" in +AC_CHECK_FUNCS(mktime) +case "$host" in *-*-aix4*) # Just a stub. Idiots. ;; *-*-irix*) - # Just stubs in Irix. Idiots. + # Just a stub in Irix. Idiots. + ;; + *-*-qnx*) + # Apparently there but not working in QNX. Idiots? ;; *-*-sco3.2v5.0.*) - # Just stubs. Idiots. + # Just a stub. Idiots. ;; alpha*-dec-osf4*|alpha*-dec-osf5*) # mlockall is there, as a #define calling memlk via @@ -638,7 +626,7 @@ case "$target" in ;; esac AC_CHECK_FUNCS(mrand48 srand48 nice nlist) -case "$target" in +case "$host" in *-*-solaris2.6) # Broken... ;; @@ -650,7 +638,7 @@ case "$ac_cv_func_mrand48" in yes) ;; *) AC_REPLACE_FUNCS(random) ;; esac -case "$target" in +case "$host" in *-*-aix4*) # Just a stub in AIX 4. Idiots. ;; @@ -662,14 +650,15 @@ case "$target" in esac AC_CHECK_FUNCS(setlinebuf setpgid setpriority setsid) AC_CHECK_FUNCS(settimeofday, ,[ -case "$target" in +case "$host" in *-*-mpeix*) ac_cv_func_settimeofday=yes ;; esac]) AC_CHECK_FUNCS(setvbuf sigaction) AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl) -AC_REPLACE_FUNCS(snprintf strdup strerror) -case "$target" in +AC_REPLACE_FUNCS(snprintf strdup strerror strstr) +AC_CHECK_FUNCS(timegm) +case "$host" in *-*-aix4*) # Just stubs. Idiots. ;; @@ -682,7 +671,7 @@ case "$target" in *) AC_CHECK_FUNCS(timer_create timer_settime) ;; esac -case "$target" in +case "$host" in *-pc-cygwin*) # I have no idea... ;; @@ -820,7 +809,7 @@ case "$ac_cv_decl_syscall" in yes) AC_DEFINE(DECL_SYSCALL) ;; esac -case "$target" in +case "$host" in *-*-aix4.3.*) AC_DEFINE(DECL_HSTRERROR_0) # Needed for XLC under AIX 4.3.2 ;; @@ -839,6 +828,9 @@ case "$target" in AC_DEFINE(DECL_PLOCK_0) AC_DEFINE(DECL_STIME_1) ;; + *-*-qnx*) + AC_DEFINE(DECL_ADJTIME_0) + ;; *-*-riscos4*) AC_DEFINE(DECL_ADJTIME_0) AC_DEFINE(DECL_BZERO_0) @@ -860,7 +852,7 @@ case "$target" in *-*-solaris2*) AC_DEFINE(DECL_MKSTEMP_0) AC_DEFINE(DECL_SETPRIORITY_1) - case "$target" in + case "$host" in *-*-solaris2.4) AC_DEFINE(DECL_TIMEOFDAY_0) ;; @@ -915,7 +907,7 @@ case "$target" in ;; esac -case "$target" in +case "$host" in *-*-sco3.2*) AC_DEFINE(TERMIOS_NEEDS__SVID3) ;; @@ -927,7 +919,7 @@ AC_CACHE_CHECK(if we should use a streams device for ifconfig, AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop, [ans=no -case "$target" in +case "$host" in *-*-hpux[[567]]*) ans=yes ;; @@ -939,7 +931,7 @@ esac AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket, [ans=yes -case "$target" in +case "$host" in *-*-domainos) ans=no ;; @@ -954,7 +946,7 @@ esac AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig, [ans=no -case "$target" in +case "$host" in *-*-hpux*) ans=yes ;; @@ -965,7 +957,7 @@ case "$ac_cv_var_hpux_findconfig" in esac AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid, -[case "$target" in +[case "$host" in *-*-hpux[[567]]*) ans=no ;; @@ -991,7 +983,7 @@ case "$ac_cv_arg_setpgrp_negpid" in esac AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown, -[case "$target" in +[case "$host" in *-*-bsdi[[23]]*) ans=yes ;; @@ -1031,8 +1023,8 @@ case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in ans='stime()' ;; *) - case "$host" in - $target) ntp_warning='Which leaves us with nothing to use!' + case "$build" in + $host) ntp_warning='Which leaves us with nothing to use!' ans=none ;; esac @@ -1045,7 +1037,7 @@ case "$ntp_warning" in esac AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug, -[case "$target" in +[case "$host" in *-*-solaris2.4*) ans=yes ;; @@ -1062,7 +1054,7 @@ AC_CACHE_CHECK(for Streams/TLI, ac_cv_var_streams_tli, yes) ans=no # There must be a better way... - case "$target" in + case "$host" in *-*-ptx*) ans=yes ;; @@ -1090,7 +1082,7 @@ AC_CACHE_CHECK(if we want to use signalled IO, ac_cv_var_signalled_io, case "$ac_cv_hdr_def_sigio" in yes) ans=yes - case "$target" in + case "$host" in alpha*-dec-osf4*|alpha*-dec-osf5*) ans=no ;; @@ -1146,7 +1138,7 @@ AC_CACHE_CHECK(if we can use SIGPOLL for UDP I/O, ac_cv_var_use_udp_sigpoll, [ans=no case "$ac_cv_hdr_def_sigpoll" in yes) - case "$target" in + case "$host" in mips-sgi-irix*) ans=no ;; @@ -1171,6 +1163,9 @@ case "$ac_cv_hdr_def_sigpoll" in *-*-osf*) ans=no ;; + *-*-qnx*) + ans=no + ;; *-*-sunos*) ans=no ;; @@ -1191,7 +1186,7 @@ AC_CACHE_CHECK(if we can use SIGPOLL for TTY I/O, ac_cv_var_use_tty_sigpoll, [ans=no case "$ac_cv_hdr_def_sigpoll" in yes) - case "$target" in + case "$host" in mips-sgi-irix*) ans=no ;; @@ -1222,6 +1217,9 @@ case "$ac_cv_hdr_def_sigpoll" in *-*-ultrix*) ans=no ;; + *-*-qnx*) + ans=no + ;; *) ans=yes ;; esac @@ -1253,7 +1251,7 @@ esac AC_CACHE_CHECK(if nlist() values might require extra indirection, ac_cv_var_nlist_extra_indirection, [ans=no -case "$target" in +case "$host" in *-*-aix*) ans=yes ;; @@ -1266,7 +1264,7 @@ esac AC_CACHE_CHECK(for a minimum recommended value of tickadj, ac_cv_var_min_rec_tickadj, [ans=no -case "$target" in +case "$host" in *-*-aix*) ans=40 ;; @@ -1280,7 +1278,7 @@ esac AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR, ac_cv_var_no_parenb_ignpar, [ans=no -case "$target" in +case "$host" in i?86-*-linux*) ans=yes ;; @@ -1330,7 +1328,7 @@ esac AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast, [ac_cv_var_mcast=no - case "$target" in + case "$host" in i386-sequent-sysv4) ;; *) AC_EGREP_CPP(yes, [#include @@ -1399,7 +1397,7 @@ esac AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer, [ans=no - case "$target" in + case "$host" in *-fujitsu-uxp*) ans=yes ;; @@ -1566,28 +1564,30 @@ ntp_refclock=no # HPUX only, and by explicit request AC_MSG_CHECKING(Datum/Bancomm bc635/VME interface) -AC_ARG_ENABLE(BANCOMM, [ --enable-BANCOMM - Datum/Bancomm bc635/VME interface], +AC_ARG_ENABLE(BANCOMM, + AC_HELP_STRING([--enable-BANCOMM], [- Datum/Bancomm bc635/VME interface]), [ntp_ok=$enableval], [ntp_ok=no]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes AC_DEFINE(CLOCK_BANC) fi AC_MSG_RESULT($ntp_ok) -case "$ntp_ok$target" in +case "$ntp_ok$host" in yes*-*-hpux*) ;; yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; esac #HPUX only, and only by explicit request AC_MSG_CHECKING(TrueTime GPS receiver/VME interface) -AC_ARG_ENABLE(GPSVME, [ --enable-GPSVME - TrueTime GPS receiver/VME interface], +AC_ARG_ENABLE(GPSVME, + AC_HELP_STRING([--enable-GPSVME], [- TrueTime GPS receiver/VME interface]), [ntp_ok=$enableval], [ntp_ok=no]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes AC_DEFINE(CLOCK_GPSVME) fi AC_MSG_RESULT($ntp_ok) -case "$ntp_ok$target" in +case "$ntp_ok$host" in yes*-*-hpux*) ;; yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; esac @@ -1605,7 +1605,8 @@ esac AC_MSG_RESULT($ans) AC_MSG_CHECKING(for SHM clock attached thru shared memory) -AC_ARG_ENABLE(SHM, [ --enable-SHM - SHM clock attached thru shared memory], +AC_ARG_ENABLE(SHM, + AC_HELP_STRING([--enable-SHM], [- SHM clock attached thru shared memory]), [ntp_ok=$enableval], [ntp_ok=no]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1614,7 +1615,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(for default inclusion of all suitable non-PARSE clocks) -AC_ARG_ENABLE(all-clocks, [ --enable-all-clocks + include all suitable non-PARSE clocks:], +AC_ARG_ENABLE(all-clocks, + AC_HELP_STRING([--enable-all-clocks], [+ include all suitable non-PARSE clocks:]), [ntp_eac=$enableval], [ntp_eac=yes]) AC_MSG_RESULT($ntp_eac) @@ -1640,7 +1642,8 @@ AC_MSG_RESULT($ntp_canaudio) # Requires modem control AC_MSG_CHECKING(ACTS modem service) -AC_ARG_ENABLE(ACTS, [ --enable-ACTS + ACTS modem service], +AC_ARG_ENABLE(ACTS, + AC_HELP_STRING([--enable-ACTS], [+ ACTS modem service]), [ntp_ok=$enableval], [AC_EGREP_CPP(yes, [#include @@ -1658,7 +1661,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(Arbiter 1088A/B GPS receiver) -AC_ARG_ENABLE(ARBITER, [ --enable-ARBITER + Arbiter 1088A/B GPS receiver], +AC_ARG_ENABLE(ARBITER, + AC_HELP_STRING([--enable-ARBITER], [+ Arbiter 1088A/B GPS receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1667,7 +1671,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(Arcron MSF receiver) -AC_ARG_ENABLE(ARCRON_MSF, [ --enable-ARCRON-MSF + Arcron MSF receiver], +AC_ARG_ENABLE(ARCRON_MSF, + AC_HELP_STRING([--enable-ARCRON-MSF], [+ Arcron MSF receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1675,8 +1680,19 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) +AC_MSG_CHECKING(Austron 2200A/2201A GPS receiver) +AC_ARG_ENABLE(AS2201, + AC_HELP_STRING([--enable-AS2201], [+ Austron 2200A/2201A GPS receiver]), + [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) +if test "$ntp_ok" = "yes"; then + ntp_refclock=yes + AC_DEFINE(CLOCK_AS2201) +fi +AC_MSG_RESULT($ntp_ok) + AC_MSG_CHECKING(ATOM PPS interface) -AC_ARG_ENABLE(ATOM, [ --enable-ATOM s ATOM PPS interface], +AC_ARG_ENABLE(ATOM, + AC_HELP_STRING([--enable-ATOM], [s ATOM PPS interface]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) case "$ac_cv_var_atom_ok" in no) ntp_ok=no ;; @@ -1687,17 +1703,19 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) -AC_MSG_CHECKING(Austron 2200A/2201A GPS receiver) -AC_ARG_ENABLE(AS2201, [ --enable-AS2201 + Austron 2200A/2201A GPS receiver], +AC_MSG_CHECKING(Chrono-log K-series WWVB receiver) +AC_ARG_ENABLE(CHRONOLOG, + AC_HELP_STRING([--enable-CHRONOLOG], [+ Chrono-log K-series WWVB receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes - AC_DEFINE(CLOCK_AS2201) + AC_DEFINE(CLOCK_CHRONOLOG) fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(CHU modem/decoder) -AC_ARG_ENABLE(CHU, [ --enable-CHU - CHU modem/decoder], +AC_ARG_ENABLE(CHU, + AC_HELP_STRING([--enable-CHU], [- CHU modem/decoder]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1707,7 +1725,8 @@ AC_MSG_RESULT($ntp_ok) ac_refclock_chu=$ntp_ok AC_MSG_CHECKING(CHU audio/decoder) -AC_ARG_ENABLE(AUDIO-CHU, [ --enable-AUDIO-CHU s CHU audio/decoder], +AC_ARG_ENABLE(AUDIO-CHU, + AC_HELP_STRING([--enable-AUDIO-CHU], [s CHU audio/decoder]), [ntp_ok=$enableval], [case "$ntp_eac$ac_refclock_chu$ntp_canaudio" in *no*) ntp_ok=no ;; @@ -1724,7 +1743,8 @@ esac # Not under HP-UX AC_MSG_CHECKING(Datum Programmable Time System) -AC_ARG_ENABLE(DATUM, [ --enable-DATUM s Datum Programmable Time System], +AC_ARG_ENABLE(DATUM, + AC_HELP_STRING([--enable-DATUM], [s Datum Programmable Time System]), [ntp_ok=$enableval], [case "$ac_cv_header_termios_h" in yes) @@ -1739,8 +1759,19 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) +AC_MSG_CHECKING(Dumb generic hh:mm:ss local clock) +AC_ARG_ENABLE(DUMBCLOCK, + AC_HELP_STRING([--enable-DUMBCLOCK], [+ Dumb generic hh:mm:ss local clock]), + [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) +if test "$ntp_ok" = "yes"; then + ntp_refclock=yes + AC_DEFINE(CLOCK_DUMBCLOCK) +fi +AC_MSG_RESULT($ntp_ok) + AC_MSG_CHECKING(Forum Graphic GPS) -AC_ARG_ENABLE(FG, [ --enable-FG + Forum Graphic GPS], +AC_ARG_ENABLE(FG, + AC_HELP_STRING([--enable-FG], [+ Forum Graphic GPS]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1750,7 +1781,8 @@ AC_MSG_RESULT($ntp_ok) # Requires modem control AC_MSG_CHECKING(Heath GC-1000 WWV/WWVH receiver) -AC_ARG_ENABLE(HEATH, [ --enable-HEATH s Heath GC-1000 WWV/WWVH receiver], +AC_ARG_ENABLE(HEATH, + AC_HELP_STRING([--enable-HEATH], [s Heath GC-1000 WWV/WWVH receiver]), [ntp_ok=$enableval], [AC_EGREP_CPP(yes, [#include @@ -1768,17 +1800,19 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(for hopf serial clock device) -AC_ARG_ENABLE(HOPFSERIAL, [ --enable-HOPFSERIAL + hopf serial clock device], - [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) - if test "$ntp_ok" = "yes"; then - ntp_refclock=yes - AC_DEFINE(CLOCK_HOPF_SERIAL) - fi - AC_MSG_RESULT($ntp_ok) +AC_ARG_ENABLE(HOPFSERIAL, + AC_HELP_STRING([--enable-HOPFSERIAL], [+ hopf serial clock device]), + [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) +if test "$ntp_ok" = "yes"; then + ntp_refclock=yes + AC_DEFINE(CLOCK_HOPF_SERIAL) +fi +AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(for hopf PCI clock 6039) -AC_ARG_ENABLE(HOPFPCI, [ --enable-HOPFPCI + hopf 6039 PCI board], - [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) +AC_ARG_ENABLE(HOPFPCI, + AC_HELP_STRING([--enable-HOPFPCI], [+ hopf 6039 PCI board]), + [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes AC_DEFINE(CLOCK_HOPF_PCI) @@ -1786,7 +1820,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(HP 58503A GPS receiver) -AC_ARG_ENABLE(HPGPS, [ --enable-HPGPS + HP 58503A GPS receiver], +AC_ARG_ENABLE(HPGPS, + AC_HELP_STRING([--enable-HPGPS], [+ HP 58503A GPS receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1795,7 +1830,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(Sun IRIG audio decoder) -AC_ARG_ENABLE(IRIG, [ --enable-IRIG s Sun IRIG audio decoder], +AC_ARG_ENABLE(IRIG, + AC_HELP_STRING([--enable-IRIG], [s Sun IRIG audio decoder]), [ntp_ok=$enableval], [case "$ntp_eac$ntp_canaudio" in *no*) ntp_ok=no ;; @@ -1811,16 +1847,38 @@ case "$ntp_ok$ntp_canaudio" in esac AC_MSG_CHECKING(for JJY receiver) -AC_ARG_ENABLE(JJY, [ --enable-JJY + JJY receiver], - [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) +AC_ARG_ENABLE(JJY, + AC_HELP_STRING([--enable-JJY], [+ JJY receiver]), + [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes AC_DEFINE(CLOCK_JJY) fi AC_MSG_RESULT($ntp_ok) +# Not Ultrix +AC_MSG_CHECKING(Rockwell Jupiter GPS receiver) +AC_ARG_ENABLE(JUPITER, + AC_HELP_STRING([--enable-JUPITER], [s Rockwell Jupiter GPS receiver]), + [ntp_ok=$enableval], + [case "$ac_cv_var_ppsclock" in +# yes) ntp_ok=$ntp_eac +# ;; + *) ntp_ok=no + ;; + esac]) +if test "$ntp_ok" = "yes"; then + ntp_refclock=yes + AC_DEFINE(CLOCK_JUPITER) +fi +AC_MSG_RESULT($ntp_ok) +case "$ntp_ok$host" in + yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; +esac + AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver) -AC_ARG_ENABLE(LEITCH, [ --enable-LEITCH + Leitch CSD 5300 Master Clock System Driver], +AC_ARG_ENABLE(LEITCH, + AC_HELP_STRING([--enable-LEITCH], [+ Leitch CSD 5300 Master Clock System Driver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1829,7 +1887,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(local clock reference) -AC_ARG_ENABLE(LOCAL-CLOCK, [ --enable-LOCAL-CLOCK + local clock reference], +AC_ARG_ENABLE(LOCAL-CLOCK, + AC_HELP_STRING([--enable-LOCAL-CLOCK], [+ local clock reference]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1838,7 +1897,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(EES M201 MSF receiver) -AC_ARG_ENABLE(MSFEES, [ --enable-MSFEES + EES M201 MSF receiver], +AC_ARG_ENABLE(MSFEES, + AC_HELP_STRING([--enable-MSFEES], [+ EES M201 MSF receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1848,7 +1908,8 @@ AC_MSG_RESULT($ntp_ok) # Not Ultrix AC_MSG_CHECKING(Magnavox MX4200 GPS receiver) -AC_ARG_ENABLE(MX4200, [ --enable-MX4200 s Magnavox MX4200 GPS receiver], +AC_ARG_ENABLE(MX4200, + AC_HELP_STRING([--enable-MX4200 ], [s Magnavox MX4200 GPS receiver]), [ntp_ok=$enableval], [case "$ac_cv_var_ppsclock" in yes) ntp_ok=$ntp_eac @@ -1861,12 +1922,13 @@ if test "$ntp_ok" = "yes"; then AC_DEFINE(CLOCK_MX4200) fi AC_MSG_RESULT($ntp_ok) -case "$ntp_ok$target" in +case "$ntp_ok$host" in yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; esac AC_MSG_CHECKING(NMEA GPS receiver) -AC_ARG_ENABLE(NMEA, [ --enable-NMEA + NMEA GPS receiver], +AC_ARG_ENABLE(NMEA, + AC_HELP_STRING([--enable-NMEA], [+ NMEA GPS receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1875,7 +1937,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(for ONCORE Motorola VP/UT Oncore GPS) -AC_ARG_ENABLE(ONCORE, [ --enable-ONCORE s Motorola VP/UT Oncore GPS receiver], +AC_ARG_ENABLE(ONCORE, + AC_HELP_STRING([--enable-ONCORE], [s Motorola VP/UT Oncore GPS receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) case "$ac_cv_var_oncore_ok" in no) ntp_ok=no ;; @@ -1887,7 +1950,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(for Palisade clock) -AC_ARG_ENABLE(PALISADE, [ --enable-PALISADE + Palisade clock], +AC_ARG_ENABLE(PALISADE, + AC_HELP_STRING([--enable-PALISADE], [+ Palisade clock]), [ntp_ok=$enableval], [case "$ac_cv_header_termios_h" in yes) @@ -1903,37 +1967,30 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) -AC_MSG_CHECKING(PST/Traconex 1020 WWV/WWVH receiver) -AC_ARG_ENABLE(PST, [ --enable-PST + PST/Traconex 1020 WWV/WWVH receiver], +AC_MSG_CHECKING(Conrad parallel port radio clock) +AC_ARG_ENABLE(PCF, + AC_HELP_STRING([--enable-PCF ], [+ Conrad parallel port radio clock]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes - AC_DEFINE(CLOCK_PST) + AC_DEFINE(CLOCK_PCF) fi AC_MSG_RESULT($ntp_ok) -# Not Ultrix -AC_MSG_CHECKING(Rockwell Jupiter GPS receiver) -AC_ARG_ENABLE(JUPITER, [ --enable-JUPITER s Rockwell Jupiter GPS receiver], - [ntp_ok=$enableval], - [case "$ac_cv_var_ppsclock" in -# yes) ntp_ok=$ntp_eac -# ;; - *) ntp_ok=no - ;; - esac]) +AC_MSG_CHECKING(PST/Traconex 1020 WWV/WWVH receiver) +AC_ARG_ENABLE(PST, + AC_HELP_STRING([--enable-PST], [+ PST/Traconex 1020 WWV/WWVH receiver]), + [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes - AC_DEFINE(CLOCK_JUPITER) + AC_DEFINE(CLOCK_PST) fi AC_MSG_RESULT($ntp_ok) -case "$ntp_ok$target" in - yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; -esac # Requires modem control AC_MSG_CHECKING(PTB modem service) -AC_ARG_ENABLE(PTBACTS, [ --enable-PTBACTS s PTB modem service], +AC_ARG_ENABLE(PTBACTS, + AC_HELP_STRING([--enable-PTBACTS], [s PTB modem service]), [ntp_ok=$enableval], [AC_EGREP_CPP(yes, [#include @@ -1950,8 +2007,19 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) +AC_MSG_CHECKING(Spectracom 8170/Netclock/2 WWVB receiver) +AC_ARG_ENABLE(SPECTRACOM, + AC_HELP_STRING([--enable-SPECTRACOM], [+ Spectracom 8170/Netclock/2 WWVB receiver]), + [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) +if test "$ntp_ok" = "yes"; then + ntp_refclock=yes + AC_DEFINE(CLOCK_SPECTRACOM) +fi +AC_MSG_RESULT($ntp_ok) + AC_MSG_CHECKING(KSI/Odetics TPRO/S GPS receiver/IRIG interface) -AC_ARG_ENABLE(TPRO, [ --enable-TPRO s KSI/Odetics TPRO/S GPS receiver/IRIG interface], +AC_ARG_ENABLE(TPRO, + AC_HELP_STRING([--enable-TPRO], [s KSI/Odetics TPRO/S GPS receiver/IRIG interface]), [ntp_ok=$enableval], [case "$ac_cv_header_sys_tpro_h" in yes) @@ -1970,7 +2038,8 @@ case "$ntp_ok$ac_cv_header_sys_tpro" in esac AC_MSG_CHECKING(TRAK 8810 GPS receiver) -AC_ARG_ENABLE(TRAK, [ --enable-TRAK + TRAK 8810 GPS receiver], +AC_ARG_ENABLE(TRAK, + AC_HELP_STRING([--enable-TRAK], [+ TRAK 8810 GPS receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -1978,47 +2047,12 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) -AC_MSG_CHECKING(Chrono-log K-series WWVB receiver) -AC_ARG_ENABLE(CHRONOLOG, [ --enable-CHRONOLOG + Chrono-log K-series WWVB receiver], - [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) -if test "$ntp_ok" = "yes"; then - ntp_refclock=yes - AC_DEFINE(CLOCK_CHRONOLOG) -fi -AC_MSG_RESULT($ntp_ok) - -AC_MSG_CHECKING(Dumb generic hh:mm:ss local clock) -AC_ARG_ENABLE(DUMBCLOCK, [ --enable-DUMBCLOCK + Dumb generic hh:mm:ss local clock], - [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) -if test "$ntp_ok" = "yes"; then - ntp_refclock=yes - AC_DEFINE(CLOCK_DUMBCLOCK) -fi -AC_MSG_RESULT($ntp_ok) - -AC_MSG_CHECKING(Conrad parallel port radio clock) -AC_ARG_ENABLE(PCF, [ --enable-PCF + Conrad parallel port radio clock], - [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) -if test "$ntp_ok" = "yes"; then - ntp_refclock=yes - AC_DEFINE(CLOCK_PCF) -fi -AC_MSG_RESULT($ntp_ok) - -AC_MSG_CHECKING(Spectracom 8170/Netclock/2 WWVB receiver) -AC_ARG_ENABLE(SPECTRACOM, [ --enable-SPECTRACOM + Spectracom 8170/Netclock/2 WWVB receiver], - [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) -if test "$ntp_ok" = "yes"; then - ntp_refclock=yes - AC_DEFINE(CLOCK_SPECTRACOM) -fi -AC_MSG_RESULT($ntp_ok) - # Not on a vax-dec-bsd AC_MSG_CHECKING(Kinemetrics/TrueTime receivers) -AC_ARG_ENABLE(TRUETIME, [ --enable-TRUETIME s Kinemetrics/TrueTime receivers], +AC_ARG_ENABLE(TRUETIME, + AC_HELP_STRING([--enable-TRUETIME], [s Kinemetrics/TrueTime receivers]), [ntp_ok=$enableval], - [case "$target" in + [case "$host" in vax-dec-bsd) ntp_ok=no ;; @@ -2031,7 +2065,7 @@ if test "$ntp_ok" = "yes"; then AC_DEFINE(CLOCK_TRUETIME) fi AC_MSG_RESULT($ntp_ok) -case "$ntp_ok$target" in +case "$ntp_ok$host" in yesvax-dec-bsd) AC_MSG_WARN(*** But the expected answer is... no ***) ;; esac @@ -2046,7 +2080,8 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING(Ultralink M320 WWVB receiver) -AC_ARG_ENABLE(ULINK, [ --enable-ULINK + Ultralink WWVB receiver], +AC_ARG_ENABLE(ULINK, + AC_HELP_STRING([--enable-ULINK], [+ Ultralink WWVB receiver]), [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) if test "$ntp_ok" = "yes"; then ntp_refclock=yes @@ -2054,25 +2089,10 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) -AC_MSG_CHECKING(WWV receiver) -AC_ARG_ENABLE(WWV, [ --enable-WWV + WWV Audio receiver], - [ntp_ok=$enableval], - [case "$ntp_eac$ntp_canaudio" in - *no*) ntp_ok=no ;; - *) ntp_ok=yes ;; - esac]) -if test "$ntp_ok" = "yes"; then - ntp_refclock=yes - AC_DEFINE(CLOCK_WWV) -fi -AC_MSG_RESULT($ntp_ok) -case "$ntp_ok$ntp_canaudio" in - yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;; -esac - # Requires modem control AC_MSG_CHECKING(USNO modem service) -AC_ARG_ENABLE(USNO, [ --enable-USNO s USNO modem service], +AC_ARG_ENABLE(USNO, + AC_HELP_STRING([--enable-USNO], [s USNO modem service]), [ntp_ok=$enableval], [AC_EGREP_CPP(yes, [#include @@ -2089,6 +2109,23 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) +AC_MSG_CHECKING(WWV receiver) +AC_ARG_ENABLE(WWV, + AC_HELP_STRING([--enable-WWV], [+ WWV Audio receiver]), + [ntp_ok=$enableval], + [case "$ntp_eac$ntp_canaudio" in + *no*) ntp_ok=no ;; + *) ntp_ok=yes ;; + esac]) +if test "$ntp_ok" = "yes"; then + ntp_refclock=yes + AC_DEFINE(CLOCK_WWV) +fi +AC_MSG_RESULT($ntp_ok) +case "$ntp_ok$ntp_canaudio" in + yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;; +esac + AC_MSG_CHECKING(for Zyfer receiver) AC_ARG_ENABLE(ZYFER, AC_HELP_STRING([--enable-ZYFER], [+ Zyfer GPStarplus receiver]), @@ -2099,6 +2136,7 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT($ntp_ok) + AC_MSG_CHECKING(for default inclusion of all suitable PARSE clocks) AC_ARG_ENABLE(parse-clocks, [ --enable-parse-clocks - include all suitable PARSE clocks:], [ntp_eapc=$enableval], @@ -2124,7 +2162,8 @@ ntp_parseutil=no ntp_rawdcf=no AC_MSG_CHECKING(Diem Computime Radio Clock) -AC_ARG_ENABLE(COMPUTIME, [ --enable-COMPUTIME s Diem Computime Radio Clock], +AC_ARG_ENABLE(COMPUTIME, + AC_HELP_STRING([--enable-COMPUTIME], [s Diem Computime Radio Clock]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2139,7 +2178,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(ELV/DCF7000 clock) -AC_ARG_ENABLE(DCF7000, [ --enable-DCF7000 s ELV/DCF7000 clock], +AC_ARG_ENABLE(DCF7000, + AC_HELP_STRING([--enable-DCF7000], [s ELV/DCF7000 clock]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2154,7 +2194,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(HOPF 6021 clock) -AC_ARG_ENABLE(HOPF6021, [ --enable-HOPF6021 s HOPF 6021 clock], +AC_ARG_ENABLE(HOPF6021, + AC_HELP_STRING([--enable-HOPF6021 ], [s HOPF 6021 clock]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2169,7 +2210,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(Meinberg clocks) -AC_ARG_ENABLE(MEINBERG, [ --enable-MEINBERG s Meinberg clocks], +AC_ARG_ENABLE(MEINBERG, + AC_HELP_STRING([--enable-MEINBERG], [s Meinberg clocks]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2184,7 +2226,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(DCF77 raw time code) -AC_ARG_ENABLE(RAWDCF, [ --enable-RAWDCF s DCF77 raw time code], +AC_ARG_ENABLE(RAWDCF, + AC_HELP_STRING([--enable-RAWDCF], [s DCF77 raw time code]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2205,7 +2248,7 @@ case "$ntp_rawdcf" in AC_CACHE_CHECK(if we must enable parity for RAWDCF, ac_cv_var_rawdcf_parity, [ans=no - case "$target" in + case "$host" in *-*-linux*) ans=yes ;; @@ -2222,7 +2265,8 @@ case "$ntp_rawdcf" in esac AC_MSG_CHECKING(RCC 8000 clock) -AC_ARG_ENABLE(RCC8000, [ --enable-RCC8000 s RCC 8000 clock], +AC_ARG_ENABLE(RCC8000, + AC_HELP_STRING([--enable-RCC8000], [s RCC 8000 clock]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2237,7 +2281,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(Schmid DCF77 clock) -AC_ARG_ENABLE(SCHMID, [ --enable-SCHMID s Schmid DCF77 clock], +AC_ARG_ENABLE(SCHMID, + AC_HELP_STRING([--enable-SCHMID ], [s Schmid DCF77 clock]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2252,7 +2297,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(Trimble GPS receiver/TAIP protocol) -AC_ARG_ENABLE(TRIMTAIP, [ --enable-TRIMTAIP s Trimble GPS receiver/TAIP protocol], +AC_ARG_ENABLE(TRIMTAIP, + AC_HELP_STRING([--enable-TRIMTAIP], [s Trimble GPS receiver/TAIP protocol]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2267,7 +2313,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(Trimble GPS receiver/TSIP protocol) -AC_ARG_ENABLE(TRIMTSIP, [ --enable-TRIMTSIP s Trimble GPS receiver/TSIP protocol], +AC_ARG_ENABLE(TRIMTSIP, + AC_HELP_STRING([--enable-TRIMTSIP], [s Trimble GPS receiver/TSIP protocol]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2282,7 +2329,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(WHARTON 400A Series clock) -AC_ARG_ENABLE(WHARTON, [ --enable-WHARTON s WHARTON 400A Series clock], +AC_ARG_ENABLE(WHARTON, + AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2297,7 +2345,8 @@ case "$ntp_ok$ntp_canparse" in esac AC_MSG_CHECKING(VARITEXT clock) -AC_ARG_ENABLE(VARITEXT, [ --enable-VARITEXT s VARITEXT clock], +AC_ARG_ENABLE(VARITEXT, + AC_HELP_STRING([--enable-VARITEXT], [s VARITEXT clock]), [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) if test "$ntp_ok" = "yes"; then ntp_libparse=yes @@ -2406,7 +2455,6 @@ case "$ans" in esac AC_MSG_RESULT($ans) -AC_MSG_CHECKING(for the level of crypto support) AC_ARG_WITH(crypto, AC_HELP_STRING([--with-crypto], [+ ={autokey,rsaref}]), dnl AC_HELP_STRING([--with-crypto], [+ ={autokey,openssl,rsaref}]), @@ -2472,6 +2520,7 @@ case "$ans" in AUTOKEY=1 ;; esac +AC_MSG_CHECKING(for the level of crypto support) AC_MSG_RESULT($ans) AC_MSG_CHECKING(if we want to compile with ElectricFence) @@ -2496,7 +2545,7 @@ AC_SUBST(DCFD) AC_MSG_CHECKING(if we can make dcf parse utilities) ans=no if test "$ntp_parseutil" = "yes"; then - case "$target" in + case "$host" in *-*-sunos4*|*-*-solaris2*|*-*-linux*) ans="dcfd testdcf" DCFD=dcfd @@ -2511,7 +2560,7 @@ AC_MSG_CHECKING(if we can build kernel streams modules for parse) ans=no case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in yesyes) - case "$target" in + case "$host" in sparc-*-sunos4*) case "$ac_cv_var_kernel_pll" in yes) @@ -2543,7 +2592,7 @@ AC_SUBST(CLKTEST) dnl Set to "clktest" AC_SUBST(MAKE_ADJTIMED) AC_MSG_CHECKING(if we want HP-UX adjtimed support) -case "$target" in +case "$host" in *-*-hpux[[56789]]*) ans=yes ;; @@ -2556,6 +2605,19 @@ if test "$ans" = "yes"; then fi AC_MSG_RESULT($ans) +AC_MSG_CHECKING(if we want QNX adjtime support) +case "$host" in + *-*-qnx*) + ans=yes + ;; + *) ans=no + ;; +esac +if test "$ans" = "yes"; then + AC_DEFINE(NEED_QNX_ADJTIME, 1, [Do we need the qnx adjtime call?]) +fi +AC_MSG_RESULT($ans) + AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem, [AC_ARG_ENABLE(kmem, [ --enable-kmem s read /dev/kmem for tick and/or tickadj], [ans=$enableval], @@ -2566,7 +2628,7 @@ AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem, *) ans=no ;; esac - case "$target" in + case "$host" in *-*-aix*) #ans=no ;; @@ -2598,7 +2660,7 @@ AC_CACHE_CHECK(if adjtime is accurate, ac_cv_var_adjtime_is_accurate, [AC_ARG_ENABLE(accurate-adjtime, [ --enable-accurate-adjtime s the adjtime() call is accurate], [ans=$enableval], - [case "$target" in + [case "$host" in i386-sequent-ptx*) ans=no ;; @@ -2635,7 +2697,7 @@ esac AC_CACHE_CHECK([the name of 'tick' in the kernel], ac_cv_var_nlist_tick, [ans=_tick -case "$target" in +case "$host" in m68*-hp-hpux*) # HP9000/300? ans=_old_tick ;; @@ -2673,7 +2735,7 @@ esac AC_CACHE_CHECK([for the units of 'tick'], ac_cv_var_tick_nano, [ans=usec -case "$target" in +case "$host" in *-*-solaris2*) ans=nsec ;; @@ -2688,7 +2750,7 @@ esac AC_CACHE_CHECK([the name of 'tickadj' in the kernel], ac_cv_var_nlist_tickadj, [ans=_tickadj -case "$target" in +case "$host" in m68*-hp-hpux*) # HP9000/300? ans=_tickadj ;; @@ -2735,7 +2797,7 @@ esac AC_CACHE_CHECK([for the units of 'tickadj'], ac_cv_var_tickadj_nano, [ans=usec -case "$target" in +case "$host" in *-*-solaris2*) ans=nsec ;; @@ -2749,7 +2811,7 @@ esac # AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel], ac_cv_var_nlist_dosynctodr, -[case "$target" in +[case "$host" in *-apple-aux[[23]]*) ans=no ;; @@ -2796,7 +2858,7 @@ esac # AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel], ac_cv_var_nlist_noprintf, -[case "$target" in +[case "$host" in *-apple-aux[[23]]*) ans=no ;; @@ -2856,7 +2918,7 @@ AC_CACHE_CHECK(for a default value for 'tick', ac_cv_var_tick, [AC_ARG_ENABLE(tick, [ --enable-tick=VALUE s force a value for 'tick'], [ans=$enableval], [ans=no - case "$target" in + case "$host" in XXX-*-pc-cygwin*) ;; *-univel-sysv*) @@ -2888,7 +2950,7 @@ AC_CACHE_CHECK(for a default value for 'tickadj', ac_cv_var_tickadj, [AC_ARG_ENABLE(tickadj, [ --enable-tickadj=VALUE s force a value for 'tickadj'], [ans=$enableval], [ans='500/hz' - case "$target" in + case "$host" in *-fujitsu-uxp*) case "$ac_cv_var_adjtime_is_accurate" in yes) ans='tick/16' ;; @@ -2945,11 +3007,11 @@ esac # 1/100s (system tick). Sigh ... # Unfortunately, there is no easy way to know if particular release # has this "feature" or any obvious way to test for it. -case "$target" in +case "$host" in mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX_CLOCK) ;; esac -case "$target" in +case "$host" in *-*-sco3.2v5*) AC_DEFINE(SCO5_CLOCK) ;; esac @@ -2985,7 +3047,7 @@ esac AC_SUBST(MAKE_NTPTIME) AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime, -[case "$target" in +[case "$host" in *) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in yesyes) ans=yes @@ -3004,7 +3066,7 @@ case "$ac_cv_make_ntptime" in esac AC_SUBST(MAKE_TICKADJ) -case "$target" in +case "$host" in mips-sni-sysv4*) # tickadj is pretty useless on newer versions of ReliantUNIX # Do not bother @@ -3015,7 +3077,7 @@ case "$target" in ;; *-*-solaris2*) # DLM says tickadj is a no-no starting with solaris2.5 - case "$target" in + case "$host" in *-*-solaris2.[0-4]*) ;; *) ac_cv_make_tickadj=no ;; esac @@ -3031,7 +3093,7 @@ esac AC_SUBST(MAKE_TIMETRIM) AC_CACHE_CHECK(if we want and can make the timetrim utility, ac_cv_make_timetrim, -[case "$target" in +[case "$host" in *-*-irix*) ac_cv_make_timetrim=yes ;; @@ -3049,7 +3111,7 @@ AC_CACHE_CHECK(if we want UDP wildcard delivery, ac_cv_var_udp_wildcard_delivery [AC_ARG_ENABLE(udp-wildcard, [ --enable-udp-wildcard s use UDP wildcard delivery], [ans=$enableval], [ans=no - case "$target" in + case "$host" in *-fujitsu-uxp*) ans=yes ;; @@ -3101,10 +3163,10 @@ case "$ac_cv_var_udp_wildcard_delivery" in yes) AC_DEFINE(UDP_WILDCARD_DELIVERY) ;; esac -case "$host" in - $target) +case "$build" in + $host) ;; - *) case "$target" in + *) case "$host" in *-*-vxworks*) LDFLAGS="$LDFLAGS -r" ;; @@ -3115,7 +3177,7 @@ esac AC_CACHE_CHECK(if we should always slew the time, ac_cv_var_slew_always, [AC_ARG_ENABLE(slew-always, [ --enable-slew-always s always slew the time], [ans=$enableval], - [case "$target" in + [case "$host" in *-apple-aux[[23]]*) ans=yes ;; @@ -3140,7 +3202,7 @@ esac AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew, [AC_ARG_ENABLE(step-slew, [ --enable-step-slew s step and slew the time], [ans=$enableval], - [case "$target" in + [case "$host" in *-sni-sysv*) ans=yes ;; @@ -3168,7 +3230,7 @@ esac AC_CACHE_CHECK(if ntpdate should step the time, ac_cv_var_ntpdate_step, [AC_ARG_ENABLE(ntpdate-step, [ --enable-ntpdate-step s if ntpdate should step the time], [ans=$enableval], - [case "$target" in + [case "$host" in *-apple-aux[[23]]*) ans=yes ;; @@ -3185,7 +3247,7 @@ AC_CACHE_CHECK(if we should sync TODR clock every hour, ac_cv_var_sync_todr, [AC_ARG_ENABLE(hourly-todr-sync, [ --enable-hourly-todr-sync s if we should sync TODR hourly], [ans=$enableval], - [case "$target" in + [case "$host" in *-*-nextstep*) ans=yes ;; @@ -3203,7 +3265,7 @@ esac AC_CACHE_CHECK(if we should avoid kernel FLL bug, ac_cv_var_kernel_fll_bug, [AC_ARG_ENABLE(kernel-fll-bug, [ --enable-kernel-fll-bug s if we should avoid a kernel FLL bug], [ans=$enableval], - [case "$target" in + [case "$host" in *-*-solaris2.6) unamev=`uname -v` case "$unamev" in @@ -3253,10 +3315,10 @@ case "$ac_cv_var_kernel_fll_bug" in yes) AC_DEFINE(KERNEL_FLL_BUG) ;; esac -case "$host" in - $target) +case "$build" in + $host) ;; - *) case "$target" in + *) case "$host" in *-*-vxworks*) LDFLAGS="$LDFLAGS -r" ;; @@ -3271,14 +3333,34 @@ AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info]) ## the ANSI2KNR-filtering rules. #LIB@&t@OBJS=`echo "$LIB@&t@OBJS" | sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'` -AC_CONFIG_FILES(Makefile adjtimed/Makefile clockstuff/Makefile \ -ElectricFence/Makefile -include/Makefile kernel/Makefile kernel/sys/Makefile libntp/Makefile \ -libparse/Makefile librsaref/Makefile ntpd/Makefile ntpdc/Makefile \ -ntpdate/Makefile ntpq/Makefile ntptrace/Makefile parseutil/Makefile \ -scripts/Makefile scripts/calc_tickadj scripts/checktime scripts/freq_adj \ -scripts/mkver scripts/ntp-wait scripts/ntpsweep scripts/ntpver \ -scripts/plot_summary scripts/summary util/Makefile) +AC_CONFIG_FILES(Makefile) +AC_CONFIG_FILES(ElectricFence/Makefile) +AC_CONFIG_FILES(adjtimed/Makefile) +AC_CONFIG_FILES(clockstuff/Makefile) +AC_CONFIG_FILES(include/Makefile) +AC_CONFIG_FILES(kernel/Makefile) +AC_CONFIG_FILES(kernel/sys/Makefile) +AC_CONFIG_FILES(libntp/Makefile) +AC_CONFIG_FILES(libparse/Makefile) +AC_CONFIG_FILES(librsaref/Makefile) +AC_CONFIG_FILES(ntpd/Makefile) +AC_CONFIG_FILES(ntpdate/Makefile) +AC_CONFIG_FILES(ntpdc/Makefile) +AC_CONFIG_FILES(ntpq/Makefile) +AC_CONFIG_FILES(ntptrace/Makefile) +AC_CONFIG_FILES(parseutil/Makefile) +AC_CONFIG_FILES(scripts/Makefile) +AC_CONFIG_FILES(scripts/calc_tickadj) +AC_CONFIG_FILES(scripts/checktime) +AC_CONFIG_FILES(scripts/freq_adj) +AC_CONFIG_FILES(scripts/mkver) +AC_CONFIG_FILES(scripts/ntp-wait) +AC_CONFIG_FILES(scripts/ntpsweep) +AC_CONFIG_FILES(scripts/ntpver) +AC_CONFIG_FILES(scripts/plot_summary) +AC_CONFIG_FILES(scripts/summary) +AC_CONFIG_FILES(util/Makefile) + 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]], []) + AC_OUTPUT -#test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])