summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2018-04-03 08:20:28 +0100
committerColin Watson <cjwatson@debian.org>2018-04-03 08:20:28 +0100
commited6ae9c1a014a08ff5db3d768f01f2e427eeb476 (patch)
tree601025e307745d351946c01ab13f419ddb6dae29 /configure.ac
parent62f54f20bf351468e0124f63cc2902ee40d9b0e9 (diff)
parenta0349a1cc4a18967ad1dbff5389bcdf9da098814 (diff)
Import openssh_7.7p1.orig.tar.gz
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac217
1 files changed, 162 insertions, 55 deletions
diff --git a/configure.ac b/configure.ac
index 889f50637..663062bef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,3 @@
1# $Id: configure.ac,v 1.583 2014/08/26 20:32:01 djm Exp $
2# 1#
3# Copyright (c) 1999-2004 Damien Miller 2# Copyright (c) 1999-2004 Damien Miller
4# 3#
@@ -30,12 +29,11 @@ AC_PROG_CPP
30AC_PROG_RANLIB 29AC_PROG_RANLIB
31AC_PROG_INSTALL 30AC_PROG_INSTALL
32AC_PROG_EGREP 31AC_PROG_EGREP
32AC_PROG_MKDIR_P
33AC_CHECK_TOOLS([AR], [ar]) 33AC_CHECK_TOOLS([AR], [ar])
34AC_PATH_PROG([CAT], [cat]) 34AC_PATH_PROG([CAT], [cat])
35AC_PATH_PROG([KILL], [kill]) 35AC_PATH_PROG([KILL], [kill])
36AC_PATH_PROGS([PERL], [perl5 perl])
37AC_PATH_PROG([SED], [sed]) 36AC_PATH_PROG([SED], [sed])
38AC_SUBST([PERL])
39AC_PATH_PROG([ENT], [ent]) 37AC_PATH_PROG([ENT], [ent])
40AC_SUBST([ENT]) 38AC_SUBST([ENT])
41AC_PATH_PROG([TEST_MINUS_S_SH], [bash]) 39AC_PATH_PROG([TEST_MINUS_S_SH], [bash])
@@ -164,6 +162,10 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
164 OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result]) 162 OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result])
165 OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) 163 OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing])
166 if test "x$use_toolchain_hardening" = "x1"; then 164 if test "x$use_toolchain_hardening" = "x1"; then
165 OSSH_CHECK_CFLAG_COMPILE([-mfunction-return=thunk]) # gcc
166 OSSH_CHECK_CFLAG_COMPILE([-mindirect-branch=thunk]) # gcc
167 OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang
168 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,retpolineplt])
167 OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2]) 169 OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2])
168 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,relro]) 170 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,relro])
169 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,now]) 171 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,now])
@@ -263,6 +265,18 @@ __attribute__((__unused__)) static void foo(void){return;}]],
263 [compiler does not accept __attribute__ on return types]) ] 265 [compiler does not accept __attribute__ on return types]) ]
264) 266)
265 267
268AC_MSG_CHECKING([if compiler allows __attribute__ prototype args])
269AC_COMPILE_IFELSE(
270 [AC_LANG_PROGRAM([[
271#include <stdlib.h>
272typedef void foo(const char *, ...) __attribute__((format(printf, 1, 2)));]],
273 [[ exit(0); ]])],
274 [ AC_MSG_RESULT([yes]) ],
275 [ AC_MSG_RESULT([no])
276 AC_DEFINE(NO_ATTRIBUTE_ON_PROTOTYPE_ARGS, 1,
277 [compiler does not accept __attribute__ on protoype args]) ]
278)
279
266if test "x$no_attrib_nonnull" != "x1" ; then 280if test "x$no_attrib_nonnull" != "x1" ; then
267 AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull]) 281 AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull])
268fi 282fi
@@ -363,6 +377,7 @@ AC_CHECK_HEADERS([ \
363 glob.h \ 377 glob.h \
364 ia.h \ 378 ia.h \
365 iaf.h \ 379 iaf.h \
380 ifaddrs.h \
366 inttypes.h \ 381 inttypes.h \
367 langinfo.h \ 382 langinfo.h \
368 limits.h \ 383 limits.h \
@@ -386,12 +401,13 @@ AC_CHECK_HEADERS([ \
386 stdint.h \ 401 stdint.h \
387 string.h \ 402 string.h \
388 strings.h \ 403 strings.h \
389 sys/audit.h \
390 sys/bitypes.h \ 404 sys/bitypes.h \
391 sys/bsdtty.h \ 405 sys/bsdtty.h \
392 sys/cdefs.h \ 406 sys/cdefs.h \
393 sys/dir.h \ 407 sys/dir.h \
408 sys/file.h \
394 sys/mman.h \ 409 sys/mman.h \
410 sys/label.h \
395 sys/ndir.h \ 411 sys/ndir.h \
396 sys/poll.h \ 412 sys/poll.h \
397 sys/prctl.h \ 413 sys/prctl.h \
@@ -406,6 +422,7 @@ AC_CHECK_HEADERS([ \
406 sys/sysmacros.h \ 422 sys/sysmacros.h \
407 sys/time.h \ 423 sys/time.h \
408 sys/timers.h \ 424 sys/timers.h \
425 sys/vfs.h \
409 time.h \ 426 time.h \
410 tmpdir.h \ 427 tmpdir.h \
411 ttyent.h \ 428 ttyent.h \
@@ -420,6 +437,20 @@ AC_CHECK_HEADERS([ \
420 wchar.h \ 437 wchar.h \
421]) 438])
422 439
440# On some platforms (eg SunOS4) sys/audit.h requires sys/[time|types|label.h]
441# to be included first.
442AC_CHECK_HEADERS([sys/audit.h], [], [], [
443#ifdef HAVE_SYS_TIME_H
444# include <sys/time.h>
445#endif
446#ifdef HAVE_SYS_TYPES_H
447# include <sys/types.h>
448#endif
449#ifdef HAVE_SYS_LABEL_H
450# include <sys/label.h>
451#endif
452])
453
423# sys/capsicum.h requires sys/types.h 454# sys/capsicum.h requires sys/types.h
424AC_CHECK_HEADERS([sys/capsicum.h], [], [], [ 455AC_CHECK_HEADERS([sys/capsicum.h], [], [], [
425#ifdef HAVE_SYS_TYPES_H 456#ifdef HAVE_SYS_TYPES_H
@@ -427,6 +458,16 @@ AC_CHECK_HEADERS([sys/capsicum.h], [], [], [
427#endif 458#endif
428]) 459])
429 460
461# net/route.h requires sys/socket.h and sys/types.h.
462# sys/sysctl.h also requires sys/param.h
463AC_CHECK_HEADERS([net/route.h sys/sysctl.h], [], [], [
464#ifdef HAVE_SYS_TYPES_H
465# include <sys/types.h>
466#endif
467#include <sys/param.h>
468#include <sys/socket.h>
469])
470
430# lastlog.h requires sys/time.h to be included first on Solaris 471# lastlog.h requires sys/time.h to be included first on Solaris
431AC_CHECK_HEADERS([lastlog.h], [], [], [ 472AC_CHECK_HEADERS([lastlog.h], [], [], [
432#ifdef HAVE_SYS_TIME_H 473#ifdef HAVE_SYS_TIME_H
@@ -562,6 +603,8 @@ case "$host" in
562 [AIX 5.2 and 5.3 (and presumably newer) require this]) 603 [AIX 5.2 and 5.3 (and presumably newer) require this])
563 AC_DEFINE([PTY_ZEROREAD], [1], [read(1) can return 0 for a non-closed fd]) 604 AC_DEFINE([PTY_ZEROREAD], [1], [read(1) can return 0 for a non-closed fd])
564 AC_DEFINE([PLATFORM_SYS_DIR_UID], 2, [System dirs owned by bin (uid 2)]) 605 AC_DEFINE([PLATFORM_SYS_DIR_UID], 2, [System dirs owned by bin (uid 2)])
606 AC_DEFINE([BROKEN_STRNDUP], 1, [strndup broken, see APAR IY61211])
607 AC_DEFINE([BROKEN_STRNLEN], 1, [strnlen broken, see APAR IY62551])
565 ;; 608 ;;
566*-*-android*) 609*-*-android*)
567 AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp]) 610 AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp])
@@ -769,8 +812,36 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
769 AC_DEFINE([SSH_TUN_PREPEND_AF], [1], 812 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
770 [Prepend the address family to IP tunnel traffic]) 813 [Prepend the address family to IP tunnel traffic])
771 fi 814 fi
815 AC_CHECK_HEADER([linux/if.h],
816 AC_DEFINE([SYS_RDOMAIN_LINUX], [1],
817 [Support routing domains using Linux VRF]), [], [
818#ifdef HAVE_SYS_TYPES_H
819# include <sys/types.H>
820#endif
821 ])
772 AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [], 822 AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
773 [], [#include <linux/types.h>]) 823 [], [#include <linux/types.h>])
824 # Obtain MIPS ABI
825 case "$host" in
826 mips*)
827 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
828#if _MIPS_SIM != _ABIO32
829#error
830#endif
831 ]])],[mips_abi="o32"],[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
832#if _MIPS_SIM != _ABIN32
833#error
834#endif
835 ]])],[mips_abi="n32"],[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
836#if _MIPS_SIM != _ABI64
837#error
838#endif
839 ]])],[mips_abi="n64"],[AC_MSG_ERROR([unknown MIPS ABI])
840 ])
841 ])
842 ])
843 ;;
844 esac
774 AC_MSG_CHECKING([for seccomp architecture]) 845 AC_MSG_CHECKING([for seccomp architecture])
775 seccomp_audit_arch= 846 seccomp_audit_arch=
776 case "$host" in 847 case "$host" in
@@ -805,10 +876,24 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
805 seccomp_audit_arch=AUDIT_ARCH_MIPSEL 876 seccomp_audit_arch=AUDIT_ARCH_MIPSEL
806 ;; 877 ;;
807 mips64-*) 878 mips64-*)
808 seccomp_audit_arch=AUDIT_ARCH_MIPS64 879 case "$mips_abi" in
880 "n32")
881 seccomp_audit_arch=AUDIT_ARCH_MIPS64N32
882 ;;
883 "n64")
884 seccomp_audit_arch=AUDIT_ARCH_MIPS64
885 ;;
886 esac
809 ;; 887 ;;
810 mips64el-*) 888 mips64el-*)
811 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64 889 case "$mips_abi" in
890 "n32")
891 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64N32
892 ;;
893 "n64")
894 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
895 ;;
896 esac
812 ;; 897 ;;
813 esac 898 esac
814 if test "x$seccomp_audit_arch" != "x" ; then 899 if test "x$seccomp_audit_arch" != "x" ; then
@@ -959,6 +1044,7 @@ mips-sony-bsd|mips-sony-newsos4)
959 conf_wtmp_location=/var/adm/wtmp 1044 conf_wtmp_location=/var/adm/wtmp
960 conf_lastlog_location=/var/adm/lastlog 1045 conf_lastlog_location=/var/adm/lastlog
961 AC_DEFINE([USE_PIPES]) 1046 AC_DEFINE([USE_PIPES])
1047 AC_DEFINE([DISABLE_UTMPX], [1], [no utmpx])
962 ;; 1048 ;;
963*-ncr-sysv*) 1049*-ncr-sysv*)
964 LIBS="$LIBS -lc89" 1050 LIBS="$LIBS -lc89"
@@ -1007,20 +1093,16 @@ mips-sony-bsd|mips-sony-newsos4)
1007 AC_DEFINE([PASSWD_NEEDS_USERNAME]) 1093 AC_DEFINE([PASSWD_NEEDS_USERNAME])
1008 AC_DEFINE([BROKEN_TCGETATTR_ICANON]) 1094 AC_DEFINE([BROKEN_TCGETATTR_ICANON])
1009 TEST_SHELL=$SHELL # let configure find us a capable shell 1095 TEST_SHELL=$SHELL # let configure find us a capable shell
1096 check_for_libcrypt_later=1
1010 case "$host" in 1097 case "$host" in
1011 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x 1098 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
1012 maildir=/var/spool/mail 1099 maildir=/var/spool/mail
1013 AC_DEFINE([BROKEN_LIBIAF], [1],
1014 [ia_uinfo routines not supported by OS yet])
1015 AC_DEFINE([BROKEN_UPDWTMPX]) 1100 AC_DEFINE([BROKEN_UPDWTMPX])
1016 AC_CHECK_LIB([prot], [getluid], [ LIBS="$LIBS -lprot" 1101 AC_CHECK_LIB([prot], [getluid], [ LIBS="$LIBS -lprot"
1017 AC_CHECK_FUNCS([getluid setluid], , , [-lprot]) 1102 AC_CHECK_FUNCS([getluid setluid], , , [-lprot])
1018 AC_DEFINE([HAVE_SECUREWARE])
1019 AC_DEFINE([DISABLE_SHADOW])
1020 ], , ) 1103 ], , )
1021 ;; 1104 ;;
1022 *) AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"]) 1105 *) AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
1023 check_for_libcrypt_later=1
1024 ;; 1106 ;;
1025 esac 1107 esac
1026 ;; 1108 ;;
@@ -1053,40 +1135,6 @@ mips-sony-bsd|mips-sony-newsos4)
1053 TEST_SHELL=$SHELL # let configure find us a capable shell 1135 TEST_SHELL=$SHELL # let configure find us a capable shell
1054 SKIP_DISABLE_LASTLOG_DEFINE=yes 1136 SKIP_DISABLE_LASTLOG_DEFINE=yes
1055 ;; 1137 ;;
1056*-*-unicosmk*)
1057 AC_DEFINE([NO_SSH_LASTLOG], [1],
1058 [Define if you don't want to use lastlog in session.c])
1059 AC_DEFINE([SETEUID_BREAKS_SETUID])
1060 AC_DEFINE([BROKEN_SETREUID])
1061 AC_DEFINE([BROKEN_SETREGID])
1062 AC_DEFINE([USE_PIPES])
1063 AC_DEFINE([DISABLE_FD_PASSING])
1064 LDFLAGS="$LDFLAGS"
1065 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
1066 MANTYPE=cat
1067 ;;
1068*-*-unicosmp*)
1069 AC_DEFINE([SETEUID_BREAKS_SETUID])
1070 AC_DEFINE([BROKEN_SETREUID])
1071 AC_DEFINE([BROKEN_SETREGID])
1072 AC_DEFINE([WITH_ABBREV_NO_TTY])
1073 AC_DEFINE([USE_PIPES])
1074 AC_DEFINE([DISABLE_FD_PASSING])
1075 LDFLAGS="$LDFLAGS"
1076 LIBS="$LIBS -lgen -lacid -ldb"
1077 MANTYPE=cat
1078 ;;
1079*-*-unicos*)
1080 AC_DEFINE([SETEUID_BREAKS_SETUID])
1081 AC_DEFINE([BROKEN_SETREUID])
1082 AC_DEFINE([BROKEN_SETREGID])
1083 AC_DEFINE([USE_PIPES])
1084 AC_DEFINE([DISABLE_FD_PASSING])
1085 AC_DEFINE([NO_SSH_LASTLOG])
1086 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
1087 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
1088 MANTYPE=cat
1089 ;;
1090*-dec-osf*) 1138*-dec-osf*)
1091 AC_MSG_CHECKING([for Digital Unix SIA]) 1139 AC_MSG_CHECKING([for Digital Unix SIA])
1092 no_osfsia="" 1140 no_osfsia=""
@@ -1337,8 +1385,23 @@ AC_FUNC_STRFTIME
1337AC_FUNC_MALLOC 1385AC_FUNC_MALLOC
1338AC_FUNC_REALLOC 1386AC_FUNC_REALLOC
1339# autoconf doesn't have AC_FUNC_CALLOC so fake it if malloc returns NULL; 1387# autoconf doesn't have AC_FUNC_CALLOC so fake it if malloc returns NULL;
1340if test "x$ac_cv_func_malloc_0_nonnull" != "xyes"; then 1388AC_MSG_CHECKING([if calloc(0, N) returns non-null])
1341 AC_DEFINE(HAVE_CALLOC, 0, [calloc(x, 0) returns NULL]) 1389AC_RUN_IFELSE(
1390 [AC_LANG_PROGRAM(
1391 [[ #include <stdlib.h> ]],
1392 [[ void *p = calloc(0, 1); exit(p == NULL); ]]
1393 )],
1394 [ func_calloc_0_nonnull=yes ],
1395 [ func_calloc_0_nonnull=no ],
1396 [ AC_MSG_WARN([cross compiling: assuming same as malloc])
1397 func_calloc_0_nonnull="$ac_cv_func_malloc_0_nonnull"]
1398)
1399AC_MSG_RESULT([$func_calloc_0_nonnull])
1400
1401if test "x$func_calloc_0_nonnull" == "xyes"; then
1402 AC_DEFINE(HAVE_CALLOC, 1, [calloc(0, x) returns non-null])
1403else
1404 AC_DEFINE(HAVE_CALLOC, 0, [calloc(0, x) returns NULL])
1342 AC_DEFINE(calloc, rpl_calloc, 1405 AC_DEFINE(calloc, rpl_calloc,
1343 [Define to rpl_calloc if the replacement function should be used.]) 1406 [Define to rpl_calloc if the replacement function should be used.])
1344fi 1407fi
@@ -1487,7 +1550,7 @@ AC_ARG_WITH(ldns,
1487 ldns="" 1550 ldns=""
1488 if test "x$withval" = "xyes" ; then 1551 if test "x$withval" = "xyes" ; then
1489 AC_PATH_TOOL([LDNSCONFIG], [ldns-config], [no]) 1552 AC_PATH_TOOL([LDNSCONFIG], [ldns-config], [no])
1490 if test "x$PKGCONFIG" = "xno"; then 1553 if test "x$LDNSCONFIG" = "xno"; then
1491 CPPFLAGS="$CPPFLAGS -I${withval}/include" 1554 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1492 LDFLAGS="$LDFLAGS -L${withval}/lib" 1555 LDFLAGS="$LDFLAGS -L${withval}/lib"
1493 LIBS="-lldns $LIBS" 1556 LIBS="-lldns $LIBS"
@@ -1695,6 +1758,7 @@ AC_CHECK_FUNCS([ \
1695 bcrypt_pbkdf \ 1758 bcrypt_pbkdf \
1696 bindresvport_sa \ 1759 bindresvport_sa \
1697 blf_enc \ 1760 blf_enc \
1761 bzero \
1698 cap_rights_limit \ 1762 cap_rights_limit \
1699 clock \ 1763 clock \
1700 closefrom \ 1764 closefrom \
@@ -1705,6 +1769,7 @@ AC_CHECK_FUNCS([ \
1705 explicit_bzero \ 1769 explicit_bzero \
1706 fchmod \ 1770 fchmod \
1707 fchown \ 1771 fchown \
1772 flock \
1708 freeaddrinfo \ 1773 freeaddrinfo \
1709 freezero \ 1774 freezero \
1710 fstatfs \ 1775 fstatfs \
@@ -1719,9 +1784,9 @@ AC_CHECK_FUNCS([ \
1719 getpeereid \ 1784 getpeereid \
1720 getpeerucred \ 1785 getpeerucred \
1721 getpgid \ 1786 getpgid \
1722 getpgrp \
1723 _getpty \ 1787 _getpty \
1724 getrlimit \ 1788 getrlimit \
1789 getsid \
1725 getttyent \ 1790 getttyent \
1726 glob \ 1791 glob \
1727 group_from_gid \ 1792 group_from_gid \
@@ -1743,6 +1808,7 @@ AC_CHECK_FUNCS([ \
1743 poll \ 1808 poll \
1744 prctl \ 1809 prctl \
1745 pstat \ 1810 pstat \
1811 raise \
1746 readpassphrase \ 1812 readpassphrase \
1747 reallocarray \ 1813 reallocarray \
1748 recvmsg \ 1814 recvmsg \
@@ -1777,6 +1843,7 @@ AC_CHECK_FUNCS([ \
1777 strlcat \ 1843 strlcat \
1778 strlcpy \ 1844 strlcpy \
1779 strmode \ 1845 strmode \
1846 strndup \
1780 strnlen \ 1847 strnlen \
1781 strnvis \ 1848 strnvis \
1782 strptime \ 1849 strptime \
@@ -1800,6 +1867,8 @@ AC_CHECK_FUNCS([ \
1800 warn \ 1867 warn \
1801]) 1868])
1802 1869
1870AC_CHECK_DECLS([bzero])
1871
1803dnl Wide character support. 1872dnl Wide character support.
1804AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth]) 1873AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
1805 1874
@@ -1842,7 +1911,10 @@ AC_ARG_ENABLE([pkcs11],
1842if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then 1911if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then
1843 # PKCS#11 support requires dlopen() and co 1912 # PKCS#11 support requires dlopen() and co
1844 AC_SEARCH_LIBS([dlopen], [dl], 1913 AC_SEARCH_LIBS([dlopen], [dl],
1845 [AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support])] 1914 AC_CHECK_DECL([RTLD_NOW],
1915 AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support]),
1916 [], [#include <dlfcn.h>]
1917 )
1846 ) 1918 )
1847fi 1919fi
1848 1920
@@ -1869,7 +1941,6 @@ AC_SEARCH_LIBS([clock_gettime], [rt],
1869 [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime])]) 1941 [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime])])
1870 1942
1871dnl Make sure prototypes are defined for these before using them. 1943dnl Make sure prototypes are defined for these before using them.
1872AC_CHECK_DECL([getrusage], [AC_CHECK_FUNCS([getrusage])])
1873AC_CHECK_DECL([strsep], 1944AC_CHECK_DECL([strsep],
1874 [AC_CHECK_FUNCS([strsep])], 1945 [AC_CHECK_FUNCS([strsep])],
1875 [], 1946 [],
@@ -1905,7 +1976,7 @@ AC_CHECK_DECLS([O_NONBLOCK], , ,
1905#endif 1976#endif
1906 ]) 1977 ])
1907 1978
1908AC_CHECK_DECLS([writev], , , [ 1979AC_CHECK_DECLS([readv, writev], , , [
1909#include <sys/types.h> 1980#include <sys/types.h>
1910#include <sys/uio.h> 1981#include <sys/uio.h>
1911#include <unistd.h> 1982#include <unistd.h>
@@ -2022,6 +2093,16 @@ AC_CHECK_FUNCS([realpath], [
2022 ) 2093 )
2023]) 2094])
2024 2095
2096AC_MSG_CHECKING([for working fflush(NULL)])
2097AC_RUN_IFELSE(
2098 [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])],
2099 AC_MSG_RESULT([yes]),
2100 [AC_MSG_RESULT([no])
2101 AC_DEFINE([FFLUSH_NULL_BUG], [1],
2102 [define if fflush(NULL) does not work])],
2103 AC_MSG_WARN([cross compiling: assuming working])
2104)
2105
2025dnl Checks for time functions 2106dnl Checks for time functions
2026AC_CHECK_FUNCS([gettimeofday time]) 2107AC_CHECK_FUNCS([gettimeofday time])
2027dnl Checks for utmp functions 2108dnl Checks for utmp functions
@@ -2393,7 +2474,16 @@ static void sighandler(int sig) { _exit(1); }
2393 ) 2474 )
2394fi 2475fi
2395 2476
2396AC_FUNC_GETPGRP 2477AC_CHECK_FUNCS([getpgrp],[
2478 AC_MSG_CHECKING([if getpgrp accepts zero args])
2479 AC_COMPILE_IFELSE(
2480 [AC_LANG_PROGRAM([[$ac_includes_default]], [[ getpgrp(); ]])],
2481 [ AC_MSG_RESULT([yes])
2482 AC_DEFINE([GETPGRP_VOID], [1], [getpgrp takes zero args])],
2483 [ AC_MSG_RESULT([no])
2484 AC_DEFINE([GETPGRP_VOID], [0], [getpgrp takes one arg])]
2485 )
2486])
2397 2487
2398# Search for OpenSSL 2488# Search for OpenSSL
2399saved_CPPFLAGS="$CPPFLAGS" 2489saved_CPPFLAGS="$CPPFLAGS"
@@ -3641,6 +3731,23 @@ AC_CHECK_TYPES([fsblkcnt_t, fsfilcnt_t], , , [
3641#endif 3731#endif
3642]) 3732])
3643 3733
3734AC_CHECK_MEMBERS([struct statfs.f_flags], [], [], [[
3735#include <sys/types.h>
3736#ifdef HAVE_SYS_BITYPES_H
3737#include <sys/bitypes.h>
3738#endif
3739#ifdef HAVE_SYS_STATFS_H
3740#include <sys/statfs.h>
3741#endif
3742#ifdef HAVE_SYS_STATVFS_H
3743#include <sys/statvfs.h>
3744#endif
3745#ifdef HAVE_SYS_VFS_H
3746#include <sys/vfs.h>
3747#endif
3748]])
3749
3750
3644AC_CHECK_TYPES([in_addr_t, in_port_t], , , 3751AC_CHECK_TYPES([in_addr_t, in_port_t], , ,
3645[#include <sys/types.h> 3752[#include <sys/types.h>
3646#include <netinet/in.h>]) 3753#include <netinet/in.h>])
@@ -4755,7 +4862,7 @@ if test ! -d $piddir ; then
4755fi 4862fi
4756 4863
4757AC_ARG_WITH([pid-dir], 4864AC_ARG_WITH([pid-dir],
4758 [ --with-pid-dir=PATH Specify location of ssh.pid file], 4865 [ --with-pid-dir=PATH Specify location of sshd.pid file],
4759 [ 4866 [
4760 if test -n "$withval" && test "x$withval" != "xno" && \ 4867 if test -n "$withval" && test "x$withval" != "xno" && \
4761 test "x${withval}" != "xyes"; then 4868 test "x${withval}" != "xyes"; then
@@ -5056,6 +5163,7 @@ AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6])
5056AC_SUBST([TEST_SSH_UTF8], [$TEST_SSH_UTF8]) 5163AC_SUBST([TEST_SSH_UTF8], [$TEST_SSH_UTF8])
5057AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS]) 5164AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS])
5058AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms]) 5165AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
5166AC_SUBST([DEPEND], [$(cat $srcdir/.depend)])
5059 5167
5060CFLAGS="${CFLAGS} ${CFLAGS_AFTER}" 5168CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
5061LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}" 5169LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
@@ -5107,7 +5215,6 @@ echo " PAM support: $PAM_MSG"
5107echo " OSF SIA support: $SIA_MSG" 5215echo " OSF SIA support: $SIA_MSG"
5108echo " KerberosV support: $KRB5_MSG" 5216echo " KerberosV support: $KRB5_MSG"
5109echo " SELinux support: $SELINUX_MSG" 5217echo " SELinux support: $SELINUX_MSG"
5110echo " Smartcard support: $SCARD_MSG"
5111echo " S/KEY support: $SKEY_MSG" 5218echo " S/KEY support: $SKEY_MSG"
5112echo " MD5 password support: $MD5_MSG" 5219echo " MD5 password support: $MD5_MSG"
5113echo " libedit support: $LIBEDIT_MSG" 5220echo " libedit support: $LIBEDIT_MSG"