freebsd-dev/contrib/ntp/configure.in

3708 lines
91 KiB
Plaintext
Raw Normal View History

1999-12-09 13:01:21 +00:00
dnl -*-fundamental-*-
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ntpd/ntp_refclock.c)
AC_CANONICAL_SYSTEM
2002-11-04 19:36:11 +00:00
AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) string])
1999-12-09 13:01:21 +00:00
AM_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
2004-07-20 15:01:56 +00:00
AM_INIT_AUTOMAKE(ntp, 4.2.0)
AC_PREREQ(2.53)
1999-12-09 13:01:21 +00:00
2001-08-29 14:35:15 +00:00
ac_cv_var_atom_ok=no
2002-11-04 19:36:11 +00:00
ac_cv_var_oncore_ok=no
ac_cv_var_ripe_ncc_ok=no
2004-07-20 15:01:56 +00:00
ac_cv_var_jupiter_ok=no
1999-12-09 13:01:21 +00:00
dnl Grab any initial CFLAGS so we can pick better defaults.
iCFLAGS="$CFLAGS"
2004-07-20 15:01:56 +00:00
dnl check these early to avoid autoconf warnings
AC_AIX
AC_MINIX
1999-12-09 13:01:21 +00:00
dnl we need to check for cross compile tools for vxWorks here
AC_PROG_CC
2001-08-29 14:35:15 +00:00
AC_PROG_CC_STDC
1999-12-09 13:01:21 +00:00
AC_PROG_CPP
2002-11-04 19:36:11 +00:00
case "$host" in
*-*-amigaos)
CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA"
;;
1999-12-09 13:01:21 +00:00
*-pc-cygwin*)
CFLAGS="$CFLAGS -DSYS_CYGWIN32"
;;
i386-sequent-sysv4)
case "$CC" in
cc)
2002-10-29 19:58:12 +00:00
CFLAGS="$CFLAGS -Wc,+abi-socket"
1999-12-09 13:01:21 +00:00
;;
esac
2000-01-28 14:55:50 +00:00
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
LIBS="$LIBS -lcurses"
;;
1999-12-09 13:01:21 +00:00
esac
2004-07-20 15:01:56 +00:00
AC_CACHE_CHECK(if we should use /dev/clockctl, ac_clockctl,
[AC_ARG_ENABLE(clockctl,
AC_HELP_STRING([--enable-clockctl], [Use /dev/clockctl for non-root time control]),
[ans=$enableval],
[case "$target" in
*-*-netbsd*)
ans=yes
;;
*) ans=no
;;
esac
])
ac_clockctl=$ans])
# End of AC_CACHE_CHECK for clockctl
AC_CHECK_HEADERS(sys/clockctl.h)
case "$ac_clockctl$ac_cv_header_sys_clockctl_h" in
yesyes)
AC_DEFINE(HAVE_CLOCKCTL, ,[[Use /dev/clockctl?]])
;;
esac
2002-11-04 19:36:11 +00:00
case "$build" in
$host)
1999-12-09 13:01:21 +00:00
;;
2002-11-04 19:36:11 +00:00
*) case "$host" in
1999-12-09 13:01:21 +00:00
*-*-vxworks*)
# Quick and dirty sanity check
case "$VX_KERNEL" in
'') AC_MSG_ERROR(Please follow the directions in html/vxworks.html!)
;;
esac
CFLAGS="$CFLAGS -DSYS_VXWORKS"
;;
esac
;;
esac
dnl we need to check for cross compile tools for vxWorks here
AC_PROG_AWK
AC_PROG_MAKE_SET
rm -f conftest*
case "$GCC" in
yes)
CFLAGS="$CFLAGS -Wall"
# CFLAGS="$CFLAGS -Wcast-align"
2001-08-29 14:35:15 +00:00
CFLAGS="$CFLAGS -Wcast-qual"
# CFLAGS="$CFLAGS -Wconversion"
# CFLAGS="$CFLAGS -Werror"
CFLAGS="$CFLAGS -Wmissing-prototypes"
CFLAGS="$CFLAGS -Wpointer-arith"
CFLAGS="$CFLAGS -Wshadow"
1999-12-09 13:01:21 +00:00
CFLAGS="$CFLAGS -Wstrict-prototypes"
2001-08-29 14:35:15 +00:00
# CFLAGS="$CFLAGS -Wtraditional"
# CFLAGS="$CFLAGS -Wwrite-strings"
1999-12-09 13:01:21 +00:00
;;
esac
ac_busted_vpath_in_make=no
2002-11-04 19:36:11 +00:00
case "$host" in
2001-08-29 14:35:15 +00:00
*-next-nextstep3)
CFLAGS="$CFLAGS -posix"
;;
1999-12-09 13:01:21 +00:00
*-*-irix6.1*) # 64 bit only
2001-08-29 14:35:15 +00:00
# busted vpath?
1999-12-09 13:01:21 +00:00
;;
*-*-irix6*) # 6.2 (and later?)
ac_busted_vpath_in_make=yes
# don't pass -n32 to gcc, it cannot handle and doesn't need it
if test "$GCC" != yes; then
case "$CFLAGS" in
*-n32*) ;;
*-n64*) ;;
2004-07-20 15:01:56 +00:00
*-64*) ;;
1999-12-09 13:01:21 +00:00
*) case "$iCFLAGS" in
'') CFLAGS="-O2 -g3 -n32" ;;
*) CFLAGS="$CFLAGS -n32" ;;
esac
;;
esac
case "$LDFLAGS" in
*-n32*) ;;
*-n64*) ;;
2004-07-20 15:01:56 +00:00
*-64*) ;;
1999-12-09 13:01:21 +00:00
*) LDFLAGS="$LDFLAGS -n32" ;;
esac
fi
;;
*-*-solaris2.5.1)
ac_busted_vpath_in_make=yes
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ac_busted_vpath_in_make=yes
;;
1999-12-09 13:01:21 +00:00
dnl This is currently commented out by bor.
dnl The new versions of ReliantUNIX round adjtime() interval down
dnl to 1/100s (system tick). This makes tickadj actually useless.
dnl So, I'd better not use additional flags.
dnl I leave it here just in case anybody has better idea
dnl mips-sni-sysv4* )
dnl #
dnl # Add flags for 64 bit file access to enable tickadj to access /dev/kmem
dnl #
dnl if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then
dnl CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`"
dnl fi
dnl ;;
esac
case "$ac_busted_vpath_in_make$srcdir" in
no*) ;;
yes.) ;;
*) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
'')
AC_MSG_ERROR(building outside of the main directory requires GNU make)
;;
*) ;;
esac
;;
esac
AC_SUBST(CFLAGS)dnl
AC_SUBST(LDFLAGS)dnl
AC_PROG_LN_S
AC_PROG_GCC_TRADITIONAL
2004-07-20 15:01:56 +00:00
AC_C_VOLATILE
1999-12-09 13:01:21 +00:00
AC_ISC_POSIX
AC_PROG_RANLIB
AC_PATH_PROG(PATH_SH, sh)
2001-08-29 14:35:15 +00:00
AC_PATH_PROG(PATH_PERL, perl)
hs_ULONG_CONST
1999-12-09 13:01:21 +00:00
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-vxworks*)
ac_link="$ac_link $VX_KERNEL"
;;
esac
AC_PROG_INSTALL
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-pc-cygwin*)
AC_CHECK_LIB(advapi32, main)
;;
esac
2001-08-29 14:35:15 +00:00
AC_CHECK_LIB(elf, nlist) dnl Only needed for tickadj...
1999-12-09 13:01:21 +00:00
dnl AC_CHECK_LIB(kvm, main, , , -lelf)
AC_CHECK_LIB(kvm, main) dnl We already know about -lelf here...
AC_CHECK_LIB(ld, nlist)
AC_CHECK_LIB(mld, nlist)
AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
2002-10-29 19:58:12 +00:00
AC_CHECK_FUNC(openlog, ,
AC_CHECK_LIB(gen, openlog, ,
AC_CHECK_LIB(syslog, openlog, , , -lsocket)))
2004-07-20 15:01:56 +00:00
AC_CHECK_LIB(md5, MD5Init, ,
AC_CHECK_LIB(md, MD5Init))
AC_CHECK_FUNCS(MD5Init)
2002-11-04 19:36:11 +00:00
dnl HMS: What a hack...
AC_CHECK_HEADERS(readline/history.h readline/readline.h)
case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in
*no*) ;;
2004-07-20 15:01:56 +00:00
*) save_LIBS=$LIBS
LIBS=
AC_CHECK_LIB(readline, readline, ,
2002-11-04 19:36:11 +00:00
AC_MSG_NOTICE([Trying again with -lcurses])
unset ac_cv_lib_readline_readline
AC_CHECK_LIB(readline, readline,
LIBS="-lreadline -lcurses $LIBS"
AC_DEFINE(HAVE_LIBREADLINE)
2004-07-20 15:01:56 +00:00
AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?]),
AC_CHECK_LIB(edit, readline,
LIBS="-ledit -lcurses"
AC_DEFINE(HAVE_LIBEDIT, , [Do we have the edit library?])
AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?])
, , -lcurses)
, -lcurses))
READLINE_LIBS=$LIBS
AC_SUBST(READLINE_LIBS)
LIBS=$save_LIBS
2002-11-04 19:36:11 +00:00
;;
esac
1999-12-09 13:01:21 +00:00
dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
2001-08-29 14:35:15 +00:00
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.
2002-11-04 19:36:11 +00:00
case "$host" in
2001-08-29 14:35:15 +00:00
*-*-linux*) ;;
*)
AC_CHECK_LIB(rt, sched_setscheduler, ,
1999-12-09 13:01:21 +00:00
AC_CHECK_LIB(posix4, sched_setscheduler))
2001-08-29 14:35:15 +00:00
;;
esac
1999-12-09 13:01:21 +00:00
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
AC_HEADER_STDC
2004-07-20 15:01:56 +00:00
AC_CHECK_HEADERS(bstring.h errno.h fcntl.h ieeefp.h math.h)
# HMS: Lame, but fast.
if test -f /etc/redhat-release
then
:
else
AC_CHECK_HEADERS(md5.h)
fi
AC_CHECK_HEADERS(memory.h netdb.h poll.h)
AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h)
AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h)
case "$host" in
*-*-aix*)
AC_CHECK_HEADERS(utmpx.h)
case "$ac_cv_header_utmpx_h" in
yes) ;;
*) AC_CHECK_HEADERS(utmp.h) ;;
esac
;;
*) AC_CHECK_HEADERS(utmp.h utmpx.h) ;;
esac
AC_CHECK_HEADERS(arpa/nameser.h)
AC_CHECK_HEADERS(net/if.h, [], [],
[#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])
AC_CHECK_HEADERS(net/if6.h)
AC_CHECK_HEADERS(netinet/in_system.h netinet/in_systm.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(netinet/ip.h, [], [],
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#if HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif
])
2002-11-04 19:36:11 +00:00
AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO, 1, [NetInfo support?])])
1999-12-09 13:01:21 +00:00
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)
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-sunos4*) ;;
*) AC_CHECK_HEADERS(sys/ioctl.h)
;;
esac
2004-07-20 15:01:56 +00:00
AC_CHECK_HEADERS(sys/ipc.h)
1999-12-09 13:01:21 +00:00
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)
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-sco*)
AC_CHECK_HEADERS(sys/sio.h)
;;
esac
2004-07-20 15:01:56 +00:00
AC_CHECK_HEADERS(sys/select.h sys/shm.h sys/signal.h sys/sockio.h)
2002-11-04 19:36:11 +00:00
AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h)
AC_CHECK_HEADERS(sys/stat.h sys/stream.h)
2004-07-20 15:01:56 +00:00
AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/syssgi.h sys/systune.h)
AC_CHECK_HEADERS(sys/termios.h sys/time.h sys/signal.h)
1999-12-09 13:01:21 +00:00
AC_EGREP_CPP(yes,
[#include <sys/timepps.h>
#ifdef PPS_API_VERS_1
yes
#endif
2002-10-29 19:58:12 +00:00
], [AC_CHECK_HEADERS(sys/timepps.h)])
1999-12-09 13:01:21 +00:00
AC_CHECK_HEADERS(sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.h)
AC_HEADER_TIME
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-convex-*)
AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h)
;;
*-*-bsdi*)
AC_CHECK_HEADERS(machine/inline.h sys/pcl720.h sys/i8253.h)
;;
esac
AC_CHECK_HEADER(nlist.h,
2002-11-04 19:36:11 +00:00
[AC_DEFINE(NLIST_STRUCT, 1, [nlist stuff])
1999-12-09 13:01:21 +00:00
AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
[AC_TRY_COMPILE([#include <nlist.h>],
[struct nlist n; n.n_un.n_name = 0;],
ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
if test $ac_cv_struct_nlist_n_un = yes; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(NLIST_NAME_UNION, 1, [does struct nlist use a name union?])
1999-12-09 13:01:21 +00:00
fi
])dnl
2004-07-20 15:01:56 +00:00
dnl AC_CHECK_HEADERS(net/if.h, [], [],
dnl [#if HAVE_SYS_TYPES_H
dnl # include <sys/types.h>
dnl #endif
dnl #if HAVE_SYS_SOCKET_H
dnl # include <sys/socket.h>
dnl #endif
dnl ])
AC_CHECK_HEADERS(resolv.h, [], [],
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#if HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
])
1999-12-09 13:01:21 +00:00
AC_CACHE_CHECK(for basic volatile support, ac_cv_c_volatile,
[AC_TRY_COMPILE([],[
volatile int x;],
ac_cv_c_volatile=yes,
ac_cv_c_volatile=no)
])
case "$ac_cv_c_volatile" in
yes)
;;
2002-11-04 19:36:11 +00:00
*) AC_DEFINE(volatile, , [Does the compiler like "volatile"?])
1999-12-09 13:01:21 +00:00
;;
esac
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
sparc-*-solaris2*)
# Assume that solaris2 is Ansi C...
;;
*)
AM_C_PROTOTYPES
;;
esac
AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes,
[AC_TRY_COMPILE([
extern int foo (short);
int foo(short i) { return i; }],[
int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no)
])
if test "$ac_cv_have_prototypes" = yes; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_PROTOTYPES, 1, [Are function prototypes OK?])
1999-12-09 13:01:21 +00:00
fi
AC_C_CONST
2004-07-20 15:01:56 +00:00
AC_C_BIGENDIAN
1999-12-09 13:01:21 +00:00
AC_TYPE_SIGNAL
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_CHECK_TYPE(time_t, long)
AC_STRUCT_TM
2004-07-20 15:01:56 +00:00
AC_CACHE_CHECK([for u_int8_t], ac_cv_type_u_int8_t,
[AC_TRY_COMPILE([#include <sys/types.h>],
[u_int8_t len = 42; return 0;],
ac_cv_type_u_int8_t=yes,
ac_cv_type_u_int8_t=no)
])
if test $ac_cv_type_u_int8_t = yes; then
AC_DEFINE(HAVE_TYPE_U_INT8_T,1,Does u_int8_t exist)
fi
AC_CACHE_CHECK([for u_int64_t], ac_cv_type_u_int64_t,
[AC_TRY_COMPILE([#include <sys/types.h>],
[u_int64_t len = 42; return 0;],
ac_cv_type_u_int64_t=yes,
ac_cv_type_u_int64_t=no)
])
if test $ac_cv_type_u_int64_t = yes; then
AC_DEFINE(HAVE_TYPE_U_INT64_T,1,Does u_int64_t exist)
fi
1999-12-09 13:01:21 +00:00
AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz,
[ac_cv_var_default_hz=100
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
alpha*-dec-osf4*|alpha*-dec-osf5*)
ac_cv_var_default_hz=1024
;;
mips-dec-ultrix4*)
ac_cv_var_default_hz=256
;;
esac])
2002-11-04 19:36:11 +00:00
AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz, [What is the fallback value for HZ?])
1999-12-09 13:01:21 +00:00
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
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
alpha*-dec-osf4*|alpha*-dec-osf5*)
ac_cv_var_override_hz=yes
;;
mips-dec-ultrix4*)
ac_cv_var_override_hz=yes
;;
*-*-freebsd*)
ac_cv_var_override_hz=yes
;;
*-*-sunos4*)
ac_cv_var_override_hz=yes
;;
esac])
case "$ac_cv_var_override_hz" in
yes)
2002-11-04 19:36:11 +00:00
AC_DEFINE(OVERRIDE_HZ, 1, [Do we need to override the system's idea of HZ?])
1999-12-09 13:01:21 +00:00
;;
esac
dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
dnl [AC_TRY_LINK([#include <sys/types.h>
dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;],
dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)])
dnl if test $su_cv_func_ut_host_in_utmp = yes; then
dnl AC_DEFINE(HAVE_UT_HOST)
dnl fi
dnl AC_MSG_CHECKING(if we can get the system boot time)
dnl AC_CACHE_VAL(su_cv_have_boot_time,
dnl [AC_EGREP_CPP(yes,
dnl [#ifdef HAVE_UTMPX_H
dnl #include <utmpx.h>
dnl #else
dnl #include <utmp.h>
dnl #endif
dnl #ifdef BOOT_TIME
dnl yes
dnl #endif
dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)])
dnl AC_MSG_RESULT($su_cv_have_boot_time)
AC_CACHE_CHECK(
struct sigaction for sa_sigaction,
ac_cv_struct_sigaction_has_sa_sigaction,
[
AC_TRY_COMPILE(
[#include <signal.h>],
[struct sigaction act; act.sa_sigaction = 0;],
ac_cv_struct_sigaction_has_sa_sigaction=yes,
ac_cv_struct_sigaction_has_sa_sigaction=no
)
]
)
if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION, 1, [Obvious...])
1999-12-09 13:01:21 +00:00
fi
AC_CACHE_CHECK(for struct ppsclockev, ac_cv_struct_ppsclockev,
[AC_TRY_COMPILE([
#include <sys/types.h>
#ifdef HAVE_SYS_TERMIOS_H
# include <sys/termios.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_SYS_PPSCLOCK_H
# include <sys/ppsclock.h>
#endif],[
extern struct ppsclockev *pce;
return pce->serial;],
ac_cv_struct_ppsclockev=yes,
ac_cv_struct_ppsclockev=no)
])
if test $ac_cv_struct_ppsclockev = yes; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV, 1, [Does a system header define struct ppsclockev?])
1999-12-09 13:01:21 +00:00
fi
AC_CACHE_CHECK(struct sockaddr for sa_len, ac_cv_struct_sockaddr_has_sa_len,
[AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>],[
extern struct sockaddr *ps;
return ps->sa_len;],
ac_cv_struct_sockaddr_has_sa_len=yes,
ac_cv_struct_sockaddr_has_sa_len=no)
])
if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR, 1, [Should be obvious...])
1999-12-09 13:01:21 +00:00
fi
2004-07-20 15:01:56 +00:00
AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
ac_cv_have_ss_family_in_struct_ss, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
],
[ struct sockaddr_storage s; s.ss_family = 1; ],
[ ac_cv_have_ss_family_in_struct_ss="yes" ],
[ ac_cv_have_ss_family_in_struct_ss="no" ],
)
])
if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have ss_family?])
else
# Hack around a problem...
case "$host" in
*-*-hpux11.11) CPPFLAGS="$CPPFLAGS -D_NETINET_IN6_H"
;;
esac
fi
AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
ac_cv_have___ss_family_in_struct_ss, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
],
[ struct sockaddr_storage s; s.__ss_family = 1; ],
[ ac_cv_have___ss_family_in_struct_ss="yes" ],
[ ac_cv_have___ss_family_in_struct_ss="no" ]
)
])
if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
fi
AH_VERBATIM([X_HAVE_SS_FAMILY_IN_SS],
[/* Handle ss_family */
#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
# define ss_family __ss_family
# define ss_len __ss_len
#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */])
2002-11-04 19:36:11 +00:00
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 <machine/soundcard.h>
#endif
#ifdef HAVE_SYS_SOUNDCARD_H
# include <sys/soundcard.h>
#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
1999-12-09 13:01:21 +00:00
AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz,
[AC_TRY_COMPILE([
#include <sys/time.h>],[
extern struct clockinfo *pc;
return pc->hz;],
ac_cv_struct_clockinfo_has_hz=yes,
ac_cv_struct_clockinfo_has_hz=no)
])
if test $ac_cv_struct_clockinfo_has_hz = yes; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
1999-12-09 13:01:21 +00:00
fi
AC_CACHE_CHECK(struct clockinfo for tickadj, ac_cv_struct_clockinfo_has_tickadj,
[AC_TRY_COMPILE([
#include <sys/time.h>],[
extern struct clockinfo *pc;
return pc->tickadj;],
ac_cv_struct_clockinfo_has_tickadj=yes,
ac_cv_struct_clockinfo_has_tickadj=no)
])
if test $ac_cv_struct_clockinfo_has_tickadj = yes; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
1999-12-09 13:01:21 +00:00
fi
2001-08-29 14:35:15 +00:00
AC_CACHE_CHECK([for struct timespec], ac_cv_struct_timespec,
[AC_TRY_COMPILE([
#include <sys/time.h>
/* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif
#ifdef HAVE_SYS_TIMEPPS_H
# define FRAC 4294967296
# include <sys/timepps.h>
#endif],
[struct timespec n;],
ac_cv_struct_timespec=yes, ac_cv_struct_timespec=no)])
if test $ac_cv_struct_timespec = yes; then
AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, [Do we have struct timespec?])
fi
1999-12-09 13:01:21 +00:00
AC_CACHE_CHECK([for struct ntptimeval], ac_cv_struct_ntptimeval,
[AC_TRY_COMPILE([
#include <sys/time.h>
#include <sys/timex.h>],
[struct ntptimeval n;],
ac_cv_struct_ntptimeval=yes, ac_cv_struct_ntptimeval=no)])
if test $ac_cv_struct_ntptimeval = yes; then
AC_DEFINE(HAVE_STRUCT_NTPTIMEVAL, 1, [Do we have struct ntptimeval?])
fi
2001-08-29 14:35:15 +00:00
AC_CHECK_MEMBERS([struct ntptimeval.time.tv_nsec], , ,
[#ifdef HAVE_SYS_TIME_H
1999-12-09 13:01:21 +00:00
#include <sys/time.h>
#else
# ifdef HAVE_TIME_H
# include <time.h>
# endif
#endif
#ifdef HAVE_SYS_TIMEX_H
#include <sys/timex.h>
#else
# ifdef HAVE_TIMEX_H
# include <timex.h>
# endif
2001-08-29 14:35:15 +00:00
#endif])
1999-12-09 13:01:21 +00:00
AC_C_INLINE
AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
2002-11-04 19:36:11 +00:00
AC_CHECK_SIZEOF(signed char)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
1999-12-09 13:01:21 +00:00
2001-08-29 14:35:15 +00:00
AC_CHECK_TYPES([s_char])
1999-12-09 13:01:21 +00:00
case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
*yes)
# We have a typedef for s_char. Might as well believe it...
;;
no0no)
# We have signed chars, can't say 'signed char', no s_char typedef.
2002-11-04 19:36:11 +00:00
AC_DEFINE(NEED_S_CHAR_TYPEDEF, 1, [Do we need an s_char typedef?])
1999-12-09 13:01:21 +00:00
;;
no1no)
# We have signed chars, can say 'signed char', no s_char typedef.
AC_DEFINE(NEED_S_CHAR_TYPEDEF)
;;
yes0no)
# We have unsigned chars, can't say 'signed char', no s_char typedef.
AC_MSG_ERROR(No way to specify a signed character!)
;;
yes1no)
# We have unsigned chars, can say 'signed char', no s_char typedef.
AC_DEFINE(NEED_S_CHAR_TYPEDEF)
;;
esac
AC_TYPE_UID_T
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-linux*)
AC_CHECK_FUNCS(__adjtimex __ntp_gettime)
;;
esac
2002-11-04 19:36:11 +00:00
case "$host" in
2004-07-20 15:01:56 +00:00
*-*-aix[[45]]*)
1999-12-09 13:01:21 +00:00
# (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,
# IBM pulls its thumbs out long enough to implement clock_settime,
# this conditional will need to change. Maybe use AC_TRY_RUN
# instead to try to set the time to itself and check errno.
;;
2002-10-29 19:58:12 +00:00
*) AC_CHECK_FUNCS(clock_gettime clock_settime)
1999-12-09 13:01:21 +00:00
;;
esac
2001-08-29 14:35:15 +00:00
AC_CHECK_FUNCS(daemon)
AC_CHECK_FUNCS(finite, ,
[AC_CHECK_FUNCS(isfinite, ,
[AC_MSG_CHECKING(for isfinite with <math.h>)
_libs=$LIBS
LIBS="$LIBS -lm"
AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ISFINITE)],
AC_MSG_RESULT(no))
LIBS=$_libs])])
2002-10-29 19:58:12 +00:00
AC_CHECK_FUNCS(getbootfile getclock getdtablesize getrusage)
AC_CHECK_FUNC(gettimeofday, ,[
2002-11-04 19:36:11 +00:00
case "$host" in
2002-10-29 19:58:12 +00:00
*-*-mpeix*) ac_cv_func_gettimeofday=yes
;;
esac])
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-pc-cygwin*)
;;
*) AC_CHECK_FUNCS(getuid)
;;
esac
2004-07-20 15:01:56 +00:00
AC_CHECK_FUNCS(hstrerror)
AC_CHECK_FUNC(inet_ntop, [], [AC_DEFINE(ISC_PLATFORM_NEEDNTOP, 1, [ISC: provide inet_ntop()])])
AC_CHECK_FUNCS(K_open kvm_open memcpy memmove memset)
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-sco3.2v5.0.*)
# Just stubs. Idiots.
;;
*) AC_CHECK_FUNCS(mkstemp)
;;
esac
2002-11-04 19:36:11 +00:00
AC_CHECK_FUNCS(mktime)
case "$host" in
2004-07-20 15:01:56 +00:00
*-*-aix[[45]]*)
1999-12-09 13:01:21 +00:00
# Just a stub. Idiots.
;;
2004-07-20 15:01:56 +00:00
*-*-irix[[45]]*)
# Just a stub in "old" Irix. Idiots.
2002-11-04 19:36:11 +00:00
;;
*-*-qnx*)
# Apparently there but not working in QNX. Idiots?
1999-12-09 13:01:21 +00:00
;;
*-*-sco3.2v5.0.*)
2002-11-04 19:36:11 +00:00
# Just a stub. Idiots.
1999-12-09 13:01:21 +00:00
;;
alpha*-dec-osf4*|alpha*-dec-osf5*)
# mlockall is there, as a #define calling memlk via <sys/mman.h>
# Not easy to test for - cheat.
AC_CHECK_FUNCS(memlk, [ac_cv_func_mlockall='yes'])
AC_CHECK_FUNCS(mlockall)
;;
*) AC_CHECK_FUNCS(mlockall)
;;
esac
2001-08-29 14:35:15 +00:00
AC_CHECK_FUNCS(mrand48 srand48 nice nlist)
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-solaris2.6)
# Broken...
;;
*) AC_CHECK_FUNCS(ntp_adjtime ntp_gettime)
;;
esac
2001-08-29 14:35:15 +00:00
AC_CHECK_FUNCS(plock pututline pututxline readlink rtprio)
case "$ac_cv_func_mrand48" in
yes) ;;
*) AC_REPLACE_FUNCS(random) ;;
esac
2002-11-04 19:36:11 +00:00
case "$host" in
2004-07-20 15:01:56 +00:00
*-*-aix[[45]]*)
1999-12-09 13:01:21 +00:00
# Just a stub in AIX 4. Idiots.
;;
*-*-solaris2.5*)
# Just stubs in solaris2.5. Idiots.
;;
*) AC_CHECK_FUNCS(sched_setscheduler)
;;
esac
2002-10-29 19:58:12 +00:00
AC_CHECK_FUNCS(setlinebuf setpgid setpriority setsid)
2004-07-20 15:01:56 +00:00
AC_CHECK_FUNCS(setrlimit)
2002-10-29 19:58:12 +00:00
AC_CHECK_FUNCS(settimeofday, ,[
2002-11-04 19:36:11 +00:00
case "$host" in
2002-10-29 19:58:12 +00:00
*-*-mpeix*) ac_cv_func_settimeofday=yes
;;
esac])
AC_CHECK_FUNCS(setvbuf sigaction)
1999-12-09 13:01:21 +00:00
AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl)
2002-11-04 19:36:11 +00:00
AC_CHECK_FUNCS(snprintf strdup strerror strstr)
AC_CHECK_FUNCS(timegm)
case "$host" in
2004-07-20 15:01:56 +00:00
*-*-aix[[45]]*)
1999-12-09 13:01:21 +00:00
# Just stubs. Idiots.
;;
2004-07-20 15:01:56 +00:00
*-*-netbsd1*)
# Just stubs. Idiots.
;;
*-*-netbsdelf1*)
1999-12-09 13:01:21 +00:00
# Just stubs. Idiots.
;;
*-*-openbsd*)
# Just stubs. Idiots.
;;
*) AC_CHECK_FUNCS(timer_create timer_settime)
;;
esac
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-pc-cygwin*)
# I have no idea...
;;
*) AC_CHECK_FUNCS(umask)
;;
esac
AC_CHECK_FUNCS(uname updwtmp updwtmpx vsprintf)
2004-07-20 15:01:56 +00:00
case "$host" in
*-*-sunos4*)
AC_DEFINE(SPRINTF_CHAR, 1, [*s*printf() functions are char*])
;;
esac
1999-12-09 13:01:21 +00:00
AC_CACHE_CHECK(number of arguments to gettimeofday(), ac_cv_func_Xettimeofday_nargs,
[AC_TRY_COMPILE([#include <sys/time.h>],[
gettimeofday((struct timeval*)0,(struct timezone*)0);
settimeofday((struct timeval*)0,(struct timezone*)0);
],
ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1)
])
if test $ac_cv_func_Xettimeofday_nargs = 1; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(SYSV_TIMEOFDAY, 1, [Does Xettimeofday take 1 arg?])
1999-12-09 13:01:21 +00:00
fi
AC_CACHE_CHECK(number of arguments taken by setpgrp(), ac_cv_func_setpgrp_nargs,
[AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
],[setpgrp(0,0);],
ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0)
])
if test $ac_cv_func_setpgrp_nargs = 0; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_SETPGRP_0, 1, [define if setpgrp takes 0 arguments])
1999-12-09 13:01:21 +00:00
fi
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -I$srcdir/include"
AC_CACHE_CHECK(argument pointer type of qsort()'s compare function and base,
ac_cv_func_qsort_argtype,
[AC_TRY_COMPILE([
#include "l_stdlib.h"
#ifdef HAVE_PROTOTYPES
#define P(x) x
#else
#define P(x) ()
#endif
extern void *base;
extern sortfunc P((const void *, const void *));
int sortfunc(a, b)
const void *a;
const void *b; { return 0; }
],[
qsort(base, 2, sizeof(char *), sortfunc);
],
ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char)
])
case "$ac_cv_func_qsort_argtype" in
void)
2002-11-04 19:36:11 +00:00
AC_DEFINE(QSORT_USES_VOID_P, 1, [Does qsort expect to work on "void *" stuff?])
1999-12-09 13:01:21 +00:00
;;
esac
CFLAGS=$save_CFLAGS
AC_CACHE_CHECK(if we need to declare 'errno', ac_cv_decl_errno,
[AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif],
[errno = 0;],
ac_cv_decl_errno=no, ac_cv_decl_errno=yes)])
case "$ac_cv_decl_errno" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(DECL_ERRNO, 1, [Declare errno?]) ;;
1999-12-09 13:01:21 +00:00
esac
dnl FIXME: from ntpd/ntp_intres.c, but there's no info which header produces
dnl the clash. <resolv.h> isn't currently used.
dnl
dnl (prr) aix 4.3 defines h_errno as (*(int *)h_errno_which()) for
dnl MT purposes. This makes the line "extern int h_errno" choke
dnl the compiler. Hopefully adding !defined(h_errno) fixes this
dnl without breaking any other platforms.
dnl
AC_CACHE_CHECK(if we may declare 'h_errno', ac_cv_decl_h_errno,
[AC_TRY_COMPILE([#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif],
[extern int h_errno;],
ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
case "$ac_cv_decl_h_errno" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(DECL_H_ERRNO, 1, [Declare h_errno?]) ;;
1999-12-09 13:01:21 +00:00
esac
dnl See if char *sys_errlist[] is OK.
2000-01-28 14:55:50 +00:00
AC_CACHE_CHECK([[if declaring 'char *sys_errlist[]' is ok]], ac_cv_decl_sys_errlist,
1999-12-09 13:01:21 +00:00
[AC_TRY_COMPILE([#include <stdio.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif],
2001-08-29 14:35:15 +00:00
[extern char *sys_errlist[];
],
1999-12-09 13:01:21 +00:00
ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
case "$ac_cv_decl_sys_errlist" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(CHAR_SYS_ERRLIST, 1, [Declare char *sys_errlist array]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(if declaring 'syscall()' is ok, ac_cv_decl_syscall,
[AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_PROTOTYPES
#define P(x) x
#else
#define P(x) ()
#endif
],
[extern int syscall P((int, ...));],
ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)])
case "$ac_cv_decl_syscall" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(DECL_SYSCALL, 1, [Declare syscall()?]) ;;
1999-12-09 13:01:21 +00:00
esac
2002-11-04 19:36:11 +00:00
case "$host" in
2001-08-29 14:35:15 +00:00
*-*-aix4.3.*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_HSTRERROR_0, 1, [Declaration style]) # Needed for XLC under AIX 4.3.2
2001-08-29 14:35:15 +00:00
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
AC_DEFINE(DECL_INET_NTOA_0, 1, [Declaration style])
AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
2002-10-29 19:58:12 +00:00
;;
2001-08-29 14:35:15 +00:00
*-*-osf[[45]]*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
AC_DEFINE(DECL_STIME_1, 1, [Declaration style])
;;
*-*-qnx*)
AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
1999-12-09 13:01:21 +00:00
;;
*-*-riscos4*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
1999-12-09 13:01:21 +00:00
;;
*-*-solaris2*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
AC_DEFINE(DECL_SETPRIORITY_1, 1, [Declaration style])
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-solaris2.4)
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
1999-12-09 13:01:21 +00:00
;;
esac
;;
*-*-sunos4*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
AC_DEFINE(DECL_BCOPY_0, 1, [Declaration style])
AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
AC_DEFINE(DECL_SIGVEC_0, 1, [Declaration style])
AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
1999-12-09 13:01:21 +00:00
case "`basename $ac_cv_prog_CC`" in
acc*) ;;
2002-11-04 19:36:11 +00:00
*) AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
1999-12-09 13:01:21 +00:00
;;
esac
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
AC_DEFINE(DECL_TOUPPER_0, 1, [Declaration style])
AC_DEFINE(DECL_STRERROR_0, 1, [Declaration style])
1999-12-09 13:01:21 +00:00
;;
*-*-ultrix4*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
AC_DEFINE(DECL_CFSETISPEED_0, 1, [Declaration style])
AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
AC_DEFINE(DECL_NLIST_0, 1, [Declaration style])
AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
AC_DEFINE(DECL_STIME_0, 1, [Declaration style])
AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
;;
esac
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-sco3.2*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(TERMIOS_NEEDS__SVID3, 1, [Do we need to #define _SVID3 when we #include <termios.h>?])
1999-12-09 13:01:21 +00:00
;;
esac
AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop,
[ans=no
2002-11-04 19:36:11 +00:00
case "$host" in
2001-08-29 14:35:15 +00:00
*-*-hpux[[567]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
esac
ac_cv_var_rcvbuf_slop=$ans])
case "$ac_cv_var_rcvbuf_slop" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(NEED_RCVBUF_SLOP, 1, [Do we need extra room for SO_RCVBUF? (HPUX <8)]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket,
[ans=yes
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-domainos)
ans=no
;;
esac
ac_cv_var_open_bcast_socket=$ans])
case "$ac_cv_var_open_bcast_socket" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(OPEN_BCAST_SOCKET, 1, [Should we open the broadcast socket?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig,
[ans=no
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-hpux*)
ans=yes
;;
esac
ac_cv_var_hpux_findconfig=$ans])
case "$ac_cv_var_hpux_findconfig" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(NEED_HPUX_FINDCONFIG, 1, [Do we want the HPUX FindConfig()?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid,
2002-11-04 19:36:11 +00:00
[case "$host" in
2001-08-29 14:35:15 +00:00
*-*-hpux[[567]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
*-*-hpux*)
ans=yes
;;
*-*-linux*)
ans=yes
;;
*-*-sunos3*)
ans=yes
;;
*-*-ultrix2*)
ans=yes
;;
*)
ans=no
;;
esac
ac_cv_arg_setpgrp_negpid=$ans])
case "$ac_cv_arg_setpgrp_negpid" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(UDP_BACKWARDS_SETOWN, 1, [Do we set process groups with -pid?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown,
2002-11-04 19:36:11 +00:00
[case "$host" in
2002-10-29 19:58:12 +00:00
*-*-bsdi[[23]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
*-*-freebsd*)
ans=yes
;;
*-*-netbsd*)
ans=yes
;;
2001-08-29 14:35:15 +00:00
*-*-openbsd*)
ans=yes
;;
1999-12-09 13:01:21 +00:00
*-*-osf*)
ans=yes
;;
*) ans=no
;;
esac
ac_cv_func_ctty_for_f_setown=$ans])
case "$ac_cv_func_ctty_for_f_setown" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(USE_FSETOWNCTTY, 1, [Must we have a CTTY for fsetown?]) ;;
1999-12-09 13:01:21 +00:00
esac
ntp_warning='GRONK'
AC_MSG_CHECKING(if we'll use clock_settime or settimeofday or stime)
case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
yes*)
ntp_warning=''
ans='clock_settime()'
;;
noyes*)
ntp_warning='But clock_settime() would be better (if we had it)'
ans='settimeofday()'
;;
nonoyes)
ntp_warning='Which is the worst of the three'
ans='stime()'
;;
*)
2002-11-04 19:36:11 +00:00
case "$build" in
$host) ntp_warning='Which leaves us with nothing to use!'
1999-12-09 13:01:21 +00:00
ans=none
;;
esac
esac
AC_MSG_RESULT($ans)
case "$ntp_warning" in
'') ;;
*) AC_MSG_WARN(*** $ntp_warning ***)
;;
esac
AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug,
2002-11-04 19:36:11 +00:00
[case "$host" in
1999-12-09 13:01:21 +00:00
*-*-solaris2.4*)
ans=yes
;;
*) ans=no
;;
esac
ac_cv_var_syscall_bug=$ans])
case "$ac_cv_var_syscall_bug" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(SYSCALL_BUG, 1, [Buggy syscall() (Solaris2.4)?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(for Streams/TLI, ac_cv_var_streams_tli,
[ case "$ac_cv_header_sys_stropts_h" in
yes)
ans=no
# There must be a better way...
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-ptx*)
ans=yes
;;
esac
;;
esac
ac_cv_var_streams_tli=$ans])
case "$ac_cv_var_streams_tli" in
yes)
2002-11-04 19:36:11 +00:00
AC_DEFINE(STREAMS_TLI, 1, [Do we have STREAMS/TLI? (Can we replace this with HAVE_SYS_STROPTS_H?)])
1999-12-09 13:01:21 +00:00
;;
esac
AC_CACHE_CHECK(for SIGIO, ac_cv_hdr_def_sigio,
AC_EGREP_CPP(yes,
[#include <signal.h>
#ifdef SIGIO
yes
#endif
], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no))
dnl Override those system that have a losing SIGIO
AC_CACHE_CHECK(if we want to use signalled IO, ac_cv_var_signalled_io,
[ans=no
case "$ac_cv_hdr_def_sigio" in
yes)
ans=yes
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
alpha*-dec-osf4*|alpha*-dec-osf5*)
ans=no
;;
*-convex-*)
ans=no
;;
*-dec-*)
ans=no
;;
*-pc-cygwin*)
ans=no
;;
*-sni-sysv*)
ans=no
;;
*-univel-sysv*)
ans=no
;;
*-*-irix6*)
ans=no
;;
*-*-freebsd*)
ans=no
;;
*-*-linux*)
ans=no
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=no
;;
1999-12-09 13:01:21 +00:00
esac
;;
esac
ac_cv_var_signalled_io=$ans])
case "$ac_cv_var_signalled_io" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(HAVE_SIGNALED_IO, 1, [Can we use SIGIO for tcp and udp IO?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(for SIGPOLL, ac_cv_hdr_def_sigpoll,
AC_EGREP_CPP(yes,
[#include <signal.h>
#ifdef SIGPOLL
yes
#endif
], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no))
AC_CACHE_CHECK(for SIGSYS, ac_cv_hdr_def_sigsys,
AC_EGREP_CPP(yes,
[#include <signal.h>
#ifdef SIGSYS
yes
#endif
], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no))
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)
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
mips-sgi-irix*)
ans=no
;;
vax-dec-bsd)
ans=no
;;
*-pc-cygwin*)
ans=no
;;
*-sni-sysv*)
ans=no
;;
2004-07-20 15:01:56 +00:00
*-*-aix[[45]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
*-*-hpux*)
ans=no
;;
*-*-linux*)
ans=no
;;
*-*-osf*)
ans=no
;;
2002-11-04 19:36:11 +00:00
*-*-qnx*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*-*-sunos*)
ans=no
;;
*-*-ultrix*)
ans=no
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*) ans=yes
;;
esac
;;
esac
ac_cv_var_use_udp_sigpoll=$ans])
case "$ac_cv_var_use_udp_sigpoll" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(USE_UDP_SIGPOLL, 1, [Can we use SIGPOLL for UDP?]) ;;
1999-12-09 13:01:21 +00:00
esac
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)
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
mips-sgi-irix*)
ans=no
;;
vax-dec-bsd)
ans=no
;;
*-pc-cygwin*)
ans=no
;;
*-sni-sysv*)
ans=no
;;
2004-07-20 15:01:56 +00:00
*-*-aix[[45]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
*-*-hpux*)
ans=no
;;
*-*-linux*)
ans=no
;;
*-*-osf*)
ans=no
;;
*-*-sunos*)
ans=no
;;
*-*-ultrix*)
ans=no
;;
2002-11-04 19:36:11 +00:00
*-*-qnx*)
ans=no
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*) ans=yes
;;
esac
;;
esac
ac_cv_var_use_tty_sigpoll=$ans])
case "$ac_cv_var_use_tty_sigpoll" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(USE_TTY_SIGPOLL, 1, [Can we use SIGPOLL for tty IO?]) ;;
1999-12-09 13:01:21 +00:00
esac
case "$ac_cv_header_sys_sio_h" in
yes)
AC_CACHE_CHECK(sys/sio.h for TIOCDCDTIMESTAMP, ac_cv_hdr_def_tiocdcdtimestamp,
AC_EGREP_CPP(yes,
[#include <sys/sio.h>
#ifdef TIOCDCDTIMESTAMP
yes
#endif
], ac_cv_hdr_def_tiocdcdtimestamp=yes, ac_cv_hdr_def_tiocdcdtimestamp=no))
;;
esac
2000-01-28 14:55:50 +00:00
case "$ac_cv_hdr_def_tiocdcdtimestamp" in
yes)
ac_cv_var_oncore_ok=yes
;;
esac
1999-12-09 13:01:21 +00:00
AC_CACHE_CHECK(if nlist() values might require extra indirection,
ac_cv_var_nlist_extra_indirection,
[ans=no
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-aix*)
ans=yes
;;
esac
ac_cv_var_nlist_extra_indirection=$ans])
case "$ac_cv_var_nlist_extra_indirection" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION, 1, [Might nlist() values require an extra level of indirection (AIX)?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(for a minimum recommended value of tickadj,
ac_cv_var_min_rec_tickadj,
[ans=no
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-aix*)
ans=40
;;
esac
ac_cv_var_min_rec_tickadj=$ans])
case "$ac_cv_var_min_rec_tickadj" in
''|no) ;;
2002-11-04 19:36:11 +00:00
*) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj, [Should we recommend a minimum value for tickadj?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR,
ac_cv_var_no_parenb_ignpar,
[ans=no
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
i?86-*-linux*)
ans=yes
;;
mips-sgi-irix*)
ans=yes
;;
2002-10-29 19:58:12 +00:00
i?86-*-freebsd[[123]].*)
;;
i?86-*-freebsd*)
ans=yes
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=yes
;;
1999-12-09 13:01:21 +00:00
esac
ac_cv_var_no_parenb_ignpar=$ans])
case "$ac_cv_var_no_parenb_ignpar" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(NO_PARENB_IGNPAR, 1, [Is there a problem using PARENB and IGNPAR (IRIX)?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_MSG_CHECKING(if we're including debugging code)
AC_ARG_ENABLE(debugging, [ --enable-debugging + include debugging code],
[ntp_ok=$enableval], [ntp_ok=yes])
if test "$ntp_ok" = "yes"; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(DEBUG, 1, [Enable debugging?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(for a the number of minutes in a DST adjustment)
AC_ARG_ENABLE(dst_minutes, [ --enable-dst-minutes=60 + minutes per DST adjustment],
[ans=$enableval], [ans=60])
2002-11-04 19:36:11 +00:00
AC_DEFINE_UNQUOTED(DSTMINUTES, $ans, [The number of minutes in a DST adjustment])
1999-12-09 13:01:21 +00:00
AC_MSG_RESULT($ans)
AC_CACHE_CHECK(if we have the tty_clk line discipline/streams module,
ac_cv_var_tty_clk,
[case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in
*yes*) ac_cv_var_tty_clk=yes ;;
esac])
case "$ac_cv_var_tty_clk" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(TTYCLK, 1, [Do we have the tty_clk line discipline/streams module?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(for the ppsclock streams module,
ac_cv_var_ppsclock,
ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev)
case "$ac_cv_var_ppsclock" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast,
[ac_cv_var_mcast=no
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
i386-sequent-sysv4) ;;
*) AC_EGREP_CPP(yes,
[#include <netinet/in.h>
#ifdef IP_ADD_MEMBERSHIP
yes
#endif
], ac_cv_var_mcast=yes) ;;
esac])
case "$ac_cv_var_mcast" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(MCAST, 1, [Does the kernel support multicasting IP?]) ;;
1999-12-09 13:01:21 +00:00
esac
2001-08-29 14:35:15 +00:00
AC_CACHE_CHECK([[availability of ntp_{adj,get}time()]], ac_cv_var_ntp_syscalls,
1999-12-09 13:01:21 +00:00
[ac_cv_var_ntp_syscalls=no
case "$ac_cv_func___adjtimex" in
yes)
ac_cv_var_ntp_syscalls=libc
;;
*) case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime" in
yesyes)
ac_cv_var_ntp_syscalls=libc
;;
*) AC_EGREP_CPP(yes,
[#include <sys/syscall.h>
#if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
yes
#endif
], ac_cv_var_ntp_syscalls=kernel)
;;
esac
;;
esac])
case "$ac_cv_var_ntp_syscalls" in
libc)
2002-11-04 19:36:11 +00:00
AC_DEFINE(NTP_SYSCALLS_LIBC, 1, [Do we have ntp_{adj,get}time in libc?])
1999-12-09 13:01:21 +00:00
;;
kernel)
2002-11-04 19:36:11 +00:00
AC_DEFINE(NTP_SYSCALLS_STD, 1, [Do we have ntp_{adj,get}time in the kernel?])
1999-12-09 13:01:21 +00:00
;;
*)
;;
esac
AC_CACHE_CHECK(if sys/timex.h has STA_FLL, ac_cv_var_sta_fll,
[AC_EGREP_CPP(yes,
[#include <sys/timex.h>
#ifdef STA_FLL
yes
#endif
], ac_cv_var_sta_fll=yes, ac_cv_var_sta_fll=no)])
AC_CACHE_CHECK(if we have kernel PLL support, ac_cv_var_kernel_pll,
[dnl ac_cv_var_ntp_syscalls is {no,libc,kernel}
case "$ac_cv_header_sys_timex_h$ac_cv_struct_ntptimeval$ac_cv_var_sta_fll$ac_cv_var_ntp_syscalls" in
*no*)
ac_cv_var_kernel_pll=no
;;
*) ac_cv_var_kernel_pll=yes
;;
esac])
case "$ac_cv_var_kernel_pll" in
yes)
2002-11-04 19:36:11 +00:00
AC_DEFINE(KERNEL_PLL, 1, [Does the kernel support precision time discipline?])
1999-12-09 13:01:21 +00:00
;;
esac
AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer,
[ans=no
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-fujitsu-uxp*)
ans=yes
;;
*-ncr-sysv4*)
ans=yes
;;
*-univel-sysv*)
ans=yes
;;
esac
ac_cv_var_size_returned_in_buffer=$ans])
case "$ac_cv_var_size_returned_in_buffer" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(SIZE_RETURNED_IN_BUFFER, 1, [Does SIOCGIFCONF return size in the buffer?]) ;;
1999-12-09 13:01:21 +00:00
esac
dnl AC_CACHE_CHECK(if we want GDT surveying code, ac_cv_var_gdt_surveying,
dnl [AC_ARG_ENABLE(gdt-surveying, [ --enable-gdt-surveying - include GDT survey code],
dnl [ans=$enableval], [ans=no])
dnl ac_cv_var_gdt_surveying=$ans])
dnl case "$ac_cv_var_gdt_surveying" in
2002-11-04 19:36:11 +00:00
dnl yes) AC_DEFINE(GDT_SURVEYING, 1, [Include the GDT Surveying code?]) ;;
1999-12-09 13:01:21 +00:00
dnl esac
# Check for ioctls TIOCGPPSEV
AC_MSG_CHECKING(ioctl TIOCGPPSEV)
if test "$ac_cv_header_termios_h" = "yes"; then
AC_EGREP_CPP(yes,
[#include <termios.h>
#ifdef TIOCGPPSEV
yes
#endif
], ntp_ok=yes, ntp_ok=no)
else
ntp_ok=no
fi
if test "$ntp_ok" = "yes"; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_TIOCGPPSEV, 1, [Do we have the TIOCGPPSEV ioctl (Solaris)?])
1999-12-09 13:01:21 +00:00
ac_cv_var_oncore_ok=yes
fi
AC_MSG_RESULT($ntp_ok)
# Check for ioctls TIOCSPPS
AC_MSG_CHECKING(ioctl TIOCSPPS)
if test "$ac_cv_header_termios_h" = "yes"; then
AC_EGREP_CPP(yes,
[#include <termios.h>
#ifdef TIOCSPPS
yes
#endif
], ntp_ok=yes, ntp_ok=no)
else
ntp_ok=no
fi
if test "$ntp_ok" = "yes"; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_TIOCSPPS, 1, [Do we have the TIOCSPPS ioctl (Solaris)?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
# Check for ioctls CIOGETEV
AC_MSG_CHECKING(ioctl CIOGETEV)
if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
AC_EGREP_CPP(yes,
[#include <sys/ppsclock.h>
#ifdef CIOGETEV
yes
#endif
], ntp_ok=yes, ntp_ok=no)
else
ntp_ok=no
fi
if test "$ntp_ok" = "yes"; then
ac_cv_var_oncore_ok=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_CIOGETEV, 1, [Do we have the CIOGETEV ioctl (SunOS, Linux)?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2001-08-29 14:35:15 +00:00
# ATOM/PPSAPI stuff.
# ATOM used to require struct timespec, but that's been fixed now.
# case "$ac_cv_struct_timespec" in
# 'yes')
# ac_cv_var_atom_ok=yes
# ;;
# esac
ac_cv_var_atom_ok=yes
1999-12-09 13:01:21 +00:00
# Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
2001-08-29 14:35:15 +00:00
# The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
# The PPSAPI needs ATOM
# The PPSAPI needs struct timespec.
case "$ac_cv_c_inline$ac_cv_struct_timespec$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h" in
inlineyes*yes*)
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_PPSAPI, 1, [Do we have the PPS API per the Draft RFC?])
1999-12-09 13:01:21 +00:00
ac_cv_var_oncore_ok=yes
2002-11-04 19:36:11 +00:00
ac_cv_var_ripe_ncc_ok=yes
2004-07-20 15:01:56 +00:00
ac_cv_var_jupiter_ok=yes
1999-12-09 13:01:21 +00:00
;;
esac
# Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
AC_CHECK_HEADER(linux/serial.h)
AC_MSG_CHECKING(ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG)
case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
AC_EGREP_CPP(yes,
[#include <sys/time.h>
typedef int u_int;
#include <sys/ppsclock.h>
#include <linux/serial.h>
#ifdef TIOCGSERIAL
#ifdef TIOCSSERIAL
#ifdef ASYNC_PPS_CD_POS
#ifdef ASYNC_PPS_CD_NEG
#ifdef CIOGETEV
yes
#endif
#endif
#endif
#endif
#endif
], ntp_ok=yes)
;;
*)
ntp_ok=no
;;
esac
if test "$ntp_ok" = "yes"; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(HAVE_TIO_SERIAL_STUFF, 1, [Do we have the TIO serial stuff?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2000-01-28 14:55:50 +00:00
# Check for SHMEM_STATUS support
AC_MSG_CHECKING(SHMEM_STATUS support)
case "$ac_cv_header_sys_mman_h" in
yes) ntp_ok=yes ;;
*) ntp_ok=no ;;
esac
if test "$ntp_ok" = "yes"; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(ONCORE_SHMEM_STATUS, 1, [Do we have support for SHMEM_STATUS?])
2000-01-28 14:55:50 +00:00
fi
AC_MSG_RESULT($ntp_ok)
1999-12-09 13:01:21 +00:00
dnl dnl These are for OPT_PROGRAMS in authstuff/
dnl AC_SUBST(AUTHCERT)
dnl AC_SUBST(AUTHSPEED)
dnl AC_SUBST(MD5DRIVER)
dnl AC_SUBST(KEYPARITY)
dnl AC_SUBST(MAKEIPFP)
dnl AC_SUBST(MAKEPC1)
dnl AC_SUBST(MAKEPC2)
dnl AC_SUBST(MAKESP)
dnl AC_SUBST(MKRANDKEYS)
dnl AC_SUBST(OMAKEIPFP)
dnl AC_SUBST(UNIXCERT)
ntp_refclock=no
# HPUX only, and by explicit request
AC_MSG_CHECKING(Datum/Bancomm bc635/VME interface)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(BANCOMM,
AC_HELP_STRING([--enable-BANCOMM], [- Datum/Bancomm bc635/VME interface]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=no])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_BANC, 1, [Datum/Bancomm bc635/VME interface?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
case "$ntp_ok$host" in
1999-12-09 13:01:21 +00:00
yes*-*-hpux*) ;;
2001-08-29 14:35:15 +00:00
yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1999-12-09 13:01:21 +00:00
esac
#HPUX only, and only by explicit request
AC_MSG_CHECKING(TrueTime GPS receiver/VME interface)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(GPSVME,
AC_HELP_STRING([--enable-GPSVME], [- TrueTime GPS receiver/VME interface]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=no])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_GPSVME, 1, [TrueTime GPS receiver/VME interface?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
case "$ntp_ok$host" in
1999-12-09 13:01:21 +00:00
yes*-*-hpux*) ;;
2001-08-29 14:35:15 +00:00
yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1999-12-09 13:01:21 +00:00
esac
AC_MSG_CHECKING(for PCL720 clock support)
case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
yesyesyes)
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_PPS720, 1, [PCL 720 clock support])
1999-12-09 13:01:21 +00:00
ans=yes
;;
*)
ans=no
;;
esac
AC_MSG_RESULT($ans)
AC_MSG_CHECKING(for default inclusion of all suitable non-PARSE clocks)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(all-clocks,
AC_HELP_STRING([--enable-all-clocks], [+ include all suitable non-PARSE clocks:]),
1999-12-09 13:01:21 +00:00
[ntp_eac=$enableval], [ntp_eac=yes])
AC_MSG_RESULT($ntp_eac)
AC_MSG_CHECKING(if we have support for PARSE clocks)
2001-08-29 14:35:15 +00:00
case "$ac_cv_var_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
yes*yes*)
1999-12-09 13:01:21 +00:00
ntp_canparse=yes
;;
*) ntp_canparse=no
;;
esac
AC_MSG_RESULT($ntp_canparse)
2000-01-28 14:55:50 +00:00
AC_MSG_CHECKING([if we have support for audio clocks])
2004-07-20 15:01:56 +00:00
case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
2001-08-29 14:35:15 +00:00
*yes*)
ntp_canaudio=yes
AC_DEFINE(HAVE_AUDIO, , [Do we have audio support?])
;;
*) ntp_canaudio=no ;;
2000-01-28 14:55:50 +00:00
esac
AC_MSG_RESULT($ntp_canaudio)
2004-07-20 15:01:56 +00:00
AC_MSG_CHECKING([if we have support for the SHM refclock interface])
case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
yesyes)
ntp_canshm=yes
;;
*) ntp_canshm=no ;;
esac
AC_MSG_RESULT($ntp_canshm)
1999-12-09 13:01:21 +00:00
# Requires modem control
AC_MSG_CHECKING(ACTS modem service)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(ACTS,
2004-07-20 15:01:56 +00:00
AC_HELP_STRING([--enable-ACTS], [s ACTS modem service]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
[AC_EGREP_CPP(yes,
[#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef TIOCMBIS
yes
#endif
], ntp_ok=$ntp_eac, ntp_ok=no)])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_ACTS, 1, [ACTS modem service])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(Arbiter 1088A/B GPS receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(ARBITER,
AC_HELP_STRING([--enable-ARBITER], [+ Arbiter 1088A/B GPS receiver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_ARBITER, 1, [Arbiter 1088A/B GPS receiver])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(Arcron MSF receiver)
2002-11-04 19:36:11 +00:00
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
AC_DEFINE(CLOCK_ARCRON_MSF, 1, [ARCRON support?])
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]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_AS2201, 1, [Austron 2200A/2201A GPS receiver?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2001-08-29 14:35:15 +00:00
AC_MSG_CHECKING(ATOM PPS interface)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(ATOM,
AC_HELP_STRING([--enable-ATOM], [s ATOM PPS interface]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2001-08-29 14:35:15 +00:00
case "$ac_cv_var_atom_ok" in
no) ntp_ok=no ;;
esac
1999-12-09 13:01:21 +00:00
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_ATOM, 1, [PPS interface?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
AC_MSG_CHECKING(Chrono-log K-series WWVB receiver)
AC_ARG_ENABLE(CHRONOLOG,
AC_HELP_STRING([--enable-CHRONOLOG], [+ Chrono-log K-series WWVB receiver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_CHRONOLOG, 1, [Chronolog K-series WWVB receiver?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(CHU modem/decoder)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(CHU,
2004-07-20 15:01:56 +00:00
AC_HELP_STRING([--enable-CHU], [+ CHU modem/decoder]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_CHU, 1, [CHU modem/decoder])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
ac_refclock_chu=$ntp_ok
AC_MSG_CHECKING(CHU audio/decoder)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(AUDIO-CHU,
AC_HELP_STRING([--enable-AUDIO-CHU], [s CHU audio/decoder]),
2000-01-28 14:55:50 +00:00
[ntp_ok=$enableval],
[case "$ntp_eac$ac_refclock_chu$ntp_canaudio" in
*no*) ntp_ok=no ;;
*) ntp_ok=yes ;;
esac])
1999-12-09 13:01:21 +00:00
if test "$ntp_ok" = "yes"; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(AUDIO_CHU, 1, [CHU audio/decoder?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2000-01-28 14:55:50 +00:00
# We used to check for sunos/solaris target...
case "$ntp_ok$ac_refclock_chu$ntp_canaudio" in
2001-08-29 14:35:15 +00:00
yes*no*) AC_MSG_WARN(*** But the expected answer is...no ***) ;;
1999-12-09 13:01:21 +00:00
esac
# Not under HP-UX
AC_MSG_CHECKING(Datum Programmable Time System)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(DATUM,
AC_HELP_STRING([--enable-DATUM], [s Datum Programmable Time System]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
[case "$ac_cv_header_termios_h" in
yes)
ntp_ok=$ntp_eac
;;
*) ntp_ok=no
;;
esac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_DATUM, 1, [Datum Programmable Time System?])
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, 1, [Dumb generic hh:mm:ss local clock?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2000-01-28 14:55:50 +00:00
AC_MSG_CHECKING(Forum Graphic GPS)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(FG,
AC_HELP_STRING([--enable-FG], [+ Forum Graphic GPS]),
2000-01-28 14:55:50 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_FG, 1, [Forum Graphic GPS datating station driver?])
2000-01-28 14:55:50 +00:00
fi
AC_MSG_RESULT($ntp_ok)
1999-12-09 13:01:21 +00:00
# Requires modem control
AC_MSG_CHECKING(Heath GC-1000 WWV/WWVH receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(HEATH,
AC_HELP_STRING([--enable-HEATH], [s Heath GC-1000 WWV/WWVH receiver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
[AC_EGREP_CPP(yes,
[#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef TIOCMBIS
yes
#endif
], ntp_ok=$ntp_eac, ntp_ok=no)])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_HEATH, 1, [Heath GC-1000 WWV/WWVH receiver?])
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(for hopf serial clock device)
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, 1, [HOPF serial clock device?])
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(for hopf PCI clock 6039)
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, 1, [HOPF PCI clock device?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(HP 58503A GPS receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(HPGPS,
AC_HELP_STRING([--enable-HPGPS], [+ HP 58503A GPS receiver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_HPGPS, 1, [HP 58503A GPS receiver?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
AC_MSG_CHECKING(IRIG audio decoder)
AC_ARG_ENABLE(IRIG,
AC_HELP_STRING([--enable-IRIG], [s IRIG audio decoder]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
2000-01-28 14:55:50 +00:00
[case "$ntp_eac$ntp_canaudio" in
*no*) ntp_ok=no ;;
*) ntp_ok=yes ;;
1999-12-09 13:01:21 +00:00
esac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_IRIG, 1, [IRIG audio decoder?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2000-01-28 14:55:50 +00:00
case "$ntp_ok$ntp_canaudio" in
2001-08-29 14:35:15 +00:00
yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1999-12-09 13:01:21 +00:00
esac
2002-10-29 19:58:12 +00:00
AC_MSG_CHECKING(for JJY receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(JJY,
AC_HELP_STRING([--enable-JJY], [+ JJY receiver]),
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2002-10-29 19:58:12 +00:00
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_JJY, 1, [JJY receiver?])
2002-10-29 19:58:12 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
AC_MSG_CHECKING(Rockwell Jupiter GPS receiver)
AC_ARG_ENABLE(JUPITER,
AC_HELP_STRING([--enable-JUPITER], [s Rockwell Jupiter GPS receiver]),
2004-07-20 15:01:56 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
case "$ac_cv_var_jupiter_ok" in
no) ntp_ok=no ;;
esac
2002-11-04 19:36:11 +00:00
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
AC_DEFINE(CLOCK_JUPITER, 1, [Rockwell Jupiter GPS clock?])
fi
AC_MSG_RESULT($ntp_ok)
1999-12-09 13:01:21 +00:00
AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(LEITCH,
AC_HELP_STRING([--enable-LEITCH], [+ Leitch CSD 5300 Master Clock System Driver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_LEITCH, 1, [Leitch CSD 5300 Master Clock System Driver?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(local clock reference)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(LOCAL-CLOCK,
AC_HELP_STRING([--enable-LOCAL-CLOCK], [+ local clock reference]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_LOCAL, 1, [local clock reference?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(EES M201 MSF receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(MSFEES,
AC_HELP_STRING([--enable-MSFEES], [+ EES M201 MSF receiver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_MSFEES, 1, [EES M201 MSF receiver])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
# Not Ultrix
AC_MSG_CHECKING(Magnavox MX4200 GPS receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(MX4200,
AC_HELP_STRING([--enable-MX4200 ], [s Magnavox MX4200 GPS receiver]),
1999-12-09 13:01:21 +00:00
[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
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_MX4200, 1, [Magnavox MX4200 GPS receiver])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
case "$ntp_ok$host" in
2001-08-29 14:35:15 +00:00
yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1999-12-09 13:01:21 +00:00
esac
2002-11-04 19:36:11 +00:00
AC_MSG_CHECKING(for NeoClock4X receiver)
AC_ARG_ENABLE(NEOCLOCK4X,
2004-07-20 15:01:56 +00:00
AC_HELP_STRING([--enable-NEOCLOCK4X], [+ NeoClock4X DCF77 / TDF receiver]),
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2002-11-04 19:36:11 +00:00
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
fi
AC_MSG_RESULT($ntp_ok)
1999-12-09 13:01:21 +00:00
AC_MSG_CHECKING(NMEA GPS receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(NMEA,
AC_HELP_STRING([--enable-NMEA], [+ NMEA GPS receiver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_NMEA, 1, [NMEA GPS receiver])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(for ONCORE Motorola VP/UT Oncore GPS)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(ONCORE,
AC_HELP_STRING([--enable-ONCORE], [s Motorola VP/UT Oncore GPS receiver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
case "$ac_cv_var_oncore_ok" in
no) ntp_ok=no ;;
esac
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_ONCORE, 1, [Motorola UT Oncore GPS])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(for Palisade clock)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(PALISADE,
2004-07-20 15:01:56 +00:00
AC_HELP_STRING([--enable-PALISADE], [s Palisade clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
[case "$ac_cv_header_termios_h" in
yes)
ntp_ok=$ntp_eac
;;
*) ntp_ok=no
;;
esac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_PALISADE, 1, [Palisade clock])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
AC_MSG_CHECKING(Conrad parallel port radio clock)
AC_ARG_ENABLE(PCF,
AC_HELP_STRING([--enable-PCF ], [+ Conrad parallel port radio clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_PCF, 1, [Conrad parallel port radio clock])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
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])
1999-12-09 13:01:21 +00:00
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_PST, 1, [PST/Traconex 1020 WWV/WWVH receiver])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
# Requires modem control
AC_MSG_CHECKING(PTB modem service)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(PTBACTS,
AC_HELP_STRING([--enable-PTBACTS], [s PTB modem service]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
[AC_EGREP_CPP(yes,
[#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef TIOCMBIS
yes
#endif
], ntp_ok=$ntp_eac, ntp_ok=no)])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_PTBACTS, 1, [PTB modem service])
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(RIPENCC specific Trimble driver)
AC_ARG_ENABLE(RIPENCC,
AC_HELP_STRING([--enable-RIPENCC], [- RIPENCC specific Trimble driver]),
[ntp_ok=$enableval], [ntp_ok=no])
# 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
case "$ac_cv_var_ripe_ncc_ok" in
no) ntp_ok=no ;;
esac
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
AC_DEFINE(CLOCK_RIPENCC, ,[RIPE NCC Trimble clock])
fi
AC_MSG_RESULT($ntp_ok)
2004-07-20 15:01:56 +00:00
# Danny Meyer says SHM compiles (with a few warnings) under Win32.
# For *IX, we need sys/ipc.h and sys/shm.h.
AC_MSG_CHECKING(for SHM clock attached thru shared memory)
AC_ARG_ENABLE(SHM,
AC_HELP_STRING([--enable-SHM], [s SHM clock attached thru shared memory]),
[ntp_ok=$enableval],
[case "$ntp_eac$ntp_canshm" in
*no*) ntp_ok=no ;;
*) ntp_ok=yes ;;
esac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
AC_DEFINE(CLOCK_SHM, 1, [clock thru shared memory])
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
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, 1, [Spectracom 8170/Netclock/2 WWVB receiver])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(KSI/Odetics TPRO/S GPS receiver/IRIG interface)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(TPRO,
AC_HELP_STRING([--enable-TPRO], [s KSI/Odetics TPRO/S GPS receiver/IRIG interface]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
[case "$ac_cv_header_sys_tpro_h" in
yes)
ntp_ok=$ntp_eac
;;
*) ntp_ok=no
;;
esac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_TPRO, 1, [KSI/Odetics TPRO/S GPS receiver/IRIG interface])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ac_cv_header_sys_tpro" in
2001-08-29 14:35:15 +00:00
yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1999-12-09 13:01:21 +00:00
esac
AC_MSG_CHECKING(TRAK 8810 GPS receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(TRAK,
AC_HELP_STRING([--enable-TRAK], [+ TRAK 8810 GPS receiver]),
2000-01-28 14:55:50 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_TRAK, 1, [TRAK 8810 GPS receiver])
2000-01-28 14:55:50 +00:00
fi
AC_MSG_RESULT($ntp_ok)
1999-12-09 13:01:21 +00:00
# Not on a vax-dec-bsd
AC_MSG_CHECKING(Kinemetrics/TrueTime receivers)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(TRUETIME,
AC_HELP_STRING([--enable-TRUETIME], [s Kinemetrics/TrueTime receivers]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
2002-11-04 19:36:11 +00:00
[case "$host" in
1999-12-09 13:01:21 +00:00
vax-dec-bsd)
ntp_ok=no
;;
*)
ntp_ok=$ntp_eac
;;
esac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_TRUETIME, 1, [Kinemetrics/TrueTime receivers])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
case "$ntp_ok$host" in
2001-08-29 14:35:15 +00:00
yesvax-dec-bsd) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
1999-12-09 13:01:21 +00:00
esac
2002-10-29 19:58:12 +00:00
AC_MSG_CHECKING(TrueTime 560 IRIG-B decoder)
AC_ARG_ENABLE(TT560,
2002-11-04 19:36:11 +00:00
AC_HELP_STRING([--enable-TT560], [- TrueTime 560 IRIG-B decoder]),
2002-10-29 19:58:12 +00:00
[ntp_ok=$enableval], [ntp_ok=no])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
AC_DEFINE(CLOCK_TT560, , [TrueTime 560 IRIG-B decoder?])
fi
AC_MSG_RESULT($ntp_ok)
2000-01-28 14:55:50 +00:00
AC_MSG_CHECKING(Ultralink M320 WWVB receiver)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(ULINK,
AC_HELP_STRING([--enable-ULINK], [+ Ultralink WWVB receiver]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2004-07-20 15:01:56 +00:00
AC_DEFINE(CLOCK_ULINK, 1, [Ultralink M320 WWVB receiver?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
# Requires modem control
AC_MSG_CHECKING(USNO modem service)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(USNO,
AC_HELP_STRING([--enable-USNO], [s USNO modem service]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval],
[AC_EGREP_CPP(yes,
[#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef TIOCMBIS
yes
#endif
], ntp_ok=$ntp_eac, ntp_ok=no)])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_USNO, 1, [USNO modem service])
fi
AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(WWV receiver)
AC_ARG_ENABLE(WWV,
2004-07-20 15:01:56 +00:00
AC_HELP_STRING([--enable-WWV], [s WWV Audio receiver]),
2002-11-04 19:36:11 +00:00
[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, 1, [WWV audio driver])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
2002-11-04 19:36:11 +00:00
case "$ntp_ok$ntp_canaudio" in
yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
esac
1999-12-09 13:01:21 +00:00
2002-10-29 19:58:12 +00:00
AC_MSG_CHECKING(for Zyfer receiver)
AC_ARG_ENABLE(ZYFER,
AC_HELP_STRING([--enable-ZYFER], [+ Zyfer GPStarplus receiver]),
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
AC_DEFINE(CLOCK_ZYFER, 1, [Zyfer GPStarplus])
fi
AC_MSG_RESULT($ntp_ok)
1999-12-09 13:01:21 +00:00
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],
[case "$ntp_eac" in
yes) ntp_eapc=$ntp_canparse ;;
*) ntp_eapc=no ;;
esac
ntp_eapc=no])
AC_MSG_RESULT($ntp_eapc)
case "$ntp_eac$ntp_eapc$ntp_canparse" in
noyes*)
AC_MSG_ERROR("--enable-parse-clocks" requires "--enable-all-clocks".)
;;
yesyesno)
AC_MSG_ERROR(You said "--enable-parse-clocks" but PARSE isn't supported on this platform!)
;;
*) ;;
esac
ntp_libparse=no
ntp_parseutil=no
ntp_rawdcf=no
AC_MSG_CHECKING(Diem Computime Radio Clock)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(COMPUTIME,
AC_HELP_STRING([--enable-COMPUTIME], [s Diem Computime Radio Clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_COMPUTIME, 1, [Diems Computime Radio Clock?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(ELV/DCF7000 clock)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(DCF7000,
AC_HELP_STRING([--enable-DCF7000], [s ELV/DCF7000 clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_DCF7000, 1, [ELV/DCF7000 clock?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(HOPF 6021 clock)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(HOPF6021,
AC_HELP_STRING([--enable-HOPF6021 ], [s HOPF 6021 clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_HOPF6021, 1, [HOPF 6021 clock?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(Meinberg clocks)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(MEINBERG,
AC_HELP_STRING([--enable-MEINBERG], [s Meinberg clocks]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_MEINBERG, 1, [Meinberg clocks])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(DCF77 raw time code)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(RAWDCF,
AC_HELP_STRING([--enable-RAWDCF], [s DCF77 raw time code]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_parseutil=yes
ntp_refclock=yes
ntp_rawdcf=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_RAWDCF, 1, [DCF77 raw time code])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
case "$ntp_rawdcf" in
yes)
AC_CACHE_CHECK(if we must enable parity for RAWDCF,
ac_cv_var_rawdcf_parity,
[ans=no
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-linux*)
ans=yes
;;
esac
ac_cv_var_rawdcf_parity=$ans])
case "$ac_cv_var_rawdcf_parity" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(RAWDCF_NO_IGNPAR, 1, [Should we not IGNPAR (Linux)?]) ;;
1999-12-09 13:01:21 +00:00
esac
;;
*) # HMS: Is this a good idea?
ac_cv_var_rawdcf_parity=no
;;
esac
AC_MSG_CHECKING(RCC 8000 clock)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(RCC8000,
AC_HELP_STRING([--enable-RCC8000], [s RCC 8000 clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_RCC8000, 1, [RCC 8000 clock])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(Schmid DCF77 clock)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(SCHMID,
AC_HELP_STRING([--enable-SCHMID ], [s Schmid DCF77 clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_SCHMID, 1, [Schmid DCF77 clock])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(Trimble GPS receiver/TAIP protocol)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(TRIMTAIP,
AC_HELP_STRING([--enable-TRIMTAIP], [s Trimble GPS receiver/TAIP protocol]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_TRIMTAIP, 1, [Trimble GPS receiver/TAIP protocol])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(Trimble GPS receiver/TSIP protocol)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(TRIMTSIP,
AC_HELP_STRING([--enable-TRIMTSIP], [s Trimble GPS receiver/TSIP protocol]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_TRIMTSIP, 1, [Trimble GPS receiver/TSIP protocol])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(WHARTON 400A Series clock)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(WHARTON,
AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_MSG_CHECKING(VARITEXT clock)
2002-11-04 19:36:11 +00:00
AC_ARG_ENABLE(VARITEXT,
AC_HELP_STRING([--enable-VARITEXT], [s VARITEXT clock]),
1999-12-09 13:01:21 +00:00
[ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_VARITEXT, 1, [VARITEXT protocol])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_ok)
case "$ntp_ok$ntp_canparse" in
yesno)
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
;;
esac
AC_SUBST(LIBPARSE)
AC_SUBST(MAKE_LIBPARSE)
AC_SUBST(MAKE_LIBPARSE_KERNEL)
AC_SUBST(MAKE_CHECK_Y2K)
AC_MSG_CHECKING(if we need to make and use the parse libraries)
ans=no
case "$ntp_libparse" in
yes)
ans=yes
2002-11-04 19:36:11 +00:00
AC_DEFINE(CLOCK_PARSE, 1, [PARSE driver interface])
1999-12-09 13:01:21 +00:00
LIBPARSE=../libparse/libparse.a
MAKE_LIBPARSE=libparse.a
MAKE_CHECK_Y2K=check_y2k
2002-11-04 19:36:11 +00:00
AC_DEFINE(PPS_SAMPLE, 1, [PPS auxiliary interface for ATOM?])
1999-12-09 13:01:21 +00:00
AC_DEFINE(CLOCK_ATOM)
;;
esac
AC_MSG_RESULT($ans)
2004-07-20 15:01:56 +00:00
# AC_SUBST(RSAOBJS)
# AC_SUBST(RSASRCS)
# AC_SUBST(RSADIR)
# AC_SUBST(RSAREF)
# AC_SUBST(LIBRSAREF)
# AC_SUBST(MAKE_LIBRSAREF)
2001-08-29 14:35:15 +00:00
AC_SUBST(OPENSSL)
AC_SUBST(OPENSSL_INC)
AC_SUBST(OPENSSL_LIB)
2004-07-20 15:01:56 +00:00
AC_SUBST(MAKE_NTP_KEYGEN)
2001-08-29 14:35:15 +00:00
AC_MSG_CHECKING(for openssl library directory)
AC_ARG_WITH(openssl-libdir,
AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]),
[ans=$withval], [ans=yes])
case "$ans" in
no) ;;
yes) # Look in:
2004-07-20 15:01:56 +00:00
ans="/usr/lib /usr/lib/openssl /usr/local/lib /usr/local/ssl/lib"
2001-08-29 14:35:15 +00:00
;;
*) # Look where they said
;;
esac
case "$ans" in
no) ;;
*) # Look for libcrypto.a and libssl.a:
for i in $ans no
do
2004-07-20 15:01:56 +00:00
case "$host" in
*-*-darwin*)
test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
;;
*)
test -f $i/libcrypto.a -a -f $i/libssl.a && break
;;
esac
2001-08-29 14:35:15 +00:00
done
case "$i" in
no)
ans=no
OPENSSL_LIB=
;;
*) ans=$i
OPENSSL_LIB=$ans
;;
esac
;;
esac
AC_MSG_RESULT($ans)
AC_MSG_CHECKING(for openssl include directory)
AC_ARG_WITH(openssl-incdir,
AC_HELP_STRING([--with-openssl-incdir], [+ =/something/reasonable]),
[ans=$withval], [ans=yes])
case "$ans" in
no) ;;
yes) # look in:
ans="/usr/include /usr/local/include /usr/local/ssl/include"
;;
*) # Look where they said
;;
esac
case "$ans" in
no) ;;
*) # look for openssl/opensslconf.h:
for i in $ans no
do
test -f $i/openssl/opensslconf.h && break
done
case "$i" in
no)
ans=no
OPENSSL_INC=
;;
*) ans=$i
OPENSSL_INC=$ans
;;
esac
;;
esac
AC_MSG_RESULT($ans)
AC_ARG_WITH(crypto,
2004-07-20 15:01:56 +00:00
AC_HELP_STRING([--with-crypto], [+ =openssl]),
2001-08-29 14:35:15 +00:00
[ans=$withval], [ans=yes])
case "$ans" in
no) ;;
2004-07-20 15:01:56 +00:00
yes|openssl)
if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
then
2001-08-29 14:35:15 +00:00
ans=no
2004-07-20 15:01:56 +00:00
else
# We have OpenSSL inc/lib - use them.
ans=openssl
CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
AC_SUBST(LCRYPTO, [-lcrypto])
MAKE_NTP_KEYGEN=ntp-keygen
AC_DEFINE(OPENSSL, , [Use OpenSSL?])
AC_CHECK_FUNCS(EVP_md2 EVP_mdc2)
fi
2001-08-29 14:35:15 +00:00
;;
esac
2002-11-04 19:36:11 +00:00
AC_MSG_CHECKING(for the level of crypto support)
2001-08-29 14:35:15 +00:00
AC_MSG_RESULT($ans)
AC_MSG_CHECKING(if we want to compile with ElectricFence)
2004-07-20 15:01:56 +00:00
AC_ARG_WITH(electricfence,
AC_HELP_STRING([--with-electricfence], [- compile with ElectricFence malloc debugger]),
2001-08-29 14:35:15 +00:00
[ans=$withval], [ans=no])
case "$ans" in
no) ;;
*)
LIBS="$LIBS \${top_builddir}/ElectricFence/libefence.a"
EF_PROGS="eftest tstheap"
AC_SUBST(EF_PROGS)
EF_LIBS=libefence.a
AC_SUBST(EF_LIBS)
1999-12-09 13:01:21 +00:00
ans=yes
2001-08-29 14:35:15 +00:00
;;
esac
1999-12-09 13:01:21 +00:00
AC_MSG_RESULT($ans)
2004-07-20 15:01:56 +00:00
AC_MSG_CHECKING(if we want to try SNTP)
AC_ARG_WITH(sntp,
AC_HELP_STRING([--with-sntp], [- Build SNTP?]),
[ans=$withval], [ans=no])
case "$ans" in
no) ;;
*)
MAKE_SNTP="sntp"
AC_SUBST(MAKE_SNTP)
ans=yes
;;
esac
AC_MSG_RESULT($ans)
1999-12-09 13:01:21 +00:00
AC_SUBST(TESTDCF)
AC_SUBST(DCFD)
AC_MSG_CHECKING(if we can make dcf parse utilities)
ans=no
if test "$ntp_parseutil" = "yes"; then
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-sunos4*|*-*-solaris2*|*-*-linux*)
ans="dcfd testdcf"
DCFD=dcfd
TESTDCF=testdcf
;;
esac
fi
AC_MSG_RESULT($ans)
AC_SUBST(MAKE_PARSEKMODULE)
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)
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
sparc-*-sunos4*)
case "$ac_cv_var_kernel_pll" in
yes)
2002-11-04 19:36:11 +00:00
AC_DEFINE(PPS_SYNC, 1, [PARSE kernel PLL PPS support])
1999-12-09 13:01:21 +00:00
;;
esac
ans=parsestreams
MAKE_PARSEKMODULE=parsestreams.loadable_module.o
;;
sparc-*-solaris2*)
ans=parsesolaris
MAKE_PARSEKMODULE=parse
;;
esac
;;
esac
AC_MSG_RESULT($ans)
AC_MSG_CHECKING(if we need basic refclock support)
if test "$ntp_refclock" = "yes"; then
2002-11-04 19:36:11 +00:00
AC_DEFINE(REFCLOCK, 1, [Basic refclock support?])
1999-12-09 13:01:21 +00:00
fi
AC_MSG_RESULT($ntp_refclock)
dnl Things that can be made in clockstuff/
AC_SUBST(PROPDELAY) dnl Set to "propdelay"
AC_SUBST(CHUTEST) dnl Set to "chutest"
AC_SUBST(CLKTEST) dnl Set to "clktest"
AC_SUBST(MAKE_ADJTIMED)
AC_MSG_CHECKING(if we want HP-UX adjtimed support)
2002-11-04 19:36:11 +00:00
case "$host" in
2001-08-29 14:35:15 +00:00
*-*-hpux[[56789]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
*) ans=no
;;
esac
if test "$ans" = "yes"; then
MAKE_ADJTIMED=adjtimed
2002-11-04 19:36:11 +00:00
AC_DEFINE(NEED_HPUX_ADJTIME, 1, [Do we need HPUX adjtime() library support?])
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?])
1999-12-09 13:01:21 +00:00
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],
2001-08-29 14:35:15 +00:00
[case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
1999-12-09 13:01:21 +00:00
*yes*)
ans=yes
;;
*) ans=no
;;
esac
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-aix*)
#ans=no
;;
*-*-domainos) # Won't be found...
ans=no
;;
*-*-hpux*)
#ans=no
;;
2001-08-29 14:35:15 +00:00
*-*-irix[[456]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
*-*-linux*)
ans=no
;;
*-*-winnt3.5)
ans=no
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=no
;;
1999-12-09 13:01:21 +00:00
esac
])
ac_cv_var_can_kmem=$ans])
case "$ac_cv_var_can_kmem" in
*yes*) ;;
2002-11-04 19:36:11 +00:00
*) AC_DEFINE(NOKMEM, 1, [Should we NOT read /dev/kmem?]) ;;
1999-12-09 13:01:21 +00:00
esac
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],
2002-11-04 19:36:11 +00:00
[case "$host" in
1999-12-09 13:01:21 +00:00
i386-sequent-ptx*)
ans=no
;;
i386-unknown-osf1*)
ans=yes
;;
2001-08-29 14:35:15 +00:00
mips-sgi-irix[[456]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
*-fujitsu-uxp*)
ans=yes
;;
2004-07-20 15:01:56 +00:00
*-ibm-aix[[45]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
*-*-linux*)
ans=yes
;;
2004-07-20 15:01:56 +00:00
*-*-solaris2.[[01]])
1999-12-09 13:01:21 +00:00
ans=no
;;
*-*-solaris2*)
ans=yes
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=yes
;;
1999-12-09 13:01:21 +00:00
*) ans=no
;;
esac
])
ac_cv_var_adjtime_is_accurate=$ans])
case "$ac_cv_var_adjtime_is_accurate" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(ADJTIME_IS_ACCURATE, 1, [Is adjtime() accurate?]) ;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK([the name of 'tick' in the kernel],
ac_cv_var_nlist_tick,
2001-08-29 14:35:15 +00:00
[ans=_tick
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
m68*-hp-hpux*) # HP9000/300?
ans=_old_tick
;;
2001-08-29 14:35:15 +00:00
*-apple-aux[[23]]*)
1999-12-09 13:01:21 +00:00
ans=tick
;;
*-hp-hpux*)
ans=old_tick
;;
2004-07-20 15:01:56 +00:00
*-ibm-aix[[345]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*-*-ptx*)
ans=tick
;;
2001-08-29 14:35:15 +00:00
*-*-sco3.2v[[45]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
*-*-solaris2*)
ans=nsec_per_tick
;;
*-*-sysv4*)
ans=tick
;;
esac
ac_cv_var_nlist_tick=$ans])
case "$ac_cv_var_nlist_tick" in
''|no) ;; # HMS: I think we can only get 'no' here...
2002-11-04 19:36:11 +00:00
*) AC_DEFINE_UNQUOTED(K_TICK_NAME, "$ac_cv_var_nlist_tick", [What is the name of TICK in the kernel?]) ;;
1999-12-09 13:01:21 +00:00
esac
#
AC_CACHE_CHECK([for the units of 'tick'],
ac_cv_var_tick_nano,
2001-08-29 14:35:15 +00:00
[ans=usec
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-solaris2*)
ans=nsec
;;
esac
ac_cv_var_tick_nano=$ans])
case "$ac_cv_var_tick_nano" in
nsec)
2002-11-04 19:36:11 +00:00
AC_DEFINE(TICK_NANO, 1, [Is K_TICK_NAME in nanoseconds?])
1999-12-09 13:01:21 +00:00
;;
esac
#
AC_CACHE_CHECK([the name of 'tickadj' in the kernel],
ac_cv_var_nlist_tickadj,
2001-08-29 14:35:15 +00:00
[ans=_tickadj
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
m68*-hp-hpux*) # HP9000/300?
ans=_tickadj
;;
2001-08-29 14:35:15 +00:00
*-apple-aux[[23]]*)
1999-12-09 13:01:21 +00:00
ans=tickadj
;;
*-hp-hpux10*)
ans=no
;;
*-hp-hpux9*)
ans=no
;;
*-hp-hpux*)
ans=tickadj
;;
*-*-aix*)
ans=tickadj
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*-*-ptx*)
ans=tickadj
;;
*-*-sco3.2v4*)
ans=no
;;
*-*-sco3.2v5.0*)
ans=clock_drift
;;
*-*-solaris2*)
ans=no # hrestime_adj
;;
*-*-sysv4*)
ans=tickadj
;;
esac
ac_cv_var_nlist_tickadj=$ans])
case "$ac_cv_var_nlist_tickadj" in
''|no) ;; # HMS: I think we can only get 'no' here...
2002-11-04 19:36:11 +00:00
*) AC_DEFINE_UNQUOTED(K_TICKADJ_NAME, "$ac_cv_var_nlist_tickadj", [What is the name of TICKADJ in the kernel?]) ;;
1999-12-09 13:01:21 +00:00
esac
#
AC_CACHE_CHECK([for the units of 'tickadj'],
ac_cv_var_tickadj_nano,
2001-08-29 14:35:15 +00:00
[ans=usec
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-*-solaris2*)
ans=nsec
;;
esac
ac_cv_var_tickadj_nano=$ans])
case "$ac_cv_var_tickadj_nano" in
nsec)
2002-11-04 19:36:11 +00:00
AC_DEFINE(TICKADJ_NANO, 1, [Is K_TICKADJ_NAME in nanoseconds?])
1999-12-09 13:01:21 +00:00
;;
esac
#
AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel],
ac_cv_var_nlist_dosynctodr,
2002-11-04 19:36:11 +00:00
[case "$host" in
2001-08-29 14:35:15 +00:00
*-apple-aux[[23]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
*-sni-sysv*)
ans=dosynctodr
;;
*-*-aix*)
ans=dosynctodr
;;
*-*-hpux*)
ans=no
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*-*-nextstep*)
ans=_dosynctodr
;;
*-*-ptx*)
ans=doresettodr
;;
*-*-sco3.2v4*)
ans=no
;;
*-*-sco3.2v5*)
ans=track_rtc
;;
*-*-solaris2*)
ans=dosynctodr
;;
*-*-sysv4*)
ans=doresettodr
;;
*)
ans=_dosynctodr
;;
esac
ac_cv_var_nlist_dosynctodr=$ans])
case "$ac_cv_var_nlist_dosynctodr" in
no) ;;
2002-11-04 19:36:11 +00:00
*) AC_DEFINE_UNQUOTED(K_DOSYNCTODR_NAME, "$ac_cv_var_nlist_dosynctodr", [What is (probably) the name of DOSYNCTODR in the kernel?])
1999-12-09 13:01:21 +00:00
;;
esac
#
AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel],
ac_cv_var_nlist_noprintf,
2002-11-04 19:36:11 +00:00
[case "$host" in
2001-08-29 14:35:15 +00:00
*-apple-aux[[23]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
*-sni-sysv*)
ans=noprintf
;;
*-*-aix*)
ans=noprintf
;;
*-*-hpux*)
ans=no
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*-*-ptx*)
ans=noprintf
;;
*-*-nextstep*)
ans=_noprintf
;;
*-*-solaris2*)
ans=noprintf
;;
*-*-sysv4*)
ans=noprintf
;;
*)
ans=_noprintf
;;
esac
ac_cv_var_nlist_noprintf=$ans])
case "$ac_cv_var_nlist_noprintf" in
no) ;;
2002-11-04 19:36:11 +00:00
*) AC_DEFINE_UNQUOTED(K_NOPRINTF_NAME, "$ac_cv_var_nlist_noprintf", [What is (probably) the name of NOPRINTF in the kernel?])
1999-12-09 13:01:21 +00:00
;;
esac
dnl The tick/tickadj sections were written by Skippy, who never learned
dnl that it's impolite (horridly gross) to show your guts in public.
dnl tick tickadj
dnl 10000 80 Unixware
dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE
dnl 10000 150 sgi IRIX
dnl 1000000L/hz 1000 RS6000 && NOKMEM
dnl 1000000L/hz 668 DOMAINOS && NOKMEM
dnl 1000000L/hz 500/HZ other && NOKMEM
dnl txc.tick 1 Linux
dnl (every / 10) 50 WinNT - tickadj is roughly 500/hz
dnl 1000000L/hz (nlist) (Solaris && !ADJTIME_IS_ACCURATE),
dnl (RS6000 && !NOKMEM), SINIX MIPS
dnl But we'll only use these "values" if we can't find anything else.
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
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
XXX-*-pc-cygwin*)
;;
*-univel-sysv*)
ans=10000
;;
*-*-irix*)
ans=10000
;;
*-*-linux*)
ans=txc.tick
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*-*-winnt3.5)
ans='(every / 10)'
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=10000
;;
1999-12-09 13:01:21 +00:00
*)
ans='1000000L/hz'
;;
esac])
ac_cv_var_tick=$ans])
case "$ac_cv_var_tick" in
''|no) ;; # HMS: I think we can only get 'no' here...
2002-11-04 19:36:11 +00:00
*) AC_DEFINE_UNQUOTED(PRESET_TICK, $ac_cv_var_tick, [Preset a value for 'tick'?]) ;;
1999-12-09 13:01:21 +00:00
esac
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'
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-fujitsu-uxp*)
case "$ac_cv_var_adjtime_is_accurate" in
yes) ans='tick/16' ;;
esac
;;
XXX-*-pc-cygwin*)
ans=no
;;
*-univel-sysv*)
ans=80
;;
*-*-aix*)
case "$ac_cv_var_can_kmem" in
no) ans=1000 ;;
esac
;;
*-*-domainos) # Skippy: won't be found...
case "$ac_cv_var_can_kmem" in
no) ans=668 ;;
esac
;;
*-*-hpux*)
case "$ac_cv_var_adjtime_is_accurate" in
yes) ans='tick/16' ;;
esac
;;
*-*-irix*)
ans=150
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
ans=no
;;
1999-12-09 13:01:21 +00:00
*-*-sco3.2v5.0*)
ans=10000L/hz
;;
*-*-solaris2*)
case "$ac_cv_var_adjtime_is_accurate" in
yes)
#ans='tick/16'
;;
esac
;;
*-*-winnt3.5)
ans=50
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=150
;;
1999-12-09 13:01:21 +00:00
esac])
ac_cv_var_tickadj=$ans])
case "$ac_cv_var_tickadj" in
''|no) ;; # HMS: I think we can only get 'no' here...
2002-11-04 19:36:11 +00:00
*) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $ac_cv_var_tickadj, [Preset a value for 'tickadj'?]) ;;
1999-12-09 13:01:21 +00:00
esac
# Newer versions of ReliantUNIX round adjtime() values down to
# 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.
2002-11-04 19:36:11 +00:00
case "$host" in
mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX_CLOCK, 1, [Do we want the ReliantUNIX clock hacks?]) ;;
1999-12-09 13:01:21 +00:00
esac
2002-11-04 19:36:11 +00:00
case "$host" in
*-*-sco3.2v5*) AC_DEFINE(SCO5_CLOCK, 1, [Do we want the SCO clock hacks?]) ;;
1999-12-09 13:01:21 +00:00
esac
ac_cv_make_tickadj=yes
case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in
nonono) # Don't read KMEM, no presets. Bogus.
AC_MSG_WARN(Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj.)
ac_cv_make_tickadj=no
;;
nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
AC_MSG_WARN(Can't read kmem but no PRESET_TICK. No tickadj.)
ac_cv_make_tickadj=no
;;
no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus.
AC_MSG_WARN(Can't read kmem but no PRESET_TICKADJ. No tickadj.)
ac_cv_make_tickadj=no
;;
no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool.
;;
yesnono) # Read KMEM, no presets. Cool.
;;
yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
AC_MSG_WARN(PRESET_TICKADJ is defined but not PRESET_TICK. Please report this.)
;;
yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool.
;;
yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
;;
*) # Generally bogus.
AC_MSG_ERROR(This shouldn't happen.)
;;
esac
2001-08-29 14:35:15 +00:00
AC_SUBST(MAKE_NTPTIME)
AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime,
2002-11-04 19:36:11 +00:00
[case "$host" in
2001-08-29 14:35:15 +00:00
*) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in
yesyes)
ans=yes
;;
*)
ans=no
;;
esac
;;
esac
ac_cv_make_ntptime=$ans])
case "$ac_cv_make_ntptime" in
yes)
MAKE_NTPTIME=ntptime
;;
esac
AC_SUBST(MAKE_TICKADJ)
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
mips-sni-sysv4*)
# tickadj is pretty useless on newer versions of ReliantUNIX
# Do not bother
ac_cv_make_tickadj=no
2001-08-29 14:35:15 +00:00
;;
*-*-irix*)
ac_cv_make_tickadj=no
;;
1999-12-09 13:01:21 +00:00
*-*-solaris2*)
# DLM says tickadj is a no-no starting with solaris2.5
2002-11-04 19:36:11 +00:00
case "$host" in
2004-07-20 15:01:56 +00:00
*-*-solaris2.1[[0-9]]*)
ac_cv_make_tickadj=no
;;
*-*-solaris2.[[0-4]]*) ;;
1999-12-09 13:01:21 +00:00
*) ac_cv_make_tickadj=no ;;
esac
2001-08-29 14:35:15 +00:00
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ac_cv_make_tickadj=no
;;
1999-12-09 13:01:21 +00:00
esac
AC_CACHE_CHECK(if we want and can make the tickadj utility, ac_cv_make_tickadj,
ac_cv_make_tickadj=yes)
case "$ac_cv_make_tickadj" in
yes)
MAKE_TICKADJ=tickadj
;;
esac
2001-08-29 14:35:15 +00:00
AC_SUBST(MAKE_TIMETRIM)
AC_CACHE_CHECK(if we want and can make the timetrim utility, ac_cv_make_timetrim,
2002-11-04 19:36:11 +00:00
[case "$host" in
2001-08-29 14:35:15 +00:00
*-*-irix*)
ac_cv_make_timetrim=yes
1999-12-09 13:01:21 +00:00
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ac_cv_make_timetrim=yes
;;
2001-08-29 14:35:15 +00:00
*)
ac_cv_make_timetrim=no
;;
esac])
case "$ac_cv_make_timetrim" in
1999-12-09 13:01:21 +00:00
yes)
2001-08-29 14:35:15 +00:00
MAKE_TIMETRIM=timetrim
1999-12-09 13:01:21 +00:00
;;
esac
2004-07-20 15:01:56 +00:00
AC_SUBST(MAKE_LIBNTPSIM)
AC_SUBST(MAKE_NTPDSIM)
AC_CACHE_CHECK([if we want to build the NTPD simulator], ac_cv_var_ntpd_sim,
[AC_ARG_ENABLE(simulator,
AC_HELP_STRING([--enable-simulator], [- build/install the NTPD simulator?]),
[ans=$enableval], [ans=no])
ac_cv_var_ntpd_sim=$ans])
case "$ac_cv_var_ntpd_sim" in
yes)
MAKE_NTPDSIM=ntpdsim
MAKE_LIBNTPSIM=libntpsim.a
;;
esac
1999-12-09 13:01:21 +00:00
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
2002-11-04 19:36:11 +00:00
case "$host" in
1999-12-09 13:01:21 +00:00
*-fujitsu-uxp*)
ans=yes
;;
*-univel-sysv*)
ans=yes
;;
*-*-aix3.2*)
ans=yes
;;
2004-07-20 15:01:56 +00:00
*-*-aix[[45]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
*-*-bsdi*)
ans=yes
;;
*-*-domainos)
ans=yes
;;
*-*-freebsd*)
ans=yes
;;
*-*-hpux*)
ans=yes
;;
*-*-irix6*)
ans=yes
;;
*-*-linux*)
ans=yes
;;
2002-10-29 19:58:12 +00:00
*-*-mpeix*)
ans=yes
;;
1999-12-09 13:01:21 +00:00
*-*-osf*)
ans=yes
;;
*-*-ptx*)
ans=yes
;;
*-*-solaris2*)
ans=yes
;;
*-*-sunos4*)
ans=yes
;;
2004-07-20 15:01:56 +00:00
*-*-unicosmp*)
ans=yes
;;
1999-12-09 13:01:21 +00:00
esac])
ac_cv_var_udp_wildcard_delivery=$ans])
case "$ac_cv_var_udp_wildcard_delivery" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(UDP_WILDCARD_DELIVERY, 1, [use UDP Wildcard Delivery?]) ;;
1999-12-09 13:01:21 +00:00
esac
2002-11-04 19:36:11 +00:00
case "$build" in
$host)
1999-12-09 13:01:21 +00:00
;;
2002-11-04 19:36:11 +00:00
*) case "$host" in
1999-12-09 13:01:21 +00:00
*-*-vxworks*)
LDFLAGS="$LDFLAGS -r"
;;
esac
;;
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],
2002-11-04 19:36:11 +00:00
[case "$host" in
2001-08-29 14:35:15 +00:00
*-apple-aux[[23]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
2001-08-29 14:35:15 +00:00
*-*-bsdi[[012]]*)
1999-12-09 13:01:21 +00:00
ans=no
;;
*-*-bsdi*)
ans=yes
;;
*-*-openvms*) # HMS: won't be found
ans=yes
;;
*) ans=no
;;
esac
])
ac_cv_var_slew_always=$ans])
case "$ac_cv_var_slew_always" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(SLEWALWAYS, 1, [Slew always?]) ;;
1999-12-09 13:01:21 +00:00
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],
2002-11-04 19:36:11 +00:00
[case "$host" in
1999-12-09 13:01:21 +00:00
*-sni-sysv*)
ans=yes
;;
*-univel-sysv*)
ans=no
;;
*-*-ptx*)
ans=yes
;;
2004-07-20 15:01:56 +00:00
*-*-solaris2.1[[0-9]]*)
ans-no
;;
2001-08-29 14:35:15 +00:00
*-*-solaris2.[[012]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
*-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
ans=yes
;;
*) ans=no
;;
esac
])
ac_cv_var_step_slew=$ans])
case "$ac_cv_var_step_slew" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(STEP_SLEW, 1, [Step, then slew the clock?]) ;;
1999-12-09 13:01:21 +00:00
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],
2002-11-04 19:36:11 +00:00
[case "$host" in
2001-08-29 14:35:15 +00:00
*-apple-aux[[23]]*)
1999-12-09 13:01:21 +00:00
ans=yes
;;
*) ans=no
;;
esac
])
ac_cv_var_ntpdate_step=$ans])
case "$ac_cv_var_ntpdate_step" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(FORCE_NTPDATE_STEP, 1, [force ntpdate to step the clock if !defined(STEP_SLEW) ?]) ;;
1999-12-09 13:01:21 +00:00
esac
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],
2002-11-04 19:36:11 +00:00
[case "$host" in
1999-12-09 13:01:21 +00:00
*-*-nextstep*)
ans=yes
;;
*-*-openvms*) # HMS: won't be found
ans=yes
;;
*) ans=no
;;
esac])
ac_cv_var_sync_todr=$ans])
case "$ac_cv_var_sync_todr" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(DOSYNCTODR, 1, [synch TODR hourly?]) ;;
1999-12-09 13:01:21 +00:00
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],
2002-11-04 19:36:11 +00:00
[case "$host" in
1999-12-09 13:01:21 +00:00
*-*-solaris2.6)
2001-08-29 14:35:15 +00:00
unamev=`uname -v`
case "$unamev" in
Generic_105181-*)
old_IFS="$IFS"
IFS="-"
set $unamev
IFS="$old_IFS"
if test "$2" -ge 17
then
# Generic_105181-17 and higher
ans=no
else
ans=yes
fi
;;
*) ans=yes
;;
esac
1999-12-09 13:01:21 +00:00
;;
*-*-solaris2.7)
2001-08-29 14:35:15 +00:00
unamev=`uname -v`
case "$unamev" in
Generic_106541-*)
old_IFS="$IFS"
IFS="-"
set $unamev
IFS="$old_IFS"
if test "$2" -ge 07
then
# Generic_106541-07 and higher
ans=no
else
ans=yes
fi
1999-12-09 13:01:21 +00:00
;;
*) ans=yes
;;
esac
;;
*) ans=no
;;
esac
])
ac_cv_var_kernel_fll_bug=$ans])
case "$ac_cv_var_kernel_fll_bug" in
2002-11-04 19:36:11 +00:00
yes) AC_DEFINE(KERNEL_FLL_BUG, 1, [Does the kernel have an FLL bug?]) ;;
1999-12-09 13:01:21 +00:00
esac
2004-07-20 15:01:56 +00:00
AC_CACHE_CHECK(if we should use the IRIG sawtooth filter, ac_cv_var_irig_sucks,
[AC_ARG_ENABLE(irig-sawtooth,
AC_HELP_STRING([--enable-irig-sawtooth], [s if we should enable the IRIG sawtooth filter]),
[ans=$enableval],
[case "$host" in
*-*-solaris2.[[89]])
ans=yes
;;
*-*-solaris2.1[[0-9]]*)
ans=yes
;;
*) ans=no
;;
esac
])
ac_cv_var_irig_sucks=$ans])
case "$ac_cv_var_irig_sucks" in
yes) AC_DEFINE(IRIG_SUCKS, 1, [Should we use the IRIG sawtooth filter?]) ;;
esac
AC_CACHE_CHECK(if we should enable NIST lockclock scheme, ac_cv_var_nist_lockclock,
[AC_ARG_ENABLE(nist,
AC_HELP_STRING([--enable-nist], [- if we should enable the NIST lockclock scheme]),
[ans=$enableval],[ans=no])
ac_cv_var_nist_lockclock=$ans])
case "$ac_cv_var_nist_lockclock" in
yes) AC_DEFINE(LOCKCLOCK, 1, [Should we align with the NIST lockclock scheme?]) ;;
esac
#
# ISC stuff
#
if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
AC_DEFINE(ISC_PLATFORM_HAVESALEN, ,[ISC: struct sockaddr as sa_len?])
fi
AC_MSG_CHECKING(for IPv6 structures)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>],
[struct sockaddr_in6 sin6; return (0);],
[AC_MSG_RESULT(yes)
found_ipv6=yes],
[AC_MSG_RESULT(no)
found_ipv6=no])
AC_MSG_CHECKING([for struct if_laddrconf])
AC_TRY_LINK([
#include <sys/types.h>
#include <net/if6.h>
],[ struct if_laddrconf a; ],
[AC_MSG_RESULT(yes)
AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRCONF, ,
[ISC: have struct if_laddrconf?])],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for struct if_laddrreq])
AC_TRY_LINK([
#include <sys/types.h>
#include <net/if6.h>
],[ struct if_laddrreq a; ],
[AC_MSG_RESULT(yes)
AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRREQ, ,
[ISC: have struct if_laddrreq?])],
[AC_MSG_RESULT(no)])
case "$found_ipv6" in
yes)
AC_DEFINE(ISC_PLATFORM_HAVEIPV6, ,[ISC: Have IPv6?])
AC_DEFINE(WANT_IPV6, ,[ISC: Want IPv6?])
AC_MSG_CHECKING(for in6_pktinfo)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
],
[struct in6_pktinfo xyzzy; return (0);],
[AC_MSG_RESULT(yes)
AC_DEFINE(ISC_PLATFORM_HAVEIN6PKTINFO, ,
[ISC: Have struct in6_pktinfo?])],
[AC_MSG_RESULT(no -- disabling runtime ipv6 support)])
AC_MSG_CHECKING(for in6addr_any)
AC_TRY_LINK([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
$isc_in_addr6_hack
],
[struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_DEFINE(ISC_PLATFORM_NEEDIN6ADDRANY, ,
[ISC: Need in6addr_any?])]
)
;;
esac
#
# Look for a sysctl call to get the list of network interfaces.
#
AC_MSG_CHECKING(for interface list sysctl)
AC_EGREP_CPP(found_rt_iflist, [
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#ifdef NET_RT_IFLIST
found_rt_iflist
#endif
],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_IFLIST_SYSCTL,1,[ISC: Use iflist_sysctl?])],
[AC_MSG_RESULT(no)])
2002-11-04 19:36:11 +00:00
case "$build" in
$host)
1999-12-09 13:01:21 +00:00
;;
2002-11-04 19:36:11 +00:00
*) case "$host" in
1999-12-09 13:01:21 +00:00
*-*-vxworks*)
LDFLAGS="$LDFLAGS -r"
;;
esac
;;
esac
2001-08-29 14:35:15 +00:00
AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
2004-07-20 15:01:56 +00:00
AC_SUBST(ARLIB_DIR)
if test -d $srcdir/arlib
then
AC_ARG_WITH(arlib,
AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
[ans=$withval], [ans=no])
case "$ans" in
yes)
ARLIB_DIR=arlib
AC_CONFIG_SUBDIRS(arlib)
;;
esac
fi
1999-12-09 13:01:21 +00:00
2002-11-04 19:36:11 +00:00
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(ElectricFence/Makefile)
AC_CONFIG_FILES(adjtimed/Makefile)
AC_CONFIG_FILES(clockstuff/Makefile)
AC_CONFIG_FILES(include/Makefile)
2004-07-20 15:01:56 +00:00
AC_CONFIG_FILES(include/isc/Makefile)
2002-11-04 19:36:11 +00:00
AC_CONFIG_FILES(kernel/Makefile)
AC_CONFIG_FILES(kernel/sys/Makefile)
AC_CONFIG_FILES(libntp/Makefile)
AC_CONFIG_FILES(libparse/Makefile)
AC_CONFIG_FILES(ntpd/Makefile)
AC_CONFIG_FILES(ntpdate/Makefile)
AC_CONFIG_FILES(ntpdc/Makefile)
2004-07-20 15:01:56 +00:00
AC_CONFIG_FILES(ntpdc/nl.pl, [chmod +x ntpdc/nl.pl])
2002-11-04 19:36:11 +00:00
AC_CONFIG_FILES(ntpq/Makefile)
AC_CONFIG_FILES(parseutil/Makefile)
AC_CONFIG_FILES(scripts/Makefile)
2004-07-20 15:01:56 +00:00
AC_CONFIG_FILES(scripts/calc_tickadj, [chmod +x scripts/calc_tickadj])
AC_CONFIG_FILES(scripts/checktime, [chmod +x scripts/checktime])
AC_CONFIG_FILES(scripts/freq_adj, [chmod +x scripts/freq_adj])
AC_CONFIG_FILES(scripts/mkver, [chmod +x scripts/mkver])
AC_CONFIG_FILES(scripts/ntp-wait, [chmod +x scripts/ntp-wait])
AC_CONFIG_FILES(scripts/ntpsweep, [chmod +x scripts/ntpsweep])
AC_CONFIG_FILES(scripts/ntptrace, [chmod +x scripts/ntptrace])
AC_CONFIG_FILES(scripts/ntpver, [chmod +x scripts/ntpver])
AC_CONFIG_FILES(scripts/plot_summary, [chmod +x scripts/plot_summary])
AC_CONFIG_FILES(scripts/summary, [chmod +x scripts/summary])
2002-11-04 19:36:11 +00:00
AC_CONFIG_FILES(util/Makefile)
2004-07-20 15:01:56 +00:00
case "$MAKE_SNTP" in
'') ;;
*)
AC_CONFIG_SUBDIRS(sntp)
;;
esac
2002-11-04 19:36:11 +00:00
2001-08-29 14:35:15 +00:00
AC_OUTPUT