1 | dnl -*-fundamental-*- |
---|
2 | dnl Process this file with autoconf to produce a configure script. |
---|
3 | AC_INIT(xntpd/ntp_refclock.c) |
---|
4 | AM_INIT_AUTOMAKE(xntp3, 5.91) |
---|
5 | AC_CANONICAL_SYSTEM |
---|
6 | AC_DEFINE_UNQUOTED(STR_SYSTEM, "$target") |
---|
7 | AM_CONFIG_HEADER(config.h) |
---|
8 | AC_ARG_PROGRAM |
---|
9 | |
---|
10 | dnl we need to check for cross compile tools for vxWorks here |
---|
11 | AC_PROG_CC |
---|
12 | AC_PROG_CPP |
---|
13 | |
---|
14 | case "$host" in |
---|
15 | $target) |
---|
16 | ;; |
---|
17 | *) case "$target" in |
---|
18 | *-*-vxworks*) |
---|
19 | # Quick and dirty sanity check |
---|
20 | case "$VX_KERNEL" in |
---|
21 | '') AC_MSG_ERROR(Please follow the directions in html/vxworks.html!) |
---|
22 | ;; |
---|
23 | esac |
---|
24 | CFLAGS="$CFLAGS -DSYS_VXWORKS" |
---|
25 | ;; |
---|
26 | esac |
---|
27 | ;; |
---|
28 | esac |
---|
29 | |
---|
30 | dnl we need to check for cross compile tools for vxWorks here |
---|
31 | AC_PROG_AWK |
---|
32 | AC_PROG_MAKE_SET |
---|
33 | |
---|
34 | rm -f conftest* |
---|
35 | |
---|
36 | case "$GCC" in |
---|
37 | yes) |
---|
38 | CFLAGS="$CFLAGS -Wall" |
---|
39 | # CFLAGS="$CFLAGS -Wtraditional" |
---|
40 | # CFLAGS="$CFLAGS -Wshadow" |
---|
41 | # CFLAGS="$CFLAGS -Wwrite-strings" |
---|
42 | # CFLAGS="$CFLAGS -Wconversion" |
---|
43 | # CFLAGS="$CFLAGS -Wpointer-arith" |
---|
44 | # CFLAGS="$CFLAGS -Wcast-qual" |
---|
45 | # CFLAGS="$CFLAGS -Wcast-align" |
---|
46 | # CFLAGS="$CFLAGS -Wstrict-prototypes" |
---|
47 | |
---|
48 | AC_CACHE_CHECK(whether ${CC-cc} accepts -pipe, ac_cv_prog_cc_pipe, |
---|
49 | [echo 'void f(){}' > conftest.c |
---|
50 | if test -z "`${CC-cc} -pipe -c conftest.c 2>&1`"; then |
---|
51 | ac_cv_prog_cc_pipe=yes |
---|
52 | else |
---|
53 | ac_cv_prog_cc_pipe=no |
---|
54 | fi |
---|
55 | rm -f conftest* |
---|
56 | ]) |
---|
57 | |
---|
58 | case "$ac_cv_prog_cc_pipe" in |
---|
59 | yes) |
---|
60 | CFLAGS="$CFLAGS -pipe" |
---|
61 | ;; |
---|
62 | esac |
---|
63 | ;; |
---|
64 | esac |
---|
65 | |
---|
66 | ac_busted_vpath_in_make=no |
---|
67 | |
---|
68 | case "$target" in |
---|
69 | *-*-irix6.1*) # 64 bit only |
---|
70 | ;; |
---|
71 | *-*-irix6*) # 6.2 (and later?) |
---|
72 | ac_busted_vpath_in_make=yes |
---|
73 | case "$CFLAGS" in |
---|
74 | *-n32*) ;; |
---|
75 | *-n64*) ;; |
---|
76 | *) CFLAGS="$CFLAGS -n32" ;; |
---|
77 | esac |
---|
78 | case "$LDFLAGS" in |
---|
79 | *-n32*) ;; |
---|
80 | *-n64*) ;; |
---|
81 | *) LDFLAGS="$LDFLAGS -n32" ;; |
---|
82 | esac |
---|
83 | ;; |
---|
84 | esac |
---|
85 | |
---|
86 | case "$ac_busted_vpath_in_make$srcdir" in |
---|
87 | no*) ;; |
---|
88 | yes.) ;; |
---|
89 | *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in |
---|
90 | '') |
---|
91 | AC_MSG_ERROR(building outside of the main directory requires GNU make) |
---|
92 | ;; |
---|
93 | *) ;; |
---|
94 | esac |
---|
95 | ;; |
---|
96 | esac |
---|
97 | |
---|
98 | AC_SUBST(CFLAGS)dnl |
---|
99 | AC_SUBST(LDFLAGS)dnl |
---|
100 | |
---|
101 | AC_PROG_LN_S |
---|
102 | AC_PROG_GCC_TRADITIONAL |
---|
103 | AC_AIX |
---|
104 | AC_MINIX |
---|
105 | AC_ISC_POSIX |
---|
106 | AC_PROG_RANLIB |
---|
107 | |
---|
108 | case "$target" in |
---|
109 | *-*-vxworks*) |
---|
110 | ac_link="$ac_link $VX_KERNEL" |
---|
111 | ;; |
---|
112 | esac |
---|
113 | |
---|
114 | AC_PROG_INSTALL |
---|
115 | |
---|
116 | dnl We might need this for other systems... |
---|
117 | check_libnsl=yes |
---|
118 | check_libsocket=yes |
---|
119 | changequote(<<, >>)dnl |
---|
120 | case "$target" in |
---|
121 | *-*-irix[56]*) |
---|
122 | check_libnsl=no |
---|
123 | check_libsocket=no |
---|
124 | ;; |
---|
125 | esac |
---|
126 | changequote([, ])dnl |
---|
127 | |
---|
128 | check_libgen=no |
---|
129 | case "$target" in |
---|
130 | *-univel-sysv4.2*) |
---|
131 | check_libgen=yes |
---|
132 | ;; |
---|
133 | esac |
---|
134 | |
---|
135 | AC_CHECK_LIB(elf, nlist) |
---|
136 | case "$check_libgen" in |
---|
137 | yes) |
---|
138 | AC_CHECK_LIB(gen, openlog) |
---|
139 | ;; |
---|
140 | esac |
---|
141 | dnl AC_CHECK_LIB(kvm, main, , , -lelf) |
---|
142 | AC_CHECK_LIB(kvm, main) dnl We already know about -lelf here... |
---|
143 | AC_CHECK_LIB(ld, nlist) |
---|
144 | AC_CHECK_LIB(mld, nlist) |
---|
145 | case "$check_libnsl" in |
---|
146 | yes) |
---|
147 | AC_CHECK_LIB(nsl, gethostbyaddr, , , -lsocket) |
---|
148 | ;; |
---|
149 | esac |
---|
150 | AC_CHECK_LIB(posix4, main) dnl What function can we look for? |
---|
151 | case "$check_libsocket" in |
---|
152 | yes) |
---|
153 | AC_CHECK_LIB(socket, socket) |
---|
154 | ;; |
---|
155 | esac |
---|
156 | |
---|
157 | AC_HEADER_STDC |
---|
158 | AC_CHECK_HEADERS(errno.h fcntl.h memory.h sched.h sgtty.h stdlib.h string.h) |
---|
159 | AC_CHECK_HEADERS(termio.h termios.h unistd.h utmp.h utmpx.h) |
---|
160 | AC_CHECK_HEADERS(net/if.h netinet/in.h netinet/ip.h sys/bsd_audioirig.h) |
---|
161 | AC_CHECK_HEADERS(sys/chudefs.h sys/clkdefs.h sys/file.h) |
---|
162 | case "$target" in |
---|
163 | *-*-sunos4*) ;; |
---|
164 | *) AC_CHECK_HEADERS(sys/ioctl.h) |
---|
165 | ;; |
---|
166 | esac |
---|
167 | AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h) |
---|
168 | AC_CHECK_HEADERS(sys/proc.h sys/resource.h) |
---|
169 | case "$target" in |
---|
170 | *-*-sco3.2v4.2) |
---|
171 | ;; |
---|
172 | *) |
---|
173 | AC_CHECK_HEADERS(sys/select.h) |
---|
174 | ;; |
---|
175 | esac |
---|
176 | AC_CHECK_HEADERS(sys/sockio.h sys/stat.h sys/stream.h sys/stropts.h) |
---|
177 | AC_CHECK_HEADERS(sys/sysctl.h sys/time.h sys/timers.h sys/timex.h sys/tpro.h) |
---|
178 | AC_CHECK_HEADERS(sys/types.h) |
---|
179 | AC_HEADER_TIME |
---|
180 | case "$target" in |
---|
181 | *-convex-*) |
---|
182 | AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h) |
---|
183 | ;; |
---|
184 | *-*-bsdi*) |
---|
185 | AC_CHECK_HEADERS(machine/inline.h sys/pcl720.h sys/i8253.h) |
---|
186 | ;; |
---|
187 | esac |
---|
188 | |
---|
189 | AC_CHECK_HEADER(nlist.h, |
---|
190 | [AC_DEFINE(NLIST_STRUCT) |
---|
191 | AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un, |
---|
192 | [AC_TRY_COMPILE([#include <nlist.h>], |
---|
193 | [struct nlist n; n.n_un.n_name = 0;], |
---|
194 | ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)]) |
---|
195 | if test $ac_cv_struct_nlist_n_un = yes; then |
---|
196 | AC_DEFINE(NLIST_NAME_UNION) |
---|
197 | fi |
---|
198 | ])dnl |
---|
199 | |
---|
200 | AC_CACHE_CHECK(for basic volatile support, ac_cv_c_volatile, |
---|
201 | [AC_TRY_COMPILE([],[ |
---|
202 | volatile int x;], |
---|
203 | ac_cv_c_volatile=yes, |
---|
204 | ac_cv_c_volatile=no) |
---|
205 | ]) |
---|
206 | case "$ac_cv_c_volatile" in |
---|
207 | yes) |
---|
208 | ;; |
---|
209 | *) AC_DEFINE(volatile,) |
---|
210 | ;; |
---|
211 | esac |
---|
212 | |
---|
213 | AC_C_CONST |
---|
214 | case "$host" in |
---|
215 | $target) |
---|
216 | AC_C_BIGENDIAN |
---|
217 | ;; |
---|
218 | *) case "$target" in |
---|
219 | i*86-*-vxworks*) |
---|
220 | # LITTLEENDIAN |
---|
221 | ;; |
---|
222 | *-*-vxworks*) |
---|
223 | AC_DEFINE(WORDS_BIGENDIAN) |
---|
224 | ;; |
---|
225 | *) AC_MSG_ERROR(Cross-compiling needs explicit byte order) |
---|
226 | ;; |
---|
227 | esac |
---|
228 | ;; |
---|
229 | esac |
---|
230 | AC_TYPE_SIGNAL |
---|
231 | AC_STRUCT_TM |
---|
232 | |
---|
233 | AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz, |
---|
234 | [ac_cv_var_default_hz=100 |
---|
235 | case "$target" in |
---|
236 | alpha-dec-osf4*) |
---|
237 | ac_cv_var_default_hz=1024 |
---|
238 | ;; |
---|
239 | mips-dec-ultrix4*) |
---|
240 | ac_cv_var_default_hz=256 |
---|
241 | ;; |
---|
242 | esac]) |
---|
243 | AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz) |
---|
244 | |
---|
245 | AC_CACHE_CHECK(if we need to override the system's value for HZ, ac_cv_var_override_hz, |
---|
246 | [ac_cv_var_override_hz=no |
---|
247 | case "$target" in |
---|
248 | alpha-dec-osf4*) |
---|
249 | ac_cv_var_override_hz=yes |
---|
250 | ;; |
---|
251 | mips-dec-ultrix4*) |
---|
252 | ac_cv_var_override_hz=yes |
---|
253 | ;; |
---|
254 | *-*-freebsd*) |
---|
255 | ac_cv_var_override_hz=yes |
---|
256 | ;; |
---|
257 | *-*-sunos4*) |
---|
258 | ac_cv_var_override_hz=yes |
---|
259 | ;; |
---|
260 | esac]) |
---|
261 | case "$ac_cv_var_override_hz" in |
---|
262 | yes) |
---|
263 | AC_DEFINE(OVERRIDE_HZ) |
---|
264 | ;; |
---|
265 | esac |
---|
266 | |
---|
267 | dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp, |
---|
268 | dnl [AC_TRY_LINK([#include <sys/types.h> |
---|
269 | dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;], |
---|
270 | dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)]) |
---|
271 | dnl if test $su_cv_func_ut_host_in_utmp = yes; then |
---|
272 | dnl AC_DEFINE(HAVE_UT_HOST) |
---|
273 | dnl fi |
---|
274 | |
---|
275 | dnl AC_MSG_CHECKING(if we can get the system boot time) |
---|
276 | dnl AC_CACHE_VAL(su_cv_have_boot_time, |
---|
277 | dnl [AC_EGREP_CPP(yes, |
---|
278 | dnl [#ifdef HAVE_UTMPX_H |
---|
279 | dnl #include <utmpx.h> |
---|
280 | dnl #else |
---|
281 | dnl #include <utmp.h> |
---|
282 | dnl #endif |
---|
283 | dnl #ifdef BOOT_TIME |
---|
284 | dnl yes |
---|
285 | dnl #endif |
---|
286 | dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)]) |
---|
287 | dnl AC_MSG_RESULT($su_cv_have_boot_time) |
---|
288 | |
---|
289 | AC_CACHE_CHECK(struct sockaddr for sa_len, ac_cv_struct_sockaddr_has_sa_len, |
---|
290 | [AC_TRY_COMPILE([ |
---|
291 | #include <sys/types.h> |
---|
292 | #include <sys/socket.h>],[ |
---|
293 | extern struct sockaddr *ps; |
---|
294 | return ps->sa_len;], |
---|
295 | ac_cv_struct_sockaddr_has_sa_len=yes, |
---|
296 | ac_cv_struct_sockaddr_has_sa_len=no) |
---|
297 | ]) |
---|
298 | if test $ac_cv_struct_sockaddr_has_sa_len = yes; then |
---|
299 | AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR) |
---|
300 | fi |
---|
301 | |
---|
302 | AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz, |
---|
303 | [AC_TRY_COMPILE([ |
---|
304 | #include <sys/time.h>],[ |
---|
305 | extern struct clockinfo *pc; |
---|
306 | return pc->hz;], |
---|
307 | ac_cv_struct_clockinfo_has_hz=yes, |
---|
308 | ac_cv_struct_clockinfo_has_hz=no) |
---|
309 | ]) |
---|
310 | if test $ac_cv_struct_clockinfo_has_hz = yes; then |
---|
311 | AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO) |
---|
312 | fi |
---|
313 | |
---|
314 | AC_CACHE_CHECK(struct clockinfo for tickadj, ac_cv_struct_clockinfo_has_tickadj, |
---|
315 | [AC_TRY_COMPILE([ |
---|
316 | #include <sys/time.h>],[ |
---|
317 | extern struct clockinfo *pc; |
---|
318 | return pc->tickadj;], |
---|
319 | ac_cv_struct_clockinfo_has_tickadj=yes, |
---|
320 | ac_cv_struct_clockinfo_has_tickadj=no) |
---|
321 | ]) |
---|
322 | if test $ac_cv_struct_clockinfo_has_tickadj = yes; then |
---|
323 | AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO) |
---|
324 | fi |
---|
325 | |
---|
326 | AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes, |
---|
327 | [AC_TRY_COMPILE([ |
---|
328 | extern int foo (short); |
---|
329 | int foo(short i) { return i; }],[ |
---|
330 | int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no) |
---|
331 | ]) |
---|
332 | if test "$ac_cv_have_prototypes" = yes; then |
---|
333 | AC_DEFINE(HAVE_PROTOTYPES) |
---|
334 | fi |
---|
335 | |
---|
336 | AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE? |
---|
337 | case "$host" in |
---|
338 | $target) |
---|
339 | AC_CHECK_SIZEOF(signed char) |
---|
340 | ;; |
---|
341 | *) case "$target" in |
---|
342 | *-*-vxworks*) |
---|
343 | AC_CHECK_SIZEOF(signed char, 1) |
---|
344 | ;; |
---|
345 | *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_SIGNED_LONG) |
---|
346 | ;; |
---|
347 | esac |
---|
348 | ;; |
---|
349 | esac |
---|
350 | |
---|
351 | case "$host" in |
---|
352 | $target) |
---|
353 | AC_CHECK_SIZEOF(int) |
---|
354 | ;; |
---|
355 | *) case "$target" in |
---|
356 | *-*-vxworks*) |
---|
357 | AC_CHECK_SIZEOF(int, 4) |
---|
358 | ;; |
---|
359 | *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_INT) |
---|
360 | ;; |
---|
361 | esac |
---|
362 | ;; |
---|
363 | esac |
---|
364 | |
---|
365 | case "$host" in |
---|
366 | $target) |
---|
367 | AC_CHECK_SIZEOF(long) |
---|
368 | ;; |
---|
369 | *) case "$target" in |
---|
370 | *-*-vxworks*) |
---|
371 | AC_CHECK_SIZEOF(long, 4) |
---|
372 | ;; |
---|
373 | *) AC_MSG_ERROR(Cross-compiling needs explicit SIZEOF_LONG) |
---|
374 | ;; |
---|
375 | esac |
---|
376 | ;; |
---|
377 | esac |
---|
378 | |
---|
379 | AC_CHECK_TYPE(s_char, signed char) |
---|
380 | case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in |
---|
381 | *yes) |
---|
382 | # We have a typedef for s_char. Might as well believe it... |
---|
383 | ;; |
---|
384 | no0no) |
---|
385 | # We have signed chars, can't say 'signed char', no s_char typedef. |
---|
386 | AC_DEFINE(NEED_S_CHAR_TYPEDEF) |
---|
387 | ;; |
---|
388 | no1no) |
---|
389 | # We have signed chars, can say 'signed char', no s_char typedef. |
---|
390 | AC_DEFINE(NEED_S_CHAR_TYPEDEF) |
---|
391 | ;; |
---|
392 | yes0no) |
---|
393 | # We have unsigned chars, can't say 'signed char', no s_char typedef. |
---|
394 | AC_MSG_ERROR(No way to specify a signed character!) |
---|
395 | ;; |
---|
396 | yes1no) |
---|
397 | # We have unsigned chars, can say 'signed char', no s_char typedef. |
---|
398 | AC_DEFINE(NEED_S_CHAR_TYPEDEF) |
---|
399 | ;; |
---|
400 | esac |
---|
401 | AC_TYPE_UID_T |
---|
402 | |
---|
403 | case "$target" in |
---|
404 | *-*-linux*) |
---|
405 | AC_CHECK_FUNCS(__adjtimex __ntp_gettime) |
---|
406 | ;; |
---|
407 | esac |
---|
408 | AC_CHECK_FUNCS(clock_settime daemon getbootfile getdtablesize getrusage) |
---|
409 | AC_CHECK_FUNCS(gettimeofday getuid K_open kvm_open memcpy memmove memset) |
---|
410 | AC_CHECK_FUNCS(mkstemp) |
---|
411 | case "$target" in |
---|
412 | *-*-irix*) |
---|
413 | # Just stubs in Irix. Idiots. |
---|
414 | ;; |
---|
415 | *) AC_CHECK_FUNCS(mlockall) |
---|
416 | ;; |
---|
417 | esac |
---|
418 | AC_CHECK_FUNCS(nice nlist ntp_adjtime ntp_gettime plock) |
---|
419 | AC_CHECK_FUNCS(pututline pututxline rtprio) |
---|
420 | case "$target" in |
---|
421 | *-*-solaris2.5*) |
---|
422 | # Just stubs in solaris2.5. Idiots. |
---|
423 | ;; |
---|
424 | *) AC_CHECK_FUNCS(sched_setscheduler) |
---|
425 | ;; |
---|
426 | esac |
---|
427 | AC_CHECK_FUNCS(setlinebuf) |
---|
428 | AC_CHECK_FUNCS(setpgid setpriority setsid settimeofday setvbuf sigaction) |
---|
429 | AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl) |
---|
430 | AC_CHECK_FUNCS(timer_create timer_settime umask uname updwtmp updwtmpx) |
---|
431 | AC_CHECK_FUNCS(vsprintf) |
---|
432 | |
---|
433 | AC_CACHE_CHECK(number of arguments to gettimeofday(), ac_cv_func_Xettimeofday_nargs, |
---|
434 | [AC_TRY_COMPILE([#include <sys/time.h>],[ |
---|
435 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
---|
436 | settimeofday((struct timeval*)0,(struct timezone*)0); |
---|
437 | ], |
---|
438 | ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1) |
---|
439 | ]) |
---|
440 | if test $ac_cv_func_Xettimeofday_nargs = 1; then |
---|
441 | AC_DEFINE(SYSV_TIMEOFDAY) |
---|
442 | fi |
---|
443 | |
---|
444 | AC_CACHE_CHECK(number of arguments taken by setpgrp(), ac_cv_func_setpgrp_nargs, |
---|
445 | [AC_TRY_COMPILE([ |
---|
446 | #ifdef HAVE_SYS_TYPES_H |
---|
447 | # include <sys/types.h> |
---|
448 | #endif |
---|
449 | #ifdef HAVE_UNISTD_H |
---|
450 | # include <unistd.h> |
---|
451 | #endif |
---|
452 | ],[setpgrp(0,0);], |
---|
453 | ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0) |
---|
454 | ]) |
---|
455 | if test $ac_cv_func_setpgrp_nargs = 0; then |
---|
456 | AC_DEFINE(HAVE_SETPGRP_0) |
---|
457 | fi |
---|
458 | |
---|
459 | save_CFLAGS=$CFLAGS |
---|
460 | CFLAGS="$CFLAGS -I$srcdir/include" |
---|
461 | |
---|
462 | AC_CACHE_CHECK(argument pointer type of qsort()'s compare function and base, |
---|
463 | ac_cv_func_qsort_argtype, |
---|
464 | [AC_TRY_COMPILE([ |
---|
465 | #include "l_stdlib.h" |
---|
466 | |
---|
467 | #ifdef HAVE_PROTOTYPES |
---|
468 | #define P(x) x |
---|
469 | #else |
---|
470 | #define P(x) () |
---|
471 | #endif |
---|
472 | |
---|
473 | extern void *base; |
---|
474 | extern sortfunc P((const void *, const void *)); |
---|
475 | int sortfunc(a, b) |
---|
476 | const void *a; |
---|
477 | const void *b; { return 0; } |
---|
478 | ],[ |
---|
479 | qsort(base, 2, sizeof(char *), sortfunc); |
---|
480 | ], |
---|
481 | ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char) |
---|
482 | ]) |
---|
483 | case "$ac_cv_func_qsort_argtype" in |
---|
484 | void) |
---|
485 | AC_DEFINE(QSORT_USES_VOID_P) |
---|
486 | ;; |
---|
487 | esac |
---|
488 | |
---|
489 | CFLAGS=$save_CFLAGS |
---|
490 | |
---|
491 | dnl See if char *sys_errlist[] is OK. |
---|
492 | dnl If you get the quoting right on the next line, you tried something I didn't. |
---|
493 | AC_CACHE_CHECK(if declaring 'char *sys_errlist[]' is ok, ac_cv_decl_sys_errlist, |
---|
494 | [AC_TRY_COMPILE([#include <stdio.h> |
---|
495 | #ifdef HAVE_ERRNO_H |
---|
496 | #include <errno.h> |
---|
497 | #endif], |
---|
498 | changequote(<<, >>)dnl |
---|
499 | <<extern char *sys_errlist[];>> |
---|
500 | changequote([, ]), |
---|
501 | ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)]) |
---|
502 | case "$ac_cv_decl_sys_errlist" in |
---|
503 | yes) AC_DEFINE(CHAR_SYS_ERRLIST) ;; |
---|
504 | esac |
---|
505 | |
---|
506 | AC_CACHE_CHECK(if declaring 'syscall()' is ok, ac_cv_decl_syscall, |
---|
507 | [AC_TRY_COMPILE([ |
---|
508 | #ifdef HAVE_SYS_TYPES_H |
---|
509 | # include <sys/types.h> |
---|
510 | #endif |
---|
511 | #ifdef HAVE_UNISTD_H |
---|
512 | # include <unistd.h> |
---|
513 | #endif |
---|
514 | #ifdef HAVE_PROTOTYPES |
---|
515 | #define P(x) x |
---|
516 | #else |
---|
517 | #define P(x) () |
---|
518 | #endif |
---|
519 | ], |
---|
520 | [extern int syscall P((int, struct timeval *, struct timeval *));], |
---|
521 | ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)]) |
---|
522 | case "$ac_cv_decl_syscall" in |
---|
523 | yes) AC_DEFINE(DECL_SYSCALL) ;; |
---|
524 | esac |
---|
525 | |
---|
526 | case "$target" in |
---|
527 | *-*-osf4*) |
---|
528 | AC_DEFINE(DECL_PLOCK_0) |
---|
529 | ;; |
---|
530 | *-*-riscos4*) |
---|
531 | AC_DEFINE(DECL_ADJTIME_0) |
---|
532 | AC_DEFINE(DECL_BZERO_0) |
---|
533 | AC_DEFINE(DECL_IOCTL_0) |
---|
534 | AC_DEFINE(DECL_IPC_0) |
---|
535 | AC_DEFINE(DECL_MEMMOVE_0) |
---|
536 | AC_DEFINE(DECL_MKTEMP_0) |
---|
537 | AC_DEFINE(DECL_RENAME_0) |
---|
538 | AC_DEFINE(DECL_SELECT_0) |
---|
539 | AC_DEFINE(DECL_SETITIMER_0) |
---|
540 | AC_DEFINE(DECL_SETPRIORITY_0) |
---|
541 | AC_DEFINE(DECL_STDIO_0) |
---|
542 | AC_DEFINE(DECL_STRTOL_0) |
---|
543 | AC_DEFINE(DECL_SYSLOG_0) |
---|
544 | AC_DEFINE(DECL_TIME_0) |
---|
545 | AC_DEFINE(DECL_TIMEOFDAY_0) |
---|
546 | AC_DEFINE(DECL_TOLOWER_0) |
---|
547 | ;; |
---|
548 | *-*-solaris2*) |
---|
549 | AC_DEFINE(DECL_MKSTEMP_0) |
---|
550 | AC_DEFINE(DECL_SETPRIORITY_1) |
---|
551 | ;; |
---|
552 | *-*-sunos4*) |
---|
553 | AC_DEFINE(DECL_ADJTIME_0) |
---|
554 | AC_DEFINE(DECL_BCOPY_0) |
---|
555 | AC_DEFINE(DECL_BZERO_0) |
---|
556 | AC_DEFINE(DECL_IOCTL_0) |
---|
557 | AC_DEFINE(DECL_IPC_0) |
---|
558 | AC_DEFINE(DECL_MEMMOVE_0) |
---|
559 | AC_DEFINE(DECL_MKTEMP_0) |
---|
560 | AC_DEFINE(DECL_RENAME_0) |
---|
561 | AC_DEFINE(DECL_SELECT_0) |
---|
562 | AC_DEFINE(DECL_SETITIMER_0) |
---|
563 | AC_DEFINE(DECL_SETPRIORITY_0) |
---|
564 | AC_DEFINE(DECL_SIGVEC_0) |
---|
565 | case "`basename $ac_cv_prog_CC`" in |
---|
566 | acc*) ;; |
---|
567 | *) AC_DEFINE(DECL_STDIO_0) |
---|
568 | ;; |
---|
569 | esac |
---|
570 | AC_DEFINE(DECL_STRTOL_0) |
---|
571 | AC_DEFINE(DECL_SYSLOG_0) |
---|
572 | AC_DEFINE(DECL_TIME_0) |
---|
573 | AC_DEFINE(DECL_TIMEOFDAY_0) |
---|
574 | AC_DEFINE(DECL_TOLOWER_0) |
---|
575 | ;; |
---|
576 | esac |
---|
577 | |
---|
578 | AC_CACHE_CHECK(if we should use a streams device for ifconfig, |
---|
579 | ac_cv_var_use_streams_device_for_ifconfig, |
---|
580 | ac_cv_var_use_streams_device_for_ifconfig=no) |
---|
581 | |
---|
582 | AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop, |
---|
583 | [ans=no |
---|
584 | changequote(<<, >>)dnl |
---|
585 | case "$target" in |
---|
586 | *-*-hpux[567]*) |
---|
587 | ans=yes |
---|
588 | ;; |
---|
589 | esac |
---|
590 | changequote([, ])dnl |
---|
591 | ac_cv_var_rcvbuf_slop=$ans]) |
---|
592 | case "$ac_cv_var_rcvbuf_slop" in |
---|
593 | yes) AC_DEFINE(NEED_RCVBUF_SLOP) ;; |
---|
594 | esac |
---|
595 | |
---|
596 | AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket, |
---|
597 | [ans=yes |
---|
598 | case "$target" in |
---|
599 | *-*-domainos) |
---|
600 | ans=no |
---|
601 | ;; |
---|
602 | *-*-linux*) |
---|
603 | ans=no |
---|
604 | ;; |
---|
605 | esac |
---|
606 | ac_cv_var_open_bcast_socket=$ans]) |
---|
607 | case "$ac_cv_var_open_bcast_socket" in |
---|
608 | yes) AC_DEFINE(OPEN_BCAST_SOCKET) ;; |
---|
609 | esac |
---|
610 | |
---|
611 | AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig, |
---|
612 | [ans=no |
---|
613 | case "$target" in |
---|
614 | *-*-hpux*) |
---|
615 | ans=yes |
---|
616 | ;; |
---|
617 | esac |
---|
618 | ac_cv_var_hpux_findconfig=$ans]) |
---|
619 | case "$ac_cv_var_hpux_findconfig" in |
---|
620 | yes) AC_DEFINE(NEED_HPUX_FINDCONFIG) ;; |
---|
621 | esac |
---|
622 | |
---|
623 | AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid, |
---|
624 | [changequote(<<, >>)dnl |
---|
625 | case "$target" in |
---|
626 | *-*-hpux[567]*) |
---|
627 | ans=no |
---|
628 | ;; |
---|
629 | *-*-hpux*) |
---|
630 | ans=yes |
---|
631 | ;; |
---|
632 | *-*-linux*) |
---|
633 | ans=yes |
---|
634 | ;; |
---|
635 | *-*-sunos3*) |
---|
636 | ans=yes |
---|
637 | ;; |
---|
638 | *-*-ultrix2*) |
---|
639 | ans=yes |
---|
640 | ;; |
---|
641 | *) |
---|
642 | ans=no |
---|
643 | ;; |
---|
644 | esac |
---|
645 | changequote([, ])dnl |
---|
646 | ac_cv_arg_setpgrp_negpid=$ans]) |
---|
647 | case "$ac_cv_arg_setpgrp_negpid" in |
---|
648 | yes) AC_DEFINE(UDP_BACKWARDS_SETOWN) ;; |
---|
649 | esac |
---|
650 | |
---|
651 | AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown, |
---|
652 | [case "$target" in |
---|
653 | *-*-bsdi2*) |
---|
654 | ans=yes |
---|
655 | ;; |
---|
656 | *-*-freebsd*) |
---|
657 | ans=yes |
---|
658 | ;; |
---|
659 | *-*-osf*) |
---|
660 | ans=yes |
---|
661 | ;; |
---|
662 | *) ans=no |
---|
663 | ;; |
---|
664 | esac |
---|
665 | ac_cv_func_ctty_for_f_setown=$ans]) |
---|
666 | case "$ac_cv_func_ctty_for_f_setown" in |
---|
667 | yes) AC_DEFINE(USE_FSETOWNCTTY) ;; |
---|
668 | esac |
---|
669 | |
---|
670 | ntp_warning='GRONK' |
---|
671 | AC_MSG_CHECKING(if we'll use clock_settime or settimeofday or stime) |
---|
672 | case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in |
---|
673 | yes*) |
---|
674 | ntp_warning='' |
---|
675 | ans='clock_settime()' |
---|
676 | ;; |
---|
677 | noyes*) |
---|
678 | ntp_warning='But clock_settime() would be better (if we had it)' |
---|
679 | ans='settimeofday()' |
---|
680 | ;; |
---|
681 | nonoyes) |
---|
682 | ntp_warning='Which is the worst of the three' |
---|
683 | ans='stime()' |
---|
684 | ;; |
---|
685 | *) |
---|
686 | case "$host" in |
---|
687 | $target) ntp_warning='Which leaves us with nothing to use!' |
---|
688 | ans=none |
---|
689 | ;; |
---|
690 | esac |
---|
691 | esac |
---|
692 | AC_MSG_RESULT($ans) |
---|
693 | case "$ntp_warning" in |
---|
694 | '') ;; |
---|
695 | *) AC_MSG_WARN(*** $ntp_warning ***) |
---|
696 | ;; |
---|
697 | esac |
---|
698 | |
---|
699 | AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug, |
---|
700 | [case "$target" in |
---|
701 | *-*-solaris2.4*) |
---|
702 | ans=yes |
---|
703 | ;; |
---|
704 | *) ans=no |
---|
705 | ;; |
---|
706 | esac |
---|
707 | ac_cv_var_syscall_bug=$ans]) |
---|
708 | case "$ac_cv_var_syscall_bug" in |
---|
709 | yes) AC_DEFINE(SYSCALL_BUG) ;; |
---|
710 | esac |
---|
711 | |
---|
712 | AC_CACHE_CHECK(for Streams/TLI, ac_cv_var_streams_tli, |
---|
713 | [ case "$ac_cv_header_sys_stropts_h" in |
---|
714 | yes) |
---|
715 | ans=no |
---|
716 | # There must be a better way... |
---|
717 | case "$target" in |
---|
718 | *-sni-sysv*) |
---|
719 | ans=yes |
---|
720 | ;; |
---|
721 | *-*-ptx*) |
---|
722 | ans=yes |
---|
723 | ;; |
---|
724 | esac |
---|
725 | ;; |
---|
726 | esac |
---|
727 | ac_cv_var_streams_tli=$ans]) |
---|
728 | case "$ac_cv_var_streams_tli" in |
---|
729 | yes) |
---|
730 | AC_DEFINE(STREAMS_TLI) |
---|
731 | ;; |
---|
732 | esac |
---|
733 | |
---|
734 | AC_CACHE_CHECK(for SIGIO, ac_cv_hdr_def_sigio, |
---|
735 | AC_EGREP_CPP(yes, |
---|
736 | [#include <signal.h> |
---|
737 | #ifdef SIGIO |
---|
738 | yes |
---|
739 | #endif |
---|
740 | ], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no)) |
---|
741 | |
---|
742 | dnl Override those system that have a losing SIGIO |
---|
743 | AC_CACHE_CHECK(if we want to use signalled IO, ac_cv_var_signalled_io, |
---|
744 | [ans=no |
---|
745 | case "$ac_cv_hdr_def_sigio" in |
---|
746 | yes) |
---|
747 | ans=yes |
---|
748 | case "$target" in |
---|
749 | alpha-dec-osf4*) |
---|
750 | ans=no |
---|
751 | ;; |
---|
752 | *-convex-*) |
---|
753 | ans=no |
---|
754 | ;; |
---|
755 | *-dec-*) |
---|
756 | ans=no |
---|
757 | ;; |
---|
758 | *-sni-sysv*) |
---|
759 | ans=no |
---|
760 | ;; |
---|
761 | *-univel-sysv*) |
---|
762 | ans=no |
---|
763 | ;; |
---|
764 | *-*-irix6*) |
---|
765 | ans=no |
---|
766 | ;; |
---|
767 | *-*-linux*) |
---|
768 | ans=no |
---|
769 | ;; |
---|
770 | esac |
---|
771 | ;; |
---|
772 | esac |
---|
773 | ac_cv_var_signalled_io=$ans]) |
---|
774 | case "$ac_cv_var_signalled_io" in |
---|
775 | yes) AC_DEFINE(HAVE_SIGNALED_IO) ;; |
---|
776 | esac |
---|
777 | |
---|
778 | AC_CACHE_CHECK(for SIGPOLL, ac_cv_hdr_def_sigpoll, |
---|
779 | AC_EGREP_CPP(yes, |
---|
780 | [#include <signal.h> |
---|
781 | #ifdef SIGPOLL |
---|
782 | yes |
---|
783 | #endif |
---|
784 | ], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no)) |
---|
785 | |
---|
786 | AC_CACHE_CHECK(for SIGSYS, ac_cv_hdr_def_sigsys, |
---|
787 | AC_EGREP_CPP(yes, |
---|
788 | [#include <signal.h> |
---|
789 | #ifdef SIGSYS |
---|
790 | yes |
---|
791 | #endif |
---|
792 | ], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no)) |
---|
793 | |
---|
794 | AC_CACHE_CHECK(if we can use SIGPOLL for UDP I/O, ac_cv_var_use_udp_sigpoll, |
---|
795 | [ans=no |
---|
796 | case "$ac_cv_hdr_def_sigpoll" in |
---|
797 | yes) |
---|
798 | changequote(<<, >>)dnl |
---|
799 | case "$target" in |
---|
800 | mips-sgi-irix*) |
---|
801 | ans=no |
---|
802 | ;; |
---|
803 | vax-dec-bsd) |
---|
804 | ans=no |
---|
805 | ;; |
---|
806 | *-sni-sysv*) |
---|
807 | ans=no |
---|
808 | ;; |
---|
809 | *-*-aix4*) |
---|
810 | ans=no |
---|
811 | ;; |
---|
812 | *-*-hpux*) |
---|
813 | ans=no |
---|
814 | ;; |
---|
815 | *-*-linux*) |
---|
816 | ans=no |
---|
817 | ;; |
---|
818 | *-*-osf*) |
---|
819 | ans=no |
---|
820 | ;; |
---|
821 | *-*-sunos*) |
---|
822 | ans=no |
---|
823 | ;; |
---|
824 | *-*-ultrix*) |
---|
825 | ans=no |
---|
826 | ;; |
---|
827 | *) ans=yes |
---|
828 | ;; |
---|
829 | esac |
---|
830 | changequote([, ])dnl |
---|
831 | ;; |
---|
832 | esac |
---|
833 | ac_cv_var_use_udp_sigpoll=$ans]) |
---|
834 | case "$ac_cv_var_use_udp_sigpoll" in |
---|
835 | yes) AC_DEFINE(USE_UDP_SIGPOLL) ;; |
---|
836 | esac |
---|
837 | |
---|
838 | AC_CACHE_CHECK(if we can use SIGPOLL for TTY I/O, ac_cv_var_use_tty_sigpoll, |
---|
839 | [ans=no |
---|
840 | case "$ac_cv_hdr_def_sigpoll" in |
---|
841 | yes) |
---|
842 | case "$target" in |
---|
843 | mips-sgi-irix*) |
---|
844 | ans=no |
---|
845 | ;; |
---|
846 | vax-dec-bsd) |
---|
847 | ans=no |
---|
848 | ;; |
---|
849 | *-sni-sysv*) |
---|
850 | ans=no |
---|
851 | ;; |
---|
852 | *-*-aix4*) |
---|
853 | ans=no |
---|
854 | ;; |
---|
855 | *-*-hpux*) |
---|
856 | ans=no |
---|
857 | ;; |
---|
858 | *-*-linux*) |
---|
859 | ans=no |
---|
860 | ;; |
---|
861 | *-*-osf*) |
---|
862 | ans=no |
---|
863 | ;; |
---|
864 | *-*-sunos*) |
---|
865 | ans=no |
---|
866 | ;; |
---|
867 | *-*-ultrix*) |
---|
868 | ans=no |
---|
869 | ;; |
---|
870 | *) ans=yes |
---|
871 | ;; |
---|
872 | esac |
---|
873 | ;; |
---|
874 | esac |
---|
875 | ac_cv_var_use_tty_sigpoll=$ans]) |
---|
876 | case "$ac_cv_var_use_tty_sigpoll" in |
---|
877 | yes) AC_DEFINE(USE_TTY_SIGPOLL) ;; |
---|
878 | esac |
---|
879 | |
---|
880 | AC_CACHE_CHECK(if nlist() values might require extra indirection, |
---|
881 | ac_cv_var_nlist_extra_indirection, |
---|
882 | [ans=no |
---|
883 | case "$target" in |
---|
884 | *-*-aix*) |
---|
885 | ans=yes |
---|
886 | ;; |
---|
887 | esac |
---|
888 | ac_cv_var_nlist_extra_indirection=$ans]) |
---|
889 | case "$ac_cv_var_nlist_extra_indirection" in |
---|
890 | yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION) ;; |
---|
891 | esac |
---|
892 | |
---|
893 | AC_CACHE_CHECK(for a minimum recommended value of tickadj, |
---|
894 | ac_cv_var_min_rec_tickadj, |
---|
895 | [ans=no |
---|
896 | case "$target" in |
---|
897 | *-*-aix*) |
---|
898 | ans=40 |
---|
899 | ;; |
---|
900 | esac |
---|
901 | ac_cv_var_min_rec_tickadj=$ans]) |
---|
902 | case "$ac_cv_var_min_rec_tickadj" in |
---|
903 | ''|no) ;; |
---|
904 | *) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj) ;; |
---|
905 | esac |
---|
906 | |
---|
907 | AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR, |
---|
908 | ac_cv_var_no_parenb_ignpar, |
---|
909 | [ans=no |
---|
910 | case "$target" in |
---|
911 | mips-sgi-irix*) |
---|
912 | ans=yes |
---|
913 | ;; |
---|
914 | esac |
---|
915 | ac_cv_var_no_parenb_ignpar=$ans]) |
---|
916 | case "$ac_cv_var_no_parenb_ignpar" in |
---|
917 | yes) AC_DEFINE(NO_PARENB_IGNPAR) ;; |
---|
918 | esac |
---|
919 | |
---|
920 | AC_MSG_CHECKING(if we're including debugging code) |
---|
921 | AC_ARG_ENABLE(debugging, [ --enable-debugging + include debugging code], |
---|
922 | [ntp_ok=$enableval], [ntp_ok=yes]) |
---|
923 | if test "$ntp_ok" = "yes"; then |
---|
924 | AC_DEFINE(DEBUG) |
---|
925 | fi |
---|
926 | AC_MSG_RESULT($ntp_ok) |
---|
927 | |
---|
928 | AC_CACHE_CHECK(if we have the tty_clk line discipline/streams module, |
---|
929 | ac_cv_var_tty_clk, |
---|
930 | ac_cv_var_tty_clk=$ac_cv_header_sys_clkdefs_h) |
---|
931 | case "$ac_cv_var_tty_clk" in |
---|
932 | yes) AC_DEFINE(TTYCLK) ;; |
---|
933 | esac |
---|
934 | |
---|
935 | AC_CACHE_CHECK(for the ppsclock streams module, |
---|
936 | ac_cv_var_ppsclock, |
---|
937 | ac_cv_var_ppsclock=$ac_cv_header_sys_ppsclock_h) |
---|
938 | case "$ac_cv_var_ppsclock" in |
---|
939 | yes) AC_DEFINE(PPS) ;; |
---|
940 | esac |
---|
941 | |
---|
942 | AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast, |
---|
943 | AC_EGREP_CPP(yes, |
---|
944 | [#include <netinet/in.h> |
---|
945 | #ifdef IP_ADD_MEMBERSHIP |
---|
946 | yes |
---|
947 | #endif |
---|
948 | ], ac_cv_var_mcast=yes, ac_cv_var_mcast=no)) |
---|
949 | case "$ac_cv_var_mcast" in |
---|
950 | yes) AC_DEFINE(MCAST) ;; |
---|
951 | esac |
---|
952 | |
---|
953 | AC_CACHE_CHECK([availability of ntp_{adj,get}time()], ac_cv_var_ntp_syscalls, |
---|
954 | [ac_cv_var_ntp_syscalls=no |
---|
955 | case "$ac_cv_func___adjtimex$ac_cv_func___ntp_gettime" in |
---|
956 | yesyes) |
---|
957 | ac_cv_var_ntp_syscalls=libc |
---|
958 | ;; |
---|
959 | *) case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime" in |
---|
960 | yesyes) |
---|
961 | ac_cv_var_ntp_syscalls=libc |
---|
962 | ;; |
---|
963 | *) AC_EGREP_CPP(yes, |
---|
964 | [#include <sys/syscall.h> |
---|
965 | #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime) |
---|
966 | yes |
---|
967 | #endif |
---|
968 | ], ac_cv_var_ntp_syscalls=kernel) |
---|
969 | ;; |
---|
970 | esac |
---|
971 | ;; |
---|
972 | esac]) |
---|
973 | case "$ac_cv_var_ntp_syscalls" in |
---|
974 | libc) |
---|
975 | AC_DEFINE(NTP_SYSCALLS_LIBC) |
---|
976 | ;; |
---|
977 | kernel) |
---|
978 | AC_DEFINE(NTP_SYSCALLS_STD) |
---|
979 | ;; |
---|
980 | *) |
---|
981 | ;; |
---|
982 | esac |
---|
983 | |
---|
984 | AC_CACHE_CHECK(if sys/timex.h has STA_FLL, ac_cv_var_sta_fll, |
---|
985 | [AC_EGREP_CPP(yes, |
---|
986 | [#include <sys/timex.h> |
---|
987 | #ifdef STA_FLL |
---|
988 | yes |
---|
989 | #endif |
---|
990 | ], ac_cv_var_sta_fll=yes, ac_cv_var_sta_fll=no)]) |
---|
991 | |
---|
992 | AC_CACHE_CHECK(if we have kernel PLL support, ac_cv_var_kernel_pll, |
---|
993 | [dnl ac_cv_var_ntp_syscalls is {no,libc,kernel} |
---|
994 | case "$ac_cv_header_sys_timex_h$ac_cv_var_sta_fll$ac_cv_var_ntp_syscalls" in |
---|
995 | *no*) |
---|
996 | ac_cv_var_kernel_pll=no |
---|
997 | ;; |
---|
998 | *) ac_cv_var_kernel_pll=yes |
---|
999 | ;; |
---|
1000 | esac]) |
---|
1001 | case "$ac_cv_var_kernel_pll" in |
---|
1002 | yes) |
---|
1003 | AC_DEFINE(KERNEL_PLL) |
---|
1004 | ;; |
---|
1005 | esac |
---|
1006 | |
---|
1007 | AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer, |
---|
1008 | [ans=no |
---|
1009 | case "$target" in |
---|
1010 | *-fujitsu-uxp*) |
---|
1011 | ans=yes |
---|
1012 | ;; |
---|
1013 | *-ncr-sysv4*) |
---|
1014 | ans=yes |
---|
1015 | ;; |
---|
1016 | *-univel-sysv*) |
---|
1017 | ans=yes |
---|
1018 | ;; |
---|
1019 | esac |
---|
1020 | ac_cv_var_size_returned_in_buffer=$ans]) |
---|
1021 | case "$ac_cv_var_size_returned_in_buffer" in |
---|
1022 | yes) AC_DEFINE(SIZE_RETURNED_IN_BUFFER) ;; |
---|
1023 | esac |
---|
1024 | |
---|
1025 | AC_CACHE_CHECK(if we want GDT surveying code, ac_cv_var_gdt_surveying, |
---|
1026 | [AC_ARG_ENABLE(gdt-surveying, [ --enable-gdt-surveying - include GDT survey code], |
---|
1027 | [ans=$enableval], [ans=no]) |
---|
1028 | ac_cv_var_gdt_surveying=$ans]) |
---|
1029 | case "$ac_cv_var_gdt_surveying" in |
---|
1030 | yes) AC_DEFINE(GDT_SURVEYING) ;; |
---|
1031 | esac |
---|
1032 | |
---|
1033 | AC_CACHE_CHECK(if we want to use MD5 authentication, ac_cv_var_use_md5, |
---|
1034 | [AC_ARG_ENABLE(md5, [ --enable-md5 + include support for MD5 keys], |
---|
1035 | [ans=$enableval], [ans=yes]) |
---|
1036 | ac_cv_var_use_md5=$ans]) |
---|
1037 | case "$ac_cv_var_use_md5" in |
---|
1038 | yes) AC_DEFINE(MD5) ;; |
---|
1039 | esac |
---|
1040 | |
---|
1041 | AC_CACHE_CHECK(if we want to use DES authentication, ac_cv_var_use_des, |
---|
1042 | [AC_ARG_ENABLE(des, [ --enable-des + include support for DES keys], |
---|
1043 | [ans=$enableval], [ans=yes]) |
---|
1044 | ac_cv_var_use_des=$ans]) |
---|
1045 | case "$ac_cv_var_use_des" in |
---|
1046 | yes) AC_DEFINE(DES) ;; |
---|
1047 | esac |
---|
1048 | |
---|
1049 | dnl These are for OPT_PROGRAMS in authstuff/ |
---|
1050 | AC_SUBST(AUTHCERT) |
---|
1051 | AC_SUBST(AUTHSPEED) |
---|
1052 | AC_SUBST(MD5DRIVER) |
---|
1053 | AC_SUBST(KEYPARITY) |
---|
1054 | AC_SUBST(MAKEIPFP) |
---|
1055 | AC_SUBST(MAKEPC1) |
---|
1056 | AC_SUBST(MAKEPC2) |
---|
1057 | AC_SUBST(MAKESP) |
---|
1058 | AC_SUBST(MKRANDKEYS) |
---|
1059 | AC_SUBST(OMAKEIPFP) |
---|
1060 | AC_SUBST(UNIXCERT) |
---|
1061 | |
---|
1062 | ntp_refclock=no |
---|
1063 | |
---|
1064 | # HPUX only, and by explicit request |
---|
1065 | AC_MSG_CHECKING(Datum/Bancomm bc635/VME interface) |
---|
1066 | AC_ARG_ENABLE(BANCOMM, [ --enable-BANCOMM - Datum/Bancomm bc635/VME interface], |
---|
1067 | [ntp_ok=$enableval], [ntp_ok=no]) |
---|
1068 | if test "$ntp_ok" = "yes"; then |
---|
1069 | ntp_refclock=yes |
---|
1070 | AC_DEFINE(BANC) |
---|
1071 | fi |
---|
1072 | AC_MSG_RESULT($ntp_ok) |
---|
1073 | case "$ntp_ok$target" in |
---|
1074 | yes*-*-hpux*) ;; |
---|
1075 | yes*) AC_WARN(*** But the expected answer is... no ***) ;; |
---|
1076 | esac |
---|
1077 | |
---|
1078 | #HPUX only, and only by explicit request |
---|
1079 | AC_MSG_CHECKING(TrueTime GPS receiver/VME interface) |
---|
1080 | AC_ARG_ENABLE(GPSVME, [ --enable-GPSVME - TrueTime GPS receiver/VME interface], |
---|
1081 | [ntp_ok=$enableval], [ntp_ok=no]) |
---|
1082 | if test "$ntp_ok" = "yes"; then |
---|
1083 | ntp_refclock=yes |
---|
1084 | AC_DEFINE(GPSVME) |
---|
1085 | fi |
---|
1086 | AC_MSG_RESULT($ntp_ok) |
---|
1087 | case "$ntp_ok$target" in |
---|
1088 | yes*-*-hpux*) ;; |
---|
1089 | yes*) AC_WARN(*** But the expected answer is... no ***) ;; |
---|
1090 | esac |
---|
1091 | |
---|
1092 | AC_MSG_CHECKING(for PCL720 clock support) |
---|
1093 | case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in |
---|
1094 | yesyesyes) |
---|
1095 | AC_DEFINE(PPS720) |
---|
1096 | ans=yes |
---|
1097 | ;; |
---|
1098 | *) |
---|
1099 | ans=no |
---|
1100 | ;; |
---|
1101 | esac |
---|
1102 | AC_MSG_RESULT($ans) |
---|
1103 | |
---|
1104 | AC_MSG_CHECKING(for SHM clock attached thru shared memory) |
---|
1105 | AC_ARG_ENABLE(SHM, [ --enable-SHM - SHM clock attached thru shared memory], |
---|
1106 | [ntp_ok=$enableval], [ntp_ok=no]) |
---|
1107 | if test "$ntp_ok" = "yes"; then |
---|
1108 | ntp_refclock=yes |
---|
1109 | AC_DEFINE(SHM_CLOCK) |
---|
1110 | fi |
---|
1111 | AC_MSG_RESULT($ntp_ok) |
---|
1112 | |
---|
1113 | AC_MSG_CHECKING(for default inclusion of all suitable non-PARSE clocks) |
---|
1114 | AC_ARG_ENABLE(all-clocks, [ --enable-all-clocks + include all suitable non-PARSE clocks:], |
---|
1115 | [ntp_eac=$enableval], [ntp_eac=yes]) |
---|
1116 | AC_MSG_RESULT($ntp_eac) |
---|
1117 | |
---|
1118 | AC_MSG_CHECKING(if we have support for PARSE clocks) |
---|
1119 | case "$ac_cv_header_termio_h$ac_cv_header_termios_h" in |
---|
1120 | *yes*) |
---|
1121 | ntp_canparse=yes |
---|
1122 | ;; |
---|
1123 | *) ntp_canparse=no |
---|
1124 | ;; |
---|
1125 | esac |
---|
1126 | AC_MSG_RESULT($ntp_canparse) |
---|
1127 | |
---|
1128 | # Requires modem control |
---|
1129 | AC_MSG_CHECKING(ACTS modem service) |
---|
1130 | AC_ARG_ENABLE(ACTS, [ --enable-ACTS + ACTS modem service], |
---|
1131 | [ntp_ok=$enableval], |
---|
1132 | [AC_EGREP_CPP(yes, |
---|
1133 | [#include <termios.h> |
---|
1134 | #ifdef TIOCMBIS |
---|
1135 | yes |
---|
1136 | #endif |
---|
1137 | ], ntp_ok=$ntp_eac, ntp_ok=no)]) |
---|
1138 | if test "$ntp_ok" = "yes"; then |
---|
1139 | ntp_refclock=yes |
---|
1140 | AC_DEFINE(ACTS) |
---|
1141 | fi |
---|
1142 | AC_MSG_RESULT($ntp_ok) |
---|
1143 | |
---|
1144 | AC_MSG_CHECKING(Arbiter 1088A/B GPS receiver) |
---|
1145 | AC_ARG_ENABLE(ARBITER, [ --enable-ARBITER + Arbiter 1088A/B GPS receiver], |
---|
1146 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1147 | if test "$ntp_ok" = "yes"; then |
---|
1148 | ntp_refclock=yes |
---|
1149 | AC_DEFINE(ARBITER) |
---|
1150 | fi |
---|
1151 | AC_MSG_RESULT($ntp_ok) |
---|
1152 | |
---|
1153 | AC_MSG_CHECKING(Arcron MSF receiver) |
---|
1154 | AC_ARG_ENABLE(ARCRON_MSF, [ --enable-ARCRON-MSF + Arcron MSF receiver], |
---|
1155 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1156 | if test "$ntp_ok" = "yes"; then |
---|
1157 | ntp_refclock=yes |
---|
1158 | AC_DEFINE(ARCRON_MSF) |
---|
1159 | fi |
---|
1160 | AC_MSG_RESULT($ntp_ok) |
---|
1161 | |
---|
1162 | AC_MSG_CHECKING(Austron 2200A/2201A GPS receiver) |
---|
1163 | AC_ARG_ENABLE(AS2201, [ --enable-AS2201 + Austron 2200A/2201A GPS receiver], |
---|
1164 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1165 | if test "$ntp_ok" = "yes"; then |
---|
1166 | ntp_refclock=yes |
---|
1167 | AC_DEFINE(AS2201) |
---|
1168 | fi |
---|
1169 | AC_MSG_RESULT($ntp_ok) |
---|
1170 | |
---|
1171 | AC_MSG_CHECKING(PPS interface) |
---|
1172 | AC_ARG_ENABLE(ATOM, [ --enable-ATOM + PPS interface], |
---|
1173 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1174 | if test "$ntp_ok" = "yes"; then |
---|
1175 | ntp_refclock=yes |
---|
1176 | AC_DEFINE(ATOM) |
---|
1177 | fi |
---|
1178 | AC_MSG_RESULT($ntp_ok) |
---|
1179 | |
---|
1180 | AC_MSG_CHECKING(CHU modem/decoder) |
---|
1181 | AC_ARG_ENABLE(CHU, [ --enable-CHU s CHU modem/decoder], |
---|
1182 | [ntp_ok=$enableval], |
---|
1183 | [case "$ntp_eac$ac_cv_header_sys_chudefs_h" in |
---|
1184 | yesyes) |
---|
1185 | ntp_ok=yes |
---|
1186 | ;; |
---|
1187 | *) ntp_ok=no |
---|
1188 | ;; |
---|
1189 | esac]) |
---|
1190 | if test "$ntp_ok" = "yes"; then |
---|
1191 | ntp_refclock=yes |
---|
1192 | AC_DEFINE(CHUCLK) |
---|
1193 | fi |
---|
1194 | AC_MSG_RESULT($ntp_ok) |
---|
1195 | case "$ntp_ok$ac_cv_header_sys_chudefs_h" in |
---|
1196 | yesno) AC_WARN(*** But the expected answer is... no ***) ;; |
---|
1197 | esac |
---|
1198 | |
---|
1199 | # Not under HP-UX |
---|
1200 | AC_MSG_CHECKING(Datum Programmable Time System) |
---|
1201 | AC_ARG_ENABLE(DATUM, [ --enable-DATUM s Datum Programmable Time System], |
---|
1202 | [ntp_ok=$enableval], |
---|
1203 | [case "$ac_cv_header_termios_h" in |
---|
1204 | yes) |
---|
1205 | ntp_ok=$ntp_eac |
---|
1206 | ;; |
---|
1207 | *) ntp_ok=no |
---|
1208 | ;; |
---|
1209 | esac]) |
---|
1210 | if test "$ntp_ok" = "yes"; then |
---|
1211 | ntp_refclock=yes |
---|
1212 | AC_DEFINE(DATUM) |
---|
1213 | fi |
---|
1214 | AC_MSG_RESULT($ntp_ok) |
---|
1215 | |
---|
1216 | # Requires modem control |
---|
1217 | AC_MSG_CHECKING(Heath GC-1000 WWV/WWVH receiver) |
---|
1218 | AC_ARG_ENABLE(HEATH, [ --enable-HEATH s Heath GC-1000 WWV/WWVH receiver], |
---|
1219 | [ntp_ok=$enableval], |
---|
1220 | [AC_EGREP_CPP(yes, |
---|
1221 | [#include <termios.h> |
---|
1222 | #ifdef TIOCMBIS |
---|
1223 | yes |
---|
1224 | #endif |
---|
1225 | ], ntp_ok=$ntp_eac, ntp_ok=no)]) |
---|
1226 | if test "$ntp_ok" = "yes"; then |
---|
1227 | ntp_refclock=yes |
---|
1228 | AC_DEFINE(HEATH) |
---|
1229 | fi |
---|
1230 | AC_MSG_RESULT($ntp_ok) |
---|
1231 | |
---|
1232 | AC_MSG_CHECKING(HP 58503A GPS receiver) |
---|
1233 | AC_ARG_ENABLE(HPGPS, [ --enable-HPGPS + HP 58503A GPS receiver], |
---|
1234 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1235 | if test "$ntp_ok" = "yes"; then |
---|
1236 | ntp_refclock=yes |
---|
1237 | AC_DEFINE(HPGPS) |
---|
1238 | fi |
---|
1239 | AC_MSG_RESULT($ntp_ok) |
---|
1240 | |
---|
1241 | AC_MSG_CHECKING(Sun IRIG audio decoder) |
---|
1242 | AC_ARG_ENABLE(IRIG, [ --enable-IRIG s Sun IRIG audio decoder], |
---|
1243 | [ntp_ok=$enableval], |
---|
1244 | [case "$ac_cv_header_sys_bsd_audioirig_h" in |
---|
1245 | yes) |
---|
1246 | ntp_ok=$ntp_eac |
---|
1247 | ;; |
---|
1248 | *) ntp_ok=no |
---|
1249 | ;; |
---|
1250 | esac]) |
---|
1251 | if test "$ntp_ok" = "yes"; then |
---|
1252 | ntp_refclock=yes |
---|
1253 | AC_DEFINE(IRIG) |
---|
1254 | fi |
---|
1255 | AC_MSG_RESULT($ntp_ok) |
---|
1256 | case "$ntp_ok$ac_cv_header_sys_bsd_audioirig_h" in |
---|
1257 | yesno) AC_WARN(*** But the expected answer is... no ***) ;; |
---|
1258 | esac |
---|
1259 | |
---|
1260 | AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver) |
---|
1261 | AC_ARG_ENABLE(LEITCH, [ --enable-LEITCH + Leitch CSD 5300 Master Clock System Driver], |
---|
1262 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1263 | if test "$ntp_ok" = "yes"; then |
---|
1264 | ntp_refclock=yes |
---|
1265 | AC_DEFINE(LEITCH) |
---|
1266 | fi |
---|
1267 | AC_MSG_RESULT($ntp_ok) |
---|
1268 | |
---|
1269 | AC_MSG_CHECKING(local clock reference) |
---|
1270 | AC_ARG_ENABLE(LOCAL-CLOCK, [ --enable-LOCAL-CLOCK + local clock reference], |
---|
1271 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1272 | if test "$ntp_ok" = "yes"; then |
---|
1273 | ntp_refclock=yes |
---|
1274 | AC_DEFINE(LOCAL_CLOCK) |
---|
1275 | fi |
---|
1276 | AC_MSG_RESULT($ntp_ok) |
---|
1277 | |
---|
1278 | AC_MSG_CHECKING(EES M201 MSF receiver) |
---|
1279 | AC_ARG_ENABLE(MSFEES, [ --enable-MSFEES + EES M201 MSF receiver], |
---|
1280 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1281 | if test "$ntp_ok" = "yes"; then |
---|
1282 | ntp_refclock=yes |
---|
1283 | AC_DEFINE(MSFEES) |
---|
1284 | fi |
---|
1285 | AC_MSG_RESULT($ntp_ok) |
---|
1286 | |
---|
1287 | # Not Ultrix |
---|
1288 | AC_MSG_CHECKING(Magnavox MX4200 GPS receiver) |
---|
1289 | AC_ARG_ENABLE(MX4200, [ --enable-MX4200 s Magnavox MX4200 GPS receiver], |
---|
1290 | [ntp_ok=$enableval], |
---|
1291 | [case "$ac_cv_var_ppsclock" in |
---|
1292 | yes) ntp_ok=$ntp_eac |
---|
1293 | ;; |
---|
1294 | *) ntp_ok=no |
---|
1295 | ;; |
---|
1296 | esac]) |
---|
1297 | if test "$ntp_ok" = "yes"; then |
---|
1298 | ntp_refclock=yes |
---|
1299 | AC_DEFINE(MX4200) |
---|
1300 | fi |
---|
1301 | AC_MSG_RESULT($ntp_ok) |
---|
1302 | case "$ntp_ok$target" in |
---|
1303 | yes*-*-ultrix*) AC_WARN(*** But the expected answer is... no ***) ;; |
---|
1304 | esac |
---|
1305 | |
---|
1306 | AC_MSG_CHECKING(NMEA GPS receiver) |
---|
1307 | AC_ARG_ENABLE(NMEA, [ --enable-NMEA + NMEA GPS receiver], |
---|
1308 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1309 | if test "$ntp_ok" = "yes"; then |
---|
1310 | ntp_refclock=yes |
---|
1311 | AC_DEFINE(NMEA) |
---|
1312 | fi |
---|
1313 | AC_MSG_RESULT($ntp_ok) |
---|
1314 | |
---|
1315 | AC_MSG_CHECKING(PST/Traconex 1020 WWV/WWVH receiver) |
---|
1316 | AC_ARG_ENABLE(PST, [ --enable-PST + PST/Traconex 1020 WWV/WWVH receiver], |
---|
1317 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1318 | if test "$ntp_ok" = "yes"; then |
---|
1319 | ntp_refclock=yes |
---|
1320 | AC_DEFINE(PST) |
---|
1321 | fi |
---|
1322 | AC_MSG_RESULT($ntp_ok) |
---|
1323 | |
---|
1324 | # Requires modem control |
---|
1325 | AC_MSG_CHECKING(PTB modem service) |
---|
1326 | AC_ARG_ENABLE(PTBACTS, [ --enable-PTBACTS s PTB modem service], |
---|
1327 | [ntp_ok=$enableval], |
---|
1328 | [AC_EGREP_CPP(yes, |
---|
1329 | [#include <termios.h> |
---|
1330 | #ifdef TIOCMBIS |
---|
1331 | yes |
---|
1332 | #endif |
---|
1333 | ], ntp_ok=$ntp_eac, ntp_ok=no)]) |
---|
1334 | if test "$ntp_ok" = "yes"; then |
---|
1335 | ntp_refclock=yes |
---|
1336 | AC_DEFINE(PTBACTS) |
---|
1337 | fi |
---|
1338 | AC_MSG_RESULT($ntp_ok) |
---|
1339 | |
---|
1340 | AC_MSG_CHECKING(KSI/Odetics TPRO/S GPS receiver/IRIG interface) |
---|
1341 | AC_ARG_ENABLE(TPRO, [ --enable-TPRO s KSI/Odetics TPRO/S GPS receiver/IRIG interface], |
---|
1342 | [ntp_ok=$enableval], |
---|
1343 | [case "$ac_cv_header_sys_tpro_h" in |
---|
1344 | yes) |
---|
1345 | ntp_ok=$ntp_eac |
---|
1346 | ;; |
---|
1347 | *) ntp_ok=no |
---|
1348 | ;; |
---|
1349 | esac]) |
---|
1350 | if test "$ntp_ok" = "yes"; then |
---|
1351 | ntp_refclock=yes |
---|
1352 | AC_DEFINE(TPRO) |
---|
1353 | fi |
---|
1354 | AC_MSG_RESULT($ntp_ok) |
---|
1355 | case "$ntp_ok$ac_cv_header_sys_tpro" in |
---|
1356 | yesno) AC_WARN(*** But the expected answer is... no ***) ;; |
---|
1357 | esac |
---|
1358 | |
---|
1359 | AC_MSG_CHECKING(TRAK 8810 GPS receiver) |
---|
1360 | AC_ARG_ENABLE(TRAK, [ --enable-TRAK + TRAK 8810 GPS receiver], |
---|
1361 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1362 | if test "$ntp_ok" = "yes"; then |
---|
1363 | ntp_refclock=yes |
---|
1364 | AC_DEFINE(TRAK) |
---|
1365 | fi |
---|
1366 | AC_MSG_RESULT($ntp_ok) |
---|
1367 | |
---|
1368 | # Not on a vax-dec-bsd |
---|
1369 | AC_MSG_CHECKING(Kinemetrics/TrueTime receivers) |
---|
1370 | AC_ARG_ENABLE(TRUETIME, [ --enable-TRUETIME s Kinemetrics/TrueTime receivers], |
---|
1371 | [ntp_ok=$enableval], |
---|
1372 | [case "$target" in |
---|
1373 | vax-dec-bsd) |
---|
1374 | ntp_ok=no |
---|
1375 | ;; |
---|
1376 | *) |
---|
1377 | ntp_ok=$ntp_eac |
---|
1378 | ;; |
---|
1379 | esac]) |
---|
1380 | if test "$ntp_ok" = "yes"; then |
---|
1381 | ntp_refclock=yes |
---|
1382 | AC_DEFINE(TRUETIME) |
---|
1383 | fi |
---|
1384 | AC_MSG_RESULT($ntp_ok) |
---|
1385 | case "$ntp_ok$target" in |
---|
1386 | yesvax-dec-bsd) AC_WARN(*** But the expected answer is... no ***) ;; |
---|
1387 | esac |
---|
1388 | |
---|
1389 | AC_MSG_CHECKING(Spectracom 8170/Netclock/2 WWVB receiver) |
---|
1390 | AC_ARG_ENABLE(WWVB, [ --enable-WWVB + Spectracom 8170/Netclock/2 WWVB receiver], |
---|
1391 | [ntp_ok=$enableval], [ntp_ok=$ntp_eac]) |
---|
1392 | if test "$ntp_ok" = "yes"; then |
---|
1393 | ntp_refclock=yes |
---|
1394 | AC_DEFINE(WWVB) |
---|
1395 | fi |
---|
1396 | AC_MSG_RESULT($ntp_ok) |
---|
1397 | |
---|
1398 | # Requires modem control |
---|
1399 | AC_MSG_CHECKING(USNO modem service) |
---|
1400 | AC_ARG_ENABLE(USNO, [ --enable-USNO s USNO modem service], |
---|
1401 | [ntp_ok=$enableval], |
---|
1402 | [AC_EGREP_CPP(yes, |
---|
1403 | [#include <termios.h> |
---|
1404 | #ifdef TIOCMBIS |
---|
1405 | yes |
---|
1406 | #endif |
---|
1407 | ], ntp_ok=$ntp_eac, ntp_ok=no)]) |
---|
1408 | if test "$ntp_ok" = "yes"; then |
---|
1409 | ntp_refclock=yes |
---|
1410 | AC_DEFINE(USNO) |
---|
1411 | fi |
---|
1412 | AC_MSG_RESULT($ntp_ok) |
---|
1413 | |
---|
1414 | AC_MSG_CHECKING(for default inclusion of all suitable PARSE clocks) |
---|
1415 | AC_ARG_ENABLE(parse-clocks, [ --enable-parse-clocks - include all suitable PARSE clocks:], |
---|
1416 | [ntp_eapc=$enableval], [ntp_eapc=no]) |
---|
1417 | AC_MSG_RESULT($ntp_eapc) |
---|
1418 | |
---|
1419 | case "$ntp_eac$ntp_eapc$ntp_canparse" in |
---|
1420 | noyes*) |
---|
1421 | AC_MSG_ERROR("--enable-parse-clocks" requires "--enable-all-clocks".) |
---|
1422 | ;; |
---|
1423 | yesyesno) |
---|
1424 | AC_MSG_ERROR(You said "--enable-parse-clocks" but PARSE isn't supported!) |
---|
1425 | ;; |
---|
1426 | *) ;; |
---|
1427 | esac |
---|
1428 | |
---|
1429 | ntp_libparse=no |
---|
1430 | ntp_parseutil=no |
---|
1431 | ntp_rawdcf=no |
---|
1432 | |
---|
1433 | AC_MSG_CHECKING(Diem Computime Radio Clock) |
---|
1434 | AC_ARG_ENABLE(COMPUTIME, [ --enable-COMPUTIME - Diem Cumputime Radio Clock], |
---|
1435 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1436 | if test "$ntp_ok" = "yes"; then |
---|
1437 | ntp_libparse=yes |
---|
1438 | ntp_refclock=yes |
---|
1439 | AC_DEFINE(CLOCK_COMPUTIME) |
---|
1440 | fi |
---|
1441 | AC_MSG_RESULT($ntp_ok) |
---|
1442 | case "$ntp_ok$ntp_canparse" in |
---|
1443 | yesno) |
---|
1444 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1445 | ;; |
---|
1446 | esac |
---|
1447 | |
---|
1448 | AC_MSG_CHECKING(ELV/DCF7000 clock) |
---|
1449 | AC_ARG_ENABLE(DCF7000, [ --enable-DCF7000 - ELV/DCF7000 clock], |
---|
1450 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1451 | if test "$ntp_ok" = "yes"; then |
---|
1452 | ntp_libparse=yes |
---|
1453 | ntp_refclock=yes |
---|
1454 | AC_DEFINE(CLOCK_DCF7000) |
---|
1455 | fi |
---|
1456 | AC_MSG_RESULT($ntp_ok) |
---|
1457 | case "$ntp_ok$ntp_canparse" in |
---|
1458 | yesno) |
---|
1459 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1460 | ;; |
---|
1461 | esac |
---|
1462 | |
---|
1463 | AC_MSG_CHECKING(HOPF 6021 clock) |
---|
1464 | AC_ARG_ENABLE(HOPF6021, [ --enable-HOPF6021 - HOPF 6021 clock], |
---|
1465 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1466 | if test "$ntp_ok" = "yes"; then |
---|
1467 | ntp_libparse=yes |
---|
1468 | ntp_refclock=yes |
---|
1469 | AC_DEFINE(CLOCK_HOPF6021) |
---|
1470 | fi |
---|
1471 | AC_MSG_RESULT($ntp_ok) |
---|
1472 | case "$ntp_ok$ntp_canparse" in |
---|
1473 | yesno) |
---|
1474 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1475 | ;; |
---|
1476 | esac |
---|
1477 | |
---|
1478 | AC_MSG_CHECKING(Meinberg clocks) |
---|
1479 | AC_ARG_ENABLE(MEINBERG, [ --enable-MEINBERG - Meinberg clocks], |
---|
1480 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1481 | if test "$ntp_ok" = "yes"; then |
---|
1482 | ntp_libparse=yes |
---|
1483 | ntp_refclock=yes |
---|
1484 | AC_DEFINE(CLOCK_MEINBERG) |
---|
1485 | fi |
---|
1486 | AC_MSG_RESULT($ntp_ok) |
---|
1487 | case "$ntp_ok$ntp_canparse" in |
---|
1488 | yesno) |
---|
1489 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1490 | ;; |
---|
1491 | esac |
---|
1492 | |
---|
1493 | AC_MSG_CHECKING(DCF77 raw time code) |
---|
1494 | AC_ARG_ENABLE(RAWDCF, [ --enable-RAWDCF - DCF77 raw time code], |
---|
1495 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1496 | if test "$ntp_ok" = "yes"; then |
---|
1497 | ntp_libparse=yes |
---|
1498 | ntp_parseutil=yes |
---|
1499 | ntp_refclock=yes |
---|
1500 | ntp_rawdcf=yes |
---|
1501 | AC_DEFINE(CLOCK_RAWDCF) |
---|
1502 | fi |
---|
1503 | AC_MSG_RESULT($ntp_ok) |
---|
1504 | case "$ntp_ok$ntp_canparse" in |
---|
1505 | yesno) |
---|
1506 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1507 | ;; |
---|
1508 | esac |
---|
1509 | |
---|
1510 | case "$ntp_rawdcf" in |
---|
1511 | yes) |
---|
1512 | AC_CACHE_CHECK(if we must enable parity for RAWDCF, |
---|
1513 | ac_cv_var_rawdcf_parity, |
---|
1514 | [ans=no |
---|
1515 | case "$target" in |
---|
1516 | *-*-linux*) |
---|
1517 | ans=yes |
---|
1518 | ;; |
---|
1519 | esac |
---|
1520 | ac_cv_var_rawdcf_parity=$ans]) |
---|
1521 | case "$ac_cv_var_rawdcf_parity" in |
---|
1522 | yes) AC_DEFINE(RAWDCF_NO_IGNPAR) ;; |
---|
1523 | esac |
---|
1524 | |
---|
1525 | AC_CACHE_CHECK(if we are powering the DCF77 from DTR, |
---|
1526 | ac_cv_var_dtr_powers_dcf77, |
---|
1527 | [ans=no |
---|
1528 | case "$target" in |
---|
1529 | *-*-linux*) |
---|
1530 | ans=yes |
---|
1531 | ;; |
---|
1532 | esac |
---|
1533 | ac_cv_var_dtr_powers_dcf77=$ans]) |
---|
1534 | case "$ac_cv_var_dtr_powers_dcf77" in |
---|
1535 | yes) AC_DEFINE(RAWDCF_SETDTR) ;; |
---|
1536 | esac |
---|
1537 | ;; |
---|
1538 | *) # HMS: Is this a good idea? |
---|
1539 | ac_cv_var_rawdcf_parity=no |
---|
1540 | ac_cv_var_dtr_powers_dcf77=no |
---|
1541 | ;; |
---|
1542 | esac |
---|
1543 | |
---|
1544 | AC_MSG_CHECKING(RCC 8000 clock) |
---|
1545 | AC_ARG_ENABLE(RCC8000, [ --enable-RCC8000 - RCC 8000 clock], |
---|
1546 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1547 | if test "$ntp_ok" = "yes"; then |
---|
1548 | ntp_libparse=yes |
---|
1549 | ntp_refclock=yes |
---|
1550 | AC_DEFINE(CLOCK_RCC8000) |
---|
1551 | fi |
---|
1552 | AC_MSG_RESULT($ntp_ok) |
---|
1553 | case "$ntp_ok$ntp_canparse" in |
---|
1554 | yesno) |
---|
1555 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1556 | ;; |
---|
1557 | esac |
---|
1558 | |
---|
1559 | AC_MSG_CHECKING(Schmid DCF77 clock) |
---|
1560 | AC_ARG_ENABLE(SCHMID, [ --enable-SCHMID - Schmid DCF77 clock], |
---|
1561 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1562 | if test "$ntp_ok" = "yes"; then |
---|
1563 | ntp_libparse=yes |
---|
1564 | ntp_refclock=yes |
---|
1565 | AC_DEFINE(CLOCK_SCHMID) |
---|
1566 | fi |
---|
1567 | AC_MSG_RESULT($ntp_ok) |
---|
1568 | case "$ntp_ok$ntp_canparse" in |
---|
1569 | yesno) |
---|
1570 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1571 | ;; |
---|
1572 | esac |
---|
1573 | |
---|
1574 | AC_MSG_CHECKING(Trimble GPS receiver/TAIP protocol) |
---|
1575 | AC_ARG_ENABLE(TRIMTAIP, [ --enable-TRIMTAIP - Trimble GPS receiver/TAIP protocol], |
---|
1576 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1577 | if test "$ntp_ok" = "yes"; then |
---|
1578 | ntp_libparse=yes |
---|
1579 | ntp_refclock=yes |
---|
1580 | AC_DEFINE(CLOCK_TRIMTAIP) |
---|
1581 | fi |
---|
1582 | AC_MSG_RESULT($ntp_ok) |
---|
1583 | case "$ntp_ok$ntp_canparse" in |
---|
1584 | yesno) |
---|
1585 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1586 | ;; |
---|
1587 | esac |
---|
1588 | |
---|
1589 | AC_MSG_CHECKING(Trimble GPS receiver/TSIP protocol) |
---|
1590 | AC_ARG_ENABLE(TRIMTSIP, [ --enable-TRIMTSIP - Trimble GPS receiver/TSIP protocol], |
---|
1591 | [ntp_ok=$enableval], [ntp_ok=$ntp_eapc]) |
---|
1592 | if test "$ntp_ok" = "yes"; then |
---|
1593 | ntp_libparse=yes |
---|
1594 | ntp_refclock=yes |
---|
1595 | AC_DEFINE(CLOCK_TRIMTSIP) |
---|
1596 | fi |
---|
1597 | AC_MSG_RESULT($ntp_ok) |
---|
1598 | case "$ntp_ok$ntp_canparse" in |
---|
1599 | yesno) |
---|
1600 | AC_MSG_ERROR(That's a parse clock and this system doesn't support it!) |
---|
1601 | ;; |
---|
1602 | esac |
---|
1603 | AC_SUBST(LIBPARSE) |
---|
1604 | AC_SUBST(MAKE_LIBPARSE) |
---|
1605 | AC_SUBST(MAKE_LIBPARSE_KERNEL) |
---|
1606 | AC_MSG_CHECKING(if we need to make and use the parse libraries) |
---|
1607 | ans=no |
---|
1608 | case "$ntp_libparse" in |
---|
1609 | yes) |
---|
1610 | ans=yes |
---|
1611 | AC_DEFINE(PARSE) |
---|
1612 | LIBPARSE=../libparse/libparse.a |
---|
1613 | MAKE_LIBPARSE=libparse.a |
---|
1614 | ;; |
---|
1615 | esac |
---|
1616 | AC_MSG_RESULT($ans) |
---|
1617 | |
---|
1618 | AC_SUBST(TESTDCF) |
---|
1619 | AC_SUBST(DCFD) |
---|
1620 | AC_MSG_CHECKING(if we need dcf parse utilities) |
---|
1621 | ans=no |
---|
1622 | if test "$ntp_parseutil" = "yes"; then |
---|
1623 | case "$target" in |
---|
1624 | *-*-sunos4*|*-*-solaris2*) |
---|
1625 | ans="dcfd testdcf" |
---|
1626 | DCFD=dcfd |
---|
1627 | TESTDCF=testdcf |
---|
1628 | ;; |
---|
1629 | esac |
---|
1630 | fi |
---|
1631 | AC_MSG_RESULT($ans) |
---|
1632 | |
---|
1633 | AC_SUBST(MAKE_PARSEKMODULE) |
---|
1634 | AC_MSG_CHECKING(if we can build kernel streams modules for parse) |
---|
1635 | ans=no |
---|
1636 | if test "$ntp_parseutil$ac_cv_header_sys_stropts_h" = "yesyes"; then |
---|
1637 | case "$target" in |
---|
1638 | sparc-*-sunos4*) |
---|
1639 | case "$ac_cv_var_kernel_pll" in |
---|
1640 | yes) |
---|
1641 | AC_DEFINE(PPS_SYNC) |
---|
1642 | ;; |
---|
1643 | esac |
---|
1644 | ans=parsestreams |
---|
1645 | MAKE_PARSEKMODULE=parsestreams.loadable_module.o |
---|
1646 | ;; |
---|
1647 | sparc-*-solaris2*) |
---|
1648 | ans=parsesolaris |
---|
1649 | MAKE_PARSEKMODULE=parse |
---|
1650 | ;; |
---|
1651 | esac |
---|
1652 | fi |
---|
1653 | AC_MSG_RESULT($ans) |
---|
1654 | |
---|
1655 | AC_MSG_CHECKING(if we need basic refclock support) |
---|
1656 | if test "$ntp_refclock" = "yes"; then |
---|
1657 | AC_DEFINE(REFCLOCK) |
---|
1658 | fi |
---|
1659 | AC_MSG_RESULT($ntp_refclock) |
---|
1660 | |
---|
1661 | dnl Things that can be made in clockstuff/ |
---|
1662 | AC_SUBST(PROPDELAY) dnl Set to "propdelay" |
---|
1663 | AC_SUBST(CHUTEST) dnl Set to "chutest" |
---|
1664 | AC_SUBST(CLKTEST) dnl Set to "clktest" |
---|
1665 | |
---|
1666 | AC_SUBST(MAKE_ADJTIMED) |
---|
1667 | AC_MSG_CHECKING(if we want HP-UX adjtimed support) |
---|
1668 | changequote(<<, >>)dnl |
---|
1669 | case "$target" in |
---|
1670 | *-*-hpux[56789]*) |
---|
1671 | ans=yes |
---|
1672 | ;; |
---|
1673 | *) ans=no |
---|
1674 | ;; |
---|
1675 | esac |
---|
1676 | changequote([, ])dnl |
---|
1677 | if test "$ans" = "yes"; then |
---|
1678 | MAKE_ADJTIMED=adjtimed |
---|
1679 | AC_DEFINE(NEED_HPUX_ADJTIME) |
---|
1680 | fi |
---|
1681 | AC_MSG_RESULT($ans) |
---|
1682 | |
---|
1683 | AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem, |
---|
1684 | [AC_ARG_ENABLE(kmem, [ --enable-kmem s read /dev/kmem for tick and/or tickadj], |
---|
1685 | [ans=$enableval], |
---|
1686 | [changequote(<<, >>)dnl |
---|
1687 | case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in |
---|
1688 | *yes*) |
---|
1689 | ans=yes |
---|
1690 | ;; |
---|
1691 | *) ans=no |
---|
1692 | ;; |
---|
1693 | esac |
---|
1694 | case "$target" in |
---|
1695 | *-*-aix*) |
---|
1696 | #ans=no |
---|
1697 | ;; |
---|
1698 | *-*-domainos) # Won't be found... |
---|
1699 | ans=no |
---|
1700 | ;; |
---|
1701 | *-*-hpux*) |
---|
1702 | #ans=no |
---|
1703 | ;; |
---|
1704 | *-*-irix[456]*) |
---|
1705 | ans=no |
---|
1706 | ;; |
---|
1707 | *-*-linux*) |
---|
1708 | ans=no |
---|
1709 | ;; |
---|
1710 | *-*-winnt3.5) |
---|
1711 | ans=no |
---|
1712 | ;; |
---|
1713 | esac |
---|
1714 | changequote([, ])dnl |
---|
1715 | ]) |
---|
1716 | ac_cv_var_can_kmem=$ans]) |
---|
1717 | |
---|
1718 | case "$ac_cv_var_can_kmem" in |
---|
1719 | *yes*) ;; |
---|
1720 | *) AC_DEFINE(NOKMEM) ;; |
---|
1721 | esac |
---|
1722 | |
---|
1723 | AC_CACHE_CHECK(if adjtime is accurate, ac_cv_var_adjtime_is_accurate, |
---|
1724 | [AC_ARG_ENABLE(accurate-adjtime, [ --enable-accurate-adjtime s the adjtime() call is accurate], |
---|
1725 | [ans=$enableval], |
---|
1726 | [changequote(<<, >>)dnl |
---|
1727 | case "$target" in |
---|
1728 | i386-sequent-ptx*) |
---|
1729 | ans=no |
---|
1730 | ;; |
---|
1731 | i386-unknown-osf1*) |
---|
1732 | ans=yes |
---|
1733 | ;; |
---|
1734 | mips-sgi-irix[456]*) |
---|
1735 | ans=yes |
---|
1736 | ;; |
---|
1737 | *-fujitsu-uxp*) |
---|
1738 | ans=yes |
---|
1739 | ;; |
---|
1740 | *-ibm-aix4*) |
---|
1741 | ans=yes |
---|
1742 | ;; |
---|
1743 | *-*-linux*) |
---|
1744 | ans=yes |
---|
1745 | ;; |
---|
1746 | *-*-solaris2.[01]*) |
---|
1747 | ans=no |
---|
1748 | ;; |
---|
1749 | *-*-solaris2*) |
---|
1750 | ans=yes |
---|
1751 | ;; |
---|
1752 | *) ans=no |
---|
1753 | ;; |
---|
1754 | esac |
---|
1755 | changequote([, ])dnl |
---|
1756 | ]) |
---|
1757 | ac_cv_var_adjtime_is_accurate=$ans]) |
---|
1758 | case "$ac_cv_var_adjtime_is_accurate" in |
---|
1759 | yes) AC_DEFINE(ADJTIME_IS_ACCURATE) ;; |
---|
1760 | esac |
---|
1761 | |
---|
1762 | AC_CACHE_CHECK([the name of 'tick' in the kernel], |
---|
1763 | ac_cv_var_nlist_tick, |
---|
1764 | [changequote(<<, >>)dnl |
---|
1765 | ans=_tick |
---|
1766 | case "$target" in |
---|
1767 | m68*-hp-hpux*) # HP9000/300? |
---|
1768 | ans=_old_tick |
---|
1769 | ;; |
---|
1770 | *-apple-aux[23]*) |
---|
1771 | ans=tick |
---|
1772 | ;; |
---|
1773 | *-hp-hpux*) |
---|
1774 | ans=old_tick |
---|
1775 | ;; |
---|
1776 | *-ibm-aix[34]*) |
---|
1777 | ans=no |
---|
1778 | ;; |
---|
1779 | *-*-ptx*) |
---|
1780 | ans=tick |
---|
1781 | ;; |
---|
1782 | *-*-sco3.2v[45]*) |
---|
1783 | ans=no |
---|
1784 | ;; |
---|
1785 | *-*-solaris2*) |
---|
1786 | ans=nsec_per_tick |
---|
1787 | ;; |
---|
1788 | *-*-sysv4*) |
---|
1789 | ans=tick |
---|
1790 | ;; |
---|
1791 | esac |
---|
1792 | changequote([, ])dnl |
---|
1793 | ac_cv_var_nlist_tick=$ans]) |
---|
1794 | case "$ac_cv_var_nlist_tick" in |
---|
1795 | ''|no) ;; # HMS: I think we can only get 'no' here... |
---|
1796 | *) AC_DEFINE_UNQUOTED(K_TICK_NAME, "$ac_cv_var_nlist_tick") ;; |
---|
1797 | esac |
---|
1798 | # |
---|
1799 | AC_CACHE_CHECK([for the units of 'tick'], |
---|
1800 | ac_cv_var_tick_nano, |
---|
1801 | [changequote(<<, >>)dnl |
---|
1802 | ans=usec |
---|
1803 | case "$target" in |
---|
1804 | *-*-solaris2*) |
---|
1805 | ans=nsec |
---|
1806 | ;; |
---|
1807 | esac |
---|
1808 | changequote([, ])dnl |
---|
1809 | ac_cv_var_tick_nano=$ans]) |
---|
1810 | case "$ac_cv_var_tick_nano" in |
---|
1811 | nsec) |
---|
1812 | AC_DEFINE(TICK_NANO) |
---|
1813 | ;; |
---|
1814 | esac |
---|
1815 | # |
---|
1816 | AC_CACHE_CHECK([the name of 'tickadj' in the kernel], |
---|
1817 | ac_cv_var_nlist_tickadj, |
---|
1818 | [changequote(<<, >>)dnl |
---|
1819 | ans=_tickadj |
---|
1820 | case "$target" in |
---|
1821 | m68*-hp-hpux*) # HP9000/300? |
---|
1822 | ans=_tickadj |
---|
1823 | ;; |
---|
1824 | *-apple-aux[23]*) |
---|
1825 | ans=tickadj |
---|
1826 | ;; |
---|
1827 | *-hp-hpux10*) |
---|
1828 | ans=no |
---|
1829 | ;; |
---|
1830 | *-hp-hpux9*) |
---|
1831 | ans=no |
---|
1832 | ;; |
---|
1833 | *-hp-hpux*) |
---|
1834 | ans=tickadj |
---|
1835 | ;; |
---|
1836 | *-*-aix*) |
---|
1837 | ans=tickadj |
---|
1838 | ;; |
---|
1839 | *-*-ptx*) |
---|
1840 | ans=tickadj |
---|
1841 | ;; |
---|
1842 | *-*-sco3.2v4*) |
---|
1843 | ans=stickadj |
---|
1844 | ;; |
---|
1845 | *-*-sco3.2v5.0*) |
---|
1846 | ans=clock_drift |
---|
1847 | ;; |
---|
1848 | *-*-solaris2*) |
---|
1849 | ans=no # hrestime_adj |
---|
1850 | ;; |
---|
1851 | *-*-sysv4*) |
---|
1852 | ans=tickadj |
---|
1853 | ;; |
---|
1854 | esac |
---|
1855 | changequote([, ])dnl |
---|
1856 | ac_cv_var_nlist_tickadj=$ans]) |
---|
1857 | case "$ac_cv_var_nlist_tickadj" in |
---|
1858 | ''|no) ;; # HMS: I think we can only get 'no' here... |
---|
1859 | *) AC_DEFINE_UNQUOTED(K_TICKADJ_NAME, "$ac_cv_var_nlist_tickadj") ;; |
---|
1860 | esac |
---|
1861 | # |
---|
1862 | AC_CACHE_CHECK([for the units of 'tickadj'], |
---|
1863 | ac_cv_var_tickadj_nano, |
---|
1864 | [changequote(<<, >>)dnl |
---|
1865 | ans=usec |
---|
1866 | case "$target" in |
---|
1867 | *-*-solaris2*) |
---|
1868 | ans=nsec |
---|
1869 | ;; |
---|
1870 | esac |
---|
1871 | changequote([, ])dnl |
---|
1872 | ac_cv_var_tickadj_nano=$ans]) |
---|
1873 | case "$ac_cv_var_tickadj_nano" in |
---|
1874 | nsec) |
---|
1875 | AC_DEFINE(TICKADJ_NANO) |
---|
1876 | ;; |
---|
1877 | esac |
---|
1878 | # |
---|
1879 | AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel], |
---|
1880 | ac_cv_var_nlist_dosynctodr, |
---|
1881 | [changequote(<<, >>)dnl |
---|
1882 | case "$target" in |
---|
1883 | *-apple-aux[23]*) |
---|
1884 | ans=no |
---|
1885 | ;; |
---|
1886 | *-sni-sysv*) |
---|
1887 | ans=dosynctodr |
---|
1888 | ;; |
---|
1889 | *-*-aix*) |
---|
1890 | ans=dosynctodr |
---|
1891 | ;; |
---|
1892 | *-*-hpux*) |
---|
1893 | ans=no |
---|
1894 | ;; |
---|
1895 | *-*-nextstep*) |
---|
1896 | ans=_dosynctodr |
---|
1897 | ;; |
---|
1898 | *-*-ptx*) |
---|
1899 | ans=doresettodr |
---|
1900 | ;; |
---|
1901 | *-*-sco3.2v4*) |
---|
1902 | ans=no |
---|
1903 | ;; |
---|
1904 | *-*-sco3.2v5*) |
---|
1905 | ans=track_rtc |
---|
1906 | ;; |
---|
1907 | *-*-solaris2*) |
---|
1908 | ans=dosynctodr |
---|
1909 | ;; |
---|
1910 | *-*-sysv4*) |
---|
1911 | ans=doresettodr |
---|
1912 | ;; |
---|
1913 | *) |
---|
1914 | ans=_dosynctodr |
---|
1915 | ;; |
---|
1916 | esac |
---|
1917 | changequote([, ])dnl |
---|
1918 | ac_cv_var_nlist_dosynctodr=$ans]) |
---|
1919 | case "$ac_cv_var_nlist_dosynctodr" in |
---|
1920 | no) ;; |
---|
1921 | *) AC_DEFINE_UNQUOTED(K_DOSYNCTODR_NAME, "$ac_cv_var_nlist_dosynctodr") |
---|
1922 | ;; |
---|
1923 | esac |
---|
1924 | # |
---|
1925 | AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel], |
---|
1926 | ac_cv_var_nlist_noprintf, |
---|
1927 | [changequote(<<, >>)dnl |
---|
1928 | case "$target" in |
---|
1929 | *-apple-aux[23]*) |
---|
1930 | ans=no |
---|
1931 | ;; |
---|
1932 | *-sni-sysv*) |
---|
1933 | ans=noprintf |
---|
1934 | ;; |
---|
1935 | *-*-aix*) |
---|
1936 | ans=noprintf |
---|
1937 | ;; |
---|
1938 | *-*-hpux*) |
---|
1939 | ans=no |
---|
1940 | ;; |
---|
1941 | *-*-ptx*) |
---|
1942 | ans=noprintf |
---|
1943 | ;; |
---|
1944 | *-*-nextstep*) |
---|
1945 | ans=_noprintf |
---|
1946 | ;; |
---|
1947 | *-*-solaris2*) |
---|
1948 | ans=noprintf |
---|
1949 | ;; |
---|
1950 | *-*-sysv4*) |
---|
1951 | ans=noprintf |
---|
1952 | ;; |
---|
1953 | *) |
---|
1954 | ans=_noprintf |
---|
1955 | ;; |
---|
1956 | esac |
---|
1957 | changequote([, ])dnl |
---|
1958 | ac_cv_var_nlist_noprintf=$ans]) |
---|
1959 | case "$ac_cv_var_nlist_noprintf" in |
---|
1960 | no) ;; |
---|
1961 | *) AC_DEFINE_UNQUOTED(K_NOPRINTF_NAME, "$ac_cv_var_nlist_noprintf") |
---|
1962 | ;; |
---|
1963 | esac |
---|
1964 | |
---|
1965 | dnl The tick/tickadj sections were written by Skippy, who never learned |
---|
1966 | dnl that it's impolite (horridly gross) to show your guts in public. |
---|
1967 | |
---|
1968 | dnl tick tickadj |
---|
1969 | dnl 10000 80 Unixware |
---|
1970 | dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE |
---|
1971 | dnl 10000 150 sgi IRIX |
---|
1972 | dnl 1000000L/hz 1000 RS6000 && NOKMEM |
---|
1973 | dnl 1000000L/hz 668 DOMAINOS && NOKMEM |
---|
1974 | dnl 1000000L/hz 500/HZ other && NOKMEM |
---|
1975 | dnl txc.tick 1 Linux |
---|
1976 | dnl (every / 10) 50 WinNT - tickadj is roughly 500/hz |
---|
1977 | dnl 1000000L/hz (nlist) (Solaris && !ADJTIME_IS_ACCURATE), |
---|
1978 | dnl (RS6000 && !NOKMEM), SINIX MIPS |
---|
1979 | |
---|
1980 | dnl But we'll only use these "values" if we can't find anything else. |
---|
1981 | |
---|
1982 | AC_CACHE_CHECK(for a default value for 'tick', ac_cv_var_tick, |
---|
1983 | [AC_ARG_ENABLE(tick, [ --enable-tick=VALUE s force a value for 'tick'], |
---|
1984 | [ans=$enableval], |
---|
1985 | [ans=no |
---|
1986 | case "$target" in |
---|
1987 | *-univel-sysv*) |
---|
1988 | ans=10000 |
---|
1989 | ;; |
---|
1990 | *-*-irix*) |
---|
1991 | ans=10000 |
---|
1992 | ;; |
---|
1993 | *-*-linux*) |
---|
1994 | ans=txc.tick |
---|
1995 | ;; |
---|
1996 | *-*-winnt3.5) |
---|
1997 | ans='(every / 10)' |
---|
1998 | ;; |
---|
1999 | *) |
---|
2000 | ans='1000000L/hz' |
---|
2001 | ;; |
---|
2002 | esac]) |
---|
2003 | ac_cv_var_tick=$ans]) |
---|
2004 | case "$ac_cv_var_tick" in |
---|
2005 | ''|no) ;; # HMS: I think we can only get 'no' here... |
---|
2006 | *) AC_DEFINE_UNQUOTED(PRESET_TICK, $ac_cv_var_tick) ;; |
---|
2007 | esac |
---|
2008 | |
---|
2009 | AC_CACHE_CHECK(for a default value for 'tickadj', ac_cv_var_tickadj, |
---|
2010 | [AC_ARG_ENABLE(tickadj, [ --enable-tickadj=VALUE s force a value for 'tickadj'], |
---|
2011 | [ans=$enableval], |
---|
2012 | [ans='500/hz' |
---|
2013 | case "$target" in |
---|
2014 | *-fujitsu-uxp*) |
---|
2015 | case "$ac_cv_var_adjtime_is_accurate" in |
---|
2016 | yes) ans='tick/16' ;; |
---|
2017 | esac |
---|
2018 | ;; |
---|
2019 | *-univel-sysv*) |
---|
2020 | ans=80 |
---|
2021 | ;; |
---|
2022 | *-*-aix*) |
---|
2023 | case "$ac_cv_var_can_kmem" in |
---|
2024 | no) ans=1000 ;; |
---|
2025 | esac |
---|
2026 | ;; |
---|
2027 | *-*-domainos) # Skippy: won't be found... |
---|
2028 | case "$ac_cv_var_can_kmem" in |
---|
2029 | no) ans=668 ;; |
---|
2030 | esac |
---|
2031 | ;; |
---|
2032 | *-*-hpux*) |
---|
2033 | case "$ac_cv_var_adjtime_is_accurate" in |
---|
2034 | yes) ans='tick/16' ;; |
---|
2035 | esac |
---|
2036 | ;; |
---|
2037 | *-*-irix*) |
---|
2038 | ans=150 |
---|
2039 | ;; |
---|
2040 | *-*-sco3.2v4*) |
---|
2041 | ans=1000000L/hz |
---|
2042 | ;; |
---|
2043 | *-*-sco3.2v5.0*) |
---|
2044 | ans=1000000L/hz |
---|
2045 | ;; |
---|
2046 | *-*-solaris2*) |
---|
2047 | case "$ac_cv_var_adjtime_is_accurate" in |
---|
2048 | yes) |
---|
2049 | #ans='tick/16' |
---|
2050 | ;; |
---|
2051 | esac |
---|
2052 | ;; |
---|
2053 | *-*-winnt3.5) |
---|
2054 | ans=50 |
---|
2055 | ;; |
---|
2056 | esac]) |
---|
2057 | ac_cv_var_tickadj=$ans]) |
---|
2058 | case "$ac_cv_var_tickadj" in |
---|
2059 | ''|no) ;; # HMS: I think we can only get 'no' here... |
---|
2060 | *) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $ac_cv_var_tickadj) ;; |
---|
2061 | esac |
---|
2062 | |
---|
2063 | case "$target" in |
---|
2064 | *-*-sco3.2v4*) AC_DEFINE(SCO3_TICKADJ) ;; |
---|
2065 | *-*-sco3.2v5*) AC_DEFINE(SCO5_TICKADJ) ;; |
---|
2066 | esac |
---|
2067 | |
---|
2068 | case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in |
---|
2069 | nonono) # Don't read KMEM, no presets. Bogus. |
---|
2070 | AC_MSG_ERROR(Can't read kmem but no PRESET_TICK or PRESET_TICKADJ) |
---|
2071 | ;; |
---|
2072 | nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus. |
---|
2073 | AC_MSG_ERROR(Can't read kmem but no PRESET_TICK) |
---|
2074 | ;; |
---|
2075 | no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus. |
---|
2076 | AC_MSG_ERROR(Can't read kmem but no PRESET_TICKADJ) |
---|
2077 | ;; |
---|
2078 | no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool. |
---|
2079 | ;; |
---|
2080 | yesnono) # Read KMEM, no presets. Cool. |
---|
2081 | ;; |
---|
2082 | yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus. |
---|
2083 | AC_MSG_WARN(PRESET_TICKADJ is defined but not PRESET_TICK. Please report this.) |
---|
2084 | ;; |
---|
2085 | yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool. |
---|
2086 | ;; |
---|
2087 | yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ. |
---|
2088 | ;; |
---|
2089 | *) # Generally bogus. |
---|
2090 | AC_MSG_ERROR(This shouldn't happen.) |
---|
2091 | ;; |
---|
2092 | esac |
---|
2093 | |
---|
2094 | AC_SUBST(MAKE_TICKADJ) |
---|
2095 | MAKE_TICKADJ=tickadj |
---|
2096 | |
---|
2097 | AC_SUBST(MAKE_NTPTIME) |
---|
2098 | AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime, |
---|
2099 | [case "$ac_cv_var_kernel_pll$ac_cv_hdr_def_sigsys" in |
---|
2100 | yes*) |
---|
2101 | ans=yes |
---|
2102 | ;; |
---|
2103 | *) |
---|
2104 | ans=no |
---|
2105 | ;; |
---|
2106 | esac; |
---|
2107 | ac_cv_make_ntptime=$ans]) |
---|
2108 | case "$ac_cv_make_ntptime" in |
---|
2109 | yes) |
---|
2110 | MAKE_NTPTIME=ntptime |
---|
2111 | ;; |
---|
2112 | esac |
---|
2113 | |
---|
2114 | AC_CACHE_CHECK(if we want UDP wildcard delivery, ac_cv_var_udp_wildcard_delivery, |
---|
2115 | [AC_ARG_ENABLE(udp-wildcard, [ --enable-udp-wildcard s use UDP wildcard delivery], |
---|
2116 | [ans=$enableval], |
---|
2117 | [ans=no |
---|
2118 | case "$target" in |
---|
2119 | *-fujitsu-uxp*) |
---|
2120 | ans=yes |
---|
2121 | ;; |
---|
2122 | *-univel-sysv*) |
---|
2123 | ans=yes |
---|
2124 | ;; |
---|
2125 | *-*-aix3.2*) |
---|
2126 | ans=yes |
---|
2127 | ;; |
---|
2128 | *-*-aix4*) |
---|
2129 | ans=yes |
---|
2130 | ;; |
---|
2131 | *-*-bsdi*) |
---|
2132 | ans=yes |
---|
2133 | ;; |
---|
2134 | *-*-domainos) |
---|
2135 | ans=yes |
---|
2136 | ;; |
---|
2137 | *-*-freebsd*) |
---|
2138 | ans=yes |
---|
2139 | ;; |
---|
2140 | *-*-hpux*) |
---|
2141 | ans=yes |
---|
2142 | ;; |
---|
2143 | *-*-irix6*) |
---|
2144 | ans=yes |
---|
2145 | ;; |
---|
2146 | *-*-linux*) |
---|
2147 | ans=yes |
---|
2148 | ;; |
---|
2149 | *-*-osf*) |
---|
2150 | ans=yes |
---|
2151 | ;; |
---|
2152 | *-*-ptx*) |
---|
2153 | ans=yes |
---|
2154 | ;; |
---|
2155 | *-*-solaris2*) |
---|
2156 | ans=yes |
---|
2157 | ;; |
---|
2158 | *-*-sunos4*) |
---|
2159 | ans=yes |
---|
2160 | ;; |
---|
2161 | esac]) |
---|
2162 | ac_cv_var_udp_wildcard_delivery=$ans]) |
---|
2163 | case "$ac_cv_var_udp_wildcard_delivery" in |
---|
2164 | yes) AC_DEFINE(UDP_WILDCARD_DELIVERY) ;; |
---|
2165 | esac |
---|
2166 | |
---|
2167 | AC_CACHE_CHECK(if we should always slew the time, ac_cv_var_slew_always, |
---|
2168 | [AC_ARG_ENABLE(slew-always, [ --enable-slew-always s always slew the time], |
---|
2169 | [ans=$enableval], |
---|
2170 | [changequote(<<, >>)dnl |
---|
2171 | case "$target" in |
---|
2172 | *-apple-aux[23]*) |
---|
2173 | ans=yes |
---|
2174 | ;; |
---|
2175 | *-*-bsdi[012]*) |
---|
2176 | ans=no |
---|
2177 | ;; |
---|
2178 | *-*-bsdi*) |
---|
2179 | ans=yes |
---|
2180 | ;; |
---|
2181 | *-*-openvms*) # HMS: won't be found |
---|
2182 | ans=yes |
---|
2183 | ;; |
---|
2184 | *) ans=no |
---|
2185 | ;; |
---|
2186 | esac |
---|
2187 | changequote([, ])dnl |
---|
2188 | ]) |
---|
2189 | ac_cv_var_slew_always=$ans]) |
---|
2190 | case "$ac_cv_var_slew_always" in |
---|
2191 | yes) AC_DEFINE(SLEWALWAYS) ;; |
---|
2192 | esac |
---|
2193 | |
---|
2194 | AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew, |
---|
2195 | [AC_ARG_ENABLE(step-slew, [ --enable-step-slew s step and slew the time], |
---|
2196 | [ans=$enableval], |
---|
2197 | [changequote(<<, >>)dnl |
---|
2198 | case "$target" in |
---|
2199 | *-sni-sysv*) |
---|
2200 | ans=yes |
---|
2201 | ;; |
---|
2202 | *-univel-sysv*) |
---|
2203 | ans=no |
---|
2204 | ;; |
---|
2205 | *-*-ptx*) |
---|
2206 | ans=yes |
---|
2207 | ;; |
---|
2208 | *-*-solaris2.[012]*) |
---|
2209 | ans=yes |
---|
2210 | ;; |
---|
2211 | *-*-sysv4*) # HMS: Does this catch Fujitsu UXP? |
---|
2212 | ans=yes |
---|
2213 | ;; |
---|
2214 | *) ans=no |
---|
2215 | ;; |
---|
2216 | esac |
---|
2217 | changequote([, ])dnl |
---|
2218 | ]) |
---|
2219 | ac_cv_var_step_slew=$ans]) |
---|
2220 | case "$ac_cv_var_step_slew" in |
---|
2221 | yes) AC_DEFINE(STEP_SLEW) ;; |
---|
2222 | esac |
---|
2223 | |
---|
2224 | AC_CACHE_CHECK(if ntpdate should step the time, ac_cv_var_ntpdate_step, |
---|
2225 | [AC_ARG_ENABLE(ntpdate-step, [ --enable-ntpdate-step s if ntpdate should step the time], |
---|
2226 | [ans=$enableval], |
---|
2227 | [changequote(<<, >>)dnl |
---|
2228 | case "$target" in |
---|
2229 | *-apple-aux[23]*) |
---|
2230 | ans=yes |
---|
2231 | ;; |
---|
2232 | *) ans=no |
---|
2233 | ;; |
---|
2234 | esac |
---|
2235 | changequote([, ])dnl |
---|
2236 | ]) |
---|
2237 | ac_cv_var_ntpdate_step=$ans]) |
---|
2238 | case "$ac_cv_var_ntpdate_step" in |
---|
2239 | yes) AC_DEFINE(FORCE_NTPDATE_STEP) ;; |
---|
2240 | esac |
---|
2241 | |
---|
2242 | AC_CACHE_CHECK(if we should sync TODR clock every hour, ac_cv_var_sync_todr, |
---|
2243 | [AC_ARG_ENABLE(hourly-todr-sync, [ --enable-hourly-todr-sync s if we should sync TODR hourly], |
---|
2244 | [ans=$enableval], |
---|
2245 | [case "$target" in |
---|
2246 | *-*-nextstep*) |
---|
2247 | ans=yes |
---|
2248 | ;; |
---|
2249 | *-*-openvms*) # HMS: won't be found |
---|
2250 | ans=yes |
---|
2251 | ;; |
---|
2252 | *) ans=no |
---|
2253 | ;; |
---|
2254 | esac]) |
---|
2255 | ac_cv_var_sync_todr=$ans]) |
---|
2256 | case "$ac_cv_var_sync_todr" in |
---|
2257 | yes) AC_DEFINE(DOSYNCTODR) ;; |
---|
2258 | esac |
---|
2259 | |
---|
2260 | case "$host" in |
---|
2261 | $target) |
---|
2262 | ;; |
---|
2263 | *) case "$target" in |
---|
2264 | *-*-vxworks*) |
---|
2265 | LDFLAGS="$LDFLAGS -r" |
---|
2266 | ;; |
---|
2267 | esac |
---|
2268 | ;; |
---|
2269 | esac |
---|
2270 | |
---|
2271 | # Set lbindir and lsbindir if not already set by Athena config.site |
---|
2272 | test -z "$lbindir" && lbindir='${bindir}' |
---|
2273 | test -z "$lsbindir" && lsbindir='${sbindir}' |
---|
2274 | AC_SUBST(lbindir) |
---|
2275 | AC_SUBST(lsbindir) |
---|
2276 | |
---|
2277 | AC_OUTPUT(Makefile adjtimed/Makefile authstuff/Makefile clockstuff/Makefile \ |
---|
2278 | include/Makefile kernel/Makefile kernel/sys/Makefile libntp/Makefile \ |
---|
2279 | libparse/Makefile ntpdate/Makefile ntpq/Makefile ntptrace/Makefile \ |
---|
2280 | parseutil/Makefile xntpd/Makefile \ |
---|
2281 | xntpdc/Makefile util/Makefile, \ |
---|
2282 | [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h]) |
---|
2283 | |
---|