summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure598
1 files changed, 550 insertions, 48 deletions
diff --git a/configure b/configure
index 1e67db268..09db0a335 100755
--- a/configure
+++ b/configure
@@ -624,6 +624,8 @@ ac_includes_default="\
624#endif" 624#endif"
625 625
626ac_subst_vars='LTLIBOBJS 626ac_subst_vars='LTLIBOBJS
627CFLAGS_NOPIE
628LDFLAGS_NOPIE
627DEPEND 629DEPEND
628UNSUPPORTED_ALGORITHMS 630UNSUPPORTED_ALGORITHMS
629TEST_MALLOC_OPTIONS 631TEST_MALLOC_OPTIONS
@@ -643,8 +645,10 @@ KRB5CONF
643SSHDLIBS 645SSHDLIBS
644SSHLIBS 646SSHLIBS
645SSH_PRIVSEP_USER 647SSH_PRIVSEP_USER
648LIBFIDO2
646COMMENT_OUT_ECC 649COMMENT_OUT_ECC
647TEST_SSH_ECC 650TEST_SSH_ECC
651PICFLAG
648LIBEDIT 652LIBEDIT
649PKGCONFIG 653PKGCONFIG
650LDNSCONFIG 654LDNSCONFIG
@@ -756,6 +760,8 @@ with_libedit
756with_audit 760with_audit
757with_pie 761with_pie
758enable_pkcs11 762enable_pkcs11
763enable_security_key
764with_security_key_builtin
759with_ssl_dir 765with_ssl_dir
760with_openssl_header_check 766with_openssl_header_check
761with_ssl_engine 767with_ssl_engine
@@ -1415,6 +1421,7 @@ Optional Features:
1415 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1421 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1416 --disable-largefile omit support for large files 1422 --disable-largefile omit support for large files
1417 --disable-pkcs11 disable PKCS#11 support code [no] 1423 --disable-pkcs11 disable PKCS#11 support code [no]
1424 --disable-security-key disable U2F/FIDO support code no
1418 --disable-strip Disable calling strip(1) on install 1425 --disable-strip Disable calling strip(1) on install
1419 --disable-etc-default-login Disable using PATH from /etc/default/login no 1426 --disable-etc-default-login Disable using PATH from /etc/default/login no
1420 --disable-lastlog disable use of lastlog even if detected no 1427 --disable-lastlog disable use of lastlog even if detected no
@@ -1450,6 +1457,7 @@ Optional Packages:
1450 --with-libedit[=PATH] Enable libedit support for sftp 1457 --with-libedit[=PATH] Enable libedit support for sftp
1451 --with-audit=module Enable audit support (modules=debug,bsm,linux) 1458 --with-audit=module Enable audit support (modules=debug,bsm,linux)
1452 --with-pie Build Position Independent Executables if possible 1459 --with-pie Build Position Independent Executables if possible
1460 --with-security-key-builtin include builtin U2F/FIDO support
1453 --with-ssl-dir=PATH Specify path to OpenSSL installation 1461 --with-ssl-dir=PATH Specify path to OpenSSL installation
1454 --without-openssl-header-check Disable OpenSSL version consistency check 1462 --without-openssl-header-check Disable OpenSSL version consistency check
1455 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support 1463 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support
@@ -6066,6 +6074,49 @@ fi
6066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6067} 6075}
6068 { 6076 {
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wimplicit-fallthrough" >&5
6078$as_echo_n "checking if $CC supports compile flag -Wimplicit-fallthrough... " >&6; }
6079 saved_CFLAGS="$CFLAGS"
6080 CFLAGS="$CFLAGS $WERROR -Wimplicit-fallthrough"
6081 _define_flag=""
6082 test "x$_define_flag" = "x" && _define_flag="-Wimplicit-fallthrough"
6083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6084/* end confdefs.h. */
6085
6086#include <stdlib.h>
6087#include <stdio.h>
6088int main(int argc, char **argv) {
6089 /* Some math to catch -ftrapv problems in the toolchain */
6090 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6091 float l = i * 2.1;
6092 double m = l / 0.5;
6093 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6094 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6095 exit(0);
6096}
6097
6098_ACEOF
6099if ac_fn_c_try_compile "$LINENO"; then :
6100
6101if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6102then
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104$as_echo "no" >&6; }
6105 CFLAGS="$saved_CFLAGS"
6106else
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6108$as_echo "yes" >&6; }
6109 CFLAGS="$saved_CFLAGS $_define_flag"
6110fi
6111else
6112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
6114 CFLAGS="$saved_CFLAGS"
6115
6116fi
6117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6118}
6119 {
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5 6120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5
6070$as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; } 6121$as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; }
6071 saved_CFLAGS="$CFLAGS" 6122 saved_CFLAGS="$CFLAGS"
@@ -6481,13 +6532,16 @@ $as_echo_n "checking if $CC supports $t... " >&6; }
6481 LDFLAGS="$LDFLAGS $t -Werror" 6532 LDFLAGS="$LDFLAGS $t -Werror"
6482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6483/* end confdefs.h. */ 6534/* end confdefs.h. */
6484 #include <stdio.h> 6535
6536 #include <stdio.h>
6537 int func (int t) {char b[100]; snprintf(b,sizeof b,"%d",t); return t;}
6538
6485int 6539int
6486main () 6540main ()
6487{ 6541{
6488 6542
6489 char x[256]; 6543 char x[256];
6490 snprintf(x, sizeof(x), "XXX"); 6544 snprintf(x, sizeof(x), "XXX%d", func(1));
6491 6545
6492 ; 6546 ;
6493 return 0; 6547 return 0;
@@ -6508,13 +6562,16 @@ $as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
6508else 6562else
6509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6510/* end confdefs.h. */ 6564/* end confdefs.h. */
6511 #include <stdio.h> 6565
6566 #include <stdio.h>
6567 int func (int t) {char b[100]; snprintf(b,sizeof b,"%d",t); return t;}
6568
6512int 6569int
6513main () 6570main ()
6514{ 6571{
6515 6572
6516 char x[256]; 6573 char x[256];
6517 snprintf(x, sizeof(x), "XXX"); 6574 snprintf(x, sizeof(x), "XXX%d", func(1));
6518 6575
6519 ; 6576 ;
6520 return 0; 6577 return 0;
@@ -6741,6 +6798,7 @@ for ac_header in \
6741 features.h \ 6798 features.h \
6742 fcntl.h \ 6799 fcntl.h \
6743 floatingpoint.h \ 6800 floatingpoint.h \
6801 fnmatch.h \
6744 getopt.h \ 6802 getopt.h \
6745 glob.h \ 6803 glob.h \
6746 ia.h \ 6804 ia.h \
@@ -7531,6 +7589,7 @@ done
7531 ;; 7589 ;;
7532*-*-haiku*) 7590*-*-haiku*)
7533 LIBS="$LIBS -lbsd " 7591 LIBS="$LIBS -lbsd "
7592 CFLAGS="$CFLAGS -D_BSD_SOURCE"
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 7593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
7535$as_echo_n "checking for socket in -lnetwork... " >&6; } 7594$as_echo_n "checking for socket in -lnetwork... " >&6; }
7536if ${ac_cv_lib_network_socket+:} false; then : 7595if ${ac_cv_lib_network_socket+:} false; then :
@@ -7578,6 +7637,9 @@ fi
7578 7637
7579 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h 7638 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
7580 7639
7640
7641$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
7642
7581 MANTYPE=man 7643 MANTYPE=man
7582 ;; 7644 ;;
7583*-*-hpux*) 7645*-*-hpux*)
@@ -8656,11 +8718,34 @@ $as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
8656 8718
8657$as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h 8719$as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
8658 8720
8659 $as_echo "#define NEED_SETPGRP 1" >>confdefs.h 8721
8722$as_echo "#define NEED_SETPGRP 1" >>confdefs.h
8660 8723
8661 8724
8662$as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h 8725$as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
8663 8726
8727
8728$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
8729
8730 # DISABLE_FD_PASSING so that we call setpgrp as root, otherwise we
8731 # don't get a controlling tty.
8732
8733$as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8734
8735 # On Ultrix some headers are not protected against multiple includes,
8736 # so we create wrappers and put it where the compiler will find it.
8737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: creating compat wrappers for headers" >&5
8738$as_echo "$as_me: WARNING: creating compat wrappers for headers" >&2;}
8739 mkdir -p netinet
8740 for header in netinet/ip.h netdb.h resolv.h; do
8741 name=`echo $header | tr 'a-z/.' 'A-Z__'`
8742 cat >$header <<EOD
8743#ifndef _SSH_COMPAT_${name}
8744#define _SSH_COMPAT_${name}
8745#include "/usr/include/${header}"
8746#endif
8747EOD
8748 done
8664 ;; 8749 ;;
8665 8750
8666*-*-lynxos) 8751*-*-lynxos)
@@ -8990,11 +9075,12 @@ $as_echo "#define HAVE_BASENAME 1" >>confdefs.h
8990fi 9075fi
8991 9076
8992 9077
9078zlib=yes
8993 9079
8994# Check whether --with-zlib was given. 9080# Check whether --with-zlib was given.
8995if test "${with_zlib+set}" = set; then : 9081if test "${with_zlib+set}" = set; then :
8996 withval=$with_zlib; if test "x$withval" = "xno" ; then 9082 withval=$with_zlib; if test "x$withval" = "xno" ; then
8997 as_fn_error $? "*** zlib is required ***" "$LINENO" 5 9083 zlib=no
8998 elif test "x$withval" != "xyes"; then 9084 elif test "x$withval" != "xyes"; then
8999 if test -d "$withval/lib"; then 9085 if test -d "$withval/lib"; then
9000 if test -n "${rpath_opt}"; then 9086 if test -n "${rpath_opt}"; then
@@ -9019,7 +9105,18 @@ if test "${with_zlib+set}" = set; then :
9019fi 9105fi
9020 9106
9021 9107
9022ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" 9108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
9109$as_echo_n "checking for zlib... " >&6; }
9110if test "x${zlib}" = "xno"; then
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9112$as_echo "no" >&6; }
9113else
9114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9115$as_echo "yes" >&6; }
9116
9117$as_echo "#define WITH_ZLIB 1" >>confdefs.h
9118
9119 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9023if test "x$ac_cv_header_zlib_h" = xyes; then : 9120if test "x$ac_cv_header_zlib_h" = xyes; then :
9024 9121
9025else 9122else
@@ -9027,7 +9124,7 @@ else
9027fi 9124fi
9028 9125
9029 9126
9030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 9127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
9031$as_echo_n "checking for deflate in -lz... " >&6; } 9128$as_echo_n "checking for deflate in -lz... " >&6; }
9032if ${ac_cv_lib_z_deflate+:} false; then : 9129if ${ac_cv_lib_z_deflate+:} false; then :
9033 $as_echo_n "(cached) " >&6 9130 $as_echo_n "(cached) " >&6
@@ -9127,9 +9224,9 @@ if test "${with_zlib_version_check+set}" = set; then :
9127fi 9224fi
9128 9225
9129 9226
9130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5 9227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
9131$as_echo_n "checking for possibly buggy zlib... " >&6; } 9228$as_echo_n "checking for possibly buggy zlib... " >&6; }
9132if test "$cross_compiling" = yes; then : 9229 if test "$cross_compiling" = yes; then :
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5 9230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
9134$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;} 9231$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
9135 9232
@@ -9190,6 +9287,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9190 conftest.$ac_objext conftest.beam conftest.$ac_ext 9287 conftest.$ac_objext conftest.beam conftest.$ac_ext
9191fi 9288fi
9192 9289
9290fi
9193 9291
9194ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" 9292ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
9195if test "x$ac_cv_func_strcasecmp" = xyes; then : 9293if test "x$ac_cv_func_strcasecmp" = xyes; then :
@@ -10350,8 +10448,6 @@ else
10350fi 10448fi
10351 10449
10352 if test "x$LDNSCONFIG" = "xno"; then 10450 if test "x$LDNSCONFIG" = "xno"; then
10353 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10354 LDFLAGS="$LDFLAGS -L${withval}/lib"
10355 LIBS="-lldns $LIBS" 10451 LIBS="-lldns $LIBS"
10356 ldns=yes 10452 ldns=yes
10357 else 10453 else
@@ -10379,7 +10475,9 @@ $as_echo_n "checking for ldns support... " >&6; }
10379 10475
10380#include <stdio.h> 10476#include <stdio.h>
10381#include <stdlib.h> 10477#include <stdlib.h>
10382#include <stdint.h> 10478#ifdef HAVE_STDINT_H
10479# include <stdint.h>
10480#endif
10383#include <ldns/ldns.h> 10481#include <ldns/ldns.h>
10384int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); } 10482int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
10385 10483
@@ -10920,6 +11018,34 @@ $as_echo "no" >&6; }
10920 fi 11018 fi
10921fi 11019fi
10922 11020
11021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIC is accepted" >&5
11022$as_echo_n "checking whether -fPIC is accepted... " >&6; }
11023SAVED_CFLAGS="$CFLAGS"
11024CFLAGS="$CFLAGS -fPIC"
11025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026/* end confdefs.h. */
11027 #include <stdlib.h>
11028int
11029main ()
11030{
11031 exit(0);
11032 ;
11033 return 0;
11034}
11035_ACEOF
11036if ac_fn_c_try_compile "$LINENO"; then :
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11038$as_echo "yes" >&6; }
11039 PICFLAG="-fPIC";
11040else
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11042$as_echo "no" >&6; }
11043 PICFLAG="";
11044fi
11045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11046CFLAGS="$SAVED_CFLAGS"
11047
11048
10923for ac_func in \ 11049for ac_func in \
10924 Blowfish_initstate \ 11050 Blowfish_initstate \
10925 Blowfish_expandstate \ 11051 Blowfish_expandstate \
@@ -10951,6 +11077,7 @@ for ac_func in \
10951 fchown \ 11077 fchown \
10952 fchownat \ 11078 fchownat \
10953 flock \ 11079 flock \
11080 fnmatch \
10954 freeaddrinfo \ 11081 freeaddrinfo \
10955 freezero \ 11082 freezero \
10956 fstatfs \ 11083 fstatfs \
@@ -10978,6 +11105,7 @@ for ac_func in \
10978 inet_ntop \ 11105 inet_ntop \
10979 innetgr \ 11106 innetgr \
10980 llabs \ 11107 llabs \
11108 localtime_r \
10981 login_getcapbool \ 11109 login_getcapbool \
10982 md5_crypt \ 11110 md5_crypt \
10983 memmem \ 11111 memmem \
@@ -10995,6 +11123,7 @@ for ac_func in \
10995 raise \ 11123 raise \
10996 readpassphrase \ 11124 readpassphrase \
10997 reallocarray \ 11125 reallocarray \
11126 realpath \
10998 recvmsg \ 11127 recvmsg \
10999 recallocarray \ 11128 recallocarray \
11000 rresvport_af \ 11129 rresvport_af \
@@ -11073,6 +11202,16 @@ fi
11073cat >>confdefs.h <<_ACEOF 11202cat >>confdefs.h <<_ACEOF
11074#define HAVE_DECL_BZERO $ac_have_decl 11203#define HAVE_DECL_BZERO $ac_have_decl
11075_ACEOF 11204_ACEOF
11205ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
11206if test "x$ac_cv_have_decl_memmem" = xyes; then :
11207 ac_have_decl=1
11208else
11209 ac_have_decl=0
11210fi
11211
11212cat >>confdefs.h <<_ACEOF
11213#define HAVE_DECL_MEMMEM $ac_have_decl
11214_ACEOF
11076 11215
11077 11216
11078for ac_func in mblen mbtowc nl_langinfo wcwidth 11217for ac_func in mblen mbtowc nl_langinfo wcwidth
@@ -11160,10 +11299,32 @@ if test "${enable_pkcs11+set}" = set; then :
11160fi 11299fi
11161 11300
11162 11301
11163# PKCS11 depends on OpenSSL. 11302disable_sk=
11164if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then 11303# Check whether --enable-security-key was given.
11165 # PKCS#11 support requires dlopen() and co 11304if test "${enable_security_key+set}" = set; then :
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 11305 enableval=$enable_security_key;
11306 if test "x$enableval" = "xno" ; then
11307 disable_sk=1
11308 fi
11309
11310
11311fi
11312
11313enable_sk_internal=
11314
11315# Check whether --with-security-key-builtin was given.
11316if test "${with_security_key_builtin+set}" = set; then :
11317 withval=$with_security_key_builtin;
11318 if test "x$withval" != "xno" ; then
11319 enable_sk_internal=yes
11320 fi
11321
11322
11323fi
11324
11325test "x$disable_sk" != "x" && enable_sk_internal=""
11326
11327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11167$as_echo_n "checking for library containing dlopen... " >&6; } 11328$as_echo_n "checking for library containing dlopen... " >&6; }
11168if ${ac_cv_search_dlopen+:} false; then : 11329if ${ac_cv_search_dlopen+:} false; then :
11169 $as_echo_n "(cached) " >&6 11330 $as_echo_n "(cached) " >&6
@@ -11216,19 +11377,26 @@ $as_echo "$ac_cv_search_dlopen" >&6; }
11216ac_res=$ac_cv_search_dlopen 11377ac_res=$ac_cv_search_dlopen
11217if test "$ac_res" != no; then : 11378if test "$ac_res" != no; then :
11218 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 11379 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11219 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
11220 11380
11221" 11381fi
11222if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
11223 11382
11224$as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h 11383for ac_func in dlopen
11384do :
11385 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11386if test "x$ac_cv_func_dlopen" = xyes; then :
11387 cat >>confdefs.h <<_ACEOF
11388#define HAVE_DLOPEN 1
11389_ACEOF
11225 11390
11226fi 11391fi
11392done
11227 11393
11394ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
11395"
11396if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
11228 11397
11229fi 11398fi
11230 11399
11231fi
11232 11400
11233# IRIX has a const char return value for gai_strerror() 11401# IRIX has a const char return value for gai_strerror()
11234for ac_func in gai_strerror 11402for ac_func in gai_strerror
@@ -13384,26 +13552,6 @@ fi
13384done 13552done
13385 13553
13386 13554
13387 # Search for RIPE-MD support in OpenSSL
13388 for ac_func in EVP_ripemd160
13389do :
13390 ac_fn_c_check_func "$LINENO" "EVP_ripemd160" "ac_cv_func_EVP_ripemd160"
13391if test "x$ac_cv_func_EVP_ripemd160" = xyes; then :
13392 cat >>confdefs.h <<_ACEOF
13393#define HAVE_EVP_RIPEMD160 1
13394_ACEOF
13395
13396else
13397 unsupported_algorithms="$unsupported_algorithms \
13398 hmac-ripemd160 \
13399 hmac-ripemd160@openssh.com \
13400 hmac-ripemd160-etm@openssh.com"
13401
13402
13403fi
13404done
13405
13406
13407 # Check complete ECC support in OpenSSL 13555 # Check complete ECC support in OpenSSL
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5 13556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5
13409$as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; } 13557$as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; }
@@ -13570,6 +13718,9 @@ _ACEOF
13570fi 13718fi
13571done 13719done
13572 13720
13721 openssl_ecc=yes
13722 else
13723 openssl_ecc=no
13573 fi 13724 fi
13574 if test x$enable_nistp256 = x1; then 13725 if test x$enable_nistp256 = x1; then
13575 13726
@@ -13664,6 +13815,220 @@ done
13664 13815
13665fi 13816fi
13666 13817
13818# PKCS11/U2F depend on OpenSSL and dlopen().
13819enable_pkcs11=yes
13820enable_sk=yes
13821if test "x$openssl" != "xyes" ; then
13822 enable_pkcs11="disabled; missing libcrypto"
13823 enable_sk="disabled; missing libcrypto"
13824fi
13825if test "x$openssl_ecc" != "xyes" ; then
13826 enable_sk="disabled; OpenSSL has no ECC support"
13827fi
13828if test "x$ac_cv_func_dlopen" != "xyes" ; then
13829 enable_pkcs11="disabled; missing dlopen(3)"
13830 enable_sk="disabled; missing dlopen(3)"
13831fi
13832if test "x$ac_cv_have_decl_RTLD_NOW" != "xyes" ; then
13833 enable_pkcs11="disabled; missing RTLD_NOW"
13834 enable_sk="disabled; missing RTLD_NOW"
13835fi
13836if test ! -z "$disable_pkcs11" ; then
13837 enable_pkcs11="disabled by user"
13838fi
13839if test ! -z "$disable_sk" ; then
13840 enable_sk="disabled by user"
13841fi
13842
13843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable PKCS11" >&5
13844$as_echo_n "checking whether to enable PKCS11... " >&6; }
13845if test "x$enable_pkcs11" = "xyes" ; then
13846
13847$as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
13848
13849fi
13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pkcs11" >&5
13851$as_echo "$enable_pkcs11" >&6; }
13852
13853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable U2F" >&5
13854$as_echo_n "checking whether to enable U2F... " >&6; }
13855if test "x$enable_sk" = "xyes" ; then
13856
13857$as_echo "#define ENABLE_SK /**/" >>confdefs.h
13858
13859fi
13860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_sk" >&5
13861$as_echo "$enable_sk" >&6; }
13862
13863# Now check for built-in security key support.
13864if test "x$enable_sk" = "xyes" -a "x$enable_sk_internal" = "xyes" ; then
13865 if test -n "$ac_tool_prefix"; then
13866 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
13867set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
13868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13869$as_echo_n "checking for $ac_word... " >&6; }
13870if ${ac_cv_path_PKGCONFIG+:} false; then :
13871 $as_echo_n "(cached) " >&6
13872else
13873 case $PKGCONFIG in
13874 [\\/]* | ?:[\\/]*)
13875 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
13876 ;;
13877 *)
13878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13879for as_dir in $PATH
13880do
13881 IFS=$as_save_IFS
13882 test -z "$as_dir" && as_dir=.
13883 for ac_exec_ext in '' $ac_executable_extensions; do
13884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13885 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
13886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13887 break 2
13888 fi
13889done
13890 done
13891IFS=$as_save_IFS
13892
13893 ;;
13894esac
13895fi
13896PKGCONFIG=$ac_cv_path_PKGCONFIG
13897if test -n "$PKGCONFIG"; then
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
13899$as_echo "$PKGCONFIG" >&6; }
13900else
13901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13902$as_echo "no" >&6; }
13903fi
13904
13905
13906fi
13907if test -z "$ac_cv_path_PKGCONFIG"; then
13908 ac_pt_PKGCONFIG=$PKGCONFIG
13909 # Extract the first word of "pkg-config", so it can be a program name with args.
13910set dummy pkg-config; ac_word=$2
13911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13912$as_echo_n "checking for $ac_word... " >&6; }
13913if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
13914 $as_echo_n "(cached) " >&6
13915else
13916 case $ac_pt_PKGCONFIG in
13917 [\\/]* | ?:[\\/]*)
13918 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
13919 ;;
13920 *)
13921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13922for as_dir in $PATH
13923do
13924 IFS=$as_save_IFS
13925 test -z "$as_dir" && as_dir=.
13926 for ac_exec_ext in '' $ac_executable_extensions; do
13927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13928 ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
13929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13930 break 2
13931 fi
13932done
13933 done
13934IFS=$as_save_IFS
13935
13936 ;;
13937esac
13938fi
13939ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
13940if test -n "$ac_pt_PKGCONFIG"; then
13941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
13942$as_echo "$ac_pt_PKGCONFIG" >&6; }
13943else
13944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13945$as_echo "no" >&6; }
13946fi
13947
13948 if test "x$ac_pt_PKGCONFIG" = x; then
13949 PKGCONFIG="no"
13950 else
13951 case $cross_compiling:$ac_tool_warned in
13952yes:)
13953{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13954$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13955ac_tool_warned=yes ;;
13956esac
13957 PKGCONFIG=$ac_pt_PKGCONFIG
13958 fi
13959else
13960 PKGCONFIG="$ac_cv_path_PKGCONFIG"
13961fi
13962
13963 use_pkgconfig_for_libfido2=
13964 if test "x$PKGCONFIG" != "xno"; then
13965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libfido2" >&5
13966$as_echo_n "checking if $PKGCONFIG knows about libfido2... " >&6; }
13967 if "$PKGCONFIG" libfido2; then
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13969$as_echo "yes" >&6; }
13970 use_pkgconfig_for_libfido2=yes
13971 else
13972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13973$as_echo "no" >&6; }
13974 fi
13975 fi
13976 if test "x$use_pkgconfig_for_libfido2" = "xyes"; then
13977 LIBFIDO2=`$PKGCONFIG --libs libfido2`
13978 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libfido2`"
13979 else
13980 LIBFIDO2="-lfido2 -lcbor"
13981 fi
13982 OTHERLIBS=`echo $LIBFIDO2 | sed 's/-lfido2//'`
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fido_init in -lfido2" >&5
13984$as_echo_n "checking for fido_init in -lfido2... " >&6; }
13985if ${ac_cv_lib_fido2_fido_init+:} false; then :
13986 $as_echo_n "(cached) " >&6
13987else
13988 ac_check_lib_save_LIBS=$LIBS
13989LIBS="-lfido2 $OTHERLIBS
13990 $LIBS"
13991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13992/* end confdefs.h. */
13993
13994/* Override any GCC internal prototype to avoid an error.
13995 Use char because int might match the return type of a GCC
13996 builtin and then its argument prototype would still apply. */
13997#ifdef __cplusplus
13998extern "C"
13999#endif
14000char fido_init ();
14001int
14002main ()
14003{
14004return fido_init ();
14005 ;
14006 return 0;
14007}
14008_ACEOF
14009if ac_fn_c_try_link "$LINENO"; then :
14010 ac_cv_lib_fido2_fido_init=yes
14011else
14012 ac_cv_lib_fido2_fido_init=no
14013fi
14014rm -f core conftest.err conftest.$ac_objext \
14015 conftest$ac_exeext conftest.$ac_ext
14016LIBS=$ac_check_lib_save_LIBS
14017fi
14018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fido2_fido_init" >&5
14019$as_echo "$ac_cv_lib_fido2_fido_init" >&6; }
14020if test "x$ac_cv_lib_fido2_fido_init" = xyes; then :
14021
14022
14023
14024$as_echo "#define ENABLE_SK_INTERNAL /**/" >>confdefs.h
14025
14026 enable_sk="built-in"
14027
14028fi
14029
14030fi
14031
13667for ac_func in \ 14032for ac_func in \
13668 arc4random \ 14033 arc4random \
13669 arc4random_buf \ 14034 arc4random_buf \
@@ -14756,6 +15121,28 @@ fi
14756 15121
14757fi 15122fi
14758 15123
15124ac_fn_c_check_decl "$LINENO" "UINT32_MAX" "ac_cv_have_decl_UINT32_MAX" "
15125#ifdef HAVE_SYS_LIMITS_H
15126# include <sys/limits.h>
15127#endif
15128#ifdef HAVE_LIMITS_H
15129# include <limits.h>
15130#endif
15131#ifdef HAVE_STDINT_H
15132# include <stdint.h>
15133#endif
15134
15135"
15136if test "x$ac_cv_have_decl_UINT32_MAX" = xyes; then :
15137 ac_have_decl=1
15138else
15139 ac_have_decl=0
15140fi
15141
15142cat >>confdefs.h <<_ACEOF
15143#define HAVE_DECL_UINT32_MAX $ac_have_decl
15144_ACEOF
15145
14759 15146
14760# More checks for data types 15147# More checks for data types
14761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5 15148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
@@ -15215,7 +15602,9 @@ fi
15215 15602
15216ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" " 15603ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "
15217#include <sys/types.h> 15604#include <sys/types.h>
15218#include <stdint.h> 15605#ifdef HAVE_STDINT_H
15606# include <stdint.h>
15607#endif
15219 15608
15220" 15609"
15221if test "x$ac_cv_type_intmax_t" = xyes; then : 15610if test "x$ac_cv_type_intmax_t" = xyes; then :
@@ -15228,7 +15617,9 @@ _ACEOF
15228fi 15617fi
15229ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" " 15618ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "
15230#include <sys/types.h> 15619#include <sys/types.h>
15231#include <stdint.h> 15620#ifdef HAVE_STDINT_H
15621# include <stdint.h>
15622#endif
15232 15623
15233" 15624"
15234if test "x$ac_cv_type_uintmax_t" = xyes; then : 15625if test "x$ac_cv_type_uintmax_t" = xyes; then :
@@ -15361,7 +15752,36 @@ _ACEOF
15361fi 15752fi
15362 15753
15363 15754
15755ac_fn_c_check_member "$LINENO" "struct statfs" "f_files" "ac_cv_member_struct_statfs_f_files" "
15756#include <sys/param.h>
15757#include <sys/types.h>
15758#ifdef HAVE_SYS_BITYPES_H
15759#include <sys/bitypes.h>
15760#endif
15761#ifdef HAVE_SYS_STATFS_H
15762#include <sys/statfs.h>
15763#endif
15764#ifdef HAVE_SYS_STATVFS_H
15765#include <sys/statvfs.h>
15766#endif
15767#ifdef HAVE_SYS_VFS_H
15768#include <sys/vfs.h>
15769#endif
15770#ifdef HAVE_SYS_MOUNT_H
15771#include <sys/mount.h>
15772#endif
15773
15774"
15775if test "x$ac_cv_member_struct_statfs_f_files" = xyes; then :
15776
15777cat >>confdefs.h <<_ACEOF
15778#define HAVE_STRUCT_STATFS_F_FILES 1
15779_ACEOF
15780
15781
15782fi
15364ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" " 15783ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" "
15784#include <sys/param.h>
15365#include <sys/types.h> 15785#include <sys/types.h>
15366#ifdef HAVE_SYS_BITYPES_H 15786#ifdef HAVE_SYS_BITYPES_H
15367#include <sys/bitypes.h> 15787#include <sys/bitypes.h>
@@ -15375,6 +15795,9 @@ ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_st
15375#ifdef HAVE_SYS_VFS_H 15795#ifdef HAVE_SYS_VFS_H
15376#include <sys/vfs.h> 15796#include <sys/vfs.h>
15377#endif 15797#endif
15798#ifdef HAVE_SYS_MOUNT_H
15799#include <sys/mount.h>
15800#endif
15378 15801
15379" 15802"
15380if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then : 15803if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then :
@@ -15807,6 +16230,42 @@ $as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
15807 16230
15808fi 16231fi
15809 16232
16233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
16234$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
16235if ${ac_cv_header_time+:} false; then :
16236 $as_echo_n "(cached) " >&6
16237else
16238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16239/* end confdefs.h. */
16240#include <sys/types.h>
16241#include <sys/time.h>
16242#include <time.h>
16243
16244int
16245main ()
16246{
16247if ((struct tm *) 0)
16248return 0;
16249 ;
16250 return 0;
16251}
16252_ACEOF
16253if ac_fn_c_try_compile "$LINENO"; then :
16254 ac_cv_header_time=yes
16255else
16256 ac_cv_header_time=no
16257fi
16258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16259fi
16260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
16261$as_echo "$ac_cv_header_time" >&6; }
16262if test $ac_cv_header_time = yes; then
16263
16264$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
16265
16266fi
16267
16268
15810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 16269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
15811$as_echo_n "checking for struct timeval... " >&6; } 16270$as_echo_n "checking for struct timeval... " >&6; }
15812if ${ac_cv_have_struct_timeval+:} false; then : 16271if ${ac_cv_have_struct_timeval+:} false; then :
@@ -15842,16 +16301,51 @@ $as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
15842 have_struct_timeval=1 16301 have_struct_timeval=1
15843fi 16302fi
15844 16303
15845ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default" 16304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
15846if test "x$ac_cv_type_struct_timespec" = xyes; then : 16305$as_echo_n "checking for struct timespec... " >&6; }
16306if ${ac_cv_have_struct_timespec+:} false; then :
16307 $as_echo_n "(cached) " >&6
16308else
15847 16309
15848cat >>confdefs.h <<_ACEOF 16310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15849#define HAVE_STRUCT_TIMESPEC 1 16311/* end confdefs.h. */
16312
16313 #ifdef TIME_WITH_SYS_TIME
16314 # include <sys/time.h>
16315 # include <time.h>
16316 #else
16317 # ifdef HAVE_SYS_TIME_H
16318 # include <sys/time.h>
16319 # else
16320 # include <time.h>
16321 # endif
16322 #endif
16323
16324int
16325main ()
16326{
16327 struct timespec ts; ts.tv_sec = 1;
16328 ;
16329 return 0;
16330}
15850_ACEOF 16331_ACEOF
16332if ac_fn_c_try_compile "$LINENO"; then :
16333 ac_cv_have_struct_timespec="yes"
16334else
16335 ac_cv_have_struct_timespec="no"
15851 16336
16337fi
16338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15852 16339
15853fi 16340fi
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timespec" >&5
16342$as_echo "$ac_cv_have_struct_timespec" >&6; }
16343if test "x$ac_cv_have_struct_timespec" = "xyes" ; then
16344
16345$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
15854 16346
16347 have_struct_timespec=1
16348fi
15855 16349
15856# We need int64_t or else certain parts of the compile will fail. 16350# We need int64_t or else certain parts of the compile will fail.
15857if test "x$ac_cv_have_int64_t" = "xno" && \ 16351if test "x$ac_cv_have_int64_t" = "xno" && \
@@ -19428,6 +19922,12 @@ DEPEND=$(cat $srcdir/.depend)
19428CFLAGS="${CFLAGS} ${CFLAGS_AFTER}" 19922CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
19429LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}" 19923LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
19430 19924
19925# Make a copy of CFLAGS/LDFLAGS without PIE options.
19926LDFLAGS_NOPIE=`echo "$LDFLAGS" | sed 's/ -pie//'`
19927CFLAGS_NOPIE=`echo "$CFLAGS" | sed 's/ -fPIE//'`
19928
19929
19930
19431 19931
19432ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh" 19932ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
19433 19933
@@ -20777,6 +21277,8 @@ echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
20777echo " BSD Auth support: $BSD_AUTH_MSG" 21277echo " BSD Auth support: $BSD_AUTH_MSG"
20778echo " Random number source: $RAND_MSG" 21278echo " Random number source: $RAND_MSG"
20779echo " Privsep sandbox style: $SANDBOX_STYLE" 21279echo " Privsep sandbox style: $SANDBOX_STYLE"
21280echo " PKCS#11 support: $enable_pkcs11"
21281echo " U2F/FIDO support: $enable_sk"
20780 21282
20781echo "" 21283echo ""
20782 21284