diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 1006 |
1 files changed, 924 insertions, 82 deletions
@@ -1,5 +1,5 @@ | |||
1 | #! /bin/sh | 1 | #! /bin/sh |
2 | # From configure.ac Revision: 1.536 . | 2 | # From configure.ac Revision: 1.568 . |
3 | # Guess values for system-dependent variables and create Makefiles. | 3 | # Guess values for system-dependent variables and create Makefiles. |
4 | # Generated by GNU Autoconf 2.68 for OpenSSH Portable. | 4 | # Generated by GNU Autoconf 2.68 for OpenSSH Portable. |
5 | # | 5 | # |
@@ -606,6 +606,7 @@ ac_includes_default="\ | |||
606 | ac_subst_vars='LTLIBOBJS | 606 | ac_subst_vars='LTLIBOBJS |
607 | LIBOBJS | 607 | LIBOBJS |
608 | UNSUPPORTED_ALGORITHMS | 608 | UNSUPPORTED_ALGORITHMS |
609 | TEST_MALLOC_OPTIONS | ||
609 | TEST_SSH_IPV6 | 610 | TEST_SSH_IPV6 |
610 | piddir | 611 | piddir |
611 | user_path | 612 | user_path |
@@ -623,7 +624,6 @@ SSHLIBS | |||
623 | SSH_PRIVSEP_USER | 624 | SSH_PRIVSEP_USER |
624 | COMMENT_OUT_ECC | 625 | COMMENT_OUT_ECC |
625 | TEST_SSH_ECC | 626 | TEST_SSH_ECC |
626 | TEST_SSH_SHA256 | ||
627 | LIBEDIT | 627 | LIBEDIT |
628 | PKGCONFIG | 628 | PKGCONFIG |
629 | LD | 629 | LD |
@@ -712,6 +712,7 @@ ac_user_opts=' | |||
712 | enable_option_checking | 712 | enable_option_checking |
713 | enable_largefile | 713 | enable_largefile |
714 | with_stackprotect | 714 | with_stackprotect |
715 | with_hardening | ||
715 | with_rpath | 716 | with_rpath |
716 | with_cflags | 717 | with_cflags |
717 | with_cppflags | 718 | with_cppflags |
@@ -728,6 +729,7 @@ with_tcp_wrappers | |||
728 | with_ldns | 729 | with_ldns |
729 | with_libedit | 730 | with_libedit |
730 | with_audit | 731 | with_audit |
732 | with_pie | ||
731 | with_ssl_dir | 733 | with_ssl_dir |
732 | with_openssl_header_check | 734 | with_openssl_header_check |
733 | with_ssl_engine | 735 | with_ssl_engine |
@@ -1403,6 +1405,7 @@ Optional Packages: | |||
1403 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | 1405 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
1404 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | 1406 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
1405 | --without-stackprotect Don't use compiler's stack protection | 1407 | --without-stackprotect Don't use compiler's stack protection |
1408 | --without-hardening Don't use toolchain hardening flags | ||
1406 | --without-rpath Disable auto-added -R linker paths | 1409 | --without-rpath Disable auto-added -R linker paths |
1407 | --with-cflags Specify additional flags to pass to compiler | 1410 | --with-cflags Specify additional flags to pass to compiler |
1408 | --with-cppflags Specify additional flags to pass to preprocessor | 1411 | --with-cppflags Specify additional flags to pass to preprocessor |
@@ -1419,6 +1422,7 @@ Optional Packages: | |||
1419 | --with-ldns[=PATH] Use ldns for DNSSEC support (optionally in PATH) | 1422 | --with-ldns[=PATH] Use ldns for DNSSEC support (optionally in PATH) |
1420 | --with-libedit[=PATH] Enable libedit support for sftp | 1423 | --with-libedit[=PATH] Enable libedit support for sftp |
1421 | --with-audit=module Enable audit support (modules=debug,bsm,linux) | 1424 | --with-audit=module Enable audit support (modules=debug,bsm,linux) |
1425 | --with-pie Build Position Independent Executables if possible | ||
1422 | --with-ssl-dir=PATH Specify path to OpenSSL installation | 1426 | --with-ssl-dir=PATH Specify path to OpenSSL installation |
1423 | --without-openssl-header-check Disable OpenSSL version consistency check | 1427 | --without-openssl-header-check Disable OpenSSL version consistency check |
1424 | --with-ssl-engine Enable OpenSSL (hardware) ENGINE support | 1428 | --with-ssl-engine Enable OpenSSL (hardware) ENGINE support |
@@ -1426,7 +1430,7 @@ Optional Packages: | |||
1426 | --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool) | 1430 | --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool) |
1427 | --with-pam Enable PAM support | 1431 | --with-pam Enable PAM support |
1428 | --with-privsep-user=user Specify non-privileged user for privilege separation | 1432 | --with-privsep-user=user Specify non-privileged user for privilege separation |
1429 | --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter) | 1433 | --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter, capsicum) |
1430 | --with-selinux Enable SELinux support | 1434 | --with-selinux Enable SELinux support |
1431 | --with-kerberos5=PATH Enable Kerberos 5 support | 1435 | --with-kerberos5=PATH Enable Kerberos 5 support |
1432 | --with-consolekit Enable ConsoleKit support | 1436 | --with-consolekit Enable ConsoleKit support |
@@ -5592,7 +5596,9 @@ if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then : | |||
5592 | have_linux_no_new_privs=1 | 5596 | have_linux_no_new_privs=1 |
5593 | fi | 5597 | fi |
5594 | 5598 | ||
5599 | |||
5595 | use_stack_protector=1 | 5600 | use_stack_protector=1 |
5601 | use_toolchain_hardening=1 | ||
5596 | 5602 | ||
5597 | # Check whether --with-stackprotect was given. | 5603 | # Check whether --with-stackprotect was given. |
5598 | if test "${with_stackprotect+set}" = set; then : | 5604 | if test "${with_stackprotect+set}" = set; then : |
@@ -5603,18 +5609,61 @@ if test "${with_stackprotect+set}" = set; then : | |||
5603 | fi | 5609 | fi |
5604 | 5610 | ||
5605 | 5611 | ||
5612 | # Check whether --with-hardening was given. | ||
5613 | if test "${with_hardening+set}" = set; then : | ||
5614 | withval=$with_hardening; | ||
5615 | if test "x$withval" = "xno"; then | ||
5616 | use_toolchain_hardening=0 | ||
5617 | fi | ||
5618 | fi | ||
5619 | |||
5620 | |||
5621 | # We use -Werror for the tests only so that we catch warnings like "this is | ||
5622 | # on by default" for things like -fPIE. | ||
5623 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5 | ||
5624 | $as_echo_n "checking if $CC supports -Werror... " >&6; } | ||
5625 | saved_CFLAGS="$CFLAGS" | ||
5626 | CFLAGS="$CFLAGS -Werror" | ||
5627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
5628 | /* end confdefs.h. */ | ||
5629 | int main(void) { return 0; } | ||
5630 | _ACEOF | ||
5631 | if ac_fn_c_try_compile "$LINENO"; then : | ||
5632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
5633 | $as_echo "yes" >&6; } | ||
5634 | WERROR="-Werror" | ||
5635 | else | ||
5636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
5637 | $as_echo "no" >&6; } | ||
5638 | WERROR="" | ||
5639 | |||
5640 | fi | ||
5641 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
5642 | CFLAGS="$saved_CFLAGS" | ||
5606 | 5643 | ||
5607 | if test "$GCC" = "yes" || test "$GCC" = "egcs"; then | 5644 | if test "$GCC" = "yes" || test "$GCC" = "egcs"; then |
5608 | { | 5645 | { |
5609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Qunused-arguments -Werror" >&5 | 5646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Qunused-arguments" >&5 |
5610 | $as_echo_n "checking if $CC supports -Qunused-arguments -Werror... " >&6; } | 5647 | $as_echo_n "checking if $CC supports compile flag -Qunused-arguments... " >&6; } |
5611 | saved_CFLAGS="$CFLAGS" | 5648 | saved_CFLAGS="$CFLAGS" |
5612 | CFLAGS="$CFLAGS -Qunused-arguments -Werror" | 5649 | CFLAGS="$CFLAGS $WERROR -Qunused-arguments" |
5613 | _define_flag="-Qunused-arguments" | 5650 | _define_flag="" |
5614 | test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments -Werror" | 5651 | test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments" |
5615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5616 | /* end confdefs.h. */ | 5653 | /* end confdefs.h. */ |
5617 | int main(void) { return 0; } | 5654 | |
5655 | #include <stdlib.h> | ||
5656 | #include <stdio.h> | ||
5657 | int main(int argc, char **argv) { | ||
5658 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
5659 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
5660 | float l = i * 2.1; | ||
5661 | double m = l / 0.5; | ||
5662 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
5663 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
5664 | exit(0); | ||
5665 | } | ||
5666 | |||
5618 | _ACEOF | 5667 | _ACEOF |
5619 | if ac_fn_c_try_compile "$LINENO"; then : | 5668 | if ac_fn_c_try_compile "$LINENO"; then : |
5620 | 5669 | ||
@@ -5637,15 +5686,27 @@ fi | |||
5637 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 5686 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5638 | } | 5687 | } |
5639 | { | 5688 | { |
5640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunknown-warning-option -Werror" >&5 | 5689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunknown-warning-option" >&5 |
5641 | $as_echo_n "checking if $CC supports -Wunknown-warning-option -Werror... " >&6; } | 5690 | $as_echo_n "checking if $CC supports compile flag -Wunknown-warning-option... " >&6; } |
5642 | saved_CFLAGS="$CFLAGS" | 5691 | saved_CFLAGS="$CFLAGS" |
5643 | CFLAGS="$CFLAGS -Wunknown-warning-option -Werror" | 5692 | CFLAGS="$CFLAGS $WERROR -Wunknown-warning-option" |
5644 | _define_flag="-Wno-unknown-warning-option" | 5693 | _define_flag="" |
5645 | test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option -Werror" | 5694 | test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option" |
5646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5647 | /* end confdefs.h. */ | 5696 | /* end confdefs.h. */ |
5648 | int main(void) { return 0; } | 5697 | |
5698 | #include <stdlib.h> | ||
5699 | #include <stdio.h> | ||
5700 | int main(int argc, char **argv) { | ||
5701 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
5702 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
5703 | float l = i * 2.1; | ||
5704 | double m = l / 0.5; | ||
5705 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
5706 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
5707 | exit(0); | ||
5708 | } | ||
5709 | |||
5649 | _ACEOF | 5710 | _ACEOF |
5650 | if ac_fn_c_try_compile "$LINENO"; then : | 5711 | if ac_fn_c_try_compile "$LINENO"; then : |
5651 | 5712 | ||
@@ -5668,15 +5729,27 @@ fi | |||
5668 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 5729 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5669 | } | 5730 | } |
5670 | { | 5731 | { |
5671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5 | 5732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wall" >&5 |
5672 | $as_echo_n "checking if $CC supports -Wall... " >&6; } | 5733 | $as_echo_n "checking if $CC supports compile flag -Wall... " >&6; } |
5673 | saved_CFLAGS="$CFLAGS" | 5734 | saved_CFLAGS="$CFLAGS" |
5674 | CFLAGS="$CFLAGS -Wall" | 5735 | CFLAGS="$CFLAGS $WERROR -Wall" |
5675 | _define_flag="" | 5736 | _define_flag="" |
5676 | test "x$_define_flag" = "x" && _define_flag="-Wall" | 5737 | test "x$_define_flag" = "x" && _define_flag="-Wall" |
5677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5678 | /* end confdefs.h. */ | 5739 | /* end confdefs.h. */ |
5679 | int main(void) { return 0; } | 5740 | |
5741 | #include <stdlib.h> | ||
5742 | #include <stdio.h> | ||
5743 | int main(int argc, char **argv) { | ||
5744 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
5745 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
5746 | float l = i * 2.1; | ||
5747 | double m = l / 0.5; | ||
5748 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
5749 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
5750 | exit(0); | ||
5751 | } | ||
5752 | |||
5680 | _ACEOF | 5753 | _ACEOF |
5681 | if ac_fn_c_try_compile "$LINENO"; then : | 5754 | if ac_fn_c_try_compile "$LINENO"; then : |
5682 | 5755 | ||
@@ -5699,15 +5772,27 @@ fi | |||
5699 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 5772 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5700 | } | 5773 | } |
5701 | { | 5774 | { |
5702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5 | 5775 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-arith" >&5 |
5703 | $as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; } | 5776 | $as_echo_n "checking if $CC supports compile flag -Wpointer-arith... " >&6; } |
5704 | saved_CFLAGS="$CFLAGS" | 5777 | saved_CFLAGS="$CFLAGS" |
5705 | CFLAGS="$CFLAGS -Wpointer-arith" | 5778 | CFLAGS="$CFLAGS $WERROR -Wpointer-arith" |
5706 | _define_flag="" | 5779 | _define_flag="" |
5707 | test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith" | 5780 | test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith" |
5708 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5781 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5709 | /* end confdefs.h. */ | 5782 | /* end confdefs.h. */ |
5710 | int main(void) { return 0; } | 5783 | |
5784 | #include <stdlib.h> | ||
5785 | #include <stdio.h> | ||
5786 | int main(int argc, char **argv) { | ||
5787 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
5788 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
5789 | float l = i * 2.1; | ||
5790 | double m = l / 0.5; | ||
5791 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
5792 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
5793 | exit(0); | ||
5794 | } | ||
5795 | |||
5711 | _ACEOF | 5796 | _ACEOF |
5712 | if ac_fn_c_try_compile "$LINENO"; then : | 5797 | if ac_fn_c_try_compile "$LINENO"; then : |
5713 | 5798 | ||
@@ -5730,15 +5815,27 @@ fi | |||
5730 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 5815 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5731 | } | 5816 | } |
5732 | { | 5817 | { |
5733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5 | 5818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wuninitialized" >&5 |
5734 | $as_echo_n "checking if $CC supports -Wuninitialized... " >&6; } | 5819 | $as_echo_n "checking if $CC supports compile flag -Wuninitialized... " >&6; } |
5735 | saved_CFLAGS="$CFLAGS" | 5820 | saved_CFLAGS="$CFLAGS" |
5736 | CFLAGS="$CFLAGS -Wuninitialized" | 5821 | CFLAGS="$CFLAGS $WERROR -Wuninitialized" |
5737 | _define_flag="" | 5822 | _define_flag="" |
5738 | test "x$_define_flag" = "x" && _define_flag="-Wuninitialized" | 5823 | test "x$_define_flag" = "x" && _define_flag="-Wuninitialized" |
5739 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5824 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5740 | /* end confdefs.h. */ | 5825 | /* end confdefs.h. */ |
5741 | int main(void) { return 0; } | 5826 | |
5827 | #include <stdlib.h> | ||
5828 | #include <stdio.h> | ||
5829 | int main(int argc, char **argv) { | ||
5830 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
5831 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
5832 | float l = i * 2.1; | ||
5833 | double m = l / 0.5; | ||
5834 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
5835 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
5836 | exit(0); | ||
5837 | } | ||
5838 | |||
5742 | _ACEOF | 5839 | _ACEOF |
5743 | if ac_fn_c_try_compile "$LINENO"; then : | 5840 | if ac_fn_c_try_compile "$LINENO"; then : |
5744 | 5841 | ||
@@ -5761,15 +5858,27 @@ fi | |||
5761 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 5858 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5762 | } | 5859 | } |
5763 | { | 5860 | { |
5764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsign-compare" >&5 | 5861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsign-compare" >&5 |
5765 | $as_echo_n "checking if $CC supports -Wsign-compare... " >&6; } | 5862 | $as_echo_n "checking if $CC supports compile flag -Wsign-compare... " >&6; } |
5766 | saved_CFLAGS="$CFLAGS" | 5863 | saved_CFLAGS="$CFLAGS" |
5767 | CFLAGS="$CFLAGS -Wsign-compare" | 5864 | CFLAGS="$CFLAGS $WERROR -Wsign-compare" |
5768 | _define_flag="" | 5865 | _define_flag="" |
5769 | test "x$_define_flag" = "x" && _define_flag="-Wsign-compare" | 5866 | test "x$_define_flag" = "x" && _define_flag="-Wsign-compare" |
5770 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5771 | /* end confdefs.h. */ | 5868 | /* end confdefs.h. */ |
5772 | int main(void) { return 0; } | 5869 | |
5870 | #include <stdlib.h> | ||
5871 | #include <stdio.h> | ||
5872 | int main(int argc, char **argv) { | ||
5873 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
5874 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
5875 | float l = i * 2.1; | ||
5876 | double m = l / 0.5; | ||
5877 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
5878 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
5879 | exit(0); | ||
5880 | } | ||
5881 | |||
5773 | _ACEOF | 5882 | _ACEOF |
5774 | if ac_fn_c_try_compile "$LINENO"; then : | 5883 | if ac_fn_c_try_compile "$LINENO"; then : |
5775 | 5884 | ||
@@ -5792,15 +5901,27 @@ fi | |||
5792 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 5901 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5793 | } | 5902 | } |
5794 | { | 5903 | { |
5795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat-security" >&5 | 5904 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wformat-security" >&5 |
5796 | $as_echo_n "checking if $CC supports -Wformat-security... " >&6; } | 5905 | $as_echo_n "checking if $CC supports compile flag -Wformat-security... " >&6; } |
5797 | saved_CFLAGS="$CFLAGS" | 5906 | saved_CFLAGS="$CFLAGS" |
5798 | CFLAGS="$CFLAGS -Wformat-security" | 5907 | CFLAGS="$CFLAGS $WERROR -Wformat-security" |
5799 | _define_flag="" | 5908 | _define_flag="" |
5800 | test "x$_define_flag" = "x" && _define_flag="-Wformat-security" | 5909 | test "x$_define_flag" = "x" && _define_flag="-Wformat-security" |
5801 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5802 | /* end confdefs.h. */ | 5911 | /* end confdefs.h. */ |
5803 | int main(void) { return 0; } | 5912 | |
5913 | #include <stdlib.h> | ||
5914 | #include <stdio.h> | ||
5915 | int main(int argc, char **argv) { | ||
5916 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
5917 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
5918 | float l = i * 2.1; | ||
5919 | double m = l / 0.5; | ||
5920 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
5921 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
5922 | exit(0); | ||
5923 | } | ||
5924 | |||
5804 | _ACEOF | 5925 | _ACEOF |
5805 | if ac_fn_c_try_compile "$LINENO"; then : | 5926 | if ac_fn_c_try_compile "$LINENO"; then : |
5806 | 5927 | ||
@@ -5823,15 +5944,27 @@ fi | |||
5823 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 5944 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5824 | } | 5945 | } |
5825 | { | 5946 | { |
5826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsizeof-pointer-memaccess" >&5 | 5947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsizeof-pointer-memaccess" >&5 |
5827 | $as_echo_n "checking if $CC supports -Wsizeof-pointer-memaccess... " >&6; } | 5948 | $as_echo_n "checking if $CC supports compile flag -Wsizeof-pointer-memaccess... " >&6; } |
5828 | saved_CFLAGS="$CFLAGS" | 5949 | saved_CFLAGS="$CFLAGS" |
5829 | CFLAGS="$CFLAGS -Wsizeof-pointer-memaccess" | 5950 | CFLAGS="$CFLAGS $WERROR -Wsizeof-pointer-memaccess" |
5830 | _define_flag="" | 5951 | _define_flag="" |
5831 | test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess" | 5952 | test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess" |
5832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5833 | /* end confdefs.h. */ | 5954 | /* end confdefs.h. */ |
5834 | int main(void) { return 0; } | 5955 | |
5956 | #include <stdlib.h> | ||
5957 | #include <stdio.h> | ||
5958 | int main(int argc, char **argv) { | ||
5959 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
5960 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
5961 | float l = i * 2.1; | ||
5962 | double m = l / 0.5; | ||
5963 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
5964 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
5965 | exit(0); | ||
5966 | } | ||
5967 | |||
5835 | _ACEOF | 5968 | _ACEOF |
5836 | if ac_fn_c_try_compile "$LINENO"; then : | 5969 | if ac_fn_c_try_compile "$LINENO"; then : |
5837 | 5970 | ||
@@ -5854,15 +5987,27 @@ fi | |||
5854 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 5987 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5855 | } | 5988 | } |
5856 | { | 5989 | { |
5857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-sign" >&5 | 5990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-sign" >&5 |
5858 | $as_echo_n "checking if $CC supports -Wpointer-sign... " >&6; } | 5991 | $as_echo_n "checking if $CC supports compile flag -Wpointer-sign... " >&6; } |
5859 | saved_CFLAGS="$CFLAGS" | 5992 | saved_CFLAGS="$CFLAGS" |
5860 | CFLAGS="$CFLAGS -Wpointer-sign" | 5993 | CFLAGS="$CFLAGS $WERROR -Wpointer-sign" |
5861 | _define_flag="-Wno-pointer-sign" | 5994 | _define_flag="-Wno-pointer-sign" |
5862 | test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign" | 5995 | test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign" |
5863 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 5996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5864 | /* end confdefs.h. */ | 5997 | /* end confdefs.h. */ |
5865 | int main(void) { return 0; } | 5998 | |
5999 | #include <stdlib.h> | ||
6000 | #include <stdio.h> | ||
6001 | int main(int argc, char **argv) { | ||
6002 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
6003 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
6004 | float l = i * 2.1; | ||
6005 | double m = l / 0.5; | ||
6006 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
6007 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
6008 | exit(0); | ||
6009 | } | ||
6010 | |||
5866 | _ACEOF | 6011 | _ACEOF |
5867 | if ac_fn_c_try_compile "$LINENO"; then : | 6012 | if ac_fn_c_try_compile "$LINENO"; then : |
5868 | 6013 | ||
@@ -5885,15 +6030,27 @@ fi | |||
5885 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 6030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5886 | } | 6031 | } |
5887 | { | 6032 | { |
5888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused-result" >&5 | 6033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunused-result" >&5 |
5889 | $as_echo_n "checking if $CC supports -Wunused-result... " >&6; } | 6034 | $as_echo_n "checking if $CC supports compile flag -Wunused-result... " >&6; } |
5890 | saved_CFLAGS="$CFLAGS" | 6035 | saved_CFLAGS="$CFLAGS" |
5891 | CFLAGS="$CFLAGS -Wunused-result" | 6036 | CFLAGS="$CFLAGS $WERROR -Wunused-result" |
5892 | _define_flag="-Wno-unused-result" | 6037 | _define_flag="-Wno-unused-result" |
5893 | test "x$_define_flag" = "x" && _define_flag="-Wunused-result" | 6038 | test "x$_define_flag" = "x" && _define_flag="-Wunused-result" |
5894 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 6039 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5895 | /* end confdefs.h. */ | 6040 | /* end confdefs.h. */ |
5896 | int main(void) { return 0; } | 6041 | |
6042 | #include <stdlib.h> | ||
6043 | #include <stdio.h> | ||
6044 | int main(int argc, char **argv) { | ||
6045 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
6046 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
6047 | float l = i * 2.1; | ||
6048 | double m = l / 0.5; | ||
6049 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
6050 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
6051 | exit(0); | ||
6052 | } | ||
6053 | |||
5897 | _ACEOF | 6054 | _ACEOF |
5898 | if ac_fn_c_try_compile "$LINENO"; then : | 6055 | if ac_fn_c_try_compile "$LINENO"; then : |
5899 | 6056 | ||
@@ -5916,15 +6073,27 @@ fi | |||
5916 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 6073 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5917 | } | 6074 | } |
5918 | { | 6075 | { |
5919 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fno-strict-aliasing" >&5 | 6076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5 |
5920 | $as_echo_n "checking if $CC supports -fno-strict-aliasing... " >&6; } | 6077 | $as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; } |
5921 | saved_CFLAGS="$CFLAGS" | 6078 | saved_CFLAGS="$CFLAGS" |
5922 | CFLAGS="$CFLAGS -fno-strict-aliasing" | 6079 | CFLAGS="$CFLAGS $WERROR -fno-strict-aliasing" |
5923 | _define_flag="" | 6080 | _define_flag="" |
5924 | test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing" | 6081 | test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing" |
5925 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 6082 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5926 | /* end confdefs.h. */ | 6083 | /* end confdefs.h. */ |
5927 | int main(void) { return 0; } | 6084 | |
6085 | #include <stdlib.h> | ||
6086 | #include <stdio.h> | ||
6087 | int main(int argc, char **argv) { | ||
6088 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
6089 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
6090 | float l = i * 2.1; | ||
6091 | double m = l / 0.5; | ||
6092 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
6093 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
6094 | exit(0); | ||
6095 | } | ||
6096 | |||
5928 | _ACEOF | 6097 | _ACEOF |
5929 | if ac_fn_c_try_compile "$LINENO"; then : | 6098 | if ac_fn_c_try_compile "$LINENO"; then : |
5930 | 6099 | ||
@@ -5947,15 +6116,27 @@ fi | |||
5947 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 6116 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5948 | } | 6117 | } |
5949 | { | 6118 | { |
5950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -D_FORTIFY_SOURCE=2" >&5 | 6119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -D_FORTIFY_SOURCE=2" >&5 |
5951 | $as_echo_n "checking if $CC supports -D_FORTIFY_SOURCE=2... " >&6; } | 6120 | $as_echo_n "checking if $CC supports compile flag -D_FORTIFY_SOURCE=2... " >&6; } |
5952 | saved_CFLAGS="$CFLAGS" | 6121 | saved_CFLAGS="$CFLAGS" |
5953 | CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" | 6122 | CFLAGS="$CFLAGS $WERROR -D_FORTIFY_SOURCE=2" |
5954 | _define_flag="" | 6123 | _define_flag="" |
5955 | test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2" | 6124 | test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2" |
5956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 6125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5957 | /* end confdefs.h. */ | 6126 | /* end confdefs.h. */ |
5958 | int main(void) { return 0; } | 6127 | |
6128 | #include <stdlib.h> | ||
6129 | #include <stdio.h> | ||
6130 | int main(int argc, char **argv) { | ||
6131 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
6132 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
6133 | float l = i * 2.1; | ||
6134 | double m = l / 0.5; | ||
6135 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
6136 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
6137 | exit(0); | ||
6138 | } | ||
6139 | |||
5959 | _ACEOF | 6140 | _ACEOF |
5960 | if ac_fn_c_try_compile "$LINENO"; then : | 6141 | if ac_fn_c_try_compile "$LINENO"; then : |
5961 | 6142 | ||
@@ -5977,6 +6158,165 @@ $as_echo "no" >&6; } | |||
5977 | fi | 6158 | fi |
5978 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 6159 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5979 | } | 6160 | } |
6161 | if test "x$use_toolchain_hardening" = "x1"; then | ||
6162 | { | ||
6163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,relro" >&5 | ||
6164 | $as_echo_n "checking if $LD supports link flag -Wl,-z,relro... " >&6; } | ||
6165 | saved_LDFLAGS="$LDFLAGS" | ||
6166 | LDFLAGS="$LDFLAGS $WERROR -Wl,-z,relro" | ||
6167 | _define_flag="" | ||
6168 | test "x$_define_flag" = "x" && _define_flag="-Wl,-z,relro" | ||
6169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
6170 | /* end confdefs.h. */ | ||
6171 | |||
6172 | #include <stdlib.h> | ||
6173 | #include <stdio.h> | ||
6174 | int main(int argc, char **argv) { | ||
6175 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
6176 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
6177 | float l = i * 2.1; | ||
6178 | double m = l / 0.5; | ||
6179 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
6180 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
6181 | exit(0); | ||
6182 | } | ||
6183 | |||
6184 | _ACEOF | ||
6185 | if ac_fn_c_try_link "$LINENO"; then : | ||
6186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
6187 | $as_echo "yes" >&6; } | ||
6188 | LDFLAGS="$saved_LDFLAGS $_define_flag" | ||
6189 | else | ||
6190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
6191 | $as_echo "no" >&6; } | ||
6192 | LDFLAGS="$saved_LDFLAGS" | ||
6193 | |||
6194 | fi | ||
6195 | rm -f core conftest.err conftest.$ac_objext \ | ||
6196 | conftest$ac_exeext conftest.$ac_ext | ||
6197 | } | ||
6198 | { | ||
6199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,now" >&5 | ||
6200 | $as_echo_n "checking if $LD supports link flag -Wl,-z,now... " >&6; } | ||
6201 | saved_LDFLAGS="$LDFLAGS" | ||
6202 | LDFLAGS="$LDFLAGS $WERROR -Wl,-z,now" | ||
6203 | _define_flag="" | ||
6204 | test "x$_define_flag" = "x" && _define_flag="-Wl,-z,now" | ||
6205 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
6206 | /* end confdefs.h. */ | ||
6207 | |||
6208 | #include <stdlib.h> | ||
6209 | #include <stdio.h> | ||
6210 | int main(int argc, char **argv) { | ||
6211 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
6212 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
6213 | float l = i * 2.1; | ||
6214 | double m = l / 0.5; | ||
6215 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
6216 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
6217 | exit(0); | ||
6218 | } | ||
6219 | |||
6220 | _ACEOF | ||
6221 | if ac_fn_c_try_link "$LINENO"; then : | ||
6222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
6223 | $as_echo "yes" >&6; } | ||
6224 | LDFLAGS="$saved_LDFLAGS $_define_flag" | ||
6225 | else | ||
6226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
6227 | $as_echo "no" >&6; } | ||
6228 | LDFLAGS="$saved_LDFLAGS" | ||
6229 | |||
6230 | fi | ||
6231 | rm -f core conftest.err conftest.$ac_objext \ | ||
6232 | conftest$ac_exeext conftest.$ac_ext | ||
6233 | } | ||
6234 | { | ||
6235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,noexecstack" >&5 | ||
6236 | $as_echo_n "checking if $LD supports link flag -Wl,-z,noexecstack... " >&6; } | ||
6237 | saved_LDFLAGS="$LDFLAGS" | ||
6238 | LDFLAGS="$LDFLAGS $WERROR -Wl,-z,noexecstack" | ||
6239 | _define_flag="" | ||
6240 | test "x$_define_flag" = "x" && _define_flag="-Wl,-z,noexecstack" | ||
6241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
6242 | /* end confdefs.h. */ | ||
6243 | |||
6244 | #include <stdlib.h> | ||
6245 | #include <stdio.h> | ||
6246 | int main(int argc, char **argv) { | ||
6247 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
6248 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
6249 | float l = i * 2.1; | ||
6250 | double m = l / 0.5; | ||
6251 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
6252 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
6253 | exit(0); | ||
6254 | } | ||
6255 | |||
6256 | _ACEOF | ||
6257 | if ac_fn_c_try_link "$LINENO"; then : | ||
6258 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
6259 | $as_echo "yes" >&6; } | ||
6260 | LDFLAGS="$saved_LDFLAGS $_define_flag" | ||
6261 | else | ||
6262 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
6263 | $as_echo "no" >&6; } | ||
6264 | LDFLAGS="$saved_LDFLAGS" | ||
6265 | |||
6266 | fi | ||
6267 | rm -f core conftest.err conftest.$ac_objext \ | ||
6268 | conftest$ac_exeext conftest.$ac_ext | ||
6269 | } | ||
6270 | # NB. -ftrapv expects certain support functions to be present in | ||
6271 | # the compiler library (libgcc or similar) to detect integer operations | ||
6272 | # that can overflow. We must check that the result of enabling it | ||
6273 | # actually links. The test program compiled/linked includes a number | ||
6274 | # of integer operations that should exercise this. | ||
6275 | { | ||
6276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -ftrapv and linking succeeds" >&5 | ||
6277 | $as_echo_n "checking if $CC supports compile flag -ftrapv and linking succeeds... " >&6; } | ||
6278 | saved_CFLAGS="$CFLAGS" | ||
6279 | CFLAGS="$CFLAGS $WERROR -ftrapv" | ||
6280 | _define_flag="" | ||
6281 | test "x$_define_flag" = "x" && _define_flag="-ftrapv" | ||
6282 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
6283 | /* end confdefs.h. */ | ||
6284 | |||
6285 | #include <stdlib.h> | ||
6286 | #include <stdio.h> | ||
6287 | int main(int argc, char **argv) { | ||
6288 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
6289 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
6290 | float l = i * 2.1; | ||
6291 | double m = l / 0.5; | ||
6292 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
6293 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
6294 | exit(0); | ||
6295 | } | ||
6296 | |||
6297 | _ACEOF | ||
6298 | if ac_fn_c_try_link "$LINENO"; then : | ||
6299 | |||
6300 | if `grep -i "unrecognized option" conftest.err >/dev/null` | ||
6301 | then | ||
6302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
6303 | $as_echo "no" >&6; } | ||
6304 | CFLAGS="$saved_CFLAGS" | ||
6305 | else | ||
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
6307 | $as_echo "yes" >&6; } | ||
6308 | CFLAGS="$saved_CFLAGS $_define_flag" | ||
6309 | fi | ||
6310 | else | ||
6311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
6312 | $as_echo "no" >&6; } | ||
6313 | CFLAGS="$saved_CFLAGS" | ||
6314 | |||
6315 | fi | ||
6316 | rm -f core conftest.err conftest.$ac_objext \ | ||
6317 | conftest$ac_exeext conftest.$ac_ext | ||
6318 | } | ||
6319 | fi | ||
5980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5 | 6320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5 |
5981 | $as_echo_n "checking gcc version... " >&6; } | 6321 | $as_echo_n "checking gcc version... " >&6; } |
5982 | GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'` | 6322 | GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'` |
@@ -6022,7 +6362,8 @@ rm -f core conftest.err conftest.$ac_objext \ | |||
6022 | # and/or platforms, so we test if we can. If it's not supported | 6362 | # and/or platforms, so we test if we can. If it's not supported |
6023 | # on a given platform gcc will emit a warning so we use -Werror. | 6363 | # on a given platform gcc will emit a warning so we use -Werror. |
6024 | if test "x$use_stack_protector" = "x1"; then | 6364 | if test "x$use_stack_protector" = "x1"; then |
6025 | for t in -fstack-protector-all -fstack-protector; do | 6365 | for t in -fstack-protector-strong -fstack-protector-all \ |
6366 | -fstack-protector; do | ||
6026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5 | 6367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5 |
6027 | $as_echo_n "checking if $CC supports $t... " >&6; } | 6368 | $as_echo_n "checking if $CC supports $t... " >&6; } |
6028 | saved_CFLAGS="$CFLAGS" | 6369 | saved_CFLAGS="$CFLAGS" |
@@ -6226,6 +6567,7 @@ fi | |||
6226 | 6567 | ||
6227 | 6568 | ||
6228 | for ac_header in \ | 6569 | for ac_header in \ |
6570 | blf.h \ | ||
6229 | bstring.h \ | 6571 | bstring.h \ |
6230 | crypt.h \ | 6572 | crypt.h \ |
6231 | crypto/sha2.h \ | 6573 | crypto/sha2.h \ |
@@ -6239,6 +6581,7 @@ for ac_header in \ | |||
6239 | glob.h \ | 6581 | glob.h \ |
6240 | ia.h \ | 6582 | ia.h \ |
6241 | iaf.h \ | 6583 | iaf.h \ |
6584 | inttypes.h \ | ||
6242 | limits.h \ | 6585 | limits.h \ |
6243 | locale.h \ | 6586 | locale.h \ |
6244 | login.h \ | 6587 | login.h \ |
@@ -6263,6 +6606,7 @@ for ac_header in \ | |||
6263 | sys/audit.h \ | 6606 | sys/audit.h \ |
6264 | sys/bitypes.h \ | 6607 | sys/bitypes.h \ |
6265 | sys/bsdtty.h \ | 6608 | sys/bsdtty.h \ |
6609 | sys/capability.h \ | ||
6266 | sys/cdefs.h \ | 6610 | sys/cdefs.h \ |
6267 | sys/dir.h \ | 6611 | sys/dir.h \ |
6268 | sys/mman.h \ | 6612 | sys/mman.h \ |
@@ -6715,6 +7059,51 @@ $as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h | |||
6715 | 7059 | ||
6716 | $as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h | 7060 | $as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h |
6717 | 7061 | ||
7062 | # Cygwin defines optargs, optargs as declspec(dllimport) for historical | ||
7063 | # reasons which cause compile warnings, so we disable those warnings. | ||
7064 | { | ||
7065 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-attributes" >&5 | ||
7066 | $as_echo_n "checking if $CC supports compile flag -Wno-attributes... " >&6; } | ||
7067 | saved_CFLAGS="$CFLAGS" | ||
7068 | CFLAGS="$CFLAGS $WERROR -Wno-attributes" | ||
7069 | _define_flag="" | ||
7070 | test "x$_define_flag" = "x" && _define_flag="-Wno-attributes" | ||
7071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
7072 | /* end confdefs.h. */ | ||
7073 | |||
7074 | #include <stdlib.h> | ||
7075 | #include <stdio.h> | ||
7076 | int main(int argc, char **argv) { | ||
7077 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
7078 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
7079 | float l = i * 2.1; | ||
7080 | double m = l / 0.5; | ||
7081 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
7082 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
7083 | exit(0); | ||
7084 | } | ||
7085 | |||
7086 | _ACEOF | ||
7087 | if ac_fn_c_try_compile "$LINENO"; then : | ||
7088 | |||
7089 | if `grep -i "unrecognized option" conftest.err >/dev/null` | ||
7090 | then | ||
7091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
7092 | $as_echo "no" >&6; } | ||
7093 | CFLAGS="$saved_CFLAGS" | ||
7094 | else | ||
7095 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
7096 | $as_echo "yes" >&6; } | ||
7097 | CFLAGS="$saved_CFLAGS $_define_flag" | ||
7098 | fi | ||
7099 | else | ||
7100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
7101 | $as_echo "no" >&6; } | ||
7102 | CFLAGS="$saved_CFLAGS" | ||
7103 | |||
7104 | fi | ||
7105 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
7106 | } | ||
6718 | ;; | 7107 | ;; |
6719 | *-*-dgux*) | 7108 | *-*-dgux*) |
6720 | 7109 | ||
@@ -6728,6 +7117,7 @@ $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h | |||
6728 | 7117 | ||
6729 | ;; | 7118 | ;; |
6730 | *-*-darwin*) | 7119 | *-*-darwin*) |
7120 | use_pie=auto | ||
6731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5 | 7121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5 |
6732 | $as_echo_n "checking if we have working getaddrinfo... " >&6; } | 7122 | $as_echo_n "checking if we have working getaddrinfo... " >&6; } |
6733 | if test "$cross_compiling" = yes; then : | 7123 | if test "$cross_compiling" = yes; then : |
@@ -6883,6 +7273,7 @@ done | |||
6883 | ;; | 7273 | ;; |
6884 | *-*-dragonfly*) | 7274 | *-*-dragonfly*) |
6885 | SSHDLIBS="$SSHDLIBS -lcrypt" | 7275 | SSHDLIBS="$SSHDLIBS -lcrypt" |
7276 | TEST_MALLOC_OPTIONS="AFGJPRX" | ||
6886 | ;; | 7277 | ;; |
6887 | *-*-haiku*) | 7278 | *-*-haiku*) |
6888 | LIBS="$LIBS -lbsd " | 7279 | LIBS="$LIBS -lbsd " |
@@ -7105,6 +7496,7 @@ $as_echo "#define USE_BTMP 1" >>confdefs.h | |||
7105 | ;; | 7496 | ;; |
7106 | *-*-linux*) | 7497 | *-*-linux*) |
7107 | no_dev_ptmx=1 | 7498 | no_dev_ptmx=1 |
7499 | use_pie=auto | ||
7108 | check_for_libcrypt_later=1 | 7500 | check_for_libcrypt_later=1 |
7109 | check_for_openpty_ctty_bug=1 | 7501 | check_for_openpty_ctty_bug=1 |
7110 | 7502 | ||
@@ -7237,6 +7629,13 @@ fi | |||
7237 | 7629 | ||
7238 | $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h | 7630 | $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h |
7239 | 7631 | ||
7632 | TEST_MALLOC_OPTIONS="AJRX" | ||
7633 | |||
7634 | $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h | ||
7635 | |||
7636 | |||
7637 | $as_echo "#define BROKEN_READ_COMPARISON 1" >>confdefs.h | ||
7638 | |||
7240 | ;; | 7639 | ;; |
7241 | *-*-freebsd*) | 7640 | *-*-freebsd*) |
7242 | check_for_libcrypt_later=1 | 7641 | check_for_libcrypt_later=1 |
@@ -7262,6 +7661,12 @@ $as_echo "#define BROKEN_GLOB 1" >>confdefs.h | |||
7262 | 7661 | ||
7263 | $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h | 7662 | $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h |
7264 | 7663 | ||
7664 | TEST_MALLOC_OPTIONS="AJRX" | ||
7665 | # Preauth crypto occasionally uses file descriptors for crypto offload | ||
7666 | # and will crash if they cannot be opened. | ||
7667 | |||
7668 | $as_echo "#define SANDBOX_SKIP_RLIMIT_NOFILE 1" >>confdefs.h | ||
7669 | ], | ||
7265 | ;; | 7670 | ;; |
7266 | *-*-bsdi*) | 7671 | *-*-bsdi*) |
7267 | $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h | 7672 | $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h |
@@ -7288,6 +7693,7 @@ $as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h | |||
7288 | 7693 | ||
7289 | ;; | 7694 | ;; |
7290 | *-*-openbsd*) | 7695 | *-*-openbsd*) |
7696 | use_pie=auto | ||
7291 | 7697 | ||
7292 | $as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h | 7698 | $as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h |
7293 | 7699 | ||
@@ -7300,6 +7706,7 @@ $as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h | |||
7300 | 7706 | ||
7301 | $as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h | 7707 | $as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h |
7302 | 7708 | ||
7709 | TEST_MALLOC_OPTIONS="AFGJPRX" | ||
7303 | ;; | 7710 | ;; |
7304 | *-*-solaris*) | 7711 | *-*-solaris*) |
7305 | if test "x$withval" != "xno" ; then | 7712 | if test "x$withval" != "xno" ; then |
@@ -8988,6 +9395,64 @@ fi | |||
8988 | done | 9395 | done |
8989 | 9396 | ||
8990 | 9397 | ||
9398 | # On some platforms, inet_ntop may be found in libresolv or libnsl. | ||
9399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 | ||
9400 | $as_echo_n "checking for library containing inet_ntop... " >&6; } | ||
9401 | if ${ac_cv_search_inet_ntop+:} false; then : | ||
9402 | $as_echo_n "(cached) " >&6 | ||
9403 | else | ||
9404 | ac_func_search_save_LIBS=$LIBS | ||
9405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
9406 | /* end confdefs.h. */ | ||
9407 | |||
9408 | /* Override any GCC internal prototype to avoid an error. | ||
9409 | Use char because int might match the return type of a GCC | ||
9410 | builtin and then its argument prototype would still apply. */ | ||
9411 | #ifdef __cplusplus | ||
9412 | extern "C" | ||
9413 | #endif | ||
9414 | char inet_ntop (); | ||
9415 | int | ||
9416 | main () | ||
9417 | { | ||
9418 | return inet_ntop (); | ||
9419 | ; | ||
9420 | return 0; | ||
9421 | } | ||
9422 | _ACEOF | ||
9423 | for ac_lib in '' resolv nsl; do | ||
9424 | if test -z "$ac_lib"; then | ||
9425 | ac_res="none required" | ||
9426 | else | ||
9427 | ac_res=-l$ac_lib | ||
9428 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
9429 | fi | ||
9430 | if ac_fn_c_try_link "$LINENO"; then : | ||
9431 | ac_cv_search_inet_ntop=$ac_res | ||
9432 | fi | ||
9433 | rm -f core conftest.err conftest.$ac_objext \ | ||
9434 | conftest$ac_exeext | ||
9435 | if ${ac_cv_search_inet_ntop+:} false; then : | ||
9436 | break | ||
9437 | fi | ||
9438 | done | ||
9439 | if ${ac_cv_search_inet_ntop+:} false; then : | ||
9440 | |||
9441 | else | ||
9442 | ac_cv_search_inet_ntop=no | ||
9443 | fi | ||
9444 | rm conftest.$ac_ext | ||
9445 | LIBS=$ac_func_search_save_LIBS | ||
9446 | fi | ||
9447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 | ||
9448 | $as_echo "$ac_cv_search_inet_ntop" >&6; } | ||
9449 | ac_res=$ac_cv_search_inet_ntop | ||
9450 | if test "$ac_res" != no; then : | ||
9451 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
9452 | |||
9453 | fi | ||
9454 | |||
9455 | |||
8991 | for ac_func in strftime | 9456 | for ac_func in strftime |
8992 | do : | 9457 | do : |
8993 | ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" | 9458 | ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" |
@@ -9554,7 +10019,7 @@ $as_echo "no" >&6; } | |||
9554 | fi | 10019 | fi |
9555 | fi | 10020 | fi |
9556 | if test "x$use_pkgconfig_for_libedit" = "xyes"; then | 10021 | if test "x$use_pkgconfig_for_libedit" = "xyes"; then |
9557 | LIBEDIT=`$PKGCONFIG --libs-only-l libedit` | 10022 | LIBEDIT=`$PKGCONFIG --libs libedit` |
9558 | CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`" | 10023 | CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`" |
9559 | else | 10024 | else |
9560 | LIBEDIT="-ledit -lcurses" | 10025 | LIBEDIT="-ledit -lcurses" |
@@ -9748,7 +10213,7 @@ done | |||
9748 | 10213 | ||
9749 | $as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h | 10214 | $as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h |
9750 | 10215 | ||
9751 | if test "$sol2ver" -eq 11; then | 10216 | if test "$sol2ver" -ge 11; then |
9752 | SSHDLIBS="$SSHDLIBS -lscf" | 10217 | SSHDLIBS="$SSHDLIBS -lscf" |
9753 | 10218 | ||
9754 | $as_echo "#define BROKEN_BSM_API 1" >>confdefs.h | 10219 | $as_echo "#define BROKEN_BSM_API 1" >>confdefs.h |
@@ -9796,9 +10261,155 @@ $as_echo "no" >&6; } | |||
9796 | fi | 10261 | fi |
9797 | 10262 | ||
9798 | 10263 | ||
10264 | |||
10265 | # Check whether --with-pie was given. | ||
10266 | if test "${with_pie+set}" = set; then : | ||
10267 | withval=$with_pie; | ||
10268 | if test "x$withval" = "xno"; then | ||
10269 | use_pie=no | ||
10270 | fi | ||
10271 | if test "x$withval" = "xyes"; then | ||
10272 | use_pie=yes | ||
10273 | fi | ||
10274 | |||
10275 | |||
10276 | fi | ||
10277 | |||
10278 | if test "x$use_pie" = "x"; then | ||
10279 | use_pie=no | ||
10280 | fi | ||
10281 | if test "x$use_toolchain_hardening" != "x1" && test "x$use_pie" = "xauto"; then | ||
10282 | # Turn off automatic PIE when toolchain hardening is off. | ||
10283 | use_pie=no | ||
10284 | fi | ||
10285 | if test "x$use_pie" = "xauto"; then | ||
10286 | # Automatic PIE requires gcc >= 4.x | ||
10287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 4.x" >&5 | ||
10288 | $as_echo_n "checking for gcc >= 4.x... " >&6; } | ||
10289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
10290 | /* end confdefs.h. */ | ||
10291 | |||
10292 | #if !defined(__GNUC__) || __GNUC__ < 4 | ||
10293 | #error gcc is too old | ||
10294 | #endif | ||
10295 | |||
10296 | _ACEOF | ||
10297 | if ac_fn_c_try_compile "$LINENO"; then : | ||
10298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
10299 | $as_echo "yes" >&6; } | ||
10300 | else | ||
10301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
10302 | $as_echo "no" >&6; } | ||
10303 | use_pie=no | ||
10304 | |||
10305 | fi | ||
10306 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
10307 | fi | ||
10308 | if test "x$use_pie" != "xno"; then | ||
10309 | SAVED_CFLAGS="$CFLAGS" | ||
10310 | SAVED_LDFLAGS="$LDFLAGS" | ||
10311 | { | ||
10312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fPIE" >&5 | ||
10313 | $as_echo_n "checking if $CC supports compile flag -fPIE... " >&6; } | ||
10314 | saved_CFLAGS="$CFLAGS" | ||
10315 | CFLAGS="$CFLAGS $WERROR -fPIE" | ||
10316 | _define_flag="" | ||
10317 | test "x$_define_flag" = "x" && _define_flag="-fPIE" | ||
10318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
10319 | /* end confdefs.h. */ | ||
10320 | |||
10321 | #include <stdlib.h> | ||
10322 | #include <stdio.h> | ||
10323 | int main(int argc, char **argv) { | ||
10324 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
10325 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
10326 | float l = i * 2.1; | ||
10327 | double m = l / 0.5; | ||
10328 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
10329 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
10330 | exit(0); | ||
10331 | } | ||
10332 | |||
10333 | _ACEOF | ||
10334 | if ac_fn_c_try_compile "$LINENO"; then : | ||
10335 | |||
10336 | if `grep -i "unrecognized option" conftest.err >/dev/null` | ||
10337 | then | ||
10338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
10339 | $as_echo "no" >&6; } | ||
10340 | CFLAGS="$saved_CFLAGS" | ||
10341 | else | ||
10342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
10343 | $as_echo "yes" >&6; } | ||
10344 | CFLAGS="$saved_CFLAGS $_define_flag" | ||
10345 | fi | ||
10346 | else | ||
10347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
10348 | $as_echo "no" >&6; } | ||
10349 | CFLAGS="$saved_CFLAGS" | ||
10350 | |||
10351 | fi | ||
10352 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
10353 | } | ||
10354 | { | ||
10355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -pie" >&5 | ||
10356 | $as_echo_n "checking if $LD supports link flag -pie... " >&6; } | ||
10357 | saved_LDFLAGS="$LDFLAGS" | ||
10358 | LDFLAGS="$LDFLAGS $WERROR -pie" | ||
10359 | _define_flag="" | ||
10360 | test "x$_define_flag" = "x" && _define_flag="-pie" | ||
10361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
10362 | /* end confdefs.h. */ | ||
10363 | |||
10364 | #include <stdlib.h> | ||
10365 | #include <stdio.h> | ||
10366 | int main(int argc, char **argv) { | ||
10367 | /* Some math to catch -ftrapv problems in the toolchain */ | ||
10368 | int i = 123 * argc, j = 456 + argc, k = 789 - argc; | ||
10369 | float l = i * 2.1; | ||
10370 | double m = l / 0.5; | ||
10371 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | ||
10372 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | ||
10373 | exit(0); | ||
10374 | } | ||
10375 | |||
10376 | _ACEOF | ||
10377 | if ac_fn_c_try_link "$LINENO"; then : | ||
10378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
10379 | $as_echo "yes" >&6; } | ||
10380 | LDFLAGS="$saved_LDFLAGS $_define_flag" | ||
10381 | else | ||
10382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
10383 | $as_echo "no" >&6; } | ||
10384 | LDFLAGS="$saved_LDFLAGS" | ||
10385 | |||
10386 | fi | ||
10387 | rm -f core conftest.err conftest.$ac_objext \ | ||
10388 | conftest$ac_exeext conftest.$ac_ext | ||
10389 | } | ||
10390 | # We use both -fPIE and -pie or neither. | ||
10391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether both -fPIE and -pie are supported" >&5 | ||
10392 | $as_echo_n "checking whether both -fPIE and -pie are supported... " >&6; } | ||
10393 | if echo "x $CFLAGS" | grep ' -fPIE' >/dev/null 2>&1 && \ | ||
10394 | echo "x $LDFLAGS" | grep ' -pie' >/dev/null 2>&1 ; then | ||
10395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
10396 | $as_echo "yes" >&6; } | ||
10397 | else | ||
10398 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
10399 | $as_echo "no" >&6; } | ||
10400 | CFLAGS="$SAVED_CFLAGS" | ||
10401 | LDFLAGS="$SAVED_LDFLAGS" | ||
10402 | fi | ||
10403 | fi | ||
10404 | |||
9799 | for ac_func in \ | 10405 | for ac_func in \ |
10406 | Blowfish_initstate \ | ||
10407 | Blowfish_expandstate \ | ||
10408 | Blowfish_expand0state \ | ||
10409 | Blowfish_stream2word \ | ||
9800 | arc4random \ | 10410 | arc4random \ |
9801 | arc4random_buf \ | 10411 | arc4random_buf \ |
10412 | arc4random_stir \ | ||
9802 | arc4random_uniform \ | 10413 | arc4random_uniform \ |
9803 | asprintf \ | 10414 | asprintf \ |
9804 | b64_ntop \ | 10415 | b64_ntop \ |
@@ -9806,7 +10417,10 @@ for ac_func in \ | |||
9806 | b64_pton \ | 10417 | b64_pton \ |
9807 | __b64_pton \ | 10418 | __b64_pton \ |
9808 | bcopy \ | 10419 | bcopy \ |
10420 | bcrypt_pbkdf \ | ||
9809 | bindresvport_sa \ | 10421 | bindresvport_sa \ |
10422 | blf_enc \ | ||
10423 | cap_rights_limit \ | ||
9810 | clock \ | 10424 | clock \ |
9811 | closefrom \ | 10425 | closefrom \ |
9812 | dirfd \ | 10426 | dirfd \ |
@@ -9814,6 +10428,7 @@ for ac_func in \ | |||
9814 | fchmod \ | 10428 | fchmod \ |
9815 | fchown \ | 10429 | fchown \ |
9816 | freeaddrinfo \ | 10430 | freeaddrinfo \ |
10431 | fstatfs \ | ||
9817 | fstatvfs \ | 10432 | fstatvfs \ |
9818 | futimes \ | 10433 | futimes \ |
9819 | getaddrinfo \ | 10434 | getaddrinfo \ |
@@ -11550,7 +12165,17 @@ fi | |||
11550 | rm -f core conftest.err conftest.$ac_objext \ | 12165 | rm -f core conftest.err conftest.$ac_objext \ |
11551 | conftest$ac_exeext conftest.$ac_ext | 12166 | conftest$ac_exeext conftest.$ac_ext |
11552 | 12167 | ||
11553 | for ac_func in RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method HMAC_CTX_init | 12168 | for ac_func in \ |
12169 | BN_is_prime_ex \ | ||
12170 | DSA_generate_parameters_ex \ | ||
12171 | EVP_DigestInit_ex \ | ||
12172 | EVP_DigestFinal_ex \ | ||
12173 | EVP_MD_CTX_init \ | ||
12174 | EVP_MD_CTX_cleanup \ | ||
12175 | HMAC_CTX_init \ | ||
12176 | RSA_generate_key_ex \ | ||
12177 | RSA_get_default_method \ | ||
12178 | |||
11554 | do : | 12179 | do : |
11555 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | 12180 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
11556 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | 12181 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
@@ -11935,10 +12560,9 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |||
11935 | cat >>confdefs.h <<_ACEOF | 12560 | cat >>confdefs.h <<_ACEOF |
11936 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | 12561 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
11937 | _ACEOF | 12562 | _ACEOF |
11938 | TEST_SSH_SHA256=yes | 12563 | |
11939 | else | 12564 | else |
11940 | TEST_SSH_SHA256=no | 12565 | unsupported_algorithms="$unsupported_algorithms \ |
11941 | unsupported_algorithms="$unsupported_algorithms \ | ||
11942 | hmac-sha2-256 hmac-sha2-512 \ | 12566 | hmac-sha2-256 hmac-sha2-512 \ |
11943 | diffie-hellman-group-exchange-sha256 \ | 12567 | diffie-hellman-group-exchange-sha256 \ |
11944 | hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com" | 12568 | hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com" |
@@ -11948,10 +12572,9 @@ fi | |||
11948 | done | 12572 | done |
11949 | 12573 | ||
11950 | 12574 | ||
11951 | |||
11952 | # Check complete ECC support in OpenSSL | 12575 | # Check complete ECC support in OpenSSL |
11953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has complete ECC support" >&5 | 12576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5 |
11954 | $as_echo_n "checking whether OpenSSL has complete ECC support... " >&6; } | 12577 | $as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; } |
11955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 12578 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11956 | /* end confdefs.h. */ | 12579 | /* end confdefs.h. */ |
11957 | 12580 | ||
@@ -11969,41 +12592,183 @@ int | |||
11969 | main () | 12592 | main () |
11970 | { | 12593 | { |
11971 | 12594 | ||
11972 | EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1); | 12595 | EC_KEY *e = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); |
11973 | const EVP_MD *m = EVP_sha512(); /* We need this too */ | 12596 | const EVP_MD *m = EVP_sha256(); /* We need this too */ |
11974 | 12597 | ||
11975 | ; | 12598 | ; |
11976 | return 0; | 12599 | return 0; |
11977 | } | 12600 | } |
11978 | _ACEOF | 12601 | _ACEOF |
11979 | if ac_fn_c_try_link "$LINENO"; then : | 12602 | if ac_fn_c_try_link "$LINENO"; then : |
12603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
12604 | $as_echo "yes" >&6; } | ||
12605 | enable_nistp256=1 | ||
12606 | else | ||
12607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
12608 | $as_echo "no" >&6; } | ||
11980 | 12609 | ||
11981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | 12610 | fi |
12611 | rm -f core conftest.err conftest.$ac_objext \ | ||
12612 | conftest$ac_exeext conftest.$ac_ext | ||
12613 | |||
12614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp384r1" >&5 | ||
12615 | $as_echo_n "checking whether OpenSSL has NID_secp384r1... " >&6; } | ||
12616 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
12617 | /* end confdefs.h. */ | ||
12618 | |||
12619 | #include <openssl/ec.h> | ||
12620 | #include <openssl/ecdh.h> | ||
12621 | #include <openssl/ecdsa.h> | ||
12622 | #include <openssl/evp.h> | ||
12623 | #include <openssl/objects.h> | ||
12624 | #include <openssl/opensslv.h> | ||
12625 | #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */ | ||
12626 | # error "OpenSSL < 0.9.8g has unreliable ECC code" | ||
12627 | #endif | ||
12628 | |||
12629 | int | ||
12630 | main () | ||
12631 | { | ||
12632 | |||
12633 | EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp384r1); | ||
12634 | const EVP_MD *m = EVP_sha384(); /* We need this too */ | ||
12635 | |||
12636 | ; | ||
12637 | return 0; | ||
12638 | } | ||
12639 | _ACEOF | ||
12640 | if ac_fn_c_try_link "$LINENO"; then : | ||
12641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
11982 | $as_echo "yes" >&6; } | 12642 | $as_echo "yes" >&6; } |
12643 | enable_nistp384=1 | ||
12644 | else | ||
12645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
12646 | $as_echo "no" >&6; } | ||
11983 | 12647 | ||
11984 | $as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h | 12648 | fi |
12649 | rm -f core conftest.err conftest.$ac_objext \ | ||
12650 | conftest$ac_exeext conftest.$ac_ext | ||
12651 | |||
12652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp521r1" >&5 | ||
12653 | $as_echo_n "checking whether OpenSSL has NID_secp521r1... " >&6; } | ||
12654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
12655 | /* end confdefs.h. */ | ||
12656 | |||
12657 | #include <openssl/ec.h> | ||
12658 | #include <openssl/ecdh.h> | ||
12659 | #include <openssl/ecdsa.h> | ||
12660 | #include <openssl/evp.h> | ||
12661 | #include <openssl/objects.h> | ||
12662 | #include <openssl/opensslv.h> | ||
12663 | #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */ | ||
12664 | # error "OpenSSL < 0.9.8g has unreliable ECC code" | ||
12665 | #endif | ||
12666 | |||
12667 | int | ||
12668 | main () | ||
12669 | { | ||
11985 | 12670 | ||
11986 | TEST_SSH_ECC=yes | 12671 | EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1); |
11987 | COMMENT_OUT_ECC="" | 12672 | const EVP_MD *m = EVP_sha512(); /* We need this too */ |
12673 | |||
12674 | ; | ||
12675 | return 0; | ||
12676 | } | ||
12677 | _ACEOF | ||
12678 | if ac_fn_c_try_link "$LINENO"; then : | ||
12679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
12680 | $as_echo "yes" >&6; } | ||
12681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL's NID_secp521r1 is functional" >&5 | ||
12682 | $as_echo_n "checking if OpenSSL's NID_secp521r1 is functional... " >&6; } | ||
12683 | if test "$cross_compiling" = yes; then : | ||
12684 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: assuming yes" >&5 | ||
12685 | $as_echo "$as_me: WARNING: cross-compiling: assuming yes" >&2;} | ||
12686 | enable_nistp521=1 | ||
11988 | 12687 | ||
11989 | else | 12688 | else |
12689 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
12690 | /* end confdefs.h. */ | ||
11990 | 12691 | ||
11991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 12692 | #include <openssl/ec.h> |
12693 | #include <openssl/ecdh.h> | ||
12694 | #include <openssl/ecdsa.h> | ||
12695 | #include <openssl/evp.h> | ||
12696 | #include <openssl/objects.h> | ||
12697 | #include <openssl/opensslv.h> | ||
12698 | |||
12699 | int | ||
12700 | main () | ||
12701 | { | ||
12702 | |||
12703 | EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1); | ||
12704 | const EVP_MD *m = EVP_sha512(); /* We need this too */ | ||
12705 | exit(e == NULL || m == NULL); | ||
12706 | |||
12707 | ; | ||
12708 | return 0; | ||
12709 | } | ||
12710 | _ACEOF | ||
12711 | if ac_fn_c_try_run "$LINENO"; then : | ||
12712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
12713 | $as_echo "yes" >&6; } | ||
12714 | enable_nistp521=1 | ||
12715 | else | ||
12716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
11992 | $as_echo "no" >&6; } | 12717 | $as_echo "no" >&6; } |
11993 | TEST_SSH_ECC=no | 12718 | fi |
11994 | COMMENT_OUT_ECC="#no ecc#" | 12719 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11995 | unsupported_algorithms="$unsupported_algorithms \ | 12720 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
11996 | ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 \ | 12721 | fi |
11997 | ecdsa-sha2-nistp256-cert-v01@openssh.com \ | ||
11998 | ecdsa-sha2-nistp384-cert-v01@openssh.com \ | ||
11999 | ecdsa-sha2-nistp521-cert-v01@openssh.com \ | ||
12000 | ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521" | ||
12001 | 12722 | ||
12723 | else | ||
12724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
12725 | $as_echo "no" >&6; } | ||
12002 | 12726 | ||
12003 | fi | 12727 | fi |
12004 | rm -f core conftest.err conftest.$ac_objext \ | 12728 | rm -f core conftest.err conftest.$ac_objext \ |
12005 | conftest$ac_exeext conftest.$ac_ext | 12729 | conftest$ac_exeext conftest.$ac_ext |
12006 | 12730 | ||
12731 | COMMENT_OUT_ECC="#no ecc#" | ||
12732 | TEST_SSH_ECC=no | ||
12733 | |||
12734 | if test x$enable_nistp256 = x1 || test x$enable_nistp384 = x1 || \ | ||
12735 | test x$enable_nistp521 = x1; then | ||
12736 | |||
12737 | $as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h | ||
12738 | |||
12739 | fi | ||
12740 | if test x$enable_nistp256 = x1; then | ||
12741 | |||
12742 | $as_echo "#define OPENSSL_HAS_NISTP256 1" >>confdefs.h | ||
12743 | |||
12744 | TEST_SSH_ECC=yes | ||
12745 | COMMENT_OUT_ECC="" | ||
12746 | else | ||
12747 | unsupported_algorithms="$unsupported_algorithms ecdsa-sha2-nistp256 \ | ||
12748 | ecdh-sha2-nistp256 ecdsa-sha2-nistp256-cert-v01@openssh.com" | ||
12749 | fi | ||
12750 | if test x$enable_nistp384 = x1; then | ||
12751 | |||
12752 | $as_echo "#define OPENSSL_HAS_NISTP384 1" >>confdefs.h | ||
12753 | |||
12754 | TEST_SSH_ECC=yes | ||
12755 | COMMENT_OUT_ECC="" | ||
12756 | else | ||
12757 | unsupported_algorithms="$unsupported_algorithms ecdsa-sha2-nistp384 \ | ||
12758 | ecdh-sha2-nistp384 ecdsa-sha2-nistp384-cert-v01@openssh.com" | ||
12759 | fi | ||
12760 | if test x$enable_nistp521 = x1; then | ||
12761 | |||
12762 | $as_echo "#define OPENSSL_HAS_NISTP521 1" >>confdefs.h | ||
12763 | |||
12764 | TEST_SSH_ECC=yes | ||
12765 | COMMENT_OUT_ECC="" | ||
12766 | else | ||
12767 | unsupported_algorithms="$unsupported_algorithms ecdh-sha2-nistp521 \ | ||
12768 | ecdsa-sha2-nistp521 ecdsa-sha2-nistp521-cert-v01@openssh.com" | ||
12769 | fi | ||
12770 | |||
12771 | |||
12007 | 12772 | ||
12008 | 12773 | ||
12009 | saved_LIBS="$LIBS" | 12774 | saved_LIBS="$LIBS" |
@@ -12694,6 +13459,18 @@ elif test "x$sandbox_arg" = "xseccomp_filter" || \ | |||
12694 | 13459 | ||
12695 | $as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h | 13460 | $as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h |
12696 | 13461 | ||
13462 | elif test "x$sandbox_arg" = "xcapsicum" || \ | ||
13463 | ( test -z "$sandbox_arg" && \ | ||
13464 | test "x$ac_cv_header_sys_capability_h" = "xyes" && \ | ||
13465 | test "x$ac_cv_func_cap_rights_limit" = "xyes") ; then | ||
13466 | test "x$ac_cv_header_sys_capability_h" != "xyes" && \ | ||
13467 | as_fn_error $? "capsicum sandbox requires sys/capability.h header" "$LINENO" 5 | ||
13468 | test "x$ac_cv_func_cap_rights_limit" != "xyes" && \ | ||
13469 | as_fn_error $? "capsicum sandbox requires cap_rights_limit function" "$LINENO" 5 | ||
13470 | SANDBOX_STYLE="capsicum" | ||
13471 | |||
13472 | $as_echo "#define SANDBOX_CAPSICUM 1" >>confdefs.h | ||
13473 | |||
12697 | elif test "x$sandbox_arg" = "xrlimit" || \ | 13474 | elif test "x$sandbox_arg" = "xrlimit" || \ |
12698 | ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \ | 13475 | ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \ |
12699 | test "x$select_works_with_rlimit" = "xyes" && \ | 13476 | test "x$select_works_with_rlimit" = "xyes" && \ |
@@ -13263,7 +14040,9 @@ $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h | |||
13263 | have_u_int64_t=1 | 14040 | have_u_int64_t=1 |
13264 | fi | 14041 | fi |
13265 | 14042 | ||
13266 | if test -z "$have_u_int64_t" ; then | 14043 | if (test -z "$have_u_int64_t" && \ |
14044 | test "x$ac_cv_header_sys_bitypes_h" = "xyes") | ||
14045 | then | ||
13267 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5 | 14046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5 |
13268 | $as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; } | 14047 | $as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; } |
13269 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 14048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
@@ -13335,7 +14114,9 @@ $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h | |||
13335 | fi | 14114 | fi |
13336 | fi | 14115 | fi |
13337 | 14116 | ||
13338 | if test -z "$have_uintxx_t" ; then | 14117 | if (test -z "$have_uintxx_t" && \ |
14118 | test "x$ac_cv_header_stdint_h" = "xyes") | ||
14119 | then | ||
13339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5 | 14120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5 |
13340 | $as_echo_n "checking for uintXX_t types in stdint.h... " >&6; } | 14121 | $as_echo_n "checking for uintXX_t types in stdint.h... " >&6; } |
13341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 14122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
@@ -13364,6 +14145,37 @@ fi | |||
13364 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 14145 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13365 | fi | 14146 | fi |
13366 | 14147 | ||
14148 | if (test -z "$have_uintxx_t" && \ | ||
14149 | test "x$ac_cv_header_inttypes_h" = "xyes") | ||
14150 | then | ||
14151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in inttypes.h" >&5 | ||
14152 | $as_echo_n "checking for uintXX_t types in inttypes.h... " >&6; } | ||
14153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
14154 | /* end confdefs.h. */ | ||
14155 | #include <inttypes.h> | ||
14156 | int | ||
14157 | main () | ||
14158 | { | ||
14159 | uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; | ||
14160 | ; | ||
14161 | return 0; | ||
14162 | } | ||
14163 | _ACEOF | ||
14164 | if ac_fn_c_try_compile "$LINENO"; then : | ||
14165 | |||
14166 | $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h | ||
14167 | |||
14168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
14169 | $as_echo "yes" >&6; } | ||
14170 | |||
14171 | else | ||
14172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
14173 | $as_echo "no" >&6; } | ||
14174 | |||
14175 | fi | ||
14176 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
14177 | fi | ||
14178 | |||
13367 | if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ | 14179 | if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ |
13368 | test "x$ac_cv_header_sys_bitypes_h" = "xyes") | 14180 | test "x$ac_cv_header_sys_bitypes_h" = "xyes") |
13369 | then | 14181 | then |
@@ -13438,6 +14250,34 @@ $as_echo "#define HAVE_U_CHAR 1" >>confdefs.h | |||
13438 | 14250 | ||
13439 | fi | 14251 | fi |
13440 | 14252 | ||
14253 | ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" " | ||
14254 | #include <sys/types.h> | ||
14255 | #include <stdint.h> | ||
14256 | |||
14257 | " | ||
14258 | if test "x$ac_cv_type_intmax_t" = xyes; then : | ||
14259 | |||
14260 | cat >>confdefs.h <<_ACEOF | ||
14261 | #define HAVE_INTMAX_T 1 | ||
14262 | _ACEOF | ||
14263 | |||
14264 | |||
14265 | fi | ||
14266 | ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" " | ||
14267 | #include <sys/types.h> | ||
14268 | #include <stdint.h> | ||
14269 | |||
14270 | " | ||
14271 | if test "x$ac_cv_type_uintmax_t" = xyes; then : | ||
14272 | |||
14273 | cat >>confdefs.h <<_ACEOF | ||
14274 | #define HAVE_UINTMAX_T 1 | ||
14275 | _ACEOF | ||
14276 | |||
14277 | |||
14278 | fi | ||
14279 | |||
14280 | |||
13441 | 14281 | ||
13442 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | 14282 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
13443 | #include <sys/socket.h> | 14283 | #include <sys/socket.h> |
@@ -17680,6 +18520,8 @@ fi | |||
17680 | 18520 | ||
17681 | TEST_SSH_IPV6=$TEST_SSH_IPV6 | 18521 | TEST_SSH_IPV6=$TEST_SSH_IPV6 |
17682 | 18522 | ||
18523 | TEST_MALLOC_OPTIONS=$TEST_MALLOC_OPTIONS | ||
18524 | |||
17683 | UNSUPPORTED_ALGORITHMS=$unsupported_algorithms | 18525 | UNSUPPORTED_ALGORITHMS=$unsupported_algorithms |
17684 | 18526 | ||
17685 | 18527 | ||