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 a2b236355..f1052b079 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 \
@@ -777,6 +786,11 @@ mips-sony-bsd|mips-sony-newsos4)
777 AC_DEFINE(DISABLE_LASTLOG) 786 AC_DEFINE(DISABLE_LASTLOG)
778 AC_DEFINE(SSHD_ACQUIRES_CTTY) 787 AC_DEFINE(SSHD_ACQUIRES_CTTY)
779 enable_etc_default_login=no # has incompatible /etc/default/login 788 enable_etc_default_login=no # has incompatible /etc/default/login
789 case "$host" in
790 *-*-nto-qnx6*)
791 AC_DEFINE(DISABLE_FD_PASSING)
792 ;;
793 esac
780 ;; 794 ;;
781 795
782*-*-ultrix*) 796*-*-ultrix*)
@@ -1109,8 +1123,7 @@ AC_ARG_WITH(tcp-wrappers,
1109 CPPFLAGS="-I${withval} ${CPPFLAGS}" 1123 CPPFLAGS="-I${withval} ${CPPFLAGS}"
1110 fi 1124 fi
1111 fi 1125 fi
1112 LIBWRAP="-lwrap" 1126 LIBS="-lwrap $LIBS"
1113 LIBS="$LIBWRAP $LIBS"
1114 AC_MSG_CHECKING(for libwrap) 1127 AC_MSG_CHECKING(for libwrap)
1115 AC_TRY_LINK( 1128 AC_TRY_LINK(
1116 [ 1129 [
@@ -1126,7 +1139,7 @@ AC_ARG_WITH(tcp-wrappers,
1126 AC_DEFINE(LIBWRAP, 1, 1139 AC_DEFINE(LIBWRAP, 1,
1127 [Define if you want 1140 [Define if you want
1128 TCP Wrappers support]) 1141 TCP Wrappers support])
1129 AC_SUBST(LIBWRAP) 1142 SSHDLIBS="$SSHDLIBS -lwrap"
1130 TCPW_MSG="yes" 1143 TCPW_MSG="yes"
1131 ], 1144 ],
1132 [ 1145 [
@@ -1241,6 +1254,7 @@ AC_CHECK_FUNCS( \
1241 getnameinfo \ 1254 getnameinfo \
1242 getopt \ 1255 getopt \
1243 getpeereid \ 1256 getpeereid \
1257 getpeerucred \
1244 _getpty \ 1258 _getpty \
1245 getrlimit \ 1259 getrlimit \
1246 getttyent \ 1260 getttyent \
@@ -1259,6 +1273,7 @@ AC_CHECK_FUNCS( \
1259 ogetaddrinfo \ 1273 ogetaddrinfo \
1260 openlog_r \ 1274 openlog_r \
1261 openpty \ 1275 openpty \
1276 poll \
1262 prctl \ 1277 prctl \
1263 pstat \ 1278 pstat \
1264 readpassphrase \ 1279 readpassphrase \
@@ -1292,6 +1307,7 @@ AC_CHECK_FUNCS( \
1292 strtonum \ 1307 strtonum \
1293 strtoll \ 1308 strtoll \
1294 strtoul \ 1309 strtoul \
1310 swap32 \
1295 sysconf \ 1311 sysconf \
1296 tcgetpgrp \ 1312 tcgetpgrp \
1297 truncate \ 1313 truncate \
@@ -1364,6 +1380,14 @@ AC_CHECK_DECLS(writev, , , [
1364#include <unistd.h> 1380#include <unistd.h>
1365 ]) 1381 ])
1366 1382
1383AC_CHECK_DECLS(MAXSYMLINKS, , , [
1384#include <sys/param.h>
1385 ])
1386
1387AC_CHECK_DECLS(offsetof, , , [
1388#include <stddef.h>
1389 ])
1390
1367AC_CHECK_FUNCS(setresuid, [ 1391AC_CHECK_FUNCS(setresuid, [
1368 dnl Some platorms have setresuid that isn't implemented, test for this 1392 dnl Some platorms have setresuid that isn't implemented, test for this
1369 AC_MSG_CHECKING(if setresuid seems to work) 1393 AC_MSG_CHECKING(if setresuid seems to work)
@@ -1489,7 +1513,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
1489 1513
1490# Check for missing getpeereid (or equiv) support 1514# Check for missing getpeereid (or equiv) support
1491NO_PEERCHECK="" 1515NO_PEERCHECK=""
1492if test "x$ac_cv_func_getpeereid" != "xyes" ; then 1516if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
1493 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt]) 1517 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt])
1494 AC_TRY_COMPILE( 1518 AC_TRY_COMPILE(
1495 [#include <sys/types.h> 1519 [#include <sys/types.h>
@@ -1977,7 +2001,12 @@ fi
1977# Search for SHA256 support in libc and/or OpenSSL 2001# Search for SHA256 support in libc and/or OpenSSL
1978AC_CHECK_FUNCS(SHA256_Update EVP_sha256) 2002AC_CHECK_FUNCS(SHA256_Update EVP_sha256)
1979 2003
1980AC_CHECK_LIB(iaf, ia_openinfo) 2004saved_LIBS="$LIBS"
2005AC_CHECK_LIB(iaf, ia_openinfo, [
2006 LIBS="$LIBS -liaf"
2007 AC_CHECK_FUNCS(set_id, [SSHDLIBS="$SSHDLIBS -liaf"])
2008])
2009LIBS="$saved_LIBS"
1981 2010
1982### Configure cryptographic random number support 2011### Configure cryptographic random number support
1983 2012
@@ -2027,7 +2056,7 @@ AC_ARG_WITH(pam,
2027 2056
2028 PAM_MSG="yes" 2057 PAM_MSG="yes"
2029 2058
2030 LIBPAM="-lpam" 2059 SSHDLIBS="$SSHDLIBS -lpam"
2031 AC_DEFINE(USE_PAM, 1, 2060 AC_DEFINE(USE_PAM, 1,
2032 [Define if you want to enable PAM support]) 2061 [Define if you want to enable PAM support])
2033 2062
@@ -2037,11 +2066,10 @@ AC_ARG_WITH(pam,
2037 # libdl already in LIBS 2066 # libdl already in LIBS
2038 ;; 2067 ;;
2039 *) 2068 *)
2040 LIBPAM="$LIBPAM -ldl" 2069 SSHDLIBS="$SSHDLIBS -ldl"
2041 ;; 2070 ;;
2042 esac 2071 esac
2043 fi 2072 fi
2044 AC_SUBST(LIBPAM)
2045 fi 2073 fi
2046 ] 2074 ]
2047) 2075)
@@ -3150,25 +3178,43 @@ int main()
3150 [#include <arpa/nameser.h>]) 3178 [#include <arpa/nameser.h>])
3151 ]) 3179 ])
3152 3180
3181AC_MSG_CHECKING(if struct __res_state _res is an extern)
3182AC_LINK_IFELSE([
3183#include <stdio.h>
3184#if HAVE_SYS_TYPES_H
3185# include <sys/types.h>
3186#endif
3187#include <netinet/in.h>
3188#include <arpa/nameser.h>
3189#include <resolv.h>
3190extern struct __res_state _res;
3191int main() { return 0; }
3192 ],
3193 [AC_MSG_RESULT(yes)
3194 AC_DEFINE(HAVE__RES_EXTERN, 1,
3195 [Define if you have struct __res_state _res as an extern])
3196 ],
3197 [ AC_MSG_RESULT(no) ]
3198)
3199
3153# Check whether user wants SELinux support 3200# Check whether user wants SELinux support
3154SELINUX_MSG="no" 3201SELINUX_MSG="no"
3155LIBSELINUX="" 3202LIBSELINUX=""
3156AC_ARG_WITH(selinux, 3203AC_ARG_WITH(selinux,
3157 [ --with-selinux Enable SELinux support], 3204 [ --with-selinux Enable SELinux support],
3158 [ if test "x$withval" != "xno" ; then 3205 [ if test "x$withval" != "xno" ; then
3206 save_LIBS="$LIBS"
3159 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.]) 3207 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
3160 SELINUX_MSG="yes" 3208 SELINUX_MSG="yes"
3161 AC_CHECK_HEADER([selinux/selinux.h], , 3209 AC_CHECK_HEADER([selinux/selinux.h], ,
3162 AC_MSG_ERROR(SELinux support requires selinux.h header)) 3210 AC_MSG_ERROR(SELinux support requires selinux.h header))
3163 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ], 3211 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ],
3164 AC_MSG_ERROR(SELinux support requires libselinux library)) 3212 AC_MSG_ERROR(SELinux support requires libselinux library))
3165 save_LIBS="$LIBS" 3213 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
3166 LIBS="$LIBS $LIBSELINUX"
3167 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level) 3214 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
3168 LIBS="$save_LIBS" 3215 LIBS="$save_LIBS"
3169 fi ] 3216 fi ]
3170) 3217)
3171AC_SUBST(LIBSELINUX)
3172 3218
3173# Check whether user wants Kerberos 5 support 3219# Check whether user wants Kerberos 5 support
3174KRB5_MSG="no" 3220KRB5_MSG="no"
@@ -4004,7 +4050,10 @@ echo " Compiler: ${CC}"
4004echo " Compiler flags: ${CFLAGS}" 4050echo " Compiler flags: ${CFLAGS}"
4005echo "Preprocessor flags: ${CPPFLAGS}" 4051echo "Preprocessor flags: ${CPPFLAGS}"
4006echo " Linker flags: ${LDFLAGS}" 4052echo " Linker flags: ${LDFLAGS}"
4007echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}" 4053echo " Libraries: ${LIBS}"
4054if test ! -z "${SSHDLIBS}"; then
4055echo " +for sshd: ${SSHDLIBS}"
4056fi
4008 4057
4009echo "" 4058echo ""
4010 4059
@@ -4030,12 +4079,12 @@ if test ! -z "$RAND_HELPER_CMDHASH" ; then
4030fi 4079fi
4031 4080
4032if test ! -z "$NO_PEERCHECK" ; then 4081if test ! -z "$NO_PEERCHECK" ; then
4033 echo "WARNING: the operating system that you are using does not " 4082 echo "WARNING: the operating system that you are using does not"
4034 echo "appear to support either the getpeereid() API nor the " 4083 echo "appear to support getpeereid(), getpeerucred() or the"
4035 echo "SO_PEERCRED getsockopt() option. These facilities are used to " 4084 echo "SO_PEERCRED getsockopt() option. These facilities are used to"
4036 echo "enforce security checks to prevent unauthorised connections to " 4085 echo "enforce security checks to prevent unauthorised connections to"
4037 echo "ssh-agent. Their absence increases the risk that a malicious " 4086 echo "ssh-agent. Their absence increases the risk that a malicious"
4038 echo "user can connect to your agent. " 4087 echo "user can connect to your agent."
4039 echo "" 4088 echo ""
4040fi 4089fi
4041 4090