Deleted Added
full compact
configure.ac (323129) configure.ac (323134)
1# $Id: configure.ac,v 1.583 2014/08/26 20:32:01 djm Exp $
1# $Id: configure.ac,v 1.583 2014/08/26 20:32:01 djm Exp $
2# $FreeBSD: stable/11/crypto/openssh/configure.ac 323129 2017-09-02 14:25:20Z des $
2# $FreeBSD: stable/11/crypto/openssh/configure.ac 323134 2017-09-02 21:58:42Z des $
3#
4# Copyright (c) 1999-2004 Damien Miller
5#
6# Permission to use, copy, modify, and distribute this software for any
7# purpose with or without fee is hereby granted, provided that the above
8# copyright notice and this permission notice appear in all copies.
9#
10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 64 unchanged lines hidden (view full) ---

75
76# System features
77AC_SYS_LARGEFILE
78
79if test -z "$AR" ; then
80 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
81fi
82
3#
4# Copyright (c) 1999-2004 Damien Miller
5#
6# Permission to use, copy, modify, and distribute this software for any
7# purpose with or without fee is hereby granted, provided that the above
8# copyright notice and this permission notice appear in all copies.
9#
10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 64 unchanged lines hidden (view full) ---

75
76# System features
77AC_SYS_LARGEFILE
78
79if test -z "$AR" ; then
80 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
81fi
82
83# Use LOGIN_PROGRAM from environment if possible
84if test ! -z "$LOGIN_PROGRAM" ; then
85 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM"],
86 [If your header files don't define LOGIN_PROGRAM,
87 then use this (detected) from environment and PATH])
88else
89 # Search for login
90 AC_PATH_PROG([LOGIN_PROGRAM_FALLBACK], [login])
91 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
92 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM_FALLBACK"])
93 fi
94fi
95
96AC_PATH_PROG([PATH_PASSWD_PROG], [passwd])
97if test ! -z "$PATH_PASSWD_PROG" ; then
98 AC_DEFINE_UNQUOTED([_PATH_PASSWD_PROG], ["$PATH_PASSWD_PROG"],
99 [Full path of your "passwd" program])
100fi
101
102if test -z "$LD" ; then
103 LD=$CC

--- 15 unchanged lines hidden (view full) ---

119])
120AC_CHECK_DECL([PR_SET_NO_NEW_PRIVS], [have_linux_no_new_privs=1], , [
121 #include <sys/types.h>
122 #include <linux/prctl.h>
123])
124
125openssl=yes
126ssh1=no
83AC_PATH_PROG([PATH_PASSWD_PROG], [passwd])
84if test ! -z "$PATH_PASSWD_PROG" ; then
85 AC_DEFINE_UNQUOTED([_PATH_PASSWD_PROG], ["$PATH_PASSWD_PROG"],
86 [Full path of your "passwd" program])
87fi
88
89if test -z "$LD" ; then
90 LD=$CC

--- 15 unchanged lines hidden (view full) ---

106])
107AC_CHECK_DECL([PR_SET_NO_NEW_PRIVS], [have_linux_no_new_privs=1], , [
108 #include <sys/types.h>
109 #include <linux/prctl.h>
110])
111
112openssl=yes
113ssh1=no
114COMMENT_OUT_RSA1="#no ssh1#"
127AC_ARG_WITH([openssl],
128 [ --without-openssl Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL** ],
129 [ if test "x$withval" = "xno" ; then
130 openssl=no
131 ssh1=no
132 fi
133 ]
134)

--- 8 unchanged lines hidden (view full) ---

143AC_ARG_WITH([ssh1],
144 [ --with-ssh1 Enable support for SSH protocol 1],
145 [
146 if test "x$withval" = "xyes" ; then
147 if test "x$openssl" = "xno" ; then
148 AC_MSG_ERROR([Cannot enable SSH protocol 1 with OpenSSL disabled])
149 fi
150 ssh1=yes
115AC_ARG_WITH([openssl],
116 [ --without-openssl Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL** ],
117 [ if test "x$withval" = "xno" ; then
118 openssl=no
119 ssh1=no
120 fi
121 ]
122)

--- 8 unchanged lines hidden (view full) ---

131AC_ARG_WITH([ssh1],
132 [ --with-ssh1 Enable support for SSH protocol 1],
133 [
134 if test "x$withval" = "xyes" ; then
135 if test "x$openssl" = "xno" ; then
136 AC_MSG_ERROR([Cannot enable SSH protocol 1 with OpenSSL disabled])
137 fi
138 ssh1=yes
139 COMMENT_OUT_RSA1=""
151 elif test "x$withval" = "xno" ; then
152 ssh1=no
153 else
154 AC_MSG_ERROR([unknown --with-ssh1 argument])
155 fi
156 ]
157)
158AC_MSG_CHECKING([whether SSH protocol 1 support is enabled])
159if test "x$ssh1" = "xyes" ; then
160 AC_MSG_RESULT([yes])
161 AC_DEFINE_UNQUOTED([WITH_SSH1], [1], [include SSH protocol version 1 support])
140 elif test "x$withval" = "xno" ; then
141 ssh1=no
142 else
143 AC_MSG_ERROR([unknown --with-ssh1 argument])
144 fi
145 ]
146)
147AC_MSG_CHECKING([whether SSH protocol 1 support is enabled])
148if test "x$ssh1" = "xyes" ; then
149 AC_MSG_RESULT([yes])
150 AC_DEFINE_UNQUOTED([WITH_SSH1], [1], [include SSH protocol version 1 support])
151 AC_SUBST([COMMENT_OUT_RSA1])
162else
163 AC_MSG_RESULT([no])
164fi
165
166use_stack_protector=1
167use_toolchain_hardening=1
168AC_ARG_WITH([stackprotect],
169 [ --without-stackprotect Don't use compiler's stack protection], [

--- 240 unchanged lines hidden (view full) ---

410 sys/bsdtty.h \
411 sys/cdefs.h \
412 sys/dir.h \
413 sys/mman.h \
414 sys/ndir.h \
415 sys/poll.h \
416 sys/prctl.h \
417 sys/pstat.h \
152else
153 AC_MSG_RESULT([no])
154fi
155
156use_stack_protector=1
157use_toolchain_hardening=1
158AC_ARG_WITH([stackprotect],
159 [ --without-stackprotect Don't use compiler's stack protection], [

--- 240 unchanged lines hidden (view full) ---

400 sys/bsdtty.h \
401 sys/cdefs.h \
402 sys/dir.h \
403 sys/mman.h \
404 sys/ndir.h \
405 sys/poll.h \
406 sys/prctl.h \
407 sys/pstat.h \
408 sys/ptrace.h \
418 sys/select.h \
419 sys/stat.h \
420 sys/stream.h \
421 sys/stropts.h \
422 sys/strtio.h \
423 sys/statvfs.h \
424 sys/sysmacros.h \
425 sys/time.h \

--- 229 unchanged lines hidden (view full) ---

655 SSHDLIBS="$SSHDLIBS -lsandbox"
656 ])
657 ;;
658*-*-dragonfly*)
659 SSHDLIBS="$SSHDLIBS -lcrypt"
660 TEST_MALLOC_OPTIONS="AFGJPRX"
661 ;;
662*-*-haiku*)
409 sys/select.h \
410 sys/stat.h \
411 sys/stream.h \
412 sys/stropts.h \
413 sys/strtio.h \
414 sys/statvfs.h \
415 sys/sysmacros.h \
416 sys/time.h \

--- 229 unchanged lines hidden (view full) ---

646 SSHDLIBS="$SSHDLIBS -lsandbox"
647 ])
648 ;;
649*-*-dragonfly*)
650 SSHDLIBS="$SSHDLIBS -lcrypt"
651 TEST_MALLOC_OPTIONS="AFGJPRX"
652 ;;
653*-*-haiku*)
663 LIBS="$LIBS -lbsd "
664 AC_CHECK_LIB([network], [socket])
665 AC_DEFINE([HAVE_U_INT64_T])
666 MANTYPE=man
667 ;;
654 LIBS="$LIBS -lbsd "
655 AC_CHECK_LIB([network], [socket])
656 AC_DEFINE([HAVE_U_INT64_T])
657 MANTYPE=man
658 ;;
668*-*-hpux*)
669 # first we define all of the options common to all HP-UX releases
670 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
671 IPADDR_IN_DISPLAY=yes
672 AC_DEFINE([USE_PIPES])
659*-*-hpux*)
660 # first we define all of the options common to all HP-UX releases
661 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
662 IPADDR_IN_DISPLAY=yes
663 AC_DEFINE([USE_PIPES])
673 AC_DEFINE([LOGIN_NO_ENDOPT], [1],
674 [Define if your login program cannot handle end of options ("--")])
675 AC_DEFINE([LOGIN_NEEDS_UTMPX])
676 AC_DEFINE([LOCKED_PASSWD_STRING], ["*"],
677 [String used in /etc/passwd to denote locked account])
678 AC_DEFINE([SPT_TYPE], [SPT_PSTAT])
679 AC_DEFINE([PLATFORM_SYS_DIR_UID], 2, [System dirs owned by bin (uid 2)])
680 maildir="/var/mail"
681 LIBS="$LIBS -lsec"
682 AC_CHECK_LIB([xnet], [t_error], ,

--- 100 unchanged lines hidden (view full) ---

783 [Open tunnel devices the Linux tun/tap way])
784 AC_DEFINE([SSH_TUN_COMPAT_AF], [1],
785 [Use tunnel device compatibility to OpenBSD])
786 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
787 [Prepend the address family to IP tunnel traffic])
788 fi
789 AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
790 [], [#include <linux/types.h>])
664 AC_DEFINE([LOGIN_NEEDS_UTMPX])
665 AC_DEFINE([LOCKED_PASSWD_STRING], ["*"],
666 [String used in /etc/passwd to denote locked account])
667 AC_DEFINE([SPT_TYPE], [SPT_PSTAT])
668 AC_DEFINE([PLATFORM_SYS_DIR_UID], 2, [System dirs owned by bin (uid 2)])
669 maildir="/var/mail"
670 LIBS="$LIBS -lsec"
671 AC_CHECK_LIB([xnet], [t_error], ,

--- 100 unchanged lines hidden (view full) ---

772 [Open tunnel devices the Linux tun/tap way])
773 AC_DEFINE([SSH_TUN_COMPAT_AF], [1],
774 [Use tunnel device compatibility to OpenBSD])
775 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
776 [Prepend the address family to IP tunnel traffic])
777 fi
778 AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
779 [], [#include <linux/types.h>])
791 AC_CHECK_FUNCS([prctl])
792 AC_MSG_CHECKING([for seccomp architecture])
793 seccomp_audit_arch=
794 case "$host" in
795 x86_64-*)
796 seccomp_audit_arch=AUDIT_ARCH_X86_64
797 ;;
798 i*86-*)
799 seccomp_audit_arch=AUDIT_ARCH_I386

--- 48 unchanged lines hidden (view full) ---

848 fi
849 CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE"
850 AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
851 AC_CHECK_HEADER([net/if_tap.h], ,
852 AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
853 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
854 [Prepend the address family to IP tunnel traffic])
855 TEST_MALLOC_OPTIONS="AJRX"
780 AC_MSG_CHECKING([for seccomp architecture])
781 seccomp_audit_arch=
782 case "$host" in
783 x86_64-*)
784 seccomp_audit_arch=AUDIT_ARCH_X86_64
785 ;;
786 i*86-*)
787 seccomp_audit_arch=AUDIT_ARCH_I386

--- 48 unchanged lines hidden (view full) ---

836 fi
837 CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE"
838 AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
839 AC_CHECK_HEADER([net/if_tap.h], ,
840 AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
841 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
842 [Prepend the address family to IP tunnel traffic])
843 TEST_MALLOC_OPTIONS="AJRX"
856 AC_DEFINE([BROKEN_STRNVIS], [1],
857 [NetBSD strnvis argument order is swapped compared to OpenBSD])
858 AC_DEFINE([BROKEN_READ_COMPARISON], [1],
859 [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it])
860 ;;
861*-*-freebsd*)
862 check_for_libcrypt_later=1
863 AC_DEFINE([LOCKED_PASSWD_PREFIX], ["*LOCKED*"], [Account locked with pw(1)])
864 AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
865 AC_CHECK_HEADER([net/if_tap.h], ,
866 AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
867 AC_DEFINE([BROKEN_GLOB], [1], [FreeBSD glob does not do what we need])
844 AC_DEFINE([BROKEN_READ_COMPARISON], [1],
845 [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it])
846 ;;
847*-*-freebsd*)
848 check_for_libcrypt_later=1
849 AC_DEFINE([LOCKED_PASSWD_PREFIX], ["*LOCKED*"], [Account locked with pw(1)])
850 AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
851 AC_CHECK_HEADER([net/if_tap.h], ,
852 AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
853 AC_DEFINE([BROKEN_GLOB], [1], [FreeBSD glob does not do what we need])
868 AC_DEFINE([BROKEN_STRNVIS], [1],
869 [FreeBSD strnvis argument order is swapped compared to OpenBSD])
870 TEST_MALLOC_OPTIONS="AJRX"
871 # Preauth crypto occasionally uses file descriptors for crypto offload
872 # and will crash if they cannot be opened.
873 AC_DEFINE([SANDBOX_SKIP_RLIMIT_NOFILE], [1],
874 [define if setrlimit RLIMIT_NOFILE breaks things])
875 ;;
876*-*-bsdi*)
877 AC_DEFINE([SETEUID_BREAKS_SETUID])

--- 20 unchanged lines hidden (view full) ---

898 TEST_MALLOC_OPTIONS="AFGJPRX"
899 ;;
900*-*-solaris*)
901 if test "x$withval" != "xno" ; then
902 need_dash_r=1
903 fi
904 AC_DEFINE([PAM_SUN_CODEBASE])
905 AC_DEFINE([LOGIN_NEEDS_UTMPX])
854 TEST_MALLOC_OPTIONS="AJRX"
855 # Preauth crypto occasionally uses file descriptors for crypto offload
856 # and will crash if they cannot be opened.
857 AC_DEFINE([SANDBOX_SKIP_RLIMIT_NOFILE], [1],
858 [define if setrlimit RLIMIT_NOFILE breaks things])
859 ;;
860*-*-bsdi*)
861 AC_DEFINE([SETEUID_BREAKS_SETUID])

--- 20 unchanged lines hidden (view full) ---

882 TEST_MALLOC_OPTIONS="AFGJPRX"
883 ;;
884*-*-solaris*)
885 if test "x$withval" != "xno" ; then
886 need_dash_r=1
887 fi
888 AC_DEFINE([PAM_SUN_CODEBASE])
889 AC_DEFINE([LOGIN_NEEDS_UTMPX])
906 AC_DEFINE([LOGIN_NEEDS_TERM], [1],
907 [Some versions of /bin/login need the TERM supplied
908 on the commandline])
909 AC_DEFINE([PAM_TTY_KLUDGE])
910 AC_DEFINE([SSHPAM_CHAUTHTOK_NEEDS_RUID], [1],
911 [Define if pam_chauthtok wants real uid set
912 to the unpriv'ed user])
913 AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
914 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
915 AC_DEFINE([SSHD_ACQUIRES_CTTY], [1],
916 [Define if sshd somehow reacquires a controlling TTY

--- 242 unchanged lines hidden (view full) ---

1159 *-*-nto-qnx6*)
1160 AC_DEFINE([DISABLE_FD_PASSING])
1161 ;;
1162 esac
1163 ;;
1164
1165*-*-ultrix*)
1166 AC_DEFINE([BROKEN_GETGROUPS], [1], [getgroups(0,NULL) will return -1])
890 AC_DEFINE([PAM_TTY_KLUDGE])
891 AC_DEFINE([SSHPAM_CHAUTHTOK_NEEDS_RUID], [1],
892 [Define if pam_chauthtok wants real uid set
893 to the unpriv'ed user])
894 AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
895 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
896 AC_DEFINE([SSHD_ACQUIRES_CTTY], [1],
897 [Define if sshd somehow reacquires a controlling TTY

--- 242 unchanged lines hidden (view full) ---

1140 *-*-nto-qnx6*)
1141 AC_DEFINE([DISABLE_FD_PASSING])
1142 ;;
1143 esac
1144 ;;
1145
1146*-*-ultrix*)
1147 AC_DEFINE([BROKEN_GETGROUPS], [1], [getgroups(0,NULL) will return -1])
1167 AC_DEFINE([BROKEN_MMAP], [1], [Ultrix mmap can't map files])
1168 AC_DEFINE([NEED_SETPGRP])
1169 AC_DEFINE([HAVE_SYS_SYSLOG_H], [1], [Force use of sys/syslog.h on Ultrix])
1170 ;;
1171
1172*-*-lynxos)
1148 AC_DEFINE([NEED_SETPGRP])
1149 AC_DEFINE([HAVE_SYS_SYSLOG_H], [1], [Force use of sys/syslog.h on Ultrix])
1150 ;;
1151
1152*-*-lynxos)
1173 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
1174 AC_DEFINE([BROKEN_SETVBUF], [1], [LynxOS has broken setvbuf() implementation])
1175 ;;
1153 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
1154 AC_DEFINE([BROKEN_SETVBUF], [1],
1155 [LynxOS has broken setvbuf() implementation])
1156 ;;
1176esac
1177
1178AC_MSG_CHECKING([compiler and flags for sanity])
1179AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])],
1180 [ AC_MSG_RESULT([yes]) ],
1181 [
1182 AC_MSG_RESULT([no])
1183 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])

--- 601 unchanged lines hidden (view full) ---

1785 inet_ntoa \
1786 inet_ntop \
1787 innetgr \
1788 login_getcapbool \
1789 md5_crypt \
1790 memmove \
1791 memset_s \
1792 mkdtemp \
1157esac
1158
1159AC_MSG_CHECKING([compiler and flags for sanity])
1160AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])],
1161 [ AC_MSG_RESULT([yes]) ],
1162 [
1163 AC_MSG_RESULT([no])
1164 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])

--- 601 unchanged lines hidden (view full) ---

1766 inet_ntoa \
1767 inet_ntop \
1768 innetgr \
1769 login_getcapbool \
1770 md5_crypt \
1771 memmove \
1772 memset_s \
1773 mkdtemp \
1793 mmap \
1794 ngetaddrinfo \
1795 nsleep \
1796 ogetaddrinfo \
1797 openlog_r \
1798 pledge \
1799 poll \
1800 prctl \
1801 pstat \

--- 19 unchanged lines hidden (view full) ---

1821 setsid \
1822 setvbuf \
1823 sigaction \
1824 sigvec \
1825 snprintf \
1826 socketpair \
1827 statfs \
1828 statvfs \
1774 ngetaddrinfo \
1775 nsleep \
1776 ogetaddrinfo \
1777 openlog_r \
1778 pledge \
1779 poll \
1780 prctl \
1781 pstat \

--- 19 unchanged lines hidden (view full) ---

1801 setsid \
1802 setvbuf \
1803 sigaction \
1804 sigvec \
1805 snprintf \
1806 socketpair \
1807 statfs \
1808 statvfs \
1809 strcasestr \
1829 strdup \
1830 strerror \
1831 strlcat \
1832 strlcpy \
1833 strmode \
1834 strnlen \
1835 strnvis \
1836 strptime \

--- 17 unchanged lines hidden (view full) ---

1854])
1855
1856dnl Wide character support. Linux man page says it needs _XOPEN_SOURCE.
1857saved_CFLAGS="$CFLAGS"
1858CFLAGS="$CFLAGS -D_XOPEN_SOURCE"
1859AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
1860CFLAGS="$saved_CFLAGS"
1861
1810 strdup \
1811 strerror \
1812 strlcat \
1813 strlcpy \
1814 strmode \
1815 strnlen \
1816 strnvis \
1817 strptime \

--- 17 unchanged lines hidden (view full) ---

1835])
1836
1837dnl Wide character support. Linux man page says it needs _XOPEN_SOURCE.
1838saved_CFLAGS="$CFLAGS"
1839CFLAGS="$CFLAGS -D_XOPEN_SOURCE"
1840AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
1841CFLAGS="$saved_CFLAGS"
1842
1843TEST_SSH_UTF8=${TEST_SSH_UTF8:=yes}
1844AC_MSG_CHECKING([for utf8 locale support])
1845AC_RUN_IFELSE(
1846 [AC_LANG_PROGRAM([[
1847#include <locale.h>
1848#include <stdlib.h>
1849 ]], [[
1850 char *loc = setlocale(LC_CTYPE, "en_US.UTF-8");
1851 if (loc != NULL)
1852 exit(0);
1853 exit(1);
1854 ]])],
1855 AC_MSG_RESULT(yes),
1856 [AC_MSG_RESULT(no)
1857 TEST_SSH_UTF8=no],
1858 AC_MSG_WARN([cross compiling: assuming yes])
1859)
1860
1862AC_LINK_IFELSE(
1863 [AC_LANG_PROGRAM(
1864 [[ #include <ctype.h> ]],
1865 [[ return (isblank('a')); ]])],
1866 [AC_DEFINE([HAVE_ISBLANK], [1], [Define if you have isblank(3C).])
1867])
1868
1869disable_pkcs11=

--- 521 unchanged lines hidden (view full) ---

2391 [
2392 AC_MSG_RESULT([yes])
2393 AC_DEFINE([GETSPNAM_CONFLICTING_DEFS], [1],
2394 [Conflicting defs for getspnam])
2395 ]
2396 )
2397fi
2398
1861AC_LINK_IFELSE(
1862 [AC_LANG_PROGRAM(
1863 [[ #include <ctype.h> ]],
1864 [[ return (isblank('a')); ]])],
1865 [AC_DEFINE([HAVE_ISBLANK], [1], [Define if you have isblank(3C).])
1866])
1867
1868disable_pkcs11=

--- 521 unchanged lines hidden (view full) ---

2390 [
2391 AC_MSG_RESULT([yes])
2392 AC_DEFINE([GETSPNAM_CONFLICTING_DEFS], [1],
2393 [Conflicting defs for getspnam])
2394 ]
2395 )
2396fi
2397
2398dnl NetBSD added an strnvis and unfortunately made it incompatible with the
2399dnl existing one in OpenBSD and Linux's libbsd (the former having existed
2400dnl for over ten years). Despite this incompatibility being reported during
2401dnl development (see http://gnats.netbsd.org/44977) they still shipped it.
2402dnl Even more unfortunately FreeBSD and later MacOS picked up this incompatible
2403dnl implementation. Try to detect this mess, and assume the only safe option
2404dnl if we're cross compiling.
2405dnl
2406dnl OpenBSD, 2001: strnvis(char *dst, const char *src, size_t dlen, int flag);
2407dnl NetBSD: 2012, strnvis(char *dst, size_t dlen, const char *src, int flag);
2408if test "x$ac_cv_func_strnvis" = "xyes"; then
2409 AC_MSG_CHECKING([for working strnvis])
2410 AC_RUN_IFELSE(
2411 [AC_LANG_PROGRAM([[
2412#include <signal.h>
2413#include <stdlib.h>
2414#include <string.h>
2415#include <vis.h>
2416static void sighandler(int sig) { _exit(1); }
2417 ]], [[
2418 char dst[16];
2419
2420 signal(SIGSEGV, sighandler);
2421 if (strnvis(dst, "src", 4, 0) && strcmp(dst, "src") == 0)
2422 exit(0);
2423 exit(1)
2424 ]])],
2425 [AC_MSG_RESULT([yes])],
2426 [AC_MSG_RESULT([no])
2427 AC_DEFINE([BROKEN_STRNVIS], [1], [strnvis detected broken])],
2428 [AC_MSG_WARN([cross compiling: assuming broken])
2429 AC_DEFINE([BROKEN_STRNVIS], [1], [strnvis assumed broken])]
2430 )
2431fi
2432
2399AC_FUNC_GETPGRP
2400
2401# Search for OpenSSL
2402saved_CPPFLAGS="$CPPFLAGS"
2403saved_LDFLAGS="$LDFLAGS"
2404AC_ARG_WITH([ssl-dir],
2405 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
2406 [

--- 663 unchanged lines hidden (view full) ---

3070 SSHDLIBS="$SSHDLIBS -ldl"
3071 ;;
3072 esac
3073 fi
3074 fi
3075 ]
3076)
3077
2433AC_FUNC_GETPGRP
2434
2435# Search for OpenSSL
2436saved_CPPFLAGS="$CPPFLAGS"
2437saved_LDFLAGS="$LDFLAGS"
2438AC_ARG_WITH([ssl-dir],
2439 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
2440 [

--- 663 unchanged lines hidden (view full) ---

3104 SSHDLIBS="$SSHDLIBS -ldl"
3105 ;;
3106 esac
3107 fi
3108 fi
3109 ]
3110)
3111
3112AC_ARG_WITH([pam-service],
3113 [ --with-pam-service=name Specify PAM service name ],
3114 [
3115 if test "x$withval" != "xno" && \
3116 test "x$withval" != "xyes" ; then
3117 AC_DEFINE_UNQUOTED([SSHD_PAM_SERVICE],
3118 ["$withval"], [sshd PAM service name])
3119 fi
3120 ]
3121)
3122
3078# Check for older PAM
3079if test "x$PAM_MSG" = "xyes" ; then
3080 # Check PAM strerror arguments (old PAM)
3081 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
3082 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3083#include <stdlib.h>
3084#if defined(HAVE_SECURITY_PAM_APPL_H)
3085#include <security/pam_appl.h>

--- 1097 unchanged lines hidden (view full) ---

4183 KRB5ROOT="/usr/local"
4184 else
4185 KRB5ROOT=${withval}
4186 fi
4187
4188 AC_DEFINE([KRB5], [1], [Define if you want Kerberos 5 support])
4189 KRB5_MSG="yes"
4190
3123# Check for older PAM
3124if test "x$PAM_MSG" = "xyes" ; then
3125 # Check PAM strerror arguments (old PAM)
3126 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
3127 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3128#include <stdlib.h>
3129#if defined(HAVE_SECURITY_PAM_APPL_H)
3130#include <security/pam_appl.h>

--- 1097 unchanged lines hidden (view full) ---

4228 KRB5ROOT="/usr/local"
4229 else
4230 KRB5ROOT=${withval}
4231 fi
4232
4233 AC_DEFINE([KRB5], [1], [Define if you want Kerberos 5 support])
4234 KRB5_MSG="yes"
4235
4191 AC_PATH_PROG([KRB5CONF], [krb5-config],
4236 AC_PATH_TOOL([KRB5CONF], [krb5-config],
4192 [$KRB5ROOT/bin/krb5-config],
4193 [$KRB5ROOT/bin:$PATH])
4194 if test -x $KRB5CONF ; then
4195 K5CFLAGS="`$KRB5CONF --cflags`"
4196 K5LIBS="`$KRB5CONF --libs`"
4197 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
4198
4199 AC_MSG_CHECKING([for gssapi support])

--- 841 unchanged lines hidden (view full) ---

5041
5042if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
5043 TEST_SSH_IPV6=no
5044else
5045 TEST_SSH_IPV6=yes
5046fi
5047AC_CHECK_DECL([BROKEN_GETADDRINFO], [TEST_SSH_IPV6=no])
5048AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6])
4237 [$KRB5ROOT/bin/krb5-config],
4238 [$KRB5ROOT/bin:$PATH])
4239 if test -x $KRB5CONF ; then
4240 K5CFLAGS="`$KRB5CONF --cflags`"
4241 K5LIBS="`$KRB5CONF --libs`"
4242 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
4243
4244 AC_MSG_CHECKING([for gssapi support])

--- 841 unchanged lines hidden (view full) ---

5086
5087if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
5088 TEST_SSH_IPV6=no
5089else
5090 TEST_SSH_IPV6=yes
5091fi
5092AC_CHECK_DECL([BROKEN_GETADDRINFO], [TEST_SSH_IPV6=no])
5093AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6])
5094AC_SUBST([TEST_SSH_UTF8], [$TEST_SSH_UTF8])
5049AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS])
5050AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
5051
5052AC_EXEEXT
5053AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
5054 openbsd-compat/Makefile openbsd-compat/regress/Makefile \
5055 survey.sh])
5056AC_OUTPUT

--- 100 unchanged lines hidden ---
5095AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS])
5096AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
5097
5098AC_EXEEXT
5099AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
5100 openbsd-compat/Makefile openbsd-compat/regress/Makefile \
5101 survey.sh])
5102AC_OUTPUT

--- 100 unchanged lines hidden ---