1 | dnl -*-fundamental-*- |
---|
2 | dnl Process this file with autoconf to produce a configure script. |
---|
3 | AC_INIT(ntpd/ntp_refclock.c) |
---|
4 | AC_CANONICAL_SYSTEM |
---|
5 | AC_DEFINE_UNQUOTED(STR_SYSTEM, "$target") |
---|
6 | AM_CONFIG_HEADER(config.h) |
---|
7 | AC_ARG_PROGRAM |
---|
8 | AM_INIT_AUTOMAKE(ntp, 4.1.1) |
---|
9 | AC_PREREQ(2.49) |
---|
10 | |
---|
11 | ac_cv_var_oncore_ok=no |
---|
12 | ac_cv_var_atom_ok=no |
---|
13 | |
---|
14 | dnl Grab any initial CFLAGS so we can pick better defaults. |
---|
15 | iCFLAGS="$CFLAGS" |
---|
16 | |
---|
17 | dnl we need to check for cross compile tools for vxWorks here |
---|
18 | AC_PROG_CC |
---|
19 | AC_PROG_CC_STDC |
---|
20 | AC_PROG_CPP |
---|
21 | |
---|
22 | case "$target" in |
---|
23 | *-pc-cygwin*) |
---|
24 | CFLAGS="$CFLAGS -DSYS_CYGWIN32" |
---|
25 | ;; |
---|
26 | i386-sequent-sysv4) |
---|
27 | case "$CC" in |
---|
28 | cc) |
---|
29 | CFLAGS="$CFLAGS -Wc,+abi-socket" |
---|
30 | ;; |
---|
31 | esac |
---|
32 | ;; |
---|
33 | alpha*-dec-osf*) |
---|
34 | case "$CC" in |
---|
35 | cc) |
---|
36 | CFLAGS="$CFLAGS -std1" |
---|
37 | ;; |
---|
38 | esac |
---|
39 | ;; |
---|
40 | *-*-mpeix*) |
---|
41 | CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB" |
---|
42 | LDFLAGS="$LDFLAGS -L/SYSLOG/PUB" |
---|
43 | LIBS="$LIBS -lcurses" |
---|
44 | ;; |
---|
45 | esac |
---|
46 | |
---|
47 | case "$host" in |
---|
48 | $target) |
---|
49 | ;; |
---|
50 | *) case "$target" in |
---|
51 | *-*-vxworks*) |
---|
52 | # Quick and dirty sanity check |
---|
53 | case "$VX_KERNEL" in |
---|
54 | '') AC_MSG_ERROR(Please follow the directions in html/vxworks.html!) |
---|
55 | ;; |
---|
56 | esac |
---|
57 | CFLAGS="$CFLAGS -DSYS_VXWORKS" |
---|
58 | ;; |
---|
59 | esac |
---|
60 | ;; |
---|
61 | esac |
---|
62 | |
---|
63 | dnl we need to check for cross compile tools for vxWorks here |
---|
64 | AC_PROG_AWK |
---|
65 | AC_PROG_MAKE_SET |
---|
66 | |
---|
67 | rm -f conftest* |
---|
68 | |
---|
69 | case "$GCC" in |
---|
70 | yes) |
---|
71 | CFLAGS="$CFLAGS -Wall" |
---|
72 | # CFLAGS="$CFLAGS -Wcast-align" |
---|
73 | CFLAGS="$CFLAGS -Wcast-qual" |
---|
74 | # CFLAGS="$CFLAGS -Wconversion" |
---|
75 | # CFLAGS="$CFLAGS -Werror" |
---|
76 | CFLAGS="$CFLAGS -Wmissing-prototypes" |
---|
77 | CFLAGS="$CFLAGS -Wpointer-arith" |
---|
78 | CFLAGS="$CFLAGS -Wshadow" |
---|
79 | CFLAGS="$CFLAGS -Wstrict-prototypes" |
---|
80 | # CFLAGS="$CFLAGS -Wtraditional" |
---|
81 | # CFLAGS="$CFLAGS -Wwrite-strings" |
---|
82 | |
---|
83 | AC_CACHE_CHECK(whether ${CC-cc} -pipe works, ac_cv_prog_cc_pipe, |
---|
84 | [echo 'void f(){}' > conftest.c |
---|
85 | if test -z "`${CC-cc} -pipe -c conftest.c 2>&1`" -a -s conftest.o; then |
---|
86 | ac_cv_prog_cc_pipe=yes |
---|
87 | else |
---|
88 | ac_cv_prog_cc_pipe=no |
---|
89 | fi |
---|
90 | rm -f conftest* |
---|
91 | ]) |
---|
92 | |
---|
93 | case "$ac_cv_prog_cc_pipe" in |
---|
94 | yes) |
---|
95 | CFLAGS="$CFLAGS -pipe" |
---|
96 | ;; |
---|
97 | esac |
---|
98 | ;; |
---|
99 | esac |
---|
100 | |
---|
101 | ac_busted_vpath_in_make=no |
---|
102 | |
---|
103 | case "$target" in |
---|
104 | *-next-nextstep3) |
---|
105 | CFLAGS="$CFLAGS -posix" |
---|
106 | ;; |
---|
107 | *-*-irix6.1*) # 64 bit only |
---|
108 | # busted vpath? |
---|
109 | ;; |
---|
110 | *-*-irix6*) # 6.2 (and later?) |
---|
111 | ac_busted_vpath_in_make=yes |
---|
112 | # don't pass -n32 to gcc, it cannot handle and doesn't need it |
---|
113 | if test "$GCC" != yes; then |
---|
114 | case "$CFLAGS" in |
---|
115 | *-n32*) ;; |
---|
116 | *-n64*) ;; |
---|
117 | *) case "$iCFLAGS" in |
---|
118 | '') CFLAGS="-O2 -g3 -n32" ;; |
---|
119 | *) CFLAGS="$CFLAGS -n32" ;; |
---|
120 | esac |
---|
121 | ;; |
---|
122 | esac |
---|
123 | case "$LDFLAGS" in |
---|
124 | *-n32*) ;; |
---|
125 | *-n64*) ;; |
---|
126 | *) LDFLAGS="$LDFLAGS -n32" ;; |
---|
127 | esac |
---|
128 | fi |
---|
129 | ;; |
---|
130 | *-*-solaris2.5.1) |
---|
131 | ac_busted_vpath_in_make=yes |
---|
132 | ;; |
---|
133 | dnl This is currently commented out by bor. |
---|
134 | dnl The new versions of ReliantUNIX round adjtime() interval down |
---|
135 | dnl to 1/100s (system tick). This makes tickadj actually useless. |
---|
136 | dnl So, I'd better not use additional flags. |
---|
137 | dnl I leave it here just in case anybody has better idea |
---|
138 | dnl mips-sni-sysv4* ) |
---|
139 | dnl # |
---|
140 | dnl # Add flags for 64 bit file access to enable tickadj to access /dev/kmem |
---|
141 | dnl # |
---|
142 | dnl if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then |
---|
143 | dnl CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`" |
---|
144 | dnl fi |
---|
145 | dnl ;; |
---|
146 | esac |
---|
147 | |
---|
148 | case "$ac_busted_vpath_in_make$srcdir" in |
---|
149 | no*) ;; |
---|
150 | yes.) ;; |
---|
151 | *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in |
---|
152 | '') |
---|
153 | AC_MSG_ERROR(building outside of the main directory requires GNU make) |
---|
154 | ;; |
---|
155 | *) ;; |
---|
156 | esac |
---|
157 | ;; |
---|
158 | esac |
---|
159 | |
---|
160 | AC_SUBST(CFLAGS)dnl |
---|
161 | AC_SUBST(LDFLAGS)dnl |
---|
162 | |
---|
163 | AC_PROG_LN_S |
---|
164 | AC_PROG_GCC_TRADITIONAL |
---|
165 | AC_AIX |
---|
166 | AC_MINIX |
---|
167 | AC_ISC_POSIX |
---|
168 | AC_PROG_RANLIB |
---|
169 | AC_PATH_PROG(PATH_SH, sh) |
---|
170 | AC_PATH_PROG(PATH_PERL, perl) |
---|
171 | PATH_PERL=/usr/athena/bin/perl |
---|
172 | |
---|
173 | hs_ULONG_CONST |
---|
174 | |
---|
175 | case "$target" in |
---|
176 | *-*-vxworks*) |
---|
177 | ac_link="$ac_link $VX_KERNEL" |
---|
178 | ;; |
---|
179 | esac |
---|
180 | |
---|
181 | AC_PROG_INSTALL |
---|
182 | |
---|
183 | case "$target" in |
---|
184 | *-pc-cygwin*) |
---|
185 | AC_CHECK_LIB(advapi32, main) |
---|
186 | ;; |
---|
187 | esac |
---|
188 | AC_CHECK_LIB(elf, nlist) dnl Only needed for tickadj... |
---|
189 | dnl AC_CHECK_LIB(kvm, main, , , -lelf) |
---|
190 | AC_CHECK_LIB(kvm, main) dnl We already know about -lelf here... |
---|
191 | AC_CHECK_LIB(ld, nlist) |
---|
192 | AC_CHECK_LIB(mld, nlist) |
---|
193 | AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket)) |
---|
194 | AC_CHECK_FUNC(openlog, , |
---|
195 | AC_CHECK_LIB(gen, openlog, , |
---|
196 | AC_CHECK_LIB(syslog, openlog, , , -lsocket))) |
---|
197 | AC_CHECK_LIB(readline, readline |
---|
198 | AC_DEFINE(HAVE_LIBREADLINE) |
---|
199 | LIBS="-lreadline -lcurses $LIBS" |
---|
200 | ], , -lcurses) |
---|
201 | |
---|
202 | dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt |
---|
203 | dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt, |
---|
204 | dnl so only use one of them. Linux (glibc-2.1.2 and -2.2.2, at least) |
---|
205 | dnl does Strange Things with extra processes using the Posix-compatibility |
---|
206 | dnl real-time library, so we don't want to use it. |
---|
207 | |
---|
208 | case "$target" in |
---|
209 | *-*-linux*) ;; |
---|
210 | *) |
---|
211 | AC_CHECK_LIB(rt, sched_setscheduler, , |
---|
212 | AC_CHECK_LIB(posix4, sched_setscheduler)) |
---|
213 | ;; |
---|
214 | esac |
---|
215 | |
---|
216 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
---|
217 | |
---|
218 | AC_HEADER_STDC |
---|
219 | AC_CHECK_HEADERS(bstring.h errno.h fcntl.h ieeefp.h math.h memory.h netdb.h) |
---|
220 | AC_CHECK_HEADERS(poll.h resolv.h sched.h sgtty.h stdlib.h string.h termio.h) |
---|
221 | AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h utmp.h utmpx.h) |
---|
222 | AC_CHECK_HEADERS(arpa/nameser.h net/if.h netinet/in_system.h) |
---|
223 | AC_CHECK_HEADERS(netinet/in_systm.h netinet/in.h netinet/ip.h) |
---|
224 | AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO)]) |
---|
225 | AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h) |
---|
226 | dnl AC_CHECK_HEADERS(sys/chudefs.h) |
---|
227 | AC_CHECK_HEADERS(sys/clkdefs.h sys/file.h) |
---|
228 | case "$target" in |
---|
229 | *-*-sunos4*) ;; |
---|
230 | *) AC_CHECK_HEADERS(sys/ioctl.h) |
---|
231 | ;; |
---|
232 | esac |
---|
233 | AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h) |
---|
234 | AC_CHECK_HEADERS(sys/ppstime.h sys/proc.h sys/resource.h sys/sched.h) |
---|
235 | case "$target" in |
---|
236 | *-*-sco*) |
---|
237 | AC_CHECK_HEADERS(sys/sio.h) |
---|
238 | ;; |
---|
239 | esac |
---|
240 | AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/sockio.h sys/stat.h sys/stream.h) |
---|
241 | AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/syssgi.h sys/termios.h) |
---|
242 | AC_CHECK_HEADERS(sys/time.h) |
---|
243 | AC_EGREP_CPP(yes, |
---|
244 | [#include <sys/timepps.h> |
---|
245 | #ifdef PPS_API_VERS_1 |
---|
246 | yes |
---|
247 | #endif |
---|
248 | ], AC_CHECK_HEADERS(sys/timepps.h)) |
---|
249 | AC_CHECK_HEADERS(sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.h) |
---|
250 | AC_HEADER_TIME |
---|
251 | case "$target" in |
---|
252 | *-convex-*) |
---|
253 | AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h) |
---|
254 | ;; |
---|
255 | *-*-bsdi*) |
---|
256 | AC_CHECK_HEADERS(machine/inline.h sys/pcl720.h sys/i8253.h) |
---|
257 | ;; |
---|
258 | esac |
---|
259 | |
---|
260 | AC_CHECK_HEADER(nlist.h, |
---|
261 | [AC_DEFINE(NLIST_STRUCT) |
---|
262 | AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un, |
---|
263 | [AC_TRY_COMPILE([#include <nlist.h>], |
---|
264 | [struct nlist n; n.n_un.n_name = 0;], |
---|
265 | ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)]) |
---|
266 | if test $ac_cv_struct_nlist_n_un = yes; then |
---|
267 | AC_DEFINE(NLIST_NAME_UNION) |
---|
268 | fi |
---|
269 | ])dnl |
---|
270 | |
---|
271 | AC_CACHE_CHECK(for basic volatile support, ac_cv_c_volatile, |
---|
272 | [AC_TRY_COMPILE([],[ |
---|
273 | volatile int x;], |
---|
274 | ac_cv_c_volatile=yes, |
---|
275 | ac_cv_c_volatile=no) |
---|
276 | ]) |
---|
277 | case "$ac_cv_c_volatile" in |
---|
278 | yes) |
---|
279 | ;; |
---|
280 | *) AC_DEFINE(volatile,) |
---|
281 | ;; |
---|
282 | esac |
---|
283 | |
---|
284 | case "$target" in |
---|
285 | sparc-*-solaris2*) |
---|
286 | # Assume that solaris2 is Ansi C... |
---|
287 | ;; |
---|
288 | *) |
---|
289 | AM_C_PROTOTYPES |
---|
290 | ;; |
---|
291 | esac |
---|
292 | AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes, |
---|
293 | [AC_TRY_COMPILE([ |
---|
294 | extern int foo (short); |
---|
295 | int foo(short i) { return i; }],[ |
---|
296 | int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no) |
---|
297 | ]) |
---|
298 | if test "$ac_cv_have_prototypes" = yes; then |
---|
299 | AC_DEFINE(HAVE_PROTOTYPES) |
---|
300 | fi |
---|
301 | |
---|
302 | AC_C_CONST |
---|
303 | case "$host" in |
---|
304 | $target) |
---|
305 | AC_C_BIGENDIAN |
---|
306 | ;; |
---|
307 | *) case "$target" in |
---|
308 | i*86-*-vxworks*) |
---|
309 | # LITTLEENDIAN |
---|
310 | ;; |
---|
311 | *-*-vxworks*) |
---|
312 | AC_DEFINE(WORDS_BIGENDIAN) |
---|
313 | ;; |
---|
314 | *) AC_MSG_ERROR(Cross-compiling needs explicit byte order) |
---|
315 | ;; |
---|
316 | esac |
---|
317 | ;; |
---|
318 | esac |
---|
319 | AC_TYPE_SIGNAL |
---|
320 | AC_TYPE_OFF_T |
---|
321 | AC_TYPE_SIZE_T |
---|
322 | AC_CHECK_TYPE(time_t, long) |
---|
323 | AC_STRUCT_TM |
---|
324 | |
---|
325 | AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz, |
---|
326 | [ac_cv_var_default_hz=100 |
---|
327 | case "$target" in |
---|
328 | alpha*-dec-osf4*|alpha*-dec-osf5*) |
---|
329 | ac_cv_var_default_hz=1024 |
---|
330 | ;; |
---|
331 | mips-dec-ultrix4*) |
---|
332 | ac_cv_var_default_hz=256 |
---|
333 | ;; |
---|
334 | esac]) |
---|
335 | AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz) |
---|
336 | |
---|
337 | AC_CACHE_CHECK(if we need to override the system's value for HZ, ac_cv_var_override_hz, |
---|
338 | [ac_cv_var_override_hz=no |
---|
339 | case "$target" in |
---|
340 | alpha*-dec-osf4*|alpha*-dec-osf5*) |
---|
341 | ac_cv_var_override_hz=yes |
---|
342 | ;; |
---|
343 | mips-dec-ultrix4*) |
---|
344 | ac_cv_var_override_hz=yes |
---|
345 | ;; |
---|
346 | *-*-freebsd*) |
---|
347 | ac_cv_var_override_hz=yes |
---|
348 | ;; |
---|
349 | *-*-sunos4*) |
---|
350 | ac_cv_var_override_hz=yes |
---|
351 | ;; |
---|
352 | esac]) |
---|
353 | case "$ac_cv_var_override_hz" in |
---|
354 | yes) |
---|
355 | AC_DEFINE(OVERRIDE_HZ) |
---|
356 | ;; |
---|
357 | esac |
---|
358 | |
---|
359 | dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp, |
---|
360 | dnl [AC_TRY_LINK([#include <sys/types.h> |
---|
361 | dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;], |
---|
362 | dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)]) |
---|
363 | dnl if test $su_cv_func_ut_host_in_utmp = yes; then |
---|
364 | dnl AC_DEFINE(HAVE_UT_HOST) |
---|
365 | dnl fi |
---|
366 | |
---|
367 | dnl AC_MSG_CHECKING(if we can get the system boot time) |
---|
368 | dnl AC_CACHE_VAL(su_cv_have_boot_time, |
---|
369 | dnl [AC_EGREP_CPP(yes, |
---|
370 | dnl [#ifdef HAVE_UTMPX_H |
---|
371 | dnl #include <utmpx.h> |
---|
372 | dnl #else |
---|
373 | dnl #include <utmp.h> |
---|
374 | dnl #endif |
---|
375 | dnl #ifdef BOOT_TIME |
---|
376 | dnl yes |
---|
377 | dnl #endif |
---|
378 | dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)]) |
---|
379 | dnl AC_MSG_RESULT($su_cv_have_boot_time) |
---|
380 | |
---|
381 | AC_CACHE_CHECK( |
---|
382 | struct sigaction for sa_sigaction, |
---|
383 | ac_cv_struct_sigaction_has_sa_sigaction, |
---|
384 | [ |
---|
385 | AC_TRY_COMPILE( |
---|
386 | [#include <signal.h>], |
---|
387 | [struct sigaction act; act.sa_sigaction = 0;], |
---|
388 | ac_cv_struct_sigaction_has_sa_sigaction=yes, |
---|
389 | ac_cv_struct_sigaction_has_sa_sigaction=no |
---|
390 | ) |
---|
391 | ] |
---|
392 | ) |
---|
393 | if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then |
---|
394 | AC_DEFINE(HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION) |
---|
395 | fi |
---|
396 | |
---|
397 | AC_CACHE_CHECK(for struct ppsclockev, ac_cv_struct_ppsclockev, |
---|
398 | [AC_TRY_COMPILE([ |
---|
399 | #include <sys/types.h> |
---|
400 | #ifdef HAVE_SYS_TERMIOS_H |
---|
401 | # include <sys/termios.h> |
---|
402 | #endif |
---|
403 | #ifdef HAVE_SYS_TIME_H |
---|
404 | # include <sys/time.h> |
---|
405 | #endif |
---|
406 | #ifdef HAVE_SYS_PPSCLOCK_H |
---|
407 | # include <sys/ppsclock.h> |
---|
408 | #endif],[ |
---|
409 | extern struct ppsclockev *pce; |
---|
410 | return pce->serial;], |
---|
411 | ac_cv_struct_ppsclockev=yes, |
---|
412 | ac_cv_struct_ppsclockev=no) |
---|
413 | ]) |
---|
414 | if test $ac_cv_struct_ppsclockev = yes; then |
---|
415 | AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV) |
---|
416 | fi |
---|
417 | |
---|
418 | AC_CACHE_CHECK(struct sockaddr for sa_len, ac_cv_struct_sockaddr_has_sa_len, |
---|
419 | [AC_TRY_COMPILE([ |
---|
420 | #include <sys/types.h> |
---|
421 | #include <sys/socket.h>],[ |
---|
422 | extern struct sockaddr *ps; |
---|
423 | return ps->sa_len;], |
---|
424 | ac_cv_struct_sockaddr_has_sa_len=yes, |
---|
425 | ac_cv_struct_sockaddr_has_sa_len=no) |
---|
426 | ]) |
---|
427 | if test $ac_cv_struct_sockaddr_has_sa_len = yes; then |
---|
428 | AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR) |
---|
429 | fi |
---|
430 | |
---|
431 | AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz, |
---|
432 | [AC_TRY_COMPILE([ |
---|
433 | #include <sys/time.h>],[ |
---|
434 | extern struct clockinfo *pc; |
---|
435 | return pc->hz;], |
---|
436 | ac_cv_struct_clockinfo_has_hz=yes, |
---|
437 | ac_cv_struct_clockinfo_has_hz=no) |
---|
438 | ]) |
---|
439 | if test $ac_cv_struct_clockinfo_has_hz = yes; then |
---|
440 | AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO) |
---|
441 | fi |
---|
442 | |
---|
443 | AC_CACHE_CHECK(struct clockinfo for tickadj, ac_cv_struct_clockinfo_has_tickadj, |
---|
444 | [AC_TRY_COMPILE([ |
---|
445 | #include <sys/time.h>],[ |
---|
446 | extern struct clockinfo *pc; |
---|
447 | return pc->tickadj;], |
---|
448 | ac_cv_struct_clockinfo_has_tickadj=yes, |
---|
449 | ac_cv_struct_clockinfo_has_tickadj=no) |
---|
450 | ]) |
---|
451 | if test $ac_cv_struct_clockinfo_has_tickadj = yes; then |
---|
452 | AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO) |
---|
453 | fi |
---|
454 | |
---|
455 | AC_CACHE_CHECK([for struct timespec], ac_cv_struct_timespec, |
---|
456 | [AC_TRY_COMPILE([ |
---|
457 | #include <sys/time.h> |
---|
458 | /* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */ |
---|
459 | #ifdef HAVE_ERRNO_H |
---|
460 | # include <errno.h> |
---|
461 | #endif |
---|
462 | #ifdef HAVE_SYS_TIMEPPS_H |
---|
463 | # define FRAC 4294967296 |
---|
464 | # include <sys/timepps.h> |
---|
465 | #endif], |
---|
466 | [struct timespec n;], |
---|
467 | ac_cv_struct_timespec=yes, ac_cv_struct_timespec=no)]) |
---|
468 | if test $ac_cv_struct_timespec = yes; then |
---|
469 | AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, [Do we have struct timespec?]) |
---|
470 | fi |
---|
471 | |
---|
472 | AC_CACHE_CHECK([for struct ntptimeval], ac_cv_struct_ntptimeval, |
---|
473 | [AC_TRY_COMPILE([ |
---|
474 | #include <sys/time.h> |
---|
475 | #include <sys/timex.h>], |
---|
476 | [struct ntptimeval n;], |
---|
477 | ac_cv_struct_ntptimeval=yes, ac_cv_struct_ntptimeval=no)]) |
---|
478 | if test $ac_cv_struct_ntptimeval = yes; then |
---|
479 | AC_DEFINE(HAVE_STRUCT_NTPTIMEVAL, 1, [Do we have struct ntptimeval?]) |
---|
480 | fi |
---|
481 | |
---|
482 | AC_CHECK_MEMBERS([struct ntptimeval.time.tv_nsec], , , |
---|
483 | [#ifdef HAVE_SYS_TIME_H |
---|
484 | #include <sys/time.h> |
---|
485 | #else |
---|
486 | # ifdef HAVE_TIME_H |
---|
487 | # include <time.h> |
---|
488 | # endif |
---|
489 | #endif |
---|
490 | #ifdef HAVE_SYS_TIMEX_H |
---|
491 | #include <sys/timex.h> |
---|
492 | #else |
---|
493 | # ifdef HAVE_TIMEX_H |
---|
494 | # include <timex.h> |
---|
495 | # endif |
---|
496 | #endif]) |
---|
497 | |
---|
498 | AC_C_INLINE |
---|
499 | AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE? |
---|
500 | case "$host" in |
---|
501 | $target) |
---|
502 | AC_CHECK_SIZEOF(signed char) |
---|
503 | ;; |
---|
504 | *) case "$target" in |
---|
505 | *-*-vxworks*) |
---|
506 | AC_CHECK_SIZEOF(signed char, 1) |
---|
507 | ;; |
---|
508 | *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_SIGNED_LONG) |
---|
509 | ;; |
---|
510 | esac |
---|
511 | ;; |
---|
512 | esac |
---|
513 | |
---|
514 | case "$host" in |
---|
515 | $target) |
---|
516 | AC_CHECK_SIZEOF(int) |
---|
517 | ;; |
---|
518 | *) case "$target" in |
---|
519 | *-*-vxworks*) |
---|
520 | AC_CHECK_SIZEOF(int, 4) |
---|
521 | ;; |
---|
522 | *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_INT) |
---|
523 | ;; |
---|
524 | esac |
---|
525 | ;; |
---|
526 | esac |
---|
527 | |
---|
528 | case "$host" in |
---|
529 | $target) |
---|
530 | AC_CHECK_SIZEOF(long) |
---|
531 | ;; |
---|
532 | *) case "$target" in |
---|
533 | *-*-vxworks*) |
---|
534 | AC_CHECK_SIZEOF(long, 4) |
---|
535 | ;; |
---|
536 | *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_LONG) |
---|
537 | ;; |
---|
538 | esac |
---|
539 | ;; |
---|
540 | esac |
---|
541 | |
---|
542 | AC_CHECK_TYPES([s_char]) |
---|
543 | case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in |
---|
544 | *yes) |
---|
545 | # We have a typedef for s_char. Might as well believe it... |
---|
546 | ;; |
---|
547 | no0no) |
---|
548 | # We have signed chars, can't say 'signed char', no s_char typedef. |
---|
549 | AC_DEFINE(NEED_S_CHAR_TYPEDEF) |
---|
550 | ;; |
---|
551 | no1no) |
---|
552 | # We have signed chars, can say 'signed char', no s_char typedef. |
---|
553 | AC_DEFINE(NEED_S_CHAR_TYPEDEF) |
---|
554 | ;; |
---|
555 | yes0no) |
---|
556 | # We have unsigned chars, can't say 'signed char', no s_char typedef. |
---|
557 | AC_MSG_ERROR(No way to specify a signed character!) |
---|
558 | ;; |
---|
559 | yes1no) |
---|
560 | # We have unsigned chars, can say 'signed char', no s_char typedef. |
---|
561 | AC_DEFINE(NEED_S_CHAR_TYPEDEF) |
---|
562 | ;; |
---|
563 | esac |
---|
564 | AC_TYPE_UID_T |
---|
565 | |
---|
566 | case "$target" in |
---|
567 | *-*-linux*) |
---|
568 | AC_CHECK_FUNCS(__adjtimex __ntp_gettime) |
---|
569 | ;; |
---|
570 | esac |
---|
571 | case "$target" in |
---|
572 | *-*-aix4*) |
---|
573 | # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub |
---|
574 | # (returning ENOSYS). I didn't check 4.2. If, in the future, |
---|
575 | # IBM pulls its thumbs out long enough to implement clock_settime, |
---|
576 | # this conditional will need to change. Maybe use AC_TRY_RUN |
---|
577 | # instead to try to set the time to itself and check errno. |
---|
578 | ;; |
---|
579 | *) AC_CHECK_FUNCS(clock_gettime clock_settime) |
---|
580 | ;; |
---|
581 | esac |
---|
582 | AC_CHECK_FUNCS(daemon) |
---|
583 | AC_CHECK_FUNCS(finite, , |
---|
584 | [AC_CHECK_FUNCS(isfinite, , |
---|
585 | [AC_MSG_CHECKING(for isfinite with <math.h>) |
---|
586 | _libs=$LIBS |
---|
587 | LIBS="$LIBS -lm" |
---|
588 | AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)], |
---|
589 | [AC_MSG_RESULT(yes) |
---|
590 | AC_DEFINE(HAVE_ISFINITE)], |
---|
591 | AC_MSG_RESULT(no)) |
---|
592 | LIBS=$_libs])]) |
---|
593 | AC_CHECK_FUNCS(getbootfile getclock getdtablesize getrusage) |
---|
594 | AC_CHECK_FUNC(gettimeofday, ,[ |
---|
595 | case "$target" in |
---|
596 | *-*-mpeix*) ac_cv_func_gettimeofday=yes |
---|
597 | ;; |
---|
598 | esac]) |
---|
599 | case "$target" in |
---|
600 | *-pc-cygwin*) |
---|
601 | ;; |
---|
602 | *) AC_CHECK_FUNCS(getuid) |
---|
603 | ;; |
---|
604 | esac |
---|
605 | AC_CHECK_FUNCS(hstrerror K_open kvm_open memcpy memmove memset) |
---|
606 | case "$target" in |
---|
607 | *-*-sco3.2v5.0.*) |
---|
608 | # Just stubs. Idiots. |
---|
609 | ;; |
---|
610 | *) AC_CHECK_FUNCS(mkstemp) |
---|
611 | ;; |
---|
612 | esac |
---|
613 | AC_REPLACE_FUNCS(mktime) |
---|
614 | case "$target" in |
---|
615 | *-*-aix4*) |
---|
616 | # Just a stub. Idiots. |
---|
617 | ;; |
---|
618 | *-*-irix*) |
---|
619 | # Just stubs in Irix. Idiots. |
---|
620 | ;; |
---|
621 | *-*-sco3.2v5.0.*) |
---|
622 | # Just stubs. Idiots. |
---|
623 | ;; |
---|
624 | alpha*-dec-osf4*|alpha*-dec-osf5*) |
---|
625 | # mlockall is there, as a #define calling memlk via <sys/mman.h> |
---|
626 | # Not easy to test for - cheat. |
---|
627 | AC_CHECK_FUNCS(memlk, [ac_cv_func_mlockall='yes']) |
---|
628 | AC_CHECK_FUNCS(mlockall) |
---|
629 | ;; |
---|
630 | *) AC_CHECK_FUNCS(mlockall) |
---|
631 | ;; |
---|
632 | esac |
---|
633 | AC_CHECK_FUNCS(mrand48 srand48 nice nlist) |
---|
634 | case "$target" in |
---|
635 | *-*-solaris2.6) |
---|
636 | # Broken... |
---|
637 | ;; |
---|
638 | *) AC_CHECK_FUNCS(ntp_adjtime ntp_gettime) |
---|
639 | ;; |
---|
640 | esac |
---|
641 | AC_CHECK_FUNCS(plock pututline pututxline readlink rtprio) |
---|
642 | case "$ac_cv_func_mrand48" in |
---|
643 | yes) ;; |
---|
644 | *) AC_REPLACE_FUNCS(random) ;; |
---|
645 | esac |
---|
646 | case "$target" in |
---|
647 | *-*-aix4*) |
---|
648 | # Just a stub in AIX 4. Idiots. |
---|
649 | ;; |
---|
650 | *-*-solaris2.5*) |
---|
651 | # Just stubs in solaris2.5. Idiots. |
---|
652 | ;; |
---|
653 | *) AC_CHECK_FUNCS(sched_setscheduler) |
---|
654 | ;; |
---|
655 | esac |
---|
656 | AC_CHECK_FUNCS(setlinebuf setpgid setpriority setsid) |
---|
657 | AC_CHECK_FUNCS(settimeofday, ,[ |
---|
658 | case "$target" in |
---|
659 | *-*-mpeix*) ac_cv_func_settimeofday=yes |
---|
660 | ;; |
---|
661 | esac]) |
---|
662 | AC_CHECK_FUNCS(setvbuf sigaction) |
---|
663 | AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl) |
---|
664 | AC_REPLACE_FUNCS(snprintf strdup strerror) |
---|
665 | case "$target" in |
---|
666 | *-*-aix4*) |
---|
667 | # Just stubs. Idiots. |
---|
668 | ;; |
---|
669 | *-*-netbsd*) |
---|
670 | # Just stubs. Idiots. |
---|
671 | ;; |
---|
672 | *-*-openbsd*) |
---|
673 | # Just stubs. Idiots. |
---|
674 | ;; |
---|
675 | *) AC_CHECK_FUNCS(timer_create timer_settime) |
---|
676 | ;; |
---|
677 | esac |
---|
678 | case "$target" in |
---|
679 | *-pc-cygwin*) |
---|
680 | # I have no idea... |
---|
681 | ;; |
---|
682 | *) AC_CHECK_FUNCS(umask) |
---|
683 | ;; |
---|
684 | esac |
---|
685 | AC_CHECK_FUNCS(uname updwtmp updwtmpx vsprintf) |
---|
686 | |
---|
687 | AC_CACHE_CHECK(number of arguments to gettimeofday(), ac_cv_func_Xettimeofday_nargs, |
---|
688 | [AC_TRY_COMPILE([#include <sys/time.h>],[ |
---|
689 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
---|
690 | settimeofday((struct timeval*)0,(struct timezone*)0); |
---|
691 | ], |
---|
692 | ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1) |
---|
693 | ]) |
---|
694 | if test $ac_cv_func_Xettimeofday_nargs = 1; then |
---|
695 | AC_DEFINE(SYSV_TIMEOFDAY) |
---|
696 | fi |
---|
697 | |
---|
698 | AC_CACHE_CHECK(number of arguments taken by setpgrp(), ac_cv_func_setpgrp_nargs, |
---|
699 | [AC_TRY_COMPILE([ |
---|
700 | #ifdef HAVE_SYS_TYPES_H |
---|
701 | # include <sys/types.h> |
---|
702 | #endif |
---|
703 | #ifdef HAVE_UNISTD_H |
---|
704 | # include <unistd.h> |
---|
705 | #endif |
---|
706 | ],[setpgrp(0,0);], |
---|
707 | ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0) |
---|
708 | ]) |
---|
709 | if test $ac_cv_func_setpgrp_nargs = 0; then |
---|
710 | AC_DEFINE(HAVE_SETPGRP_0) |
---|
711 | fi |
---|
712 | |
---|
713 | save_CFLAGS=$CFLAGS |
---|
714 | CFLAGS="$CFLAGS -I$srcdir/include" |
---|
715 | |
---|
716 | AC_CACHE_CHECK(argument pointer type of qsort()'s compare function and base, |
---|
717 | ac_cv_func_qsort_argtype, |
---|
718 | [AC_TRY_COMPILE([ |
---|
719 | #include "l_stdlib.h" |
---|
720 | |
---|
721 | #ifdef HAVE_PROTOTYPES |
---|
722 | #define P(x) x |
---|
723 | #else |
---|
724 | #define P(x) () |
---|
725 | #endif |
---|
726 | |
---|
727 | extern void *base; |
---|
728 | extern sortfunc P((const void *, const void *)); |
---|
729 | int sortfunc(a, b) |
---|
730 | const void *a; |
---|
731 | const void *b; { return 0; } |
---|
732 | ],[ |
---|
733 | qsort(base, 2, sizeof(char *), sortfunc); |
---|
734 | ], |
---|
735 | ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char) |
---|
736 | ]) |
---|
737 | case "$ac_cv_func_qsort_argtype" in |
---|
738 | void) |
---|
739 | AC_DEFINE(QSORT_USES_VOID_P) |
---|
740 | ;; |
---|
741 | esac |
---|
742 | |
---|
743 | CFLAGS=$save_CFLAGS |
---|
744 | |
---|
745 | AC_CACHE_CHECK(if we need to declare 'errno', ac_cv_decl_errno, |
---|
746 | [AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H |
---|
747 | #include <errno.h> |
---|
748 | #endif], |
---|
749 | [errno = 0;], |
---|
750 | ac_cv_decl_errno=no, ac_cv_decl_errno=yes)]) |
---|
751 | case "$ac_cv_decl_errno" in |
---|
752 | yes) AC_DEFINE(DECL_ERRNO) ;; |
---|
753 | esac |
---|
754 | |
---|
755 | dnl FIXME: from ntpd/ntp_intres.c, but there's no info which header produces |
---|
756 | dnl the clash. <resolv.h> isn't currently used. |
---|
757 | dnl |
---|
758 | dnl (prr) aix 4.3 defines h_errno as (*(int *)h_errno_which()) for |
---|
759 | dnl MT purposes. This makes the line "extern int h_errno" choke |
---|
760 | dnl the compiler. Hopefully adding !defined(h_errno) fixes this |
---|
761 | dnl without breaking any other platforms. |
---|
762 | dnl |
---|
763 | AC_CACHE_CHECK(if we may declare 'h_errno', ac_cv_decl_h_errno, |
---|
764 | [AC_TRY_COMPILE([#include <sys/types.h> |
---|
765 | #ifdef HAVE_NETINET_IN_H |
---|
766 | #include <netinet/in.h> |
---|
767 | #endif |
---|
768 | #ifdef HAVE_ARPA_NAMESER_H |
---|
769 | #include <arpa/nameser.h> |
---|
770 | #endif |
---|
771 | #ifdef HAVE_NETDB_H |
---|
772 | #include <netdb.h> |
---|
773 | #endif |
---|
774 | #ifdef HAVE_RESOLV_H |
---|
775 | #include <resolv.h> |
---|
776 | #endif], |
---|
777 | [extern int h_errno;], |
---|
778 | ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)]) |
---|
779 | case "$ac_cv_decl_h_errno" in |
---|
780 | yes) AC_DEFINE(DECL_H_ERRNO) ;; |
---|
781 | esac |
---|
782 | |
---|
783 | dnl See if char *sys_errlist[] is OK. |
---|
784 | AC_CACHE_CHECK([[if declaring 'char *sys_errlist[]' is ok]], ac_cv_decl_sys_errlist, |
---|
785 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
786 | #ifdef HAVE_ERRNO_H |
---|
787 | #include <errno.h> |
---|
788 | #endif], |
---|
789 | [extern char *sys_errlist[]; |
---|
790 | ], |
---|
791 | ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)]) |
---|
792 | case "$ac_cv_decl_sys_errlist" in |
---|
793 | yes) AC_DEFINE(CHAR_SYS_ERRLIST) ;; |
---|
794 | esac |
---|
795 | |
---|
796 | AC_CACHE_CHECK(if declaring 'syscall()' is ok, ac_cv_decl_syscall, |
---|
797 | [AC_TRY_COMPILE([ |
---|
798 | #ifdef HAVE_SYS_TYPES_H |
---|
799 | # include <sys/types.h> |
---|
800 | #endif |
---|
801 | #ifdef HAVE_UNISTD_H |
---|
802 | # include <unistd.h> |
---|
803 | #endif |
---|
804 | #ifdef HAVE_PROTOTYPES |
---|
805 | #define P(x) x |
---|
806 | #else |
---|
807 | #define P(x) () |
---|
808 | #endif |
---|
809 | ], |
---|
810 | [extern int syscall P((int, ...));], |
---|
811 | ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)]) |
---|
812 | case "$ac_cv_decl_syscall" in |
---|
813 | yes) AC_DEFINE(DECL_SYSCALL) ;; |
---|
814 | esac |
---|
815 | |
---|
816 | case "$target" in |
---|
817 | *-*-aix4.3.*) |
---|
818 | AC_DEFINE(DECL_HSTRERROR_0) # Needed for XLC under AIX 4.3.2 |
---|
819 | ;; |
---|
820 | *-*-mpeix*) |
---|
821 | AC_DEFINE(DECL_ADJTIME_0) |
---|
822 | AC_DEFINE(DECL_INET_NTOA_0) |
---|
823 | AC_DEFINE(DECL_MKTEMP_0) |
---|
824 | AC_DEFINE(DECL_MRAND48_0) |
---|
825 | AC_DEFINE(DECL_SELECT_0) |
---|
826 | AC_DEFINE(DECL_SETITIMER_0) |
---|
827 | AC_DEFINE(DECL_SRAND48_0) |
---|
828 | AC_DEFINE(DECL_SYSLOG_0) |
---|
829 | AC_DEFINE(DECL_TIMEOFDAY_0) |
---|
830 | ;; |
---|
831 | *-*-osf[[45]]*) |
---|
832 | AC_DEFINE(DECL_PLOCK_0) |
---|
833 | AC_DEFINE(DECL_STIME_1) |
---|
834 | ;; |
---|
835 | *-*-riscos4*) |
---|
836 | AC_DEFINE(DECL_ADJTIME_0) |
---|
837 | AC_DEFINE(DECL_BZERO_0) |
---|
838 | AC_DEFINE(DECL_IOCTL_0) |
---|
839 | AC_DEFINE(DECL_IPC_0) |
---|
840 | AC_DEFINE(DECL_MEMMOVE_0) |
---|
841 | AC_DEFINE(DECL_MKTEMP_0) |
---|
842 | AC_DEFINE(DECL_RENAME_0) |
---|
843 | AC_DEFINE(DECL_SELECT_0) |
---|
844 | AC_DEFINE(DECL_SETITIMER_0) |
---|
845 | AC_DEFINE(DECL_SETPRIORITY_0) |
---|
846 | AC_DEFINE(DECL_STDIO_0) |
---|
847 | AC_DEFINE(DECL_STRTOL_0) |
---|
848 | AC_DEFINE(DECL_SYSLOG_0) |
---|
849 | AC_DEFINE(DECL_TIME_0) |
---|
850 | AC_DEFINE(DECL_TIMEOFDAY_0) |
---|
851 | AC_DEFINE(DECL_TOLOWER_0) |
---|
852 | ;; |
---|
853 | *-*-solaris2*) |
---|
854 | AC_DEFINE(DECL_MKSTEMP_0) |
---|
855 | AC_DEFINE(DECL_SETPRIORITY_1) |
---|
856 | case "$target" in |
---|
857 | *-*-solaris2.4) |
---|
858 | AC_DEFINE(DECL_TIMEOFDAY_0) |
---|
859 | ;; |
---|
860 | esac |
---|
861 | ;; |
---|
862 | *-*-sunos4*) |
---|
863 | AC_DEFINE(DECL_ADJTIME_0) |
---|
864 | AC_DEFINE(DECL_BCOPY_0) |
---|
865 | AC_DEFINE(DECL_BZERO_0) |
---|
866 | AC_DEFINE(DECL_IOCTL_0) |
---|
867 | AC_DEFINE(DECL_IPC_0) |
---|
868 | AC_DEFINE(DECL_MEMMOVE_0) |
---|
869 | AC_DEFINE(DECL_MKTEMP_0) |
---|
870 | AC_DEFINE(DECL_MKSTEMP_0) |
---|
871 | AC_DEFINE(DECL_MRAND48_0) |
---|
872 | AC_DEFINE(DECL_RENAME_0) |
---|
873 | AC_DEFINE(DECL_SELECT_0) |
---|
874 | AC_DEFINE(DECL_SETITIMER_0) |
---|
875 | AC_DEFINE(DECL_SETPRIORITY_0) |
---|
876 | AC_DEFINE(DECL_SIGVEC_0) |
---|
877 | AC_DEFINE(DECL_SRAND48_0) |
---|
878 | case "`basename $ac_cv_prog_CC`" in |
---|
879 | acc*) ;; |
---|
880 | *) AC_DEFINE(DECL_STDIO_0) |
---|
881 | ;; |
---|
882 | esac |
---|
883 | AC_DEFINE(DECL_STRTOL_0) |
---|
884 | AC_DEFINE(DECL_SYSLOG_0) |
---|
885 | AC_DEFINE(DECL_TIME_0) |
---|
886 | AC_DEFINE(DECL_TIMEOFDAY_0) |
---|
887 | AC_DEFINE(DECL_TOLOWER_0) |
---|
888 | AC_DEFINE(DECL_TOUPPER_0) |
---|
889 | AC_DEFINE(DECL_STRERROR_0) |
---|
890 | ;; |
---|
891 | *-*-ultrix4*) |
---|
892 | AC_DEFINE(DECL_ADJTIME_0) |
---|
893 | AC_DEFINE(DECL_BZERO_0) |
---|
894 | AC_DEFINE(DECL_CFSETISPEED_0) |
---|
895 | AC_DEFINE(DECL_IOCTL_0) |
---|
896 | AC_DEFINE(DECL_IPC_0) |
---|
897 | AC_DEFINE(DECL_MKTEMP_0) |
---|
898 | AC_DEFINE(DECL_MRAND48_0) |
---|
899 | AC_DEFINE(DECL_NLIST_0) |
---|
900 | AC_DEFINE(DECL_PLOCK_0) |
---|
901 | AC_DEFINE(DECL_SELECT_0) |
---|
902 | AC_DEFINE(DECL_SETITIMER_0) |
---|
903 | AC_DEFINE(DECL_SETPRIORITY_0) |
---|
904 | AC_DEFINE(DECL_SRAND48_0) |
---|
905 | AC_DEFINE(DECL_STIME_0) |
---|
906 | AC_DEFINE(DECL_SYSLOG_0) |
---|
907 | AC_DEFINE(DECL_TIMEOFDAY_0) |
---|
908 | ;; |
---|
909 | esac |
---|
910 | |
---|
911 | case "$target" in |
---|
912 | *-*-sco3.2*) |
---|
913 | AC_DEFINE(TERMIOS_NEEDS__SVID3) |
---|
914 | ;; |
---|
915 | esac |
---|
916 | |
---|
917 | AC_CACHE_CHECK(if we should use a streams device for ifconfig, |
---|
918 | ac_cv_var_use_streams_device_for_ifconfig, |
---|
919 | ac_cv_var_use_streams_device_for_ifconfig=no) |
---|
920 | |
---|
921 | AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop, |
---|
922 | [ans=no |
---|
923 | case "$target" in |
---|
924 | *-*-hpux[[567]]*) |
---|
925 | ans=yes |
---|
926 | ;; |
---|
927 | esac |
---|
928 | ac_cv_var_rcvbuf_slop=$ans]) |
---|
929 | case "$ac_cv_var_rcvbuf_slop" in |
---|
930 | yes) AC_DEFINE(NEED_RCVBUF_SLOP) ;; |
---|
931 | esac |
---|
932 | |
---|
933 | AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket, |
---|
934 | [ans=yes |
---|
935 | case "$target" in |
---|
936 | *-*-domainos) |
---|
937 | ans=no |
---|
938 | ;; |
---|
939 | *-*-linux*) |
---|
940 | ans=no |
---|
941 | ;; |
---|
942 | esac |
---|
943 | ac_cv_var_open_bcast_socket=$ans]) |
---|
944 | case "$ac_cv_var_open_bcast_socket" in |
---|
945 | yes) AC_DEFINE(OPEN_BCAST_SOCKET) ;; |
---|
946 | esac |
---|
947 | |
---|
948 | AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig, |
---|
949 | [ans=no |
---|
950 | case "$target" in |
---|
951 | *-*-hpux*) |
---|
952 | ans=yes |
---|
953 | ;; |
---|
954 | esac |
---|
955 | ac_cv_var_hpux_findconfig=$ans]) |
---|
956 | case "$ac_cv_var_hpux_findconfig" in |
---|
957 | yes) AC_DEFINE(NEED_HPUX_FINDCONFIG) ;; |
---|
958 | esac |
---|
959 | |
---|
960 | AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid, |
---|
961 | [case "$target" in |
---|
962 | *-*-hpux[[567]]*) |
---|
963 | ans=no |
---|
964 | ;; |
---|
965 | *-*-hpux*) |
---|
966 | ans=yes |
---|
967 | ;; |
---|
968 | *-*-linux*) |
---|
969 | ans=yes |
---|
970 | ;; |
---|
971 | *-*-sunos3*) |
---|
972 | ans=yes |
---|
973 | ;; |
---|
974 | *-*-ultrix2*) |
---|
975 | ans=yes |
---|
976 | ;; |
---|
977 | *) |
---|
978 | ans=no |
---|
979 | ;; |
---|
980 | esac |
---|
981 | ac_cv_arg_setpgrp_negpid=$ans]) |
---|
982 | case "$ac_cv_arg_setpgrp_negpid" in |
---|
983 | yes) AC_DEFINE(UDP_BACKWARDS_SETOWN) ;; |
---|
984 | esac |
---|
985 | |
---|
986 | AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown, |
---|
987 | [case "$target" in |
---|
988 | *-*-bsdi[[23]]*) |
---|
989 | ans=yes |
---|
990 | ;; |
---|
991 | *-*-freebsd*) |
---|
992 | ans=yes |
---|
993 | ;; |
---|
994 | *-*-netbsd*) |
---|
995 | ans=yes |
---|
996 | ;; |
---|
997 | *-*-openbsd*) |
---|
998 | ans=yes |
---|
999 | ;; |
---|
1000 | *-*-osf*) |
---|
1001 | ans=yes |
---|
1002 | ;; |
---|
1003 | *) ans=no |
---|
1004 | ;; |
---|
1005 | esac |
---|
1006 | ac_cv_func_ctty_for_f_setown=$ans]) |
---|
1007 | case "$ac_cv_func_ctty_for_f_setown" in |
---|
1008 | yes) AC_DEFINE(USE_FSETOWNCTTY) ;; |
---|
1009 | esac |
---|
1010 | |
---|
1011 | ntp_warning='GRONK' |
---|
1012 | AC_MSG_CHECKING(if we'll use clock_settime or settimeofday or stime) |
---|
1013 | case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in |
---|
1014 | yes*) |
---|
1015 | ntp_warning='' |
---|
1016 | ans='clock_settime()' |
---|
1017 | ;; |
---|
1018 | noyes*) |
---|
1019 | ntp_warning='But clock_settime() would be better (if we had it)' |
---|
1020 | ans='settimeofday()' |
---|
1021 | ;; |
---|
1022 | nonoyes) |
---|
1023 | ntp_warning='Which is the worst of the three' |
---|
1024 | ans='stime()' |
---|
1025 | ;; |
---|
1026 | *) |
---|
1027 | case "$host" in |
---|
1028 | $target) ntp_warning='Which leaves us with nothing to use!' |
---|
1029 | ans=none |
---|
1030 | ;; |
---|
1031 | esac |
---|
1032 | esac |
---|
1033 | AC_MSG_RESULT($ans) |
---|
1034 | case "$ntp_warning" in |
---|
1035 | '') ;; |
---|
1036 | *) AC_MSG_WARN(*** $ntp_warning ***) |
---|
1037 | ;; |
---|
1038 | esac |
---|
1039 | |
---|
1040 | AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug, |
---|
1041 | [case "$target" in |
---|
1042 | *-*-solaris2.4*) |
---|
1043 | ans=yes |
---|
1044 | ;; |
---|
1045 | *) ans=no |
---|
1046 | ;; |
---|
1047 | esac |
---|
1048 | ac_cv_var_syscall_bug=$ans]) |
---|
1049 | case "$ac_cv_var_syscall_bug" in |
---|
1050 | yes) AC_DEFINE(SYSCALL_BUG) ;; |
---|
1051 | esac |
---|
1052 | |
---|
1053 | AC_CACHE_CHECK(for Streams/TLI, ac_cv_var_streams_tli, |
---|
1054 | [ case "$ac_cv_header_sys_stropts_h" in |
---|
1055 | yes) |
---|
1056 | ans=no |
---|
1057 | # There must be a better way... |
---|
1058 | case "$target" in |
---|
1059 | *-*-ptx*) |
---|
1060 | ans=yes |
---|
1061 | ;; |
---|
1062 | esac |
---|
1063 | ;; |
---|
1064 | esac |
---|
1065 | ac_cv_var_streams_tli=$ans]) |
---|
1066 | case "$ac_cv_var_streams_tli" in |
---|
1067 | yes) |
---|
1068 | AC_DEFINE(STREAMS_TLI) |
---|
1069 | ;; |
---|
1070 | esac |
---|
1071 | |
---|
1072 | AC_CACHE_CHECK(for SIGIO, ac_cv_hdr_def_sigio, |
---|
1073 | AC_EGREP_CPP(yes, |
---|
1074 | [#include <signal.h> |
---|
1075 | #ifdef SIGIO |
---|
1076 | yes |
---|
1077 | #endif |
---|
1078 | ], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no)) |
---|
1079 | |
---|
1080 | dnl Override those system that have a losing SIGIO |
---|
1081 | AC_CACHE_CHECK(if we want to use signalled IO, ac_cv_var_signalled_io, |
---|
1082 | [ans=no |
---|
1083 | case "$ac_cv_hdr_def_sigio" in |
---|
1084 | yes) |
---|
1085 | ans=yes |
---|
1086 | case "$target" in |
---|
1087 | alpha*-dec-osf4*|alpha*-dec-osf5*) |
---|
1088 | ans=no |
---|
1089 | ;; |
---|
1090 | *-convex-*) |
---|
1091 | ans=no |
---|
1092 | ;; |
---|
1093 | *-dec-*) |
---|
1094 | ans=no |
---|
1095 | ;; |
---|
1096 | *-pc-cygwin*) |
---|
1097 | ans=no |
---|
1098 | ;; |
---|
1099 | *-sni-sysv*) |
---|
1100 | ans=no |
---|
1101 | ;; |
---|
1102 | *-univel-sysv*) |
---|
1103 | ans=no |
---|
1104 | ;; |
---|
1105 | *-*-irix6*) |
---|
1106 | ans=no |
---|
1107 | ;; |
---|
1108 | *-*-freebsd*) |
---|
1109 | ans=no |
---|
1110 | ;; |
---|
1111 | *-*-linux*) |
---|
1112 | ans=no |
---|
1113 | ;; |
---|
1114 | esac |
---|
1115 | ;; |
---|
1116 | esac |
---|
1117 | ac_cv_var_signalled_io=$ans]) |
---|
1118 | case "$ac_cv_var_signalled_io" in |
---|
1119 | yes) AC_DEFINE(HAVE_SIGNALED_IO) ;; |
---|
1120 | esac |
---|
1121 | |
---|
1122 | AC_CACHE_CHECK(for SIGPOLL, ac_cv_hdr_def_sigpoll, |
---|
1123 | AC_EGREP_CPP(yes, |
---|
1124 | [#include <signal.h> |
---|
1125 | #ifdef SIGPOLL |
---|
1126 | yes |
---|
1127 | #endif |
---|
1128 | ], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no)) |
---|
1129 | |
---|
1130 | AC_CACHE_CHECK(for SIGSYS, ac_cv_hdr_def_sigsys, |
---|
1131 | AC_EGREP_CPP(yes, |
---|
1132 | [#include <signal.h> |
---|
1133 | #ifdef SIGSYS |
---|
1134 | yes |
---|
1135 | #endif |
---|
1136 | ], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no)) |
---|
1137 | |
---|
1138 | AC_CACHE_CHECK(if we can use SIGPOLL for UDP I/O, ac_cv_var_use_udp_sigpoll, |
---|
1139 | [ans=no |
---|
1140 | case "$ac_cv_hdr_def_sigpoll" in |
---|
1141 | yes) |
---|
1142 | case "$target" in |
---|
1143 | mips-sgi-irix*) |
---|
1144 | ans=no |
---|
1145 | ;; |
---|
1146 | vax-dec-bsd) |
---|
1147 | ans=no |
---|
1148 | ;; |
---|
1149 | *-pc-cygwin*) |
---|
1150 | ans=no |
---|
1151 | ;; |
---|
1152 | *-sni-sysv*) |
---|
1153 | ans=no |
---|
1154 | ;; |
---|
1155 | *-*-aix4*) |
---|
1156 | ans=no |
---|
1157 | ;; |
---|
1158 | *-*-hpux*) |
---|
1159 | ans=no |
---|
1160 | ;; |
---|
1161 | *-*-linux*) |
---|
1162 | ans=no |
---|
1163 | ;; |
---|
1164 | *-*-osf*) |
---|
1165 | ans=no |
---|
1166 | ;; |
---|
1167 | *-*-sunos*) |
---|
1168 | ans=no |
---|
1169 | ;; |
---|
1170 | *-*-ultrix*) |
---|
1171 | ans=no |
---|
1172 | ;; |
---|
1173 | *) ans=yes |
---|
1174 | ;; |
---|
1175 | esac |
---|
1176 | ;; |
---|
1177 | esac |
---|
1178 | ac_cv_var_use_udp_sigpoll=$ans]) |
---|
1179 | case "$ac_cv_var_use_udp_sigpoll" in |
---|
1180 | yes) AC_DEFINE(USE_UDP_SIGPOLL) ;; |
---|
1181 | esac |
---|
1182 | |
---|
1183 | AC_CACHE_CHECK(if we can use SIGPOLL for TTY I/O, ac_cv_var_use_tty_sigpoll, |
---|
1184 | [ans=no |
---|
1185 | case "$ac_cv_hdr_def_sigpoll" in |
---|
1186 | yes) |
---|
1187 | case "$target" in |
---|
1188 | mips-sgi-irix*) |
---|
1189 | ans=no |
---|
1190 | ;; |
---|
1191 | vax-dec-bsd) |
---|
1192 | ans=no |
---|
1193 | ;; |
---|
1194 | *-pc-cygwin*) |
---|
1195 | ans=no |
---|
1196 | ;; |
---|
1197 | *-sni-sysv*) |
---|
1198 | ans=no |
---|
1199 | ;; |
---|
1200 | *-*-aix4*) |
---|
1201 | ans=no |
---|
1202 | ;; |
---|
1203 | *-*-hpux*) |
---|
1204 | ans=no |
---|
1205 | ;; |
---|
1206 | *-*-linux*) |
---|
1207 | ans=no |
---|
1208 | ;; |
---|
1209 | *-*-osf*) |
---|
1210 | ans=no |
---|
1211 | ;; |
---|
1212 | *-*-sunos*) |
---|
1213 | ans=no |
---|
1214 | ;; |
---|
1215 | *-*-ultrix*) |
---|
1216 | ans=no |
---|
1217 | ;; |
---|
1218 | *) ans=yes |
---|
1219 | ;; |
---|
1220 | esac |
---|
1221 | ;; |
---|
1222 | esac |
---|
1223 | ac_cv_var_use_tty_sigpoll=$ans]) |
---|
1224 | case "$ac_cv_var_use_tty_sigpoll" in |
---|
1225 | yes) AC_DEFINE(USE_TTY_SIGPOLL) ;; |
---|
1226 | esac |
---|
1227 | |
---|
1228 | case "$ac_cv_header_sys_sio_h" in |
---|
1229 | yes) |
---|
1230 | AC_CACHE_CHECK(sys/sio.h for TIOCDCDTIMESTAMP, ac_cv_hdr_def_tiocdcdtimestamp, |
---|
1231 | AC_EGREP_CPP(yes, |
---|
1232 | [#include <sys/sio.h> |
---|
1233 | #ifdef TIOCDCDTIMESTAMP |
---|
1234 | yes |
---|
1235 | #endif |
---|
1236 | ], ac_cv_hdr_def_tiocdcdtimestamp=yes, ac_cv_hdr_def_tiocdcdtimestamp=no)) |
---|
1237 | ;; |
---|
1238 | esac |
---|
1239 | |
---|
1240 | case "$ac_cv_hdr_def_tiocdcdtimestamp" in |
---|
1241 | yes) |
---|
1242 | ac_cv_var_oncore_ok=yes |
---|
1243 | ;; |
---|
1244 | esac |
---|
1245 | |
---|
1246 | AC_CACHE_CHECK(if nlist() values might require extra indirection, |
---|
1247 | ac_cv_var_nlist_extra_indirection, |
---|
1248 | [ans=no |
---|
1249 | case "$target" in |
---|
1250 | *-*-aix*) |
---|
1251 | ans=yes |
---|
1252 | ;; |
---|
1253 | esac |
---|
1254 | ac_cv_var_nlist_extra_indirection=$ans]) |
---|
1255 | case "$ac_cv_var_nlist_extra_indirection" in |
---|
1256 | yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION) ;; |
---|
1257 | esac |
---|
1258 | |
---|
1259 | AC_CACHE_CHECK(for a minimum recommended value of tickadj, |
---|
1260 | ac_cv_var_min_rec_tickadj, |
---|
1261 | [ans=no |
---|
1262 | case "$target" in |
---|
1263 | *-*-aix*) |
---|
1264 | ans=40 |
---|
1265 | ;; |
---|
1266 | esac |
---|
1267 | ac_cv_var_min_rec_tickadj=$ans]) |
---|
1268 | case "$ac_cv_var_min_rec_tickadj" in |
---|
1269 | ''|no) ;; |
---|
1270 | *) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj) ;; |
---|
1271 | esac |
---|
1272 | |
---|
1273 | AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR, |
---|
1274 | ac_cv_var_no_parenb_ignpar, |
---|
1275 | [ans=no |
---|
1276 | case "$target" in |
---|
1277 | i?86-*-linux*) |
---|
1278 | ans=yes |
---|
1279 | ;; |
---|
1280 | mips-sgi-irix*) |
---|
1281 | ans=yes |
---|
1282 | ;; |
---|
1283 | i?86-*-freebsd[[123]].*) |
---|
1284 | ;; |
---|
1285 | i?86-*-freebsd*) |
---|
1286 | ans=yes |
---|
1287 | ;; |
---|
1288 | esac |
---|
1289 | ac_cv_var_no_parenb_ignpar=$ans]) |
---|
1290 | case "$ac_cv_var_no_parenb_ignpar" in |
---|
1291 | yes) AC_DEFINE(NO_PARENB_IGNPAR) ;; |
---|
1292 | esac |
---|
1293 | |
---|
1294 | AC_MSG_CHECKING(if we're including debugging code) |
---|
1295 | AC_ARG_ENABLE(debugging, [ --enable-debugging + include debugging code], |
---|
1296 | [ntp_ok=$enableval], [ntp_ok=yes]) |
---|
1297 | if test "$ntp_ok" = "yes"; then |
---|
1298 | AC_DEFINE(DEBUG) |
---|
1299 | fi |
---|
1300 | AC_MSG_RESULT($ntp_ok) |
---|
1301 | |
---|
1302 | AC_MSG_CHECKING(for a the number of minutes in a DST adjustment) |
---|
1303 | AC_ARG_ENABLE(dst_minutes, [ --enable-dst-minutes=60 + minutes per DST adjustment], |
---|
1304 | [ans=$enableval], [ans=60]) |
---|
1305 | AC_DEFINE_UNQUOTED(DSTMINUTES, $ans) |
---|
1306 | AC_MSG_RESULT($ans) |
---|
1307 | |
---|
1308 | AC_CACHE_CHECK(if we have the tty_clk line discipline/streams module, |
---|
1309 | ac_cv_var_tty_clk, |
---|
1310 | [case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in |
---|
1311 | *yes*) ac_cv_var_tty_clk=yes ;; |
---|
1312 | esac]) |
---|
1313 | case "$ac_cv_var_tty_clk" in |
---|
1314 | yes) AC_DEFINE(TTYCLK) ;; |
---|
1315 | esac |
---|
1316 | |
---|
1317 | AC_CACHE_CHECK(for the ppsclock streams module, |
---|
1318 | ac_cv_var_ppsclock, |
---|
1319 | ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev) |
---|
1320 | case "$ac_cv_var_ppsclock" in |
---|
1321 | yes) AC_DEFINE(PPS) ;; |
---|
1322 | esac |
---|
1323 | |
---|
1324 | AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast, |
---|
1325 | [ac_cv_var_mcast=no |
---|
1326 | case "$target" in |
---|
1327 | i386-sequent-sysv4) ;; |
---|
1328 | *) AC_EGREP_CPP(yes, |
---|
1329 | [#include <netinet/in.h> |
---|
1330 | #ifdef IP_ADD_MEMBERSHIP |
---|
1331 | yes |
---|
1332 | #endif |
---|
1333 | ], ac_cv_var_mcast=yes) ;; |
---|
1334 | esac]) |
---|
1335 | case "$ac_cv_var_mcast" in |
---|
1336 | yes) AC_DEFINE(MCAST) ;; |
---|
1337 | esac |
---|
1338 | |
---|
1339 | AC_CACHE_CHECK([[availability of ntp_{adj,get}time()]], ac_cv_var_ntp_syscalls, |
---|
1340 | [ac_cv_var_ntp_syscalls=no |
---|
1341 | case "$ac_cv_func___adjtimex" in |
---|
1342 | yes) |
---|
1343 | ac_cv_var_ntp_syscalls=libc |
---|
1344 | ;; |
---|
1345 | *) case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime" in |
---|
1346 | yesyes) |
---|
1347 | ac_cv_var_ntp_syscalls=libc |
---|
1348 | ;; |
---|
1349 | *) AC_EGREP_CPP(yes, |
---|
1350 | [#include <sys/syscall.h> |
---|
1351 | #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime) |
---|
1352 | yes |
---|
1353 | #endif |
---|
1354 | ], ac_cv_var_ntp_syscalls=kernel) |
---|
1355 | ;; |
---|
1356 | esac |
---|
1357 | ;; |
---|
1358 | esac]) |
---|
1359 | case "$ac_cv_var_ntp_syscalls" in |
---|
1360 | libc) |
---|
1361 | AC_DEFINE(NTP_SYSCALLS_LIBC) |
---|
1362 | ;; |
---|
1363 | kernel) |
---|
1364 | AC_DEFINE(NTP_SYSCALLS_STD) |
---|
1365 | ;; |
---|
1366 | *) |
---|
1367 | ;; |
---|
1368 | esac |
---|
1369 | |
---|
1370 | AC_CACHE_CHECK(if sys/timex.h has STA_FLL, ac_cv_var_sta_fll, |
---|
1371 | [AC_EGREP_CPP(yes, |
---|
1372 | [#include <sys/timex.h> |
---|
1373 | #ifdef STA_FLL |
---|
1374 | yes |
---|
1375 | #endif |
---|
1376 | ], ac_cv_var_sta_fll=yes, ac_cv_var_sta_fll=no)]) |
---|
1377 | |
---|
1378 | AC_CACHE_CHECK(if we have kernel PLL support, ac_cv_var_kernel_pll, |
---|
1379 | [dnl ac_cv_var_ntp_syscalls is {no,libc,kernel} |
---|
1380 | case "$ac_cv_header_sys_timex_h$ac_cv_struct_ntptimeval$ac_cv_var_sta_fll$ac_cv_var_ntp_syscalls" in |
---|
1381 | *no*) |
---|
1382 | ac_cv_var_kernel_pll=no |
---|
1383 | ;; |
---|
1384 | *) ac_cv_var_kernel_pll=yes |
---|
1385 | ;; |
---|
1386 | esac]) |
---|
1387 | case "$ac_cv_var_kernel_pll" in |
---|
1388 | yes) |
---|
1389 | AC_DEFINE(KERNEL_PLL) |
---|
1390 | ;; |
---|
1391 | esac |
---|
1392 | |
---|
1393 | AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer, |
---|
1394 | [ans=no |
---|
1395 | case "$target" in |
---|
1396 | *-fujitsu-uxp*) |
---|
1397 | ans=yes |
---|
1398 | ;; |
---|
1399 | *-ncr-sysv4*) |
---|
1400 | ans=yes |
---|
1401 | ;; |
---|
1402 | *-univel-sysv*) |
---|
1403 | ans=yes |
---|
1404 | ;; |
---|
1405 | esac |
---|
1406 | ac_cv_var_size_returned_in_buffer=$ans]) |
---|
1407 | case "$ac_cv_var_size_returned_in_buffer" in |
---|
1408 | yes) AC_DEFINE(SIZE_RETURNED_IN_BUFFER) ;; |
---|
1409 | esac |
---|
1410 | |
---|
1411 | dnl AC_CACHE_CHECK(if we want GDT surveying code, ac_cv_var_gdt_surveying, |
---|
1412 | dnl [AC_ARG_ENABLE(gdt-surveying, [ --enable-gdt-surveying - include GDT survey code], |
---|
1413 | dnl [ans=$enableval], [ans=no]) |
---|
1414 | dnl ac_cv_var_gdt_surveying=$ans]) |
---|
1415 | dnl case "$ac_cv_var_gdt_surveying" in |
---|
1416 | dnl yes) AC_DEFINE(GDT_SURVEYING) ;; |
---|
1417 | dnl esac |
---|
1418 | |
---|
1419 | # Check for ioctls TIOCGPPSEV |
---|
1420 | AC_MSG_CHECKING(ioctl TIOCGPPSEV) |
---|
1421 | if test "$ac_cv_header_termios_h" = "yes"; then |
---|
1422 | AC_EGREP_CPP(yes, |
---|
1423 | [#include <termios.h> |
---|
1424 | #ifdef TIOCGPPSEV |
---|
1425 | yes |
---|
1426 | #endif |
---|
1427 | ], ntp_ok=yes, ntp_ok=no) |
---|
1428 | else |
---|
1429 | ntp_ok=no |
---|
1430 | fi |
---|
1431 | if test "$ntp_ok" = "yes"; then |
---|
1432 | AC_DEFINE(HAVE_TIOCGPPSEV) |
---|
1433 | ac_cv_var_oncore_ok=yes |
---|
1434 | fi |
---|
1435 | AC_MSG_RESULT($ntp_ok) |
---|
1436 | |
---|
1437 | # Check for ioctls TIOCSPPS |
---|
1438 | AC_MSG_CHECKING(ioctl TIOCSPPS) |
---|
1439 | if test "$ac_cv_header_termios_h" = "yes"; then |
---|
1440 | AC_EGREP_CPP(yes, |
---|
1441 | [#include <termios.h> |
---|
1442 | #ifdef TIOCSPPS |
---|
1443 | yes |
---|
1444 | #endif |
---|
1445 | ], ntp_ok=yes, ntp_ok=no) |
---|
1446 | else |
---|
1447 | ntp_ok=no |
---|
1448 | fi |
---|
1449 | |
---|
1450 | if test "$ntp_ok" = "yes"; then |
---|
1451 | AC_DEFINE(HAVE_TIOCSPPS) |
---|
1452 | fi |
---|
1453 | AC_MSG_RESULT($ntp_ok) |
---|
1454 | |
---|
1455 | # Check for ioctls CIOGETEV |
---|
1456 | AC_MSG_CHECKING(ioctl CIOGETEV) |
---|
1457 | if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then |
---|
1458 | AC_EGREP_CPP(yes, |
---|
1459 | [#include <sys/ppsclock.h> |
---|
1460 | #ifdef CIOGETEV |
---|
1461 | yes |
---|
1462 | #endif |
---|
1463 | ], ntp_ok=yes, ntp_ok=no) |
---|
1464 | else |
---|
1465 | ntp_ok=no |
---|
1466 | fi |
---|
1467 | if test "$ntp_ok" = "yes"; then |
---|
1468 | ac_cv_var_oncore_ok=yes |
---|
1469 | AC_DEFINE(HAVE_CIOGETEV) |
---|
1470 | fi |
---|
1471 | AC_MSG_RESULT($ntp_ok) |
---|
1472 | |
---|
1473 | |
---|
1474 | # ATOM/PPSAPI stuff. |
---|
1475 | |
---|
1476 | # ATOM used to require struct timespec, but that's been fixed now. |
---|
1477 | |
---|
1478 | # case "$ac_cv_struct_timespec" in |
---|
1479 | # 'yes') |
---|
1480 | # ac_cv_var_atom_ok=yes |
---|
1481 | # ;; |
---|
1482 | # esac |
---|
1483 | ac_cv_var_atom_ok=yes |
---|
1484 | |
---|
1485 | # Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff. |
---|
1486 | |
---|
1487 | # The PPSAPI headers need "inline" ($ac_cv_c_inline='inline') |
---|
1488 | |
---|
1489 | # The PPSAPI needs ATOM |
---|
1490 | |
---|
1491 | # The PPSAPI needs struct timespec. |
---|
1492 | |
---|
1493 | case "$ac_cv_c_inline$ac_cv_struct_timespec$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h" in |
---|
1494 | inlineyes*yes*) |
---|
1495 | AC_DEFINE(HAVE_PPSAPI) |
---|
1496 | ac_cv_var_oncore_ok=yes |
---|
1497 | ;; |
---|
1498 | esac |
---|
1499 | |
---|
1500 | # Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG |
---|
1501 | AC_CHECK_HEADER(linux/serial.h) |
---|
1502 | AC_MSG_CHECKING(ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG) |
---|
1503 | case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in |
---|
1504 | yesyes) |
---|
1505 | AC_EGREP_CPP(yes, |
---|
1506 | [#include <sys/time.h> |
---|
1507 | typedef int u_int; |
---|
1508 | |
---|
1509 | #include <sys/ppsclock.h> |
---|
1510 | #include <linux/serial.h> |
---|
1511 | |
---|
1512 | #ifdef TIOCGSERIAL |
---|
1513 | #ifdef TIOCSSERIAL |
---|
1514 | #ifdef ASYNC_PPS_CD_POS |
---|
1515 | #ifdef ASYNC_PPS_CD_NEG |
---|
1516 | #ifdef CIOGETEV |
---|
1517 | yes |
---|
1518 | #endif |
---|
1519 | #endif |
---|
1520 | #endif |
---|
1521 | #endif |
---|
1522 | #endif |
---|
1523 | ], ntp_ok=yes) |
---|
1524 | ;; |
---|
1525 | *) |
---|
1526 | ntp_ok=no |
---|
1527 | ;; |
---|
1528 | esac |
---|
1529 | if test "$ntp_ok" = "yes"; then |
---|
1530 | AC_DEFINE(HAVE_TIO_SERIAL_STUFF) |
---|
1531 | fi |
---|
1532 | AC_MSG_RESULT($ntp_ok) |
---|
1533 | |
---|
1534 | # Check for SHMEM_STATUS support |
---|
1535 | AC_MSG_CHECKING(SHMEM_STATUS support) |
---|
1536 | case "$ac_cv_header_sys_mman_h" in |
---|
1537 | yes) ntp_ok=yes ;; |
---|
1538 | *) ntp_ok=no ;; |
---|
1539 | esac |
---|
1540 | if test "$ntp_ok" = "yes"; then |
---|
1541 | AC_DEFINE(ONCORE_SHMEM_STATUS) |
---|
1542 | fi |
---|
1543 | AC_MSG_RESULT($ntp_ok) |
---|
1544 | |
---|
1545 | dnl dnl These are for OPT_PROGRAMS in authstuff/ |
---|
1546 | dnl AC_SUBST(AUTHCERT) |
---|
1547 | dnl AC_SUBST(AUTHSPEED) |
---|
1548 | dnl AC_SUBST(MD5DRIVER) |
---|
1549 | dnl AC_SUBST(KEYPARITY) |
---|
1550 | dnl AC_SUBST(MAKEIPFP) |
---|
1551 | dnl AC_SUBST(MAKEPC1) |
---|
1552 | dnl AC_SUBST(MAKEPC2) |
---|
1553 | dnl AC_SUBST(MAKESP) |
---|
1554 | dnl AC_SUBST(MKRANDKEYS) |
---|
1555 | dnl AC_SUBST(OMAKEIPFP) |
---|
1556 | dnl AC_SUBST(UNIXCERT) |
---|
1557 | |
---|
1558 | ntp_refclock=no |
---|
1559 | |
---|
1560 | AC_MSG_CHECKING(for hopf serial clock device) |
---|
1561 | AC_ARG_ENABLE(HOPFSERIAL, [ --enable-HOPFSERIAL + hopf serial clock device], |
---|
1562 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1563 | if test "$ntp_ok" = "yes"; then |
---|
1564 | ntp_refclock=yes |
---|
1565 | AC_DEFINE(CLOCK_HOPF_SERIAL) |
---|
1566 | fi |
---|
1567 | AC_MSG_RESULT($ntp_ok) |
---|
1568 | |
---|
1569 | AC_MSG_CHECKING(for hopf PCI clock 6039) |
---|
1570 | AC_ARG_ENABLE(HOPFPCI, [ --enable-HOPFPCI + hopf 6039 PCI board], |
---|
1571 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1572 | if test "$ntp_ok" = "yes"; then |
---|
1573 | ntp_refclock=yes |
---|
1574 | AC_DEFINE(CLOCK_HOPF_PCI) |
---|
1575 | fi |
---|
1576 | AC_MSG_RESULT($ntp_ok) |
---|
1577 | |
---|
1578 | # HPUX only, and by explicit request |
---|
1579 | AC_MSG_CHECKING(Datum/Bancomm bc635/VME interface) |
---|
1580 | AC_ARG_ENABLE(BANCOMM, [ --enable-BANCOMM - Datum/Bancomm bc635/VME interface], |
---|
1581 | [ntp_ok=$enableval], [ntp_ok=no]) |
---|
1582 | if test "$ntp_ok" = "yes"; then |
---|
1583 | ntp_refclock=yes |
---|
1584 | AC_DEFINE(CLOCK_BANC) |
---|
1585 | fi |
---|
1586 | AC_MSG_RESULT($ntp_ok) |
---|
1587 | case "$ntp_ok$target" in |
---|
1588 | yes*-*-hpux*) ;; |
---|
1589 | yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; |
---|
1590 | esac |
---|
1591 | |
---|
1592 | #HPUX only, and only by explicit request |
---|
1593 | AC_MSG_CHECKING(TrueTime GPS receiver/VME interface) |
---|
1594 | AC_ARG_ENABLE(GPSVME, [ --enable-GPSVME - TrueTime GPS receiver/VME interface], |
---|
1595 | [ntp_ok=$enableval], [ntp_ok=no]) |
---|
1596 | if test "$ntp_ok" = "yes"; then |
---|
1597 | ntp_refclock=yes |
---|
1598 | AC_DEFINE(CLOCK_GPSVME) |
---|
1599 | fi |
---|
1600 | AC_MSG_RESULT($ntp_ok) |
---|
1601 | case "$ntp_ok$target" in |
---|
1602 | yes*-*-hpux*) ;; |
---|
1603 | yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; |
---|
1604 | esac |
---|
1605 | |
---|
1606 | AC_MSG_CHECKING(for PCL720 clock support) |
---|
1607 | case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in |
---|
1608 | yesyesyes) |
---|
1609 | AC_DEFINE(CLOCK_PPS720) |
---|
1610 | ans=yes |
---|
1611 | ;; |
---|
1612 | *) |
---|
1613 | ans=no |
---|
1614 | ;; |
---|
1615 | esac |
---|
1616 | AC_MSG_RESULT($ans) |
---|
1617 | |
---|
1618 | AC_MSG_CHECKING(for SHM clock attached thru shared memory) |
---|
1619 | AC_ARG_ENABLE(SHM, [ --enable-SHM - SHM clock attached thru shared memory], |
---|
1620 | [ntp_ok=$enableval], [ntp_ok=no]) |
---|
1621 | if test "$ntp_ok" = "yes"; then |
---|
1622 | ntp_refclock=yes |
---|
1623 | AC_DEFINE(CLOCK_SHM) |
---|
1624 | fi |
---|
1625 | AC_MSG_RESULT($ntp_ok) |
---|
1626 | |
---|
1627 | AC_MSG_CHECKING(for default inclusion of all suitable non-PARSE clocks) |
---|
1628 | AC_ARG_ENABLE(all-clocks, [ --enable-all-clocks + include all suitable non-PARSE clocks:], |
---|
1629 | [ntp_eac=$enableval], [ntp_eac=yes]) |
---|
1630 | AC_MSG_RESULT($ntp_eac) |
---|
1631 | |
---|
1632 | AC_MSG_CHECKING(if we have support for PARSE clocks) |
---|
1633 | case "$ac_cv_var_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in |
---|
1634 | yes*yes*) |
---|
1635 | ntp_canparse=yes |
---|
1636 | ;; |
---|
1637 | *) ntp_canparse=no |
---|
1638 | ;; |
---|
1639 | esac |
---|
1640 | AC_MSG_RESULT($ntp_canparse) |
---|
1641 | |
---|
1642 | AC_MSG_CHECKING([if we have support for audio clocks]) |
---|
1643 | case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h" in |
---|
1644 | *yes*) |
---|
1645 | ntp_canaudio=yes |
---|
1646 | AC_DEFINE(HAVE_AUDIO, , [Do we have audio support?]) |
---|
1647 | ;; |
---|
1648 | *) ntp_canaudio=no ;; |
---|
1649 | esac |
---|
1650 | AC_MSG_RESULT($ntp_canaudio) |
---|
1651 | |
---|
1652 | # Requires modem control |
---|
1653 | AC_MSG_CHECKING(ACTS modem service) |
---|
1654 | AC_ARG_ENABLE(ACTS, [ --enable-ACTS + ACTS modem service], |
---|
1655 | [ntp_ok=$enableval], |
---|
1656 | [AC_EGREP_CPP(yes, |
---|
1657 | [#include <termios.h> |
---|
1658 | #ifdef HAVE_SYS_IOCTL_H |
---|
1659 | #include <sys/ioctl.h> |
---|
1660 | #endif |
---|
1661 | #ifdef TIOCMBIS |
---|
1662 | yes |
---|
1663 | #endif |
---|
1664 | ], ntp_ok=$ntp_eac, ntp_ok=no)]) |
---|
1665 | if test "$ntp_ok" = "yes"; then |
---|
1666 | ntp_refclock=yes |
---|
1667 | AC_DEFINE(CLOCK_ACTS) |
---|
1668 | fi |
---|
1669 | AC_MSG_RESULT($ntp_ok) |
---|
1670 | |
---|
1671 | AC_MSG_CHECKING(Arbiter 1088A/B GPS receiver) |
---|
1672 | AC_ARG_ENABLE(ARBITER, [ --enable-ARBITER + Arbiter 1088A/B GPS receiver], |
---|
1673 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1674 | if test "$ntp_ok" = "yes"; then |
---|
1675 | ntp_refclock=yes |
---|
1676 | AC_DEFINE(CLOCK_ARBITER) |
---|
1677 | fi |
---|
1678 | AC_MSG_RESULT($ntp_ok) |
---|
1679 | |
---|
1680 | AC_MSG_CHECKING(Arcron MSF receiver) |
---|
1681 | AC_ARG_ENABLE(ARCRON_MSF, [ --enable-ARCRON-MSF + Arcron MSF receiver], |
---|
1682 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1683 | if test "$ntp_ok" = "yes"; then |
---|
1684 | ntp_refclock=yes |
---|
1685 | AC_DEFINE(CLOCK_ARCRON_MSF) |
---|
1686 | fi |
---|
1687 | AC_MSG_RESULT($ntp_ok) |
---|
1688 | |
---|
1689 | AC_MSG_CHECKING(ATOM PPS interface) |
---|
1690 | AC_ARG_ENABLE(ATOM, [ --enable-ATOM s ATOM PPS interface], |
---|
1691 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1692 | case "$ac_cv_var_atom_ok" in |
---|
1693 | no) ntp_ok=no ;; |
---|
1694 | esac |
---|
1695 | if test "$ntp_ok" = "yes"; then |
---|
1696 | ntp_refclock=yes |
---|
1697 | AC_DEFINE(CLOCK_ATOM) |
---|
1698 | fi |
---|
1699 | AC_MSG_RESULT($ntp_ok) |
---|
1700 | |
---|
1701 | AC_MSG_CHECKING(Austron 2200A/2201A GPS receiver) |
---|
1702 | AC_ARG_ENABLE(AS2201, [ --enable-AS2201 + Austron 2200A/2201A GPS receiver], |
---|
1703 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1704 | if test "$ntp_ok" = "yes"; then |
---|
1705 | ntp_refclock=yes |
---|
1706 | AC_DEFINE(CLOCK_AS2201) |
---|
1707 | fi |
---|
1708 | AC_MSG_RESULT($ntp_ok) |
---|
1709 | |
---|
1710 | AC_MSG_CHECKING(CHU modem/decoder) |
---|
1711 | AC_ARG_ENABLE(CHU, [ --enable-CHU - CHU modem/decoder], |
---|
1712 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1713 | if test "$ntp_ok" = "yes"; then |
---|
1714 | ntp_refclock=yes |
---|
1715 | AC_DEFINE(CLOCK_CHU) |
---|
1716 | fi |
---|
1717 | AC_MSG_RESULT($ntp_ok) |
---|
1718 | ac_refclock_chu=$ntp_ok |
---|
1719 | |
---|
1720 | AC_MSG_CHECKING(CHU audio/decoder) |
---|
1721 | AC_ARG_ENABLE(AUDIO-CHU, [ --enable-AUDIO-CHU s CHU audio/decoder], |
---|
1722 | [ntp_ok=$enableval], |
---|
1723 | [case "$ntp_eac$ac_refclock_chu$ntp_canaudio" in |
---|
1724 | *no*) ntp_ok=no ;; |
---|
1725 | *) ntp_ok=yes ;; |
---|
1726 | esac]) |
---|
1727 | if test "$ntp_ok" = "yes"; then |
---|
1728 | AC_DEFINE(AUDIO_CHU) |
---|
1729 | fi |
---|
1730 | AC_MSG_RESULT($ntp_ok) |
---|
1731 | # We used to check for sunos/solaris target... |
---|
1732 | case "$ntp_ok$ac_refclock_chu$ntp_canaudio" in |
---|
1733 | yes*no*) AC_MSG_WARN(*** But the expected answer is...no ***) ;; |
---|
1734 | esac |
---|
1735 | |
---|
1736 | # Not under HP-UX |
---|
1737 | AC_MSG_CHECKING(Datum Programmable Time System) |
---|
1738 | AC_ARG_ENABLE(DATUM, [ --enable-DATUM s Datum Programmable Time System], |
---|
1739 | [ntp_ok=$enableval], |
---|
1740 | [case "$ac_cv_header_termios_h" in |
---|
1741 | yes) |
---|
1742 | ntp_ok=$ntp_eac |
---|
1743 | ;; |
---|
1744 | *) ntp_ok=no |
---|
1745 | ;; |
---|
1746 | esac]) |
---|
1747 | if test "$ntp_ok" = "yes"; then |
---|
1748 | ntp_refclock=yes |
---|
1749 | AC_DEFINE(CLOCK_DATUM) |
---|
1750 | fi |
---|
1751 | AC_MSG_RESULT($ntp_ok) |
---|
1752 | |
---|
1753 | AC_MSG_CHECKING(Forum Graphic GPS) |
---|
1754 | AC_ARG_ENABLE(FG, [ --enable-FG + Forum Graphic GPS], |
---|
1755 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1756 | if test "$ntp_ok" = "yes"; then |
---|
1757 | ntp_refclock=yes |
---|
1758 | AC_DEFINE(CLOCK_FG) |
---|
1759 | fi |
---|
1760 | AC_MSG_RESULT($ntp_ok) |
---|
1761 | |
---|
1762 | # Requires modem control |
---|
1763 | AC_MSG_CHECKING(Heath GC-1000 WWV/WWVH receiver) |
---|
1764 | AC_ARG_ENABLE(HEATH, [ --enable-HEATH s Heath GC-1000 WWV/WWVH receiver], |
---|
1765 | [ntp_ok=$enableval], |
---|
1766 | [AC_EGREP_CPP(yes, |
---|
1767 | [#include <termios.h> |
---|
1768 | #ifdef HAVE_SYS_IOCTL_H |
---|
1769 | #include <sys/ioctl.h> |
---|
1770 | #endif |
---|
1771 | #ifdef TIOCMBIS |
---|
1772 | yes |
---|
1773 | #endif |
---|
1774 | ], ntp_ok=$ntp_eac, ntp_ok=no)]) |
---|
1775 | if test "$ntp_ok" = "yes"; then |
---|
1776 | ntp_refclock=yes |
---|
1777 | AC_DEFINE(CLOCK_HEATH) |
---|
1778 | fi |
---|
1779 | AC_MSG_RESULT($ntp_ok) |
---|
1780 | |
---|
1781 | AC_MSG_CHECKING(HP 58503A GPS receiver) |
---|
1782 | AC_ARG_ENABLE(HPGPS, [ --enable-HPGPS + HP 58503A GPS receiver], |
---|
1783 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1784 | if test "$ntp_ok" = "yes"; then |
---|
1785 | ntp_refclock=yes |
---|
1786 | AC_DEFINE(CLOCK_HPGPS) |
---|
1787 | fi |
---|
1788 | AC_MSG_RESULT($ntp_ok) |
---|
1789 | |
---|
1790 | AC_MSG_CHECKING(Sun IRIG audio decoder) |
---|
1791 | AC_ARG_ENABLE(IRIG, [ --enable-IRIG s Sun IRIG audio decoder], |
---|
1792 | [ntp_ok=$enableval], |
---|
1793 | [case "$ntp_eac$ntp_canaudio" in |
---|
1794 | *no*) ntp_ok=no ;; |
---|
1795 | *) ntp_ok=yes ;; |
---|
1796 | esac]) |
---|
1797 | if test "$ntp_ok" = "yes"; then |
---|
1798 | ntp_refclock=yes |
---|
1799 | AC_DEFINE(CLOCK_IRIG) |
---|
1800 | fi |
---|
1801 | AC_MSG_RESULT($ntp_ok) |
---|
1802 | case "$ntp_ok$ntp_canaudio" in |
---|
1803 | yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;; |
---|
1804 | esac |
---|
1805 | |
---|
1806 | AC_MSG_CHECKING(for JJY receiver) |
---|
1807 | AC_ARG_ENABLE(JJY, [ --enable-JJY + JJY receiver], |
---|
1808 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1809 | if test "$ntp_ok" = "yes"; then |
---|
1810 | ntp_refclock=yes |
---|
1811 | AC_DEFINE(CLOCK_JJY) |
---|
1812 | fi |
---|
1813 | AC_MSG_RESULT($ntp_ok) |
---|
1814 | |
---|
1815 | AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver) |
---|
1816 | AC_ARG_ENABLE(LEITCH, [ --enable-LEITCH + Leitch CSD 5300 Master Clock System Driver], |
---|
1817 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1818 | if test "$ntp_ok" = "yes"; then |
---|
1819 | ntp_refclock=yes |
---|
1820 | AC_DEFINE(CLOCK_LEITCH) |
---|
1821 | fi |
---|
1822 | AC_MSG_RESULT($ntp_ok) |
---|
1823 | |
---|
1824 | AC_MSG_CHECKING(local clock reference) |
---|
1825 | AC_ARG_ENABLE(LOCAL-CLOCK, [ --enable-LOCAL-CLOCK + local clock reference], |
---|
1826 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1827 | if test "$ntp_ok" = "yes"; then |
---|
1828 | ntp_refclock=yes |
---|
1829 | AC_DEFINE(CLOCK_LOCAL) |
---|
1830 | fi |
---|
1831 | AC_MSG_RESULT($ntp_ok) |
---|
1832 | |
---|
1833 | AC_MSG_CHECKING(EES M201 MSF receiver) |
---|
1834 | AC_ARG_ENABLE(MSFEES, [ --enable-MSFEES + EES M201 MSF receiver], |
---|
1835 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1836 | if test "$ntp_ok" = "yes"; then |
---|
1837 | ntp_refclock=yes |
---|
1838 | AC_DEFINE(CLOCK_MSFEES) |
---|
1839 | fi |
---|
1840 | AC_MSG_RESULT($ntp_ok) |
---|
1841 | |
---|
1842 | # Not Ultrix |
---|
1843 | AC_MSG_CHECKING(Magnavox MX4200 GPS receiver) |
---|
1844 | AC_ARG_ENABLE(MX4200, [ --enable-MX4200 s Magnavox MX4200 GPS receiver], |
---|
1845 | [ntp_ok=$enableval], |
---|
1846 | [case "$ac_cv_var_ppsclock" in |
---|
1847 | yes) ntp_ok=$ntp_eac |
---|
1848 | ;; |
---|
1849 | *) ntp_ok=no |
---|
1850 | ;; |
---|
1851 | esac]) |
---|
1852 | if test "$ntp_ok" = "yes"; then |
---|
1853 | ntp_refclock=yes |
---|
1854 | AC_DEFINE(CLOCK_MX4200) |
---|
1855 | fi |
---|
1856 | AC_MSG_RESULT($ntp_ok) |
---|
1857 | case "$ntp_ok$target" in |
---|
1858 | yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; |
---|
1859 | esac |
---|
1860 | |
---|
1861 | AC_MSG_CHECKING(NMEA GPS receiver) |
---|
1862 | AC_ARG_ENABLE(NMEA, [ --enable-NMEA + NMEA GPS receiver], |
---|
1863 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1864 | if test "$ntp_ok" = "yes"; then |
---|
1865 | ntp_refclock=yes |
---|
1866 | AC_DEFINE(CLOCK_NMEA) |
---|
1867 | fi |
---|
1868 | AC_MSG_RESULT($ntp_ok) |
---|
1869 | |
---|
1870 | AC_MSG_CHECKING(for ONCORE Motorola VP/UT Oncore GPS) |
---|
1871 | AC_ARG_ENABLE(ONCORE, [ --enable-ONCORE s Motorola VP/UT Oncore GPS receiver], |
---|
1872 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1873 | case "$ac_cv_var_oncore_ok" in |
---|
1874 | no) ntp_ok=no ;; |
---|
1875 | esac |
---|
1876 | if test "$ntp_ok" = "yes"; then |
---|
1877 | ntp_refclock=yes |
---|
1878 | AC_DEFINE(CLOCK_ONCORE) |
---|
1879 | fi |
---|
1880 | AC_MSG_RESULT($ntp_ok) |
---|
1881 | |
---|
1882 | AC_MSG_CHECKING(for Palisade clock) |
---|
1883 | AC_ARG_ENABLE(PALISADE, [ --enable-PALISADE + Palisade clock], |
---|
1884 | [ntp_ok=$enableval], |
---|
1885 | [case "$ac_cv_header_termios_h" in |
---|
1886 | yes) |
---|
1887 | ntp_ok=$ntp_eac |
---|
1888 | ;; |
---|
1889 | *) ntp_ok=no |
---|
1890 | ;; |
---|
1891 | esac]) |
---|
1892 | |
---|
1893 | if test "$ntp_ok" = "yes"; then |
---|
1894 | ntp_refclock=yes |
---|
1895 | AC_DEFINE(CLOCK_PALISADE) |
---|
1896 | fi |
---|
1897 | AC_MSG_RESULT($ntp_ok) |
---|
1898 | |
---|
1899 | AC_MSG_CHECKING(PST/Traconex 1020 WWV/WWVH receiver) |
---|
1900 | AC_ARG_ENABLE(PST, [ --enable-PST + PST/Traconex 1020 WWV/WWVH receiver], |
---|
1901 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1902 | if test "$ntp_ok" = "yes"; then |
---|
1903 | ntp_refclock=yes |
---|
1904 | AC_DEFINE(CLOCK_PST) |
---|
1905 | fi |
---|
1906 | AC_MSG_RESULT($ntp_ok) |
---|
1907 | |
---|
1908 | # Not Ultrix |
---|
1909 | AC_MSG_CHECKING(Rockwell Jupiter GPS receiver) |
---|
1910 | AC_ARG_ENABLE(JUPITER, [ --enable-JUPITER s Rockwell Jupiter GPS receiver], |
---|
1911 | [ntp_ok=$enableval], |
---|
1912 | [case "$ac_cv_var_ppsclock" in |
---|
1913 | # yes) ntp_ok=$ntp_eac |
---|
1914 | # ;; |
---|
1915 | *) ntp_ok=no |
---|
1916 | ;; |
---|
1917 | esac]) |
---|
1918 | if test "$ntp_ok" = "yes"; then |
---|
1919 | ntp_refclock=yes |
---|
1920 | AC_DEFINE(CLOCK_JUPITER) |
---|
1921 | fi |
---|
1922 | AC_MSG_RESULT($ntp_ok) |
---|
1923 | case "$ntp_ok$target" in |
---|
1924 | yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;; |
---|
1925 | esac |
---|
1926 | |
---|
1927 | # Requires modem control |
---|
1928 | AC_MSG_CHECKING(PTB modem service) |
---|
1929 | AC_ARG_ENABLE(PTBACTS, [ --enable-PTBACTS s PTB modem service], |
---|
1930 | [ntp_ok=$enableval], |
---|
1931 | [AC_EGREP_CPP(yes, |
---|
1932 | [#include <termios.h> |
---|
1933 | #ifdef HAVE_SYS_IOCTL_H |
---|
1934 | #include <sys/ioctl.h> |
---|
1935 | #endif |
---|
1936 | #ifdef TIOCMBIS |
---|
1937 | yes |
---|
1938 | #endif |
---|
1939 | ], ntp_ok=$ntp_eac, ntp_ok=no)]) |
---|
1940 | if test "$ntp_ok" = "yes"; then |
---|
1941 | ntp_refclock=yes |
---|
1942 | AC_DEFINE(CLOCK_PTBACTS) |
---|
1943 | fi |
---|
1944 | AC_MSG_RESULT($ntp_ok) |
---|
1945 | |
---|
1946 | AC_MSG_CHECKING(KSI/Odetics TPRO/S GPS receiver/IRIG interface) |
---|
1947 | AC_ARG_ENABLE(TPRO, [ --enable-TPRO s KSI/Odetics TPRO/S GPS receiver/IRIG interface], |
---|
1948 | [ntp_ok=$enableval], |
---|
1949 | [case "$ac_cv_header_sys_tpro_h" in |
---|
1950 | yes) |
---|
1951 | ntp_ok=$ntp_eac |
---|
1952 | ;; |
---|
1953 | *) ntp_ok=no |
---|
1954 | ;; |
---|
1955 | esac]) |
---|
1956 | if test "$ntp_ok" = "yes"; then |
---|
1957 | ntp_refclock=yes |
---|
1958 | AC_DEFINE(CLOCK_TPRO) |
---|
1959 | fi |
---|
1960 | AC_MSG_RESULT($ntp_ok) |
---|
1961 | case "$ntp_ok$ac_cv_header_sys_tpro" in |
---|
1962 | yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;; |
---|
1963 | esac |
---|
1964 | |
---|
1965 | AC_MSG_CHECKING(TRAK 8810 GPS receiver) |
---|
1966 | AC_ARG_ENABLE(TRAK, [ --enable-TRAK + TRAK 8810 GPS receiver], |
---|
1967 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1968 | if test "$ntp_ok" = "yes"; then |
---|
1969 | ntp_refclock=yes |
---|
1970 | AC_DEFINE(CLOCK_TRAK) |
---|
1971 | fi |
---|
1972 | AC_MSG_RESULT($ntp_ok) |
---|
1973 | |
---|
1974 | AC_MSG_CHECKING(Chrono-log K-series WWVB receiver) |
---|
1975 | AC_ARG_ENABLE(CHRONOLOG, [ --enable-CHRONOLOG + Chrono-log K-series WWVB receiver], |
---|
1976 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1977 | if test "$ntp_ok" = "yes"; then |
---|
1978 | ntp_refclock=yes |
---|
1979 | AC_DEFINE(CLOCK_CHRONOLOG) |
---|
1980 | fi |
---|
1981 | AC_MSG_RESULT($ntp_ok) |
---|
1982 | |
---|
1983 | AC_MSG_CHECKING(Dumb generic hh:mm:ss local clock) |
---|
1984 | AC_ARG_ENABLE(DUMBCLOCK, [ --enable-DUMBCLOCK + Dumb generic hh:mm:ss local clock], |
---|
1985 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1986 | if test "$ntp_ok" = "yes"; then |
---|
1987 | ntp_refclock=yes |
---|
1988 | AC_DEFINE(CLOCK_DUMBCLOCK) |
---|
1989 | fi |
---|
1990 | AC_MSG_RESULT($ntp_ok) |
---|
1991 | |
---|
1992 | AC_MSG_CHECKING(Conrad parallel port radio clock) |
---|
1993 | AC_ARG_ENABLE(PCF, [ --enable-PCF + Conrad parallel port radio clock], |
---|
1994 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1995 | if test "$ntp_ok" = "yes"; then |
---|
1996 | ntp_refclock=yes |
---|
1997 | AC_DEFINE(CLOCK_PCF) |
---|
1998 | fi |
---|
1999 | AC_MSG_RESULT($ntp_ok) |
---|
2000 | |
---|
2001 | AC_MSG_CHECKING(Spectracom 8170/Netclock/2 WWVB receiver) |
---|
2002 | AC_ARG_ENABLE(SPECTRACOM, [ --enable-SPECTRACOM + Spectracom 8170/Netclock/2 WWVB receiver], |
---|
2003 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
2004 | if test "$ntp_ok" = "yes"; then |
---|
2005 | ntp_refclock=yes |
---|
2006 | AC_DEFINE(CLOCK_SPECTRACOM) |
---|
2007 | fi |
---|
2008 | AC_MSG_RESULT($ntp_ok) |
---|
2009 | |
---|
2010 | # Not on a vax-dec-bsd |
---|
2011 | AC_MSG_CHECKING(Kinemetrics/TrueTime receivers) |
---|
2012 | AC_ARG_ENABLE(TRUETIME, [ --enable-TRUETIME s Kinemetrics/TrueTime receivers], |
---|
2013 | [ntp_ok=$enableval], |
---|
2014 | [case "$target" in |
---|
2015 | vax-dec-bsd) |
---|
2016 | ntp_ok=no |
---|
2017 | ;; |
---|
2018 | *) |
---|
2019 | ntp_ok=$ntp_eac |
---|
2020 | ;; |
---|
2021 | esac]) |
---|
2022 | if test "$ntp_ok" = "yes"; then |
---|
2023 | ntp_refclock=yes |
---|
2024 | AC_DEFINE(CLOCK_TRUETIME) |
---|
2025 | fi |
---|
2026 | AC_MSG_RESULT($ntp_ok) |
---|
2027 | case "$ntp_ok$target" in |
---|
2028 | yesvax-dec-bsd) AC_MSG_WARN(*** But the expected answer is... no ***) ;; |
---|
2029 | esac |
---|
2030 | |
---|
2031 | AC_MSG_CHECKING(Ultralink M320 WWVB receiver) |
---|
2032 | AC_ARG_ENABLE(ULINK, [ --enable-ULINK + Ultralink WWVB receiver], |
---|
2033 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
2034 | if test "$ntp_ok" = "yes"; then |
---|
2035 | ntp_refclock=yes |
---|
2036 | AC_DEFINE(CLOCK_ULINK) |
---|
2037 | fi |
---|
2038 | AC_MSG_RESULT($ntp_ok) |
---|
2039 | |
---|
2040 | AC_MSG_CHECKING(WWV receiver) |
---|
2041 | AC_ARG_ENABLE(WWV, [ --enable-WWV + WWV Audio receiver], |
---|
2042 | [ntp_ok=$enableval], |
---|
2043 | [case "$ntp_eac$ntp_canaudio" in |
---|
2044 | *no*) ntp_ok=no ;; |
---|
2045 | *) ntp_ok=yes ;; |
---|
2046 | esac]) |
---|
2047 | if test "$ntp_ok" = "yes"; then |
---|
2048 | ntp_refclock=yes |
---|
2049 | AC_DEFINE(CLOCK_WWV) |
---|
2050 | fi |
---|
2051 | AC_MSG_RESULT($ntp_ok) |
---|
2052 | case "$ntp_ok$ntp_canaudio" in |
---|
2053 | yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;; |
---|
2054 | esac |
---|
2055 | |
---|
2056 | # Requires modem control |
---|
2057 | AC_MSG_CHECKING(USNO modem service) |
---|
2058 | AC_ARG_ENABLE(USNO, [ --enable-USNO s USNO modem service], |
---|
2059 | [ntp_ok=$enableval], |
---|
2060 | [AC_EGREP_CPP(yes, |
---|
2061 | [#include <termios.h> |
---|
2062 | #ifdef HAVE_SYS_IOCTL_H |
---|
2063 | #include <sys/ioctl.h> |
---|
2064 | #endif |
---|
2065 | #ifdef TIOCMBIS |
---|
2066 | yes |
---|
2067 | #endif |
---|
2068 | ], ntp_ok=$ntp_eac, ntp_ok=no)]) |
---|
2069 | if test "$ntp_ok" = "yes"; then |
---|
2070 | ntp_refclock=yes |
---|
2071 | AC_DEFINE(CLOCK_USNO) |
---|
2072 | fi |
---|
2073 | AC_MSG_RESULT($ntp_ok) |
---|
2074 | |
---|
2075 | AC_MSG_CHECKING(for default inclusion of all suitable PARSE clocks) |
---|
2076 | AC_ARG_ENABLE(parse-clocks, [ --enable-parse-clocks - include all suitable PARSE clocks:], |
---|
2077 | [ntp_eapc=$enableval], |
---|
2078 | [case "$ntp_eac" in |
---|
2079 | yes) ntp_eapc=$ntp_canparse ;; |
---|
2080 | *) ntp_eapc=no ;; |
---|
2081 | esac |
---|
2082 | ntp_eapc=no]) |
---|
2083 | AC_MSG_RESULT($ntp_eapc) |
---|
2084 | |
---|
2085 | case "$ntp_eac$ntp_eapc$ntp_canparse" in |
---|
2086 | noyes*) |
---|
2087 | AC_MSG_ERROR("--enable-parse-clocks" requires "--enable-all-clocks".) |
---|
2088 | ;; |
---|
2089 | yesyesno) |
---|
2090 | AC_MSG_ERROR(You said "--enable-parse-clocks" but PARSE isn't supported on this platform!) |
---|
2091 | ;; |
---|
2092 | *) ;; |
---|
2093 | esac |
---|
2094 | |
---|
2095 | ntp_libparse=no |
---|
2096 | ntp_parseutil=no |
---|
2097 | ntp_rawdcf=no |
---|
2098 | |
---|
2099 | AC_MSG_CHECKING(Diem Computime Radio Clock) |
---|
2100 | AC_ARG_ENABLE(COMPUTIME, [ --enable-COMPUTIME s Diem Computime Radio Clock], |
---|
2101 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2102 | if test "$ntp_ok" = "yes"; then |
---|
2103 | ntp_libparse=yes |
---|
2104 | ntp_refclock=yes |
---|
2105 | AC_DEFINE(CLOCK_COMPUTIME) |
---|
2106 | fi |
---|
2107 | AC_MSG_RESULT($ntp_ok) |
---|
2108 | case "$ntp_ok$ntp_canparse" in |
---|
2109 | yesno) |
---|
2110 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2111 | ;; |
---|
2112 | esac |
---|
2113 | |
---|
2114 | AC_MSG_CHECKING(ELV/DCF7000 clock) |
---|
2115 | AC_ARG_ENABLE(DCF7000, [ --enable-DCF7000 s ELV/DCF7000 clock], |
---|
2116 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2117 | if test "$ntp_ok" = "yes"; then |
---|
2118 | ntp_libparse=yes |
---|
2119 | ntp_refclock=yes |
---|
2120 | AC_DEFINE(CLOCK_DCF7000) |
---|
2121 | fi |
---|
2122 | AC_MSG_RESULT($ntp_ok) |
---|
2123 | case "$ntp_ok$ntp_canparse" in |
---|
2124 | yesno) |
---|
2125 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2126 | ;; |
---|
2127 | esac |
---|
2128 | |
---|
2129 | AC_MSG_CHECKING(HOPF 6021 clock) |
---|
2130 | AC_ARG_ENABLE(HOPF6021, [ --enable-HOPF6021 s HOPF 6021 clock], |
---|
2131 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2132 | if test "$ntp_ok" = "yes"; then |
---|
2133 | ntp_libparse=yes |
---|
2134 | ntp_refclock=yes |
---|
2135 | AC_DEFINE(CLOCK_HOPF6021) |
---|
2136 | fi |
---|
2137 | AC_MSG_RESULT($ntp_ok) |
---|
2138 | case "$ntp_ok$ntp_canparse" in |
---|
2139 | yesno) |
---|
2140 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2141 | ;; |
---|
2142 | esac |
---|
2143 | |
---|
2144 | AC_MSG_CHECKING(Meinberg clocks) |
---|
2145 | AC_ARG_ENABLE(MEINBERG, [ --enable-MEINBERG s Meinberg clocks], |
---|
2146 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2147 | if test "$ntp_ok" = "yes"; then |
---|
2148 | ntp_libparse=yes |
---|
2149 | ntp_refclock=yes |
---|
2150 | AC_DEFINE(CLOCK_MEINBERG) |
---|
2151 | fi |
---|
2152 | AC_MSG_RESULT($ntp_ok) |
---|
2153 | case "$ntp_ok$ntp_canparse" in |
---|
2154 | yesno) |
---|
2155 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2156 | ;; |
---|
2157 | esac |
---|
2158 | |
---|
2159 | AC_MSG_CHECKING(DCF77 raw time code) |
---|
2160 | AC_ARG_ENABLE(RAWDCF, [ --enable-RAWDCF s DCF77 raw time code], |
---|
2161 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2162 | if test "$ntp_ok" = "yes"; then |
---|
2163 | ntp_libparse=yes |
---|
2164 | ntp_parseutil=yes |
---|
2165 | ntp_refclock=yes |
---|
2166 | ntp_rawdcf=yes |
---|
2167 | AC_DEFINE(CLOCK_RAWDCF) |
---|
2168 | fi |
---|
2169 | AC_MSG_RESULT($ntp_ok) |
---|
2170 | case "$ntp_ok$ntp_canparse" in |
---|
2171 | yesno) |
---|
2172 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2173 | ;; |
---|
2174 | esac |
---|
2175 | |
---|
2176 | case "$ntp_rawdcf" in |
---|
2177 | yes) |
---|
2178 | AC_CACHE_CHECK(if we must enable parity for RAWDCF, |
---|
2179 | ac_cv_var_rawdcf_parity, |
---|
2180 | [ans=no |
---|
2181 | case "$target" in |
---|
2182 | *-*-linux*) |
---|
2183 | ans=yes |
---|
2184 | ;; |
---|
2185 | esac |
---|
2186 | ac_cv_var_rawdcf_parity=$ans]) |
---|
2187 | case "$ac_cv_var_rawdcf_parity" in |
---|
2188 | yes) AC_DEFINE(RAWDCF_NO_IGNPAR) ;; |
---|
2189 | esac |
---|
2190 | ;; |
---|
2191 | |
---|
2192 | *) # HMS: Is this a good idea? |
---|
2193 | ac_cv_var_rawdcf_parity=no |
---|
2194 | ;; |
---|
2195 | esac |
---|
2196 | |
---|
2197 | AC_MSG_CHECKING(RCC 8000 clock) |
---|
2198 | AC_ARG_ENABLE(RCC8000, [ --enable-RCC8000 s RCC 8000 clock], |
---|
2199 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2200 | if test "$ntp_ok" = "yes"; then |
---|
2201 | ntp_libparse=yes |
---|
2202 | ntp_refclock=yes |
---|
2203 | AC_DEFINE(CLOCK_RCC8000) |
---|
2204 | fi |
---|
2205 | AC_MSG_RESULT($ntp_ok) |
---|
2206 | case "$ntp_ok$ntp_canparse" in |
---|
2207 | yesno) |
---|
2208 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2209 | ;; |
---|
2210 | esac |
---|
2211 | |
---|
2212 | AC_MSG_CHECKING(Schmid DCF77 clock) |
---|
2213 | AC_ARG_ENABLE(SCHMID, [ --enable-SCHMID s Schmid DCF77 clock], |
---|
2214 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2215 | if test "$ntp_ok" = "yes"; then |
---|
2216 | ntp_libparse=yes |
---|
2217 | ntp_refclock=yes |
---|
2218 | AC_DEFINE(CLOCK_SCHMID) |
---|
2219 | fi |
---|
2220 | AC_MSG_RESULT($ntp_ok) |
---|
2221 | case "$ntp_ok$ntp_canparse" in |
---|
2222 | yesno) |
---|
2223 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2224 | ;; |
---|
2225 | esac |
---|
2226 | |
---|
2227 | AC_MSG_CHECKING(Trimble GPS receiver/TAIP protocol) |
---|
2228 | AC_ARG_ENABLE(TRIMTAIP, [ --enable-TRIMTAIP s Trimble GPS receiver/TAIP protocol], |
---|
2229 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2230 | if test "$ntp_ok" = "yes"; then |
---|
2231 | ntp_libparse=yes |
---|
2232 | ntp_refclock=yes |
---|
2233 | AC_DEFINE(CLOCK_TRIMTAIP) |
---|
2234 | fi |
---|
2235 | AC_MSG_RESULT($ntp_ok) |
---|
2236 | case "$ntp_ok$ntp_canparse" in |
---|
2237 | yesno) |
---|
2238 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2239 | ;; |
---|
2240 | esac |
---|
2241 | |
---|
2242 | AC_MSG_CHECKING(Trimble GPS receiver/TSIP protocol) |
---|
2243 | AC_ARG_ENABLE(TRIMTSIP, [ --enable-TRIMTSIP s Trimble GPS receiver/TSIP protocol], |
---|
2244 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2245 | if test "$ntp_ok" = "yes"; then |
---|
2246 | ntp_libparse=yes |
---|
2247 | ntp_refclock=yes |
---|
2248 | AC_DEFINE(CLOCK_TRIMTSIP) |
---|
2249 | fi |
---|
2250 | AC_MSG_RESULT($ntp_ok) |
---|
2251 | case "$ntp_ok$ntp_canparse" in |
---|
2252 | yesno) |
---|
2253 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2254 | ;; |
---|
2255 | esac |
---|
2256 | |
---|
2257 | AC_MSG_CHECKING(WHARTON 400A Series clock) |
---|
2258 | AC_ARG_ENABLE(WHARTON, [ --enable-WHARTON s WHARTON 400A Series clock], |
---|
2259 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2260 | if test "$ntp_ok" = "yes"; then |
---|
2261 | ntp_libparse=yes |
---|
2262 | ntp_refclock=yes |
---|
2263 | AC_DEFINE(CLOCK_WHARTON_400A) |
---|
2264 | fi |
---|
2265 | AC_MSG_RESULT($ntp_ok) |
---|
2266 | case "$ntp_ok$ntp_canparse" in |
---|
2267 | yesno) |
---|
2268 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2269 | ;; |
---|
2270 | esac |
---|
2271 | |
---|
2272 | AC_MSG_CHECKING(VARITEXT clock) |
---|
2273 | AC_ARG_ENABLE(VARITEXT, [ --enable-VARITEXT s VARITEXT clock], |
---|
2274 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
2275 | if test "$ntp_ok" = "yes"; then |
---|
2276 | ntp_libparse=yes |
---|
2277 | ntp_refclock=yes |
---|
2278 | AC_DEFINE(CLOCK_VARITEXT) |
---|
2279 | fi |
---|
2280 | AC_MSG_RESULT($ntp_ok) |
---|
2281 | case "$ntp_ok$ntp_canparse" in |
---|
2282 | yesno) |
---|
2283 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
2284 | ;; |
---|
2285 | esac |
---|
2286 | AC_SUBST(LIBPARSE) |
---|
2287 | AC_SUBST(MAKE_LIBPARSE) |
---|
2288 | AC_SUBST(MAKE_LIBPARSE_KERNEL) |
---|
2289 | AC_SUBST(MAKE_CHECK_Y2K) |
---|
2290 | AC_MSG_CHECKING(if we need to make and use the parse libraries) |
---|
2291 | ans=no |
---|
2292 | case "$ntp_libparse" in |
---|
2293 | yes) |
---|
2294 | ans=yes |
---|
2295 | AC_DEFINE(CLOCK_PARSE) |
---|
2296 | LIBPARSE=../libparse/libparse.a |
---|
2297 | MAKE_LIBPARSE=libparse.a |
---|
2298 | MAKE_CHECK_Y2K=check_y2k |
---|
2299 | AC_DEFINE(PPS_SAMPLE) |
---|
2300 | AC_DEFINE(CLOCK_ATOM) |
---|
2301 | ;; |
---|
2302 | esac |
---|
2303 | AC_MSG_RESULT($ans) |
---|
2304 | |
---|
2305 | AC_SUBST(RSAOBJS) |
---|
2306 | AC_SUBST(RSASRCS) |
---|
2307 | AC_SUBST(RSADIR) |
---|
2308 | AC_SUBST(RSAREF) |
---|
2309 | AC_SUBST(LIBRSAREF) |
---|
2310 | AC_SUBST(MAKE_LIBRSAREF) |
---|
2311 | |
---|
2312 | AC_SUBST(OPENSSL) |
---|
2313 | AC_SUBST(OPENSSL_INC) |
---|
2314 | AC_SUBST(OPENSSL_LIB) |
---|
2315 | |
---|
2316 | AC_SUBST(MAKE_NTP_GENKEYS) |
---|
2317 | |
---|
2318 | AC_MSG_CHECKING(for openssl library directory) |
---|
2319 | AC_ARG_WITH(openssl-libdir, |
---|
2320 | AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]), |
---|
2321 | [ans=$withval], [ans=yes]) |
---|
2322 | case "$ans" in |
---|
2323 | no) ;; |
---|
2324 | yes) # Look in: |
---|
2325 | ans="/usr/lib /usr/local/lib /usr/local/ssl/lib" |
---|
2326 | ;; |
---|
2327 | *) # Look where they said |
---|
2328 | ;; |
---|
2329 | esac |
---|
2330 | case "$ans" in |
---|
2331 | no) ;; |
---|
2332 | *) # Look for libcrypto.a and libssl.a: |
---|
2333 | for i in $ans no |
---|
2334 | do |
---|
2335 | test -f $i/libcrypto.a -a -f $i/libssl.a && break |
---|
2336 | done |
---|
2337 | case "$i" in |
---|
2338 | no) |
---|
2339 | ans=no |
---|
2340 | OPENSSL_LIB= |
---|
2341 | ;; |
---|
2342 | *) ans=$i |
---|
2343 | OPENSSL_LIB=$ans |
---|
2344 | ;; |
---|
2345 | esac |
---|
2346 | ;; |
---|
2347 | esac |
---|
2348 | AC_MSG_RESULT($ans) |
---|
2349 | |
---|
2350 | AC_MSG_CHECKING(for openssl include directory) |
---|
2351 | AC_ARG_WITH(openssl-incdir, |
---|
2352 | AC_HELP_STRING([--with-openssl-incdir], [+ =/something/reasonable]), |
---|
2353 | [ans=$withval], [ans=yes]) |
---|
2354 | case "$ans" in |
---|
2355 | no) ;; |
---|
2356 | yes) # look in: |
---|
2357 | ans="/usr/include /usr/local/include /usr/local/ssl/include" |
---|
2358 | ;; |
---|
2359 | *) # Look where they said |
---|
2360 | ;; |
---|
2361 | esac |
---|
2362 | case "$ans" in |
---|
2363 | no) ;; |
---|
2364 | *) # look for openssl/opensslconf.h: |
---|
2365 | for i in $ans no |
---|
2366 | do |
---|
2367 | test -f $i/openssl/opensslconf.h && break |
---|
2368 | done |
---|
2369 | case "$i" in |
---|
2370 | no) |
---|
2371 | ans=no |
---|
2372 | OPENSSL_INC= |
---|
2373 | ;; |
---|
2374 | *) ans=$i |
---|
2375 | OPENSSL_INC=$ans |
---|
2376 | ;; |
---|
2377 | esac |
---|
2378 | ;; |
---|
2379 | esac |
---|
2380 | AC_MSG_RESULT($ans) |
---|
2381 | |
---|
2382 | AC_MSG_CHECKING(for the level of crypto support) |
---|
2383 | AC_ARG_WITH(crypto, |
---|
2384 | AC_HELP_STRING([--with-crypto], [+ ={autokey,rsaref}]), |
---|
2385 | dnl AC_HELP_STRING([--with-crypto], [+ ={autokey,openssl,rsaref}]), |
---|
2386 | [ans=$withval], [ans=yes]) |
---|
2387 | case "$ans" in |
---|
2388 | no) ;; |
---|
2389 | yes|rsaref|openssl) |
---|
2390 | case "$ans" in |
---|
2391 | yes|rsaref) # Just "rsaref" when OpenSSL is ready |
---|
2392 | ans=no |
---|
2393 | ;; |
---|
2394 | *) |
---|
2395 | if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC" |
---|
2396 | then |
---|
2397 | ans=no |
---|
2398 | else |
---|
2399 | # We have OpenSSL inc/lib - use them. |
---|
2400 | ans=openssl |
---|
2401 | CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC" |
---|
2402 | LDFLAGS="$LDFLAGS -L$OPENSSL_LIB" |
---|
2403 | LIBS="$LIBS -lcrypto" |
---|
2404 | AC_DEFINE(DES) |
---|
2405 | AC_DEFINE(OPENSSL, , [Use OpenSSL?]) |
---|
2406 | AC_DEFINE(PUBKEY, , [Public key?]) |
---|
2407 | fi |
---|
2408 | ;; |
---|
2409 | esac |
---|
2410 | |
---|
2411 | case "$ans" in |
---|
2412 | no) |
---|
2413 | if test -f $srcdir/rsaref2/source/digit.c |
---|
2414 | then |
---|
2415 | ans=rsaref |
---|
2416 | RSAOBJS=digit.o |
---|
2417 | RSASRCS="digit.c digit.h" |
---|
2418 | RSADIR=rsaref2 |
---|
2419 | fi |
---|
2420 | if test -f $srcdir/rsaeuro1/source/rsaeuro.h |
---|
2421 | then |
---|
2422 | ans=rsaref |
---|
2423 | RSAOBJS="md4c.o shsc.o" |
---|
2424 | RSASRCS="md4c.c shsc.c" |
---|
2425 | RSADIR=rsaeuro1 |
---|
2426 | fi |
---|
2427 | if test "$ans" = "rsaref"; then |
---|
2428 | LIBRSAREF=../librsaref/librsaref.a |
---|
2429 | MAKE_LIBRSAREF=librsaref.a |
---|
2430 | AC_DEFINE(DES) |
---|
2431 | AC_DEFINE(PUBKEY) |
---|
2432 | AC_DEFINE(RSAREF, , [Use RSAREF?]) |
---|
2433 | fi |
---|
2434 | ;; |
---|
2435 | esac |
---|
2436 | ;; |
---|
2437 | esac |
---|
2438 | AC_SUBST(AUTOKEY) |
---|
2439 | case "$ans" in |
---|
2440 | no) ;; |
---|
2441 | *) |
---|
2442 | AC_DEFINE(AUTOKEY, , [Autokey?]) |
---|
2443 | AUTOKEY=1 |
---|
2444 | ;; |
---|
2445 | esac |
---|
2446 | AC_MSG_RESULT($ans) |
---|
2447 | |
---|
2448 | AC_MSG_CHECKING(if we want to compile with ElectricFence) |
---|
2449 | AC_ARG_WITH(electricfence, [ --with-electricfence - compile with ElectricFence malloc debugger], |
---|
2450 | [ans=$withval], [ans=no]) |
---|
2451 | case "$ans" in |
---|
2452 | no) ;; |
---|
2453 | *) |
---|
2454 | LIBS="$LIBS \${top_builddir}/ElectricFence/libefence.a" |
---|
2455 | EF_PROGS="eftest tstheap" |
---|
2456 | AC_SUBST(EF_PROGS) |
---|
2457 | EF_LIBS=libefence.a |
---|
2458 | AC_SUBST(EF_LIBS) |
---|
2459 | ans=yes |
---|
2460 | ;; |
---|
2461 | esac |
---|
2462 | AC_MSG_RESULT($ans) |
---|
2463 | |
---|
2464 | AC_SUBST(TESTDCF) |
---|
2465 | AC_SUBST(DCFD) |
---|
2466 | |
---|
2467 | AC_MSG_CHECKING(if we can make dcf parse utilities) |
---|
2468 | ans=no |
---|
2469 | if test "$ntp_parseutil" = "yes"; then |
---|
2470 | case "$target" in |
---|
2471 | *-*-sunos4*|*-*-solaris2*|*-*-linux*) |
---|
2472 | ans="dcfd testdcf" |
---|
2473 | DCFD=dcfd |
---|
2474 | TESTDCF=testdcf |
---|
2475 | ;; |
---|
2476 | esac |
---|
2477 | fi |
---|
2478 | AC_MSG_RESULT($ans) |
---|
2479 | |
---|
2480 | AC_SUBST(MAKE_PARSEKMODULE) |
---|
2481 | AC_MSG_CHECKING(if we can build kernel streams modules for parse) |
---|
2482 | ans=no |
---|
2483 | case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in |
---|
2484 | yesyes) |
---|
2485 | case "$target" in |
---|
2486 | sparc-*-sunos4*) |
---|
2487 | case "$ac_cv_var_kernel_pll" in |
---|
2488 | yes) |
---|
2489 | AC_DEFINE(PPS_SYNC) |
---|
2490 | ;; |
---|
2491 | esac |
---|
2492 | ans=parsestreams |
---|
2493 | MAKE_PARSEKMODULE=parsestreams.loadable_module.o |
---|
2494 | ;; |
---|
2495 | sparc-*-solaris2*) |
---|
2496 | ans=parsesolaris |
---|
2497 | MAKE_PARSEKMODULE=parse |
---|
2498 | ;; |
---|
2499 | esac |
---|
2500 | ;; |
---|
2501 | esac |
---|
2502 | AC_MSG_RESULT($ans) |
---|
2503 | |
---|
2504 | AC_MSG_CHECKING(if we need basic refclock support) |
---|
2505 | if test "$ntp_refclock" = "yes"; then |
---|
2506 | AC_DEFINE(REFCLOCK) |
---|
2507 | fi |
---|
2508 | AC_MSG_RESULT($ntp_refclock) |
---|
2509 | |
---|
2510 | dnl Things that can be made in clockstuff/ |
---|
2511 | AC_SUBST(PROPDELAY) dnl Set to "propdelay" |
---|
2512 | AC_SUBST(CHUTEST) dnl Set to "chutest" |
---|
2513 | AC_SUBST(CLKTEST) dnl Set to "clktest" |
---|
2514 | |
---|
2515 | AC_SUBST(MAKE_ADJTIMED) |
---|
2516 | AC_MSG_CHECKING(if we want HP-UX adjtimed support) |
---|
2517 | case "$target" in |
---|
2518 | *-*-hpux[[56789]]*) |
---|
2519 | ans=yes |
---|
2520 | ;; |
---|
2521 | *) ans=no |
---|
2522 | ;; |
---|
2523 | esac |
---|
2524 | if test "$ans" = "yes"; then |
---|
2525 | MAKE_ADJTIMED=adjtimed |
---|
2526 | AC_DEFINE(NEED_HPUX_ADJTIME) |
---|
2527 | fi |
---|
2528 | AC_MSG_RESULT($ans) |
---|
2529 | |
---|
2530 | AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem, |
---|
2531 | [AC_ARG_ENABLE(kmem, [ --enable-kmem s read /dev/kmem for tick and/or tickadj], |
---|
2532 | [ans=$enableval], |
---|
2533 | [case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in |
---|
2534 | *yes*) |
---|
2535 | ans=yes |
---|
2536 | ;; |
---|
2537 | *) ans=no |
---|
2538 | ;; |
---|
2539 | esac |
---|
2540 | case "$target" in |
---|
2541 | *-*-aix*) |
---|
2542 | #ans=no |
---|
2543 | ;; |
---|
2544 | *-*-domainos) # Won't be found... |
---|
2545 | ans=no |
---|
2546 | ;; |
---|
2547 | *-*-hpux*) |
---|
2548 | #ans=no |
---|
2549 | ;; |
---|
2550 | *-*-irix[[456]]*) |
---|
2551 | ans=no |
---|
2552 | ;; |
---|
2553 | *-*-linux*) |
---|
2554 | ans=no |
---|
2555 | ;; |
---|
2556 | *-*-winnt3.5) |
---|
2557 | ans=no |
---|
2558 | ;; |
---|
2559 | esac |
---|
2560 | ]) |
---|
2561 | ac_cv_var_can_kmem=$ans]) |
---|
2562 | |
---|
2563 | case "$ac_cv_var_can_kmem" in |
---|
2564 | *yes*) ;; |
---|
2565 | *) AC_DEFINE(NOKMEM) ;; |
---|
2566 | esac |
---|
2567 | |
---|
2568 | AC_CACHE_CHECK(if adjtime is accurate, ac_cv_var_adjtime_is_accurate, |
---|
2569 | [AC_ARG_ENABLE(accurate-adjtime, [ --enable-accurate-adjtime |
---|
2570 | s the adjtime() call is accurate], |
---|
2571 | [ans=$enableval], |
---|
2572 | [case "$target" in |
---|
2573 | i386-sequent-ptx*) |
---|
2574 | ans=no |
---|
2575 | ;; |
---|
2576 | i386-unknown-osf1*) |
---|
2577 | ans=yes |
---|
2578 | ;; |
---|
2579 | mips-sgi-irix[[456]]*) |
---|
2580 | ans=yes |
---|
2581 | ;; |
---|
2582 | *-fujitsu-uxp*) |
---|
2583 | ans=yes |
---|
2584 | ;; |
---|
2585 | *-ibm-aix4*) |
---|
2586 | ans=yes |
---|
2587 | ;; |
---|
2588 | *-*-linux*) |
---|
2589 | ans=yes |
---|
2590 | ;; |
---|
2591 | *-*-solaris2.[[01]]*) |
---|
2592 | ans=no |
---|
2593 | ;; |
---|
2594 | *-*-solaris2*) |
---|
2595 | ans=yes |
---|
2596 | ;; |
---|
2597 | *) ans=no |
---|
2598 | ;; |
---|
2599 | esac |
---|
2600 | ]) |
---|
2601 | ac_cv_var_adjtime_is_accurate=$ans]) |
---|
2602 | case "$ac_cv_var_adjtime_is_accurate" in |
---|
2603 | yes) AC_DEFINE(ADJTIME_IS_ACCURATE) ;; |
---|
2604 | esac |
---|
2605 | |
---|
2606 | AC_CACHE_CHECK([the name of 'tick' in the kernel], |
---|
2607 | ac_cv_var_nlist_tick, |
---|
2608 | [ans=_tick |
---|
2609 | case "$target" in |
---|
2610 | m68*-hp-hpux*) # HP9000/300? |
---|
2611 | ans=_old_tick |
---|
2612 | ;; |
---|
2613 | *-apple-aux[[23]]*) |
---|
2614 | ans=tick |
---|
2615 | ;; |
---|
2616 | *-hp-hpux*) |
---|
2617 | ans=old_tick |
---|
2618 | ;; |
---|
2619 | *-ibm-aix[[34]]*) |
---|
2620 | ans=no |
---|
2621 | ;; |
---|
2622 | *-*-mpeix*) |
---|
2623 | ans=no |
---|
2624 | ;; |
---|
2625 | *-*-ptx*) |
---|
2626 | ans=tick |
---|
2627 | ;; |
---|
2628 | *-*-sco3.2v[[45]]*) |
---|
2629 | ans=no |
---|
2630 | ;; |
---|
2631 | *-*-solaris2*) |
---|
2632 | ans=nsec_per_tick |
---|
2633 | ;; |
---|
2634 | *-*-sysv4*) |
---|
2635 | ans=tick |
---|
2636 | ;; |
---|
2637 | esac |
---|
2638 | ac_cv_var_nlist_tick=$ans]) |
---|
2639 | case "$ac_cv_var_nlist_tick" in |
---|
2640 | ''|no) ;; # HMS: I think we can only get 'no' here... |
---|
2641 | *) AC_DEFINE_UNQUOTED(K_TICK_NAME, "$ac_cv_var_nlist_tick") ;; |
---|
2642 | esac |
---|
2643 | # |
---|
2644 | AC_CACHE_CHECK([for the units of 'tick'], |
---|
2645 | ac_cv_var_tick_nano, |
---|
2646 | [ans=usec |
---|
2647 | case "$target" in |
---|
2648 | *-*-solaris2*) |
---|
2649 | ans=nsec |
---|
2650 | ;; |
---|
2651 | esac |
---|
2652 | ac_cv_var_tick_nano=$ans]) |
---|
2653 | case "$ac_cv_var_tick_nano" in |
---|
2654 | nsec) |
---|
2655 | AC_DEFINE(TICK_NANO) |
---|
2656 | ;; |
---|
2657 | esac |
---|
2658 | # |
---|
2659 | AC_CACHE_CHECK([the name of 'tickadj' in the kernel], |
---|
2660 | ac_cv_var_nlist_tickadj, |
---|
2661 | [ans=_tickadj |
---|
2662 | case "$target" in |
---|
2663 | m68*-hp-hpux*) # HP9000/300? |
---|
2664 | ans=_tickadj |
---|
2665 | ;; |
---|
2666 | *-apple-aux[[23]]*) |
---|
2667 | ans=tickadj |
---|
2668 | ;; |
---|
2669 | *-hp-hpux10*) |
---|
2670 | ans=no |
---|
2671 | ;; |
---|
2672 | *-hp-hpux9*) |
---|
2673 | ans=no |
---|
2674 | ;; |
---|
2675 | *-hp-hpux*) |
---|
2676 | ans=tickadj |
---|
2677 | ;; |
---|
2678 | *-*-aix*) |
---|
2679 | ans=tickadj |
---|
2680 | ;; |
---|
2681 | *-*-mpeix*) |
---|
2682 | ans=no |
---|
2683 | ;; |
---|
2684 | *-*-ptx*) |
---|
2685 | ans=tickadj |
---|
2686 | ;; |
---|
2687 | *-*-sco3.2v4*) |
---|
2688 | ans=no |
---|
2689 | ;; |
---|
2690 | *-*-sco3.2v5.0*) |
---|
2691 | ans=clock_drift |
---|
2692 | ;; |
---|
2693 | *-*-solaris2*) |
---|
2694 | ans=no # hrestime_adj |
---|
2695 | ;; |
---|
2696 | *-*-sysv4*) |
---|
2697 | ans=tickadj |
---|
2698 | ;; |
---|
2699 | esac |
---|
2700 | ac_cv_var_nlist_tickadj=$ans]) |
---|
2701 | case "$ac_cv_var_nlist_tickadj" in |
---|
2702 | ''|no) ;; # HMS: I think we can only get 'no' here... |
---|
2703 | *) AC_DEFINE_UNQUOTED(K_TICKADJ_NAME, "$ac_cv_var_nlist_tickadj") ;; |
---|
2704 | esac |
---|
2705 | # |
---|
2706 | AC_CACHE_CHECK([for the units of 'tickadj'], |
---|
2707 | ac_cv_var_tickadj_nano, |
---|
2708 | [ans=usec |
---|
2709 | case "$target" in |
---|
2710 | *-*-solaris2*) |
---|
2711 | ans=nsec |
---|
2712 | ;; |
---|
2713 | esac |
---|
2714 | ac_cv_var_tickadj_nano=$ans]) |
---|
2715 | case "$ac_cv_var_tickadj_nano" in |
---|
2716 | nsec) |
---|
2717 | AC_DEFINE(TICKADJ_NANO) |
---|
2718 | ;; |
---|
2719 | esac |
---|
2720 | # |
---|
2721 | AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel], |
---|
2722 | ac_cv_var_nlist_dosynctodr, |
---|
2723 | [case "$target" in |
---|
2724 | *-apple-aux[[23]]*) |
---|
2725 | ans=no |
---|
2726 | ;; |
---|
2727 | *-sni-sysv*) |
---|
2728 | ans=dosynctodr |
---|
2729 | ;; |
---|
2730 | *-*-aix*) |
---|
2731 | ans=dosynctodr |
---|
2732 | ;; |
---|
2733 | *-*-hpux*) |
---|
2734 | ans=no |
---|
2735 | ;; |
---|
2736 | *-*-mpeix*) |
---|
2737 | ans=no |
---|
2738 | ;; |
---|
2739 | *-*-nextstep*) |
---|
2740 | ans=_dosynctodr |
---|
2741 | ;; |
---|
2742 | *-*-ptx*) |
---|
2743 | ans=doresettodr |
---|
2744 | ;; |
---|
2745 | *-*-sco3.2v4*) |
---|
2746 | ans=no |
---|
2747 | ;; |
---|
2748 | *-*-sco3.2v5*) |
---|
2749 | ans=track_rtc |
---|
2750 | ;; |
---|
2751 | *-*-solaris2*) |
---|
2752 | ans=dosynctodr |
---|
2753 | ;; |
---|
2754 | *-*-sysv4*) |
---|
2755 | ans=doresettodr |
---|
2756 | ;; |
---|
2757 | *) |
---|
2758 | ans=_dosynctodr |
---|
2759 | ;; |
---|
2760 | esac |
---|
2761 | ac_cv_var_nlist_dosynctodr=$ans]) |
---|
2762 | case "$ac_cv_var_nlist_dosynctodr" in |
---|
2763 | no) ;; |
---|
2764 | *) AC_DEFINE_UNQUOTED(K_DOSYNCTODR_NAME, "$ac_cv_var_nlist_dosynctodr") |
---|
2765 | ;; |
---|
2766 | esac |
---|
2767 | # |
---|
2768 | AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel], |
---|
2769 | ac_cv_var_nlist_noprintf, |
---|
2770 | [case "$target" in |
---|
2771 | *-apple-aux[[23]]*) |
---|
2772 | ans=no |
---|
2773 | ;; |
---|
2774 | *-sni-sysv*) |
---|
2775 | ans=noprintf |
---|
2776 | ;; |
---|
2777 | *-*-aix*) |
---|
2778 | ans=noprintf |
---|
2779 | ;; |
---|
2780 | *-*-hpux*) |
---|
2781 | ans=no |
---|
2782 | ;; |
---|
2783 | *-*-mpeix*) |
---|
2784 | ans=no |
---|
2785 | ;; |
---|
2786 | *-*-ptx*) |
---|
2787 | ans=noprintf |
---|
2788 | ;; |
---|
2789 | *-*-nextstep*) |
---|
2790 | ans=_noprintf |
---|
2791 | ;; |
---|
2792 | *-*-solaris2*) |
---|
2793 | ans=noprintf |
---|
2794 | ;; |
---|
2795 | *-*-sysv4*) |
---|
2796 | ans=noprintf |
---|
2797 | ;; |
---|
2798 | *) |
---|
2799 | ans=_noprintf |
---|
2800 | ;; |
---|
2801 | esac |
---|
2802 | ac_cv_var_nlist_noprintf=$ans]) |
---|
2803 | case "$ac_cv_var_nlist_noprintf" in |
---|
2804 | no) ;; |
---|
2805 | *) AC_DEFINE_UNQUOTED(K_NOPRINTF_NAME, "$ac_cv_var_nlist_noprintf") |
---|
2806 | ;; |
---|
2807 | esac |
---|
2808 | |
---|
2809 | dnl The tick/tickadj sections were written by Skippy, who never learned |
---|
2810 | dnl that it's impolite (horridly gross) to show your guts in public. |
---|
2811 | |
---|
2812 | dnl tick tickadj |
---|
2813 | dnl 10000 80 Unixware |
---|
2814 | dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE |
---|
2815 | dnl 10000 150 sgi IRIX |
---|
2816 | dnl 1000000L/hz 1000 RS6000 && NOKMEM |
---|
2817 | dnl 1000000L/hz 668 DOMAINOS && NOKMEM |
---|
2818 | dnl 1000000L/hz 500/HZ other && NOKMEM |
---|
2819 | dnl txc.tick 1 Linux |
---|
2820 | dnl (every / 10) 50 WinNT - tickadj is roughly 500/hz |
---|
2821 | dnl 1000000L/hz (nlist) (Solaris && !ADJTIME_IS_ACCURATE), |
---|
2822 | dnl (RS6000 && !NOKMEM), SINIX MIPS |
---|
2823 | |
---|
2824 | dnl But we'll only use these "values" if we can't find anything else. |
---|
2825 | |
---|
2826 | AC_CACHE_CHECK(for a default value for 'tick', ac_cv_var_tick, |
---|
2827 | [AC_ARG_ENABLE(tick, [ --enable-tick=VALUE s force a value for 'tick'], |
---|
2828 | [ans=$enableval], |
---|
2829 | [ans=no |
---|
2830 | case "$target" in |
---|
2831 | XXX-*-pc-cygwin*) |
---|
2832 | ;; |
---|
2833 | *-univel-sysv*) |
---|
2834 | ans=10000 |
---|
2835 | ;; |
---|
2836 | *-*-irix*) |
---|
2837 | ans=10000 |
---|
2838 | ;; |
---|
2839 | *-*-linux*) |
---|
2840 | ans=txc.tick |
---|
2841 | ;; |
---|
2842 | *-*-mpeix*) |
---|
2843 | ans=no |
---|
2844 | ;; |
---|
2845 | *-*-winnt3.5) |
---|
2846 | ans='(every / 10)' |
---|
2847 | ;; |
---|
2848 | *) |
---|
2849 | ans='1000000L/hz' |
---|
2850 | ;; |
---|
2851 | esac]) |
---|
2852 | ac_cv_var_tick=$ans]) |
---|
2853 | case "$ac_cv_var_tick" in |
---|
2854 | ''|no) ;; # HMS: I think we can only get 'no' here... |
---|
2855 | *) AC_DEFINE_UNQUOTED(PRESET_TICK, $ac_cv_var_tick) ;; |
---|
2856 | esac |
---|
2857 | |
---|
2858 | AC_CACHE_CHECK(for a default value for 'tickadj', ac_cv_var_tickadj, |
---|
2859 | [AC_ARG_ENABLE(tickadj, [ --enable-tickadj=VALUE s force a value for 'tickadj'], |
---|
2860 | [ans=$enableval], |
---|
2861 | [ans='500/hz' |
---|
2862 | case "$target" in |
---|
2863 | *-fujitsu-uxp*) |
---|
2864 | case "$ac_cv_var_adjtime_is_accurate" in |
---|
2865 | yes) ans='tick/16' ;; |
---|
2866 | esac |
---|
2867 | ;; |
---|
2868 | XXX-*-pc-cygwin*) |
---|
2869 | ans=no |
---|
2870 | ;; |
---|
2871 | *-univel-sysv*) |
---|
2872 | ans=80 |
---|
2873 | ;; |
---|
2874 | *-*-aix*) |
---|
2875 | case "$ac_cv_var_can_kmem" in |
---|
2876 | no) ans=1000 ;; |
---|
2877 | esac |
---|
2878 | ;; |
---|
2879 | *-*-domainos) # Skippy: won't be found... |
---|
2880 | case "$ac_cv_var_can_kmem" in |
---|
2881 | no) ans=668 ;; |
---|
2882 | esac |
---|
2883 | ;; |
---|
2884 | *-*-hpux*) |
---|
2885 | case "$ac_cv_var_adjtime_is_accurate" in |
---|
2886 | yes) ans='tick/16' ;; |
---|
2887 | esac |
---|
2888 | ;; |
---|
2889 | *-*-irix*) |
---|
2890 | ans=150 |
---|
2891 | ;; |
---|
2892 | *-*-mpeix*) |
---|
2893 | ans=no |
---|
2894 | ;; |
---|
2895 | *-*-sco3.2v5.0*) |
---|
2896 | ans=10000L/hz |
---|
2897 | ;; |
---|
2898 | *-*-solaris2*) |
---|
2899 | case "$ac_cv_var_adjtime_is_accurate" in |
---|
2900 | yes) |
---|
2901 | #ans='tick/16' |
---|
2902 | ;; |
---|
2903 | esac |
---|
2904 | ;; |
---|
2905 | *-*-winnt3.5) |
---|
2906 | ans=50 |
---|
2907 | ;; |
---|
2908 | esac]) |
---|
2909 | ac_cv_var_tickadj=$ans]) |
---|
2910 | case "$ac_cv_var_tickadj" in |
---|
2911 | ''|no) ;; # HMS: I think we can only get 'no' here... |
---|
2912 | *) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $ac_cv_var_tickadj) ;; |
---|
2913 | esac |
---|
2914 | |
---|
2915 | # Newer versions of ReliantUNIX round adjtime() values down to |
---|
2916 | # 1/100s (system tick). Sigh ... |
---|
2917 | # Unfortunately, there is no easy way to know if particular release |
---|
2918 | # has this "feature" or any obvious way to test for it. |
---|
2919 | case "$target" in |
---|
2920 | mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX_CLOCK) ;; |
---|
2921 | esac |
---|
2922 | |
---|
2923 | case "$target" in |
---|
2924 | *-*-sco3.2v5*) AC_DEFINE(SCO5_CLOCK) ;; |
---|
2925 | esac |
---|
2926 | |
---|
2927 | ac_cv_make_tickadj=yes |
---|
2928 | case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in |
---|
2929 | nonono) # Don't read KMEM, no presets. Bogus. |
---|
2930 | AC_MSG_WARN(Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj.) |
---|
2931 | ac_cv_make_tickadj=no |
---|
2932 | ;; |
---|
2933 | nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus. |
---|
2934 | AC_MSG_WARN(Can't read kmem but no PRESET_TICK. No tickadj.) |
---|
2935 | ac_cv_make_tickadj=no |
---|
2936 | ;; |
---|
2937 | no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus. |
---|
2938 | AC_MSG_WARN(Can't read kmem but no PRESET_TICKADJ. No tickadj.) |
---|
2939 | ac_cv_make_tickadj=no |
---|
2940 | ;; |
---|
2941 | no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool. |
---|
2942 | ;; |
---|
2943 | yesnono) # Read KMEM, no presets. Cool. |
---|
2944 | ;; |
---|
2945 | yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus. |
---|
2946 | AC_MSG_WARN(PRESET_TICKADJ is defined but not PRESET_TICK. Please report this.) |
---|
2947 | ;; |
---|
2948 | yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool. |
---|
2949 | ;; |
---|
2950 | yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ. |
---|
2951 | ;; |
---|
2952 | *) # Generally bogus. |
---|
2953 | AC_MSG_ERROR(This shouldn't happen.) |
---|
2954 | ;; |
---|
2955 | esac |
---|
2956 | |
---|
2957 | AC_SUBST(MAKE_NTPTIME) |
---|
2958 | AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime, |
---|
2959 | [case "$target" in |
---|
2960 | *) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in |
---|
2961 | yesyes) |
---|
2962 | ans=yes |
---|
2963 | ;; |
---|
2964 | *) |
---|
2965 | ans=no |
---|
2966 | ;; |
---|
2967 | esac |
---|
2968 | ;; |
---|
2969 | esac |
---|
2970 | ac_cv_make_ntptime=$ans]) |
---|
2971 | case "$ac_cv_make_ntptime" in |
---|
2972 | yes) |
---|
2973 | MAKE_NTPTIME=ntptime |
---|
2974 | ;; |
---|
2975 | esac |
---|
2976 | |
---|
2977 | AC_SUBST(MAKE_TICKADJ) |
---|
2978 | case "$target" in |
---|
2979 | mips-sni-sysv4*) |
---|
2980 | # tickadj is pretty useless on newer versions of ReliantUNIX |
---|
2981 | # Do not bother |
---|
2982 | ac_cv_make_tickadj=no |
---|
2983 | ;; |
---|
2984 | *-*-irix*) |
---|
2985 | ac_cv_make_tickadj=no |
---|
2986 | ;; |
---|
2987 | *-*-solaris2*) |
---|
2988 | # DLM says tickadj is a no-no starting with solaris2.5 |
---|
2989 | case "$target" in |
---|
2990 | *-*-solaris2.[0-4]*) ;; |
---|
2991 | *) ac_cv_make_tickadj=no ;; |
---|
2992 | esac |
---|
2993 | ;; |
---|
2994 | esac |
---|
2995 | AC_CACHE_CHECK(if we want and can make the tickadj utility, ac_cv_make_tickadj, |
---|
2996 | ac_cv_make_tickadj=yes) |
---|
2997 | case "$ac_cv_make_tickadj" in |
---|
2998 | yes) |
---|
2999 | MAKE_TICKADJ=tickadj |
---|
3000 | ;; |
---|
3001 | esac |
---|
3002 | |
---|
3003 | AC_SUBST(MAKE_TIMETRIM) |
---|
3004 | AC_CACHE_CHECK(if we want and can make the timetrim utility, ac_cv_make_timetrim, |
---|
3005 | [case "$target" in |
---|
3006 | *-*-irix*) |
---|
3007 | ac_cv_make_timetrim=yes |
---|
3008 | ;; |
---|
3009 | *) |
---|
3010 | ac_cv_make_timetrim=no |
---|
3011 | ;; |
---|
3012 | esac]) |
---|
3013 | case "$ac_cv_make_timetrim" in |
---|
3014 | yes) |
---|
3015 | MAKE_TIMETRIM=timetrim |
---|
3016 | ;; |
---|
3017 | esac |
---|
3018 | |
---|
3019 | AC_CACHE_CHECK(if we want UDP wildcard delivery, ac_cv_var_udp_wildcard_delivery, |
---|
3020 | [AC_ARG_ENABLE(udp-wildcard, [ --enable-udp-wildcard s use UDP wildcard delivery], |
---|
3021 | [ans=$enableval], |
---|
3022 | [ans=no |
---|
3023 | case "$target" in |
---|
3024 | *-fujitsu-uxp*) |
---|
3025 | ans=yes |
---|
3026 | ;; |
---|
3027 | *-univel-sysv*) |
---|
3028 | ans=yes |
---|
3029 | ;; |
---|
3030 | *-*-aix3.2*) |
---|
3031 | ans=yes |
---|
3032 | ;; |
---|
3033 | *-*-aix4*) |
---|
3034 | ans=yes |
---|
3035 | ;; |
---|
3036 | *-*-bsdi*) |
---|
3037 | ans=yes |
---|
3038 | ;; |
---|
3039 | *-*-domainos) |
---|
3040 | ans=yes |
---|
3041 | ;; |
---|
3042 | *-*-freebsd*) |
---|
3043 | ans=yes |
---|
3044 | ;; |
---|
3045 | *-*-hpux*) |
---|
3046 | ans=yes |
---|
3047 | ;; |
---|
3048 | *-*-irix6*) |
---|
3049 | ans=yes |
---|
3050 | ;; |
---|
3051 | *-*-linux*) |
---|
3052 | ans=yes |
---|
3053 | ;; |
---|
3054 | *-*-mpeix*) |
---|
3055 | ans=yes |
---|
3056 | ;; |
---|
3057 | *-*-osf*) |
---|
3058 | ans=yes |
---|
3059 | ;; |
---|
3060 | *-*-ptx*) |
---|
3061 | ans=yes |
---|
3062 | ;; |
---|
3063 | *-*-solaris2*) |
---|
3064 | ans=yes |
---|
3065 | ;; |
---|
3066 | *-*-sunos4*) |
---|
3067 | ans=yes |
---|
3068 | ;; |
---|
3069 | esac]) |
---|
3070 | ac_cv_var_udp_wildcard_delivery=$ans]) |
---|
3071 | case "$ac_cv_var_udp_wildcard_delivery" in |
---|
3072 | yes) AC_DEFINE(UDP_WILDCARD_DELIVERY) ;; |
---|
3073 | esac |
---|
3074 | |
---|
3075 | case "$host" in |
---|
3076 | $target) |
---|
3077 | ;; |
---|
3078 | *) case "$target" in |
---|
3079 | *-*-vxworks*) |
---|
3080 | LDFLAGS="$LDFLAGS -r" |
---|
3081 | ;; |
---|
3082 | esac |
---|
3083 | ;; |
---|
3084 | esac |
---|
3085 | |
---|
3086 | AC_CACHE_CHECK(if we should always slew the time, ac_cv_var_slew_always, |
---|
3087 | [AC_ARG_ENABLE(slew-always, [ --enable-slew-always s always slew the time], |
---|
3088 | [ans=$enableval], |
---|
3089 | [case "$target" in |
---|
3090 | *-apple-aux[[23]]*) |
---|
3091 | ans=yes |
---|
3092 | ;; |
---|
3093 | *-*-bsdi[[012]]*) |
---|
3094 | ans=no |
---|
3095 | ;; |
---|
3096 | *-*-bsdi*) |
---|
3097 | ans=yes |
---|
3098 | ;; |
---|
3099 | *-*-openvms*) # HMS: won't be found |
---|
3100 | ans=yes |
---|
3101 | ;; |
---|
3102 | *) ans=no |
---|
3103 | ;; |
---|
3104 | esac |
---|
3105 | ]) |
---|
3106 | ac_cv_var_slew_always=$ans]) |
---|
3107 | case "$ac_cv_var_slew_always" in |
---|
3108 | yes) AC_DEFINE(SLEWALWAYS) ;; |
---|
3109 | esac |
---|
3110 | |
---|
3111 | AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew, |
---|
3112 | [AC_ARG_ENABLE(step-slew, [ --enable-step-slew s step and slew the time], |
---|
3113 | [ans=$enableval], |
---|
3114 | [case "$target" in |
---|
3115 | *-sni-sysv*) |
---|
3116 | ans=yes |
---|
3117 | ;; |
---|
3118 | *-univel-sysv*) |
---|
3119 | ans=no |
---|
3120 | ;; |
---|
3121 | *-*-ptx*) |
---|
3122 | ans=yes |
---|
3123 | ;; |
---|
3124 | *-*-solaris2.[[012]]*) |
---|
3125 | ans=yes |
---|
3126 | ;; |
---|
3127 | *-*-sysv4*) # HMS: Does this catch Fujitsu UXP? |
---|
3128 | ans=yes |
---|
3129 | ;; |
---|
3130 | *) ans=no |
---|
3131 | ;; |
---|
3132 | esac |
---|
3133 | ]) |
---|
3134 | ac_cv_var_step_slew=$ans]) |
---|
3135 | case "$ac_cv_var_step_slew" in |
---|
3136 | yes) AC_DEFINE(STEP_SLEW) ;; |
---|
3137 | esac |
---|
3138 | |
---|
3139 | AC_CACHE_CHECK(if ntpdate should step the time, ac_cv_var_ntpdate_step, |
---|
3140 | [AC_ARG_ENABLE(ntpdate-step, [ --enable-ntpdate-step s if ntpdate should step the time], |
---|
3141 | [ans=$enableval], |
---|
3142 | [case "$target" in |
---|
3143 | *-apple-aux[[23]]*) |
---|
3144 | ans=yes |
---|
3145 | ;; |
---|
3146 | *) ans=no |
---|
3147 | ;; |
---|
3148 | esac |
---|
3149 | ]) |
---|
3150 | ac_cv_var_ntpdate_step=$ans]) |
---|
3151 | case "$ac_cv_var_ntpdate_step" in |
---|
3152 | yes) AC_DEFINE(FORCE_NTPDATE_STEP) ;; |
---|
3153 | esac |
---|
3154 | |
---|
3155 | AC_CACHE_CHECK(if we should sync TODR clock every hour, ac_cv_var_sync_todr, |
---|
3156 | [AC_ARG_ENABLE(hourly-todr-sync, [ --enable-hourly-todr-sync |
---|
3157 | s if we should sync TODR hourly], |
---|
3158 | [ans=$enableval], |
---|
3159 | [case "$target" in |
---|
3160 | *-*-nextstep*) |
---|
3161 | ans=yes |
---|
3162 | ;; |
---|
3163 | *-*-openvms*) # HMS: won't be found |
---|
3164 | ans=yes |
---|
3165 | ;; |
---|
3166 | *) ans=no |
---|
3167 | ;; |
---|
3168 | esac]) |
---|
3169 | ac_cv_var_sync_todr=$ans]) |
---|
3170 | case "$ac_cv_var_sync_todr" in |
---|
3171 | yes) AC_DEFINE(DOSYNCTODR) ;; |
---|
3172 | esac |
---|
3173 | |
---|
3174 | AC_CACHE_CHECK(if we should avoid kernel FLL bug, ac_cv_var_kernel_fll_bug, |
---|
3175 | [AC_ARG_ENABLE(kernel-fll-bug, [ --enable-kernel-fll-bug s if we should avoid a kernel FLL bug], |
---|
3176 | [ans=$enableval], |
---|
3177 | [case "$target" in |
---|
3178 | *-*-solaris2.6) |
---|
3179 | unamev=`uname -v` |
---|
3180 | case "$unamev" in |
---|
3181 | Generic_105181-*) |
---|
3182 | old_IFS="$IFS" |
---|
3183 | IFS="-" |
---|
3184 | set $unamev |
---|
3185 | IFS="$old_IFS" |
---|
3186 | if test "$2" -ge 17 |
---|
3187 | then |
---|
3188 | # Generic_105181-17 and higher |
---|
3189 | ans=no |
---|
3190 | else |
---|
3191 | ans=yes |
---|
3192 | fi |
---|
3193 | ;; |
---|
3194 | *) ans=yes |
---|
3195 | ;; |
---|
3196 | esac |
---|
3197 | ;; |
---|
3198 | *-*-solaris2.7) |
---|
3199 | unamev=`uname -v` |
---|
3200 | case "$unamev" in |
---|
3201 | Generic_106541-*) |
---|
3202 | old_IFS="$IFS" |
---|
3203 | IFS="-" |
---|
3204 | set $unamev |
---|
3205 | IFS="$old_IFS" |
---|
3206 | if test "$2" -ge 07 |
---|
3207 | then |
---|
3208 | # Generic_106541-07 and higher |
---|
3209 | ans=no |
---|
3210 | else |
---|
3211 | ans=yes |
---|
3212 | fi |
---|
3213 | ;; |
---|
3214 | *) ans=yes |
---|
3215 | ;; |
---|
3216 | esac |
---|
3217 | ;; |
---|
3218 | *) ans=no |
---|
3219 | ;; |
---|
3220 | esac |
---|
3221 | ]) |
---|
3222 | ac_cv_var_kernel_fll_bug=$ans]) |
---|
3223 | case "$ac_cv_var_kernel_fll_bug" in |
---|
3224 | yes) AC_DEFINE(KERNEL_FLL_BUG) ;; |
---|
3225 | esac |
---|
3226 | |
---|
3227 | case "$host" in |
---|
3228 | $target) |
---|
3229 | ;; |
---|
3230 | *) case "$target" in |
---|
3231 | *-*-vxworks*) |
---|
3232 | LDFLAGS="$LDFLAGS -r" |
---|
3233 | ;; |
---|
3234 | esac |
---|
3235 | ;; |
---|
3236 | esac |
---|
3237 | |
---|
3238 | AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info]) |
---|
3239 | |
---|
3240 | # This is necessary so that .o files in LIBOBJS are also built via |
---|
3241 | # the ANSI2KNR-filtering rules. |
---|
3242 | LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` |
---|
3243 | |
---|
3244 | AC_CONFIG_FILES(Makefile adjtimed/Makefile clockstuff/Makefile \ |
---|
3245 | ElectricFence/Makefile |
---|
3246 | include/Makefile kernel/Makefile kernel/sys/Makefile libntp/Makefile \ |
---|
3247 | libparse/Makefile librsaref/Makefile ntpd/Makefile ntpdc/Makefile \ |
---|
3248 | ntpdate/Makefile ntpq/Makefile ntptrace/Makefile parseutil/Makefile \ |
---|
3249 | scripts/Makefile scripts/calc_tickadj scripts/checktime scripts/freq_adj \ |
---|
3250 | scripts/mkver scripts/ntp-wait scripts/ntpsweep scripts/ntpver \ |
---|
3251 | scripts/plot_summary scripts/summary util/Makefile) |
---|
3252 | AC_CONFIG_COMMANDS(default, [[chmod +x scripts/calc_tickadj scripts/checktime scripts/freq_adj scripts/mkver scripts/ntp-wait scripts/ntpsweep scripts/ntpver scripts/plot_summary scripts/summary]], []) |
---|
3253 | AC_OUTPUT |
---|
3254 | #test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h]) |
---|