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

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-11-26 22:16:37 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20091126221637-lbtdp0ax1yg9t0bx
Tags: 1:4.2.4p7+dfsg-4
* Use uname -s instead of dpkg-architecture to found the kernel we're
  running on.  dpkg-architecture is part of dpkg-dev. (Closes: #558145)
* Make the package fail to build on hurd since it does not provided
  the needed system calls for ntpd to work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
dnl the 'build' machine is where we run configure and compile
8
8
dnl the 'host' machine is where the resulting stuff runs.
9
9
AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) of where we should run])
10
 
AM_CONFIG_HEADER(config.h)
 
10
AM_CONFIG_HEADER([config.h])
11
11
dnl AC_ARG_PROGRAM
12
12
AC_PREREQ(2.53)
13
13
 
24
24
AC_AIX
25
25
AC_MINIX
26
26
 
 
27
# So far, the only shared library we might use is libopts.
 
28
# It's a small library - we might as well use a static version of it.
 
29
AC_DISABLE_SHARED
 
30
 
27
31
dnl  we need to check for cross compile tools for vxWorks here
28
32
AC_PROG_CC
29
33
# Ralf Wildenhues: With per-target flags we need CC_C_O
30
 
AC_PROG_CC_C_O
 
34
# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
 
35
AM_PROG_CC_C_O
31
36
AC_PROG_CC_STDC
32
37
AC_PROG_CPP
33
38
 
86
91
esac
87
92
LIBOPTS_CHECK(libopts)
88
93
 
89
 
AC_MSG_CHECKING([[if $CC can handle #warning]])
90
 
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#warning foo]])],[ac_cv_cpp_warning=yes],[ac_cv_cpp_warning=no])
91
 
AC_MSG_RESULT([$ac_cv_cpp_warning])
 
94
AC_CACHE_CHECK(
 
95
    [if $CC can handle @%:@warning],
 
96
    ac_cv_cpp_warning,
 
97
    [
 
98
        AC_COMPILE_IFELSE(
 
99
            AC_LANG_PROGRAM([], [#warning foo]),
 
100
            [ac_cv_cpp_warning=yes],
 
101
            [ac_cv_cpp_warning=no],
 
102
        )
 
103
    ]
 
104
)
92
105
 
93
106
case "$ac_cv_cpp_warning" in
94
107
 no)
95
 
    AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1], [Should we avoid #warning on option name collisions?])
96
 
    AC_MSG_RESULT([[Enabling NO_OPTION_NAME_WARNINGS as #warning does not work]])
97
 
    ;;
98
 
esac
99
 
 
100
 
AC_MSG_CHECKING(for bin subdirectory)
 
108
    AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1], [Should we avoid @%:@warning on option name collisions?])
 
109
esac
 
110
 
 
111
case "$GCC" in
 
112
 yes)
 
113
    SAVED_CFLAGS_AC="$CFLAGS"
 
114
    CFLAGS="$CFLAGS -Wstrict-overflow"
 
115
    AC_CACHE_CHECK(
 
116
        [if $CC can handle -Wstrict-overflow], 
 
117
        ac_cv_gcc_Wstrict_overflow, 
 
118
        [
 
119
            AC_COMPILE_IFELSE(
 
120
                [AC_LANG_PROGRAM([], [])],
 
121
                [ac_cv_gcc_Wstrict_overflow=yes],
 
122
                [ac_cv_gcc_Wstrict_overflow=no]
 
123
            )
 
124
        ]
 
125
    )
 
126
    CFLAGS="$SAVED_CFLAGS_AC"
 
127
    unset SAVED_CFLAGS_AC
 
128
    #
 
129
    # $ac_cv_gcc_Wstrict_overflow is tested later to add the 
 
130
    # flag to CFLAGS.
 
131
    #
 
132
esac
 
133
 
 
134
 
 
135
case "$GCC" in
 
136
 yes)
 
137
    SAVED_CFLAGS_AC="$CFLAGS"
 
138
    CFLAGS="$CFLAGS -Winit-self"
 
139
    AC_CACHE_CHECK(
 
140
        [if $CC can handle -Winit-self], 
 
141
        ac_cv_gcc_Winit_self, 
 
142
        [
 
143
            AC_COMPILE_IFELSE(
 
144
                [AC_LANG_PROGRAM([], [])],
 
145
                [ac_cv_gcc_Winit_self=yes],
 
146
                [ac_cv_gcc_Winit_self=no]
 
147
            )
 
148
        ]
 
149
    )
 
150
    CFLAGS="$SAVED_CFLAGS_AC"
 
151
    unset SAVED_CFLAGS_AC
 
152
    #
 
153
    # $ac_cv_gcc_Winit_self is tested later to add the 
 
154
    # flag to CFLAGS.
 
155
    #
 
156
esac
 
157
 
 
158
 
 
159
 
 
160
AC_MSG_CHECKING([for bin subdirectory])
101
161
AC_ARG_WITH(binsubdir,
102
162
        AC_HELP_STRING([--with-binsubdir], [bin ={bin,sbin}]),
103
163
        use_binsubdir="$withval", use_binsubdir="bin")
115
175
BINSUBDIR=$use_binsubdir
116
176
AC_SUBST(BINSUBDIR)
117
177
 
118
 
AC_MSG_CHECKING(if we want to use arlib)
 
178
AC_MSG_CHECKING([if we want to use arlib])
119
179
AC_ARG_WITH(arlib,
120
180
        AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
121
181
        [ans=$withval], [ans=no])
122
 
AC_MSG_RESULT($ans)
 
182
AC_MSG_RESULT([$ans])
123
183
 
124
184
if test -d $srcdir/arlib
125
185
then
164
224
    ;;
165
225
esac
166
226
 
167
 
AC_CACHE_CHECK(if we should use /dev/clockctl, ac_clockctl,
168
 
[AC_ARG_ENABLE(clockctl,
169
 
   AC_HELP_STRING([--enable-clockctl], [s Use /dev/clockctl for non-root clock control]),
170
 
    [ans=$enableval],
171
 
    [case "$host" in
172
 
      *-*-netbsd*)
173
 
         ans=yes
174
 
         ;;
175
 
      *) ans=no
176
 
         ;;
177
 
     esac
178
 
     ])
179
 
ac_clockctl=$ans])
180
 
# End of AC_CACHE_CHECK for clockctl
181
 
AC_CHECK_HEADERS(sys/clockctl.h)
182
 
case "$ac_clockctl$ac_cv_header_sys_clockctl_h" in
183
 
 yesyes)
184
 
    AC_DEFINE(HAVE_DROPROOT, ,[Can we drop root privileges?])
185
 
    ;;
186
 
esac
187
 
 
188
 
AC_CACHE_CHECK(if we have linux capabilities (libcap), ac_linuxcaps,
189
 
[AC_ARG_ENABLE(linuxcaps,
190
 
   AC_HELP_STRING([--enable-linuxcaps], [s Use Linux capabilities for non-root clock control]),
191
 
    [ans=$enableval],
192
 
    [ans=no])
193
 
ac_linuxcaps=$ans])
194
 
# End of AC_CACHE_CHECK for linuxcaps
195
 
AC_CHECK_HEADERS(sys/capability.h)
196
 
AC_CHECK_HEADERS(sys/prctl.h)
197
 
case "$ac_linuxcaps$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
198
 
 yesyesyes)
199
 
    AC_DEFINE(HAVE_LINUX_CAPABILITIES, ,[Do we have Linux capabilities?])
200
 
    AC_DEFINE(HAVE_DROPROOT, ,[Can we drop root privileges?])
201
 
    LIBS="$LIBS -lcap"
202
 
    ;;
203
 
esac
204
227
 
205
228
case "$build" in
206
229
 $host)
236
259
    CFLAGS="$CFLAGS -Wmissing-prototypes"
237
260
    CFLAGS="$CFLAGS -Wpointer-arith"
238
261
    CFLAGS="$CFLAGS -Wshadow"
239
 
    CFLAGS="$CFLAGS -Wstrict-prototypes"
 
262
    #
 
263
    # OpenSSL has a number of callback prototypes
 
264
    # inside other function prototypes which trigger
 
265
    # warnings with -Wstrict-prototypes, such as:
 
266
    #
 
267
    # int i2d_RSA_NET(const RSA *a, unsigned char **pp, 
 
268
    #                 int (*cb)(), int sgckey);
 
269
    #                 ^^^^^^^^^^^
 
270
    #
 
271
    CFLAGS="$CFLAGS -Wno-strict-prototypes"
240
272
    # CFLAGS="$CFLAGS -Wtraditional"
241
273
    # CFLAGS="$CFLAGS -Wwrite-strings"
242
 
 
 
274
    case "$ac_cv_gcc_Winit_self" in
 
275
     yes)
 
276
        CFLAGS="$CFLAGS -Winit-self"
 
277
    esac
 
278
    case "$ac_cv_gcc_Wstrict_overflow" in
 
279
     yes)
 
280
        #not yet: CFLAGS="$CFLAGS -Wstrict-overflow"
 
281
    esac
243
282
    ;;
244
283
esac
245
284
 
284
323
 yes.) ;;
285
324
 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
286
325
     '')
287
 
        AC_MSG_ERROR(building outside of the main directory requires GNU make)
 
326
        AC_MSG_ERROR([building outside of the main directory requires GNU make])
288
327
        ;;
289
328
     *) ;;
290
329
    esac
294
333
AC_SUBST(CFLAGS)dnl
295
334
AC_SUBST(LDFLAGS)dnl
296
335
 
297
 
# HMS: From bunnylou/cowbird
298
 
case "$host" in
299
 
 alpha-dec-osf4.0)
300
 
    AC_DISABLE_SHARED
301
 
    ;;
302
 
 *) # So far, the only shared library we might use is libopts.
303
 
    # It's a small library - we might as well use a static version of it.
304
 
    AC_DISABLE_SHARED
305
 
    ;;
306
 
esac
 
336
m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
 
337
m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
307
338
 
308
339
AC_PROG_LIBTOOL
 
340
 
309
341
AC_PROG_LN_S
310
342
AC_PROG_GCC_TRADITIONAL
311
343
AC_C_VOLATILE
313
345
AC_PATH_PROG(PATH_SH, sh)
314
346
AC_PATH_PROG(PATH_PERL, perl)
315
347
 
316
 
hs_ULONG_CONST
 
348
hs_ULONG_CONST          # remove for 4.2.5
317
349
 
318
350
case "$host" in
319
351
 *-*-vxworks*)
329
361
    ;;
330
362
esac
331
363
 
332
 
AC_CHECK_FUNC(gethostent, ,
333
 
  AC_CHECK_LIB(nsl, gethostent, , , $libxnet -lsocket))
334
 
AC_CHECK_FUNC(openlog, , 
335
 
  AC_CHECK_LIB(gen, openlog, , 
336
 
  AC_CHECK_LIB(syslog, openlog, , , $libxnet -lsocket)))
337
 
AC_CHECK_LIB(md5, MD5Init, , 
338
 
  AC_CHECK_LIB(md, MD5Init))
 
364
AC_CHECK_FUNC([gethostent], ,
 
365
  AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket]))
 
366
AC_CHECK_FUNC([openlog], , 
 
367
  AC_SEARCH_LIBS([openlog], [gen], , 
 
368
  AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])))
 
369
AC_SEARCH_LIBS([MD5Init], [md5 md])
339
370
AC_CHECK_FUNCS(MD5Init)
 
371
 
 
372
# following block becomes on 4.2.5: NTP_LINEEDITLIBS
340
373
dnl HMS: What a hack...
341
 
AC_CHECK_HEADERS(readline/history.h readline/readline.h)
342
 
case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in
 
374
AC_CHECK_HEADERS(editline/history.h editline/readline.h)
 
375
case "$ac_cv_header_editline_history_h$ac_cv_header_editline_readline_h" in
343
376
 *no*) ;;
344
377
 *) save_LIBS=$LIBS
345
378
    LIBS=
371
404
dnl real-time library, so we don't want to use it.
372
405
 
373
406
case "$host" in
374
 
 *-*-linux*) ;;
 
407
 *-*-*linux*) ;;
375
408
 *)
376
409
    AC_CHECK_LIB(rt, sched_setscheduler, ,
377
410
        AC_CHECK_LIB(posix4, sched_setscheduler))
379
412
esac
380
413
 
381
414
AC_CHECK_FUNC(setsockopt, ,
382
 
        [AC_CHECK_LIB(socket, setsockopt)
383
 
         AC_CHECK_LIB(xnet, setsockopt)])
 
415
        [AC_SEARCH_LIBS([setsockopt], [socket xnet])])
384
416
 
385
417
AC_HEADER_STDC
386
418
AC_CHECK_HEADERS(bstring.h)
444
476
#include <netinet/in_systm.h>
445
477
#endif
446
478
])
 
479
 
 
480
# Check for IPTOS_PREC
 
481
AC_CACHE_CHECK(
 
482
    [IPPROTO_IP IP_TOS IPTOS_LOWDELAY],
 
483
    ac_cv_ip_tos,
 
484
    [
 
485
        AC_EGREP_CPP(
 
486
            [yes],
 
487
            [
 
488
                #if HAVE_SYS_TYPES_H
 
489
                #include <sys/types.h>
 
490
                #endif
 
491
                #if HAVE_NETINET_IP_H
 
492
                #include <netinet/in.h>
 
493
                #include <netinet/ip.h>
 
494
                #endif
 
495
                #if defined(IPPROTO_IP) && defined(IP_TOS) && defined(IPTOS_LOWDELAY)
 
496
                  yes
 
497
                #endif
 
498
            ],
 
499
            [ac_cv_ip_tos=yes],
 
500
            [ac_cv_ip_tos=no]
 
501
        )
 
502
    ]
 
503
)
 
504
 
 
505
case "$ac_cv_ip_tos" in
 
506
 yes)
 
507
    AC_DEFINE(HAVE_IPTOS_SUPPORT, 1, [Do we have IPTOS support?])
 
508
esac
 
509
 
447
510
AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO, 1, [NetInfo support?])])
448
511
AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h)
449
512
dnl AC_CHECK_HEADERS(sys/chudefs.h)
509
572
esac
510
573
 
511
574
case "$host" in
512
 
 *-*-linux*)
 
575
 *-*-*linux*)
513
576
    AC_CHECK_FUNCS(__adjtimex __ntp_gettime)
514
577
    ;;
515
578
esac
585
648
#endif
586
649
])
587
650
 
588
 
AC_CACHE_CHECK(for basic volatile support, ac_cv_c_volatile,
 
651
AC_CACHE_CHECK([for basic volatile support], ac_cv_c_volatile,
589
652
[AC_TRY_COMPILE([],[
590
653
volatile int x;],
591
654
        ac_cv_c_volatile=yes,
598
661
    ;;
599
662
esac
600
663
 
 
664
#
 
665
# following block goes away in 4.2.5
 
666
#
601
667
# AM_C_PROTOTYPES gives us ansi2knr
602
668
case "$build" in
603
669
 *-*-solaris2*)
616
682
if test "$ac_cv_have_prototypes" = yes; then
617
683
  AC_DEFINE(HAVE_PROTOTYPES, 1, [Are function prototypes OK?])
618
684
fi
 
685
#
 
686
# end block 
 
687
#
619
688
 
620
689
AC_C_CONST
621
690
AC_C_BIGENDIAN
658
727
#
659
728
# Look for in_port_t.
660
729
#
661
 
AC_MSG_CHECKING(for in_port_t)
 
730
AC_MSG_CHECKING([for in_port_t])
662
731
AC_TRY_COMPILE([
663
732
#include <sys/types.h>
664
733
#include <netinet/in.h>],
669
738
        AC_DEFINE(ISC_PLATFORM_NEEDPORTT, 1, [Do we need our own in_port_t?])
670
739
        ])
671
740
 
672
 
AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz,
 
741
AC_CACHE_CHECK([for a fallback value for HZ], ac_cv_var_default_hz,
673
742
[ac_cv_var_default_hz=100
674
743
case "$host" in
675
744
 alpha*-dec-osf4*|alpha*-dec-osf5*)
681
750
esac])
682
751
AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz, [What is the fallback value for HZ?])
683
752
 
684
 
AC_CACHE_CHECK(if we need to override the system's value for HZ, ac_cv_var_override_hz,
 
753
AC_CACHE_CHECK([if we need to override the system's value for HZ], ac_cv_var_override_hz,
685
754
[ac_cv_var_override_hz=no
686
755
case "$host" in
687
756
 alpha*-dec-osf4*|alpha*-dec-osf5*)
696
765
 *-*-sunos4*)
697
766
    ac_cv_var_override_hz=yes
698
767
    ;;
 
768
 *-*-kfreebsd*)
 
769
    ac_cv_var_override_hz=yes
 
770
    ;;
699
771
esac])
700
772
case "$ac_cv_var_override_hz" in
701
773
 yes)
725
797
dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)])
726
798
dnl AC_MSG_RESULT($su_cv_have_boot_time)
727
799
 
728
 
AC_CACHE_CHECK(for struct rt_msghdr, ac_cv_struct_rt_msghdr,
 
800
AC_CACHE_CHECK([for struct rt_msghdr], ac_cv_struct_rt_msghdr,
729
801
[AC_TRY_COMPILE([
730
802
#include <sys/types.h>
731
803
#include <sys/socket.h>
735
807
        ac_cv_struct_rt_msghdr=yes,
736
808
        ac_cv_struct_rt_msghdr=no)
737
809
])
 
810
 
738
811
if test $ac_cv_struct_rt_msghdr = yes; then
739
812
    AC_DEFINE(HAS_ROUTING_SOCKET, 1, [Do we have a routing socket (struct rt_msghdr)?])
740
813
fi
741
814
 
742
815
AC_CACHE_CHECK(
743
 
  struct sigaction for sa_sigaction,
 
816
  [struct sigaction for sa_sigaction],
744
817
  ac_cv_struct_sigaction_has_sa_sigaction,
745
818
  [
746
819
    AC_TRY_COMPILE(
755
828
  AC_DEFINE(HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION, 1, [Obvious...])
756
829
fi
757
830
 
758
 
AC_CACHE_CHECK(for struct ppsclockev, ac_cv_struct_ppsclockev,
 
831
AC_CACHE_CHECK([for struct ppsclockev], ac_cv_struct_ppsclockev,
759
832
[AC_TRY_COMPILE([
760
833
#include <sys/types.h>
761
834
#ifdef HAVE_SYS_TERMIOS_H
776
849
    AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV, 1, [Does a system header define struct ppsclockev?])
777
850
fi
778
851
 
779
 
AC_CACHE_CHECK(struct sockaddr for sa_len, ac_cv_struct_sockaddr_has_sa_len,
 
852
AC_CACHE_CHECK([struct sockaddr for sa_len], ac_cv_struct_sockaddr_has_sa_len,
780
853
[AC_TRY_COMPILE([
781
854
#include <sys/types.h>
782
855
#include <sys/socket.h>],[
789
862
    AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR, 1, [Should be obvious...])
790
863
fi
791
864
 
792
 
AC_CACHE_CHECK(for struct sockaddr_storage, ac_cv_struct_sockaddr_storage,
 
865
AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
793
866
[AC_TRY_COMPILE([
794
867
#include <sys/types.h>
795
868
#include <sys/socket.h>
909
982
    ;;
910
983
esac
911
984
 
912
 
AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz,
 
985
AC_CACHE_CHECK([struct clockinfo for hz], ac_cv_struct_clockinfo_has_hz,
913
986
[AC_TRY_COMPILE([
914
987
#include <sys/time.h>],[
915
988
extern struct clockinfo *pc;
921
994
    AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
922
995
fi
923
996
 
924
 
AC_CACHE_CHECK(struct clockinfo for tickadj, ac_cv_struct_clockinfo_has_tickadj,
 
997
AC_CACHE_CHECK([struct clockinfo for tickadj], ac_cv_struct_clockinfo_has_tickadj,
925
998
[AC_TRY_COMPILE([
926
999
#include <sys/time.h>],[
927
1000
extern struct clockinfo *pc;
977
1050
#endif])
978
1051
 
979
1052
AC_C_INLINE
 
1053
 
 
1054
case "$ac_cv_c_inline" in
 
1055
 '')
 
1056
    ;;
 
1057
 *)
 
1058
    AC_DEFINE(HAVE_INLINE,1,[inline keyword or macro available])
 
1059
    AC_SUBST(HAVE_INLINE)
 
1060
esac
 
1061
 
980
1062
AC_C_CHAR_UNSIGNED              dnl CROSS_COMPILE?
981
1063
AC_CHECK_SIZEOF(signed char)
982
1064
AC_CHECK_SIZEOF(int)
1007
1089
AC_TYPE_UID_T
1008
1090
 
1009
1091
case "$host" in
1010
 
 *-*-aix[[45]]*)
 
1092
 *-*-aix[[456]]*)
1011
1093
        # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
1012
1094
        # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
1013
1095
        # IBM pulls its thumbs out long enough to implement clock_settime,
1020
1102
AC_CHECK_FUNCS(daemon)
1021
1103
AC_CHECK_FUNCS(finite, ,
1022
1104
  [AC_CHECK_FUNCS(isfinite, ,
1023
 
    [AC_MSG_CHECKING(for isfinite with <math.h>)
 
1105
    [AC_MSG_CHECKING([for isfinite with <math.h>])
1024
1106
    _libs=$LIBS
1025
1107
    LIBS="$LIBS -lm"
1026
1108
    AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)],
1042
1124
# Do we have getifaddrs() ?
1043
1125
#
1044
1126
case $host in
1045
 
*-linux*)
 
1127
*-*linux*)
1046
1128
        # Some recent versions of glibc support getifaddrs() which does not
1047
1129
        # provide AF_INET6 addresses while the function provided by the USAGI
1048
1130
        # project handles the AF_INET6 case correctly.  We need to avoid
1143
1225
esac
1144
1226
AC_CHECK_FUNCS(mktime)
1145
1227
case "$host" in
1146
 
 *-*-aix[[45]]*)
 
1228
 *-*-aix[[456]]*)
1147
1229
    # Just a stub.  Idiots.
1148
1230
    ;;
1149
1231
 *-*-irix[[45]]*)
1150
1232
    # Just a stub in "old" Irix.  Idiots.
1151
1233
    ;;
1152
 
 *-*-linux*)
 
1234
 *-*-*linux*)
1153
1235
    # there, but more trouble than it is worth for now (resolver problems)
1154
1236
    ;;
1155
1237
 *-*-qnx*)
1177
1259
esac
1178
1260
AC_CHECK_FUNCS(plock pututline pututxline readlink recvmsg rtprio)
1179
1261
case "$host" in
1180
 
 *-*-aix[[45]]*)
 
1262
 *-*-aix[[456]]*)
1181
1263
    # Just a stub in AIX 4.  Idiots.
1182
1264
    ;;
1183
1265
 *-*-solaris2.5*)
1198
1280
AC_CHECK_FUNCS(snprintf strdup strerror strstr)
1199
1281
AC_CHECK_FUNCS(timegm)
1200
1282
case "$host" in
1201
 
 *-*-aix[[45]]*)
 
1283
 *-*-aix[[456]]*)
1202
1284
    # Just stubs.  Idiots.
1203
1285
    ;;
1204
1286
 *-*-netbsd1*)
1224
1306
 
1225
1307
###
1226
1308
 
1227
 
# http://bugs.ntp.isc.org/737
 
1309
# http://bugs.ntp.org/737
1228
1310
case "$ac_cv_func_recvmsg" in
1229
1311
 yes)
1230
1312
 AC_MSG_CHECKING([if we need extra help to define struct iovec])
1272
1354
    ;;
1273
1355
esac
1274
1356
 
1275
 
AC_CACHE_CHECK(number of arguments to gettimeofday(), ac_cv_func_Xettimeofday_nargs,
 
1357
AC_CACHE_CHECK([number of arguments to gettimeofday()], ac_cv_func_Xettimeofday_nargs,
1276
1358
[AC_TRY_COMPILE([#include <sys/time.h>],[
1277
1359
gettimeofday((struct timeval*)0,(struct timezone*)0);
1278
1360
settimeofday((struct timeval*)0,(struct timezone*)0);
1283
1365
        AC_DEFINE(SYSV_TIMEOFDAY, 1, [Does Xettimeofday take 1 arg?])
1284
1366
fi
1285
1367
 
1286
 
AC_CACHE_CHECK(number of arguments taken by setpgrp(), ac_cv_func_setpgrp_nargs,
 
1368
AC_CACHE_CHECK([number of arguments taken by setpgrp()], ac_cv_func_setpgrp_nargs,
1287
1369
[AC_TRY_COMPILE([
1288
1370
#ifdef HAVE_SYS_TYPES_H
1289
1371
# include <sys/types.h>
1301
1383
save_CFLAGS=$CFLAGS
1302
1384
CFLAGS="$CFLAGS -I$srcdir/include"
1303
1385
 
1304
 
AC_CACHE_CHECK(argument pointer type of qsort()'s compare function and base,
 
1386
AC_CACHE_CHECK([argument pointer type of qsort()'s compare function and base],
1305
1387
ac_cv_func_qsort_argtype,
1306
1388
[AC_TRY_COMPILE([
1307
1389
#include "l_stdlib.h"
1330
1412
 
1331
1413
CFLAGS=$save_CFLAGS
1332
1414
 
1333
 
AC_CACHE_CHECK(if we need to declare 'errno', ac_cv_decl_errno,
 
1415
AC_CACHE_CHECK([if we need to declare 'errno'], ac_cv_decl_errno,
1334
1416
[AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H
1335
1417
#include <errno.h>
1336
1418
#endif],
1348
1430
dnl the compiler.  Hopefully adding !defined(h_errno) fixes this
1349
1431
dnl without breaking any other platforms.
1350
1432
dnl
1351
 
AC_CACHE_CHECK(if we may declare 'h_errno', ac_cv_decl_h_errno,
 
1433
AC_CACHE_CHECK([if we may declare 'h_errno'], ac_cv_decl_h_errno,
1352
1434
[AC_TRY_COMPILE([#include <sys/types.h>
1353
1435
#ifdef HAVE_NETINET_IN_H
1354
1436
#include <netinet/in.h>
1381
1463
 yes) AC_DEFINE(CHAR_SYS_ERRLIST, 1, [Declare char *sys_errlist array]) ;;
1382
1464
esac
1383
1465
 
1384
 
AC_CACHE_CHECK(if declaring 'syscall()' is ok, ac_cv_decl_syscall,
 
1466
AC_CACHE_CHECK([if declaring 'syscall()' is ok], ac_cv_decl_syscall,
1385
1467
[AC_TRY_COMPILE([
1386
1468
#ifdef HAVE_SYS_TYPES_H
1387
1469
# include <sys/types.h>
1499
1581
    ;;
1500
1582
esac
1501
1583
 
1502
 
AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop,
 
1584
AC_CACHE_CHECK([if we need extra room for SO_RCVBUF], ac_cv_var_rcvbuf_slop,
1503
1585
[ans=no
1504
1586
case "$host" in
1505
1587
 *-*-hpux[[567]]*)
1511
1593
 yes) AC_DEFINE(NEED_RCVBUF_SLOP, 1, [Do we need extra room for SO_RCVBUF? (HPUX <8)]) ;;
1512
1594
esac
1513
1595
 
1514
 
AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket,
 
1596
AC_CACHE_CHECK([if we will open the broadcast socket], ac_cv_var_open_bcast_socket,
1515
1597
[ans=yes
1516
1598
case "$host" in
1517
1599
 *-*-domainos)
1523
1605
 yes) AC_DEFINE(OPEN_BCAST_SOCKET, 1, [Should we open the broadcast socket?]) ;;
1524
1606
esac
1525
1607
 
1526
 
AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig,
 
1608
AC_CACHE_CHECK([if we want the HPUX version of FindConfig()], ac_cv_var_hpux_findconfig,
1527
1609
[ans=no
1528
1610
case "$host" in
1529
1611
 *-*-hpux*)
1535
1617
 yes) AC_DEFINE(NEED_HPUX_FINDCONFIG, 1, [Do we want the HPUX FindConfig()?]) ;;
1536
1618
esac
1537
1619
 
1538
 
AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid,
 
1620
AC_CACHE_CHECK([if process groups are set with -pid], ac_cv_arg_setpgrp_negpid,
1539
1621
[case "$host" in
1540
1622
 *-*-hpux[[567]]*)
1541
1623
    ans=no
1543
1625
 *-*-hpux*)
1544
1626
    ans=yes
1545
1627
    ;;
1546
 
 *-*-linux*)
 
1628
 *-*-*linux*)
1547
1629
    ans=yes
1548
1630
    ;;
1549
1631
 *-*-sunos3*)
1561
1643
 yes) AC_DEFINE(UDP_BACKWARDS_SETOWN, 1, [Do we set process groups with -pid?]) ;;
1562
1644
esac
1563
1645
 
1564
 
AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown,
 
1646
AC_CACHE_CHECK([if we need a ctty for F_SETOWN], ac_cv_func_ctty_for_f_setown,
1565
1647
[[case "$host" in
1566
1648
 *-*-bsdi[23]*)
1567
1649
    ans=yes
1578
1660
 *-*-osf*)
1579
1661
    ans=yes
1580
1662
    ;;
 
1663
 *-*-darwin*)
 
1664
    ans=yes
 
1665
    ;;
1581
1666
 *) ans=no
1582
1667
    ;;
1583
1668
esac
1586
1671
 yes) AC_DEFINE(USE_FSETOWNCTTY, 1, [Must we have a CTTY for fsetown?]) ;;
1587
1672
esac
1588
1673
 
1589
 
AC_CACHE_CHECK(if the OS misses to clear cached routes when more specific routes become available, ac_cv_os_routeupdates,
 
1674
AC_CACHE_CHECK([if the OS fails to clear cached routes when more specific routes become available], ac_cv_os_routeupdates,
1590
1675
[[case "$host" in
1591
1676
 *-*-netbsd*)
1592
1677
    ans=yes
1599
1684
 yes) AC_DEFINE(OS_MISSES_SPECIFIC_ROUTE_UPDATES, 1, [need to recreate sockets on changed routing?]) ;;
1600
1685
esac
1601
1686
 
1602
 
AC_CACHE_CHECK(if the OS needs the wildcard socket set to REUSEADDR for binding interface addresses, ac_cv_os_wildcardreuse,
 
1687
AC_CACHE_CHECK([if the OS needs the wildcard socket set to REUSEADDR for binding interface addresses], ac_cv_os_wildcardreuse,
1603
1688
[[case "$host" in
1604
 
 *-*-linux*)
 
1689
 *-*-*linux*)
1605
1690
    ans=yes
1606
1691
    ;;
1607
1692
 *) ans=no
1613
1698
esac
1614
1699
 
1615
1700
ntp_warning='GRONK'
1616
 
AC_MSG_CHECKING(if we'll use clock_settime or settimeofday or stime)
 
1701
AC_MSG_CHECKING([if we'll use clock_settime or settimeofday or stime])
1617
1702
case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
1618
1703
 yes*)
1619
1704
    ntp_warning=''
1634
1719
    ;;
1635
1720
esac
1636
1721
esac
1637
 
AC_MSG_RESULT($ans)
 
1722
AC_MSG_RESULT([$ans])
1638
1723
case "$ntp_warning" in
1639
1724
 '') ;;
1640
 
 *) AC_MSG_WARN(*** $ntp_warning ***)
 
1725
 *) AC_MSG_WARN([*** $ntp_warning ***])
1641
1726
    ;;
1642
1727
esac
1643
1728
 
1644
 
AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug,
 
1729
AC_CACHE_CHECK([if we have a losing syscall()], ac_cv_var_syscall_bug,
1645
1730
[case "$host" in
1646
1731
 *-*-solaris2.4*)
1647
1732
    ans=yes
1654
1739
 yes) AC_DEFINE(SYSCALL_BUG, 1, [Buggy syscall() (Solaris2.4)?]) ;;
1655
1740
esac
1656
1741
 
1657
 
AC_CACHE_CHECK(for SIGIO, ac_cv_hdr_def_sigio,
 
1742
AC_CACHE_CHECK([for SIGIO], ac_cv_hdr_def_sigio,
1658
1743
 AC_EGREP_CPP(yes,
1659
1744
  [#include <signal.h>
1660
1745
#ifdef SIGIO
1663
1748
  ], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no))
1664
1749
 
1665
1750
dnl Override those system that have a losing SIGIO
1666
 
AC_CACHE_CHECK(if we want to use signalled IO, ac_cv_var_signalled_io,
 
1751
AC_CACHE_CHECK([if we want to use signalled IO], ac_cv_var_signalled_io,
1667
1752
[ans=no
1668
1753
case "$ac_cv_hdr_def_sigio" in
1669
1754
 yes)
1693
1778
     *-*-freebsd*)
1694
1779
        ans=no
1695
1780
        ;;
1696
 
     *-*-linux*)
 
1781
     *-*-*linux*)
1697
1782
        ans=no
1698
1783
        ;;
1699
1784
     *-*-unicosmp*)
1700
1785
        ans=no
1701
1786
        ;;
 
1787
     *-*-kfreebsd*)
 
1788
        ans=no
 
1789
        ;;
1702
1790
    esac
1703
1791
    ;;
1704
1792
esac
1707
1795
 yes) AC_DEFINE(HAVE_SIGNALED_IO, 1, [Can we use SIGIO for tcp and udp IO?]) ;;
1708
1796
esac
1709
1797
 
1710
 
AC_CACHE_CHECK(for SIGPOLL, ac_cv_hdr_def_sigpoll,
 
1798
AC_CACHE_CHECK([for SIGPOLL], ac_cv_hdr_def_sigpoll,
1711
1799
 AC_EGREP_CPP(yes,
1712
1800
 [#include <signal.h>
1713
1801
#ifdef SIGPOLL
1715
1803
#endif
1716
1804
 ], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no))
1717
1805
 
1718
 
AC_CACHE_CHECK(for SIGSYS, ac_cv_hdr_def_sigsys,
 
1806
AC_CACHE_CHECK([for SIGSYS], ac_cv_hdr_def_sigsys,
1719
1807
 AC_EGREP_CPP(yes,
1720
1808
 [#include <signal.h>
1721
1809
#ifdef SIGSYS
1723
1811
#endif
1724
1812
 ], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no))
1725
1813
 
1726
 
AC_CACHE_CHECK(if we can use SIGPOLL for UDP I/O, ac_cv_var_use_udp_sigpoll,
 
1814
AC_CACHE_CHECK([if we can use SIGPOLL for UDP I/O], ac_cv_var_use_udp_sigpoll,
1727
1815
[ans=no
1728
1816
case "$ac_cv_hdr_def_sigpoll" in
1729
1817
 yes)
1740
1828
     *-sni-sysv*)
1741
1829
        ans=no
1742
1830
        ;;
1743
 
     *-*-aix[[45]]*)
 
1831
     *-*-aix[[456]]*)
1744
1832
        ans=no
1745
1833
        ;;
1746
1834
     *-*-hpux*)
1747
1835
        ans=no
1748
1836
        ;;
1749
 
     *-*-linux*)
 
1837
     *-*-*linux*)
1750
1838
        ans=no
1751
1839
        ;;
1752
1840
     *-*-osf*)
1758
1846
     *-*-sunos*)
1759
1847
        ans=no
1760
1848
        ;;
 
1849
     *-*-solaris*)
 
1850
        ans=no
 
1851
        ;;
1761
1852
     *-*-ultrix*)
1762
1853
        ans=no
1763
1854
        ;;
1764
1855
     *-*-unicosmp*)
1765
1856
        ans=no
1766
1857
        ;;
 
1858
     *-*-kfreebsd*)
 
1859
        ans=no
 
1860
        ;;
1767
1861
     *) ans=yes
1768
1862
        ;;
1769
1863
    esac
1774
1868
 yes) AC_DEFINE(USE_UDP_SIGPOLL, 1, [Can we use SIGPOLL for UDP?]) ;;
1775
1869
esac
1776
1870
 
1777
 
AC_CACHE_CHECK(if we can use SIGPOLL for TTY I/O, ac_cv_var_use_tty_sigpoll,
 
1871
AC_CACHE_CHECK([if we can use SIGPOLL for TTY I/O], ac_cv_var_use_tty_sigpoll,
1778
1872
[ans=no
1779
1873
case "$ac_cv_hdr_def_sigpoll" in
1780
1874
 yes)
1791
1885
     *-sni-sysv*)
1792
1886
        ans=no
1793
1887
        ;;
1794
 
     *-*-aix[[45]]*)
 
1888
     *-*-aix[[456]]*)
1795
1889
        ans=no
1796
1890
        ;;
1797
1891
     *-*-hpux*)
1798
1892
        ans=no
1799
1893
        ;;
1800
 
     *-*-linux*)
 
1894
     *-*-*linux*)
1801
1895
        ans=no
1802
1896
        ;;
1803
1897
     *-*-osf*)
1815
1909
     *-*-unicosmp*)
1816
1910
        ans=no
1817
1911
        ;;
 
1912
     *-*-kfreebsd*)
 
1913
        ans=no
 
1914
        ;;
1818
1915
     *) ans=yes
1819
1916
        ;;
1820
1917
    esac
1827
1924
 
1828
1925
case "$ac_cv_header_sys_sio_h" in
1829
1926
 yes)
1830
 
    AC_CACHE_CHECK(sys/sio.h for TIOCDCDTIMESTAMP, ac_cv_hdr_def_tiocdcdtimestamp,
 
1927
    AC_CACHE_CHECK([sys/sio.h for TIOCDCDTIMESTAMP], ac_cv_hdr_def_tiocdcdtimestamp,
1831
1928
     AC_EGREP_CPP(yes,
1832
1929
[#include <sys/sio.h>
1833
1930
#ifdef TIOCDCDTIMESTAMP
1843
1940
    ;;
1844
1941
esac
1845
1942
 
1846
 
AC_CACHE_CHECK(if nlist() values might require extra indirection,
 
1943
AC_CACHE_CHECK([if nlist() values might require extra indirection],
1847
1944
ac_cv_var_nlist_extra_indirection,
1848
1945
[ans=no
1849
1946
case "$host" in
1856
1953
 yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION, 1, [Might nlist() values require an extra level of indirection (AIX)?]) ;;
1857
1954
esac
1858
1955
 
1859
 
AC_CACHE_CHECK(for a minimum recommended value of tickadj,
 
1956
AC_CACHE_CHECK([for a minimum recommended value of tickadj],
1860
1957
ac_cv_var_min_rec_tickadj,
1861
1958
[ans=no
1862
1959
case "$host" in
1870
1967
 *) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj, [Should we recommend a minimum value for tickadj?]) ;;
1871
1968
esac
1872
1969
 
1873
 
AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR,
 
1970
AC_CACHE_CHECK([if the TTY code permits PARENB and IGNPAR],
1874
1971
ac_cv_var_no_parenb_ignpar,
1875
1972
[ans=no
1876
1973
case "$host" in
1877
 
 i?86-*-linux*)
 
1974
 i?86-*-*linux*)
1878
1975
    ans=yes
1879
1976
    ;;
1880
1977
 mips-sgi-irix*)
1894
1991
 yes) AC_DEFINE(NO_PARENB_IGNPAR, 1, [Is there a problem using PARENB and IGNPAR (IRIX)?]) ;;
1895
1992
esac
1896
1993
 
1897
 
AC_MSG_CHECKING(if we're including debugging code)
 
1994
AC_MSG_CHECKING([if we're including debugging code])
1898
1995
AC_ARG_ENABLE(debugging,
1899
1996
   AC_HELP_STRING([--enable-debugging], [+ include debugging code]),
1900
1997
    [ntp_ok=$enableval], [ntp_ok=yes])
1903
2000
fi
1904
2001
AC_MSG_RESULT($ntp_ok)
1905
2002
 
1906
 
AC_MSG_CHECKING(if we including processing time debugging code)
 
2003
AC_MSG_CHECKING([if we including processing time debugging code])
1907
2004
AC_ARG_ENABLE(debug-timing,
1908
2005
   AC_HELP_STRING([--enable-debug-timing], [- include processing time debugging code (costs performance)]),
1909
2006
    [ntp_ok=$enableval], [ntp_ok=no])
1912
2009
fi
1913
2010
AC_MSG_RESULT($ntp_ok)
1914
2011
 
1915
 
AC_MSG_CHECKING(for a the number of minutes in a DST adjustment)
1916
 
AC_ARG_ENABLE(dst_minutes,
1917
 
   AC_HELP_STRING([--enable-dst-minutes=60], [+ minutes per DST adjustment]),
1918
 
    [ans=$enableval], [ans=60])
 
2012
AC_MSG_CHECKING([[for a the number of minutes in a DST adjustment]])
 
2013
AC_ARG_ENABLE(
 
2014
    [dst_minutes],
 
2015
    AS_HELP_STRING(
 
2016
        [--enable-dst-minutes],
 
2017
        [n minutes per DST adjustment @<:@60@:>@]       dnl @<:@ is [
 
2018
    ),
 
2019
    [ans=$enableval],
 
2020
    [ans=60]
 
2021
)
1919
2022
AC_DEFINE_UNQUOTED(DSTMINUTES, $ans, [The number of minutes in a DST adjustment])
1920
 
AC_MSG_RESULT($ans)
1921
 
 
1922
 
AC_CACHE_CHECK(if we have the tty_clk line discipline/streams module,
 
2023
AC_MSG_RESULT([$ans])
 
2024
 
 
2025
AC_MSG_CHECKING([[if ntpd will retry on permanent DNS errors]])
 
2026
AC_ARG_ENABLE(
 
2027
    [ignore-dns-errors],
 
2028
    AS_HELP_STRING(
 
2029
        [--enable-ignore-dns-errors], 
 
2030
        [- retry DNS queries on any error]
 
2031
    ),
 
2032
    [ans=$enableval],
 
2033
    [ans=no]
 
2034
)
 
2035
case "$ans" in
 
2036
 yes)
 
2037
    AC_DEFINE(IGNORE_DNS_ERRORS, 1, [[Retry queries on _any_ DNS error?]])
 
2038
esac
 
2039
AC_MSG_RESULT([$ans])
 
2040
 
 
2041
AC_CACHE_CHECK([if we have the tty_clk line discipline/streams module],
1923
2042
 ac_cv_var_tty_clk,
1924
2043
 [case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in
1925
2044
  *yes*) ac_cv_var_tty_clk=yes ;;
 
2045
  *)     ac_cv_var_tty_clk=no ;;
1926
2046
 esac])
1927
2047
case "$ac_cv_var_tty_clk" in
1928
2048
 yes) AC_DEFINE(TTYCLK, 1, [Do we have the tty_clk line discipline/streams module?]) ;;
1929
2049
esac
1930
2050
 
1931
 
AC_CACHE_CHECK(for the ppsclock streams module,
 
2051
AC_CACHE_CHECK([for the ppsclock streams module],
1932
2052
 ac_cv_var_ppsclock,
1933
2053
 ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev)
1934
2054
case "$ac_cv_var_ppsclock" in
1935
2055
 yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
1936
2056
esac
1937
2057
 
1938
 
AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast,
 
2058
AC_CACHE_CHECK([for kernel multicast support], ac_cv_var_mcast,
1939
2059
  [ac_cv_var_mcast=no
1940
2060
  case "$host" in
1941
2061
   i386-sequent-sysv4) ;;
1952
2072
    AC_CACHE_CHECK([[arg type needed for IP*_MULTICAST_LOOP for setsockopt()]],
1953
2073
        ac_cv_var_typeof_ip_multicast_loop,
1954
2074
        [case "$host" in
1955
 
         *-*-netbsd*|*-*-linux*)
 
2075
         *-*-netbsd*|*-*-*linux*)
1956
2076
            ac_cv_var_typeof_ip_multicast_loop=u_int
1957
2077
            ;;
1958
2078
         *-*-winnt*)
2036
2156
 yes) AC_DEFINE(SIZE_RETURNED_IN_BUFFER, 1, [Does SIOCGIFCONF return size in the buffer?]) ;;
2037
2157
esac
2038
2158
 
 
2159
dnl    vvvvv-- this is wrong, if you re-enable the switch do not cache the result
2039
2160
dnl AC_CACHE_CHECK(if we want GDT surveying code, ac_cv_var_gdt_surveying,
2040
2161
dnl [AC_ARG_ENABLE(gdt-surveying,       [  --enable-gdt-surveying   - include GDT survey code],
2041
2162
dnl     [ans=$enableval], [ans=no])
2081
2202
AC_MSG_RESULT($ntp_ok)
2082
2203
 
2083
2204
# Check for ioctls CIOGETEV
2084
 
AC_MSG_CHECKING(ioctl CIOGETEV)
 
2205
AC_MSG_CHECKING([ioctl CIOGETEV])
2085
2206
if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
2086
2207
    AC_EGREP_CPP(yes,
2087
2208
    [#include <sys/ppsclock.h>
2134
2255
 
2135
2256
# Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
2136
2257
AC_CHECK_HEADER(linux/serial.h)
2137
 
AC_MSG_CHECKING(ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG)
 
2258
AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
2138
2259
case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
2139
2260
  yesyes)
2140
2261
    AC_EGREP_CPP(yes,
2167
2288
AC_MSG_RESULT($ntp_ok)
2168
2289
 
2169
2290
# Check for SHMEM_STATUS support
2170
 
AC_MSG_CHECKING(SHMEM_STATUS support)
 
2291
AC_MSG_CHECKING([SHMEM_STATUS support])
2171
2292
case "$ac_cv_header_sys_mman_h" in
2172
2293
 yes) ntp_ok=yes ;;
2173
2294
 *)   ntp_ok=no  ;;
2193
2314
ntp_refclock=no
2194
2315
 
2195
2316
# HPUX only, and by explicit request
2196
 
AC_MSG_CHECKING(Datum/Bancomm bc635/VME interface)
 
2317
AC_MSG_CHECKING([Datum/Bancomm bc635/VME interface])
2197
2318
AC_ARG_ENABLE(BANCOMM,
2198
2319
    AC_HELP_STRING([--enable-BANCOMM], [- Datum/Bancomm bc635/VME interface]),
2199
2320
    [ntp_ok=$enableval], [ntp_ok=no])
2204
2325
AC_MSG_RESULT($ntp_ok)
2205
2326
case "$ntp_ok$host" in
2206
2327
 yes*-*-hpux*) ;;
2207
 
 yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
 
2328
 yes*) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
2208
2329
esac
2209
2330
 
2210
2331
#HPUX only, and only by explicit request
2211
 
AC_MSG_CHECKING(TrueTime GPS receiver/VME interface)
 
2332
AC_MSG_CHECKING([TrueTime GPS receiver/VME interface])
2212
2333
AC_ARG_ENABLE(GPSVME,
2213
2334
    AC_HELP_STRING([--enable-GPSVME], [- TrueTime GPS receiver/VME interface]),
2214
2335
    [ntp_ok=$enableval], [ntp_ok=no])
2219
2340
AC_MSG_RESULT($ntp_ok)
2220
2341
case "$ntp_ok$host" in
2221
2342
 yes*-*-hpux*) ;;
2222
 
 yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
 
2343
 yes*) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
2223
2344
esac
2224
2345
 
2225
 
AC_MSG_CHECKING(for PCL720 clock support)
 
2346
AC_MSG_CHECKING([for PCL720 clock support])
2226
2347
case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
2227
2348
 yesyesyes)
2228
2349
    AC_DEFINE(CLOCK_PPS720, 1, [PCL 720 clock support])
2232
2353
    ans=no
2233
2354
    ;;
2234
2355
esac
2235
 
AC_MSG_RESULT($ans)
 
2356
AC_MSG_RESULT([$ans])
2236
2357
 
2237
 
AC_MSG_CHECKING(for default inclusion of all suitable non-PARSE clocks)
 
2358
AC_MSG_CHECKING([for default inclusion of all suitable non-PARSE clocks])
2238
2359
AC_ARG_ENABLE(all-clocks,
2239
2360
    AC_HELP_STRING([--enable-all-clocks], [+ include all suitable non-PARSE clocks:]),
2240
2361
    [ntp_eac=$enableval], [ntp_eac=yes])
2241
2362
AC_MSG_RESULT($ntp_eac)
2242
2363
 
2243
2364
# HMS: Should we also require ac_cv_var_parse_ok?
2244
 
AC_MSG_CHECKING(if we have support for PARSE clocks)
 
2365
AC_MSG_CHECKING([if we have support for PARSE clocks])
2245
2366
case "$ac_cv_var_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
2246
2367
 yes*yes*)
2247
2368
    ntp_canparse=yes
2271
2392
AC_MSG_RESULT($ntp_canshm)
2272
2393
 
2273
2394
# Requires modem control
2274
 
AC_MSG_CHECKING(ACTS modem service)
 
2395
AC_MSG_CHECKING([ACTS modem service])
2275
2396
AC_ARG_ENABLE(ACTS,
2276
2397
    AC_HELP_STRING([--enable-ACTS], [s ACTS modem service]),
2277
2398
    [ntp_ok=$enableval],
2290
2411
fi
2291
2412
AC_MSG_RESULT($ntp_ok)
2292
2413
 
2293
 
AC_MSG_CHECKING(Arbiter 1088A/B GPS receiver)
 
2414
AC_MSG_CHECKING([Arbiter 1088A/B GPS receiver])
2294
2415
AC_ARG_ENABLE(ARBITER,
2295
2416
    AC_HELP_STRING([--enable-ARBITER], [+ Arbiter 1088A/B GPS receiver]),
2296
2417
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2300
2421
fi
2301
2422
AC_MSG_RESULT($ntp_ok)
2302
2423
 
2303
 
AC_MSG_CHECKING(Arcron MSF receiver)
 
2424
AC_MSG_CHECKING([Arcron MSF receiver])
2304
2425
AC_ARG_ENABLE(ARCRON_MSF,
2305
2426
    AC_HELP_STRING([--enable-ARCRON-MSF], [+ Arcron MSF receiver]),
2306
2427
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2310
2431
fi
2311
2432
AC_MSG_RESULT($ntp_ok)
2312
2433
 
2313
 
AC_MSG_CHECKING(Austron 2200A/2201A GPS receiver)
 
2434
AC_MSG_CHECKING([Austron 2200A/2201A GPS receiver])
2314
2435
AC_ARG_ENABLE(AS2201,
2315
2436
    AC_HELP_STRING([--enable-AS2201], [+ Austron 2200A/2201A GPS receiver]),
2316
2437
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2320
2441
fi
2321
2442
AC_MSG_RESULT($ntp_ok)
2322
2443
 
2323
 
AC_MSG_CHECKING(ATOM PPS interface)
 
2444
AC_MSG_CHECKING([ATOM PPS interface])
2324
2445
AC_ARG_ENABLE(ATOM,     
2325
2446
    AC_HELP_STRING([--enable-ATOM], [s ATOM PPS interface]),
2326
2447
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2333
2454
fi
2334
2455
AC_MSG_RESULT($ntp_ok)
2335
2456
 
2336
 
AC_MSG_CHECKING(Chrono-log K-series WWVB receiver)
 
2457
AC_MSG_CHECKING([Chrono-log K-series WWVB receiver])
2337
2458
AC_ARG_ENABLE(CHRONOLOG,
2338
2459
    AC_HELP_STRING([--enable-CHRONOLOG], [+ Chrono-log K-series WWVB receiver]),
2339
2460
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2343
2464
fi
2344
2465
AC_MSG_RESULT($ntp_ok)
2345
2466
 
2346
 
AC_MSG_CHECKING(CHU modem/decoder)
 
2467
AC_MSG_CHECKING([CHU modem/decoder])
2347
2468
AC_ARG_ENABLE(CHU,
2348
2469
    AC_HELP_STRING([--enable-CHU], [+ CHU modem/decoder]),
2349
2470
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2354
2475
AC_MSG_RESULT($ntp_ok)
2355
2476
ac_refclock_chu=$ntp_ok
2356
2477
 
2357
 
AC_MSG_CHECKING(CHU audio/decoder)
 
2478
AC_MSG_CHECKING([CHU audio/decoder])
2358
2479
AC_ARG_ENABLE(AUDIO-CHU,
2359
2480
    AC_HELP_STRING([--enable-AUDIO-CHU], [s CHU audio/decoder]),
2360
2481
    [ntp_ok=$enableval],
2368
2489
AC_MSG_RESULT($ntp_ok)
2369
2490
# We used to check for sunos/solaris target...
2370
2491
case "$ntp_ok$ac_refclock_chu$ntp_canaudio" in
2371
 
 yes*no*) AC_MSG_WARN(*** But the expected answer is...no ***) ;;
 
2492
 yes*no*) AC_MSG_WARN([*** But the expected answer is...no ***]) ;;
2372
2493
esac
2373
2494
 
2374
2495
# Not under HP-UX
2375
 
AC_MSG_CHECKING(Datum Programmable Time System)
 
2496
AC_MSG_CHECKING([Datum Programmable Time System])
2376
2497
AC_ARG_ENABLE(DATUM,
2377
2498
    AC_HELP_STRING([--enable-DATUM], [s Datum Programmable Time System]),
2378
2499
    [ntp_ok=$enableval],
2389
2510
fi
2390
2511
AC_MSG_RESULT($ntp_ok)
2391
2512
 
2392
 
AC_MSG_CHECKING(Dumb generic hh:mm:ss local clock)
 
2513
AC_MSG_CHECKING([Dumb generic hh:mm:ss local clock])
2393
2514
AC_ARG_ENABLE(DUMBCLOCK,
2394
2515
    AC_HELP_STRING([--enable-DUMBCLOCK], [+ Dumb generic hh:mm:ss local clock]),
2395
2516
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2399
2520
fi
2400
2521
AC_MSG_RESULT($ntp_ok)
2401
2522
 
2402
 
AC_MSG_CHECKING(Forum Graphic GPS)
 
2523
AC_MSG_CHECKING([Forum Graphic GPS])
2403
2524
AC_ARG_ENABLE(FG,
2404
2525
    AC_HELP_STRING([--enable-FG], [+ Forum Graphic GPS]),
2405
2526
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2410
2531
AC_MSG_RESULT($ntp_ok)
2411
2532
 
2412
2533
# Requires modem control
2413
 
AC_MSG_CHECKING(Heath GC-1000 WWV/WWVH receiver)
 
2534
AC_MSG_CHECKING([Heath GC-1000 WWV/WWVH receiver])
2414
2535
AC_ARG_ENABLE(HEATH,
2415
2536
    AC_HELP_STRING([--enable-HEATH], [s Heath GC-1000 WWV/WWVH receiver]),
2416
2537
    [ntp_ok=$enableval],
2429
2550
fi
2430
2551
AC_MSG_RESULT($ntp_ok)
2431
2552
 
2432
 
AC_MSG_CHECKING(for hopf serial clock device)
 
2553
AC_MSG_CHECKING([for hopf serial clock device])
2433
2554
AC_ARG_ENABLE(HOPFSERIAL,
2434
2555
    AC_HELP_STRING([--enable-HOPFSERIAL], [+ hopf serial clock device]),
2435
2556
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2439
2560
fi
2440
2561
AC_MSG_RESULT($ntp_ok)
2441
2562
 
2442
 
AC_MSG_CHECKING(for hopf PCI clock 6039)
 
2563
AC_MSG_CHECKING([for hopf PCI clock 6039])
2443
2564
AC_ARG_ENABLE(HOPFPCI,
2444
2565
    AC_HELP_STRING([--enable-HOPFPCI], [+ hopf 6039 PCI board]),
2445
2566
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2449
2570
fi
2450
2571
AC_MSG_RESULT($ntp_ok)
2451
2572
 
2452
 
AC_MSG_CHECKING(HP 58503A GPS receiver)
 
2573
AC_MSG_CHECKING([HP 58503A GPS receiver])
2453
2574
AC_ARG_ENABLE(HPGPS,
2454
2575
    AC_HELP_STRING([--enable-HPGPS], [+ HP 58503A GPS receiver]),
2455
2576
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2459
2580
fi
2460
2581
AC_MSG_RESULT($ntp_ok)
2461
2582
 
2462
 
AC_MSG_CHECKING(IRIG audio decoder)
 
2583
AC_MSG_CHECKING([IRIG audio decoder])
2463
2584
AC_ARG_ENABLE(IRIG,
2464
2585
    AC_HELP_STRING([--enable-IRIG], [s IRIG audio decoder]),
2465
2586
    [ntp_ok=$enableval],
2473
2594
fi
2474
2595
AC_MSG_RESULT($ntp_ok)
2475
2596
case "$ntp_ok$ntp_canaudio" in
2476
 
 yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
 
2597
 yesno) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
2477
2598
esac
2478
2599
 
2479
 
AC_MSG_CHECKING(for JJY receiver)
 
2600
AC_MSG_CHECKING([for JJY receiver])
2480
2601
AC_ARG_ENABLE(JJY,
2481
2602
    AC_HELP_STRING([--enable-JJY], [+ JJY receiver]),
2482
2603
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2486
2607
fi
2487
2608
AC_MSG_RESULT($ntp_ok)
2488
2609
 
2489
 
AC_MSG_CHECKING(Rockwell Jupiter GPS receiver)
 
2610
AC_MSG_CHECKING([Rockwell Jupiter GPS receiver])
2490
2611
AC_ARG_ENABLE(JUPITER,
2491
2612
    AC_HELP_STRING([--enable-JUPITER], [s Rockwell Jupiter GPS receiver]),
2492
2613
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2499
2620
fi
2500
2621
AC_MSG_RESULT($ntp_ok)
2501
2622
 
2502
 
AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver)
 
2623
AC_MSG_CHECKING([Leitch CSD 5300 Master Clock System Driver])
2503
2624
AC_ARG_ENABLE(LEITCH,
2504
2625
    AC_HELP_STRING([--enable-LEITCH], [+ Leitch CSD 5300 Master Clock System Driver]),
2505
2626
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2509
2630
fi
2510
2631
AC_MSG_RESULT($ntp_ok)
2511
2632
 
2512
 
AC_MSG_CHECKING(local clock reference)
 
2633
AC_MSG_CHECKING([local clock reference])
2513
2634
AC_ARG_ENABLE(LOCAL-CLOCK,
2514
2635
    AC_HELP_STRING([--enable-LOCAL-CLOCK], [+ local clock reference]),
2515
2636
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2531
2652
dnl AC_MSG_RESULT($ntp_ok)
2532
2653
 
2533
2654
# Not Ultrix
2534
 
AC_MSG_CHECKING(Magnavox MX4200 GPS receiver)
 
2655
AC_MSG_CHECKING([Magnavox MX4200 GPS receiver])
2535
2656
AC_ARG_ENABLE(MX4200,
2536
2657
    AC_HELP_STRING([--enable-MX4200 ], [s Magnavox MX4200 GPS receiver]),
2537
2658
    [ntp_ok=$enableval],
2550
2671
 yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
2551
2672
esac
2552
2673
 
2553
 
AC_MSG_CHECKING(for NeoClock4X receiver)
2554
 
AC_ARG_ENABLE(NEOCLOCK4X,
2555
 
    AC_HELP_STRING([--enable-NEOCLOCK4X], [+ NeoClock4X DCF77 / TDF receiver]),
2556
 
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2557
 
if test "$ntp_ok" = "yes"; then
2558
 
    ntp_refclock=yes
2559
 
    AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
2560
 
fi
2561
 
AC_MSG_RESULT($ntp_ok)
 
2674
dnl AC_MSG_CHECKING([for NeoClock4X receiver])
 
2675
dnl AC_ARG_ENABLE(NEOCLOCK4X,
 
2676
dnl     AC_HELP_STRING([--enable-NEOCLOCK4X], [+ NeoClock4X DCF77 / TDF receiver]),
 
2677
dnl     [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
 
2678
dnl if test "$ntp_ok" = "yes"; then
 
2679
dnl     ntp_refclock=yes
 
2680
dnl     AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
 
2681
dnl fi
 
2682
dnl AC_MSG_RESULT($ntp_ok)
2562
2683
 
2563
 
AC_MSG_CHECKING(NMEA GPS receiver)
 
2684
AC_MSG_CHECKING([NMEA GPS receiver])
2564
2685
AC_ARG_ENABLE(NMEA,
2565
2686
    AC_HELP_STRING([--enable-NMEA], [+ NMEA GPS receiver]),
2566
2687
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2570
2691
fi
2571
2692
AC_MSG_RESULT($ntp_ok)
2572
2693
 
2573
 
AC_MSG_CHECKING(for ONCORE Motorola VP/UT Oncore GPS)
 
2694
AC_MSG_CHECKING([for ONCORE Motorola VP/UT Oncore GPS])
2574
2695
AC_ARG_ENABLE(ONCORE,
2575
2696
    AC_HELP_STRING([--enable-ONCORE], [s Motorola VP/UT Oncore GPS receiver]),
2576
2697
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2583
2704
fi
2584
2705
AC_MSG_RESULT($ntp_ok)
2585
2706
 
2586
 
AC_MSG_CHECKING(for Palisade clock)
 
2707
AC_MSG_CHECKING([for Palisade clock])
2587
2708
AC_ARG_ENABLE(PALISADE,
2588
2709
    AC_HELP_STRING([--enable-PALISADE], [s Palisade clock]),
2589
2710
    [ntp_ok=$enableval],
2601
2722
fi
2602
2723
AC_MSG_RESULT($ntp_ok)
2603
2724
 
2604
 
AC_MSG_CHECKING(Conrad parallel port radio clock)
 
2725
AC_MSG_CHECKING([Conrad parallel port radio clock])
2605
2726
AC_ARG_ENABLE(PCF,
2606
2727
    AC_HELP_STRING([--enable-PCF ], [+ Conrad parallel port radio clock]),
2607
2728
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2611
2732
fi
2612
2733
AC_MSG_RESULT($ntp_ok)
2613
2734
 
2614
 
AC_MSG_CHECKING(PST/Traconex 1020 WWV/WWVH receiver)
 
2735
AC_MSG_CHECKING([PST/Traconex 1020 WWV/WWVH receiver])
2615
2736
AC_ARG_ENABLE(PST,
2616
2737
    AC_HELP_STRING([--enable-PST], [+ PST/Traconex 1020 WWV/WWVH receiver]),
2617
2738
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2621
2742
fi
2622
2743
AC_MSG_RESULT($ntp_ok)
2623
2744
 
2624
 
AC_MSG_CHECKING(RIPENCC specific Trimble driver)
 
2745
AC_MSG_CHECKING([RIPENCC specific Trimble driver])
2625
2746
AC_ARG_ENABLE(RIPENCC,
2626
2747
    AC_HELP_STRING([--enable-RIPENCC], [- RIPENCC specific Trimble driver]),
2627
2748
    [ntp_ok=$enableval], [ntp_ok=no])
2637
2758
 
2638
2759
# Danny Meyer says SHM compiles (with a few warnings) under Win32.
2639
2760
# For *IX, we need sys/ipc.h and sys/shm.h.
2640
 
AC_MSG_CHECKING(for SHM clock attached thru shared memory)
 
2761
AC_MSG_CHECKING([for SHM clock attached thru shared memory])
2641
2762
AC_ARG_ENABLE(SHM,
2642
2763
    AC_HELP_STRING([--enable-SHM], [s SHM clock attached thru shared memory]),
2643
2764
    [ntp_ok=$enableval],
2651
2772
fi
2652
2773
AC_MSG_RESULT($ntp_ok)
2653
2774
 
2654
 
AC_MSG_CHECKING(Spectracom 8170/Netclock/2 WWVB receiver)
 
2775
AC_MSG_CHECKING([Spectracom 8170/Netclock/2 WWVB receiver])
2655
2776
AC_ARG_ENABLE(SPECTRACOM,
2656
2777
    AC_HELP_STRING([--enable-SPECTRACOM], [+ Spectracom 8170/Netclock/2 WWVB receiver]),
2657
2778
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2661
2782
fi
2662
2783
AC_MSG_RESULT($ntp_ok)
2663
2784
 
2664
 
AC_MSG_CHECKING(KSI/Odetics TPRO/S GPS receiver/IRIG interface)
 
2785
AC_MSG_CHECKING([KSI/Odetics TPRO/S GPS receiver/IRIG interface])
2665
2786
AC_ARG_ENABLE(TPRO,
2666
2787
    AC_HELP_STRING([--enable-TPRO], [s KSI/Odetics TPRO/S GPS receiver/IRIG interface]),
2667
2788
    [ntp_ok=$enableval],
2678
2799
fi
2679
2800
AC_MSG_RESULT($ntp_ok)
2680
2801
case "$ntp_ok$ac_cv_header_sys_tpro" in
2681
 
 yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
 
2802
 yesno) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
2682
2803
esac
2683
2804
 
2684
2805
dnl Bug 342: longstanding unfixed bugs
2693
2814
dnl AC_MSG_RESULT($ntp_ok)
2694
2815
 
2695
2816
# Not on a vax-dec-bsd
2696
 
AC_MSG_CHECKING(Kinemetrics/TrueTime receivers)
 
2817
AC_MSG_CHECKING([Kinemetrics/TrueTime receivers])
2697
2818
AC_ARG_ENABLE(TRUETIME,
2698
2819
    AC_HELP_STRING([--enable-TRUETIME], [s Kinemetrics/TrueTime receivers]),
2699
2820
    [ntp_ok=$enableval],
2705
2826
        ntp_ok=$ntp_eac
2706
2827
        ;;
2707
2828
    esac])
 
2829
    
2708
2830
if test "$ntp_ok" = "yes"; then
2709
2831
    ntp_refclock=yes
2710
2832
    AC_DEFINE(CLOCK_TRUETIME, 1, [Kinemetrics/TrueTime receivers])
2711
2833
fi
2712
2834
AC_MSG_RESULT($ntp_ok)
2713
2835
case "$ntp_ok$host" in
2714
 
 yesvax-dec-bsd) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
 
2836
 yesvax-dec-bsd) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
2715
2837
esac
2716
2838
 
2717
 
AC_MSG_CHECKING(TrueTime 560 IRIG-B decoder)
 
2839
AC_MSG_CHECKING([TrueTime 560 IRIG-B decoder])
2718
2840
AC_ARG_ENABLE(TT560,
2719
2841
    AC_HELP_STRING([--enable-TT560], [- TrueTime 560 IRIG-B decoder]),
2720
2842
    [ntp_ok=$enableval], [ntp_ok=no])
2724
2846
fi
2725
2847
AC_MSG_RESULT($ntp_ok)
2726
2848
 
2727
 
AC_MSG_CHECKING(Ultralink M320 WWVB receiver)
 
2849
AC_MSG_CHECKING([Ultralink M320 WWVB receiver])
2728
2850
AC_ARG_ENABLE(ULINK,
2729
2851
    AC_HELP_STRING([--enable-ULINK], [+ Ultralink WWVB receiver]),
2730
2852
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2734
2856
fi
2735
2857
AC_MSG_RESULT($ntp_ok)
2736
2858
 
2737
 
AC_MSG_CHECKING(WWV receiver)
 
2859
AC_MSG_CHECKING([WWV receiver])
2738
2860
AC_ARG_ENABLE(WWV,
2739
2861
    AC_HELP_STRING([--enable-WWV], [s WWV Audio receiver]),
2740
2862
    [ntp_ok=$enableval],
2751
2873
 yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
2752
2874
esac
2753
2875
 
2754
 
AC_MSG_CHECKING(for Zyfer receiver)
 
2876
AC_MSG_CHECKING([for Zyfer receiver])
2755
2877
AC_ARG_ENABLE(ZYFER,
2756
2878
    AC_HELP_STRING([--enable-ZYFER], [+ Zyfer GPStarplus receiver]),
2757
2879
    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
2761
2883
fi
2762
2884
AC_MSG_RESULT($ntp_ok)
2763
2885
 
2764
 
AC_MSG_CHECKING(for default inclusion of all suitable PARSE clocks)
 
2886
AC_MSG_CHECKING([for default inclusion of all suitable PARSE clocks])
2765
2887
AC_ARG_ENABLE(parse-clocks,
2766
2888
   AC_HELP_STRING([--enable-parse-clocks], [- include all suitable PARSE clocks:]),
2767
2889
    [ntp_eapc=$enableval],
2775
2897
 
2776
2898
case "$ntp_eac$ntp_eapc$ntp_canparse" in
2777
2899
 noyes*)
2778
 
    AC_MSG_ERROR("--enable-parse-clocks" requires "--enable-all-clocks".)
 
2900
    AC_MSG_ERROR(["--enable-parse-clocks" requires "--enable-all-clocks".])
2779
2901
    ;;
2780
2902
 yesyesno)
2781
 
    AC_MSG_ERROR(You said "--enable-parse-clocks" but PARSE isn't supported on this platform!)
 
2903
    AC_MSG_ERROR([You said "--enable-parse-clocks" but PARSE isn't supported on this platform!])
2782
2904
    ;;
2783
2905
 *) ;;
2784
2906
esac
2787
2909
ntp_parseutil=no
2788
2910
ntp_rawdcf=no
2789
2911
 
2790
 
AC_MSG_CHECKING(Diem Computime Radio Clock)
 
2912
AC_MSG_CHECKING([Diem Computime Radio Clock])
2791
2913
AC_ARG_ENABLE(COMPUTIME,
2792
2914
    AC_HELP_STRING([--enable-COMPUTIME], [s Diem Computime Radio Clock]),
2793
2915
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2799
2921
AC_MSG_RESULT($ntp_ok)
2800
2922
case "$ntp_ok$ntp_canparse" in
2801
2923
 yesno)
2802
 
    AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
 
2924
    AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
2803
2925
    ;;
2804
2926
esac
2805
2927
 
2806
 
AC_MSG_CHECKING(ELV/DCF7000 clock)
 
2928
AC_MSG_CHECKING([ELV/DCF7000 clock])
2807
2929
AC_ARG_ENABLE(DCF7000,
2808
2930
    AC_HELP_STRING([--enable-DCF7000], [s ELV/DCF7000 clock]),
2809
2931
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2815
2937
AC_MSG_RESULT($ntp_ok)
2816
2938
case "$ntp_ok$ntp_canparse" in
2817
2939
 yesno)
2818
 
    AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
 
2940
    AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
2819
2941
    ;;
2820
2942
esac
2821
2943
 
2822
 
AC_MSG_CHECKING(HOPF 6021 clock)
 
2944
AC_MSG_CHECKING([HOPF 6021 clock])
2823
2945
AC_ARG_ENABLE(HOPF6021,
2824
2946
    AC_HELP_STRING([--enable-HOPF6021 ], [s HOPF 6021 clock]),
2825
2947
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2831
2953
AC_MSG_RESULT($ntp_ok)
2832
2954
case "$ntp_ok$ntp_canparse" in
2833
2955
 yesno)
2834
 
    AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
 
2956
    AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
2835
2957
    ;;
2836
2958
esac
2837
2959
 
2838
 
AC_MSG_CHECKING(Meinberg clocks)
 
2960
AC_MSG_CHECKING([Meinberg clocks])
2839
2961
AC_ARG_ENABLE(MEINBERG,
2840
2962
    AC_HELP_STRING([--enable-MEINBERG], [s Meinberg clocks]),
2841
2963
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2847
2969
AC_MSG_RESULT($ntp_ok)
2848
2970
case "$ntp_ok$ntp_canparse" in
2849
2971
 yesno)
2850
 
    AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
 
2972
    AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
2851
2973
    ;;
2852
2974
esac
2853
2975
 
2854
 
AC_MSG_CHECKING(DCF77 raw time code)
 
2976
AC_MSG_CHECKING([DCF77 raw time code])
2855
2977
AC_ARG_ENABLE(RAWDCF,
2856
2978
    AC_HELP_STRING([--enable-RAWDCF], [s DCF77 raw time code]),
2857
2979
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2871
2993
 
2872
2994
case "$ntp_rawdcf" in
2873
2995
 yes)
2874
 
    AC_CACHE_CHECK(if we must enable parity for RAWDCF,
 
2996
    AC_CACHE_CHECK([if we must enable parity for RAWDCF],
2875
2997
    ac_cv_var_rawdcf_parity,
2876
2998
    [ans=no
2877
2999
    case "$host" in
2878
 
     *-*-linux*)
 
3000
     *-*-*linux*)
2879
3001
        ans=yes
2880
3002
        ;;
2881
3003
    esac
2890
3012
    ;;
2891
3013
esac
2892
3014
 
2893
 
AC_MSG_CHECKING(RCC 8000 clock)
 
3015
AC_MSG_CHECKING([RCC 8000 clock])
2894
3016
AC_ARG_ENABLE(RCC8000,
2895
3017
    AC_HELP_STRING([--enable-RCC8000], [s RCC 8000 clock]),
2896
3018
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2906
3028
    ;;
2907
3029
esac
2908
3030
 
2909
 
AC_MSG_CHECKING(Schmid DCF77 clock)
 
3031
AC_MSG_CHECKING([Schmid DCF77 clock])
2910
3032
AC_ARG_ENABLE(SCHMID,
2911
3033
    AC_HELP_STRING([--enable-SCHMID ], [s Schmid DCF77 clock]),
2912
3034
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2922
3044
    ;;
2923
3045
esac
2924
3046
 
2925
 
AC_MSG_CHECKING(Trimble GPS receiver/TAIP protocol)
 
3047
AC_MSG_CHECKING([Trimble GPS receiver/TAIP protocol])
2926
3048
AC_ARG_ENABLE(TRIMTAIP,
2927
3049
    AC_HELP_STRING([--enable-TRIMTAIP], [s Trimble GPS receiver/TAIP protocol]),
2928
3050
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2938
3060
    ;;
2939
3061
esac
2940
3062
 
2941
 
AC_MSG_CHECKING(Trimble GPS receiver/TSIP protocol)
 
3063
AC_MSG_CHECKING([Trimble GPS receiver/TSIP protocol])
2942
3064
AC_ARG_ENABLE(TRIMTSIP,
2943
3065
    AC_HELP_STRING([--enable-TRIMTSIP], [s Trimble GPS receiver/TSIP protocol]),
2944
3066
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2954
3076
    ;;
2955
3077
esac
2956
3078
 
2957
 
AC_MSG_CHECKING(WHARTON 400A Series clock)
2958
 
AC_ARG_ENABLE(WHARTON,
2959
 
    AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]),
2960
 
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2961
 
if test "$ntp_ok" = "yes"; then
2962
 
    ntp_libparse=yes
2963
 
    ntp_refclock=yes
2964
 
    AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
2965
 
fi
2966
 
AC_MSG_RESULT($ntp_ok)
2967
 
case "$ntp_ok$ntp_canparse" in
2968
 
 yesno)
2969
 
    AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
2970
 
    ;;
2971
 
esac
 
3079
dnl AC_MSG_CHECKING([WHARTON 400A Series clock])
 
3080
dnl AC_ARG_ENABLE(WHARTON,
 
3081
dnl     AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]),
 
3082
dnl     [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
 
3083
dnl if test "$ntp_ok" = "yes"; then
 
3084
dnl     ntp_libparse=yes
 
3085
dnl     ntp_refclock=yes
 
3086
dnl     AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
 
3087
dnl fi
 
3088
dnl AC_MSG_RESULT($ntp_ok)
 
3089
dnl case "$ntp_ok$ntp_canparse" in
 
3090
dnl  yesno)
 
3091
dnl     AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
 
3092
dnl     ;;
 
3093
dnl esac
2972
3094
 
2973
 
AC_MSG_CHECKING(VARITEXT clock)
 
3095
AC_MSG_CHECKING([VARITEXT clock])
2974
3096
AC_ARG_ENABLE(VARITEXT,
2975
3097
    AC_HELP_STRING([--enable-VARITEXT], [s VARITEXT clock]),
2976
3098
    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
2982
3104
AC_MSG_RESULT($ntp_ok)
2983
3105
case "$ntp_ok$ntp_canparse" in
2984
3106
 yesno)
2985
 
    AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
 
3107
    AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
2986
3108
    ;;
2987
3109
esac
2988
3110
AC_SUBST(LIBPARSE)
2989
3111
AC_SUBST(MAKE_LIBPARSE)
2990
3112
AC_SUBST(MAKE_LIBPARSE_KERNEL)
2991
3113
AC_SUBST(MAKE_CHECK_Y2K)
2992
 
AC_MSG_CHECKING(if we need to make and use the parse libraries)
 
3114
AC_MSG_CHECKING([if we need to make and use the parse libraries])
2993
3115
ans=no
2994
3116
case "$ntp_libparse" in
2995
3117
 yes)
3003
3125
    AC_DEFINE(CLOCK_ATOM)
3004
3126
    ;;
3005
3127
esac
3006
 
AC_MSG_RESULT($ans)
 
3128
AC_MSG_RESULT([$ans])
3007
3129
 
3008
3130
# AC_SUBST(RSAOBJS)
3009
3131
# AC_SUBST(RSASRCS)
3016
3138
AC_SUBST(OPENSSL_INC)
3017
3139
AC_SUBST(OPENSSL_LIB)
3018
3140
 
3019
 
AC_MSG_CHECKING(for openssl library directory)
 
3141
AC_MSG_CHECKING([for openssl library directory])
3020
3142
AC_ARG_WITH(openssl-libdir,
3021
3143
        AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]),
3022
3144
[ans=$withval],
3058
3180
    esac
3059
3181
    ;;
3060
3182
esac
3061
 
AC_MSG_RESULT($ans)
 
3183
AC_MSG_RESULT([$ans])
3062
3184
 
3063
 
AC_MSG_CHECKING(for openssl include directory)
 
3185
AC_MSG_CHECKING([for openssl include directory])
3064
3186
AC_ARG_WITH(openssl-incdir,
3065
3187
        AC_HELP_STRING([--with-openssl-incdir], [+ =/something/reasonable]),
3066
3188
[ans=$withval],
3094
3216
    esac
3095
3217
    ;;
3096
3218
esac
3097
 
AC_MSG_RESULT($ans)
 
3219
AC_MSG_RESULT([$ans])
3098
3220
 
3099
3221
AC_ARG_WITH(crypto,
3100
3222
        AC_HELP_STRING([--with-crypto], [+ =openssl]),
3121
3243
    ;;
3122
3244
esac
3123
3245
AC_MSG_CHECKING(for the level of crypto support)
3124
 
AC_MSG_RESULT($ans)
 
3246
AC_MSG_RESULT([$ans])
3125
3247
 
3126
 
AC_MSG_CHECKING(if we want to compile with ElectricFence)
 
3248
AC_MSG_CHECKING([if we want to compile with ElectricFence])
3127
3249
AC_ARG_WITH(electricfence,
3128
3250
        AC_HELP_STRING([--with-electricfence], [- compile with ElectricFence malloc debugger]),
3129
3251
[ans=$withval], [ans=no])
3138
3260
    ans=yes
3139
3261
    ;;
3140
3262
esac
3141
 
AC_MSG_RESULT($ans)
 
3263
AC_MSG_RESULT([$ans])
3142
3264
 
3143
3265
AC_SUBST(MAKE_CHECK_LAYOUT)
3144
 
AC_MSG_CHECKING(if we want to run check-layout)
 
3266
AC_MSG_CHECKING([if we want to run check-layout])
3145
3267
case "$cross_compiling$PATH_PERL" in
3146
3268
 no/*)
3147
3269
    MAKE_CHECK_LAYOUT=check-layout
3151
3273
    ans=no
3152
3274
    ;;
3153
3275
esac
3154
 
AC_MSG_RESULT($ans)
 
3276
AC_MSG_RESULT([$ans])
3155
3277
 
3156
3278
AC_SUBST(TESTDCF)
3157
3279
AC_SUBST(DCFD)
3158
3280
 
3159
 
AC_MSG_CHECKING(if we can make dcf parse utilities)
 
3281
AC_MSG_CHECKING([if we can make dcf parse utilities])
3160
3282
ans=no
3161
3283
if test "$ntp_parseutil" = "yes"; then
3162
3284
    case "$host" in
3163
 
     *-*-sunos4*|*-*-solaris2*|*-*-linux*|*-*-netbsd*)
 
3285
     *-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*)
3164
3286
        ans="dcfd testdcf"
3165
3287
        DCFD=dcfd
3166
3288
        TESTDCF=testdcf
3167
3289
        ;;
3168
3290
    esac
3169
3291
fi
3170
 
AC_MSG_RESULT($ans)
 
3292
AC_MSG_RESULT([$ans])
3171
3293
 
3172
3294
AC_SUBST(MAKE_PARSEKMODULE)
3173
 
AC_MSG_CHECKING(if we can build kernel streams modules for parse)
 
3295
AC_MSG_CHECKING([if we can build kernel streams modules for parse])
3174
3296
ans=no
3175
3297
case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
3176
3298
 yesyes)
3191
3313
    esac
3192
3314
    ;;
3193
3315
esac
3194
 
AC_MSG_RESULT($ans)
 
3316
AC_MSG_RESULT([$ans])
3195
3317
 
3196
 
AC_MSG_CHECKING(if we need basic refclock support)
 
3318
AC_MSG_CHECKING([if we need basic refclock support])
3197
3319
if test "$ntp_refclock" = "yes"; then
3198
3320
    AC_DEFINE(REFCLOCK, 1, [Basic refclock support?])
3199
3321
fi
3217
3339
    MAKE_ADJTIMED=adjtimed
3218
3340
    AC_DEFINE(NEED_HPUX_ADJTIME, 1, [Do we need HPUX adjtime() library support?])
3219
3341
fi
3220
 
AC_MSG_RESULT($ans)
 
3342
AC_MSG_RESULT([$ans])
3221
3343
 
3222
 
AC_MSG_CHECKING(if we want QNX adjtime support)
 
3344
AC_MSG_CHECKING([if we want QNX adjtime support])
3223
3345
case "$host" in
3224
3346
 *-*-qnx*)
3225
3347
    ans=yes
3230
3352
if test "$ans" = "yes"; then
3231
3353
    AC_DEFINE(NEED_QNX_ADJTIME, 1, [Do we need the qnx adjtime call?])
3232
3354
fi
3233
 
AC_MSG_RESULT($ans)
3234
 
 
3235
 
AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem,
3236
 
[AC_ARG_ENABLE(kmem,
3237
 
   AC_HELP_STRING([--enable-kmem], [s read /dev/kmem for tick and/or tickadj]),
3238
 
    [ans=$enableval],
3239
 
    [case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
3240
 
     *yes*)
3241
 
        ans=yes
3242
 
        ;;
3243
 
     *) ans=no
3244
 
        ;;
3245
 
    esac
3246
 
    case "$host" in
3247
 
     *-*-aix*)
3248
 
        #ans=no
3249
 
        ;;
3250
 
     *-*-domainos)      # Won't be found...
3251
 
        ans=no
3252
 
        ;;
3253
 
     *-*-hpux*)
3254
 
        #ans=no
3255
 
        ;;
3256
 
     *-*-irix[[456]]*)
3257
 
        ans=no
3258
 
        ;;
3259
 
     *-*-linux*)
3260
 
        ans=no
3261
 
        ;;
3262
 
     *-*-winnt3.5)
3263
 
        ans=no
3264
 
        ;;
3265
 
     *-*-unicosmp*)
3266
 
        ans=no
3267
 
        ;;
3268
 
    esac
3269
 
    ])
3270
 
ac_cv_var_can_kmem=$ans])
3271
 
 
3272
 
case "$ac_cv_var_can_kmem" in
3273
 
 *yes*) ;;
3274
 
 *) AC_DEFINE(NOKMEM, 1, [Should we NOT read /dev/kmem?]) ;;
3275
 
esac
3276
 
 
3277
 
AC_CACHE_CHECK(if adjtime is accurate, ac_cv_var_adjtime_is_accurate,
3278
 
[AC_ARG_ENABLE(accurate-adjtime,
3279
 
   AC_HELP_STRING([--enable-accurate-adjtime], [s the adjtime() call is accurate]),
3280
 
    [ans=$enableval],
3281
 
    [case "$host" in
3282
 
      i386-sequent-ptx*)
3283
 
         ans=no
3284
 
         ;;
3285
 
      i386-unknown-osf1*)
3286
 
         ans=yes
3287
 
         ;;
3288
 
      mips-sgi-irix[[456]]*)
3289
 
         ans=yes
3290
 
         ;;
3291
 
      *-fujitsu-uxp*)
3292
 
         ans=yes
3293
 
         ;;
3294
 
      *-ibm-aix[[45]]*)
3295
 
         ans=yes
3296
 
         ;;
3297
 
      *-*-linux*)
3298
 
         ans=yes
3299
 
         ;;
3300
 
      *-*-solaris2.[[01]])
3301
 
         ans=no
3302
 
         ;;
3303
 
      *-*-solaris2*)
3304
 
         ans=yes
3305
 
         ;;
3306
 
      *-*-unicosmp*)
3307
 
         ans=yes
3308
 
         ;;
3309
 
      *) ans=no
3310
 
         ;;
3311
 
     esac
3312
 
     ])
3313
 
ac_cv_var_adjtime_is_accurate=$ans])
3314
 
case "$ac_cv_var_adjtime_is_accurate" in
3315
 
 yes) AC_DEFINE(ADJTIME_IS_ACCURATE, 1, [Is adjtime() accurate?]) ;;
 
3355
AC_MSG_RESULT([$ans])
 
3356
 
 
3357
AC_MSG_CHECKING([if we can read kmem])
 
3358
 
 
3359
#  the default is to enable it if the system has the capability
 
3360
 
 
3361
case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
 
3362
 *yes*)
 
3363
    ans=yes
 
3364
    ;;
 
3365
 *) ans=no
 
3366
esac
 
3367
 
 
3368
case "$host" in
 
3369
 *-*-domainos)  # Won't be found...
 
3370
    ans=no
 
3371
    ;;
 
3372
 *-*-hpux*)
 
3373
    #ans=no
 
3374
    ;;
 
3375
 *-*-irix[[456]]*)
 
3376
    ans=no
 
3377
    ;;
 
3378
 *-*-*linux*)
 
3379
    ans=no
 
3380
    ;;
 
3381
 *-*-winnt3.5)
 
3382
    ans=no
 
3383
    ;;
 
3384
 *-*-unicosmp*)
 
3385
    ans=no
 
3386
    ;;
 
3387
esac
 
3388
 
 
3389
# --enable-kmem / --disable-kmem controls if present
 
3390
AC_ARG_ENABLE(
 
3391
    [kmem],
 
3392
    AC_HELP_STRING(
 
3393
        [--enable-kmem],
 
3394
        [s read /dev/kmem for tick and/or tickadj]
 
3395
    ),
 
3396
    [ans=$enableval]
 
3397
)
 
3398
 
 
3399
AC_MSG_RESULT([$ans])
 
3400
 
 
3401
case "$ans" in
 
3402
 yes)
 
3403
    can_kmem=yes
 
3404
    ;;
 
3405
 *) 
 
3406
    can_kmem=no
 
3407
    AC_DEFINE(NOKMEM, 1, [Should we NOT read /dev/kmem?])
 
3408
esac
 
3409
 
 
3410
 
 
3411
AC_MSG_CHECKING([if adjtime is accurate])
 
3412
 
 
3413
# target-dependent defaults
 
3414
 
 
3415
case "$host" in
 
3416
 i386-sequent-ptx*)
 
3417
    ans=no
 
3418
    ;;
 
3419
 i386-unknown-osf1*)
 
3420
    ans=yes
 
3421
    ;;
 
3422
 mips-sgi-irix[[456]]*)
 
3423
    ans=yes
 
3424
    ;;
 
3425
 *-fujitsu-uxp*)
 
3426
    ans=yes
 
3427
    ;;
 
3428
 *-ibm-aix[[456]]*)
 
3429
    ans=yes
 
3430
    ;;
 
3431
 *-*-*linux*)
 
3432
    ans=yes
 
3433
    ;;
 
3434
 *-*-solaris2.[[01]])
 
3435
    ans=no
 
3436
    ;;
 
3437
 *-*-solaris2*)
 
3438
    ans=yes
 
3439
    ;;
 
3440
 *-*-unicosmp*)
 
3441
    ans=yes
 
3442
    ;;
 
3443
 *) ans=no
 
3444
esac
 
3445
 
 
3446
# --enable-accurate-adjtime / --disable-accurate-adjtime
 
3447
# override the default
 
3448
AC_ARG_ENABLE([accurate-adjtime],
 
3449
    AC_HELP_STRING(
 
3450
        [--enable-accurate-adjtime], 
 
3451
        [s the adjtime() call is accurate]
 
3452
    ),
 
3453
    [ans=$enableval],
 
3454
)
 
3455
 
 
3456
AC_MSG_RESULT([$ans])
 
3457
 
 
3458
case "$ans" in
 
3459
 yes) 
 
3460
    AC_DEFINE(ADJTIME_IS_ACCURATE, 1, [Is adjtime() accurate?])
 
3461
    adjtime_is_accurate=yes
 
3462
    ;;
 
3463
 *)
 
3464
    adjtime_is_accurate=no
3316
3465
esac
3317
3466
 
3318
3467
AC_CACHE_CHECK([the name of 'tick' in the kernel],
3328
3477
 *-hp-hpux*)
3329
3478
    ans=old_tick
3330
3479
    ;;
3331
 
 *-ibm-aix[[345]]*)
 
3480
 *-ibm-aix[[3456]]*)
3332
3481
    ans=no
3333
3482
    ;;
3334
3483
 *-*-mpeix*)
3535
3684
 
3536
3685
dnl But we'll only use these "values" if we can't find anything else.
3537
3686
 
3538
 
AC_CACHE_CHECK(for a default value for 'tick', ac_cv_var_tick,
3539
 
[AC_ARG_ENABLE(tick,
3540
 
  AC_HELP_STRING([--enable-tick=VALUE], [s force a value for 'tick']),
3541
 
    [ans=$enableval],
3542
 
    [ans=no
3543
 
     case "$host" in
3544
 
      XXX-*-pc-cygwin*)
3545
 
         ;;
3546
 
      *-univel-sysv*)
3547
 
         ans=10000
3548
 
         ;;
3549
 
      *-*-irix*)
3550
 
         ans=10000
3551
 
         ;;
3552
 
      *-*-linux*)
3553
 
         ans=txc.tick
3554
 
         ;;
3555
 
      *-*-mpeix*)
3556
 
         ans=no
3557
 
         ;;
3558
 
      *-*-winnt3.5)
3559
 
         ans='(every / 10)'
3560
 
         ;;
3561
 
      *-*-unicosmp*)
3562
 
         ans=10000
3563
 
         ;;
3564
 
      *)
3565
 
         ans='1000000L/hz'
3566
 
         ;;
3567
 
     esac])
3568
 
ac_cv_var_tick=$ans])
3569
 
case "$ac_cv_var_tick" in
3570
 
 ''|no) ;;      # HMS: I think we can only get 'no' here...
3571
 
 *) AC_DEFINE_UNQUOTED(PRESET_TICK, $ac_cv_var_tick, [Preset a value for 'tick'?]) ;;
3572
 
esac
3573
 
 
3574
 
AC_CACHE_CHECK(for a default value for 'tickadj', ac_cv_var_tickadj,
3575
 
[AC_ARG_ENABLE(tickadj,
3576
 
  AC_HELP_STRING([--enable-tickadj=VALUE], [s force a value for 'tickadj']),
3577
 
  [ans=$enableval],
3578
 
  [ans='500/hz'
3579
 
  case "$host" in
3580
 
   *-fujitsu-uxp*)
3581
 
      case "$ac_cv_var_adjtime_is_accurate" in
3582
 
       yes) ans='tick/16' ;;
3583
 
      esac
3584
 
      ;;
3585
 
   XXX-*-pc-cygwin*)
3586
 
      ans=no
3587
 
      ;;
3588
 
   *-univel-sysv*)
3589
 
      ans=80
3590
 
      ;;
3591
 
   *-*-aix*)
3592
 
      case "$ac_cv_var_can_kmem" in
3593
 
       no) ans=1000 ;;
3594
 
      esac
3595
 
      ;;
3596
 
   *-*-domainos)        # Skippy: won't be found...
3597
 
      case "$ac_cv_var_can_kmem" in
3598
 
       no) ans=668 ;;
3599
 
      esac
3600
 
      ;;
3601
 
   *-*-hpux*)
3602
 
      case "$ac_cv_var_adjtime_is_accurate" in
3603
 
       yes) ans='tick/16' ;;
3604
 
      esac
3605
 
      ;;
3606
 
   *-*-irix*)
3607
 
      ans=150
3608
 
      ;;
3609
 
   *-*-mpeix*)
3610
 
      ans=no
3611
 
      ;;
3612
 
   *-*-sco3.2v5.0*)
3613
 
      ans=10000L/hz
3614
 
      ;;
3615
 
   *-*-solaris2*)
3616
 
      case "$ac_cv_var_adjtime_is_accurate" in
3617
 
       yes)
3618
 
          #ans='tick/16'
3619
 
          ;;
3620
 
      esac
3621
 
      ;;
3622
 
   *-*-winnt3.5)
3623
 
      ans=50
3624
 
      ;;
3625
 
   *-*-unicosmp*)
3626
 
      ans=150
3627
 
      ;;
3628
 
  esac])
3629
 
ac_cv_var_tickadj=$ans])
3630
 
case "$ac_cv_var_tickadj" in
3631
 
 ''|no) ;;      # HMS: I think we can only get 'no' here...
3632
 
 *) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $ac_cv_var_tickadj, [Preset a value for 'tickadj'?]) ;;
 
3687
AC_MSG_CHECKING([for a default value for 'tick'])
 
3688
 
 
3689
# target-dependent default for tick
 
3690
 
 
3691
case "$host" in
 
3692
 *-*-pc-cygwin*)
 
3693
    AC_MSG_ERROR([tick needs work for cygwin])
 
3694
    ;;
 
3695
 *-univel-sysv*)
 
3696
    ans=10000
 
3697
    ;;
 
3698
 *-*-irix*)
 
3699
    ans=10000
 
3700
    ;;
 
3701
 *-*-*linux*)
 
3702
    ans=txc.tick
 
3703
    ;;
 
3704
 *-*-mpeix*)
 
3705
    ans=no
 
3706
    ;;
 
3707
 *-*-winnt3.5)
 
3708
    ans='(every / 10)'
 
3709
    ;;
 
3710
 *-*-unicosmp*)
 
3711
    ans=10000
 
3712
    ;;
 
3713
 *)
 
3714
    ans='1000000L/hz'
 
3715
    ;;
 
3716
esac
 
3717
 
 
3718
AC_ARG_ENABLE(
 
3719
    [tick],
 
3720
    AC_HELP_STRING(
 
3721
        [--enable-tick=VALUE],
 
3722
        [s force a value for 'tick']
 
3723
    ),
 
3724
    [ans=$enableval]
 
3725
)
 
3726
 
 
3727
AC_MSG_RESULT([$ans])
 
3728
 
 
3729
case "$ans" in
 
3730
 ''|no) ;;      # HMS: I think we can only get 'no' here...
 
3731
 *) AC_DEFINE_UNQUOTED(PRESET_TICK, [$ans], [Preset a value for 'tick'?]) ;;
 
3732
esac
 
3733
 
 
3734
 
 
3735
AC_MSG_CHECKING([for a default value for 'tickadj'])
 
3736
 
 
3737
# target-specific default
 
3738
 
 
3739
ans='500/hz'
 
3740
 
 
3741
case "$host" in
 
3742
 *-fujitsu-uxp*)
 
3743
    case "$adjtime_is_accurate" in
 
3744
     yes)
 
3745
         ans='tick/16'
 
3746
    esac
 
3747
    ;;
 
3748
 XXX-*-pc-cygwin*)
 
3749
    ans=no
 
3750
    ;;
 
3751
 *-univel-sysv*)
 
3752
    ans=80
 
3753
    ;;
 
3754
 *-*-aix*)
 
3755
    case "$can_kmem" in
 
3756
     no)
 
3757
        ans=1000
 
3758
    esac
 
3759
    ;;
 
3760
 *-*-domainos)  # Skippy: won't be found...
 
3761
    case "$can_kmem" in
 
3762
     no)
 
3763
        ans=668
 
3764
    esac
 
3765
    ;;
 
3766
 *-*-hpux*)
 
3767
    case "$adjtime_is_accurate" in
 
3768
     yes)
 
3769
        ans='tick/16'
 
3770
    esac
 
3771
    ;;
 
3772
 *-*-irix*)
 
3773
    ans=150
 
3774
    ;;
 
3775
 *-*-mpeix*)
 
3776
    ans=no
 
3777
    ;;
 
3778
 *-*-sco3.2v5.0*)
 
3779
    ans=10000L/hz
 
3780
    ;;
 
3781
 *-*-winnt3.5)
 
3782
    ans=50
 
3783
    ;;
 
3784
 *-*-unicosmp*)
 
3785
    ans=150
 
3786
esac
 
3787
 
 
3788
AC_ARG_ENABLE(
 
3789
    [tickadj],
 
3790
    AC_HELP_STRING(
 
3791
        [--enable-tickadj=VALUE],
 
3792
        [s force a value for 'tickadj']
 
3793
    ),
 
3794
    [ans=$enableval]
 
3795
)
 
3796
 
 
3797
AC_MSG_RESULT([$ans])
 
3798
 
 
3799
default_tickadj=$ans
 
3800
 
 
3801
case "$default_tickadj" in
 
3802
 ''|no) ;;      # HMS: I think we can only get 'no' here...
 
3803
 *) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $default_tickadj, [Preset a value for 'tickadj'?]) ;;
3633
3804
esac
3634
3805
 
3635
3806
# Newer versions of ReliantUNIX round adjtime() values down to
3645
3816
esac
3646
3817
 
3647
3818
ac_cv_make_tickadj=yes
3648
 
case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in
 
3819
case "$can_kmem$ac_cv_var_tick$default_tickadj" in
3649
3820
 nonono)        # Don't read KMEM, no presets.  Bogus.
3650
 
    AC_MSG_WARN(Can't read kmem, no PRESET_TICK or PRESET_TICKADJ.  No tickadj.)
 
3821
    AC_MSG_WARN([Can't read kmem, no PRESET_TICK or PRESET_TICKADJ.  No tickadj.])
3651
3822
    ac_cv_make_tickadj=no
3652
3823
    ;;
3653
3824
 nono*)         # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ.  Bogus.
3654
 
    AC_MSG_WARN(Can't read kmem but no PRESET_TICK.  No tickadj.)
 
3825
    AC_MSG_WARN([Can't read kmem but no PRESET_TICK.  No tickadj.])
3655
3826
    ac_cv_make_tickadj=no
3656
3827
    ;;
3657
3828
 no*no)         # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ.  Bogus.
3658
 
    AC_MSG_WARN(Can't read kmem but no PRESET_TICKADJ.  No tickadj.)
 
3829
    AC_MSG_WARN([Can't read kmem but no PRESET_TICKADJ.  No tickadj.])
3659
3830
    ac_cv_make_tickadj=no
3660
3831
    ;;
3661
3832
 no*)           # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ.  Cool.
3663
3834
 yesnono)       # Read KMEM, no presets.  Cool.
3664
3835
    ;;
3665
3836
 yesno*)        # Read KMEM, no PRESET_TICK but PRESET_TICKADJ.  Bogus.
3666
 
    AC_MSG_WARN(PRESET_TICKADJ is defined but not PRESET_TICK.  Please report this.)
 
3837
    AC_MSG_WARN([PRESET_TICKADJ is defined but not PRESET_TICK.  Please report this.])
3667
3838
    ;;
3668
3839
 yes*no)        # Read KMEM, PRESET_TICK but no PRESET_TICKADJ.  Cool.
3669
3840
    ;;
3670
3841
 yes*)          # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
3671
3842
    ;;
3672
3843
 *)             # Generally bogus.
3673
 
    AC_MSG_ERROR(This shouldn't happen.)
 
3844
    AC_MSG_ERROR([This shouldn't happen.])
3674
3845
    ;;
3675
3846
esac
3676
3847
 
3677
3848
AC_SUBST(MAKE_NTPTIME)
3678
 
AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime,
 
3849
AC_CACHE_CHECK([if we want and can make the ntptime utility], ac_cv_make_ntptime,
3679
3850
[case "$host" in
3680
3851
 *) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in
3681
3852
     yesyes)
3718
3889
    ac_cv_make_tickadj=no
3719
3890
    ;;
3720
3891
esac
3721
 
AC_CACHE_CHECK(if we want and can make the tickadj utility, ac_cv_make_tickadj,
 
3892
 
 
3893
#
 
3894
# Despite all the above, we always make tickadj.  Setting
 
3895
# ac_cv_make_tickadj before AC_CACHE_CHECK will cause a false
 
3896
# report that the configuration variable was cached.  It may
 
3897
# be better to simply remove the hunk above, I did not want
 
3898
# to remove it if there is hope it will be used again.
 
3899
#
 
3900
unset ac_cv_make_tickadj
 
3901
 
 
3902
AC_CACHE_CHECK([if we want and can make the tickadj utility], ac_cv_make_tickadj,
3722
3903
ac_cv_make_tickadj=yes)
3723
3904
case "$ac_cv_make_tickadj" in
3724
3905
 yes)
3727
3908
esac
3728
3909
 
3729
3910
AC_SUBST(MAKE_TIMETRIM)
3730
 
AC_CACHE_CHECK(if we want and can make the timetrim utility, ac_cv_make_timetrim,
 
3911
AC_CACHE_CHECK([if we want and can make the timetrim utility], ac_cv_make_timetrim,
3731
3912
[case "$host" in
3732
3913
 *-*-irix*)
3733
3914
    ac_cv_make_timetrim=yes
3747
3928
 
3748
3929
AC_SUBST(MAKE_LIBNTPSIM)
3749
3930
AC_SUBST(MAKE_NTPDSIM)
3750
 
AC_CACHE_CHECK([if we want to build the NTPD simulator], ac_cv_var_ntpd_sim,
3751
 
[AC_ARG_ENABLE(simulator,
3752
 
    AC_HELP_STRING([--enable-simulator], [- build/install the NTPD simulator?]),
3753
 
    [ans=$enableval], [ans=no])
3754
 
ac_cv_var_ntpd_sim=$ans])
3755
 
case "$ac_cv_var_ntpd_sim" in
 
3931
 
 
3932
AC_MSG_CHECKING([if we want to build the NTPD simulator])
 
3933
 
 
3934
AC_ARG_ENABLE(
 
3935
    [simulator],
 
3936
    AC_HELP_STRING(
 
3937
        [--enable-simulator],
 
3938
        [- build/install the NTPD simulator?]
 
3939
    ),
 
3940
    [ans=$enableval], 
 
3941
    [ans=no]
 
3942
)
 
3943
 
 
3944
AC_MSG_RESULT([$ans])
 
3945
 
 
3946
case "$ans" in
3756
3947
 yes)
3757
3948
    MAKE_NTPDSIM=ntpdsim
3758
3949
    MAKE_LIBNTPSIM=libntpsim.a
3764
3955
    ;;
3765
3956
 *) case "$host" in
3766
3957
     *-*-vxworks*)
3767
 
        LDFLAGS="$LDFLAGS -r"
3768
 
        ;;
 
3958
        LDFLAGS="$LDFLAGS -r"
 
3959
        ;;
3769
3960
    esac
3770
3961
    ;;
3771
3962
esac
3772
3963
 
3773
 
AC_CACHE_CHECK(if we should always slew the time, ac_cv_var_slew_always,
3774
 
[AC_ARG_ENABLE(slew-always,
3775
 
   AC_HELP_STRING([--enable-slew-always], [s always slew the time]),
3776
 
    [ans=$enableval],
3777
 
    [case "$host" in
3778
 
      *-apple-aux[[23]]*)
3779
 
         ans=yes
3780
 
         ;;
3781
 
      *-*-bsdi[[012]]*)
3782
 
         ans=no
3783
 
         ;;
3784
 
      *-*-bsdi*)
3785
 
         ans=yes
3786
 
         ;;
3787
 
      *-*-openvms*)     # HMS: won't be found
3788
 
         ans=yes
3789
 
         ;;
3790
 
      *) ans=no
3791
 
         ;;
3792
 
     esac
3793
 
     ])
3794
 
ac_cv_var_slew_always=$ans])
3795
 
case "$ac_cv_var_slew_always" in
 
3964
 
 
3965
AC_MSG_CHECKING([if we should always slew the time])
 
3966
 
 
3967
# target-specific defaults
 
3968
 
 
3969
case "$host" in
 
3970
 *-apple-aux[[23]]*)
 
3971
    ans=yes
 
3972
    ;;
 
3973
 *-*-bsdi[[012]]*)
 
3974
    ans=no
 
3975
    ;;
 
3976
 *-*-bsdi*)
 
3977
    ans=yes
 
3978
    ;;
 
3979
 *-*-openvms*)  # HMS: won't be found
 
3980
    ans=yes
 
3981
    ;;
 
3982
 *) ans=no
 
3983
    ;;
 
3984
esac
 
3985
 
 
3986
# --enable-slew-always / --disable-slew-always overrides default
 
3987
 
 
3988
AC_ARG_ENABLE(
 
3989
    [slew-always],
 
3990
    AC_HELP_STRING(
 
3991
        [--enable-slew-always],
 
3992
        [s always slew the time]
 
3993
    ),
 
3994
    [ans=$enableval]
 
3995
)
 
3996
 
 
3997
AC_MSG_RESULT([$ans])
 
3998
 
 
3999
case "$ans" in
3796
4000
 yes) AC_DEFINE(SLEWALWAYS, 1, [Slew always?]) ;;
3797
4001
esac
3798
4002
 
3799
 
AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew,
3800
 
[AC_ARG_ENABLE(step-slew,
3801
 
   AC_HELP_STRING([--enable-step-slew], [s step and slew the time]),
3802
 
    [ans=$enableval],
3803
 
    [case "$host" in
3804
 
      *-sni-sysv*)
3805
 
         ans=yes
3806
 
         ;;
3807
 
      *-univel-sysv*)
3808
 
         ans=no
3809
 
         ;;
3810
 
      *-*-ptx*)
3811
 
         ans=yes
3812
 
         ;;
3813
 
      *-*-solaris2.1[[0-9]]*)
3814
 
         ans=no
3815
 
         ;;
3816
 
      *-*-solaris2.[[012]]*)
3817
 
         ans=yes
3818
 
         ;;
3819
 
      *-*-sysv4*)       # HMS: Does this catch Fujitsu UXP?
3820
 
         ans=yes
3821
 
         ;;
3822
 
      *) ans=no
3823
 
         ;;
3824
 
     esac
3825
 
     ])
3826
 
ac_cv_var_step_slew=$ans])
3827
 
case "$ac_cv_var_step_slew" in
 
4003
AC_MSG_CHECKING([if we should step and slew the time])
 
4004
 
 
4005
case "$host" in
 
4006
 *-sni-sysv*)
 
4007
    ans=yes
 
4008
    ;;
 
4009
 *-univel-sysv*)
 
4010
    ans=no
 
4011
    ;;
 
4012
 *-*-ptx*)
 
4013
    ans=yes
 
4014
    ;;
 
4015
 *-*-solaris2.1[[0-9]]*)
 
4016
    ans=no
 
4017
    ;;
 
4018
 *-*-solaris2.[[012]]*)
 
4019
    ans=yes
 
4020
    ;;
 
4021
 *-*-sysv4*)    # HMS: Does this catch Fujitsu UXP?
 
4022
    ans=yes
 
4023
    ;;
 
4024
 *) ans=no
 
4025
    ;;
 
4026
esac
 
4027
 
 
4028
 
 
4029
AC_ARG_ENABLE(
 
4030
    [step-slew],
 
4031
    AC_HELP_STRING(
 
4032
        [--enable-step-slew],
 
4033
        [s step and slew the time]
 
4034
    ),
 
4035
    [ans=$enableval]
 
4036
)
 
4037
 
 
4038
AC_MSG_RESULT([$ans])
 
4039
 
 
4040
case "$ans" in
3828
4041
 yes) AC_DEFINE(STEP_SLEW, 1, [Step, then slew the clock?]) ;;
3829
4042
esac
3830
4043
 
3831
 
AC_CACHE_CHECK(if ntpdate should step the time, ac_cv_var_ntpdate_step,
3832
 
[AC_ARG_ENABLE(ntpdate-step,
3833
 
   AC_HELP_STRING([--enable-ntpdate-step], [s if ntpdate should step the time]),
3834
 
    [ans=$enableval],
3835
 
    [case "$host" in
3836
 
      *-apple-aux[[23]]*)
3837
 
         ans=yes
3838
 
         ;;
3839
 
      *) ans=no
3840
 
         ;;
3841
 
     esac
3842
 
     ])
3843
 
ac_cv_var_ntpdate_step=$ans])
3844
 
case "$ac_cv_var_ntpdate_step" in
 
4044
AC_MSG_CHECKING([if ntpdate should step the time])
 
4045
 
 
4046
case "$host" in
 
4047
 *-apple-aux[[23]]*)
 
4048
    ans=yes
 
4049
    ;;
 
4050
 *) ans=no
 
4051
esac
 
4052
 
 
4053
AC_ARG_ENABLE(
 
4054
    [ntpdate-step],
 
4055
    AC_HELP_STRING(
 
4056
        [--enable-ntpdate-step],
 
4057
        [s if ntpdate should step the time]
 
4058
    ),
 
4059
    [ans=$enableval]
 
4060
)
 
4061
 
 
4062
AC_MSG_RESULT([$ans])
 
4063
 
 
4064
case "$ans" in
3845
4065
 yes) AC_DEFINE(FORCE_NTPDATE_STEP, 1, [force ntpdate to step the clock if !defined(STEP_SLEW) ?]) ;;
3846
4066
esac
3847
4067
 
3848
 
AC_CACHE_CHECK(if we should sync TODR clock every hour, ac_cv_var_sync_todr,
3849
 
[AC_ARG_ENABLE(hourly-todr-sync,
3850
 
   AC_HELP_STRING([--enable-hourly-todr-sync],
3851
 
                  [s if we should sync TODR hourly]),
3852
 
    [ans=$enableval],
3853
 
    [case "$host" in
3854
 
      *-*-nextstep*)
3855
 
         ans=yes
3856
 
         ;;
3857
 
      *-*-openvms*)     # HMS: won't be found
3858
 
         ans=yes
3859
 
         ;;
3860
 
      *) ans=no
3861
 
         ;;
3862
 
     esac])
3863
 
ac_cv_var_sync_todr=$ans])
 
4068
 
 
4069
AC_MSG_CHECKING([if we should sync TODR clock every hour])
 
4070
 
 
4071
case "$host" in
 
4072
 *-*-nextstep*)
 
4073
    ans=yes
 
4074
    ;;
 
4075
 *-*-openvms*)  # HMS: won't be found
 
4076
    ans=yes
 
4077
    ;;
 
4078
 *)
 
4079
    ans=no
 
4080
esac
 
4081
 
 
4082
AC_ARG_ENABLE(
 
4083
    [hourly-todr-sync],
 
4084
    AC_HELP_STRING(
 
4085
        [--enable-hourly-todr-sync],
 
4086
        [s if we should sync TODR hourly]
 
4087
    ),
 
4088
    [ans=$enableval]
 
4089
)
 
4090
 
 
4091
AC_MSG_RESULT([$ans])
 
4092
 
3864
4093
case "$ac_cv_var_sync_todr" in
3865
4094
 yes) AC_DEFINE(DOSYNCTODR, 1, [synch TODR hourly?]) ;;
3866
4095
esac
3867
4096
 
3868
 
AC_CACHE_CHECK(if we should avoid kernel FLL bug, ac_cv_var_kernel_fll_bug,
3869
 
[AC_ARG_ENABLE(kernel-fll-bug,
3870
 
   AC_HELP_STRING([--enable-kernel-fll-bug],
3871
 
                  [s if we should avoid a kernel FLL bug]),
3872
 
    [ans=$enableval],
3873
 
    [case "$host" in
3874
 
     *-*-solaris2.6)
3875
 
         unamev=`uname -v`
3876
 
         case "$unamev" in
3877
 
          Generic_105181-*)
3878
 
             old_IFS="$IFS"
3879
 
             IFS="-"
3880
 
             set $unamev
3881
 
             IFS="$old_IFS"
3882
 
             if test "$2" -ge 17
3883
 
             then
3884
 
                # Generic_105181-17 and higher
3885
 
                ans=no
3886
 
             else
3887
 
                ans=yes
3888
 
             fi
3889
 
             ;;
3890
 
          *) ans=yes
3891
 
             ;;
3892
 
         esac
3893
 
         ;;
3894
 
     *-*-solaris2.7)
3895
 
         unamev=`uname -v`
3896
 
         case "$unamev" in
3897
 
          Generic_106541-*)
3898
 
             old_IFS="$IFS"
3899
 
             IFS="-"
3900
 
             set $unamev
3901
 
             IFS="$old_IFS"
3902
 
             if test "$2" -ge 07
3903
 
             then
3904
 
                # Generic_106541-07 and higher
3905
 
                ans=no
3906
 
             else
3907
 
                ans=yes
3908
 
             fi
3909
 
             ;;
3910
 
          *) ans=yes
3911
 
             ;;
3912
 
         esac
3913
 
         ;;
3914
 
     *) ans=no
3915
 
         ;;
3916
 
    esac
3917
 
    ])
3918
 
ac_cv_var_kernel_fll_bug=$ans])
3919
 
case "$ac_cv_var_kernel_fll_bug" in
 
4097
 
 
4098
AC_MSG_CHECKING([if we should avoid kernel FLL bug])
 
4099
 
 
4100
case "$host" in
 
4101
 *-*-solaris2.6)
 
4102
    unamev=`uname -v`
 
4103
    case "$unamev" in
 
4104
     Generic_105181-*)
 
4105
        old_IFS="$IFS"
 
4106
        IFS="-"
 
4107
        set $unamev
 
4108
        IFS="$old_IFS"
 
4109
        if test "$2" -ge 17
 
4110
        then
 
4111
            # Generic_105181-17 and higher
 
4112
            ans=no
 
4113
        else
 
4114
            ans=yes
 
4115
        fi
 
4116
        ;;
 
4117
     *) 
 
4118
        ans=yes
 
4119
    esac
 
4120
    ;;
 
4121
 *-*-solaris2.7)
 
4122
    unamev=`uname -v`
 
4123
    case "$unamev" in
 
4124
     Generic_106541-*)
 
4125
        old_IFS="$IFS"
 
4126
        IFS="-"
 
4127
        set $unamev
 
4128
        IFS="$old_IFS"
 
4129
        if test "$2" -ge 07
 
4130
        then
 
4131
            # Generic_106541-07 and higher
 
4132
            ans=no
 
4133
        else
 
4134
            ans=yes
 
4135
        fi
 
4136
        ;;
 
4137
     *)
 
4138
        ans=yes
 
4139
    esac
 
4140
    ;;
 
4141
 *)
 
4142
    ans=no
 
4143
esac
 
4144
 
 
4145
AC_ARG_ENABLE(
 
4146
    [kernel-fll-bug],
 
4147
    AC_HELP_STRING(
 
4148
        [--enable-kernel-fll-bug],
 
4149
        [s if we should avoid a kernel FLL bug]
 
4150
    ),
 
4151
    [ans=$enableval]
 
4152
)
 
4153
 
 
4154
AC_MSG_RESULT([$ans])
 
4155
 
 
4156
case "$ans" in
3920
4157
 yes) AC_DEFINE(KERNEL_FLL_BUG, 1, [Does the kernel have an FLL bug?]) ;;
3921
4158
esac
3922
4159
 
3923
 
AC_CACHE_CHECK(if we should use the IRIG sawtooth filter, ac_cv_var_irig_sucks,
3924
 
[AC_ARG_ENABLE(irig-sawtooth, 
3925
 
        AC_HELP_STRING([--enable-irig-sawtooth],
3926
 
                       [s if we should enable the IRIG sawtooth filter]),
3927
 
    [ans=$enableval],
3928
 
    [case "$host" in
3929
 
     *-*-solaris2.[[89]])
3930
 
        ans=yes
3931
 
        ;;
3932
 
     *-*-solaris2.1[[0-9]]*)
3933
 
        ans=yes
3934
 
        ;;
3935
 
     *) ans=no
3936
 
        ;;
3937
 
    esac
3938
 
    ])
3939
 
ac_cv_var_irig_sucks=$ans])
3940
 
case "$ac_cv_var_irig_sucks" in
 
4160
 
 
4161
AC_MSG_CHECKING([if we should use the IRIG sawtooth filter])
 
4162
 
 
4163
case "$host" in
 
4164
 *-*-solaris2.[[89]])
 
4165
    ans=yes
 
4166
    ;;
 
4167
 *-*-solaris2.1[[0-9]]*)
 
4168
    ans=yes
 
4169
    ;;
 
4170
 *) ans=no
 
4171
esac
 
4172
 
 
4173
AC_ARG_ENABLE(
 
4174
    [irig-sawtooth], 
 
4175
    AC_HELP_STRING(
 
4176
        [--enable-irig-sawtooth],
 
4177
        [s if we should enable the IRIG sawtooth filter]
 
4178
    ),
 
4179
    [ans=$enableval]
 
4180
)
 
4181
 
 
4182
AC_MSG_RESULT([$ans])
 
4183
 
 
4184
case "$ans" in
3941
4185
 yes) AC_DEFINE(IRIG_SUCKS, 1, [Should we use the IRIG sawtooth filter?]) ;;
3942
4186
esac
3943
4187
 
3944
 
AC_CACHE_CHECK(if we should enable NIST lockclock scheme, ac_cv_var_nist_lockclock,
3945
 
[AC_ARG_ENABLE(nist, 
3946
 
        AC_HELP_STRING([--enable-nist],
3947
 
                       [- if we should enable the NIST lockclock scheme]),
3948
 
    [ans=$enableval],[ans=no])
3949
 
ac_cv_var_nist_lockclock=$ans])
3950
 
case "$ac_cv_var_nist_lockclock" in
 
4188
 
 
4189
AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
 
4190
 
 
4191
AC_ARG_ENABLE(
 
4192
        [nist], 
 
4193
        AC_HELP_STRING(
 
4194
            [--enable-nist],
 
4195
            [- if we should enable the NIST lockclock scheme]
 
4196
        ),
 
4197
        [ans=$enableval],
 
4198
        [ans=no]
 
4199
)
 
4200
 
 
4201
AC_MSG_RESULT([$ans])
 
4202
 
 
4203
case "$ans" in
3951
4204
 yes) AC_DEFINE(LOCKCLOCK, 1, [Should we align with the NIST lockclock scheme?]) ;;
3952
4205
esac
3953
4206
 
 
4207
 
 
4208
AC_MSG_CHECKING([if we want support for Samba's signing daemon])
 
4209
 
 
4210
AC_ARG_ENABLE(
 
4211
    [ntp-signd],
 
4212
    AC_HELP_STRING(
 
4213
        [--enable-ntp-signd],
 
4214
        [- Provide support for Samba's signing daemon, =/var/run/ntp_signd]
 
4215
    ),
 
4216
    [ans=$enableval],
 
4217
    [ans=no]
 
4218
)
 
4219
 
 
4220
AC_MSG_RESULT([$ans])
 
4221
 
 
4222
case "$ans" in
 
4223
 no)
 
4224
    ntp_signd_path=
 
4225
    ;;
 
4226
 yes)
 
4227
    ntp_signd_path=/var/run/ntp_signd
 
4228
    ;;
 
4229
 *)
 
4230
    ntp_signd_path="$ans"
 
4231
esac
 
4232
 
 
4233
case "$ntp_signd_path" in
 
4234
 '')
 
4235
    wintime_default=no
 
4236
    ;;
 
4237
 *)
 
4238
    wintime_default=yes
 
4239
    AC_DEFINE(HAVE_NTP_SIGND, ,[Do we want support for Samba's signing daemon?])
 
4240
    AC_DEFINE_UNQUOTED(NTP_SIGND_PATH, "$ntp_signd_path", [Path to sign daemon rendezvous socket])
 
4241
esac
 
4242
 
 
4243
 
 
4244
AC_MSG_CHECKING([if we want the windows symmetric client hack])
 
4245
 
 
4246
# default is no, unless --enable-ntp-signd was given
 
4247
ans=$wintime_default
 
4248
unset wintime_default
 
4249
 
 
4250
AC_ARG_ENABLE(
 
4251
    [wintime],
 
4252
    AC_HELP_STRING(
 
4253
        [--enable-wintime],
 
4254
        [- Provide the windows symmetric client hack]
 
4255
    ),
 
4256
    [ans=$enableval],
 
4257
)
 
4258
 
 
4259
AC_MSG_RESULT([$ans])
 
4260
 
 
4261
case "$ans" in
 
4262
 yes)
 
4263
    AC_DEFINE(WINTIME, ,[Do we want the windows symmetric client hack?])
 
4264
esac
 
4265
 
 
4266
 
 
4267
AC_CHECK_HEADERS(sys/clockctl.h)
 
4268
 
 
4269
case "$host" in
 
4270
 *-*-netbsd*)
 
4271
    ans=yes
 
4272
    ;;
 
4273
 *) ans=no
 
4274
    ;;
 
4275
esac
 
4276
 
 
4277
AC_ARG_ENABLE(
 
4278
    [clockctl],
 
4279
    AC_HELP_STRING(
 
4280
        [--enable-clockctl],
 
4281
        [s Use /dev/clockctl for non-root clock control]
 
4282
    ),
 
4283
    [ntp_use_dev_clockctl=$enableval],
 
4284
    [ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h]
 
4285
)
 
4286
 
 
4287
AC_MSG_CHECKING([[if we should use /dev/clockctl]])
 
4288
AC_MSG_RESULT([$ntp_use_dev_clockctl])
 
4289
 
 
4290
 
 
4291
AC_CHECK_HEADERS([sys/capability.h])
 
4292
AC_CHECK_HEADERS([sys/prctl.h])
 
4293
 
 
4294
AC_MSG_CHECKING([[if we have linux capabilities (libcap)]])
 
4295
 
 
4296
case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
 
4297
 yesyes)
 
4298
    ntp_have_linuxcaps=yes
 
4299
    ;;
 
4300
 *)
 
4301
    ntp_have_linuxcaps=no
 
4302
esac
 
4303
 
 
4304
AC_MSG_RESULT([$ntp_have_linuxcaps])
 
4305
 
 
4306
 
 
4307
AC_ARG_ENABLE(
 
4308
    [linuxcaps],
 
4309
    AC_HELP_STRING(
 
4310
        [--enable-linuxcaps],
 
4311
        [+ Use Linux capabilities for non-root clock control]
 
4312
    ),
 
4313
    [ntp_have_linuxcaps=$enableval]
 
4314
)
 
4315
 
 
4316
 
 
4317
case "$ntp_have_linuxcaps" in
 
4318
 yes)
 
4319
    AC_DEFINE(HAVE_LINUX_CAPABILITIES, ,[[Do we have Linux capabilities?]])
 
4320
    LIBS="$LIBS -lcap"
 
4321
esac
 
4322
 
 
4323
 
 
4324
case "$ntp_use_dev_clockctl$ntp_have_linuxcaps" in
 
4325
 *yes*)
 
4326
    AC_DEFINE(HAVE_DROPROOT, ,[[Can we drop root privileges?]])
 
4327
esac
 
4328
 
 
4329
 
 
4330
AC_CHECK_HEADERS([libscf.h])
 
4331
 
 
4332
case "$ac_cv_header_libscf_h" in
 
4333
 yes)
 
4334
    AC_SUBST(LSCF, [-lscf])
 
4335
esac
 
4336
 
 
4337
AC_CHECK_FUNC(
 
4338
    [setppriv],
 
4339
    AC_DEFINE(HAVE_SOLARIS_PRIVS, ,[[Are Solaris privileges available?]])
 
4340
)
 
4341
 
 
4342
 
3954
4343
#
3955
4344
# ISC stuff
3956
4345
#
3966
4355
    case "$host" in
3967
4356
     powerpc-ibm-aix4*) ;;
3968
4357
     *)
3969
 
        AC_DEFINE(WANT_IPV6, ,[ISC: Want IPv6?])
 
4358
        AC_DEFINE(WANT_IPV6, ,[configure --enable-ipv6])
3970
4359
        ;;
3971
4360
    esac
3972
4361
    ;;
3974
4363
    ;;
3975
4364
esac
3976
4365
 
3977
 
AC_MSG_CHECKING(for IPv6 structures)
3978
 
AC_TRY_COMPILE([
3979
 
#include <sys/types.h>
3980
 
#include <sys/socket.h>
3981
 
#include <netinet/in.h>],
3982
 
[struct sockaddr_in6 sin6; return (0);],
3983
 
        [AC_MSG_RESULT(yes)
3984
 
         found_ipv6=yes],
3985
 
        [AC_MSG_RESULT(no)
3986
 
         found_ipv6=no])
 
4366
 
 
4367
AC_CACHE_CHECK(
 
4368
    [for IPv6 structures],
 
4369
    ac_cv_isc_found_ipv6,
 
4370
    [
 
4371
        AC_COMPILE_IFELSE(
 
4372
            [
 
4373
                AC_LANG_PROGRAM(
 
4374
                    [
 
4375
                        #include <sys/types.h>
 
4376
                        #include <sys/socket.h>
 
4377
                        #include <netinet/in.h>
 
4378
                    ],
 
4379
                    [
 
4380
                        struct sockaddr_in6 sin6;
 
4381
                    ]
 
4382
                )
 
4383
            ],
 
4384
            [ac_cv_isc_found_ipv6=yes],
 
4385
            [ac_cv_isc_found_ipv6=no]
 
4386
        )
 
4387
    ]
 
4388
)
3987
4389
 
3988
4390
#
3989
4391
# See whether IPv6 support is provided via a Kame add-on.
3990
4392
# This is done before other IPv6 linking tests so LIBS is properly set.
3991
4393
#
3992
 
AC_MSG_CHECKING(for Kame IPv6 support)
 
4394
AC_MSG_CHECKING([for Kame IPv6 support])
3993
4395
AC_ARG_WITH(kame,
3994
 
        AC_HELP_STRING([--with-kame], [- =/usr/local/v6]),
 
4396
        [AC_HELP_STRING([--with-kame], [- =/usr/local/v6])],
3995
4397
        use_kame="$withval", use_kame="no")
3996
4398
 
3997
4399
case "$use_kame" in
3998
 
        no)
3999
 
                ;;
4000
 
        yes)
4001
 
                kame_path=/usr/local/v6
4002
 
                ;;
4003
 
        *)
4004
 
                kame_path="$use_kame"
4005
 
                ;;
 
4400
 no)
 
4401
    ;;
 
4402
 yes)
 
4403
    kame_path=/usr/local/v6
 
4404
    ;;
 
4405
 *)
 
4406
    kame_path="$use_kame"
 
4407
    ;;
4006
4408
esac
4007
4409
 
4008
4410
case "$use_kame" in
4009
 
        no)
4010
 
                AC_MSG_RESULT(no)
4011
 
                ;;
4012
 
        *)
4013
 
                if test -f $kame_path/lib/libinet6.a; then
4014
 
                        AC_MSG_RESULT($kame_path/lib/libinet6.a)
4015
 
                        LIBS="-L$kame_path/lib -linet6 $LIBS"
4016
 
                else
4017
 
                        AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
 
4411
 no)
 
4412
    AC_MSG_RESULT(no)
 
4413
    ;;
 
4414
 *)
 
4415
    if test -f $kame_path/lib/libinet6.a; then
 
4416
        AC_MSG_RESULT($kame_path/lib/libinet6.a)
 
4417
        LIBS="-L$kame_path/lib -linet6 $LIBS"
 
4418
    else
 
4419
        AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
4018
4420
 
4019
4421
Please choose the proper path with the following command:
4020
4422
 
4021
4423
    configure --with-kame=PATH
4022
4424
])
4023
 
                fi
4024
 
                ;;
 
4425
    fi
 
4426
    ;;
4025
4427
esac
4026
4428
 
4027
4429
#
4033
4435
# netinet6/in6.h is needed for.
4034
4436
#
4035
4437
case "$host" in
4036
 
*-bsdi4.[[01]]*)
4037
 
        ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
4038
 
        LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
4039
 
        isc_netinet6in6_hack="#include <netinet6/in6.h>"
4040
 
        ;;
4041
 
*)
4042
 
        ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
4043
 
        LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
4044
 
        isc_netinet6in6_hack=""
4045
 
        ;;
 
4438
 *-bsdi4.[[01]]*)
 
4439
    AC_DEFINE(ISC_PLATFORM_NEEDNETINET6IN6H, 1, [Do we need netinet6/in6.h?])
 
4440
    isc_netinet6in6_hack="#include <netinet6/in6.h>"
 
4441
    ;;
 
4442
 *)
 
4443
    isc_netinet6in6_hack=""
4046
4444
esac
4047
4445
 
4048
4446
#
4049
4447
# This is similar to the netinet6/in6.h issue.
4050
4448
#
4051
4449
case "$host" in
4052
 
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
4053
 
        # UnixWare
4054
 
        # ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
4055
 
        # LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
4056
 
        AC_DEFINE(ISC_PLATFORM_FIXIN6ISADDR, 1,[Do we need to fix in6isaddr?])
4057
 
        isc_netinetin6_hack="#include <netinet/in6.h>"
4058
 
        ;;
4059
 
*)
4060
 
        # ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
4061
 
        # LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H"
4062
 
        # ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
4063
 
        isc_netinetin6_hack=""
4064
 
        ;;
 
4450
 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
 
4451
    AC_DEFINE(ISC_PLATFORM_FIXIN6ISADDR, 1,[Do we need to fix in6isaddr?])
 
4452
    isc_netinetin6_hack="#include <netinet/in6.h>"
 
4453
    ;;
 
4454
 *)
 
4455
    isc_netinetin6_hack=""
4065
4456
esac
4066
4457
 
4067
4458
 
4068
 
AC_MSG_CHECKING([for struct if_laddrconf])
4069
 
AC_TRY_LINK([
4070
 
#include <sys/types.h>
4071
 
#include <net/if6.h>
4072
 
],[ struct if_laddrconf a; ],
4073
 
        [AC_MSG_RESULT(yes)
4074
 
         AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRCONF, ,
4075
 
                [ISC: have struct if_laddrconf?])],
4076
 
        [AC_MSG_RESULT(no)])
4077
 
 
4078
 
AC_MSG_CHECKING([for struct if_laddrreq])
4079
 
AC_TRY_LINK([
4080
 
#include <sys/types.h>
4081
 
#include <net/if6.h>
4082
 
],[ struct if_laddrreq a; ],
4083
 
        [AC_MSG_RESULT(yes)
4084
 
         AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRREQ, ,
4085
 
                [ISC: have struct if_laddrreq?])],
4086
 
        [AC_MSG_RESULT(no)])
4087
 
 
4088
 
case "$found_ipv6" in
 
4459
case "$ac_cv_isc_found_ipv6" in
4089
4460
 yes)
4090
 
    AC_DEFINE(ISC_PLATFORM_HAVEIPV6, ,[ISC: Have IPv6?])
4091
 
 
4092
 
    AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id], , ,
4093
 
[
4094
 
#include <sys/types.h>
4095
 
#include <sys/socket.h>
4096
 
#include <netinet/in.h>
4097
 
$isc_netinetin6_hack
4098
 
$isc_netinet6in6_hack
4099
 
])
4100
 
 
4101
 
    AC_MSG_CHECKING(for in6_pktinfo)
4102
 
    AC_TRY_COMPILE([
4103
 
#include <sys/types.h>
4104
 
#include <sys/socket.h>
4105
 
#include <netinet/in.h>
4106
 
$isc_netinetin6_hack
4107
 
$isc_netinet6in6_hack
4108
 
],
4109
 
        [struct in6_pktinfo xyzzy; return (0);],
4110
 
        [AC_MSG_RESULT(yes)
4111
 
         AC_DEFINE(ISC_PLATFORM_HAVEIN6PKTINFO, ,
4112
 
                [ISC: Have struct in6_pktinfo?])],
4113
 
        [AC_MSG_RESULT(no -- disabling runtime ipv6 support)])
 
4461
    AC_DEFINE(ISC_PLATFORM_HAVEIPV6, ,[have IPv6?])
 
4462
 
 
4463
    AC_CACHE_CHECK(
 
4464
        [for in6_pktinfo],
 
4465
        ac_cv_have_in6_pktinfo,
 
4466
        [
 
4467
            AC_COMPILE_IFELSE(
 
4468
                [
 
4469
                    AC_LANG_PROGRAM(
 
4470
                        [
 
4471
                            #include <sys/types.h>
 
4472
                            #include <sys/socket.h>
 
4473
                            #include <netinet/in.h>
 
4474
                            $isc_netinetin6_hack
 
4475
                            $isc_netinet6in6_hack
 
4476
                        ],
 
4477
                        [
 
4478
                            struct in6_pktinfo xyzzy;
 
4479
                        ]
 
4480
                    )
 
4481
                ],
 
4482
                [ac_cv_have_in6_pktinfo=yes],
 
4483
                [ac_cv_have_in6_pktinfo=no]
 
4484
            )
 
4485
        ]
 
4486
    )
 
4487
 
 
4488
    case "$ac_cv_have_in6_pktinfo" in
 
4489
     yes)
 
4490
        AC_DEFINE(ISC_PLATFORM_HAVEIN6PKTINFO, , [have struct in6_pktinfo?])
 
4491
    esac
 
4492
 
4114
4493
 
4115
4494
    # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
4116
 
    AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
4117
 
    AC_TRY_COMPILE([
4118
 
#include <sys/types.h>
4119
 
#include <sys/socket.h>
4120
 
#include <netinet/in.h>
4121
 
$isc_netinetin6_hack
4122
 
$isc_netinet6in6_hack
4123
 
],
4124
 
        [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
4125
 
        [AC_MSG_RESULT(yes)
4126
 
         AC_DEFINE(ISC_PLATFORM_HAVESCOPEID, ,
4127
 
                [ISC: Have sin6_scope_id?])],
4128
 
         result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
4129
 
        [AC_MSG_RESULT(no)
4130
 
         ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
4131
 
         result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
4132
 
    LWRES_HAVE_SIN6_SCOPE_ID="$result"
4133
 
 
4134
 
    ;;
4135
 
esac
4136
 
 
4137
 
# We need this check run all the time...
4138
 
AC_MSG_CHECKING(for in6addr_any)
4139
 
AC_TRY_LINK([
4140
 
#include <sys/types.h>
4141
 
#include <sys/socket.h>
4142
 
#include <netinet/in.h>
4143
 
$isc_netinetin6_hack
4144
 
$isc_netinet6in6_hack
4145
 
$isc_in_addr6_hack
4146
 
],
4147
 
        [[struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);]],
4148
 
        [AC_MSG_RESULT(yes)],
4149
 
        [AC_MSG_RESULT(no)
4150
 
         AC_DEFINE(ISC_PLATFORM_NEEDIN6ADDRANY, ,
4151
 
                [ISC: Need in6addr_any?])]
4152
 
)
 
4495
    AC_CACHE_CHECK(
 
4496
        [for sockaddr_in6.sin6_scope_id],
 
4497
        ac_cv_have_sin6_scope_id,
 
4498
        [
 
4499
            AC_COMPILE_IFELSE(
 
4500
                [
 
4501
                    AC_LANG_PROGRAM(
 
4502
                        [
 
4503
                            #include <sys/types.h>
 
4504
                            #include <sys/socket.h>
 
4505
                            #include <netinet/in.h>
 
4506
                            $isc_netinetin6_hack
 
4507
                            $isc_netinet6in6_hack
 
4508
                        ],
 
4509
                        [
 
4510
                            struct sockaddr_in6 xyzzy;
 
4511
                            xyzzy.sin6_scope_id = 0;
 
4512
                        ]
 
4513
                    )
 
4514
                ],
 
4515
                [ac_cv_have_sin6_scope_id=yes],
 
4516
                [ac_cv_have_sin6_scope_id=no]
 
4517
            )
 
4518
        ]
 
4519
    )
 
4520
 
 
4521
    case "$ac_cv_have_sin6_scope_id" in
 
4522
     yes)
 
4523
        AC_DEFINE(ISC_PLATFORM_HAVESCOPEID, , [have sin6_scope_id?])
 
4524
    esac
 
4525
esac
 
4526
 
 
4527
 
 
4528
# We need this check run even without ac_cv_isc_found_ipv6=yes
 
4529
 
 
4530
AC_CACHE_CHECK(
 
4531
    [for in6addr_any],
 
4532
    ac_cv_have_in6addr_any,
 
4533
    [
 
4534
        AC_COMPILE_IFELSE(
 
4535
            [
 
4536
                AC_LANG_PROGRAM(
 
4537
                    [
 
4538
                        #include <sys/types.h>
 
4539
                        #include <sys/socket.h>
 
4540
                        #include <netinet/in.h>
 
4541
                        $isc_netinetin6_hack
 
4542
                        $isc_netinet6in6_hack
 
4543
                    ],
 
4544
                    [
 
4545
                        struct in6_addr in6; 
 
4546
                        in6 = in6addr_any;
 
4547
                    ]
 
4548
                )
 
4549
            ],
 
4550
            [ac_cv_have_in6addr_any=yes],
 
4551
            [ac_cv_have_in6addr_any=no]
 
4552
        )
 
4553
    ]
 
4554
)
 
4555
 
 
4556
case "$ac_cv_have_in6addr_any" in
 
4557
 no)
 
4558
    AC_DEFINE(ISC_PLATFORM_NEEDIN6ADDRANY, , [missing in6addr_any?])
 
4559
esac
 
4560
 
 
4561
 
 
4562
AC_CACHE_CHECK(
 
4563
    [for struct if_laddrconf],
 
4564
    ac_cv_isc_struct_if_laddrconf,
 
4565
    [
 
4566
        AC_COMPILE_IFELSE(
 
4567
            [
 
4568
                AC_LANG_PROGRAM(
 
4569
                    [
 
4570
                        #include <sys/types.h>
 
4571
                        #include <net/if6.h>
 
4572
                    ],
 
4573
                    [
 
4574
                        struct if_laddrconf a;
 
4575
                    ]
 
4576
                )
 
4577
            ],
 
4578
            [ac_cv_isc_struct_if_laddrconf=yes],
 
4579
            [ac_cv_isc_struct_if_laddrconf=no]
 
4580
        )
 
4581
    ]
 
4582
)
 
4583
 
 
4584
case "$ac_cv_isc_struct_if_laddrconf" in
 
4585
 yes)
 
4586
    AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRCONF, , [have struct if_laddrconf?])
 
4587
esac
 
4588
 
 
4589
AC_CACHE_CHECK(
 
4590
    [for struct if_laddrreq],
 
4591
    ac_cv_isc_struct_if_laddrreq,
 
4592
    [
 
4593
        AC_COMPILE_IFELSE(
 
4594
            [
 
4595
                AC_LANG_PROGRAM(
 
4596
                    [
 
4597
                        #include <sys/types.h>
 
4598
                        #include <net/if6.h>
 
4599
                    ],
 
4600
                    [
 
4601
                        struct if_laddrreq a;
 
4602
                    ]
 
4603
                )
 
4604
            ],
 
4605
            [ac_cv_isc_struct_if_laddrreq=yes],
 
4606
            [ac_cv_isc_struct_if_laddrreq=no]
 
4607
        )
 
4608
    ]
 
4609
)
 
4610
 
 
4611
case "$ac_cv_isc_struct_if_laddrreq" in
 
4612
 yes)
 
4613
    AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRREQ, , [have struct if_laddrreq?])
 
4614
esac
4153
4615
 
4154
4616
#
4155
4617
# Look for a sysctl call to get the list of network interfaces.
4156
4618
#
4157
 
AC_MSG_CHECKING(for interface list sysctl)
4158
 
AC_EGREP_CPP(found_rt_iflist, [
4159
 
#include <sys/param.h>
4160
 
#include <sys/sysctl.h>
4161
 
#include <sys/socket.h>
4162
 
#ifdef NET_RT_IFLIST  
4163
 
found_rt_iflist
4164
 
#endif
4165
 
],
4166
 
        [AC_MSG_RESULT(yes)
4167
 
         AC_DEFINE(HAVE_IFLIST_SYSCTL,1,[ISC: Use iflist_sysctl?])],
4168
 
        [AC_MSG_RESULT(no)])
 
4619
AC_CACHE_CHECK(
 
4620
    [for interface list sysctl],
 
4621
    ac_cv_iflist_sysctl,
 
4622
    AC_EGREP_CPP(
 
4623
        [found_rt_iflist], 
 
4624
        [
 
4625
            #include <sys/param.h>
 
4626
            #include <sys/sysctl.h>
 
4627
            #include <sys/socket.h>
 
4628
            #ifdef NET_RT_IFLIST  
 
4629
            found_rt_iflist
 
4630
            #endif
 
4631
        ],
 
4632
        [ac_cv_iflist_sysctl=yes],
 
4633
        [ac_cv_iflist_sysctl=no]
 
4634
    )
 
4635
)
 
4636
 
 
4637
case "$ac_cv_iflist_sysctl" in
 
4638
 yes)
 
4639
    AC_DEFINE(HAVE_IFLIST_SYSCTL,1,[have iflist_sysctl?])
 
4640
esac
 
4641
 
4169
4642
 
4170
4643
###
4171
4644
 
4172
4645
AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
4173
4646
 
4174
4647
AC_CONFIG_FILES(Makefile)
4175
 
AC_CONFIG_FILES(ElectricFence/Makefile)
4176
4648
AC_CONFIG_FILES(adjtimed/Makefile)
4177
4649
AC_CONFIG_FILES(clockstuff/Makefile)
4178
4650
AC_CONFIG_FILES(include/Makefile)
4196
4668
AC_CONFIG_FILES(scripts/ntp-wait,       [chmod +x scripts/ntp-wait])
4197
4669
AC_CONFIG_FILES(scripts/ntpsweep,       [chmod +x scripts/ntpsweep])
4198
4670
AC_CONFIG_FILES(scripts/ntptrace,       [chmod +x scripts/ntptrace])
4199
 
AC_CONFIG_FILES(scripts/ntpver,         [chmod +x scripts/ntpver])
4200
4671
AC_CONFIG_FILES(scripts/plot_summary,   [chmod +x scripts/plot_summary])
4201
4672
AC_CONFIG_FILES(scripts/summary,        [chmod +x scripts/summary])
4202
4673
AC_CONFIG_FILES(util/Makefile)