;;
esac
;;
- *)
+ *)
AC_CHECK_HEADERS([utmp.h utmpx.h])
;;
esac
case "$host" in
*-*-sunos4*)
;;
- *)
+ *)
AC_CHECK_HEADERS([sys/ioctl.h])
;;
esac
case "$ac_cv_header_sched_h" in
yes)
;;
- *)
+ *)
AC_CHECK_HEADERS([sys/sched.h])
;;
esac
case "$host" in
*-*-netbsd*)
;;
- *)
+ *)
AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h])
;;
esac
)]
)
case "$ntp_cv_decl_h_errno" in
- yes)
+ yes)
AC_DEFINE([DECL_H_ERRNO], [1], [Declare h_errno?])
esac
*-*-darwin*)
ans=yes
;;
- *)
+ *)
ans=no
;;
esac
*-*-netbsd*)
ans=yes
;;
- *)
+ *)
ans=no
;;
esac
AC_ARG_ENABLE(
[ignore-dns-errors],
[AS_HELP_STRING(
- [--enable-ignore-dns-errors],
+ [--enable-ignore-dns-errors],
[- retry DNS queries on any error]
)],
[ans=$enableval],
*yes)
ntp_cv_var_ntp_syscalls=inline
;;
- *)
- AC_EGREP_CPP(
- [yes],
+ *)
+ AC_PREPROC_IFELSE(
[
#include <sys/syscall.h>
-
- #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
- yes
+ #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
+ # error
#endif
],
[ntp_cv_var_ntp_syscalls=kernel]
AC_CACHE_CHECK(
[if sys/timex.h has STA_FLL],
[ntp_cv_var_sta_fll],
- [AC_EGREP_CPP(
- [yes],
+ [AC_PREPROC_IFELSE(
[
#include <sys/timex.h>
-
- #ifdef STA_FLL
- yes
+ #ifndef STA_FLL
+ # error
#endif
],
[ntp_cv_var_sta_fll=yes],
AC_MSG_CHECKING([for TTY PPS ioctl TIOCGPPSEV])
case "$ac_cv_header_termios_h" in
yes)
- AC_EGREP_CPP(
- [yes],
+ AC_PREPROC_IFELSE(
[
#include <termios.h>
-
- #ifdef TIOCGPPSEV
- yes
+ #ifndef TIOCGPPSEV
+ # error
#endif
],
[ntp_ok=yes],
AC_MSG_CHECKING([for TTY PPS ioctl TIOCSPPS])
case "$ac_cv_header_termios_h" in
yes)
- AC_EGREP_CPP(
- [yes],
+ AC_PREPROC_IFELSE(
[
#include <termios.h>
-
- #ifdef TIOCSPPS
- yes
+ #ifndef TIOCSPPS
+ # error
#endif
],
[ntp_ok=yes],
AC_MSG_CHECKING([for TTY PPS ioctl CIOGETEV])
case "$ac_cv_header_sys_ppsclock_h" in
yes)
- AC_EGREP_CPP(
- [yes],
+ AC_PREPROC_IFELSE(
[
#include <sys/ppsclock.h>
-
- #ifdef CIOGETEV
- yes
+ #ifndef CIOGETEV
+ # error
#endif
],
[ntp_ok=yes],
case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
- AC_EGREP_CPP(
- [yes],
+ AC_PREPROC_IFELSE(
[
#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
+ #ifndef TIOCGSERIAL
+ # error
#endif
+ #ifndef TIOCSSERIAL
+ # error
#endif
+ #ifndef ASYNC_PPS_CD_POS
+ # error
#endif
+ #ifndef ASYNC_PPS_CD_NEG
+ # error
#endif
+ #ifndef CIOGETEV
+ # error
#endif
],
[ntp_ok=yes],
AC_ARG_ENABLE(
[BANCOMM],
[AS_HELP_STRING(
- [--enable-BANCOMM],
+ [--enable-BANCOMM],
[- Datum/Bancomm bc635/VME interface]
)],
[ntp_ok=$enableval],
]],
[[
int dtr = TIOCM_DTR;
-
+
ioctl(1, TIOCMBIS, (char *)&dtr);
]]
)],
AC_ARG_ENABLE(
[ARCRON_MSF],
[AS_HELP_STRING(
- [--enable-ARCRON-MSF],
+ [--enable-ARCRON-MSF],
[+ Arcron MSF receiver]
)],
[ntp_ok=$enableval],
yes)
can_kmem=yes
;;
- *)
+ *)
can_kmem=no
AC_DEFINE([NOKMEM], [1], [Should we NOT read /dev/kmem?])
esac
AC_ARG_ENABLE(
[accurate-adjtime],
[AS_HELP_STRING(
- [--enable-accurate-adjtime],
+ [--enable-accurate-adjtime],
[s the adjtime() call is accurate]
)],
[ans=$enableval]
AC_MSG_RESULT([$ans])
case "$ans" in
- yes)
+ yes)
AC_DEFINE([ADJTIME_IS_ACCURATE], [1], [Is adjtime() accurate?])
adjtime_is_accurate=yes
;;
case "$ntp_cv_nlist_tick" in
''|no)
;; # HMS: I think we can only get 'no' here...
- *)
+ *)
AC_DEFINE_UNQUOTED([K_TICK_NAME], ["$ntp_cv_nlist_tick"],
[What is the name of TICK in the kernel?])
esac
case "$ntp_cv_nlist_tickadj" in
''|no)
;; # HMS: I think we can only get 'no' here...
- *)
+ *)
AC_DEFINE_UNQUOTED([K_TICKADJ_NAME], ["$ntp_cv_nlist_tickadj"],
[What is the name of TICKADJ in the kernel?])
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 tick tickadj
dnl 10000 80 Unixware
dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE
dnl 10000 150 sgi IRIX
[--enable-simulator],
[- build/install the NTPD simulator?]
)],
- [ans=$enableval],
+ [ans=$enableval],
[ans=no]
)
AC_MSG_RESULT([$ans])
ans=yes
fi
;;
- *)
+ *)
ans=yes
;;
esac
esac
AC_ARG_ENABLE(
- [irig-sawtooth],
+ [irig-sawtooth],
[AS_HELP_STRING(
[--enable-irig-sawtooth],
[s if we should enable the IRIG sawtooth filter]
AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
AC_ARG_ENABLE(
- [nist],
+ [nist],
[AS_HELP_STRING(
[--enable-nist],
[- if we should enable the NIST lockclock scheme]
AC_CACHE_CHECK(
[for interface list sysctl],
[ntp_cv_iflist_sysctl],
- [AC_EGREP_CPP(
- [found_rt_iflist],
+ [AC_PREPROC_IFELSE(
[
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
- #ifdef NET_RT_IFLIST
- found_rt_iflist
+ #ifndef NET_RT_IFLIST
+ # error
#endif
],
[ntp_cv_iflist_sysctl=yes],