aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2726
1 files changed, 1553 insertions, 1173 deletions
diff --git a/configure b/configure
index 5d09904bea03..5172c2d5521f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for ntp 4.2.8p17.
+# Generated by GNU Autoconf 2.71 for ntp 4.2.8p18.
#
# Report bugs to <https://bugs.ntp.org/>.
#
@@ -183,7 +183,6 @@ test -x / || exit 1"
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1
test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
@@ -191,7 +190,8 @@ test \$(( 1 + 1 )) = 2 || exit 1
ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
PATH=/empty FPATH=/empty; export PATH FPATH
test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
- || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
if (eval "$as_required") 2>/dev/null
then :
as_have_required=yes
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ntp'
PACKAGE_TARNAME='ntp'
-PACKAGE_VERSION='4.2.8p17'
-PACKAGE_STRING='ntp 4.2.8p17'
+PACKAGE_VERSION='4.2.8p18'
+PACKAGE_STRING='ntp 4.2.8p18'
PACKAGE_BUGREPORT='https://bugs.ntp.org/'
PACKAGE_URL='https://www.ntp.org/'
@@ -698,7 +698,6 @@ MAKE_PARSEKMODULE
DCFD
TESTDCF
MAKE_CHECK_LAYOUT
-VER_SUFFIX
MAKE_CHECK_Y2K
MAKE_LIBPARSE_KERNEL
MAKE_LIBPARSE
@@ -710,6 +709,10 @@ PATH_NET_SNMP_CONFIG
CONFIG_SHELL
PATH_TEST
PATH_PERL
+PATH_OPENSSL
+VER_SUFFIX
+LIBNTP_SUBMAKES_FALSE
+LIBNTP_SUBMAKES_TRUE
LIBOBJS
PTHREADS_FALSE
PTHREADS_TRUE
@@ -759,6 +762,8 @@ ac_ct_DUMPBIN
DUMPBIN
LD
FGREP
+EGREP
+GREP
SED
LIBTOOL
ac_ct_AR
@@ -857,14 +862,12 @@ NTP_HARD_CPPFLAGS
NTP_HARD_CFLAGS
YFLAGS
YACC
+CPP
LDFLAGS_NTP
LDADD_NTP
CPPFLAGS_NTP
CFLAGS_NTP
CC_NOFORMAT
-EGREP
-GREP
-CPP
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -968,6 +971,7 @@ plot_summary_opts'
ac_user_opts='
enable_option_checking
enable_silent_rules
+enable_build_framework_help
enable_dependency_tracking
with_hardenfile
with_locfile
@@ -995,7 +999,11 @@ enable_linuxcaps
enable_solarisprivs
enable_trustedbsd_mac
enable_signalled_io
-with_arlib
+with_crypto
+with_openssl_libdir
+with_openssl_incdir
+enable_verbose_ssl
+enable_openssl_random
with_net_snmp_config
enable_libseccomp
with_stack_limit
@@ -1057,11 +1065,6 @@ enable_TRIMTSIP
enable_WHARTON
enable_VARITEXT
enable_SEL240X
-with_crypto
-with_openssl_libdir
-with_openssl_incdir
-with_rpath
-enable_openssl_random
enable_autokey
enable_kmem
enable_accurate_adjtime
@@ -1651,7 +1654,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ntp 4.2.8p17 to adapt to many kinds of systems.
+\`configure' configures ntp 4.2.8p18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1722,7 +1725,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ntp 4.2.8p17:";;
+ short | recursive ) echo "Configuration of ntp 4.2.8p18:";;
esac
cat <<\_ACEOF
@@ -1734,6 +1737,8 @@ Optional Features and Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-build-framework-help
+ + enable build framework help
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
@@ -1765,14 +1770,20 @@ Optional Features and Packages:
--enable-thread-support s use threads (+ if available)
--with-threads with threads [auto]
--with-yielding-select with yielding select [auto]
- --enable-c99-snprintf s force replacement
+ --enable-c99-snprintf s use replacement printf family
--enable-clockctl s Use /dev/clockctl for non-root clock control
--enable-linuxcaps + Use Linux capabilities for non-root clock control
--enable-solarisprivs + Use Solaris privileges for non-root clock control
--enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock
control
--enable-signalled-io s Use signalled IO if we can
- --with-arlib - deprecated, arlib not distributed
+ --with-crypto + =openssl,libcrypto
+ --with-openssl-libdir + =/something/reasonable
+
+ --with-openssl-incdir + =search likely dirs
+
+ --enable-verbose-ssl - show crypto lib detection details
+ --enable-openssl-random + Use SSL lib's secure random numbers
--with-net-snmp-config + =net-snmp-config
--enable-libseccomp EXPERIMENTAL: enable support for libseccomp
sandboxing (default is no)
@@ -1837,16 +1848,6 @@ Optional Features and Packages:
--enable-WHARTON s WHARTON 400A Series clock
--enable-VARITEXT s VARITEXT clock
--enable-SEL240X s SEL240X clock
- --with-crypto + =openssl,libcrypto
-
- --with-openssl-libdir + =/something/reasonable
-
- --with-openssl-incdir + =/something/reasonable
-
- --without-rpath s Disable auto-added -R linker paths
-
- --enable-openssl-random Use OpenSSL's crypto random number functions, if
- available (default is yes)
--enable-autokey + support NTP Autokey protocol
--enable-kmem s read /dev/kmem for tick and/or tickadj
--enable-accurate-adjtime
@@ -1967,7 +1968,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ntp configure 4.2.8p17
+ntp configure 4.2.8p18
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2053,44 +2054,6 @@ printf "%s\n" "$ac_res" >&6; }
} # ac_fn_c_check_header_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }
-then :
- ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -2181,6 +2144,44 @@ fi
} # ac_fn_c_try_run
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2624,7 +2625,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ntp $as_me 4.2.8p17, which was
+It was created by ntp $as_me 4.2.8p18, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3218,7 +3219,6 @@ as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
as_fn_append ac_func_c_list " fork HAVE_FORK"
as_fn_append ac_func_c_list " vfork HAVE_VFORK"
-as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
as_fn_append ac_header_c_list " stdarg.h stdarg_h HAVE_STDARG_H"
# Auxiliary files required by this configure script.
@@ -3420,7 +3420,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-ntp_configure_cache_version=20230326
+ntp_configure_cache_version=20240218
# When the cache version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
@@ -4039,7 +4039,7 @@ fi
# Define the identity of the package.
PACKAGE='ntp'
- VERSION='4.2.8p17'
+ VERSION='4.2.8p18'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -4266,6 +4266,25 @@ printf "%s\n" "#define STR_SYSTEM \"$host\"" >>confdefs.h
ac_config_headers="$ac_config_headers config.h"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should enable build framework help" >&5
+printf %s "checking if we should enable build framework help... " >&6; }
+# Check whether --enable-build-framework-help was given.
+if test ${enable_build_framework_help+y}
+then :
+ enableval=$enable_build_framework_help; ntp_ok=$enableval
+else $as_nop
+ ntp_ok=yes
+
+fi
+
+case "$ntp_ok" in
+ yes)
+ ntp_cv_build_framework_help=yes ;;
+ *) ntp_cv_build_framework_help=no ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
+
ntp_atom_ok=${ntp_atom_ok=no}
ntp_oncore_ok=${ntp_oncore_ok=no}
ntp_parse_ok=${ntp_parse_ok=no}
@@ -5221,6 +5240,7 @@ fi
+
ac_header= ac_cache=
for ac_item in $ac_header_c_list
do
@@ -5392,333 +5412,7 @@ then :
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-printf %s "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test ${ac_cv_prog_CPP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- # Double quotes because $CC needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-
-else $as_nop
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
- # Broken: success on invalid input.
-continue
-else $as_nop
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok
-then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-printf "%s\n" "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-
-else $as_nop
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
- # Broken: success on invalid input.
-continue
-else $as_nop
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok
-then :
-
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-printf %s "checking for grep that handles long lines and -e... " >&6; }
-if test ${ac_cv_path_GREP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_prog in grep ggrep
- do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- printf %s 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- printf "%s\n" 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-printf "%s\n" "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-printf %s "checking for egrep... " >&6; }
-if test ${ac_cv_path_EGREP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_prog in egrep
- do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- printf %s 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- printf "%s\n" 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-printf "%s\n" "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-
-
-
-
-
-# Ralf Wildenhues: With per-target flags we need CC_C_O
-# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
-
-if test $ac_cv_c_compiler_gnu = yes; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-printf %s "checking whether $CC needs -traditional... " >&6; }
-if test ${ac_cv_prog_gcc_traditional+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- ac_pattern="Autoconf.*'x'"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sgtty.h>
-Autoconf TIOCGETP
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1
-then :
- ac_cv_prog_gcc_traditional=yes
-else $as_nop
- ac_cv_prog_gcc_traditional=no
-fi
-rm -rf conftest*
-
-
- if test $ac_cv_prog_gcc_traditional = no; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <termio.h>
-Autoconf TCGETA
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1
-then :
- ac_cv_prog_gcc_traditional=yes
-fi
-rm -rf conftest*
-
- fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
-fi
@@ -5886,13 +5580,15 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; }
#
+ # $ntp_cv_gcc_Winit_self is tested later to add the
+ # flag to CFLAGS_NTP.
+ #
# libopts specifically builds a string with embedded NULs.
# This causes a bunch of distracting warnings due to -Wformat.
- # Let's see if we can figure out how to disable these.
#
- CFLAGS="$SAVED_CFLAGS -Wno-format"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format" >&5
-printf %s "checking if $CC can handle -Wno-format... " >&6; }
+ CFLAGS="$SAVED_CFLAGS -Wno-format -Wno-format-security"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format -Wno-format-security" >&5
+printf %s "checking if $CC can handle -Wno-format -Wno-format-security... " >&6; }
if test ${ntp_cv_gcc_Wno_format+y}
then :
printf %s "(cached) " >&6
@@ -5922,21 +5618,50 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5
printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; }
-
case "$ntp_cv_gcc_Wno_format" in
+ no) ntp_cv_gcc_Wno_format_truncation=no
+ ;;
yes)
- CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
- ;;
- no)
- ;;
+ CC_NOFORMAT="-Wno-format -Wno-format-security"
+ CFLAGS="$SAVED_CFLAGS -Wformat -Wno-format-truncation -Werror"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wformat -Wno-format-truncation" >&5
+printf %s "checking if $CC can handle -Wformat -Wno-format-truncation... " >&6; }
+if test ${ntp_cv_gcc_Wno_format_truncation+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_gcc_Wno_format_truncation=yes
+else $as_nop
+ ntp_cv_gcc_Wno_format_truncation=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format_truncation" >&5
+printf "%s\n" "$ntp_cv_gcc_Wno_format_truncation" >&6; }
+ #
+ # $ntp_cv_gcc_Wno_format_truncation is tested later to add the
+ # flag to CFLAGS.
+ #
esac
CFLAGS="$SAVED_CFLAGS"
{ SAVED_CFLAGS=; unset SAVED_CFLAGS;}
- #
- # $ntp_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS_NTP.
- #
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
printf %s "checking if linker supports omitting unused code and data... " >&6; }
if test ${ntp_cv_gc_sections_runs+y}
@@ -5944,7 +5669,17 @@ then :
printf %s "(cached) " >&6
else $as_nop
- origCFLAGS="$CFLAGS"
+ # NetBSD will link but likely not run with --gc-sections
+ # http://bugs.ntp.org/1844
+ # http://gnats.netbsd.org/40401
+ # --gc-sections causes attempt to load as linux elf, with
+ # wrong syscalls in place. Test a little gauntlet of
+ # simple stdio read code checking for errors, expecting
+ # enough syscall differences that the NetBSD code will
+ # fail even with Linux emulation working as designed.
+ # A shorter test could be refined by someone with access
+ # to a NetBSD host with Linux emulation working.
+ origCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wl,--gc-sections"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6034,6 +5769,10 @@ printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; }
yes)
CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
esac
+ case "$ntp_cv_gcc_Wno_format_truncation" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Wno-format-truncation"
+ esac
# -W[no-]strict-prototypes might be added by NTP_OPENSSL
esac
@@ -7080,38 +6819,6 @@ esac
# So far, the only shared library we might use is libopts.
# It's a small library - we might as well use a static version of it.
-# Check whether --enable-shared was given.
-if test ${enable_shared+y}
-then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for pkg in $enableval; do
- IFS=$lt_save_ifs
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac
-else $as_nop
- enable_shared=no
-fi
-
-
-
-
-
-
-
-
-
case `pwd` in
*\ * | *\ *)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -7295,6 +7002,148 @@ Xsed="$SED -e 1s/^X//"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
printf %s "checking for fgrep... " >&6; }
if test ${ac_cv_path_FGREP+y}
@@ -10575,6 +10424,36 @@ fi
# Set options
+# Check whether --enable-shared was given.
+if test ${enable_shared+y}
+then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_shared=no
+fi
+
+
+
+
+
+
+
@@ -14874,7 +14753,7 @@ CC=$lt_save_CC
# Therefore, by default:
# - use the version of libopts we ship with
# - do not install it
-# - build a static copy (AC_DISABLE_SHARED - done earlier)
+# - build a static copy (disable-shared - done earlier)
case "${enable_local_libopts+set}" in
set) ;;
*) enable_local_libopts=yes ;;
@@ -16526,8 +16405,6 @@ case "$ntp_use_local_libevent" in
*) # If we have (a good enough) pkg-config, see if it can find libevent
case "$PKG_CONFIG" in
/*)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
-printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
then
ntp_use_local_libevent=no
@@ -16536,6 +16413,8 @@ printf %s "checking if libevent $ntp_libevent_min_version or later is installed.
*.*) ;;
*) ntp_libevent_version='(unknown)' ;;
esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
@@ -16570,6 +16449,8 @@ printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
# HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
# is "pthreads"?
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
@@ -17483,11 +17364,23 @@ fi
+VER_SUFFIX=
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: " >&5
+printf "%s\n" "$as_me: " >&6;}
+ esac
+
+
+
+
+
+
# HMS: Save $LIBS and empty it.
# any LIBS we add here should go in to LDADD_LIBNTP
-__LIBS=$LIBS
+SAVED_LIBS=$LIBS
LIBS=
@@ -19228,14 +19121,6 @@ printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
esac
-# Obsolete code to be removed.
-if test $ac_cv_header_sys_time_h = yes; then
-
-printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-# End of obsolete code.
-
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -25091,100 +24976,6 @@ fi
-case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
- no::yes)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
-printf %s "checking for int32 with DNS headers included... " >&6; }
-if test ${ntp_cv_type_int32_with_dns+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- #include <resolv.h>
-
-int
-main (void)
-{
-
- size_t cb = sizeof(int32);
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- ntp_cv_type_int32_with_dns=yes
-else $as_nop
- ntp_cv_type_int32_with_dns=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
-printf "%s\n" "$ntp_cv_type_int32_with_dns" >&6; }
- case "$ntp_cv_type_int32_with_dns" in
- yes)
-
-printf "%s\n" "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
-
- esac
-esac
-
-case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
- no::yes)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
-printf %s "checking for u_int32 with DNS headers included... " >&6; }
-if test ${ntp_cv_type_u_int32_with_dns+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- #include <resolv.h>
-
-int
-main (void)
-{
-
- size_t cb = sizeof(u_int32);
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- ntp_cv_type_u_int32_with_dns=yes
-else $as_nop
- ntp_cv_type_u_int32_with_dns=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
-printf "%s\n" "$ntp_cv_type_u_int32_with_dns" >&6; }
- case "$ntp_cv_type_u_int32_with_dns" in
- yes)
-
-printf "%s\n" "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
-
- esac
-esac
-
ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
@@ -25766,34 +25557,1192 @@ printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;}
;;
esac
+ if test x"$enable_dependency_tracking" = x"yes"; then
+ LIBNTP_SUBMAKES_TRUE=
+ LIBNTP_SUBMAKES_FALSE='#'
+else
+ LIBNTP_SUBMAKES_TRUE='#'
+ LIBNTP_SUBMAKES_FALSE=
+fi
+
-LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
-LIBS=$__LIBS
-{ __LIBS=; unset __LIBS;}
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
-printf %s "checking for deprecated --with-arlib... " >&6; }
+# Check whether --with-crypto was given.
+if test ${with_crypto+y}
+then :
+ withval=$with_crypto; case "$with_crypto" in
+ yes)
+ with_crypto=openssl,libcrypto
+ esac
+
+else $as_nop
+ with_crypto=openssl,libcrypto
+fi
+
+
+# Check whether --with-openssl-libdir was given.
+if test ${with_openssl_libdir+y}
+then :
+ withval=$with_openssl_libdir;
+fi
+
-# Check whether --with-arlib was given.
-if test ${with_arlib+y}
+# Check whether --with-openssl-incdir was given.
+if test ${with_openssl_incdir+y}
then :
- withval=$with_arlib; ans=$withval
+ withval=$with_openssl_incdir;
+fi
+
+# Check whether --enable-verbose-ssl was given.
+if test ${enable_verbose_ssl+y}
+then :
+ enableval=$enable_verbose_ssl;
else $as_nop
- ans=no
+ enable_verbose_ssl=no
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-printf "%s\n" "$ans" >&6; }
-case "$ans" in
+ntp_openssl=no
+ntp_openssl_from_pkg_config=no
+ntp_ssl_incdir=
+ntp_ssl_cflags=
+ntp_ssl_cppflags=
+ntp_ssl_libdir=
+ntp_ssl_libs_L=
+ntp_ssl_libs_l=
+ntp_ssl_libs=
+ntp_ssl_ldflags=
+
+NTPSSL_SAVED_CFLAGS="$CFLAGS"
+NTPSSL_SAVED_CPPFLAGS="$CPPFLAGS"
+NTPSSL_SAVED_LIBS="$LIBS"
+NTPSSL_SAVED_LDFLAGS="$LDFLAGS"
+
+# Extract the first word of "openssl", so it can be a program name with args.
+set dummy openssl; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PATH_OPENSSL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PATH_OPENSSL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PATH_OPENSSL="$PATH_OPENSSL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PATH_OPENSSL="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PATH_OPENSSL=$ac_cv_path_PATH_OPENSSL
+if test -n "$PATH_OPENSSL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_OPENSSL" >&5
+printf "%s\n" "$PATH_OPENSSL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+str="$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}"
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $str" >&5
+printf "%s\n" "$as_me: $str" >&6;}
+ esac
+
+
+{ str=; unset str;}
+
+# Make sure neither/both --with_openssl-{inc,lib}dir are given
+case "${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ notgiven:notgiven) ;;
+ *notgiven*)
+ as_fn_error $? "only one of --with-openssl-{inc,lib}dir=... given - provide both or neither" "$LINENO" 5
+ ;;
+esac
+
+# HMS: Today there are only 2 case options. We probably want a third
+# *:*:notgiven:notgiven
+# and in that case we would validate the path in PKG_CONFIG_PATH.
+# Unless we can do it with 2 cases, where the 2nd case is *:*:...
+# and we do a reality check on execpath and the headers/libraries.
+#
+##
+# if $with_crypto is not "no":
+# if --with-openssl-{inc,lib}dir are not given:
+# we should use pkg-config to find openssl
+# if we don't have pkg-config, if openssl is in the base OS, use that.
+##
+case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ no:*) ;;
+ *:notempty:notgiven:notgiven)
+ # If PKG_CONFIG is notempty and we haven't been given openssl paths,
+ # then let's make sure that the openssl executable's path corresponds
+ # to the path in openssl.pc, and 'openssl version' matches the Version
+ # in openssl.pc. If $PKG_CONFIG tells us an INCPATH and/or a LIBPATH,
+ # then should we reality check them?
+ ## INCPATH
+ # harlan@ntp-testbuild.tal1> openssl version
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> grep 1.1.1t /ntpbuild/include/openssl/*
+ # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # harlan@ntp-testbuild.tal1>
+ ## LIBPATH
+ # harlan@ntp-testbuild.tal1> strings -a /ntpbuild/lib/libcrypto.* | fgrep 1.1.1t
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> ls /ntpbuild/lib/libcrypto.*
+ # /ntpbuild/lib/libcrypto.a /ntpbuild/lib/libcrypto.so.1.1*
+ # /ntpbuild/lib/libcrypto.so@
+ # harlan@ntp-testbuild.tal1>
+ ##
+ # Having said this, do we really care if the openssl executable that
+ # we have found is matched with the INCPATH and LIBPATH?
+ # One answer: Probably not, but we should complain on a mismatch as
+ # otherwise runtime differences could easily cause problems/drama.
+
+ ##BO
+ # ntp_cv_build_framework_help=yes
+ save_PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
+ for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
+ case "$pkg" in
+ openssl)
+ if $PKG_CONFIG --exists $pkg ; then
+ # Found it - yay
+ # Do we want to check we found the right one?
+ # --modver
+ # --variable={libdir,includedir} (varname)
+ overf=`openssl version`
+ overs=`echo $overf | awk '{print }'`
+ case "$overs" in
+ 0.*) ;; # Should we squawk?
+ 1.0.*) ;; # Should we squawk?
+ 1.1.*) ;; # Should we squawk?
+ 3.*)
+ oinc=`openssl --variable=includedir`
+ olib=`openssl --variable=libdir`
+ # How should we use these?
+ ;;
+ *) ;; # Should we squawk?
+ esac
+ # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # grep 1.1.1t /ntpbuild/lib/libcrypto.a
+ # strings -a /ntpbuild/lib/libcrypto.a | grep 1.1.1t
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1>
+ # which should match $overf
+ ##
+ # harlan@ntp-testbuild.tal1> echo '"OpenSSL 1.1.1t 7 Feb 2023"' | cut -f 2 -d\"
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> grep OPENSSL_VERSION_TEXT /ntpbuild/include/openssl/opensslv.h
+ # # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # harlan@ntp-testbuild.tal1>
+ ##
+
+ else
+ # This is a hack, but it's reasonable.
+ pkgpath="`echo $PATH_OPENSSL | sed -e 's:/bin/openssl$::'`/lib/pkgconfig"
+ test -d "$pkgpath" || pkgpath=
+ # echo "pkgpath is <$pkgpath>"
+ # echo "PKG_CONFIG_PATH is <$PKG_CONFIG_PATH>"
+ case "$pkgpath" in
+ '') ;; # Nothing to see here...
+ *) case ":$PKG_CONFIG_PATH:" in
+ ::)
+ PKG_CONFIG_PATH=$pkgpath
+ export PKG_CONFIG_PATH
+ ;;
+ *:$pkgpath:*)
+ # Already there...
+ ;;
+ *)
+ PKG_CONFIG_PATH="$pkgpath:$PKG_CONFIG_PATH"
+ export PKG_CONFIG_PATH
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ done
+ ##EO
+
+ for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
+printf %s "checking pkg-config for $pkg... " >&6; }
+ if $PKG_CONFIG --exists $pkg ; then
+ ntp_ssl_cppflags="`$PKG_CONFIG --cflags-only-I $pkg`"
+ case "$ntp_ssl_cppflags" in
+ '')
+ ntp_ssl_incdir='not needed'
+ ;;
+ *)
+ ntp_ssl_incdir="`echo $ntp_ssl_cppflags | $SED -e 's/-I//'`"
+ esac
+ ntp_ssl_cflags="`$PKG_CONFIG --cflags-only-other $pkg`"
+ ntp_ssl_libs_L="`$PKG_CONFIG --libs-only-L $pkg`"
+ case "$ntp_ssl_libs_L" in
+ '')
+ ntp_ssl_libdir='not needed'
+ ;;
+ *)
+ ntp_ssl_libdir="`echo $ntp_ssl_libs_L | $SED -e 's/-L//'`"
+ esac
+ ntp_ssl_libs_l="`$PKG_CONFIG --libs-only-l $pkg`"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ ntp_ssl_ldflags="`$PKG_CONFIG --libs-only-other $pkg`"
+ ntp_openssl=yes
+ ntp_openssl_from_pkg_config=yes
+ ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
+ case "$ntp_openssl_version" in
+ *.*) ;;
+ *) ntp_openssl_version='(unknown)' ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
+printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
+
+ break
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ done
+ { pkg=; unset pkg;}
+esac
+case "$with_crypto" in
+ no) ;;
+ *)
+ case "$with_openssl_libdir" in
+ '') ;;
+ *)
+ ntp_ssl_libdir="$with_openssl_libdir"
+ ntp_ssl_libs_L="-L$with_openssl_libdir"
+ ntp_ssl_libs_l="-lcrypto"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ esac
+ case "$with_openssl_incdir" in
+ '') ;;
+ *)
+ ntp_ssl_incdir="$with_openssl_incdir"
+ ntp_ssl_cppflags="-I$with_openssl_incdir"
+ esac
+esac
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase I checks:" >&5
+printf "%s\n" "$as_me: OpenSSL Phase I checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP: ($CFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CFLAGS_NTP: ($CFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP: ($LDADD_NTP)" >&5
+printf "%s\n" "$as_me: LDADD_NTP: ($LDADD_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&5
+printf "%s\n" "$as_me: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs: ($ntp_ssl_libs)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs: ($ntp_ssl_libs)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&6;}
+ esac
+
+
+
+case "$with_crypto" in
+ no)
+ ntp_openssl=no
+ ;;
+ *)
+ ntp_ssl_libs_l="${ntp_ssl_libs_l:--lcrypto}"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ case "$ntp_ssl_libdir" in
+ '')
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto without -L" >&5
+printf "%s\n" "$as_me: Searching for libcrypto without -L" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
+printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char EVP_MD_CTX_new ();
+int
+main (void)
+{
+return EVP_MD_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_crypto_EVP_MD_CTX_new=yes
+else $as_nop
+ ac_cv_lib_crypto_EVP_MD_CTX_new=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
+printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
+if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
+then :
+ ntp_ssl_libdir='not needed'
+
+fi
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ esac
+ case "$ntp_ssl_libdir" in
+ '')
+ ntp_ssl_libdir_search="/usr/lib /usr/lib/openssl /usr/sfw/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/ssl/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /opt/local/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /lib /lib64"
+ ;;
+ *)
+ ntp_ssl_libdir_search="$ntp_ssl_libdir"
+ esac
+ case $ntp_ssl_libdir_search in
+ 'not needed') ;;
+ *)
+ for i in $ntp_ssl_libdir_search not_found
+ do
+ case "$i" in
+ not_found) ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto in $i" >&5
+printf "%s\n" "$as_me: Searching for libcrypto in $i" >&6;}
+ LIBS="-L$i $NTPSSL_SAVED_LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
+printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char EVP_MD_CTX_new ();
+int
+main (void)
+{
+return EVP_MD_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_crypto_EVP_MD_CTX_new=yes
+else $as_nop
+ ac_cv_lib_crypto_EVP_MD_CTX_new=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
+printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
+if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
+then :
+ break
+
+fi
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ esac
+ done
+ ntp_ssl_libdir="$i"
+ ntp_ssl_libs_L="-L$i"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ LIBS="$NTPSSL_SAVED_LIBS"
+ case "$ntp_ssl_libdir" in
+ not_found)
+ as_fn_error $? "You may want to use --without-crypto, or add
+openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
+--with-openssl-libdir=/some/path option to configure.
+libcrypto not found in any of the following directories:
+$ntp_ssl_libdir_search
+ " "$LINENO" 5
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libcrypto found in $ntp_ssl_libdir" >&5
+printf "%s\n" "$as_me: libcrypto found in $ntp_ssl_libdir" >&6;}
+ esac
+
+ case "$ntp_openssl_from_pkg_config:$ntp_ssl_incdir" in
+ 'yes:not needed' | no:)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h without -I" >&5
+printf "%s\n" "$as_me: Searching for openssl/evp.h without -I" >&6;}
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes
+then :
+ ntp_ssl_incdir='not needed'
+
+fi
+
+ esac
+ case "$ntp_ssl_incdir" in
+ 'not needed')
+ ntp_ssl_incdir_search="$ntp_ssl_incdir"
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl include directory" >&5
+printf "%s\n" "$as_me: Searching for openssl include directory" >&6;}
+ case "$with_openssl_incdir" in
+ '')
+ case "$ntp_ssl_incdir" in
+ '')
+ ntp_ssl_incdir_search="/usr/include /usr/sfw/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /opt/local/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/ssl/include"
+ ;;
+ *)
+ esac
+ ;;
+ *)
+ ntp_ssl_incdir_search="$with_openssl_incdir"
+ esac
+ case $ntp_ssl_incdir_search in
+ 'not needed') ;;
+ *)
+ for i in $ntp_ssl_incdir_search
+ do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h in $i" >&5
+printf "%s\n" "$as_me: Searching for openssl/evp.h in $i" >&6;}
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS -I$i"
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes
+then :
+ ntp_ssl_incdir="$i" ; break
+
+fi
+
+ done
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ { i=; unset i;}
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
+ case "$ntp_ssl_incdir" in
+ '')
+ as_fn_error $? "You may want to use --without-crypto, or add
+openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
+-with-openssl-incdir=/some/path option to configure.
+No usable openssl/evp.h found in any of the following direcotries:
+$ntp_ssl_incdir_search
+ " "$LINENO" 5
+ esac
+ ntp_ssl_cppflags="-I$ntp_ssl_incdir"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Found evp.h in $ntp_ssl_incdir/openssl" >&5
+printf "%s\n" "$as_me: Found evp.h in $ntp_ssl_incdir/openssl" >&6;}
+ esac
+ esac
+ ntp_openssl=yes
+esac
+case "$ntp_openssl:$ntp_ssl_libdir" in
+ 'yes:not needed')
+ ;;
+ yes:*)
+ CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto works without runpath" >&5
+printf %s "checking if crypto works without runpath... " >&6; }
+if test ${ntp_cv_ssl_without_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ ntp_cv_ssl_without_runpath=yes
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_without_runpath=yes
+else $as_nop
+ ntp_cv_ssl_without_runpath=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_without_runpath" >&5
+printf "%s\n" "$ntp_cv_ssl_without_runpath" >&6; }
+ case "$ntp_cv_ssl_without_runpath" in
+ no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir" >&5
+printf %s "checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir... " >&6; }
+if test ${ntp_cv_ssl_needs_dashWl_rpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ LDFLAGS="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir $NTPSSL_SAVED_LDFLAGS"
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_needs_dashWl_rpath=yes
+else $as_nop
+ ntp_cv_ssl_needs_dashWl_rpath=no
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashWl_rpath" >&5
+printf "%s\n" "$ntp_cv_ssl_needs_dashWl_rpath" >&6; }
+ case "$ntp_cv_ssl_needs_dashWl_rpath" in
+ yes)
+ ntp_ssl_ldflags="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir"
+ ;;
+ no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -R$ntp_ssl_libdir" >&5
+printf %s "checking if crypto needs -R$ntp_ssl_libdir... " >&6; }
+if test ${ntp_cv_ssl_needs_dashR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ LDFLAGS="$NTPSSL_SAVED_LDFLAGS $ntp_ssl_ldflags -R$ntp_ssl_libdir"
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_needs_dashR=yes
+else $as_nop
+ ntp_cv_ssl_needs_dashR=no
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashR" >&5
+printf "%s\n" "$ntp_cv_ssl_needs_dashR" >&6; }
+ case "$ntp_cv_ssl_needs_dashR" in
+ yes)
+ ntp_ssl_ldflags="$ntp_ssl_ldflags -R$ntp_ssl_libdir"
+ esac
+ case "$build:$ntp_cv_ssl_needs_dashR" in
+ $host:no)
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Unable to run program using crypto, check openssl.pc
+or libcrypto.pc are in PKG_CONFIG_PATH, or provide the
+ --with-openssl-libdir=/some/path option to configure.
+
+See \`config.log' for more details" "$LINENO" 5; }
+ esac
+ esac
+ esac
+esac
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase II checks:" >&5
+printf "%s\n" "$as_me: OpenSSL Phase II checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs: ($ntp_ssl_libs)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs: ($ntp_ssl_libs)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&6;}
+ esac
+
+
+
+case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
+ yes:no)
+ CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l alone works" >&5
+printf %s "checking if linking with $ntp_ssl_libs_l alone works... " >&6; }
+if test ${ntp_cv_bare_lcrypto+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ EVP_MD_CTX_new();
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ntp_cv_bare_lcrypto=yes
+else $as_nop
+ ntp_cv_bare_lcrypto=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
+printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
+ case "$ntp_cv_bare_lcrypto" in
+ no)
+ LIBS="-$ntp_ssl_libs -lz $NTPSSL_SAVED_LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l -lz works" >&5
+printf %s "checking if linking with $ntp_ssl_libs_l -lz works... " >&6; }
+if test ${ntp_cv_lcrypto_lz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ EVP_MD_CTX_new();
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ntp_cv_lcrypto_lz=yes
+else $as_nop
+ ntp_cv_lcrypto_lz=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
+printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
+ case "$ntp_cv_lcrypto_lz" in
+ yes)
+ ntp_ssl_libs_l="$ntp_ssl_libs_l -lz"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ esac
+ esac esac
+case "$ntp_openssl:$GCC" in
+ yes:yes)
+ CFLAGS="$NTP_SAVED_CFLAGS $ntp_ssl_cflags -Werror"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking If $CC supports -Werror" >&5
+printf %s "checking If $CC supports -Werror... " >&6; }
+if test ${ntp_cv_gcc_supports_Werror+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_gcc_supports_Werror=yes
+else $as_nop
+ ntp_cv_gcc_supports_Werror=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_supports_Werror" >&5
+printf "%s\n" "$ntp_cv_gcc_supports_Werror" >&6; }
+ case "ntp_cv_gcc_supports_Werror" in
+ no)
+ ntp_use_Wstrict_prototypes=yes
+ ;;
+ yes)
+ CFLAGS="$CFLAGS -Wstrict-prototypes"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if OpenSSL triggers warnings" >&5
+printf %s "checking if OpenSSL triggers warnings... " >&6; }
+if test ${ntp_cv_ssl_triggers_warnings+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/asn1_mac.h"
+ #include "openssl/bn.h"
+ #include "openssl/err.h"
+ #include "openssl/evp.h"
+ #include "openssl/pem.h"
+ #include "openssl/rand.h"
+ #include "openssl/x509v3.h"
+
+int
+main (void)
+{
+
+ /* empty body */
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_ssl_triggers_warnings=no
+else $as_nop
+ ntp_cv_ssl_triggers_warnings=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_triggers_warnings" >&5
+printf "%s\n" "$ntp_cv_ssl_triggers_warnings" >&6; }
+ case "$ntp_cv_ssl_triggers_warnings" in
+ yes)
+ ntp_use_Wstrict_prototypes=no
+ ;;
+ *)
+ ntp_use_Wstrict_prototypes=yes
+ esac
+ esac
+ case "$ntp_use_Wstrict_prototypes" in
+ no)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wno-strict-prototypes"
+ ;;
+ *)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
+ esac
+ ;;
+ no:yes)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will link to ssl library" >&5
+printf %s "checking if we will link to ssl library... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
+printf "%s\n" "$ntp_openssl" >&6; }
+
+case "$ntp_openssl" in
yes)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&5
-printf "%s\n" "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&2;}
+ VER_SUFFIX=o
+ for ac_header in openssl/cmac.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_cmac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
+ ntp_enable_cmac=yes
+else $as_nop
+ ntp_enable_cmac=no
+
+fi
+
+done
+ case "$ntp_enable_cmac" in
+ yes)
+
+printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
+
+ esac
+
+printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
+
+
+printf "%s\n" "#define OPENSSL_SUPPRESS_DEPRECATED 1" >>confdefs.h
+
+ CFLAGS="$NTPSSL_SAVED_CFLAGS"
+ ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
+if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
+
+fi
+
+ CPPFLAGS_NTP="$CPPFLAGS_NTP $ntp_ssl_cppflags"
+ CFLAGS_NTP="$CFLAGS_NTP $ntp_ssl_cflags"
+ LDADD_NTP="$ntp_ssl_libs $LDADD_NTP"
+ LDFLAGS_NTP="$ntp_ssl_ldflags $LDFLAGS_NTP"
+esac
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL final checks:" >&5
+printf "%s\n" "$as_me: OpenSSL final checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl: $ntp_openssl" >&5
+printf "%s\n" "$as_me: ntp_openssl: $ntp_openssl" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP: ($CFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CFLAGS_NTP: ($CFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP: ($LDADD_NTP)" >&5
+printf "%s\n" "$as_me: LDADD_NTP: ($LDADD_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&6;}
+ esac
+
+
+
+CFLAGS="$NTPSSL_SAVED_CFLAGS"
+CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
+LIBS="$NTPSSL_SAVED_LIBS"
+LDFLAGS="$NTPSSL_SAVED_LDFLAGS"
+
+{ NTPSSL_SAVED_CFLAGS=; unset NTPSSL_SAVED_CFLAGS;}
+{ NTPSSL_SAVED_CPPFLAGS=; unset NTPSSL_SAVED_CPPFLAGS;}
+{ NTPSSL_SAVED_LIBS=; unset NTPSSL_SAVED_LIBS;}
+{ NTPSSL_SAVED_LDFLAGS=; unset NTPSSL_SAVED_LDFLAGS;}
+{ ntp_enable_cmac=; unset ntp_enable_cmac;}
+{ ntp_use_Wstrict_prototypes=; unset ntp_use_Wstrict_prototypes;}
+{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
+{ ntp_openssl_version=; unset ntp_openssl_version;}
+{ ntp_ssl_cflags=; unset ntp_ssl_cflags;}
+{ ntp_ssl_cppflags=; unset ntp_ssl_cppflags;}
+{ ntp_ssl_libdir_search=; unset ntp_ssl_libdir_search;}
+{ ntp_ssl_incdir_search=; unset ntp_ssl_incdir_search;}
+{ ntp_ssl_libdir=; unset ntp_ssl_libdir;}
+{ ntp_ssl_incdir=; unset ntp_ssl_incdir;}
+{ ntp_ssl_libs_l=; unset ntp_ssl_libs_l;}
+{ ntp_ssl_libs_L=; unset ntp_ssl_libs_L;}
+{ ntp_ssl_ldflags=; unset ntp_ssl_ldflags;}
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SSL library's secure random numbers" >&5
+printf %s "checking if we want to use SSL library's secure random numbers... " >&6; }
+# Check whether --enable-openssl-random was given.
+if test ${enable_openssl_random+y}
+then :
+ enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval ; ntp_ssl_random_mandatory=$enableval
+else $as_nop
+ ntp_use_openssl_random=yes ; ntp_ssl_random_mandatory=no
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
+printf "%s\n" "$ntp_use_openssl_random" >&6; }
+
+# The following might need extra libraries
+NTPO_SAVED_LIBS="$LIBS"
+LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
+if test "x$ac_cv_func_RAND_bytes" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
+if test "x$ac_cv_func_RAND_poll" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
+
+fi
+
+LIBS="$NTPO_SAVED_LIBS"
+case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyesyes)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using SSL library's secure random number generator" >&5
+printf "%s\n" "$as_me: Using SSL library's secure random number generator" >&6;}
+
+printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
+
;;
+ *)
+ ntp_use_openssl_random=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: SSL library's secure random number generator unavailable." >&5
+printf "%s\n" "$as_me: SSL library's secure random number generator unavailable." >&6;}
+ case "$ntp_ssl_random_mandatory" in
+ yes)
+ as_fn_error $? "No suitable SSL library was found and
+--enable-openssl-random was given.. Remove --enable-openssl-random
+if you wish to build without a cryptographically secure random number
+generator.
+
+WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " "$LINENO" 5
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " >&5
+printf "%s\n" "$as_me: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " >&2;}
+ esac
esac
+{ ntp_ssl_random_mandatory=; unset ntp_ssl_random_mandatory;}
+
+
+
+LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
+LIBS=$SAVED_LIBS
+{ SAVED_LIBS=; unset SAVED_LIBS;}
+
+
+
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -25875,9 +26824,6 @@ printf "%s\n" "no" >&6; }
fi
-
-
-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
@@ -25889,65 +26835,6 @@ else
printf "%s\n" "no, using $LN_S" >&6; }
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
-printf %s "checking for library containing strerror... " >&6; }
-if test ${ac_cv_search_strerror+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char strerror ();
-int
-main (void)
-{
-return strerror ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' cposix
-do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"
-then :
- ac_cv_search_strerror=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext
- if test ${ac_cv_search_strerror+y}
-then :
- break
-fi
-done
-if test ${ac_cv_search_strerror+y}
-then :
-
-else $as_nop
- ac_cv_search_strerror=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
-printf "%s\n" "$ac_cv_search_strerror" >&6; }
-ac_res=$ac_cv_search_strerror
-if test "$ac_res" != no
-then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
# Extract the first word of "perl", so it can be a program name with args.
@@ -26352,35 +27239,39 @@ fi
esac
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
printf %s "checking for facilitynames in syslog.h... " >&6; }
if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y}
then :
printf %s "(cached) " >&6
else $as_nop
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define SYSLOG_NAMES
-#include <stdlib.h>
-#include <syslog.h>
+ #define SYSLOG_NAMES
+ #include <stdlib.h>
+ #include <syslog.h>
int
main (void)
{
- void *fnames; fnames = facilitynames;
+
+ void *fnames = facilitynames;
+
+
;
return 0;
}
+ ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
-else $as_nop
ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
@@ -26393,11 +27284,6 @@ printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
no)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
printf "%s\n" "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
- ;;
- cross)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
-printf "%s\n" "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
- ;;
esac
@@ -26409,7 +27295,10 @@ case "$host" in
*)
# HMS: Make sure we check for -lrt for clock_* before this...
case "$ac_cv_search_clock_gettime" in
- '') as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!" "$LINENO" 5 ;;
+ '') { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!
+See \`config.log' for more details" "$LINENO" 5; } ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5
printf %s "checking for library containing sched_setscheduler... " >&6; }
@@ -26479,6 +27368,12 @@ then :
printf "%s\n" "#define HAVE_BSTRING_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/procctl.h" "ac_cv_header_sys_procctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_procctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PROCCTL_H 1" >>confdefs.h
+
+fi
ac_fn_c_check_header_compile "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
if test "x$ac_cv_header_dns_sd_h" = xyes
@@ -31425,530 +32320,7 @@ esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
printf "%s\n" "$ans" >&6; }
-
-
-
-VER_SUFFIX=
-
-
-
-
-# Check whether --with-crypto was given.
-if test ${with_crypto+y}
-then :
- withval=$with_crypto;
-fi
-
-
-# Check whether --with-openssl-libdir was given.
-if test ${with_openssl_libdir+y}
-then :
- withval=$with_openssl_libdir;
-fi
-
-
-# Check whether --with-openssl-incdir was given.
-if test ${with_openssl_incdir+y}
-then :
- withval=$with_openssl_incdir;
-fi
-
-
-# Check whether --with-rpath was given.
-if test ${with_rpath+y}
-then :
- withval=$with_rpath;
-fi
-
-
-ntp_openssl=no
-ntp_openssl_from_pkg_config=no
-
-with_crypto=${with_crypto:-openssl,libcrypto}
-case "$with_crypto" in
- yes)
- with_crypto=openssl,libcrypto
-esac
-
-
-case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
- no:*) ;;
- *:notempty:notgiven:notgiven)
- for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
-printf %s "checking pkg-config for $pkg... " >&6; }
- if $PKG_CONFIG --exists $pkg ; then
- CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
- CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
- LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
- LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
- LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
- VER_SUFFIX=o
- ntp_openssl=yes
- ntp_openssl_from_pkg_config=yes
- ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
- case "$ntp_openssl_version" in
- *.*) ;;
- *) ntp_openssl_version='(unknown)' ;;
- esac
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
-printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
-
- break
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
- done
-esac
-case "$with_crypto:$ntp_openssl" in
- no:*) ;;
- *:no)
- need_dash_r=
- need_dash_Wlrpath=
- case "${with_rpath-notgiven}" in
- yes)
- # Lame - what to do if we need -Wl... but not -R?
- need_dash_r=1
- ;;
- notgiven)
- case "$host" in
- *-*-linux*)
- # This may really only be true for gcc
- need_dash_Wlrpath=1
- ;;
- *-*-netbsd*)
- need_dash_r=1
- ;;
- *-*-solaris*)
- need_dash_r=1
- ;;
- esac
- ;;
- esac
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
-printf %s "checking for openssl library directory... " >&6; }
- with_openssl_libdir=${with_openssl_libdir-notgiven}
- case "$with_openssl_libdir" in
- notgiven)
- case "$build" in
- $host)
- with_openssl_libdir=default
- ;;
- *)
- with_openssl_libdir=no
- ;;
- esac
- esac
- case "$with_openssl_libdir" in
- default)
- # Look in:
- with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
- with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
- with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
- esac
- case "$with_openssl_libdir" in
- no)
- ;;
- *) # Look for libcrypto.a and libssl.a:
- for i in $with_openssl_libdir no
- do
- case "$host" in
- *-*-darwin*)
- test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
- ;;
- *)
- test -f $i/libcrypto.so -a -f $i/libssl.so && break
- test -f $i/libcrypto.a -a -f $i/libssl.a && break
- ;;
- esac
- done
- openssl_libdir=$i
- ;;
- esac
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
-printf "%s\n" "$openssl_libdir" >&6; }
- case "$openssl_libdir" in
- no)
- openssl_libdir=
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
-printf "%s\n" "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
- esac
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
-printf %s "checking for openssl include directory... " >&6; }
- with_openssl_incdir=${with_openssl_incdir-notgiven}
- case "$with_openssl_incdir" in
- notgiven)
- # Look in:
- with_openssl_incdir="/usr/include /usr/sfw/include"
- with_openssl_incdir="$with_openssl_incdir /usr/local/include"
- with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
- esac
- case "$with_openssl_incdir" in
- no)
- ;;
- *) # look for openssl/evp.h:
- for i in $with_openssl_incdir no
- do
- test -f $i/openssl/evp.h && break
- done
- openssl_incdir=$i
- ;;
- esac
- { i=; unset i;}
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
-printf "%s\n" "$openssl_incdir" >&6; }
- case "$openssl_incdir" in
- no)
- openssl_incdir=
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
-printf "%s\n" "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
- esac
- if test -z "$openssl_libdir" -o -z "$openssl_incdir"
- then
- ntp_openssl=no
- else
- ntp_openssl=yes
- VER_SUFFIX=o
- fi
- case "$ntp_openssl" in
- yes)
- # We have OpenSSL inc/lib dirs - use them.
- case "$openssl_incdir" in
- /usr/include)
- ;;
- *)
- CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
- ;;
- esac
- case "$openssl_libdir" in
- /usr/lib)
- ;;
- *)
- LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
- case "$need_dash_r" in
- 1)
- LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
- esac
- case "$need_dash_Wlrpath" in
- 1)
- LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
- esac
- ;;
- esac
- LDADD_NTP="$LDADD_NTP -lcrypto"
- esac
-esac
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
-printf %s "checking if we will use crypto... " >&6; }
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
-printf "%s\n" "$ntp_openssl" >&6; }
-
-case "$ntp_openssl" in
- yes)
- ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_cmac_h" = xyes
-then :
- printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
-
-fi
-ac_fn_c_check_header_compile "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_hmac_h" = xyes
-then :
- printf "%s\n" "#define HAVE_OPENSSL_HMAC_H 1" >>confdefs.h
-
-fi
-
-
-printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
-
- case "$VER_SUFFIX" in
- *o*) ;;
- *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
- esac
- ;;
-esac
-
-NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
-NTPO_SAVED_LIBS="$LIBS"
-
-#
-# check for linking with -lcrypto failure, and try -lcrypto -lz.
-# Helps m68k-atari-mint
-#
-case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
- yes:no)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
-printf %s "checking if linking with -lcrypto alone works... " >&6; }
-if test ${ntp_cv_bare_lcrypto+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/err.h"
- #include "openssl/evp.h"
-
-int
-main (void)
-{
-
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- ntp_cv_bare_lcrypto=yes
-else $as_nop
- ntp_cv_bare_lcrypto=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
-printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
- case "$ntp_cv_bare_lcrypto" in
- no)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
-printf %s "checking if linking with -lcrypto -lz works... " >&6; }
-if test ${ntp_cv_lcrypto_lz+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/err.h"
- #include "openssl/evp.h"
-
-int
-main (void)
-{
-
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- ntp_cv_lcrypto_lz=yes
-else $as_nop
- ntp_cv_lcrypto_lz=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
-printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
- case "$ntp_cv_lcrypto_lz" in
- yes)
- LDADD_NTP="$LDADD_NTP -lz"
- esac
- esac
-esac
-
-#
-# Older OpenSSL headers have a number of callback prototypes inside
-# other function prototypes which trigger copious warnings with gcc's
-# -Wstrict-prototypes, which is included in -Wall.
-#
-# An example:
-#
-# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
-# int (*cb)(), int sgckey);
-# ^^^^^^^^^^^
-#
-#
-#
-openssl_triggers_warnings=unknown
-NTPO_SAVED_CFLAGS="$CFLAGS"
-
-case "$ntp_openssl:$GCC" in
- yes:yes)
- CFLAGS="$CFLAGS -Werror"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int
-main (void)
-{
-
- /* see if -Werror breaks gcc */
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gcc_handles_Werror=yes
-else $as_nop
- gcc_handles_Werror=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- case "$gcc_handles_Werror" in
- no)
- # if this gcc doesn't do -Werror go ahead and use
- # -Wstrict-prototypes.
- openssl_triggers_warnings=yes
- ;;
- yes)
- CFLAGS="$CFLAGS -Wstrict-prototypes"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/asn1_mac.h"
- #include "openssl/bn.h"
- #include "openssl/err.h"
- #include "openssl/evp.h"
- #include "openssl/pem.h"
- #include "openssl/rand.h"
- #include "openssl/x509v3.h"
-
-int
-main (void)
-{
-
- /* empty body */
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- openssl_triggers_warnings=no
-else $as_nop
- openssl_triggers_warnings=yes
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- esac
- case "$openssl_triggers_warnings" in
- yes)
- CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
- ;;
- *)
- CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
- esac
- ;;
- no:yes)
- # gcc without OpenSSL
- CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
-esac
-
-# Because we don't want -Werror for the EVP_MD_do_all_sorted check
-CFLAGS="$NTPO_SAVED_CFLAGS"
-
-case "$ntp_openssl" in
- yes)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
-if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
-then :
- printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
-
-fi
-
- ;;
-esac
-
-
-CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
-LIBS="$NTPO_SAVED_LIBS"
-{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
-{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
-{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
-{ openssl_triggers_warnings=; unset openssl_triggers_warnings;}
-{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable CMAC support" >&5
-printf %s "checking if we want to enable CMAC support... " >&6; }
-case "$ac_cv_header_openssl_cmac_h" in
- yes)
-
-printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
-
- ans="yes"
- ;;
- *) ans="no"
- ;;
-esac
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-printf "%s\n" "$ans" >&6; }
-
-
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5
-printf %s "checking if we want to use OpenSSL's crypto random (if available)... " >&6; }
-# Check whether --enable-openssl-random was given.
-if test ${enable_openssl_random+y}
-then :
- enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval
-else $as_nop
- ntp_use_openssl_random=yes
-
-fi
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
-printf "%s\n" "$ntp_use_openssl_random" >&6; }
-
-# The following might need extra libraries
-NTPO_SAVED_LIBS="$LIBS"
-LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
-ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
-if test "x$ac_cv_func_RAND_bytes" = xyes
-then :
- printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
-if test "x$ac_cv_func_RAND_poll" = xyes
-then :
- printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
-
-fi
-
-LIBS="$NTPO_SAVED_LIBS"
-case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
- yesyesyesyes)
-
-printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
-
- ;;
- *) ntp_use_openssl_random=no ;;
-esac
-
-
-
-# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5
-printf %s "checking if we want to include NTP Autokey protocol support... " >&6; }
+# if we have crypto, by default Autokey is enabled
# Check whether --enable-autokey was given.
if test ${enable_autokey+y}
then :
@@ -31964,8 +32336,8 @@ case "$ntp_autokey" in
*)
case "$ntp_openssl" in
no)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&5
-printf "%s\n" "$as_me: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, crypto unavailable." >&5
+printf "%s\n" "$as_me: WARNING: Disabling Autokey, crypto unavailable." >&2;}
ntp_autokey=no
;;
*)
@@ -31977,6 +32349,8 @@ printf "%s\n" "#define AUTOKEY 1" >>confdefs.h
esac
;;
esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if NTP Autokey protocol will be supported" >&5
+printf %s "checking if NTP Autokey protocol will be supported... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5
printf "%s\n" "$ntp_autokey" >&6; }
@@ -34457,6 +34831,8 @@ printf "%s\n" "#define DYNAMIC_INTERLEAVE $ntp_dynamic_interleave" >>confdefs.h
printf "%s\n" "$ntp_ok" >&6; }
+
+
# We may not need have_unity
have_unity=false
# Extract the first word of "ruby", so it can be a program name with args.
@@ -34951,6 +35327,10 @@ if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
as_fn_error $? "conditional \"PTHREADS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${LIBNTP_SUBMAKES_TRUE}" && test -z "${LIBNTP_SUBMAKES_FALSE}"; then
+ as_fn_error $? "conditional \"LIBNTP_SUBMAKES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -35365,7 +35745,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ntp $as_me 4.2.8p17, which was
+This file was extended by ntp $as_me 4.2.8p18, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -35434,7 +35814,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-ntp config.status 4.2.8p17
+ntp config.status 4.2.8p18
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
@@ -35563,9 +35943,9 @@ AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
sed_quote_subst='$sed_quote_subst'
double_quote_subst='$double_quote_subst'
delay_variable_subst='$delay_variable_subst'
-enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
@@ -36674,13 +37054,13 @@ available_tags=''
# ### BEGIN LIBTOOL CONFIG
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
# Which release of libtool.m4 was used?
macro_version=$macro_version
macro_revision=$macro_revision
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
# Whether or not to build static libraries.
build_old_libs=$enable_static
@@ -37166,7 +37546,7 @@ ltmain=$ac_aux_dir/ltmain.sh
chmod +x "$ofile"
;;
- "ntpd/complete.conf":F) sed -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
+ "ntpd/complete.conf":F) $SED -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
"ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
"scripts/build/genAuthors":F) chmod +x scripts/build/genAuthors ;;
"scripts/build/mkver":F) chmod +x scripts/build/mkver ;;