87
92
LIBOPTS_CHECK(libopts)
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])
95
[if $CC can handle @%:@warning],
99
AC_LANG_PROGRAM([], [#warning foo]),
100
[ac_cv_cpp_warning=yes],
101
[ac_cv_cpp_warning=no],
93
106
case "$ac_cv_cpp_warning" in
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]])
100
AC_MSG_CHECKING(for bin subdirectory)
108
AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1], [Should we avoid @%:@warning on option name collisions?])
113
SAVED_CFLAGS_AC="$CFLAGS"
114
CFLAGS="$CFLAGS -Wstrict-overflow"
116
[if $CC can handle -Wstrict-overflow],
117
ac_cv_gcc_Wstrict_overflow,
120
[AC_LANG_PROGRAM([], [])],
121
[ac_cv_gcc_Wstrict_overflow=yes],
122
[ac_cv_gcc_Wstrict_overflow=no]
126
CFLAGS="$SAVED_CFLAGS_AC"
127
unset SAVED_CFLAGS_AC
129
# $ac_cv_gcc_Wstrict_overflow is tested later to add the
137
SAVED_CFLAGS_AC="$CFLAGS"
138
CFLAGS="$CFLAGS -Winit-self"
140
[if $CC can handle -Winit-self],
141
ac_cv_gcc_Winit_self,
144
[AC_LANG_PROGRAM([], [])],
145
[ac_cv_gcc_Winit_self=yes],
146
[ac_cv_gcc_Winit_self=no]
150
CFLAGS="$SAVED_CFLAGS_AC"
151
unset SAVED_CFLAGS_AC
153
# $ac_cv_gcc_Winit_self is tested later to add the
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")
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)
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
344
377
*) save_LIBS=$LIBS
1913
2010
AC_MSG_RESULT($ntp_ok)
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]])
2016
[--enable-dst-minutes],
2017
[n minutes per DST adjustment @<:@60@:>@] dnl @<:@ is [
1919
2022
AC_DEFINE_UNQUOTED(DSTMINUTES, $ans, [The number of minutes in a DST adjustment])
1922
AC_CACHE_CHECK(if we have the tty_clk line discipline/streams module,
2023
AC_MSG_RESULT([$ans])
2025
AC_MSG_CHECKING([[if ntpd will retry on permanent DNS errors]])
2027
[ignore-dns-errors],
2029
[--enable-ignore-dns-errors],
2030
[- retry DNS queries on any error]
2037
AC_DEFINE(IGNORE_DNS_ERRORS, 1, [[Retry queries on _any_ DNS error?]])
2039
AC_MSG_RESULT([$ans])
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 ;;
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?]) ;;
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?]) ;;
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) ;;
2550
2671
yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
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
2559
AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
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])
2682
dnl AC_MSG_RESULT($ntp_ok)
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])
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
2964
AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
2966
AC_MSG_RESULT($ntp_ok)
2967
case "$ntp_ok$ntp_canparse" in
2969
AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
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])
3088
dnl AC_MSG_RESULT($ntp_ok)
3089
dnl case "$ntp_ok$ntp_canparse" in
3091
dnl AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
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])
3230
3352
if test "$ans" = "yes"; then
3231
3353
AC_DEFINE(NEED_QNX_ADJTIME, 1, [Do we need the qnx adjtime call?])
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]),
3239
[case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
3250
*-*-domainos) # Won't be found...
3270
ac_cv_var_can_kmem=$ans])
3272
case "$ac_cv_var_can_kmem" in
3274
*) AC_DEFINE(NOKMEM, 1, [Should we NOT read /dev/kmem?]) ;;
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]),
3288
mips-sgi-irix[[456]]*)
3300
*-*-solaris2.[[01]])
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])
3357
AC_MSG_CHECKING([if we can read kmem])
3359
# the default is to enable it if the system has the capability
3361
case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
3369
*-*-domainos) # Won't be found...
3389
# --enable-kmem / --disable-kmem controls if present
3394
[s read /dev/kmem for tick and/or tickadj]
3399
AC_MSG_RESULT([$ans])
3407
AC_DEFINE(NOKMEM, 1, [Should we NOT read /dev/kmem?])
3411
AC_MSG_CHECKING([if adjtime is accurate])
3413
# target-dependent defaults
3422
mips-sgi-irix[[456]]*)
3434
*-*-solaris2.[[01]])
3446
# --enable-accurate-adjtime / --disable-accurate-adjtime
3447
# override the default
3448
AC_ARG_ENABLE([accurate-adjtime],
3450
[--enable-accurate-adjtime],
3451
[s the adjtime() call is accurate]
3456
AC_MSG_RESULT([$ans])
3460
AC_DEFINE(ADJTIME_IS_ACCURATE, 1, [Is adjtime() accurate?])
3461
adjtime_is_accurate=yes
3464
adjtime_is_accurate=no
3318
3467
AC_CACHE_CHECK([the name of 'tick' in the kernel],
3536
3685
dnl But we'll only use these "values" if we can't find anything else.
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']),
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'?]) ;;
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']),
3581
case "$ac_cv_var_adjtime_is_accurate" in
3582
yes) ans='tick/16' ;;
3592
case "$ac_cv_var_can_kmem" in
3596
*-*-domainos) # Skippy: won't be found...
3597
case "$ac_cv_var_can_kmem" in
3602
case "$ac_cv_var_adjtime_is_accurate" in
3603
yes) ans='tick/16' ;;
3616
case "$ac_cv_var_adjtime_is_accurate" in
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'])
3689
# target-dependent default for tick
3693
AC_MSG_ERROR([tick needs work for cygwin])
3721
[--enable-tick=VALUE],
3722
[s force a value for 'tick']
3727
AC_MSG_RESULT([$ans])
3730
''|no) ;; # HMS: I think we can only get 'no' here...
3731
*) AC_DEFINE_UNQUOTED(PRESET_TICK, [$ans], [Preset a value for 'tick'?]) ;;
3735
AC_MSG_CHECKING([for a default value for 'tickadj'])
3737
# target-specific default
3743
case "$adjtime_is_accurate" in
3760
*-*-domainos) # Skippy: won't be found...
3767
case "$adjtime_is_accurate" in
3791
[--enable-tickadj=VALUE],
3792
[s force a value for 'tickadj']
3797
AC_MSG_RESULT([$ans])
3799
default_tickadj=$ans
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'?]) ;;
3635
3806
# Newer versions of ReliantUNIX round adjtime() values down to
3765
3956
*) case "$host" in
3767
LDFLAGS="$LDFLAGS -r"
3958
LDFLAGS="$LDFLAGS -r"
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]),
3787
*-*-openvms*) # HMS: won't be found
3794
ac_cv_var_slew_always=$ans])
3795
case "$ac_cv_var_slew_always" in
3965
AC_MSG_CHECKING([if we should always slew the time])
3967
# target-specific defaults
3979
*-*-openvms*) # HMS: won't be found
3986
# --enable-slew-always / --disable-slew-always overrides default
3991
[--enable-slew-always],
3992
[s always slew the time]
3997
AC_MSG_RESULT([$ans])
3796
4000
yes) AC_DEFINE(SLEWALWAYS, 1, [Slew always?]) ;;
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]),
3813
*-*-solaris2.1[[0-9]]*)
3816
*-*-solaris2.[[012]]*)
3819
*-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
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])
4015
*-*-solaris2.1[[0-9]]*)
4018
*-*-solaris2.[[012]]*)
4021
*-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
4032
[--enable-step-slew],
4033
[s step and slew the time]
4038
AC_MSG_RESULT([$ans])
3828
4041
yes) AC_DEFINE(STEP_SLEW, 1, [Step, then slew the clock?]) ;;
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]),
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])
4056
[--enable-ntpdate-step],
4057
[s if ntpdate should step the time]
4062
AC_MSG_RESULT([$ans])
3845
4065
yes) AC_DEFINE(FORCE_NTPDATE_STEP, 1, [force ntpdate to step the clock if !defined(STEP_SLEW) ?]) ;;
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]),
3857
*-*-openvms*) # HMS: won't be found
3863
ac_cv_var_sync_todr=$ans])
4069
AC_MSG_CHECKING([if we should sync TODR clock every hour])
4075
*-*-openvms*) # HMS: won't be found
4085
[--enable-hourly-todr-sync],
4086
[s if we should sync TODR hourly]
4091
AC_MSG_RESULT([$ans])
3864
4093
case "$ac_cv_var_sync_todr" in
3865
4094
yes) AC_DEFINE(DOSYNCTODR, 1, [synch TODR hourly?]) ;;
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]),
3884
# Generic_105181-17 and higher
3904
# Generic_106541-07 and higher
3918
ac_cv_var_kernel_fll_bug=$ans])
3919
case "$ac_cv_var_kernel_fll_bug" in
4098
AC_MSG_CHECKING([if we should avoid kernel FLL bug])
4111
# Generic_105181-17 and higher
4131
# Generic_106541-07 and higher
4148
[--enable-kernel-fll-bug],
4149
[s if we should avoid a kernel FLL bug]
4154
AC_MSG_RESULT([$ans])
3920
4157
yes) AC_DEFINE(KERNEL_FLL_BUG, 1, [Does the kernel have an FLL bug?]) ;;
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]),
3929
*-*-solaris2.[[89]])
3932
*-*-solaris2.1[[0-9]]*)
3939
ac_cv_var_irig_sucks=$ans])
3940
case "$ac_cv_var_irig_sucks" in
4161
AC_MSG_CHECKING([if we should use the IRIG sawtooth filter])
4164
*-*-solaris2.[[89]])
4167
*-*-solaris2.1[[0-9]]*)
4176
[--enable-irig-sawtooth],
4177
[s if we should enable the IRIG sawtooth filter]
4182
AC_MSG_RESULT([$ans])
3941
4185
yes) AC_DEFINE(IRIG_SUCKS, 1, [Should we use the IRIG sawtooth filter?]) ;;
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
4189
AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
4195
[- if we should enable the NIST lockclock scheme]
4201
AC_MSG_RESULT([$ans])
3951
4204
yes) AC_DEFINE(LOCKCLOCK, 1, [Should we align with the NIST lockclock scheme?]) ;;
4208
AC_MSG_CHECKING([if we want support for Samba's signing daemon])
4213
[--enable-ntp-signd],
4214
[- Provide support for Samba's signing daemon, =/var/run/ntp_signd]
4220
AC_MSG_RESULT([$ans])
4227
ntp_signd_path=/var/run/ntp_signd
4230
ntp_signd_path="$ans"
4233
case "$ntp_signd_path" in
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])
4244
AC_MSG_CHECKING([if we want the windows symmetric client hack])
4246
# default is no, unless --enable-ntp-signd was given
4247
ans=$wintime_default
4248
unset wintime_default
4254
[- Provide the windows symmetric client hack]
4259
AC_MSG_RESULT([$ans])
4263
AC_DEFINE(WINTIME, ,[Do we want the windows symmetric client hack?])
4267
AC_CHECK_HEADERS(sys/clockctl.h)
4280
[--enable-clockctl],
4281
[s Use /dev/clockctl for non-root clock control]
4283
[ntp_use_dev_clockctl=$enableval],
4284
[ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h]
4287
AC_MSG_CHECKING([[if we should use /dev/clockctl]])
4288
AC_MSG_RESULT([$ntp_use_dev_clockctl])
4291
AC_CHECK_HEADERS([sys/capability.h])
4292
AC_CHECK_HEADERS([sys/prctl.h])
4294
AC_MSG_CHECKING([[if we have linux capabilities (libcap)]])
4296
case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
4298
ntp_have_linuxcaps=yes
4301
ntp_have_linuxcaps=no
4304
AC_MSG_RESULT([$ntp_have_linuxcaps])
4310
[--enable-linuxcaps],
4311
[+ Use Linux capabilities for non-root clock control]
4313
[ntp_have_linuxcaps=$enableval]
4317
case "$ntp_have_linuxcaps" in
4319
AC_DEFINE(HAVE_LINUX_CAPABILITIES, ,[[Do we have Linux capabilities?]])
4324
case "$ntp_use_dev_clockctl$ntp_have_linuxcaps" in
4326
AC_DEFINE(HAVE_DROPROOT, ,[[Can we drop root privileges?]])
4330
AC_CHECK_HEADERS([libscf.h])
4332
case "$ac_cv_header_libscf_h" in
4334
AC_SUBST(LSCF, [-lscf])
4339
AC_DEFINE(HAVE_SOLARIS_PRIVS, ,[[Are Solaris privileges available?]])
3977
AC_MSG_CHECKING(for IPv6 structures)
3979
#include <sys/types.h>
3980
#include <sys/socket.h>
3981
#include <netinet/in.h>],
3982
[struct sockaddr_in6 sin6; return (0);],
4368
[for IPv6 structures],
4369
ac_cv_isc_found_ipv6,
4375
#include <sys/types.h>
4376
#include <sys/socket.h>
4377
#include <netinet/in.h>
4380
struct sockaddr_in6 sin6;
4384
[ac_cv_isc_found_ipv6=yes],
4385
[ac_cv_isc_found_ipv6=no]
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.
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")
3997
4399
case "$use_kame" in
4001
kame_path=/usr/local/v6
4004
kame_path="$use_kame"
4403
kame_path=/usr/local/v6
4406
kame_path="$use_kame"
4008
4410
case "$use_kame" in
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"
4017
AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
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"
4419
AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
4019
4421
Please choose the proper path with the following command:
4021
4423
configure --with-kame=PATH
4033
4435
# netinet6/in6.h is needed for.
4035
4437
case "$host" in
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>"
4042
ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
4043
LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
4044
isc_netinet6in6_hack=""
4439
AC_DEFINE(ISC_PLATFORM_NEEDNETINET6IN6H, 1, [Do we need netinet6/in6.h?])
4440
isc_netinet6in6_hack="#include <netinet6/in6.h>"
4443
isc_netinet6in6_hack=""
4049
4447
# This is similar to the netinet6/in6.h issue.
4051
4449
case "$host" in
4052
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
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>"
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=""
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>"
4455
isc_netinetin6_hack=""
4068
AC_MSG_CHECKING([for struct if_laddrconf])
4070
#include <sys/types.h>
4071
#include <net/if6.h>
4072
],[ struct if_laddrconf a; ],
4074
AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRCONF, ,
4075
[ISC: have struct if_laddrconf?])],
4076
[AC_MSG_RESULT(no)])
4078
AC_MSG_CHECKING([for struct if_laddrreq])
4080
#include <sys/types.h>
4081
#include <net/if6.h>
4082
],[ struct if_laddrreq a; ],
4084
AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRREQ, ,
4085
[ISC: have struct if_laddrreq?])],
4086
[AC_MSG_RESULT(no)])
4088
case "$found_ipv6" in
4459
case "$ac_cv_isc_found_ipv6" in
4090
AC_DEFINE(ISC_PLATFORM_HAVEIPV6, ,[ISC: Have IPv6?])
4092
AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id], , ,
4094
#include <sys/types.h>
4095
#include <sys/socket.h>
4096
#include <netinet/in.h>
4097
$isc_netinetin6_hack
4098
$isc_netinet6in6_hack
4101
AC_MSG_CHECKING(for in6_pktinfo)
4103
#include <sys/types.h>
4104
#include <sys/socket.h>
4105
#include <netinet/in.h>
4106
$isc_netinetin6_hack
4107
$isc_netinet6in6_hack
4109
[struct in6_pktinfo xyzzy; return (0);],
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?])
4465
ac_cv_have_in6_pktinfo,
4471
#include <sys/types.h>
4472
#include <sys/socket.h>
4473
#include <netinet/in.h>
4474
$isc_netinetin6_hack
4475
$isc_netinet6in6_hack
4478
struct in6_pktinfo xyzzy;
4482
[ac_cv_have_in6_pktinfo=yes],
4483
[ac_cv_have_in6_pktinfo=no]
4488
case "$ac_cv_have_in6_pktinfo" in
4490
AC_DEFINE(ISC_PLATFORM_HAVEIN6PKTINFO, , [have struct in6_pktinfo?])
4115
4494
# HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
4116
AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
4118
#include <sys/types.h>
4119
#include <sys/socket.h>
4120
#include <netinet/in.h>
4121
$isc_netinetin6_hack
4122
$isc_netinet6in6_hack
4124
[struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
4126
AC_DEFINE(ISC_PLATFORM_HAVESCOPEID, ,
4127
[ISC: Have sin6_scope_id?])],
4128
result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
4130
ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
4131
result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
4132
LWRES_HAVE_SIN6_SCOPE_ID="$result"
4137
# We need this check run all the time...
4138
AC_MSG_CHECKING(for in6addr_any)
4140
#include <sys/types.h>
4141
#include <sys/socket.h>
4142
#include <netinet/in.h>
4143
$isc_netinetin6_hack
4144
$isc_netinet6in6_hack
4147
[[struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);]],
4148
[AC_MSG_RESULT(yes)],
4150
AC_DEFINE(ISC_PLATFORM_NEEDIN6ADDRANY, ,
4151
[ISC: Need in6addr_any?])]
4496
[for sockaddr_in6.sin6_scope_id],
4497
ac_cv_have_sin6_scope_id,
4503
#include <sys/types.h>
4504
#include <sys/socket.h>
4505
#include <netinet/in.h>
4506
$isc_netinetin6_hack
4507
$isc_netinet6in6_hack
4510
struct sockaddr_in6 xyzzy;
4511
xyzzy.sin6_scope_id = 0;
4515
[ac_cv_have_sin6_scope_id=yes],
4516
[ac_cv_have_sin6_scope_id=no]
4521
case "$ac_cv_have_sin6_scope_id" in
4523
AC_DEFINE(ISC_PLATFORM_HAVESCOPEID, , [have sin6_scope_id?])
4528
# We need this check run even without ac_cv_isc_found_ipv6=yes
4532
ac_cv_have_in6addr_any,
4538
#include <sys/types.h>
4539
#include <sys/socket.h>
4540
#include <netinet/in.h>
4541
$isc_netinetin6_hack
4542
$isc_netinet6in6_hack
4545
struct in6_addr in6;
4550
[ac_cv_have_in6addr_any=yes],
4551
[ac_cv_have_in6addr_any=no]
4556
case "$ac_cv_have_in6addr_any" in
4558
AC_DEFINE(ISC_PLATFORM_NEEDIN6ADDRANY, , [missing in6addr_any?])
4563
[for struct if_laddrconf],
4564
ac_cv_isc_struct_if_laddrconf,
4570
#include <sys/types.h>
4571
#include <net/if6.h>
4574
struct if_laddrconf a;
4578
[ac_cv_isc_struct_if_laddrconf=yes],
4579
[ac_cv_isc_struct_if_laddrconf=no]
4584
case "$ac_cv_isc_struct_if_laddrconf" in
4586
AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRCONF, , [have struct if_laddrconf?])
4590
[for struct if_laddrreq],
4591
ac_cv_isc_struct_if_laddrreq,
4597
#include <sys/types.h>
4598
#include <net/if6.h>
4601
struct if_laddrreq a;
4605
[ac_cv_isc_struct_if_laddrreq=yes],
4606
[ac_cv_isc_struct_if_laddrreq=no]
4611
case "$ac_cv_isc_struct_if_laddrreq" in
4613
AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRREQ, , [have struct if_laddrreq?])
4155
4617
# Look for a sysctl call to get the list of network interfaces.
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
4167
AC_DEFINE(HAVE_IFLIST_SYSCTL,1,[ISC: Use iflist_sysctl?])],
4168
[AC_MSG_RESULT(no)])
4620
[for interface list sysctl],
4621
ac_cv_iflist_sysctl,
4625
#include <sys/param.h>
4626
#include <sys/sysctl.h>
4627
#include <sys/socket.h>
4628
#ifdef NET_RT_IFLIST
4632
[ac_cv_iflist_sysctl=yes],
4633
[ac_cv_iflist_sysctl=no]
4637
case "$ac_cv_iflist_sysctl" in
4639
AC_DEFINE(HAVE_IFLIST_SYSCTL,1,[have iflist_sysctl?])
4172
4645
AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
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)