summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac103
1 files changed, 89 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 6ba4d244a..36c457728 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.214 2004/04/17 03:03:07 tim Exp $ 1# $Id: configure.ac,v 1.226 2004/08/16 13:12:06 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -28,6 +28,8 @@ AC_PROG_CPP
28AC_PROG_RANLIB 28AC_PROG_RANLIB
29AC_PROG_INSTALL 29AC_PROG_INSTALL
30AC_PATH_PROG(AR, ar) 30AC_PATH_PROG(AR, ar)
31AC_PATH_PROG(CAT, cat)
32AC_PATH_PROG(KILL, kill)
31AC_PATH_PROGS(PERL, perl5 perl) 33AC_PATH_PROGS(PERL, perl5 perl)
32AC_PATH_PROG(SED, sed) 34AC_PATH_PROG(SED, sed)
33AC_SUBST(PERL) 35AC_SUBST(PERL)
@@ -37,6 +39,14 @@ AC_PATH_PROG(TEST_MINUS_S_SH, bash)
37AC_PATH_PROG(TEST_MINUS_S_SH, ksh) 39AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
38AC_PATH_PROG(TEST_MINUS_S_SH, sh) 40AC_PATH_PROG(TEST_MINUS_S_SH, sh)
39AC_PATH_PROG(SH, sh) 41AC_PATH_PROG(SH, sh)
42AC_SUBST(TEST_SHELL,sh)
43
44dnl for buildpkg.sh
45AC_PATH_PROG(PATH_GROUPADD_PROG, groupadd, groupadd,
46 [/usr/sbin${PATH_SEPARATOR}/etc])
47AC_PATH_PROG(PATH_USERADD_PROG, useradd, useradd,
48 [/usr/sbin${PATH_SEPARATOR}/etc])
49AC_CHECK_PROG(MAKE_PACKAGE_SUPPORTED, pkgmk, yes, no)
40 50
41# System features 51# System features
42AC_SYS_LARGEFILE 52AC_SYS_LARGEFILE
@@ -244,6 +254,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
244 AC_DEFINE(PAM_TTY_KLUDGE) 254 AC_DEFINE(PAM_TTY_KLUDGE)
245 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!") 255 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!")
246 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 256 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
257 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM)
247 inet6_default_4in6=yes 258 inet6_default_4in6=yes
248 case `uname -r` in 259 case `uname -r` in
249 1.*|2.0.*) 260 1.*|2.0.*)
@@ -287,6 +298,7 @@ mips-sony-bsd|mips-sony-newsos4)
287 AC_DEFINE(LOGIN_NEEDS_UTMPX) 298 AC_DEFINE(LOGIN_NEEDS_UTMPX)
288 AC_DEFINE(LOGIN_NEEDS_TERM) 299 AC_DEFINE(LOGIN_NEEDS_TERM)
289 AC_DEFINE(PAM_TTY_KLUDGE) 300 AC_DEFINE(PAM_TTY_KLUDGE)
301 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID)
290 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 302 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
291 # Pushing STREAMS modules will cause sshd to acquire a controlling tty. 303 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
292 AC_DEFINE(SSHD_ACQUIRES_CTTY) 304 AC_DEFINE(SSHD_ACQUIRES_CTTY)
@@ -366,6 +378,7 @@ mips-sony-bsd|mips-sony-newsos4)
366 AC_CHECK_FUNCS(getluid setluid) 378 AC_CHECK_FUNCS(getluid setluid)
367 MANTYPE=man 379 MANTYPE=man
368 do_sco3_extra_lib_check=yes 380 do_sco3_extra_lib_check=yes
381 TEST_SHELL=ksh
369 ;; 382 ;;
370*-*-sco3.2v5*) 383*-*-sco3.2v5*)
371 if test -z "$GCC"; then 384 if test -z "$GCC"; then
@@ -381,8 +394,10 @@ mips-sony-bsd|mips-sony-newsos4)
381 AC_DEFINE(BROKEN_SETREUID) 394 AC_DEFINE(BROKEN_SETREUID)
382 AC_DEFINE(BROKEN_SETREGID) 395 AC_DEFINE(BROKEN_SETREGID)
383 AC_DEFINE(WITH_ABBREV_NO_TTY) 396 AC_DEFINE(WITH_ABBREV_NO_TTY)
397 AC_DEFINE(BROKEN_UPDWTMPX)
384 AC_CHECK_FUNCS(getluid setluid) 398 AC_CHECK_FUNCS(getluid setluid)
385 MANTYPE=man 399 MANTYPE=man
400 TEST_SHELL=ksh
386 ;; 401 ;;
387*-*-unicosmk*) 402*-*-unicosmk*)
388 AC_DEFINE(NO_SSH_LASTLOG) 403 AC_DEFINE(NO_SSH_LASTLOG)
@@ -503,16 +518,16 @@ int main(){exit(0);}
503) 518)
504 519
505# Checks for header files. 520# Checks for header files.
506AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \ 521AC_CHECK_HEADERS(bstring.h crypt.h dirent.h endian.h features.h \
507 getopt.h glob.h ia.h lastlog.h limits.h login.h \ 522 floatingpoint.h getopt.h glob.h ia.h lastlog.h limits.h login.h \
508 login_cap.h maillock.h netdb.h netgroup.h \ 523 login_cap.h maillock.h ndir.h netdb.h netgroup.h \
509 netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \ 524 netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \
510 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ 525 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
511 strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \ 526 strings.h sys/dir.h sys/strtio.h sys/audit.h sys/bitypes.h \
512 sys/cdefs.h sys/mman.h sys/prctl.h sys/pstat.h sys/ptms.h \ 527 sys/bsdtty.h sys/cdefs.h sys/mman.h sys/ndir.h sys/prctl.h \
513 sys/select.h sys/stat.h sys/stream.h sys/stropts.h \ 528 sys/pstat.h sys/ptms.h sys/select.h sys/stat.h sys/stream.h \
514 sys/sysmacros.h sys/time.h sys/timers.h sys/un.h time.h tmpdir.h \ 529 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h sys/un.h \
515 ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h) 530 time.h tmpdir.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h)
516 531
517# Checks for libraries. 532# Checks for libraries.
518AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) 533AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
@@ -717,6 +732,14 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
717 ] 732 ]
718) 733)
719 734
735AC_MSG_CHECKING([for /proc/pid/fd directory])
736if test -d "/proc/$$/fd" ; then
737 AC_DEFINE(HAVE_PROC_PID)
738 AC_MSG_RESULT(yes)
739else
740 AC_MSG_RESULT(no)
741fi
742
720# Check whether user wants S/Key support 743# Check whether user wants S/Key support
721SKEY_MSG="no" 744SKEY_MSG="no"
722AC_ARG_WITH(skey, 745AC_ARG_WITH(skey,
@@ -818,9 +841,9 @@ AC_ARG_WITH(tcp-wrappers,
818 841
819dnl Checks for library functions. Please keep in alphabetical order 842dnl Checks for library functions. Please keep in alphabetical order
820AC_CHECK_FUNCS(\ 843AC_CHECK_FUNCS(\
821 arc4random __b64_ntop b64_ntop __b64_pton b64_pton \ 844 arc4random __b64_ntop b64_ntop __b64_pton b64_pton bcopy \
822 bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \ 845 bindresvport_sa clock closefrom dirfd fchmod fchown freeaddrinfo \
823 getaddrinfo getcwd getgrouplist getnameinfo getopt \ 846 futimes getaddrinfo getcwd getgrouplist getnameinfo getopt \
824 getpeereid _getpty getrlimit getttyent glob inet_aton \ 847 getpeereid _getpty getrlimit getttyent glob inet_aton \
825 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ 848 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
826 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ 849 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \
@@ -860,6 +883,8 @@ AC_CHECK_DECL(tcsendbreak,
860 [#include <termios.h>] 883 [#include <termios.h>]
861) 884)
862 885
886AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>])
887
863AC_CHECK_FUNCS(setresuid, [ 888AC_CHECK_FUNCS(setresuid, [
864 dnl Some platorms have setresuid that isn't implemented, test for this 889 dnl Some platorms have setresuid that isn't implemented, test for this
865 AC_MSG_CHECKING(if setresuid seems to work) 890 AC_MSG_CHECKING(if setresuid seems to work)
@@ -924,6 +949,20 @@ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
924 ) 949 )
925fi 950fi
926 951
952# Check for missing getpeereid (or equiv) support
953NO_PEERCHECK=""
954if test "x$ac_cv_func_getpeereid" != "xyes" ; then
955 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt])
956 AC_TRY_COMPILE(
957 [#include <sys/types.h>
958 #include <sys/socket.h>],
959 [int i = SO_PEERCRED;],
960 [AC_MSG_RESULT(yes)],
961 [AC_MSG_RESULT(no)
962 NO_PEERCHECK=1]
963 )
964fi
965
927dnl see whether mkstemp() requires XXXXXX 966dnl see whether mkstemp() requires XXXXXX
928if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 967if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
929AC_MSG_CHECKING([for (overly) strict mkstemp]) 968AC_MSG_CHECKING([for (overly) strict mkstemp])
@@ -2154,6 +2193,25 @@ AC_SEARCH_LIBS(getrrsetbyname, resolv,
2154 # Needed by our getrrsetbyname() 2193 # Needed by our getrrsetbyname()
2155 AC_SEARCH_LIBS(res_query, resolv) 2194 AC_SEARCH_LIBS(res_query, resolv)
2156 AC_SEARCH_LIBS(dn_expand, resolv) 2195 AC_SEARCH_LIBS(dn_expand, resolv)
2196 AC_MSG_CHECKING(if res_query will link)
2197 AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes),
2198 [AC_MSG_RESULT(no)
2199 saved_LIBS="$LIBS"
2200 LIBS="$LIBS -lresolv"
2201 AC_MSG_CHECKING(for res_query in -lresolv)
2202 AC_LINK_IFELSE([
2203#include <resolv.h>
2204int main()
2205{
2206 res_query (0, 0, 0, 0, 0);
2207 return 0;
2208}
2209 ],
2210 [LIBS="$LIBS -lresolv"
2211 AC_MSG_RESULT(yes)],
2212 [LIBS="$saved_LIBS"
2213 AC_MSG_RESULT(no)])
2214 ])
2157 AC_CHECK_FUNCS(_getshort _getlong) 2215 AC_CHECK_FUNCS(_getshort _getlong)
2158 AC_CHECK_MEMBER(HEADER.ad, 2216 AC_CHECK_MEMBER(HEADER.ad,
2159 [AC_DEFINE(HAVE_HEADER_AD)],, 2217 [AC_DEFINE(HAVE_HEADER_AD)],,
@@ -2207,7 +2265,10 @@ AC_ARG_WITH(kerberos5,
2207 [ char *tmp = heimdal_version; ], 2265 [ char *tmp = heimdal_version; ],
2208 [ AC_MSG_RESULT(yes) 2266 [ AC_MSG_RESULT(yes)
2209 AC_DEFINE(HEIMDAL) 2267 AC_DEFINE(HEIMDAL)
2210 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken" 2268 K5LIBS="-lkrb5 -ldes"
2269 K5LIBS="$K5LIBS -lcom_err -lasn1"
2270 AC_CHECK_LIB(roken, net_write,
2271 [K5LIBS="$K5LIBS -lroken"])
2211 ], 2272 ],
2212 [ AC_MSG_RESULT(no) 2273 [ AC_MSG_RESULT(no)
2213 K5LIBS="-lkrb5 -lk5crypto -lcom_err" 2274 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
@@ -2870,7 +2931,7 @@ if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
2870fi 2931fi
2871 2932
2872AC_EXEEXT 2933AC_EXEEXT
2873AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds]) 2934AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2874AC_OUTPUT 2935AC_OUTPUT
2875 2936
2876# Print summary of options 2937# Print summary of options
@@ -2935,6 +2996,10 @@ echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
2935 2996
2936echo "" 2997echo ""
2937 2998
2999if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
3000 echo "SVR4 style packages are supported with \"make package\"\n"
3001fi
3002
2938if test "x$PAM_MSG" = "xyes" ; then 3003if test "x$PAM_MSG" = "xyes" ; then
2939 echo "PAM is enabled. You may need to install a PAM control file " 3004 echo "PAM is enabled. You may need to install a PAM control file "
2940 echo "for sshd, otherwise password authentication may fail. " 3005 echo "for sshd, otherwise password authentication may fail. "
@@ -2951,3 +3016,13 @@ if test ! -z "$RAND_HELPER_CMDHASH" ; then
2951 echo "" 3016 echo ""
2952fi 3017fi
2953 3018
3019if test ! -z "$NO_PEERCHECK" ; then
3020 echo "WARNING: the operating system that you are using does not "
3021 echo "appear to support either the getpeereid() API nor the "
3022 echo "SO_PEERCRED getsockopt() option. These facilities are used to "
3023 echo "enforce security checks to prevent unauthorised connections to "
3024 echo "ssh-agent. Their absence increases the risk that a malicious "
3025 echo "user can connect to your agent. "
3026 echo ""
3027fi
3028