AC_INIT(ssh.c)
AC_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_CANONICAL_HOST
# Checks for programs.
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_CHECK_PROG(AR, ar, ar)
AC_PATH_PROG(PERL, perl)
AC_SUBST(PERL)
AC_PATH_PROG(ENT, ent)
AC_SUBST(ENT)
# Use LOGIN_PROGRAM from environment if possible
if test ! -z "$LOGIN_PROGRAM" ; then
AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
else
# Search for login
AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
fi
fi
if test -z "$LD" ; then
LD=$CC
fi
AC_SUBST(LD)
# C Compiler features
AC_C_INLINE
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -Wall"
fi
# Check for some target-specific stuff
case "$host" in
*-*-aix*)
AFS_LIBS="-lld"
CFLAGS="$CFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
if (test "$LD" != "gcc" && test -z "$blibpath"); then
blibpath="/usr/lib:/lib:/usr/local/lib"
fi
AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
AC_DEFINE(BROKEN_GETADDRINFO)
MANTYPE='$(CATMAN)'
mansubdir=cat
dnl AIX handles lastlog as part of its login message
AC_DEFINE(DISABLE_LASTLOG)
MANTYPE='$(CATMAN)'
mansubdir=cat
;;
*-*-cygwin*)
LIBS="$LIBS /usr/lib/textmode.o"
AC_DEFINE(HAVE_CYGWIN)
AC_DEFINE(DISABLE_PAM)
AC_DEFINE(DISABLE_SHADOW)
AC_DEFINE(IPV4_DEFAULT)
AC_DEFINE(IP_TOS_IS_BROKEN)
AC_DEFINE(BROKEN_VHANGUP)
no_pam=1
no_libsocket=1
no_libnsl=1
;;
*-*-hpux10*)
if test -z "$GCC"; then
CFLAGS="$CFLAGS -Ae"
fi
CFLAGS="$CFLAGS -D_HPUX_SOURCE"
IPADDR_IN_DISPLAY=yes
AC_DEFINE(USE_PIPES)
AC_DEFINE(DISABLE_SHADOW)
LIBS="$LIBS -lsec"
MANTYPE='$(CATMAN)'
mansubdir=cat
;;
*-*-hpux11*)
CFLAGS="$CFLAGS -D_HPUX_SOURCE"
IPADDR_IN_DISPLAY=yes
AC_DEFINE(USE_PIPES)
AC_DEFINE(DISABLE_SHADOW)
LIBS="$LIBS -lsec"
MANTYPE='$(CATMAN)'
mansubdir=cat
;;
*-*-irix5*)
CFLAGS="$CFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS"
MANTYPE='$(CATMAN)'
no_libsocket=1
no_libnsl=1
AC_DEFINE(BROKEN_INET_NTOA)
;;
*-*-irix6*)
CFLAGS="$CFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS"
MANTYPE='$(CATMAN)'
AC_DEFINE(WITH_IRIX_ARRAY)
AC_DEFINE(WITH_IRIX_PROJECT)
AC_DEFINE(WITH_IRIX_AUDIT)
no_libsocket=1
no_libnsl=1
AC_DEFINE(BROKEN_INET_NTOA)
;;
*-*-linux*)
no_dev_ptmx=1
AC_DEFINE(DONT_TRY_OTHER_AF)
AC_DEFINE(PAM_TTY_KLUDGE)
inet6_default_4in6=yes
;;
*-*-netbsd*)
need_dash_r=1
;;
*-next-*)
conf_lastlog_location="/usr/adm/lastlog"
conf_utmp_location=/etc/utmp
conf_wtmp_location=/usr/adm/wtmp
MAIL=/usr/spool/mail
AC_DEFINE(HAVE_NEXT)
CFLAGS="$CFLAGS -I/usr/local/include"
;;
*-*-solaris*)
CFLAGS="$CFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
need_dash_r=1
# hardwire lastlog location (can't detect it on some versions)
conf_lastlog_location="/var/adm/lastlog"
AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
if test "$sol2ver" -ge 8; then
AC_MSG_RESULT(yes)
AC_DEFINE(DISABLE_UTMP)
AC_DEFINE(DISABLE_WTMP)
else
AC_MSG_RESULT(no)
fi
;;
*-*-sunos4*)
CFLAGS="$CFLAGS -DSUNOS4"
AC_CHECK_FUNCS(getpwanam)
conf_utmp_location=/etc/utmp
conf_wtmp_location=/var/adm/wtmp
conf_lastlog_location=/var/adm/lastlog
AC_DEFINE(USE_PIPES)
MANTYPE='$(CATMAN)'
mansubdir=cat
;;
*-sni-sysv*)
CFLAGS="$CFLAGS -I/usr/local/include"
LD