diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 69 |
1 files changed, 21 insertions, 48 deletions
diff --git a/configure.ac b/configure.ac index de140f578..c119d6fd1 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -41,11 +41,11 @@ AC_PATH_PROG([TEST_MINUS_S_SH], [ksh]) | |||
41 | AC_PATH_PROG([TEST_MINUS_S_SH], [sh]) | 41 | AC_PATH_PROG([TEST_MINUS_S_SH], [sh]) |
42 | AC_PATH_PROG([SH], [sh]) | 42 | AC_PATH_PROG([SH], [sh]) |
43 | AC_PATH_PROG([GROFF], [groff]) | 43 | AC_PATH_PROG([GROFF], [groff]) |
44 | AC_PATH_PROG([NROFF], [nroff]) | 44 | AC_PATH_PROG([NROFF], [nroff awf]) |
45 | AC_PATH_PROG([MANDOC], [mandoc]) | 45 | AC_PATH_PROG([MANDOC], [mandoc]) |
46 | AC_SUBST([TEST_SHELL], [sh]) | 46 | AC_SUBST([TEST_SHELL], [sh]) |
47 | 47 | ||
48 | dnl select manpage formatter | 48 | dnl select manpage formatter to be used to build "cat" format pages. |
49 | if test "x$MANDOC" != "x" ; then | 49 | if test "x$MANDOC" != "x" ; then |
50 | MANFMT="$MANDOC" | 50 | MANFMT="$MANDOC" |
51 | elif test "x$NROFF" != "x" ; then | 51 | elif test "x$NROFF" != "x" ; then |
@@ -53,7 +53,7 @@ elif test "x$NROFF" != "x" ; then | |||
53 | elif test "x$GROFF" != "x" ; then | 53 | elif test "x$GROFF" != "x" ; then |
54 | MANFMT="$GROFF -mandoc -Tascii" | 54 | MANFMT="$GROFF -mandoc -Tascii" |
55 | else | 55 | else |
56 | AC_MSG_WARN([no manpage formatted found]) | 56 | AC_MSG_WARN([no manpage formatter found]) |
57 | MANFMT="false" | 57 | MANFMT="false" |
58 | fi | 58 | fi |
59 | AC_SUBST([MANFMT]) | 59 | AC_SUBST([MANFMT]) |
@@ -152,9 +152,11 @@ CFLAGS="$saved_CFLAGS" | |||
152 | 152 | ||
153 | if test "$GCC" = "yes" || test "$GCC" = "egcs"; then | 153 | if test "$GCC" = "yes" || test "$GCC" = "egcs"; then |
154 | OSSH_CHECK_CFLAG_COMPILE([-pipe]) | 154 | OSSH_CHECK_CFLAG_COMPILE([-pipe]) |
155 | OSSH_CHECK_CFLAG_COMPILE([-Qunused-arguments]) | ||
156 | OSSH_CHECK_CFLAG_COMPILE([-Wunknown-warning-option]) | 155 | OSSH_CHECK_CFLAG_COMPILE([-Wunknown-warning-option]) |
156 | OSSH_CHECK_CFLAG_COMPILE([-Wno-error=format-truncation]) | ||
157 | OSSH_CHECK_CFLAG_COMPILE([-Qunused-arguments]) | ||
157 | OSSH_CHECK_CFLAG_COMPILE([-Wall]) | 158 | OSSH_CHECK_CFLAG_COMPILE([-Wall]) |
159 | OSSH_CHECK_CFLAG_COMPILE([-Wextra]) | ||
158 | OSSH_CHECK_CFLAG_COMPILE([-Wpointer-arith]) | 160 | OSSH_CHECK_CFLAG_COMPILE([-Wpointer-arith]) |
159 | OSSH_CHECK_CFLAG_COMPILE([-Wuninitialized]) | 161 | OSSH_CHECK_CFLAG_COMPILE([-Wuninitialized]) |
160 | OSSH_CHECK_CFLAG_COMPILE([-Wsign-compare]) | 162 | OSSH_CHECK_CFLAG_COMPILE([-Wsign-compare]) |
@@ -588,7 +590,6 @@ case "$host" in | |||
588 | #include <fcntl.h> ] | 590 | #include <fcntl.h> ] |
589 | ) | 591 | ) |
590 | check_for_aix_broken_getaddrinfo=1 | 592 | check_for_aix_broken_getaddrinfo=1 |
591 | AC_DEFINE([BROKEN_REALPATH], [1], [Define if you have a broken realpath.]) | ||
592 | AC_DEFINE([SETEUID_BREAKS_SETUID], [1], | 593 | AC_DEFINE([SETEUID_BREAKS_SETUID], [1], |
593 | [Define if your platform breaks doing a seteuid before a setuid]) | 594 | [Define if your platform breaks doing a seteuid before a setuid]) |
594 | AC_DEFINE([BROKEN_SETREUID], [1], [Define if your setreuid() is broken]) | 595 | AC_DEFINE([BROKEN_SETREUID], [1], [Define if your setreuid() is broken]) |
@@ -704,6 +705,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
704 | AC_CHECK_LIB([sandbox], [sandbox_apply], [ | 705 | AC_CHECK_LIB([sandbox], [sandbox_apply], [ |
705 | SSHDLIBS="$SSHDLIBS -lsandbox" | 706 | SSHDLIBS="$SSHDLIBS -lsandbox" |
706 | ]) | 707 | ]) |
708 | # proc_pidinfo()-based closefrom() replacement. | ||
709 | AC_CHECK_HEADERS([libproc.h]) | ||
710 | AC_CHECK_FUNCS([proc_pidinfo]) | ||
707 | ;; | 711 | ;; |
708 | *-*-dragonfly*) | 712 | *-*-dragonfly*) |
709 | SSHDLIBS="$SSHDLIBS -lcrypt" | 713 | SSHDLIBS="$SSHDLIBS -lcrypt" |
@@ -841,7 +845,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
841 | AC_DEFINE([SYS_RDOMAIN_LINUX], [1], | 845 | AC_DEFINE([SYS_RDOMAIN_LINUX], [1], |
842 | [Support routing domains using Linux VRF]), [], [ | 846 | [Support routing domains using Linux VRF]), [], [ |
843 | #ifdef HAVE_SYS_TYPES_H | 847 | #ifdef HAVE_SYS_TYPES_H |
844 | # include <sys/types.H> | 848 | # include <sys/types.h> |
845 | #endif | 849 | #endif |
846 | ]) | 850 | ]) |
847 | AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [], | 851 | AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [], |
@@ -972,7 +976,6 @@ mips-sony-bsd|mips-sony-newsos4) | |||
972 | conf_wtmp_location=/usr/adm/wtmp | 976 | conf_wtmp_location=/usr/adm/wtmp |
973 | maildir=/usr/spool/mail | 977 | maildir=/usr/spool/mail |
974 | AC_DEFINE([HAVE_NEXT], [1], [Define if you are on NeXT]) | 978 | AC_DEFINE([HAVE_NEXT], [1], [Define if you are on NeXT]) |
975 | AC_DEFINE([BROKEN_REALPATH]) | ||
976 | AC_DEFINE([USE_PIPES]) | 979 | AC_DEFINE([USE_PIPES]) |
977 | AC_DEFINE([BROKEN_SAVED_UIDS], [1], [Needed for NeXT]) | 980 | AC_DEFINE([BROKEN_SAVED_UIDS], [1], [Needed for NeXT]) |
978 | ;; | 981 | ;; |
@@ -1781,6 +1784,9 @@ AC_CHECK_FUNCS([ \ | |||
1781 | Blowfish_expandstate \ | 1784 | Blowfish_expandstate \ |
1782 | Blowfish_expand0state \ | 1785 | Blowfish_expand0state \ |
1783 | Blowfish_stream2word \ | 1786 | Blowfish_stream2word \ |
1787 | SHA256Update \ | ||
1788 | SHA384Update \ | ||
1789 | SHA512Update \ | ||
1784 | asprintf \ | 1790 | asprintf \ |
1785 | b64_ntop \ | 1791 | b64_ntop \ |
1786 | __b64_ntop \ | 1792 | __b64_ntop \ |
@@ -1833,6 +1839,7 @@ AC_CHECK_FUNCS([ \ | |||
1833 | llabs \ | 1839 | llabs \ |
1834 | login_getcapbool \ | 1840 | login_getcapbool \ |
1835 | md5_crypt \ | 1841 | md5_crypt \ |
1842 | memmem \ | ||
1836 | memmove \ | 1843 | memmove \ |
1837 | memset_s \ | 1844 | memset_s \ |
1838 | mkdtemp \ | 1845 | mkdtemp \ |
@@ -2104,32 +2111,6 @@ AC_CHECK_FUNCS([setresgid], [ | |||
2104 | ) | 2111 | ) |
2105 | ]) | 2112 | ]) |
2106 | 2113 | ||
2107 | AC_CHECK_FUNCS([realpath], [ | ||
2108 | dnl the sftp v3 spec says SSH_FXP_REALPATH will "canonicalize any given | ||
2109 | dnl path name", however some implementations of realpath (and some | ||
2110 | dnl versions of the POSIX spec) do not work on non-existent files, | ||
2111 | dnl so we use the OpenBSD implementation on those platforms. | ||
2112 | AC_MSG_CHECKING([if realpath works with non-existent files]) | ||
2113 | AC_RUN_IFELSE( | ||
2114 | [AC_LANG_PROGRAM([[ | ||
2115 | #include <limits.h> | ||
2116 | #include <stdlib.h> | ||
2117 | #include <errno.h> | ||
2118 | ]], [[ | ||
2119 | char buf[PATH_MAX]; | ||
2120 | if (realpath("/opensshnonexistentfilename1234", buf) == NULL) | ||
2121 | if (errno == ENOENT) | ||
2122 | exit(1); | ||
2123 | exit(0); | ||
2124 | ]])], | ||
2125 | [AC_MSG_RESULT([yes])], | ||
2126 | [AC_DEFINE([BROKEN_REALPATH], [1], | ||
2127 | [realpath does not work with nonexistent files]) | ||
2128 | AC_MSG_RESULT([no])], | ||
2129 | [AC_MSG_WARN([cross compiling: assuming working])] | ||
2130 | ) | ||
2131 | ]) | ||
2132 | |||
2133 | AC_MSG_CHECKING([for working fflush(NULL)]) | 2114 | AC_MSG_CHECKING([for working fflush(NULL)]) |
2134 | AC_RUN_IFELSE( | 2115 | AC_RUN_IFELSE( |
2135 | [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])], | 2116 | [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])], |
@@ -2956,16 +2937,9 @@ if test "x$openssl" = "xyes" ; then | |||
2956 | fi | 2937 | fi |
2957 | AC_CHECK_FUNCS([crypt DES_crypt]) | 2938 | AC_CHECK_FUNCS([crypt DES_crypt]) |
2958 | 2939 | ||
2959 | # Search for SHA256 support in libc and/or OpenSSL | 2940 | # Check for SHA256, SHA384 and SHA512 support in OpenSSL |
2960 | AC_CHECK_FUNCS([SHA256_Update EVP_sha256], , | 2941 | AC_CHECK_FUNCS([EVP_sha256 EVP_sha384 EVP_sha512]) |
2961 | [unsupported_algorithms="$unsupported_algorithms \ | 2942 | |
2962 | hmac-sha2-256 \ | ||
2963 | hmac-sha2-512 \ | ||
2964 | diffie-hellman-group-exchange-sha256 \ | ||
2965 | hmac-sha2-256-etm@openssh.com \ | ||
2966 | hmac-sha2-512-etm@openssh.com" | ||
2967 | ] | ||
2968 | ) | ||
2969 | # Search for RIPE-MD support in OpenSSL | 2943 | # Search for RIPE-MD support in OpenSSL |
2970 | AC_CHECK_FUNCS([EVP_ripemd160], , | 2944 | AC_CHECK_FUNCS([EVP_ripemd160], , |
2971 | [unsupported_algorithms="$unsupported_algorithms \ | 2945 | [unsupported_algorithms="$unsupported_algorithms \ |
@@ -3422,8 +3396,7 @@ AC_RUN_IFELSE( | |||
3422 | #include <stdlib.h> | 3396 | #include <stdlib.h> |
3423 | ]],[[ | 3397 | ]],[[ |
3424 | struct rlimit rl_zero; | 3398 | struct rlimit rl_zero; |
3425 | int fd, r; | 3399 | int r; |
3426 | fd_set fds; | ||
3427 | 3400 | ||
3428 | rl_zero.rlim_cur = rl_zero.rlim_max = 0; | 3401 | rl_zero.rlim_cur = rl_zero.rlim_max = 0; |
3429 | r = setrlimit(RLIMIT_NOFILE, &rl_zero); | 3402 | r = setrlimit(RLIMIT_NOFILE, &rl_zero); |
@@ -4730,9 +4703,9 @@ AC_ARG_WITH([mantype], | |||
4730 | ] | 4703 | ] |
4731 | ) | 4704 | ) |
4732 | if test -z "$MANTYPE"; then | 4705 | if test -z "$MANTYPE"; then |
4733 | TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb" | 4706 | if ${MANDOC} ${srcdir}/ssh.1 >/dev/null 2>&1; then |
4734 | AC_PATH_PROGS([NROFF], [nroff awf], [/bin/false], [$TestPath]) | 4707 | MANTYPE=doc |
4735 | if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then | 4708 | elif ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then |
4736 | MANTYPE=doc | 4709 | MANTYPE=doc |
4737 | elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then | 4710 | elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then |
4738 | MANTYPE=man | 4711 | MANTYPE=man |