6337
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
6326
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
6338
6327
$as_echo_n "checking additional compiler flags... " >&6; }
6339
if test "${ac_cv_os_cflags+set}" = set; then :
6340
$as_echo_n "(cached) " >&6
6343
case "${host_os}" in
6347
# do not use 64-bit compiler
6348
ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84"
6352
# HMS: am-utils needed this but we don't (apparently)
6354
# # get the right version of struct sockaddr
6357
# ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO"
6360
# ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO"
6365
# # get the right version of struct sockaddr
6368
# ac_cv_os_cflags="-std -D_SOCKADDR_LEN"
6371
# ac_cv_os_cflags="-D_SOCKADDR_LEN"
6376
ac_cv_os_cflags="" ;;
6378
# turn on additional headers
6379
ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
6382
# avoid circular dependencies in yp headers, and more
6383
ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS -D_MSGQSUPPORT"
6386
# avoid circular dependencies in yp headers
6387
ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS"
6390
# make sure passing whole structures is handled in gcc
6393
ac_cv_os_cflags="-fpcc-struct-return"
6397
sunos[34]* | solaris1* | solaris2.[0-5] | sunos5.[0-5] | solaris2.5.* | sunos5.5.* )
6398
ac_cv_os_cflags="" ;;
6399
solaris2* | sunos5* )
6400
# turn on 64-bit file offset interface
6403
ac_cv_os_cflags="-D_LARGEFILE64_SOURCE"
6328
# allow ntp_os_flags to be preset to skip this stuff
6329
case "${ntp_os_cflags+set}" in
6338
# turn on additional headers
6339
ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
6342
# avoid circular dependencies in yp headers, and more
6343
ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
6344
ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
6347
# avoid circular dependencies in yp headers
6348
ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
6349
ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
6352
ntp_os_cflags="-DSYS_AMIGA"
6354
darwin*|macosx*|rhapsody*)
6355
ntp_os_cflags="-D_P1003_1B_VISIBLE"
6357
hpux10.*) # at least for hppa2.0-hp-hpux10.20
6362
# use Ansi compiler on HPUX, and some -Wp magic
6363
ntp_os_cflags="-Ae -Wp,-H18816"
6366
ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE"
6408
6373
# use Ansi compiler on HPUX
6411
ac_cv_os_cflags="-Ae"
6376
ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE"
6381
# do not use 64-bit compiler
6382
ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
6386
ntp_os_cflags="-posix"
6388
solaris1*|solaris2.[0-5]|solaris2.5.*)
6390
sunos[34]*|sunos5.[0-5]|sunos5.5.*)
6393
# turn on 64-bit file offset interface
6394
ntp_os_cflags="-D_LARGEFILE64_SOURCE"
6401
# Quick and dirty sanity check
6402
case "$VX_KERNEL" in
6404
as_fn_error "See html/build/hints/vxworks.html" "$LINENO" 5
6415
darwin* | macosx* | rhapsody* )
6416
ac_cv_os_cflags="-D_P1003_1B_VISIBLE"
6424
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cflags" >&5
6425
$as_echo "$ac_cv_os_cflags" >&6; }
6426
CFLAGS="$CFLAGS $ac_cv_os_cflags"
6406
ntp_os_cflags="-DSYS_VXWORKS"
6411
case "$ntp_os_flags" in
6413
ntp_os_cflags_msg="none needed"
6416
ntp_os_cflags_msg="$ntp_os_cflags"
6417
CFLAGS="$CFLAGS $ntp_os_cflags"
6419
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
6420
$as_echo "$ntp_os_cflags_msg" >&6; }
6421
{ ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
6429
6424
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
9440
9435
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_binsubdir" >&5
9441
9436
$as_echo "$use_binsubdir" >&6; }
9442
9438
BINSUBDIR=$use_binsubdir
9445
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use arlib" >&5
9446
$as_echo_n "checking if we want to use arlib... " >&6; }
9440
if test "bin" = "$BINSUBDIR"; then
9441
NTP_BINSUBDIR_IS_BIN_TRUE=
9442
NTP_BINSUBDIR_IS_BIN_FALSE='#'
9444
NTP_BINSUBDIR_IS_BIN_TRUE='#'
9445
NTP_BINSUBDIR_IS_BIN_FALSE=
9449
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
9450
$as_echo_n "checking for deprecated --with-arlib... " >&6; }
9448
9452
# Check whether --with-arlib was given.
9449
9453
if test "${with_arlib+set}" = set; then :
11307
11281
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11308
11282
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11309
11283
-e 's:$: $lt_compiler_flag:'`
11310
(eval echo "\"\$as_me:11310: $lt_compile\"" >&5)
11284
(eval echo "\"\$as_me:11284: $lt_compile\"" >&5)
11311
11285
(eval "$lt_compile" 2>conftest.err)
11313
11287
cat conftest.err >&5
11314
echo "$as_me:11314: \$? = $ac_status" >&5
11288
echo "$as_me:11288: \$? = $ac_status" >&5
11315
11289
if (exit $ac_status) && test -s "$ac_outfile"; then
11316
11290
# The compiler can only warn and ignore the option if not recognized
11317
11291
# So say no if there are warnings other than the usual output.
11569
11543
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11570
11544
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11571
11545
-e 's:$: $lt_compiler_flag:'`
11572
(eval echo "\"\$as_me:11572: $lt_compile\"" >&5)
11546
(eval echo "\"\$as_me:11546: $lt_compile\"" >&5)
11573
11547
(eval "$lt_compile" 2>conftest.err)
11575
11549
cat conftest.err >&5
11576
echo "$as_me:11576: \$? = $ac_status" >&5
11550
echo "$as_me:11550: \$? = $ac_status" >&5
11577
11551
if (exit $ac_status) && test -s "$ac_outfile"; then
11578
11552
# The compiler can only warn and ignore the option if not recognized
11579
11553
# So say no if there are warnings other than the usual output.
11631
11605
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11632
11606
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11633
11607
-e 's:$: $lt_compiler_flag:'`
11634
(eval echo "\"\$as_me:11634: $lt_compile\"" >&5)
11608
(eval echo "\"\$as_me:11608: $lt_compile\"" >&5)
11635
11609
(eval "$lt_compile" 2>out/conftest.err)
11637
11611
cat out/conftest.err >&5
11638
echo "$as_me:11638: \$? = $ac_status" >&5
11612
echo "$as_me:11612: \$? = $ac_status" >&5
11639
11613
if (exit $ac_status) && test -s out/conftest2.$ac_objext
11641
11615
# The compiler can only warn and ignore the option if not recognized
14380
14354
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14381
14355
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14382
14356
-e 's:$: $lt_compiler_flag:'`
14383
(eval echo "\"\$as_me:14383: $lt_compile\"" >&5)
14357
(eval echo "\"\$as_me:14357: $lt_compile\"" >&5)
14384
14358
(eval "$lt_compile" 2>conftest.err)
14386
14360
cat conftest.err >&5
14387
echo "$as_me:14387: \$? = $ac_status" >&5
14361
echo "$as_me:14361: \$? = $ac_status" >&5
14388
14362
if (exit $ac_status) && test -s "$ac_outfile"; then
14389
14363
# The compiler can only warn and ignore the option if not recognized
14390
14364
# So say no if there are warnings other than the usual output.
14642
14616
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14643
14617
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14644
14618
-e 's:$: $lt_compiler_flag:'`
14645
(eval echo "\"\$as_me:14645: $lt_compile\"" >&5)
14619
(eval echo "\"\$as_me:14619: $lt_compile\"" >&5)
14646
14620
(eval "$lt_compile" 2>conftest.err)
14648
14622
cat conftest.err >&5
14649
echo "$as_me:14649: \$? = $ac_status" >&5
14623
echo "$as_me:14623: \$? = $ac_status" >&5
14650
14624
if (exit $ac_status) && test -s "$ac_outfile"; then
14651
14625
# The compiler can only warn and ignore the option if not recognized
14652
14626
# So say no if there are warnings other than the usual output.
14704
14678
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14705
14679
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14706
14680
-e 's:$: $lt_compiler_flag:'`
14707
(eval echo "\"\$as_me:14707: $lt_compile\"" >&5)
14681
(eval echo "\"\$as_me:14681: $lt_compile\"" >&5)
14708
14682
(eval "$lt_compile" 2>out/conftest.err)
14710
14684
cat out/conftest.err >&5
14711
echo "$as_me:14711: \$? = $ac_status" >&5
14685
echo "$as_me:14685: \$? = $ac_status" >&5
14712
14686
if (exit $ac_status) && test -s out/conftest2.$ac_objext
14714
14688
# The compiler can only warn and ignore the option if not recognized
18704
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_9_init in -lresolv" >&5
18705
$as_echo_n "checking for res_9_init in -lresolv... " >&6; }
18706
if test "${ac_cv_lib_resolv_res_9_init+set}" = set; then :
18707
$as_echo_n "(cached) " >&6
18709
ac_check_lib_save_LIBS=$LIBS
18710
LIBS="-lresolv $LIBS"
18711
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18712
/* end confdefs.h. */
18714
/* Override any GCC internal prototype to avoid an error.
18715
Use char because int might match the return type of a GCC
18716
builtin and then its argument prototype would still apply. */
18720
char res_9_init ();
18724
return res_9_init ();
18729
if ac_fn_c_try_link "$LINENO"; then :
18730
ac_cv_lib_resolv_res_9_init=yes
18732
ac_cv_lib_resolv_res_9_init=no
18734
rm -f core conftest.err conftest.$ac_objext \
18735
conftest$ac_exeext conftest.$ac_ext
18736
LIBS=$ac_check_lib_save_LIBS
18738
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_9_init" >&5
18739
$as_echo "$ac_cv_lib_resolv_res_9_init" >&6; }
18740
if test "x$ac_cv_lib_resolv_res_9_init" = x""yes; then :
18741
cat >>confdefs.h <<_ACEOF
18742
#define HAVE_LIBRESOLV 1
18745
LIBS="-lresolv $LIBS"
18751
for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
18753
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18754
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
18755
# include <sys/types.h>
18757
#ifdef HAVE_NETINET_IN_H
18758
# include <netinet/in.h> /* inet_ functions / structs */
18760
#ifdef HAVE_ARPA_NAMESER_H
18761
# include <arpa/nameser.h> /* DNS HEADER struct */
18763
#ifdef HAVE_NETDB_H
18764
# include <netdb.h>
18767
eval as_val=\$$as_ac_Header
18768
if test "x$as_val" = x""yes; then :
18769
cat >>confdefs.h <<_ACEOF
18770
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18728
18778
for ac_func in res_init __res_init
18730
18780
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23518
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel multicast support" >&5
23519
$as_echo_n "checking for kernel multicast support... " >&6; }
23520
if test "${ac_cv_var_mcast+set}" = set; then :
23581
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
23582
$as_echo_n "checking for multicast IP support... " >&6; }
23583
if test "${ntp_cv_multicast+set}" = set; then :
23521
23584
$as_echo_n "(cached) " >&6
23525
i386-sequent-sysv4) ;;
23526
*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23587
ntp_cv_multicast=no
23589
i386-sequent-sysv4)
23592
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23527
23593
/* end confdefs.h. */
23528
#include <netinet/in.h>
23529
#ifdef IP_ADD_MEMBERSHIP
23595
#ifdef HAVE_NETINET_IN_H
23596
#include <netinet/in.h>
23603
struct ip_mreq ipmr;
23604
ipmr.imr_interface.s_addr = 0;
23534
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23535
$EGREP "yes" >/dev/null 2>&1; then :
23536
ac_cv_var_mcast=yes
23542
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_mcast" >&5
23543
$as_echo "$ac_cv_var_mcast" >&6; }
23544
case "$ac_cv_var_mcast" in
23611
if ac_fn_c_try_compile "$LINENO"; then :
23612
ntp_cv_multicast=yes
23614
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23619
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
23620
$as_echo "$ntp_cv_multicast" >&6; }
23622
case "$ntp_cv_multicast" in
23547
23625
$as_echo "#define MCAST 1" >>confdefs.h
23549
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for IP*_MULTICAST_LOOP for setsockopt()" >&5
23550
$as_echo_n "checking arg type needed for IP*_MULTICAST_LOOP for setsockopt()... " >&6; }
23551
if test "${ac_cv_var_typeof_ip_multicast_loop+set}" = set; then :
23627
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
23628
$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
23629
if test "${ntp_cv_typeof_ip_multicast_loop+set}" = set; then :
23552
23630
$as_echo_n "(cached) " >&6
23555
*-*-netbsd*|*-*-*linux*)
23556
ac_cv_var_typeof_ip_multicast_loop=u_int
23559
ac_cv_var_typeof_ip_multicast_loop=BOOL
23561
*) ac_cv_var_typeof_ip_multicast_loop=u_char
23634
*-*-netbsd*|*-*-*linux*)
23635
ntp_cv_typeof_ip_multicast_loop=u_int
23638
ntp_cv_typeof_ip_multicast_loop=BOOL
23641
ntp_cv_typeof_ip_multicast_loop=u_char
23565
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_typeof_ip_multicast_loop" >&5
23566
$as_echo "$ac_cv_var_typeof_ip_multicast_loop" >&6; }
23646
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
23647
$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
23568
23649
cat >>confdefs.h <<_ACEOF
23569
#define TYPEOF_IP_MULTICAST_LOOP $ac_cv_var_typeof_ip_multicast_loop
23650
#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
23575
23655
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking availability of ntp_{adj,get}time()" >&5
25280
# OpenSSL has a number of callback prototypes inside other function
25281
# prototypes which trigger copious warnings with -Wstrict-prototypes,
25282
# (which is included in -Wall).
25360
# Older OpenSSL headers have a number of callback prototypes inside
25361
# other function prototypes which trigger copious warnings with gcc's
25362
# -Wstrict-prototypes, which is included in -Wall.
25284
25364
# An example:
25286
25366
# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
25287
# int (*cb)(), int sgckey);
25290
# The OpenSSL headers probably haven't been fixed in this regard
25291
# due to the hoops you have to jump through to stay compatible with
25367
# int (*cb)(), int sgckey);
25372
openssl_triggers_warnings=unknown
25373
SAVED_CFLAGS="$CFLAGS"
25294
25375
case "$GCC$ntp_openssl" in
25296
CFLAGS="$CFLAGS -Wno-strict-prototypes"
25377
CFLAGS="$CFLAGS -Werror"
25378
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25379
/* end confdefs.h. */
25380
/* see if -Werror breaks gcc */
25382
if ac_fn_c_try_compile "$LINENO"; then :
25383
gcc_handles_Werror=yes
25385
gcc_handles_Werror=no
25388
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25389
case "$gcc_handles_Werror" in
25391
# if this gcc doesn't do -Werror go ahead and use
25392
# -Wstrict-prototypes.
25393
openssl_triggers_warnings=yes
25396
CFLAGS="$CFLAGS -Wstrict-prototypes"
25397
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25398
/* end confdefs.h. */
25400
#include "openssl/asn1_mac.h"
25401
#include "openssl/bn.h"
25402
#include "openssl/err.h"
25403
#include "openssl/evp.h"
25404
#include "openssl/pem.h"
25405
#include "openssl/rand.h"
25406
#include "openssl/x509v3.h"
25417
if ac_fn_c_try_compile "$LINENO"; then :
25418
openssl_triggers_warnings=no
25420
openssl_triggers_warnings=yes
25423
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25425
case "$openssl_triggers_warnings" in
25427
CFLAGS="$SAVED_CFLAGS -Wno-strict-prototypes"
25430
CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
25434
# gcc without OpenSSL
25435
CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
25299
25438
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to compile with ElectricFence" >&5