summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
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 483a9038c..eac143b4d 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])
@@ -793,8 +836,36 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
793 AC_DEFINE([SSH_TUN_PREPEND_AF], [1], 836 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
794 [Prepend the address family to IP tunnel traffic]) 837 [Prepend the address family to IP tunnel traffic])
795 fi 838 fi
839 AC_CHECK_HEADER([linux/if.h],
840 AC_DEFINE([SYS_RDOMAIN_LINUX], [1],
841 [Support routing domains using Linux VRF]), [], [
842#ifdef HAVE_SYS_TYPES_H
843# include <sys/types.H>
844#endif
845 ])
796 AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [], 846 AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
797 [], [#include <linux/types.h>]) 847 [], [#include <linux/types.h>])
848 # Obtain MIPS ABI
849 case "$host" in
850 mips*)
851 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
852#if _MIPS_SIM != _ABIO32
853#error
854#endif
855 ]])],[mips_abi="o32"],[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
856#if _MIPS_SIM != _ABIN32
857#error
858#endif
859 ]])],[mips_abi="n32"],[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
860#if _MIPS_SIM != _ABI64
861#error
862#endif
863 ]])],[mips_abi="n64"],[AC_MSG_ERROR([unknown MIPS ABI])
864 ])
865 ])
866 ])
867 ;;
868 esac
798 AC_MSG_CHECKING([for seccomp architecture]) 869 AC_MSG_CHECKING([for seccomp architecture])
799 seccomp_audit_arch= 870 seccomp_audit_arch=
800 case "$host" in 871 case "$host" in
@@ -829,10 +900,24 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
829 seccomp_audit_arch=AUDIT_ARCH_MIPSEL 900 seccomp_audit_arch=AUDIT_ARCH_MIPSEL
830 ;; 901 ;;
831 mips64-*) 902 mips64-*)
832 seccomp_audit_arch=AUDIT_ARCH_MIPS64 903 case "$mips_abi" in
904 "n32")
905 seccomp_audit_arch=AUDIT_ARCH_MIPS64N32
906 ;;
907 "n64")
908 seccomp_audit_arch=AUDIT_ARCH_MIPS64
909 ;;
910 esac
833 ;; 911 ;;
834 mips64el-*) 912 mips64el-*)
835 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64 913 case "$mips_abi" in
914 "n32")
915 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64N32
916 ;;
917 "n64")
918 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
919 ;;
920 esac
836 ;; 921 ;;
837 esac 922 esac
838 if test "x$seccomp_audit_arch" != "x" ; then 923 if test "x$seccomp_audit_arch" != "x" ; then
@@ -983,6 +1068,7 @@ mips-sony-bsd|mips-sony-newsos4)
983 conf_wtmp_location=/var/adm/wtmp 1068 conf_wtmp_location=/var/adm/wtmp
984 conf_lastlog_location=/var/adm/lastlog 1069 conf_lastlog_location=/var/adm/lastlog
985 AC_DEFINE([USE_PIPES]) 1070 AC_DEFINE([USE_PIPES])
1071 AC_DEFINE([DISABLE_UTMPX], [1], [no utmpx])
986 ;; 1072 ;;
987*-ncr-sysv*) 1073*-ncr-sysv*)
988 LIBS="$LIBS -lc89" 1074 LIBS="$LIBS -lc89"
@@ -1031,20 +1117,16 @@ mips-sony-bsd|mips-sony-newsos4)
1031 AC_DEFINE([PASSWD_NEEDS_USERNAME]) 1117 AC_DEFINE([PASSWD_NEEDS_USERNAME])
1032 AC_DEFINE([BROKEN_TCGETATTR_ICANON]) 1118 AC_DEFINE([BROKEN_TCGETATTR_ICANON])
1033 TEST_SHELL=$SHELL # let configure find us a capable shell 1119 TEST_SHELL=$SHELL # let configure find us a capable shell
1120 check_for_libcrypt_later=1
1034 case "$host" in 1121 case "$host" in
1035 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x 1122 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
1036 maildir=/var/spool/mail 1123 maildir=/var/spool/mail
1037 AC_DEFINE([BROKEN_LIBIAF], [1],
1038 [ia_uinfo routines not supported by OS yet])
1039 AC_DEFINE([BROKEN_UPDWTMPX]) 1124 AC_DEFINE([BROKEN_UPDWTMPX])
1040 AC_CHECK_LIB([prot], [getluid], [ LIBS="$LIBS -lprot" 1125 AC_CHECK_LIB([prot], [getluid], [ LIBS="$LIBS -lprot"
1041 AC_CHECK_FUNCS([getluid setluid], , , [-lprot]) 1126 AC_CHECK_FUNCS([getluid setluid], , , [-lprot])
1042 AC_DEFINE([HAVE_SECUREWARE])
1043 AC_DEFINE([DISABLE_SHADOW])
1044 ], , ) 1127 ], , )
1045 ;; 1128 ;;
1046 *) AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"]) 1129 *) AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
1047 check_for_libcrypt_later=1
1048 ;; 1130 ;;
1049 esac 1131 esac
1050 ;; 1132 ;;
@@ -1077,40 +1159,6 @@ mips-sony-bsd|mips-sony-newsos4)
1077 TEST_SHELL=$SHELL # let configure find us a capable shell 1159 TEST_SHELL=$SHELL # let configure find us a capable shell
1078 SKIP_DISABLE_LASTLOG_DEFINE=yes 1160 SKIP_DISABLE_LASTLOG_DEFINE=yes
1079 ;; 1161 ;;
1080*-*-unicosmk*)
1081 AC_DEFINE([NO_SSH_LASTLOG], [1],
1082 [Define if you don't want to use lastlog in session.c])
1083 AC_DEFINE([SETEUID_BREAKS_SETUID])
1084 AC_DEFINE([BROKEN_SETREUID])
1085 AC_DEFINE([BROKEN_SETREGID])
1086 AC_DEFINE([USE_PIPES])
1087 AC_DEFINE([DISABLE_FD_PASSING])
1088 LDFLAGS="$LDFLAGS"
1089 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
1090 MANTYPE=cat
1091 ;;
1092*-*-unicosmp*)
1093 AC_DEFINE([SETEUID_BREAKS_SETUID])
1094 AC_DEFINE([BROKEN_SETREUID])
1095 AC_DEFINE([BROKEN_SETREGID])
1096 AC_DEFINE([WITH_ABBREV_NO_TTY])
1097 AC_DEFINE([USE_PIPES])
1098 AC_DEFINE([DISABLE_FD_PASSING])
1099 LDFLAGS="$LDFLAGS"
1100 LIBS="$LIBS -lgen -lacid -ldb"
1101 MANTYPE=cat
1102 ;;
1103*-*-unicos*)
1104 AC_DEFINE([SETEUID_BREAKS_SETUID])
1105 AC_DEFINE([BROKEN_SETREUID])
1106 AC_DEFINE([BROKEN_SETREGID])
1107 AC_DEFINE([USE_PIPES])
1108 AC_DEFINE([DISABLE_FD_PASSING])
1109 AC_DEFINE([NO_SSH_LASTLOG])
1110 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
1111 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
1112 MANTYPE=cat
1113 ;;
1114*-dec-osf*) 1162*-dec-osf*)
1115 AC_MSG_CHECKING([for Digital Unix SIA]) 1163 AC_MSG_CHECKING([for Digital Unix SIA])
1116 no_osfsia="" 1164 no_osfsia=""
@@ -1361,8 +1409,23 @@ AC_FUNC_STRFTIME
1361AC_FUNC_MALLOC 1409AC_FUNC_MALLOC
1362AC_FUNC_REALLOC 1410AC_FUNC_REALLOC
1363# autoconf doesn't have AC_FUNC_CALLOC so fake it if malloc returns NULL; 1411# autoconf doesn't have AC_FUNC_CALLOC so fake it if malloc returns NULL;
1364if test "x$ac_cv_func_malloc_0_nonnull" != "xyes"; then 1412AC_MSG_CHECKING([if calloc(0, N) returns non-null])
1365 AC_DEFINE(HAVE_CALLOC, 0, [calloc(x, 0) returns NULL]) 1413AC_RUN_IFELSE(
1414 [AC_LANG_PROGRAM(
1415 [[ #include <stdlib.h> ]],
1416 [[ void *p = calloc(0, 1); exit(p == NULL); ]]
1417 )],
1418 [ func_calloc_0_nonnull=yes ],
1419 [ func_calloc_0_nonnull=no ],
1420 [ AC_MSG_WARN([cross compiling: assuming same as malloc])
1421 func_calloc_0_nonnull="$ac_cv_func_malloc_0_nonnull"]
1422)
1423AC_MSG_RESULT([$func_calloc_0_nonnull])
1424
1425if test "x$func_calloc_0_nonnull" == "xyes"; then
1426 AC_DEFINE(HAVE_CALLOC, 1, [calloc(0, x) returns non-null])
1427else
1428 AC_DEFINE(HAVE_CALLOC, 0, [calloc(0, x) returns NULL])
1366 AC_DEFINE(calloc, rpl_calloc, 1429 AC_DEFINE(calloc, rpl_calloc,
1367 [Define to rpl_calloc if the replacement function should be used.]) 1430 [Define to rpl_calloc if the replacement function should be used.])
1368fi 1431fi
@@ -1567,7 +1630,7 @@ AC_ARG_WITH(ldns,
1567 ldns="" 1630 ldns=""
1568 if test "x$withval" = "xyes" ; then 1631 if test "x$withval" = "xyes" ; then
1569 AC_PATH_TOOL([LDNSCONFIG], [ldns-config], [no]) 1632 AC_PATH_TOOL([LDNSCONFIG], [ldns-config], [no])
1570 if test "x$PKGCONFIG" = "xno"; then 1633 if test "x$LDNSCONFIG" = "xno"; then
1571 CPPFLAGS="$CPPFLAGS -I${withval}/include" 1634 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1572 LDFLAGS="$LDFLAGS -L${withval}/lib" 1635 LDFLAGS="$LDFLAGS -L${withval}/lib"
1573 LIBS="-lldns $LIBS" 1636 LIBS="-lldns $LIBS"
@@ -1775,6 +1838,7 @@ AC_CHECK_FUNCS([ \
1775 bcrypt_pbkdf \ 1838 bcrypt_pbkdf \
1776 bindresvport_sa \ 1839 bindresvport_sa \
1777 blf_enc \ 1840 blf_enc \
1841 bzero \
1778 cap_rights_limit \ 1842 cap_rights_limit \
1779 clock \ 1843 clock \
1780 closefrom \ 1844 closefrom \
@@ -1785,6 +1849,7 @@ AC_CHECK_FUNCS([ \
1785 explicit_bzero \ 1849 explicit_bzero \
1786 fchmod \ 1850 fchmod \
1787 fchown \ 1851 fchown \
1852 flock \
1788 freeaddrinfo \ 1853 freeaddrinfo \
1789 freezero \ 1854 freezero \
1790 fstatfs \ 1855 fstatfs \
@@ -1799,9 +1864,9 @@ AC_CHECK_FUNCS([ \
1799 getpeereid \ 1864 getpeereid \
1800 getpeerucred \ 1865 getpeerucred \
1801 getpgid \ 1866 getpgid \
1802 getpgrp \
1803 _getpty \ 1867 _getpty \
1804 getrlimit \ 1868 getrlimit \
1869 getsid \
1805 getttyent \ 1870 getttyent \
1806 glob \ 1871 glob \
1807 group_from_gid \ 1872 group_from_gid \
@@ -1823,6 +1888,7 @@ AC_CHECK_FUNCS([ \
1823 poll \ 1888 poll \
1824 prctl \ 1889 prctl \
1825 pstat \ 1890 pstat \
1891 raise \
1826 readpassphrase \ 1892 readpassphrase \
1827 reallocarray \ 1893 reallocarray \
1828 recvmsg \ 1894 recvmsg \
@@ -1857,6 +1923,7 @@ AC_CHECK_FUNCS([ \
1857 strlcat \ 1923 strlcat \
1858 strlcpy \ 1924 strlcpy \
1859 strmode \ 1925 strmode \
1926 strndup \
1860 strnlen \ 1927 strnlen \
1861 strnvis \ 1928 strnvis \
1862 strptime \ 1929 strptime \
@@ -1880,6 +1947,8 @@ AC_CHECK_FUNCS([ \
1880 warn \ 1947 warn \
1881]) 1948])
1882 1949
1950AC_CHECK_DECLS([bzero])
1951
1883dnl Wide character support. 1952dnl Wide character support.
1884AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth]) 1953AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
1885 1954
@@ -1922,7 +1991,10 @@ AC_ARG_ENABLE([pkcs11],
1922if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then 1991if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then
1923 # PKCS#11 support requires dlopen() and co 1992 # PKCS#11 support requires dlopen() and co
1924 AC_SEARCH_LIBS([dlopen], [dl], 1993 AC_SEARCH_LIBS([dlopen], [dl],
1925 [AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support])] 1994 AC_CHECK_DECL([RTLD_NOW],
1995 AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support]),
1996 [], [#include <dlfcn.h>]
1997 )
1926 ) 1998 )
1927fi 1999fi
1928 2000
@@ -1949,7 +2021,6 @@ AC_SEARCH_LIBS([clock_gettime], [rt],
1949 [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime])]) 2021 [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime])])
1950 2022
1951dnl Make sure prototypes are defined for these before using them. 2023dnl Make sure prototypes are defined for these before using them.
1952AC_CHECK_DECL([getrusage], [AC_CHECK_FUNCS([getrusage])])
1953AC_CHECK_DECL([strsep], 2024AC_CHECK_DECL([strsep],
1954 [AC_CHECK_FUNCS([strsep])], 2025 [AC_CHECK_FUNCS([strsep])],
1955 [], 2026 [],
@@ -1985,7 +2056,7 @@ AC_CHECK_DECLS([O_NONBLOCK], , ,
1985#endif 2056#endif
1986 ]) 2057 ])
1987 2058
1988AC_CHECK_DECLS([writev], , , [ 2059AC_CHECK_DECLS([readv, writev], , , [
1989#include <sys/types.h> 2060#include <sys/types.h>
1990#include <sys/uio.h> 2061#include <sys/uio.h>
1991#include <unistd.h> 2062#include <unistd.h>
@@ -2102,6 +2173,16 @@ AC_CHECK_FUNCS([realpath], [
2102 ) 2173 )
2103]) 2174])
2104 2175
2176AC_MSG_CHECKING([for working fflush(NULL)])
2177AC_RUN_IFELSE(
2178 [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])],
2179 AC_MSG_RESULT([yes]),
2180 [AC_MSG_RESULT([no])
2181 AC_DEFINE([FFLUSH_NULL_BUG], [1],
2182 [define if fflush(NULL) does not work])],
2183 AC_MSG_WARN([cross compiling: assuming working])
2184)
2185
2105dnl Checks for time functions 2186dnl Checks for time functions
2106AC_CHECK_FUNCS([gettimeofday time]) 2187AC_CHECK_FUNCS([gettimeofday time])
2107dnl Checks for utmp functions 2188dnl Checks for utmp functions
@@ -2473,7 +2554,16 @@ static void sighandler(int sig) { _exit(1); }
2473 ) 2554 )
2474fi 2555fi
2475 2556
2476AC_FUNC_GETPGRP 2557AC_CHECK_FUNCS([getpgrp],[
2558 AC_MSG_CHECKING([if getpgrp accepts zero args])
2559 AC_COMPILE_IFELSE(
2560 [AC_LANG_PROGRAM([[$ac_includes_default]], [[ getpgrp(); ]])],
2561 [ AC_MSG_RESULT([yes])
2562 AC_DEFINE([GETPGRP_VOID], [1], [getpgrp takes zero args])],
2563 [ AC_MSG_RESULT([no])
2564 AC_DEFINE([GETPGRP_VOID], [0], [getpgrp takes one arg])]
2565 )
2566])
2477 2567
2478# Search for OpenSSL 2568# Search for OpenSSL
2479saved_CPPFLAGS="$CPPFLAGS" 2569saved_CPPFLAGS="$CPPFLAGS"
@@ -3721,6 +3811,23 @@ AC_CHECK_TYPES([fsblkcnt_t, fsfilcnt_t], , , [
3721#endif 3811#endif
3722]) 3812])
3723 3813
3814AC_CHECK_MEMBERS([struct statfs.f_flags], [], [], [[
3815#include <sys/types.h>
3816#ifdef HAVE_SYS_BITYPES_H
3817#include <sys/bitypes.h>
3818#endif
3819#ifdef HAVE_SYS_STATFS_H
3820#include <sys/statfs.h>
3821#endif
3822#ifdef HAVE_SYS_STATVFS_H
3823#include <sys/statvfs.h>
3824#endif
3825#ifdef HAVE_SYS_VFS_H
3826#include <sys/vfs.h>
3827#endif
3828]])
3829
3830
3724AC_CHECK_TYPES([in_addr_t, in_port_t], , , 3831AC_CHECK_TYPES([in_addr_t, in_port_t], , ,
3725[#include <sys/types.h> 3832[#include <sys/types.h>
3726#include <netinet/in.h>]) 3833#include <netinet/in.h>])
@@ -4858,7 +4965,7 @@ if test ! -d $piddir ; then
4858fi 4965fi
4859 4966
4860AC_ARG_WITH([pid-dir], 4967AC_ARG_WITH([pid-dir],
4861 [ --with-pid-dir=PATH Specify location of ssh.pid file], 4968 [ --with-pid-dir=PATH Specify location of sshd.pid file],
4862 [ 4969 [
4863 if test -n "$withval" && test "x$withval" != "xno" && \ 4970 if test -n "$withval" && test "x$withval" != "xno" && \
4864 test "x${withval}" != "xyes"; then 4971 test "x${withval}" != "xyes"; then
@@ -5159,6 +5266,7 @@ AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6])
5159AC_SUBST([TEST_SSH_UTF8], [$TEST_SSH_UTF8]) 5266AC_SUBST([TEST_SSH_UTF8], [$TEST_SSH_UTF8])
5160AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS]) 5267AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS])
5161AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms]) 5268AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
5269AC_SUBST([DEPEND], [$(cat $srcdir/.depend)])
5162 5270
5163CFLAGS="${CFLAGS} ${CFLAGS_AFTER}" 5271CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
5164LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}" 5272LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
@@ -5210,7 +5318,6 @@ echo " PAM support: $PAM_MSG"
5210echo " OSF SIA support: $SIA_MSG" 5318echo " OSF SIA support: $SIA_MSG"
5211echo " KerberosV support: $KRB5_MSG" 5319echo " KerberosV support: $KRB5_MSG"
5212echo " SELinux support: $SELINUX_MSG" 5320echo " SELinux support: $SELINUX_MSG"
5213echo " Smartcard support: $SCARD_MSG"
5214echo " S/KEY support: $SKEY_MSG" 5321echo " S/KEY support: $SKEY_MSG"
5215echo " TCP Wrappers support: $TCPW_MSG" 5322echo " TCP Wrappers support: $TCPW_MSG"
5216echo " MD5 password support: $MD5_MSG" 5323echo " MD5 password support: $MD5_MSG"