~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-01-05 21:10:03 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090105211003-mh6zc3um4k1uhsj7
Tags: 1:4.2.4p4+dfsg-8
It did not properly check the return value of EVP_VerifyFinal
which results in an malformed DSA signature being treated as
a good signature rather than as an error.  (CVE-2009-0021)

Show diffs side-by-side

added added

removed removed

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