# # configure.in # # Author: Tatu Ylonen # # Copyright (c) 1995 Tatu Ylonen , Espoo, Finland # All rights reserved # # Created: Wed Mar 22 18:02:48 1995 ylo # # $Id: configure.in,v 1.26 1995/10/02 01:22:16 ylo Exp $ # $Log: configure.in,v $ # Revision 1.26 1995/10/02 01:22:16 ylo # Check that the compiler understands at least basic ANSI C. # Check sys/syslog.h on Ultrix. # Fixes for SCO. # Fixed --with-etcdir. # Put extra libraries at head of LIBS. # Check existence of /var/run; set and substitute PIDDIR. # # Revision 1.25 1995/09/27 03:13:24 ylo # Fixed a syntax error. # # Revision 1.24 1995/09/27 02:48:20 ylo # Added SOCKS support. # Added some checking... and result printings. # # Revision 1.23 1995/09/27 02:13:44 ylo # Define SPEED_T_IN_STDTYPES_H on sunos 4.1.1 and NextStep. # Added support for SCO unix. # Added --with-etcdir=PATH. # # Revision 1.22 1995/09/21 17:10:59 ylo # Fixed bsdi support. # Added svr4 (univel unixware) support. # Added machten support. # Always define USE_PIPES; socketpairs appear to be broken on # many systems. # Check innetgr. # Don't define XAUTH_PATH if no xauth program. # --with-libwrap can take library name as argument. # Fixed checking for libwrap library. # # Revision 1.21 1995/09/13 11:55:30 ylo # Added Cray and BSDI support. Don't use -pipe on BSDI (bundled # compiler is broken). # Eliminated references to HPSUX_BROKEN_PTYS (it is now used on # all systems). # # Revision 1.20 1995/09/11 17:37:45 ylo # Fixed hpsux pty define on aix 3.2. # Remove duplicate TTY_GROUP define on osf. # Check sizes of all integer types. # Added libwrap support. # # Revision 1.19 1995/09/10 23:26:20 ylo # Fixed osfc2.o in CONFOBJS. # # Revision 1.18 1995/09/10 22:46:19 ylo # Use HPSUX_BROKEN_PTYS on aix3.2.{0-4}. # Added OSF/1 C2 stuff. # Don't check for wait{3,4,pid} (no longer used). # # Revision 1.17 1995/09/09 21:26:42 ylo # /m/shadows/u2/users/ylo/ssh/README # # Revision 1.16 1995/09/06 15:59:08 ylo # Updated 64-bit irix stuff. # Added m88k-dg-dgux support. # # Revision 1.15 1995/08/31 09:20:42 ylo # Added check if compiler works. # Added support for irix6. # Don't use libsun on irix. # Define SSH_LASTLOG even if lastlog not found. # # Revision 1.14 1995/08/29 22:22:10 ylo # Reordered checks for wtmp, utmp, lastlog locations. # Check for missing crypt (replace if missing). # # Revision 1.13 1995/08/22 14:10:30 ylo # Fixed a typo. # # Revision 1.12 1995/08/22 14:08:37 ylo # Added warning if kerberos present. # Added check for seteuid (used to enable uid-swapping). # # Revision 1.11 1995/08/21 23:24:14 ylo # Fixed a typo. # Deleted --with-rhosts. # # Revision 1.10 1995/08/19 13:18:00 ylo # Changed to securid stuff. # # Revision 1.9 1995/08/18 22:53:46 ylo # Added determining the canonical host type. # Added host type specific configuration code for a number of # machines. Eliminated kludges to do this from other parts of # configure. # Added checking for netinet/in_systm.h. # Fixed types in utmp/wtmp testing. # Added --without-idea. # Added --with-securid. # # Revision 1.8 1995/07/27 03:38:18 ylo # Fixed lastlog determination code when lastlog is directory. # # Revision 1.7 1995/07/27 03:27:10 ylo # Added AC_TYPE_MODE_T. # Added default for lastlog when not found (otherwise # directoryness test fails). # # Revision 1.6 1995/07/27 00:37:57 ylo # Added --with-path. # Added looking for utmp, wtmp, and lastlog. # Added checking for utime.h. # # Revision 1.5 1995/07/26 23:29:55 ylo # Removed checking for sys/termios.h. # # Revision 1.4 1995/07/13 17:29:44 ylo # Added --enable-warnings. -Wall is only used if enabled by this. # # Revision 1.3 1995/07/13 09:55:07 ylo # Added AC_STRUCT_ST_BLKSIZE. # # Revision 1.2 1995/07/13 01:20:51 ylo # Removed "Last modified" header. # Added cvs log. # # $Endlog$ # AC_INIT(sshd.c) AC_CONFIG_HEADER(config.h) AC_PREREQ(2.7) if test -f /etc/krb.conf; then AC_MSG_WARN(Ssh does not yet support Kerberos!) fi AC_CANONICAL_HOST AC_PROG_CC AC_C_CROSS AC_DEFINE_UNQUOTED(HOSTTYPE, "$host") case "$host" in *-*-sunos4.1.1*) os_sunos=yes # Tim Adam says speed_t is defined in stdtypes.h AC_DEFINE(SPEED_T_IN_STDTYPES_H) ;; *-*-sunos*) os_sunos=yes ;; *-sgi-irix5*) # Irix stuff from snabb@niksula.hut.fi, tsurmacz@asic.ict.pwr.wroc.pl, # C.Martin@sheffield.ac.uk, raistlin@uni-paderborn.de no_libsocket=yes no_libsun=yes no_libnsl=yes ;; *-sgi-irix6*) # from d-champion@uchicago.edu no_libsocket=yes no_libnsl=yes no_libsun=yes if test "`uname -s`" = "IRIX64"; then CFLAGS="-32 $CFLAGS" LDFLAGS="-32 $LDFLAGS" fi ;; *-ibm-aix3.2|*-ibm-aix3.2.0|*-ibm-aix3.2.1|*-ibm-aix3.2.2|*-ibm-aix3.2.3|*-ibm-aix3.2.4) os_aix=yes AC_CHECK_LIB(s, getuserattr) ;; *-ibm-aix*) os_aix=yes AC_CHECK_LIB(s, getuserattr) ;; mips-dec-mach3*) # Mach3 stuff from kivinen@hut.fi no_vhangup=yes ;; *-dec-ultrix*) # Ultrix stuff from dmckilli@qc.bell.ca, jbotz@orixa.mtholyoke.edu. AC_DEFINE(O_NONBLOCK_BROKEN) no_vhangup=yes # Ultrix shadow passwords implemented in auth-passwd.c. no_shadows_password_checking=yes AC_CHECK_LIB(auth, authenticate_user) AC_TRY_COMPILE([#include ], [int foo = LOG_DAEMON; ], , AC_DEFINE(NEED_SYS_SYSLOG_H)) ;; *-*-hpux*) # HPUX flags from jgotts@engin.umich.edu if test -z "$GCC"; then CFLAGS="$CFLAGS -Aa -D_HPUX_SOURCE" fi AC_DEFINE(HPSUX_NONSTANDARD_X11_KLUDGE) ;; alpha-dec-osf*) AC_DEFINE(TTY_GROUP, "terminal") AC_MSG_CHECKING(for OSF/1 C2 security package) osfc2sec=`/usr/sbin/setld -i | grep '^OSFC2SEC'` if test -n "$osfc2sec"; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_OSF1_C2_SECURITY) AC_CHECK_LIB(security, set_auth_parameters, LIBS="$LIBS -lsecurity", AC_MSG_ERROR("Could not find libsecurity even though C2 security installed.")) CONFOBJS="$CONFOBJS osfc2.o" else AC_MSG_RESULT(no) fi ;; *-*-nextstep*) # Nextstep support from a person who wants to remain anonymous no_termios=yes AC_DEFINE(SPEED_T_IN_STDTYPES_H) ;; *-*-linux*) # Test for a bug in older slackware distributions AC_MSG_CHECKING(for bugs in your linux distribution) SAVED_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include ], [ extern char **environ; double d = sin((double)(int)environ[0]); return (int)d; ], AC_MSG_RESULT(ok), AC_MSG_RESULT(problems) AC_MSG_WARN(Your linux distribution contains an error.) AC_MSG_WARN(To fix it use ln -s libc.sa /usr/lib/libg.sa) AC_MSG_WARN(Alternatively you can configure ssh with CFLAGS=-O LDFLAGS=-O ./configure) AC_MSG_ERROR(Compilation cannot continue before this is fixed.) ) LIBS="$SAVED_LIBS" # Linux shadow password support (Andrew.Macpherson.1248566@bnr.co.uk) if test -f /etc/shadow && test -f /etc/login.defs; then AC_MSG_RESULT(Using linux John Haugh shadow passwords and pw_encrypt for password encryption) AC_DEFINE(crypt,pw_encrypt) LIBS="$LIBS -lshadow" fi ;; i*86-*-bsdi*) no_pipe=yes ;; i*86-unknown-bsd*) # Assume 386BSD. pgut01@cs.auckland.ac.nz reported this makes it compile. AC_DEFINE(__FreeBSD__) ;; m68k-sony-newsos*) # From snabb@niksula.hut.fi no_vhangup=yes ;; m88k-dg-dgux*) AC_DEFINE(BROKEN_INET_ADDR) ;; *-cray-unicos*) CFLAGS="$CFLAGS -DCRAY_STACKSEG_END=_getb67" ;; *-*-sysv4*) AC_CHECK_LIB(gen, openlog) ;; *-*-machten*) AC_DEFINE(USE_STRLEN_FOR_AF_UNIX) no_vhangup=yes ;; i*86-unknown-sco*) # From moi@dio.com AC_DEFINE(HAVE_SCO_ETC_SHADOW) AC_DEFINE(SCO) no_ranlib=yes LIBS="-L/usr/lib/libp -lprot -lx $LIBS" CFLAGS="$CFLAGS -UM_I86SM" ;; *-convex-bsd*) # From mark.martinec@nsc.ijs.si # On Convex, getpwnam sets pw_passwd if running as root no_shadows_password_checking=yes ;; *-sequent-ptx*) # From geek+@cmu.edu test_libinet=yes ;; *-*-freebsd*) # From Ollivier Robert: FreeBSD and NetBSD use master.passwd, but set # pw_passwd automatically when running as root. no_shadow_password_checking=yes ;; *-*-netbsd*) # From Ollivier Robert: FreeBSD and NetBSD use master.passwd, but set # pw_passwd automatically when running as root. no_shadow_password_checking=yes ;; *) ;; esac # Socket pairs appear to be broken on several systems. I don't know exactly # where, so I'll use pipes everywhere for now. AC_DEFINE(USE_PIPES) AC_MSG_CHECKING([that the compiler works]) AC_TRY_RUN([ main(int ac, char **av) { return 0; } ], AC_MSG_RESULT(yes), AC_MSG_RESULT(no) AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.), AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)) if test -z "$no_pipe"; then if test -n "$GCC"; then AC_MSG_CHECKING([if the compiler understands -pipe]) OLDCC="$CC" CC="$CC -pipe" AC_TRY_COMPILE(,, AC_MSG_RESULT(yes), CC="$OLDCC" AC_MSG_RESULT(no)) fi fi AC_ARG_ENABLE(warnings, [ --enable-warnings Enable -Wall if using gcc.], [ if test -n "$GCC"; then AC_MSG_RESULT(Adding -Wall to CFLAGS.) CFLAGS="$CFLAGS -Wall" fi]) AC_TYPE_SIGNAL AC_TYPE_SIZE_T AC_TYPE_UID_T AC_TYPE_OFF_T AC_TYPE_MODE_T AC_STRUCT_ST_BLKSIZE AC_C_CONST AC_C_INLINE AC_C_BIGENDIAN AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(short) if test -z "$no_termios"; then AC_CHECK_HEADERS(termios.h) fi AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(unistd.h rusage.h sys/time.h lastlog.h utmp.h utmpx.h) AC_CHECK_HEADERS(sgtty.h sys/select.h sys/ioctl.h) AC_CHECK_HEADERS(paths.h usersec.h utime.h netinet/in_systm.h ulimit.h) AC_HEADER_TIME AC_HEADER_DIRENT AC_HEADER_STAT AC_EGREP_HEADER(ut_pid, utmp.h, AC_DEFINE(HAVE_PID_IN_UTMP)) AC_EGREP_HEADER(ut_name, utmp.h, AC_DEFINE(HAVE_NAME_IN_UTMP)) AC_EGREP_HEADER(ut_id, utmp.h, AC_DEFINE(HAVE_ID_IN_UTMP)) AC_EGREP_HEADER(ut_host, utmp.h, AC_DEFINE(HAVE_HOST_IN_UTMP)) AC_EGREP_HEADER(ut_addr, utmp.h, AC_DEFINE(HAVE_ADDR_IN_UTMP)) AC_CHECK_LIB(c, crypt, [true], AC_CHECK_LIB(crypt, crypt)) if test -z "$no_libnsl"; then AC_CHECK_LIB(nsl, main) fi if test -n "$test_libinet"; then AC_CHECK_LIB(inet, inet_network) fi if test -z "$no_libsocket"; then AC_CHECK_LIB(socket, socket) fi if test -z "$no_libsun"; then AC_CHECK_LIB(sun, getpwnam) fi AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil") if test -z "$no_vhangup"; then AC_CHECK_FUNCS(vhangup) fi if test -z "$no_setsid"; then AC_CHECK_FUNCS(setsid) fi AC_CHECK_FUNCS(gettimeofday times getrusage ftruncate revoke makeutx) AC_CHECK_FUNCS(strchr memcpy setlogin openpty _getpty clock fchmod ulimit) AC_CHECK_FUNCS(gethostname getdtablesize umask innetgr initgroups) AC_REPLACE_FUNCS(strerror memmove remove random putenv crypt socketpair) AC_PROG_LN_S AC_PROG_INSTALL if test -z "$no_ranlib"; then AC_PROG_RANLIB else RANLIB=":" fi AC_PROGRAMS_CHECK(MAKEDEP, makedepend makedep, makedepend) AC_PATH_PROGS(WISH, wish wishx wish4.1 true) if test `basename $WISH` = "true"; then AC_MSG_WARN(the wish program was not found - ssh-askpass will not work.) WISH="/usr/local/bin/wish" fi AC_PATH_PROG(XAUTH_PATH, xauth) if test -n "$XAUTH_PATH"; then AC_DEFINE_UNQUOTED(XAUTH_PATH, "$XAUTH_PATH") fi AC_PATH_PROGS(PERL, perl5 perl5.001 perl, not found) if test "x$PERL" = "xnot found" || $PERL -e 'exit ($] >= 5)'; then unset ac_cv_path_PERL PERL="/usr/local/bin/perl" AC_MSG_WARN(perl version 5 not found - make-ssh-known-hosts will not work) fi AC_MSG_CHECKING(for pseudo ttys) if test -c /dev/ptmx && test -c /dev/pts/0 then AC_DEFINE(HAVE_DEV_PTMX) AC_MSG_RESULT(streams ptys) else if test -c /dev/pts && test -c /dev/ptc then AC_DEFINE(HAVE_DEV_PTS_AND_PTC) AC_MSG_RESULT(/dev/pts and /dev/ptc) else AC_MSG_RESULT(bsd-style ptys) fi fi AC_MSG_CHECKING(for /etc/default/login) if test -f /etc/default/login; then AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi if test -z "$no_shadows_password_checking"; then AC_MSG_CHECKING(for shadow passwords) if test -f /etc/shadow; then AC_DEFINE(HAVE_ETC_SHADOW) AC_MSG_RESULT(/etc/shadow) # SunOS C2 security uses this style of shadow passwords, but does not # have getspent in a system library. However, a libshadow.a library # contaning these is publicly available. AC_CHECK_LIB(shadow, getspent) elif test -n "$os_aix"; then AC_DEFINE(HAVE_ETC_SECURITY_PASSWD) AC_MSG_RESULT(/etc/security/passwd) elif test -n "$os_sunos"; then AC_DEFINE(HAVE_ETC_SECURITY_PASSWD_ADJUNCT) AC_MSG_RESULT(/etc/security/passwd.adjunct) else AC_MSG_RESULT(no) fi fi AC_MSG_CHECKING(location of mail spool files) for dir in /var/spool/mail /var/mail /usr/spool/mail /usr/mail FILE do if test "$dir" = "FILE"; then if test -f $HOME/.MailBox; then AC_MSG_WARN(mail spool directory was not found: assuming you use \$HOME/.MailBox) AC_DEFINE_UNQUOTED(MAIL_SPOOL_FILE, ".MailBox") AC_MSG_RESULT(\$HOME/.MailBox) else AC_MSG_WARN(mail spool directory was not found: assuming you use \$HOME/newmail) AC_DEFINE_UNQUOTED(MAIL_SPOOL_FILE, "newmail") AC_MSG_RESULT(\$HOME/newmail) fi elif test -d $dir; then AC_DEFINE_UNQUOTED(MAIL_SPOOL_DIRECTORY, "$dir") AC_MSG_RESULT($dir) break fi done AC_MSG_CHECKING(location of utmp) if test -f /var/run/utmp; then AC_DEFINE(SSH_UTMP, "/var/run/utmp") AC_MSG_RESULT(/var/run/utmp) elif test -f /var/log/utmp; then AC_DEFINE(SSH_UTMP, "/var/log/utmp") AC_MSG_RESULT(/var/log/utmp) elif test -f /var/adm/utmp; then AC_DEFINE(SSH_UTMP, "/var/adm/utmp") AC_MSG_RESULT(/var/adm/utmp) elif test -f /usr/adm/utmp; then AC_DEFINE(SSH_UTMP, "/usr/adm/utmp") AC_MSG_RESULT(/usr/adm/utmp) elif test -f /etc/utmp; then AC_DEFINE(SSH_UTMP, "/etc/utmp") AC_MSG_RESULT(/etc/utmp) else AC_MSG_RESULT(not found) fi AC_MSG_CHECKING(location of wtmp) if test -f /var/log/wtmp; then AC_DEFINE(SSH_WTMP, "/var/log/wtmp") AC_MSG_RESULT(/var/log/wtmp) elif test -f /var/adm/wtmp; then AC_DEFINE(SSH_WTMP, "/var/adm/wtmp") AC_MSG_RESULT(/var/adm/wtmp) elif test -f /usr/adm/wtmp; then AC_DEFINE(SSH_WTMP, "/usr/adm/wtmp") AC_MSG_RESULT(/usr/adm/wtmp) elif test -f /etc/wtmp; then AC_DEFINE(SSH_WTMP, "/etc/wtmp") AC_MSG_RESULT(/etc/wtmp) else AC_DEFINE(SSH_WTMP, "/var/adm/wtmp") AC_MSG_RESULT(not found) fi AC_MSG_CHECKING(location of lastlog) if test -f /var/log/lastlog || test -d /var/log/lastlog; then AC_DEFINE(SSH_LASTLOG, "/var/log/lastlog") AC_DEFINE(HAVE_LASTLOG) LASTLOG=/var/log/lastlog AC_MSG_RESULT(/var/log/lastlog) elif test -f /var/adm/lastlog || test -d /var/adm/lastlog; then AC_DEFINE(SSH_LASTLOG, "/var/adm/lastlog") AC_DEFINE(HAVE_LASTLOG) LASTLOG=/var/adm/lastlog AC_MSG_RESULT(/var/adm/lastlog) elif test -f /usr/adm/lastlog || test -d /usr/adm/lastlog; then AC_DEFINE(SSH_LASTLOG, "/usr/adm/lastlog") AC_DEFINE(HAVE_LASTLOG) LASTLOG=/usr/adm/lastlog AC_MSG_RESULT(/usr/adm/lastlog) elif test -f /etc/lastlog || test -d /etc/lastlog; then AC_DEFINE(SSH_LASTLOG, "/etc/lastlog") AC_DEFINE(HAVE_LASTLOG) LASTLOG=/etc/lastlog AC_MSG_RESULT(/etc/lastlog) else AC_MSG_RESULT(not found) AC_DEFINE(SSH_LASTLOG, "/var/log/lastlog") LASTLOG=/var/log/lastlog fi AC_MSG_CHECKING(whether $LASTLOG is a directory) if test -d $LASTLOG then AC_MSG_RESULT(yes) AC_DEFINE(LASTLOG_IS_DIR) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(whether to include the IDEA encryption algorithm) AC_ARG_WITH(idea, [ --with-idea Use IDEA (default). --without-idea Don't use IDEA: avoids patent problems in commercial use], [ case "$withval" in no) AC_MSG_RESULT(no) AC_DEFINE(WITHOUT_IDEA) ;; *) AC_MSG_RESULT(yes) CONFOBJS="$CONFOBJS idea.o" ;; esac ], AC_MSG_RESULT(yes) CONFOBJS="$CONFOBJS idea.o" ) AC_MSG_CHECKING(whether to use rsh) AC_ARG_WITH(rsh, [ --with-rsh=PATH Specify where to find rsh. --without-rsh Do not use rsh under any conditions. ], [ case "$withval" in no) AC_MSG_RESULT(no) ;; yes) AC_MSG_RESULT(yes) AC_PATH_PROGS(RSH_PATH, remsh rsh) AC_DEFINE_UNQUOTED(RSH_PATH, "$RSH_PATH") ;; *) AC_MSG_RESULT($withval) AC_DEFINE_UNQUOTED(RSH_PATH, "$withval") RSH_PATH="$withval" ;; esac ], [ AC_MSG_RESULT(yes) AC_PATH_PROGS(RSH_PATH, remsh rsh) AC_DEFINE_UNQUOTED(RSH_PATH, "$RSH_PATH") ] ) # Check that we didn't accidentally get ssh as rsh. if test -n "$RSH_PATH"; then if test -n "`$RSH_PATH 2>&1 | grep listen-port:host:port`"; then AC_MSG_WARN(Found rsh in $RSH_PATH but it appears to actually be ssh.) AC_MSG_ERROR(Probably forgot to specify --with-rsh=PATH-TO-REAL-RSH.) fi fi # Code to permit setting default path for users (alden@math.ohio-state.edu) AC_MSG_CHECKING(default path) AC_ARG_WITH(path, [ --with-path=PATH Default path passed to user shell by sshd.], [ case "$withval" in no) AC_MSG_RESULT(use system default) ;; *) AC_MSG_RESULT($withval) AC_DEFINE_UNQUOTED(DEFAULT_PATH, "$withval") ;; esac ], AC_MSG_RESULT(use system default) ) AC_MSG_CHECKING(etcdir) AC_ARG_WITH(etcdir, [ --with-etcdir=PATH Directory containing ssh system files (default /etc).], [ case "$withval" in no) AC_MSG_ERROR(Need ETCDIR.) ;; yes) ETCDIR="/etc" AC_MSG_RESULT(/etc) ;; *) ETCDIR="$withval" AC_MSG_RESULT($withval) ;; esac ], ETCDIR="/etc" AC_MSG_RESULT(/etc) ) AC_MSG_CHECKING(whether to support SecurID) AC_ARG_WITH(securid, [ --with-securid[=PATH] Enable support for Security Dynamics SecurID card.], [ case "$withval" in no) AC_MSG_RESULT(no) ;; yes) AC_MSG_RESULT(yes) if test '!' -f /usr/ace/sdiclient.a; then AC_ERROR(SecurID sdiclient.a not found in /usr/ace: you must supply the path.) fi AC_MSG_RESULT(yes) AC_MSG_RESULT(Assuming SecurID headers and libraries are in /usr/ace.) AC_DEFINE(HAVE_SECURID) CFLAGS="$CFLAGS -I/usr/ace" LIBS="/usr/ace/sdiclient.a $LIBS" ;; *) AC_MSG_RESULT(yes) if test '!' -f $withval/sdiclient.a; then AC_ERROR(SecurID sdiclient.a not found in $withval: please supply the correct path.) fi AC_MSG_RESULT(Assuming SecurID headers and libraries are in $withval.) AC_DEFINE(HAVE_SECURID) CFLAGS="$CFLAGS -I$withval" LIBS="$withval/sdiclient.a $LIBS" ;; esac ], AC_MSG_RESULT(no) ) AC_MSG_CHECKING(whether to use libwrap) AC_ARG_WITH(libwrap, [ --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support.], [ case "$withval" in no) AC_MSG_RESULT(no) ;; yes) AC_MSG_RESULT(yes) AC_DEFINE(LIBWRAP) LIBS="-lwrap $LIBS" AC_TRY_LINK([ int allow_severity; int deny_severity; ], [ hosts_access(); ], [], [ AC_MSG_ERROR(Could not find the libwrap.a library. You must first install tcp_wrappers.) ]) ;; *) AC_MSG_RESULT(yes) AC_DEFINE(LIBWRAP) LIBS="$withval $LIBS" AC_TRY_LINK([ int allow_severity; int deny_severity; ], [ hosts_access(); ], [], [ AC_MSG_ERROR(Could not find the $withval library. You must first install tcp_wrappers.) ]) ;; esac ], AC_MSG_RESULT(no) ) AC_MSG_CHECKING(whether to support SOCKS) AC_ARG_WITH(socks, [ --with-socks[=PATH] Compile with SOCKS firewall traversal support.], [ case "$withval" in no) AC_MSG_RESULT(no) ;; *) AC_MSG_RESULT(yes) AC_DEFINE(SOCKS) AC_DEFINE(connect, Rconnect) AC_DEFINE(getsockname, Rgetsockname) AC_DEFINE(bind, Rbind) AC_DEFINE(accept, Raccept) AC_DEFINE(listen, Rlisten) AC_DEFINE(select, Rselect) if test "x$withval" = "xyes"; then withval="-lsocks" fi LIBS="$withval $LIBS" AC_TRY_LINK([], [ Rconnect(); ], [], [ AC_MSG_ERROR(Could not find the $withval library. You must first install socks.) ]) ;; esac ], AC_MSG_RESULT(no) ) AC_MSG_CHECKING(whether to use rsaref) AC_ARG_WITH(rsaref, [ --with-rsaref Use RSAREF (try to avoid patent problems in U.S.) --without-rsaref Use normal RSA routines (default). ], [ case "$withval" in no) AC_MSG_RESULT(no) ;; *) AC_MSG_RESULT(yes) AC_DEFINE(RSAREF) RSAREFDEP="rsaref2/source/librsaref.a" LIBS="-lrsaref $LIBS" LDFLAGS="-Lrsaref2/source $LDFLAGS" ;; esac ], AC_MSG_RESULT(no) ) PIDDIR="/var/run" AC_MSG_CHECKING(where to put sshd.pid) if test '!' -d $PIDDIR; then PIDDIR="$ETCDIR" fi AC_MSG_RESULT($PIDDIR) AC_ARG_PROGRAM AC_SUBST(ETCDIR) AC_SUBST(PIDDIR) AC_SUBST(RSAREFDEP) AC_SUBST(CONFOBJS) AC_OUTPUT(Makefile sshd.8 ssh.1 make-ssh-known-hosts.1)