From: Dave Hart Date: Wed, 21 Mar 2012 03:04:51 +0000 (+0000) Subject: Include Linux-specific refclock_tsyncpci.c in --enable-all-clocks only X-Git-Tag: NTP_4_2_7P266~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd78745e9a2468501375e4ecbf1f4ef757cc7425;p=thirdparty%2Fntp.git Include Linux-specific refclock_tsyncpci.c in --enable-all-clocks only on Linux. Clean up configure.ac m4 quoting, indents to match current style. bk: 4f694553Vhfoxpeor2evfqyex-vtWg --- diff --git a/configure.ac b/configure.ac index 2ee017387..b3a6fa7ad 100644 --- a/configure.ac +++ b/configure.ac @@ -2425,14 +2425,27 @@ fi AC_MSG_RESULT([$ntp_ok]) AC_MSG_CHECKING([Spectracom TSYNC PCI timing board]) -AC_ARG_ENABLE(TSYNCPCI, - AC_HELP_STRING([--enable-TSYNCPCI], [+ Spectracom TSYNC timing board]), - [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) +case "$host" in + *-*-*linux*) + ntp_ok=$ntp_eac + ;; + *) + ntp_ok=no +esac +AC_ARG_ENABLE( + [TSYNCPCI], + [AS_HELP_STRING( + [--enable-TSYNCPCI], + [+ Spectracom TSYNC timing board] + )], + [ntp_ok=$enableval], + [] +) if test "$ntp_ok" = "yes"; then ntp_refclock=yes - AC_DEFINE(CLOCK_TSYNCPCI, 1, [Spectracom TSYNC timing board]) + AC_DEFINE([CLOCK_TSYNCPCI], [1], [Spectracom TSYNC timing board]) fi -AC_MSG_RESULT($ntp_ok) +AC_MSG_RESULT([$ntp_ok]) AC_MSG_CHECKING([WWV receiver]) AC_ARG_ENABLE( diff --git a/ntpd/refclock_tsyncpci.c b/ntpd/refclock_tsyncpci.c index 1fe52f34b..a2370cefe 100644 --- a/ntpd/refclock_tsyncpci.c +++ b/ntpd/refclock_tsyncpci.c @@ -32,7 +32,9 @@ #if defined(REFCLOCK) && defined(CLOCK_TSYNCPCI) #include -#include +#ifdef HAVE_SYS_IOCTL_H +# include +#endif #include #include