summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
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 05ccc2f7e..64ef3c67b 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 \
@@ -809,6 +818,11 @@ mips-sony-bsd|mips-sony-newsos4)
809 AC_DEFINE(DISABLE_LASTLOG) 818 AC_DEFINE(DISABLE_LASTLOG)
810 AC_DEFINE(SSHD_ACQUIRES_CTTY) 819 AC_DEFINE(SSHD_ACQUIRES_CTTY)
811 enable_etc_default_login=no # has incompatible /etc/default/login 820 enable_etc_default_login=no # has incompatible /etc/default/login
821 case "$host" in
822 *-*-nto-qnx6*)
823 AC_DEFINE(DISABLE_FD_PASSING)
824 ;;
825 esac
812 ;; 826 ;;
813 827
814*-*-ultrix*) 828*-*-ultrix*)
@@ -1141,8 +1155,7 @@ AC_ARG_WITH(tcp-wrappers,
1141 CPPFLAGS="-I${withval} ${CPPFLAGS}" 1155 CPPFLAGS="-I${withval} ${CPPFLAGS}"
1142 fi 1156 fi
1143 fi 1157 fi
1144 LIBWRAP="-lwrap" 1158 LIBS="-lwrap $LIBS"
1145 LIBS="$LIBWRAP $LIBS"
1146 AC_MSG_CHECKING(for libwrap) 1159 AC_MSG_CHECKING(for libwrap)
1147 AC_TRY_LINK( 1160 AC_TRY_LINK(
1148 [ 1161 [
@@ -1158,7 +1171,7 @@ AC_ARG_WITH(tcp-wrappers,
1158 AC_DEFINE(LIBWRAP, 1, 1171 AC_DEFINE(LIBWRAP, 1,
1159 [Define if you want 1172 [Define if you want
1160 TCP Wrappers support]) 1173 TCP Wrappers support])
1161 AC_SUBST(LIBWRAP) 1174 SSHDLIBS="$SSHDLIBS -lwrap"
1162 TCPW_MSG="yes" 1175 TCPW_MSG="yes"
1163 ], 1176 ],
1164 [ 1177 [
@@ -1273,6 +1286,7 @@ AC_CHECK_FUNCS( \
1273 getnameinfo \ 1286 getnameinfo \
1274 getopt \ 1287 getopt \
1275 getpeereid \ 1288 getpeereid \
1289 getpeerucred \
1276 _getpty \ 1290 _getpty \
1277 getrlimit \ 1291 getrlimit \
1278 getttyent \ 1292 getttyent \
@@ -1291,6 +1305,7 @@ AC_CHECK_FUNCS( \
1291 ogetaddrinfo \ 1305 ogetaddrinfo \
1292 openlog_r \ 1306 openlog_r \
1293 openpty \ 1307 openpty \
1308 poll \
1294 prctl \ 1309 prctl \
1295 pstat \ 1310 pstat \
1296 readpassphrase \ 1311 readpassphrase \
@@ -1324,6 +1339,7 @@ AC_CHECK_FUNCS( \
1324 strtonum \ 1339 strtonum \
1325 strtoll \ 1340 strtoll \
1326 strtoul \ 1341 strtoul \
1342 swap32 \
1327 sysconf \ 1343 sysconf \
1328 tcgetpgrp \ 1344 tcgetpgrp \
1329 truncate \ 1345 truncate \
@@ -1396,6 +1412,14 @@ AC_CHECK_DECLS(writev, , , [
1396#include <unistd.h> 1412#include <unistd.h>
1397 ]) 1413 ])
1398 1414
1415AC_CHECK_DECLS(MAXSYMLINKS, , , [
1416#include <sys/param.h>
1417 ])
1418
1419AC_CHECK_DECLS(offsetof, , , [
1420#include <stddef.h>
1421 ])
1422
1399AC_CHECK_FUNCS(setresuid, [ 1423AC_CHECK_FUNCS(setresuid, [
1400 dnl Some platorms have setresuid that isn't implemented, test for this 1424 dnl Some platorms have setresuid that isn't implemented, test for this
1401 AC_MSG_CHECKING(if setresuid seems to work) 1425 AC_MSG_CHECKING(if setresuid seems to work)
@@ -1521,7 +1545,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
1521 1545
1522# Check for missing getpeereid (or equiv) support 1546# Check for missing getpeereid (or equiv) support
1523NO_PEERCHECK="" 1547NO_PEERCHECK=""
1524if test "x$ac_cv_func_getpeereid" != "xyes" ; then 1548if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
1525 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt]) 1549 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt])
1526 AC_TRY_COMPILE( 1550 AC_TRY_COMPILE(
1527 [#include <sys/types.h> 1551 [#include <sys/types.h>
@@ -2009,7 +2033,12 @@ fi
2009# Search for SHA256 support in libc and/or OpenSSL 2033# Search for SHA256 support in libc and/or OpenSSL
2010AC_CHECK_FUNCS(SHA256_Update EVP_sha256) 2034AC_CHECK_FUNCS(SHA256_Update EVP_sha256)
2011 2035
2012AC_CHECK_LIB(iaf, ia_openinfo) 2036saved_LIBS="$LIBS"
2037AC_CHECK_LIB(iaf, ia_openinfo, [
2038 LIBS="$LIBS -liaf"
2039 AC_CHECK_FUNCS(set_id, [SSHDLIBS="$SSHDLIBS -liaf"])
2040])
2041LIBS="$saved_LIBS"
2013 2042
2014### Configure cryptographic random number support 2043### Configure cryptographic random number support
2015 2044
@@ -2059,7 +2088,7 @@ AC_ARG_WITH(pam,
2059 2088
2060 PAM_MSG="yes" 2089 PAM_MSG="yes"
2061 2090
2062 LIBPAM="-lpam" 2091 SSHDLIBS="$SSHDLIBS -lpam"
2063 AC_DEFINE(USE_PAM, 1, 2092 AC_DEFINE(USE_PAM, 1,
2064 [Define if you want to enable PAM support]) 2093 [Define if you want to enable PAM support])
2065 2094
@@ -2069,11 +2098,10 @@ AC_ARG_WITH(pam,
2069 # libdl already in LIBS 2098 # libdl already in LIBS
2070 ;; 2099 ;;
2071 *) 2100 *)
2072 LIBPAM="$LIBPAM -ldl" 2101 SSHDLIBS="$SSHDLIBS -ldl"
2073 ;; 2102 ;;
2074 esac 2103 esac
2075 fi 2104 fi
2076 AC_SUBST(LIBPAM)
2077 fi 2105 fi
2078 ] 2106 ]
2079) 2107)
@@ -3182,25 +3210,43 @@ int main()
3182 [#include <arpa/nameser.h>]) 3210 [#include <arpa/nameser.h>])
3183 ]) 3211 ])
3184 3212
3213AC_MSG_CHECKING(if struct __res_state _res is an extern)
3214AC_LINK_IFELSE([
3215#include <stdio.h>
3216#if HAVE_SYS_TYPES_H
3217# include <sys/types.h>
3218#endif
3219#include <netinet/in.h>
3220#include <arpa/nameser.h>
3221#include <resolv.h>
3222extern struct __res_state _res;
3223int main() { return 0; }
3224 ],
3225 [AC_MSG_RESULT(yes)
3226 AC_DEFINE(HAVE__RES_EXTERN, 1,
3227 [Define if you have struct __res_state _res as an extern])
3228 ],
3229 [ AC_MSG_RESULT(no) ]
3230)
3231
3185# Check whether user wants SELinux support 3232# Check whether user wants SELinux support
3186SELINUX_MSG="no" 3233SELINUX_MSG="no"
3187LIBSELINUX="" 3234LIBSELINUX=""
3188AC_ARG_WITH(selinux, 3235AC_ARG_WITH(selinux,
3189 [ --with-selinux Enable SELinux support], 3236 [ --with-selinux Enable SELinux support],
3190 [ if test "x$withval" != "xno" ; then 3237 [ if test "x$withval" != "xno" ; then
3238 save_LIBS="$LIBS"
3191 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.]) 3239 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
3192 SELINUX_MSG="yes" 3240 SELINUX_MSG="yes"
3193 AC_CHECK_HEADER([selinux/selinux.h], , 3241 AC_CHECK_HEADER([selinux/selinux.h], ,
3194 AC_MSG_ERROR(SELinux support requires selinux.h header)) 3242 AC_MSG_ERROR(SELinux support requires selinux.h header))
3195 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ], 3243 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ],
3196 AC_MSG_ERROR(SELinux support requires libselinux library)) 3244 AC_MSG_ERROR(SELinux support requires libselinux library))
3197 save_LIBS="$LIBS" 3245 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
3198 LIBS="$LIBS $LIBSELINUX"
3199 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level) 3246 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
3200 LIBS="$save_LIBS" 3247 LIBS="$save_LIBS"
3201 fi ] 3248 fi ]
3202) 3249)
3203AC_SUBST(LIBSELINUX)
3204 3250
3205# Check whether user wants Kerberos 5 support 3251# Check whether user wants Kerberos 5 support
3206KRB5_MSG="no" 3252KRB5_MSG="no"
@@ -4036,7 +4082,10 @@ echo " Compiler: ${CC}"
4036echo " Compiler flags: ${CFLAGS}" 4082echo " Compiler flags: ${CFLAGS}"
4037echo "Preprocessor flags: ${CPPFLAGS}" 4083echo "Preprocessor flags: ${CPPFLAGS}"
4038echo " Linker flags: ${LDFLAGS}" 4084echo " Linker flags: ${LDFLAGS}"
4039echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}" 4085echo " Libraries: ${LIBS}"
4086if test ! -z "${SSHDLIBS}"; then
4087echo " +for sshd: ${SSHDLIBS}"
4088fi
4040 4089
4041echo "" 4090echo ""
4042 4091
@@ -4062,12 +4111,12 @@ if test ! -z "$RAND_HELPER_CMDHASH" ; then
4062fi 4111fi
4063 4112
4064if test ! -z "$NO_PEERCHECK" ; then 4113if test ! -z "$NO_PEERCHECK" ; then
4065 echo "WARNING: the operating system that you are using does not " 4114 echo "WARNING: the operating system that you are using does not"
4066 echo "appear to support either the getpeereid() API nor the " 4115 echo "appear to support getpeereid(), getpeerucred() or the"
4067 echo "SO_PEERCRED getsockopt() option. These facilities are used to " 4116 echo "SO_PEERCRED getsockopt() option. These facilities are used to"
4068 echo "enforce security checks to prevent unauthorised connections to " 4117 echo "enforce security checks to prevent unauthorised connections to"
4069 echo "ssh-agent. Their absence increases the risk that a malicious " 4118 echo "ssh-agent. Their absence increases the risk that a malicious"
4070 echo "user can connect to your agent. " 4119 echo "user can connect to your agent."
4071 echo "" 4120 echo ""
4072fi 4121fi
4073 4122