dnl Process this file with autoconf to produce a configure script.
AC_INIT(ntpd/ntp_refclock.c)
AC_CANONICAL_SYSTEM
-AC_DEFINE_UNQUOTED(STR_SYSTEM, "$target")
+AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host")
AM_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
AM_INIT_AUTOMAKE(ntp, 4.1.72)
AC_PROG_CC_STDC
AC_PROG_CPP
-case "$target" in
+case "$host" in
*-pc-cygwin*)
CFLAGS="$CFLAGS -DSYS_CYGWIN32"
;;
;;
esac
-case "$host" in
- $target)
+case "$build" in
+ $host)
;;
- *) case "$target" in
+ *) case "$host" in
*-*-vxworks*)
# Quick and dirty sanity check
case "$VX_KERNEL" in
ac_busted_vpath_in_make=no
-case "$target" in
+case "$host" in
*-next-nextstep3)
CFLAGS="$CFLAGS -posix"
;;
hs_ULONG_CONST
-case "$target" in
+case "$host" in
*-*-vxworks*)
ac_link="$ac_link $VX_KERNEL"
;;
AC_PROG_INSTALL
-case "$target" in
+case "$host" in
*-pc-cygwin*)
AC_CHECK_LIB(advapi32, main)
;;
dnl does Strange Things with extra processes using the Posix-compatibility
dnl real-time library, so we don't want to use it.
-case "$target" in
+case "$host" in
*-*-linux*) ;;
*)
AC_CHECK_LIB(rt, sched_setscheduler, ,
AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h)
dnl AC_CHECK_HEADERS(sys/chudefs.h)
AC_CHECK_HEADERS(sys/clkdefs.h sys/file.h)
-case "$target" in
+case "$host" in
*-*-sunos4*) ;;
*) AC_CHECK_HEADERS(sys/ioctl.h)
;;
esac
AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h)
AC_CHECK_HEADERS(sys/ppstime.h sys/proc.h sys/resource.h sys/sched.h)
-case "$target" in
+case "$host" in
*-*-sco*)
AC_CHECK_HEADERS(sys/sio.h)
;;
], AC_CHECK_HEADERS(sys/timepps.h))
AC_CHECK_HEADERS(sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.h)
AC_HEADER_TIME
-case "$target" in
+case "$host" in
*-convex-*)
AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h)
;;
;;
esac
-case "$target" in
+case "$host" in
sparc-*-solaris2*)
# Assume that solaris2 is Ansi C...
;;
fi
AC_C_CONST
-case "$host" in
- $target)
+case "$build" in
+ $host)
AC_C_BIGENDIAN
;;
- *) case "$target" in
+ *) case "$host" in
i*86-*-vxworks*)
# LITTLEENDIAN
;;
AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz,
[ac_cv_var_default_hz=100
-case "$target" in
+case "$host" in
alpha*-dec-osf4*|alpha*-dec-osf5*)
ac_cv_var_default_hz=1024
;;
AC_CACHE_CHECK(if we need to override the system's value for HZ, ac_cv_var_override_hz,
[ac_cv_var_override_hz=no
-case "$target" in
+case "$host" in
alpha*-dec-osf4*|alpha*-dec-osf5*)
ac_cv_var_override_hz=yes
;;
AC_C_INLINE
AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
-case "$host" in
- $target)
+case "$build" in
+ $host)
AC_CHECK_SIZEOF(signed char)
;;
- *) case "$target" in
+ *) case "$host" in
*-*-vxworks*)
AC_CHECK_SIZEOF(signed char, 1)
;;
;;
esac
-case "$host" in
- $target)
+case "$build" in
+ $host)
AC_CHECK_SIZEOF(int)
;;
- *) case "$target" in
+ *) case "$host" in
*-*-vxworks*)
AC_CHECK_SIZEOF(int, 4)
;;
;;
esac
-case "$host" in
- $target)
+case "$build" in
+ $host)
AC_CHECK_SIZEOF(long)
;;
- *) case "$target" in
+ *) case "$host" in
*-*-vxworks*)
AC_CHECK_SIZEOF(long, 4)
;;
esac
AC_TYPE_UID_T
-case "$target" in
+case "$host" in
*-*-linux*)
AC_CHECK_FUNCS(__adjtimex __ntp_gettime)
;;
esac
-case "$target" in
+case "$host" in
*-*-aix4*)
# (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
# (returning ENOSYS). I didn't check 4.2. If, in the future,
LIBS=$_libs])])
AC_CHECK_FUNCS(getbootfile getclock getdtablesize getrusage)
AC_CHECK_FUNC(gettimeofday, ,[
-case "$target" in
+case "$host" in
*-*-mpeix*) ac_cv_func_gettimeofday=yes
;;
esac])
-case "$target" in
+case "$host" in
*-pc-cygwin*)
;;
*) AC_CHECK_FUNCS(getuid)
;;
esac
AC_CHECK_FUNCS(hstrerror K_open kvm_open memcpy memmove memset)
-case "$target" in
+case "$host" in
*-*-sco3.2v5.0.*)
# Just stubs. Idiots.
;;
;;
esac
AC_REPLACE_FUNCS(mktime)
-case "$target" in
+case "$host" in
*-*-aix4*)
# Just a stub. Idiots.
;;
;;
esac
AC_CHECK_FUNCS(mrand48 srand48 nice nlist)
-case "$target" in
+case "$host" in
*-*-solaris2.6)
# Broken...
;;
yes) ;;
*) AC_REPLACE_FUNCS(random) ;;
esac
-case "$target" in
+case "$host" in
*-*-aix4*)
# Just a stub in AIX 4. Idiots.
;;
esac
AC_CHECK_FUNCS(setlinebuf setpgid setpriority setsid)
AC_CHECK_FUNCS(settimeofday, ,[
-case "$target" in
+case "$host" in
*-*-mpeix*) ac_cv_func_settimeofday=yes
;;
esac])
AC_CHECK_FUNCS(setvbuf sigaction)
AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl)
AC_REPLACE_FUNCS(snprintf strdup strerror)
-case "$target" in
+case "$host" in
*-*-aix4*)
# Just stubs. Idiots.
;;
*) AC_CHECK_FUNCS(timer_create timer_settime)
;;
esac
-case "$target" in
+case "$host" in
*-pc-cygwin*)
# I have no idea...
;;
yes) AC_DEFINE(DECL_SYSCALL) ;;
esac
-case "$target" in
+case "$host" in
*-*-aix4.3.*)
AC_DEFINE(DECL_HSTRERROR_0) # Needed for XLC under AIX 4.3.2
;;
*-*-solaris2*)
AC_DEFINE(DECL_MKSTEMP_0)
AC_DEFINE(DECL_SETPRIORITY_1)
- case "$target" in
+ case "$host" in
*-*-solaris2.4)
AC_DEFINE(DECL_TIMEOFDAY_0)
;;
;;
esac
-case "$target" in
+case "$host" in
*-*-sco3.2*)
AC_DEFINE(TERMIOS_NEEDS__SVID3)
;;
AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop,
[ans=no
-case "$target" in
+case "$host" in
*-*-hpux[[567]]*)
ans=yes
;;
AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket,
[ans=yes
-case "$target" in
+case "$host" in
*-*-domainos)
ans=no
;;
AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig,
[ans=no
-case "$target" in
+case "$host" in
*-*-hpux*)
ans=yes
;;
esac
AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid,
-[case "$target" in
+[case "$host" in
*-*-hpux[[567]]*)
ans=no
;;
esac
AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown,
-[case "$target" in
+[case "$host" in
*-*-bsdi[[23]]*)
ans=yes
;;
ans='stime()'
;;
*)
- case "$host" in
- $target) ntp_warning='Which leaves us with nothing to use!'
+ case "$build" in
+ $host) ntp_warning='Which leaves us with nothing to use!'
ans=none
;;
esac
esac
AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug,
-[case "$target" in
+[case "$host" in
*-*-solaris2.4*)
ans=yes
;;
yes)
ans=no
# There must be a better way...
- case "$target" in
+ case "$host" in
*-*-ptx*)
ans=yes
;;
case "$ac_cv_hdr_def_sigio" in
yes)
ans=yes
- case "$target" in
+ case "$host" in
alpha*-dec-osf4*|alpha*-dec-osf5*)
ans=no
;;
[ans=no
case "$ac_cv_hdr_def_sigpoll" in
yes)
- case "$target" in
+ case "$host" in
mips-sgi-irix*)
ans=no
;;
[ans=no
case "$ac_cv_hdr_def_sigpoll" in
yes)
- case "$target" in
+ case "$host" in
mips-sgi-irix*)
ans=no
;;
AC_CACHE_CHECK(if nlist() values might require extra indirection,
ac_cv_var_nlist_extra_indirection,
[ans=no
-case "$target" in
+case "$host" in
*-*-aix*)
ans=yes
;;
AC_CACHE_CHECK(for a minimum recommended value of tickadj,
ac_cv_var_min_rec_tickadj,
[ans=no
-case "$target" in
+case "$host" in
*-*-aix*)
ans=40
;;
AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR,
ac_cv_var_no_parenb_ignpar,
[ans=no
-case "$target" in
+case "$host" in
i?86-*-linux*)
ans=yes
;;
AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast,
[ac_cv_var_mcast=no
- case "$target" in
+ case "$host" in
i386-sequent-sysv4) ;;
*) AC_EGREP_CPP(yes,
[#include <netinet/in.h>
AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer,
[ans=no
- case "$target" in
+ case "$host" in
*-fujitsu-uxp*)
ans=yes
;;
AC_DEFINE(CLOCK_BANC)
fi
AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$target" in
+case "$ntp_ok$host" in
yes*-*-hpux*) ;;
yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
esac
AC_DEFINE(CLOCK_GPSVME)
fi
AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$target" in
+case "$ntp_ok$host" in
yes*-*-hpux*) ;;
yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
esac
AC_DEFINE(CLOCK_JUPITER)
fi
AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$target" in
+case "$ntp_ok$host" in
yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
esac
AC_DEFINE(CLOCK_MX4200)
fi
AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$target" in
+case "$ntp_ok$host" in
yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
esac
AC_ARG_ENABLE(TRUETIME,
AC_HELP_STRING([--enable-TRUETIME], [s Kinemetrics/TrueTime receivers]),
[ntp_ok=$enableval],
- [case "$target" in
+ [case "$host" in
vax-dec-bsd)
ntp_ok=no
;;
AC_DEFINE(CLOCK_TRUETIME)
fi
AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$target" in
+case "$ntp_ok$host" in
yesvax-dec-bsd) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
esac
AC_CACHE_CHECK(if we must enable parity for RAWDCF,
ac_cv_var_rawdcf_parity,
[ans=no
- case "$target" in
+ case "$host" in
*-*-linux*)
ans=yes
;;
AC_MSG_CHECKING(if we can make dcf parse utilities)
ans=no
if test "$ntp_parseutil" = "yes"; then
- case "$target" in
+ case "$host" in
*-*-sunos4*|*-*-solaris2*|*-*-linux*)
ans="dcfd testdcf"
DCFD=dcfd
ans=no
case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
yesyes)
- case "$target" in
+ case "$host" in
sparc-*-sunos4*)
case "$ac_cv_var_kernel_pll" in
yes)
AC_SUBST(MAKE_ADJTIMED)
AC_MSG_CHECKING(if we want HP-UX adjtimed support)
-case "$target" in
+case "$host" in
*-*-hpux[[56789]]*)
ans=yes
;;
AC_MSG_RESULT($ans)
AC_MSG_CHECKING(if we want QNX adjtime support)
-case "$target" in
+case "$host" in
*-*-qnx*)
ans=yes
;;
*) ans=no
;;
esac
- case "$target" in
+ case "$host" in
*-*-aix*)
#ans=no
;;
[AC_ARG_ENABLE(accurate-adjtime, [ --enable-accurate-adjtime
s the adjtime() call is accurate],
[ans=$enableval],
- [case "$target" in
+ [case "$host" in
i386-sequent-ptx*)
ans=no
;;
AC_CACHE_CHECK([the name of 'tick' in the kernel],
ac_cv_var_nlist_tick,
[ans=_tick
-case "$target" in
+case "$host" in
m68*-hp-hpux*) # HP9000/300?
ans=_old_tick
;;
AC_CACHE_CHECK([for the units of 'tick'],
ac_cv_var_tick_nano,
[ans=usec
-case "$target" in
+case "$host" in
*-*-solaris2*)
ans=nsec
;;
AC_CACHE_CHECK([the name of 'tickadj' in the kernel],
ac_cv_var_nlist_tickadj,
[ans=_tickadj
-case "$target" in
+case "$host" in
m68*-hp-hpux*) # HP9000/300?
ans=_tickadj
;;
AC_CACHE_CHECK([for the units of 'tickadj'],
ac_cv_var_tickadj_nano,
[ans=usec
-case "$target" in
+case "$host" in
*-*-solaris2*)
ans=nsec
;;
#
AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel],
ac_cv_var_nlist_dosynctodr,
-[case "$target" in
+[case "$host" in
*-apple-aux[[23]]*)
ans=no
;;
#
AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel],
ac_cv_var_nlist_noprintf,
-[case "$target" in
+[case "$host" in
*-apple-aux[[23]]*)
ans=no
;;
[AC_ARG_ENABLE(tick, [ --enable-tick=VALUE s force a value for 'tick'],
[ans=$enableval],
[ans=no
- case "$target" in
+ case "$host" in
XXX-*-pc-cygwin*)
;;
*-univel-sysv*)
[AC_ARG_ENABLE(tickadj, [ --enable-tickadj=VALUE s force a value for 'tickadj'],
[ans=$enableval],
[ans='500/hz'
- case "$target" in
+ case "$host" in
*-fujitsu-uxp*)
case "$ac_cv_var_adjtime_is_accurate" in
yes) ans='tick/16' ;;
# 1/100s (system tick). Sigh ...
# Unfortunately, there is no easy way to know if particular release
# has this "feature" or any obvious way to test for it.
-case "$target" in
+case "$host" in
mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX_CLOCK) ;;
esac
-case "$target" in
+case "$host" in
*-*-sco3.2v5*) AC_DEFINE(SCO5_CLOCK) ;;
esac
AC_SUBST(MAKE_NTPTIME)
AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime,
-[case "$target" in
+[case "$host" in
*) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in
yesyes)
ans=yes
esac
AC_SUBST(MAKE_TICKADJ)
-case "$target" in
+case "$host" in
mips-sni-sysv4*)
# tickadj is pretty useless on newer versions of ReliantUNIX
# Do not bother
;;
*-*-solaris2*)
# DLM says tickadj is a no-no starting with solaris2.5
- case "$target" in
+ case "$host" in
*-*-solaris2.[0-4]*) ;;
*) ac_cv_make_tickadj=no ;;
esac
AC_SUBST(MAKE_TIMETRIM)
AC_CACHE_CHECK(if we want and can make the timetrim utility, ac_cv_make_timetrim,
-[case "$target" in
+[case "$host" in
*-*-irix*)
ac_cv_make_timetrim=yes
;;
[AC_ARG_ENABLE(udp-wildcard, [ --enable-udp-wildcard s use UDP wildcard delivery],
[ans=$enableval],
[ans=no
- case "$target" in
+ case "$host" in
*-fujitsu-uxp*)
ans=yes
;;
yes) AC_DEFINE(UDP_WILDCARD_DELIVERY) ;;
esac
-case "$host" in
- $target)
+case "$build" in
+ $host)
;;
- *) case "$target" in
+ *) case "$host" in
*-*-vxworks*)
LDFLAGS="$LDFLAGS -r"
;;
AC_CACHE_CHECK(if we should always slew the time, ac_cv_var_slew_always,
[AC_ARG_ENABLE(slew-always, [ --enable-slew-always s always slew the time],
[ans=$enableval],
- [case "$target" in
+ [case "$host" in
*-apple-aux[[23]]*)
ans=yes
;;
AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew,
[AC_ARG_ENABLE(step-slew, [ --enable-step-slew s step and slew the time],
[ans=$enableval],
- [case "$target" in
+ [case "$host" in
*-sni-sysv*)
ans=yes
;;
AC_CACHE_CHECK(if ntpdate should step the time, ac_cv_var_ntpdate_step,
[AC_ARG_ENABLE(ntpdate-step, [ --enable-ntpdate-step s if ntpdate should step the time],
[ans=$enableval],
- [case "$target" in
+ [case "$host" in
*-apple-aux[[23]]*)
ans=yes
;;
[AC_ARG_ENABLE(hourly-todr-sync, [ --enable-hourly-todr-sync
s if we should sync TODR hourly],
[ans=$enableval],
- [case "$target" in
+ [case "$host" in
*-*-nextstep*)
ans=yes
;;
AC_CACHE_CHECK(if we should avoid kernel FLL bug, ac_cv_var_kernel_fll_bug,
[AC_ARG_ENABLE(kernel-fll-bug, [ --enable-kernel-fll-bug s if we should avoid a kernel FLL bug],
[ans=$enableval],
- [case "$target" in
+ [case "$host" in
*-*-solaris2.6)
unamev=`uname -v`
case "$unamev" in
yes) AC_DEFINE(KERNEL_FLL_BUG) ;;
esac
-case "$host" in
- $target)
+case "$build" in
+ $host)
;;
- *) case "$target" in
+ *) case "$host" in
*-*-vxworks*)
LDFLAGS="$LDFLAGS -r"
;;