summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-29 21:40:29 +0000
committerColin Watson <cjwatson@debian.org>2009-12-29 21:40:29 +0000
commita25ec0b132c44c9e341e08464ff830de06b81126 (patch)
treee20842d80f9e25cb6cf09525abea63f7bf655dd7 /configure.ac
parent1b816ea846aca3ee89e7995373ace609e9518424 (diff)
parent70847d299887abb96f8703ca99db6d817b78960e (diff)
import openssh-4.7p1-gsskex-20070927.patch
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac95
1 files changed, 72 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 18c7ca896..a9eb8e76d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.372 2007/03/05 00:51:27 djm Exp $ 1# $Id: configure.ac,v 1.383 2007/08/10 04:36:12 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.372 $) 18AC_REVISION($Revision: 1.383 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -94,9 +94,12 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
94 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized" 94 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized"
95 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'` 95 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
96 case $GCC_VER in 96 case $GCC_VER in
97 1.*) ;; 97 1.*) no_attrib_nonnull=1 ;;
98 2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;; 98 2.8* | 2.9*)
99 2.*) ;; 99 CFLAGS="$CFLAGS -Wsign-compare"
100 no_attrib_nonnull=1
101 ;;
102 2.*) no_attrib_nonnull=1 ;;
100 3.*) CFLAGS="$CFLAGS -Wsign-compare" ;; 103 3.*) CFLAGS="$CFLAGS -Wsign-compare" ;;
101 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign" ;; 104 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign" ;;
102 *) ;; 105 *) ;;
@@ -115,6 +118,10 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
115 fi 118 fi
116fi 119fi
117 120
121if test "x$no_attrib_nonnull" != "x1" ; then
122 AC_DEFINE(HAVE_ATTRIBUTE__NONNULL__, 1, [Have attribute nonnull])
123fi
124
118AC_ARG_WITH(rpath, 125AC_ARG_WITH(rpath,
119 [ --without-rpath Disable auto-added -R linker paths], 126 [ --without-rpath Disable auto-added -R linker paths],
120 [ 127 [
@@ -198,6 +205,7 @@ AC_CHECK_HEADERS( \
198 netgroup.h \ 205 netgroup.h \
199 pam/pam_appl.h \ 206 pam/pam_appl.h \
200 paths.h \ 207 paths.h \
208 poll.h \
201 pty.h \ 209 pty.h \
202 readpassphrase.h \ 210 readpassphrase.h \
203 rpc/types.h \ 211 rpc/types.h \
@@ -229,6 +237,7 @@ AC_CHECK_HEADERS( \
229 time.h \ 237 time.h \
230 tmpdir.h \ 238 tmpdir.h \
231 ttyent.h \ 239 ttyent.h \
240 ucred.h \
232 unistd.h \ 241 unistd.h \
233 usersec.h \ 242 usersec.h \
234 util.h \ 243 util.h \
@@ -801,6 +810,11 @@ mips-sony-bsd|mips-sony-newsos4)
801 AC_DEFINE(DISABLE_LASTLOG) 810 AC_DEFINE(DISABLE_LASTLOG)
802 AC_DEFINE(SSHD_ACQUIRES_CTTY) 811 AC_DEFINE(SSHD_ACQUIRES_CTTY)
803 enable_etc_default_login=no # has incompatible /etc/default/login 812 enable_etc_default_login=no # has incompatible /etc/default/login
813 case "$host" in
814 *-*-nto-qnx6*)
815 AC_DEFINE(DISABLE_FD_PASSING)
816 ;;
817 esac
804 ;; 818 ;;
805 819
806*-*-ultrix*) 820*-*-ultrix*)
@@ -1133,8 +1147,7 @@ AC_ARG_WITH(tcp-wrappers,
1133 CPPFLAGS="-I${withval} ${CPPFLAGS}" 1147 CPPFLAGS="-I${withval} ${CPPFLAGS}"
1134 fi 1148 fi
1135 fi 1149 fi
1136 LIBWRAP="-lwrap" 1150 LIBS="-lwrap $LIBS"
1137 LIBS="$LIBWRAP $LIBS"
1138 AC_MSG_CHECKING(for libwrap) 1151 AC_MSG_CHECKING(for libwrap)
1139 AC_TRY_LINK( 1152 AC_TRY_LINK(
1140 [ 1153 [
@@ -1150,7 +1163,7 @@ AC_ARG_WITH(tcp-wrappers,
1150 AC_DEFINE(LIBWRAP, 1, 1163 AC_DEFINE(LIBWRAP, 1,
1151 [Define if you want 1164 [Define if you want
1152 TCP Wrappers support]) 1165 TCP Wrappers support])
1153 AC_SUBST(LIBWRAP) 1166 SSHDLIBS="$SSHDLIBS -lwrap"
1154 TCPW_MSG="yes" 1167 TCPW_MSG="yes"
1155 ], 1168 ],
1156 [ 1169 [
@@ -1265,6 +1278,7 @@ AC_CHECK_FUNCS( \
1265 getnameinfo \ 1278 getnameinfo \
1266 getopt \ 1279 getopt \
1267 getpeereid \ 1280 getpeereid \
1281 getpeerucred \
1268 _getpty \ 1282 _getpty \
1269 getrlimit \ 1283 getrlimit \
1270 getttyent \ 1284 getttyent \
@@ -1283,6 +1297,7 @@ AC_CHECK_FUNCS( \
1283 ogetaddrinfo \ 1297 ogetaddrinfo \
1284 openlog_r \ 1298 openlog_r \
1285 openpty \ 1299 openpty \
1300 poll \
1286 prctl \ 1301 prctl \
1287 pstat \ 1302 pstat \
1288 readpassphrase \ 1303 readpassphrase \
@@ -1316,6 +1331,7 @@ AC_CHECK_FUNCS( \
1316 strtonum \ 1331 strtonum \
1317 strtoll \ 1332 strtoll \
1318 strtoul \ 1333 strtoul \
1334 swap32 \
1319 sysconf \ 1335 sysconf \
1320 tcgetpgrp \ 1336 tcgetpgrp \
1321 truncate \ 1337 truncate \
@@ -1388,6 +1404,14 @@ AC_CHECK_DECLS(writev, , , [
1388#include <unistd.h> 1404#include <unistd.h>
1389 ]) 1405 ])
1390 1406
1407AC_CHECK_DECLS(MAXSYMLINKS, , , [
1408#include <sys/param.h>
1409 ])
1410
1411AC_CHECK_DECLS(offsetof, , , [
1412#include <stddef.h>
1413 ])
1414
1391AC_CHECK_FUNCS(setresuid, [ 1415AC_CHECK_FUNCS(setresuid, [
1392 dnl Some platorms have setresuid that isn't implemented, test for this 1416 dnl Some platorms have setresuid that isn't implemented, test for this
1393 AC_MSG_CHECKING(if setresuid seems to work) 1417 AC_MSG_CHECKING(if setresuid seems to work)
@@ -1513,7 +1537,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
1513 1537
1514# Check for missing getpeereid (or equiv) support 1538# Check for missing getpeereid (or equiv) support
1515NO_PEERCHECK="" 1539NO_PEERCHECK=""
1516if test "x$ac_cv_func_getpeereid" != "xyes" ; then 1540if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
1517 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt]) 1541 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt])
1518 AC_TRY_COMPILE( 1542 AC_TRY_COMPILE(
1519 [#include <sys/types.h> 1543 [#include <sys/types.h>
@@ -2001,7 +2025,12 @@ fi
2001# Search for SHA256 support in libc and/or OpenSSL 2025# Search for SHA256 support in libc and/or OpenSSL
2002AC_CHECK_FUNCS(SHA256_Update EVP_sha256) 2026AC_CHECK_FUNCS(SHA256_Update EVP_sha256)
2003 2027
2004AC_CHECK_LIB(iaf, ia_openinfo) 2028saved_LIBS="$LIBS"
2029AC_CHECK_LIB(iaf, ia_openinfo, [
2030 LIBS="$LIBS -liaf"
2031 AC_CHECK_FUNCS(set_id, [SSHDLIBS="$SSHDLIBS -liaf"])
2032])
2033LIBS="$saved_LIBS"
2005 2034
2006### Configure cryptographic random number support 2035### Configure cryptographic random number support
2007 2036
@@ -2051,7 +2080,7 @@ AC_ARG_WITH(pam,
2051 2080
2052 PAM_MSG="yes" 2081 PAM_MSG="yes"
2053 2082
2054 LIBPAM="-lpam" 2083 SSHDLIBS="$SSHDLIBS -lpam"
2055 AC_DEFINE(USE_PAM, 1, 2084 AC_DEFINE(USE_PAM, 1,
2056 [Define if you want to enable PAM support]) 2085 [Define if you want to enable PAM support])
2057 2086
@@ -2061,11 +2090,10 @@ AC_ARG_WITH(pam,
2061 # libdl already in LIBS 2090 # libdl already in LIBS
2062 ;; 2091 ;;
2063 *) 2092 *)
2064 LIBPAM="$LIBPAM -ldl" 2093 SSHDLIBS="$SSHDLIBS -ldl"
2065 ;; 2094 ;;
2066 esac 2095 esac
2067 fi 2096 fi
2068 AC_SUBST(LIBPAM)
2069 fi 2097 fi
2070 ] 2098 ]
2071) 2099)
@@ -3174,25 +3202,43 @@ int main()
3174 [#include <arpa/nameser.h>]) 3202 [#include <arpa/nameser.h>])
3175 ]) 3203 ])
3176 3204
3205AC_MSG_CHECKING(if struct __res_state _res is an extern)
3206AC_LINK_IFELSE([
3207#include <stdio.h>
3208#if HAVE_SYS_TYPES_H
3209# include <sys/types.h>
3210#endif
3211#include <netinet/in.h>
3212#include <arpa/nameser.h>
3213#include <resolv.h>
3214extern struct __res_state _res;
3215int main() { return 0; }
3216 ],
3217 [AC_MSG_RESULT(yes)
3218 AC_DEFINE(HAVE__RES_EXTERN, 1,
3219 [Define if you have struct __res_state _res as an extern])
3220 ],
3221 [ AC_MSG_RESULT(no) ]
3222)
3223
3177# Check whether user wants SELinux support 3224# Check whether user wants SELinux support
3178SELINUX_MSG="no" 3225SELINUX_MSG="no"
3179LIBSELINUX="" 3226LIBSELINUX=""
3180AC_ARG_WITH(selinux, 3227AC_ARG_WITH(selinux,
3181 [ --with-selinux Enable SELinux support], 3228 [ --with-selinux Enable SELinux support],
3182 [ if test "x$withval" != "xno" ; then 3229 [ if test "x$withval" != "xno" ; then
3230 save_LIBS="$LIBS"
3183 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.]) 3231 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
3184 SELINUX_MSG="yes" 3232 SELINUX_MSG="yes"
3185 AC_CHECK_HEADER([selinux/selinux.h], , 3233 AC_CHECK_HEADER([selinux/selinux.h], ,
3186 AC_MSG_ERROR(SELinux support requires selinux.h header)) 3234 AC_MSG_ERROR(SELinux support requires selinux.h header))
3187 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ], 3235 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ],
3188 AC_MSG_ERROR(SELinux support requires libselinux library)) 3236 AC_MSG_ERROR(SELinux support requires libselinux library))
3189 save_LIBS="$LIBS" 3237 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
3190 LIBS="$LIBS $LIBSELINUX"
3191 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level) 3238 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
3192 LIBS="$save_LIBS" 3239 LIBS="$save_LIBS"
3193 fi ] 3240 fi ]
3194) 3241)
3195AC_SUBST(LIBSELINUX)
3196 3242
3197# Check whether user wants Kerberos 5 support 3243# Check whether user wants Kerberos 5 support
3198KRB5_MSG="no" 3244KRB5_MSG="no"
@@ -4028,7 +4074,10 @@ echo " Compiler: ${CC}"
4028echo " Compiler flags: ${CFLAGS}" 4074echo " Compiler flags: ${CFLAGS}"
4029echo "Preprocessor flags: ${CPPFLAGS}" 4075echo "Preprocessor flags: ${CPPFLAGS}"
4030echo " Linker flags: ${LDFLAGS}" 4076echo " Linker flags: ${LDFLAGS}"
4031echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}" 4077echo " Libraries: ${LIBS}"
4078if test ! -z "${SSHDLIBS}"; then
4079echo " +for sshd: ${SSHDLIBS}"
4080fi
4032 4081
4033echo "" 4082echo ""
4034 4083
@@ -4054,12 +4103,12 @@ if test ! -z "$RAND_HELPER_CMDHASH" ; then
4054fi 4103fi
4055 4104
4056if test ! -z "$NO_PEERCHECK" ; then 4105if test ! -z "$NO_PEERCHECK" ; then
4057 echo "WARNING: the operating system that you are using does not " 4106 echo "WARNING: the operating system that you are using does not"
4058 echo "appear to support either the getpeereid() API nor the " 4107 echo "appear to support getpeereid(), getpeerucred() or the"
4059 echo "SO_PEERCRED getsockopt() option. These facilities are used to " 4108 echo "SO_PEERCRED getsockopt() option. These facilities are used to"
4060 echo "enforce security checks to prevent unauthorised connections to " 4109 echo "enforce security checks to prevent unauthorised connections to"
4061 echo "ssh-agent. Their absence increases the risk that a malicious " 4110 echo "ssh-agent. Their absence increases the risk that a malicious"
4062 echo "user can connect to your agent. " 4111 echo "user can connect to your agent."
4063 echo "" 4112 echo ""
4064fi 4113fi
4065 4114