summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-12-20 00:22:52 +0000
committerColin Watson <cjwatson@debian.org>2016-12-20 00:22:52 +0000
commit971a7653746a6972b907dfe0ce139c06e4a6f482 (patch)
tree70fb964265d57ae4967be55b75dbb2a122e9b969 /configure.ac
parenta8ed8d256b2e2c05b0c15565a7938028c5192277 (diff)
parent4a354fc231174901f2629437c2a6e924a2dd6772 (diff)
Import openssh_7.4p1.orig.tar.gz
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac114
1 files changed, 80 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index 373d21b34..eb9f45dcc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,19 +79,6 @@ if test -z "$AR" ; then
79 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***]) 79 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
80fi 80fi
81 81
82# Use LOGIN_PROGRAM from environment if possible
83if test ! -z "$LOGIN_PROGRAM" ; then
84 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM"],
85 [If your header files don't define LOGIN_PROGRAM,
86 then use this (detected) from environment and PATH])
87else
88 # Search for login
89 AC_PATH_PROG([LOGIN_PROGRAM_FALLBACK], [login])
90 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
91 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM_FALLBACK"])
92 fi
93fi
94
95AC_PATH_PROG([PATH_PASSWD_PROG], [passwd]) 82AC_PATH_PROG([PATH_PASSWD_PROG], [passwd])
96if test ! -z "$PATH_PASSWD_PROG" ; then 83if test ! -z "$PATH_PASSWD_PROG" ; then
97 AC_DEFINE_UNQUOTED([_PATH_PASSWD_PROG], ["$PATH_PASSWD_PROG"], 84 AC_DEFINE_UNQUOTED([_PATH_PASSWD_PROG], ["$PATH_PASSWD_PROG"],
@@ -123,6 +110,7 @@ AC_CHECK_DECL([PR_SET_NO_NEW_PRIVS], [have_linux_no_new_privs=1], , [
123 110
124openssl=yes 111openssl=yes
125ssh1=no 112ssh1=no
113COMMENT_OUT_RSA1="#no ssh1#"
126AC_ARG_WITH([openssl], 114AC_ARG_WITH([openssl],
127 [ --without-openssl Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL** ], 115 [ --without-openssl Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL** ],
128 [ if test "x$withval" = "xno" ; then 116 [ if test "x$withval" = "xno" ; then
@@ -147,6 +135,7 @@ AC_ARG_WITH([ssh1],
147 AC_MSG_ERROR([Cannot enable SSH protocol 1 with OpenSSL disabled]) 135 AC_MSG_ERROR([Cannot enable SSH protocol 1 with OpenSSL disabled])
148 fi 136 fi
149 ssh1=yes 137 ssh1=yes
138 COMMENT_OUT_RSA1=""
150 elif test "x$withval" = "xno" ; then 139 elif test "x$withval" = "xno" ; then
151 ssh1=no 140 ssh1=no
152 else 141 else
@@ -158,6 +147,7 @@ AC_MSG_CHECKING([whether SSH protocol 1 support is enabled])
158if test "x$ssh1" = "xyes" ; then 147if test "x$ssh1" = "xyes" ; then
159 AC_MSG_RESULT([yes]) 148 AC_MSG_RESULT([yes])
160 AC_DEFINE_UNQUOTED([WITH_SSH1], [1], [include SSH protocol version 1 support]) 149 AC_DEFINE_UNQUOTED([WITH_SSH1], [1], [include SSH protocol version 1 support])
150 AC_SUBST([COMMENT_OUT_RSA1])
161else 151else
162 AC_MSG_RESULT([no]) 152 AC_MSG_RESULT([no])
163fi 153fi
@@ -415,6 +405,7 @@ AC_CHECK_HEADERS([ \
415 sys/poll.h \ 405 sys/poll.h \
416 sys/prctl.h \ 406 sys/prctl.h \
417 sys/pstat.h \ 407 sys/pstat.h \
408 sys/ptrace.h \
418 sys/select.h \ 409 sys/select.h \
419 sys/stat.h \ 410 sys/stat.h \
420 sys/stream.h \ 411 sys/stream.h \
@@ -653,18 +644,16 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
653 TEST_MALLOC_OPTIONS="AFGJPRX" 644 TEST_MALLOC_OPTIONS="AFGJPRX"
654 ;; 645 ;;
655*-*-haiku*) 646*-*-haiku*)
656 LIBS="$LIBS -lbsd " 647 LIBS="$LIBS -lbsd "
657 AC_CHECK_LIB([network], [socket]) 648 AC_CHECK_LIB([network], [socket])
658 AC_DEFINE([HAVE_U_INT64_T]) 649 AC_DEFINE([HAVE_U_INT64_T])
659 MANTYPE=man 650 MANTYPE=man
660 ;; 651 ;;
661*-*-hpux*) 652*-*-hpux*)
662 # first we define all of the options common to all HP-UX releases 653 # first we define all of the options common to all HP-UX releases
663 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 654 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
664 IPADDR_IN_DISPLAY=yes 655 IPADDR_IN_DISPLAY=yes
665 AC_DEFINE([USE_PIPES]) 656 AC_DEFINE([USE_PIPES])
666 AC_DEFINE([LOGIN_NO_ENDOPT], [1],
667 [Define if your login program cannot handle end of options ("--")])
668 AC_DEFINE([LOGIN_NEEDS_UTMPX]) 657 AC_DEFINE([LOGIN_NEEDS_UTMPX])
669 AC_DEFINE([LOCKED_PASSWD_STRING], ["*"], 658 AC_DEFINE([LOCKED_PASSWD_STRING], ["*"],
670 [String used in /etc/passwd to denote locked account]) 659 [String used in /etc/passwd to denote locked account])
@@ -781,7 +770,6 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
781 fi 770 fi
782 AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [], 771 AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
783 [], [#include <linux/types.h>]) 772 [], [#include <linux/types.h>])
784 AC_CHECK_FUNCS([prctl])
785 AC_MSG_CHECKING([for seccomp architecture]) 773 AC_MSG_CHECKING([for seccomp architecture])
786 seccomp_audit_arch= 774 seccomp_audit_arch=
787 case "$host" in 775 case "$host" in
@@ -846,8 +834,6 @@ mips-sony-bsd|mips-sony-newsos4)
846 AC_DEFINE([SSH_TUN_PREPEND_AF], [1], 834 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
847 [Prepend the address family to IP tunnel traffic]) 835 [Prepend the address family to IP tunnel traffic])
848 TEST_MALLOC_OPTIONS="AJRX" 836 TEST_MALLOC_OPTIONS="AJRX"
849 AC_DEFINE([BROKEN_STRNVIS], [1],
850 [NetBSD strnvis argument order is swapped compared to OpenBSD])
851 AC_DEFINE([BROKEN_READ_COMPARISON], [1], 837 AC_DEFINE([BROKEN_READ_COMPARISON], [1],
852 [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it]) 838 [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it])
853 ;; 839 ;;
@@ -858,8 +844,6 @@ mips-sony-bsd|mips-sony-newsos4)
858 AC_CHECK_HEADER([net/if_tap.h], , 844 AC_CHECK_HEADER([net/if_tap.h], ,
859 AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support])) 845 AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
860 AC_DEFINE([BROKEN_GLOB], [1], [FreeBSD glob does not do what we need]) 846 AC_DEFINE([BROKEN_GLOB], [1], [FreeBSD glob does not do what we need])
861 AC_DEFINE([BROKEN_STRNVIS], [1],
862 [FreeBSD strnvis argument order is swapped compared to OpenBSD])
863 TEST_MALLOC_OPTIONS="AJRX" 847 TEST_MALLOC_OPTIONS="AJRX"
864 # Preauth crypto occasionally uses file descriptors for crypto offload 848 # Preauth crypto occasionally uses file descriptors for crypto offload
865 # and will crash if they cannot be opened. 849 # and will crash if they cannot be opened.
@@ -896,9 +880,6 @@ mips-sony-bsd|mips-sony-newsos4)
896 fi 880 fi
897 AC_DEFINE([PAM_SUN_CODEBASE]) 881 AC_DEFINE([PAM_SUN_CODEBASE])
898 AC_DEFINE([LOGIN_NEEDS_UTMPX]) 882 AC_DEFINE([LOGIN_NEEDS_UTMPX])
899 AC_DEFINE([LOGIN_NEEDS_TERM], [1],
900 [Some versions of /bin/login need the TERM supplied
901 on the commandline])
902 AC_DEFINE([PAM_TTY_KLUDGE]) 883 AC_DEFINE([PAM_TTY_KLUDGE])
903 AC_DEFINE([SSHPAM_CHAUTHTOK_NEEDS_RUID], [1], 884 AC_DEFINE([SSHPAM_CHAUTHTOK_NEEDS_RUID], [1],
904 [Define if pam_chauthtok wants real uid set 885 [Define if pam_chauthtok wants real uid set
@@ -1157,15 +1138,15 @@ mips-sony-bsd|mips-sony-newsos4)
1157 1138
1158*-*-ultrix*) 1139*-*-ultrix*)
1159 AC_DEFINE([BROKEN_GETGROUPS], [1], [getgroups(0,NULL) will return -1]) 1140 AC_DEFINE([BROKEN_GETGROUPS], [1], [getgroups(0,NULL) will return -1])
1160 AC_DEFINE([BROKEN_MMAP], [1], [Ultrix mmap can't map files])
1161 AC_DEFINE([NEED_SETPGRP]) 1141 AC_DEFINE([NEED_SETPGRP])
1162 AC_DEFINE([HAVE_SYS_SYSLOG_H], [1], [Force use of sys/syslog.h on Ultrix]) 1142 AC_DEFINE([HAVE_SYS_SYSLOG_H], [1], [Force use of sys/syslog.h on Ultrix])
1163 ;; 1143 ;;
1164 1144
1165*-*-lynxos) 1145*-*-lynxos)
1166 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" 1146 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
1167 AC_DEFINE([BROKEN_SETVBUF], [1], [LynxOS has broken setvbuf() implementation]) 1147 AC_DEFINE([BROKEN_SETVBUF], [1],
1168 ;; 1148 [LynxOS has broken setvbuf() implementation])
1149 ;;
1169esac 1150esac
1170 1151
1171AC_MSG_CHECKING([compiler and flags for sanity]) 1152AC_MSG_CHECKING([compiler and flags for sanity])
@@ -1727,7 +1708,6 @@ AC_CHECK_FUNCS([ \
1727 memmove \ 1708 memmove \
1728 memset_s \ 1709 memset_s \
1729 mkdtemp \ 1710 mkdtemp \
1730 mmap \
1731 ngetaddrinfo \ 1711 ngetaddrinfo \
1732 nsleep \ 1712 nsleep \
1733 ogetaddrinfo \ 1713 ogetaddrinfo \
@@ -1763,6 +1743,7 @@ AC_CHECK_FUNCS([ \
1763 socketpair \ 1743 socketpair \
1764 statfs \ 1744 statfs \
1765 statvfs \ 1745 statvfs \
1746 strcasestr \
1766 strdup \ 1747 strdup \
1767 strerror \ 1748 strerror \
1768 strlcat \ 1749 strlcat \
@@ -1796,6 +1777,24 @@ CFLAGS="$CFLAGS -D_XOPEN_SOURCE"
1796AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth]) 1777AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
1797CFLAGS="$saved_CFLAGS" 1778CFLAGS="$saved_CFLAGS"
1798 1779
1780TEST_SSH_UTF8=${TEST_SSH_UTF8:=yes}
1781AC_MSG_CHECKING([for utf8 locale support])
1782AC_RUN_IFELSE(
1783 [AC_LANG_PROGRAM([[
1784#include <locale.h>
1785#include <stdlib.h>
1786 ]], [[
1787 char *loc = setlocale(LC_CTYPE, "en_US.UTF-8");
1788 if (loc != NULL)
1789 exit(0);
1790 exit(1);
1791 ]])],
1792 AC_MSG_RESULT(yes),
1793 [AC_MSG_RESULT(no)
1794 TEST_SSH_UTF8=no],
1795 AC_MSG_WARN([cross compiling: assuming yes])
1796)
1797
1799AC_LINK_IFELSE( 1798AC_LINK_IFELSE(
1800 [AC_LANG_PROGRAM( 1799 [AC_LANG_PROGRAM(
1801 [[ #include <ctype.h> ]], 1800 [[ #include <ctype.h> ]],
@@ -2333,6 +2332,41 @@ if test "x$check_for_conflicting_getspnam" = "x1"; then
2333 ) 2332 )
2334fi 2333fi
2335 2334
2335dnl NetBSD added an strnvis and unfortunately made it incompatible with the
2336dnl existing one in OpenBSD and Linux's libbsd (the former having existed
2337dnl for over ten years). Despite this incompatibility being reported during
2338dnl development (see http://gnats.netbsd.org/44977) they still shipped it.
2339dnl Even more unfortunately FreeBSD and later MacOS picked up this incompatible
2340dnl implementation. Try to detect this mess, and assume the only safe option
2341dnl if we're cross compiling.
2342dnl
2343dnl OpenBSD, 2001: strnvis(char *dst, const char *src, size_t dlen, int flag);
2344dnl NetBSD: 2012, strnvis(char *dst, size_t dlen, const char *src, int flag);
2345if test "x$ac_cv_func_strnvis" = "xyes"; then
2346 AC_MSG_CHECKING([for working strnvis])
2347 AC_RUN_IFELSE(
2348 [AC_LANG_PROGRAM([[
2349#include <signal.h>
2350#include <stdlib.h>
2351#include <string.h>
2352#include <vis.h>
2353static void sighandler(int sig) { _exit(1); }
2354 ]], [[
2355 char dst[16];
2356
2357 signal(SIGSEGV, sighandler);
2358 if (strnvis(dst, "src", 4, 0) && strcmp(dst, "src") == 0)
2359 exit(0);
2360 exit(1)
2361 ]])],
2362 [AC_MSG_RESULT([yes])],
2363 [AC_MSG_RESULT([no])
2364 AC_DEFINE([BROKEN_STRNVIS], [1], [strnvis detected broken])],
2365 [AC_MSG_WARN([cross compiling: assuming broken])
2366 AC_DEFINE([BROKEN_STRNVIS], [1], [strnvis assumed broken])]
2367 )
2368fi
2369
2336AC_FUNC_GETPGRP 2370AC_FUNC_GETPGRP
2337 2371
2338# Search for OpenSSL 2372# Search for OpenSSL
@@ -3012,6 +3046,17 @@ AC_ARG_WITH([pam],
3012 ] 3046 ]
3013) 3047)
3014 3048
3049AC_ARG_WITH([pam-service],
3050 [ --with-pam-service=name Specify PAM service name ],
3051 [
3052 if test "x$withval" != "xno" && \
3053 test "x$withval" != "xyes" ; then
3054 AC_DEFINE_UNQUOTED([SSHD_PAM_SERVICE],
3055 ["$withval"], [sshd PAM service name])
3056 fi
3057 ]
3058)
3059
3015# Check for older PAM 3060# Check for older PAM
3016if test "x$PAM_MSG" = "xyes" ; then 3061if test "x$PAM_MSG" = "xyes" ; then
3017 # Check PAM strerror arguments (old PAM) 3062 # Check PAM strerror arguments (old PAM)
@@ -4125,7 +4170,7 @@ AC_ARG_WITH([kerberos5],
4125 AC_DEFINE([KRB5], [1], [Define if you want Kerberos 5 support]) 4170 AC_DEFINE([KRB5], [1], [Define if you want Kerberos 5 support])
4126 KRB5_MSG="yes" 4171 KRB5_MSG="yes"
4127 4172
4128 AC_PATH_PROG([KRB5CONF], [krb5-config], 4173 AC_PATH_TOOL([KRB5CONF], [krb5-config],
4129 [$KRB5ROOT/bin/krb5-config], 4174 [$KRB5ROOT/bin/krb5-config],
4130 [$KRB5ROOT/bin:$PATH]) 4175 [$KRB5ROOT/bin:$PATH])
4131 if test -x $KRB5CONF ; then 4176 if test -x $KRB5CONF ; then
@@ -4983,6 +5028,7 @@ else
4983fi 5028fi
4984AC_CHECK_DECL([BROKEN_GETADDRINFO], [TEST_SSH_IPV6=no]) 5029AC_CHECK_DECL([BROKEN_GETADDRINFO], [TEST_SSH_IPV6=no])
4985AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6]) 5030AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6])
5031AC_SUBST([TEST_SSH_UTF8], [$TEST_SSH_UTF8])
4986AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS]) 5032AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS])
4987AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms]) 5033AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
4988 5034