6348
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
6337
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
6349
6338
$as_echo_n "checking additional compiler flags... " >&6; }
6350
if test "${ac_cv_os_cflags+set}" = set; then :
6351
$as_echo_n "(cached) " >&6
6354
case "${host_os}" in
6358
# do not use 64-bit compiler
6359
ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84"
6363
# HMS: am-utils needed this but we don't (apparently)
6365
# # get the right version of struct sockaddr
6368
# ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO"
6371
# ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO"
6376
# # get the right version of struct sockaddr
6379
# ac_cv_os_cflags="-std -D_SOCKADDR_LEN"
6382
# ac_cv_os_cflags="-D_SOCKADDR_LEN"
6387
ac_cv_os_cflags="" ;;
6389
# turn on additional headers
6390
ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
6393
# avoid circular dependencies in yp headers, and more
6394
ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS -D_MSGQSUPPORT"
6397
# avoid circular dependencies in yp headers
6398
ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS"
6401
# make sure passing whole structures is handled in gcc
6404
ac_cv_os_cflags="-fpcc-struct-return"
6408
sunos[34]* | solaris1* | solaris2.[0-5] | sunos5.[0-5] | solaris2.5.* | sunos5.5.* )
6409
ac_cv_os_cflags="" ;;
6410
solaris2* | sunos5* )
6411
# turn on 64-bit file offset interface
6414
ac_cv_os_cflags="-D_LARGEFILE64_SOURCE"
6339
# allow ntp_os_flags to be preset to skip this stuff
6340
case "${ntp_os_cflags+set}" in
6349
# turn on additional headers
6350
ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
6353
# avoid circular dependencies in yp headers, and more
6354
ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
6355
ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
6358
# avoid circular dependencies in yp headers
6359
ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
6360
ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
6363
ntp_os_cflags="-DSYS_AMIGA"
6365
darwin*|macosx*|rhapsody*)
6366
ntp_os_cflags="-D_P1003_1B_VISIBLE"
6368
hpux10.*) # at least for hppa2.0-hp-hpux10.20
6373
# use Ansi compiler on HPUX, and some -Wp magic
6374
ntp_os_cflags="-Ae -Wp,-H18816"
6377
ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE"
6419
6384
# use Ansi compiler on HPUX
6422
ac_cv_os_cflags="-Ae"
6387
ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE"
6392
# do not use 64-bit compiler
6393
ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
6397
ntp_os_cflags="-posix"
6399
solaris1*|solaris2.[0-5]|solaris2.5.*)
6401
sunos[34]*|sunos5.[0-5]|sunos5.5.*)
6404
# turn on 64-bit file offset interface
6405
ntp_os_cflags="-D_LARGEFILE64_SOURCE"
6412
# Quick and dirty sanity check
6413
case "$VX_KERNEL" in
6415
as_fn_error "See html/build/hints/vxworks.html" "$LINENO" 5
6426
darwin* | macosx* | rhapsody* )
6427
ac_cv_os_cflags="-D_P1003_1B_VISIBLE"
6435
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cflags" >&5
6436
$as_echo "$ac_cv_os_cflags" >&6; }
6437
CFLAGS="$CFLAGS $ac_cv_os_cflags"
6417
ntp_os_cflags="-DSYS_VXWORKS"
6422
case "$ntp_os_flags" in
6424
ntp_os_cflags_msg="none needed"
6427
ntp_os_cflags_msg="$ntp_os_cflags"
6428
CFLAGS="$CFLAGS $ntp_os_cflags"
6430
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
6431
$as_echo "$ntp_os_cflags_msg" >&6; }
6432
{ ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
6440
6435
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
9451
9446
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_binsubdir" >&5
9452
9447
$as_echo "$use_binsubdir" >&6; }
9453
9449
BINSUBDIR=$use_binsubdir
9456
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use arlib" >&5
9457
$as_echo_n "checking if we want to use arlib... " >&6; }
9451
if test "bin" = "$BINSUBDIR"; then
9452
NTP_BINSUBDIR_IS_BIN_TRUE=
9453
NTP_BINSUBDIR_IS_BIN_FALSE='#'
9455
NTP_BINSUBDIR_IS_BIN_TRUE='#'
9456
NTP_BINSUBDIR_IS_BIN_FALSE=
9460
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
9461
$as_echo_n "checking for deprecated --with-arlib... " >&6; }
9459
9463
# Check whether --with-arlib was given.
9460
9464
if test "${with_arlib+set}" = set; then :
10153
10127
lt_cv_nm_interface="BSD nm"
10154
10128
echo "int some_variable = 0;" > conftest.$ac_ext
10155
(eval echo "\"\$as_me:10155: $ac_compile\"" >&5)
10129
(eval echo "\"\$as_me:10129: $ac_compile\"" >&5)
10156
10130
(eval "$ac_compile" 2>conftest.err)
10157
10131
cat conftest.err >&5
10158
(eval echo "\"\$as_me:10158: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
10132
(eval echo "\"\$as_me:10132: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
10159
10133
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
10160
10134
cat conftest.err >&5
10161
(eval echo "\"\$as_me:10161: output\"" >&5)
10135
(eval echo "\"\$as_me:10135: output\"" >&5)
10162
10136
cat conftest.out >&5
10163
10137
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
10164
10138
lt_cv_nm_interface="MS dumpbin"
12595
12569
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12596
12570
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12597
12571
-e 's:$: $lt_compiler_flag:'`
12598
(eval echo "\"\$as_me:12598: $lt_compile\"" >&5)
12572
(eval echo "\"\$as_me:12572: $lt_compile\"" >&5)
12599
12573
(eval "$lt_compile" 2>conftest.err)
12601
12575
cat conftest.err >&5
12602
echo "$as_me:12602: \$? = $ac_status" >&5
12576
echo "$as_me:12576: \$? = $ac_status" >&5
12603
12577
if (exit $ac_status) && test -s "$ac_outfile"; then
12604
12578
# The compiler can only warn and ignore the option if not recognized
12605
12579
# So say no if there are warnings other than the usual output.
12934
12908
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12935
12909
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12936
12910
-e 's:$: $lt_compiler_flag:'`
12937
(eval echo "\"\$as_me:12937: $lt_compile\"" >&5)
12911
(eval echo "\"\$as_me:12911: $lt_compile\"" >&5)
12938
12912
(eval "$lt_compile" 2>conftest.err)
12940
12914
cat conftest.err >&5
12941
echo "$as_me:12941: \$? = $ac_status" >&5
12915
echo "$as_me:12915: \$? = $ac_status" >&5
12942
12916
if (exit $ac_status) && test -s "$ac_outfile"; then
12943
12917
# The compiler can only warn and ignore the option if not recognized
12944
12918
# So say no if there are warnings other than the usual output.
13039
13013
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13040
13014
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13041
13015
-e 's:$: $lt_compiler_flag:'`
13042
(eval echo "\"\$as_me:13042: $lt_compile\"" >&5)
13016
(eval echo "\"\$as_me:13016: $lt_compile\"" >&5)
13043
13017
(eval "$lt_compile" 2>out/conftest.err)
13045
13019
cat out/conftest.err >&5
13046
echo "$as_me:13046: \$? = $ac_status" >&5
13020
echo "$as_me:13020: \$? = $ac_status" >&5
13047
13021
if (exit $ac_status) && test -s out/conftest2.$ac_objext
13049
13023
# The compiler can only warn and ignore the option if not recognized
13094
13068
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13095
13069
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13096
13070
-e 's:$: $lt_compiler_flag:'`
13097
(eval echo "\"\$as_me:13097: $lt_compile\"" >&5)
13071
(eval echo "\"\$as_me:13071: $lt_compile\"" >&5)
13098
13072
(eval "$lt_compile" 2>out/conftest.err)
13100
13074
cat out/conftest.err >&5
13101
echo "$as_me:13101: \$? = $ac_status" >&5
13075
echo "$as_me:13075: \$? = $ac_status" >&5
13102
13076
if (exit $ac_status) && test -s out/conftest2.$ac_objext
13104
13078
# The compiler can only warn and ignore the option if not recognized
16797
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_9_init in -lresolv" >&5
16798
$as_echo_n "checking for res_9_init in -lresolv... " >&6; }
16799
if test "${ac_cv_lib_resolv_res_9_init+set}" = set; then :
16800
$as_echo_n "(cached) " >&6
16802
ac_check_lib_save_LIBS=$LIBS
16803
LIBS="-lresolv $LIBS"
16804
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16805
/* end confdefs.h. */
16807
/* Override any GCC internal prototype to avoid an error.
16808
Use char because int might match the return type of a GCC
16809
builtin and then its argument prototype would still apply. */
16813
char res_9_init ();
16817
return res_9_init ();
16822
if ac_fn_c_try_link "$LINENO"; then :
16823
ac_cv_lib_resolv_res_9_init=yes
16825
ac_cv_lib_resolv_res_9_init=no
16827
rm -f core conftest.err conftest.$ac_objext \
16828
conftest$ac_exeext conftest.$ac_ext
16829
LIBS=$ac_check_lib_save_LIBS
16831
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_9_init" >&5
16832
$as_echo "$ac_cv_lib_resolv_res_9_init" >&6; }
16833
if test "x$ac_cv_lib_resolv_res_9_init" = x""yes; then :
16834
cat >>confdefs.h <<_ACEOF
16835
#define HAVE_LIBRESOLV 1
16838
LIBS="-lresolv $LIBS"
16844
for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
16846
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16847
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
16848
# include <sys/types.h>
16850
#ifdef HAVE_NETINET_IN_H
16851
# include <netinet/in.h> /* inet_ functions / structs */
16853
#ifdef HAVE_ARPA_NAMESER_H
16854
# include <arpa/nameser.h> /* DNS HEADER struct */
16856
#ifdef HAVE_NETDB_H
16857
# include <netdb.h>
16860
eval as_val=\$$as_ac_Header
16861
if test "x$as_val" = x""yes; then :
16862
cat >>confdefs.h <<_ACEOF
16863
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16821
16871
for ac_func in res_init __res_init
16823
16873
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21623
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel multicast support" >&5
21624
$as_echo_n "checking for kernel multicast support... " >&6; }
21625
if test "${ac_cv_var_mcast+set}" = set; then :
21674
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
21675
$as_echo_n "checking for multicast IP support... " >&6; }
21676
if test "${ntp_cv_multicast+set}" = set; then :
21626
21677
$as_echo_n "(cached) " >&6
21630
i386-sequent-sysv4) ;;
21631
*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21680
ntp_cv_multicast=no
21682
i386-sequent-sysv4)
21685
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21632
21686
/* end confdefs.h. */
21633
#include <netinet/in.h>
21634
#ifdef IP_ADD_MEMBERSHIP
21688
#ifdef HAVE_NETINET_IN_H
21689
#include <netinet/in.h>
21696
struct ip_mreq ipmr;
21697
ipmr.imr_interface.s_addr = 0;
21639
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21640
$EGREP "yes" >/dev/null 2>&1; then :
21641
ac_cv_var_mcast=yes
21647
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_mcast" >&5
21648
$as_echo "$ac_cv_var_mcast" >&6; }
21649
case "$ac_cv_var_mcast" in
21704
if ac_fn_c_try_compile "$LINENO"; then :
21705
ntp_cv_multicast=yes
21707
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21712
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
21713
$as_echo "$ntp_cv_multicast" >&6; }
21715
case "$ntp_cv_multicast" in
21652
21718
$as_echo "#define MCAST 1" >>confdefs.h
21654
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for IP*_MULTICAST_LOOP for setsockopt()" >&5
21655
$as_echo_n "checking arg type needed for IP*_MULTICAST_LOOP for setsockopt()... " >&6; }
21656
if test "${ac_cv_var_typeof_ip_multicast_loop+set}" = set; then :
21720
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
21721
$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
21722
if test "${ntp_cv_typeof_ip_multicast_loop+set}" = set; then :
21657
21723
$as_echo_n "(cached) " >&6
21660
*-*-netbsd*|*-*-*linux*)
21661
ac_cv_var_typeof_ip_multicast_loop=u_int
21664
ac_cv_var_typeof_ip_multicast_loop=BOOL
21666
*) ac_cv_var_typeof_ip_multicast_loop=u_char
21727
*-*-netbsd*|*-*-*linux*)
21728
ntp_cv_typeof_ip_multicast_loop=u_int
21731
ntp_cv_typeof_ip_multicast_loop=BOOL
21734
ntp_cv_typeof_ip_multicast_loop=u_char
21670
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_typeof_ip_multicast_loop" >&5
21671
$as_echo "$ac_cv_var_typeof_ip_multicast_loop" >&6; }
21739
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
21740
$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
21673
21742
cat >>confdefs.h <<_ACEOF
21674
#define TYPEOF_IP_MULTICAST_LOOP $ac_cv_var_typeof_ip_multicast_loop
21743
#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
21680
21748
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking availability of ntp_{adj,get}time()" >&5
23345
# OpenSSL has a number of callback prototypes inside other function
23346
# prototypes which trigger copious warnings with -Wstrict-prototypes,
23347
# (which is included in -Wall).
23413
# Older OpenSSL headers have a number of callback prototypes inside
23414
# other function prototypes which trigger copious warnings with gcc's
23415
# -Wstrict-prototypes, which is included in -Wall.
23349
23417
# An example:
23351
23419
# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
23352
# int (*cb)(), int sgckey);
23355
# The OpenSSL headers probably haven't been fixed in this regard
23356
# due to the hoops you have to jump through to stay compatible with
23420
# int (*cb)(), int sgckey);
23425
openssl_triggers_warnings=unknown
23426
SAVED_CFLAGS="$CFLAGS"
23359
23428
case "$GCC$ntp_openssl" in
23361
CFLAGS="$CFLAGS -Wno-strict-prototypes"
23430
CFLAGS="$CFLAGS -Werror"
23431
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23432
/* end confdefs.h. */
23433
/* see if -Werror breaks gcc */
23435
if ac_fn_c_try_compile "$LINENO"; then :
23436
gcc_handles_Werror=yes
23438
gcc_handles_Werror=no
23441
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23442
case "$gcc_handles_Werror" in
23444
# if this gcc doesn't do -Werror go ahead and use
23445
# -Wstrict-prototypes.
23446
openssl_triggers_warnings=yes
23449
CFLAGS="$CFLAGS -Wstrict-prototypes"
23450
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23451
/* end confdefs.h. */
23453
#include "openssl/asn1_mac.h"
23454
#include "openssl/bn.h"
23455
#include "openssl/err.h"
23456
#include "openssl/evp.h"
23457
#include "openssl/pem.h"
23458
#include "openssl/rand.h"
23459
#include "openssl/x509v3.h"
23470
if ac_fn_c_try_compile "$LINENO"; then :
23471
openssl_triggers_warnings=no
23473
openssl_triggers_warnings=yes
23476
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23478
case "$openssl_triggers_warnings" in
23480
CFLAGS="$SAVED_CFLAGS -Wno-strict-prototypes"
23483
CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
23487
# gcc without OpenSSL
23488
CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
23364
23491
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to compile with ElectricFence" >&5