1999-11-11 07:40:23 +08:00
|
|
|
AC_INIT(ssh.c)
|
1999-10-28 11:25:17 +08:00
|
|
|
|
|
|
|
AC_CONFIG_HEADER(config.h)
|
2000-03-15 18:18:10 +08:00
|
|
|
AC_PROG_CC
|
1999-12-21 08:18:08 +08:00
|
|
|
AC_CANONICAL_HOST
|
1999-10-28 11:25:17 +08:00
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Checks for programs.
|
1999-11-11 07:40:23 +08:00
|
|
|
AC_PROG_CPP
|
1999-10-28 11:25:17 +08:00
|
|
|
AC_PROG_RANLIB
|
1999-11-25 09:31:26 +08:00
|
|
|
AC_PROG_INSTALL
|
1999-11-09 07:28:04 +08:00
|
|
|
AC_CHECK_PROG(AR, ar, ar)
|
1999-12-29 07:03:37 +08:00
|
|
|
AC_PATH_PROG(PERL, perl)
|
|
|
|
AC_SUBST(PERL)
|
2000-05-17 19:34:07 +08:00
|
|
|
AC_PATH_PROG(ENT, ent)
|
|
|
|
AC_SUBST(ENT)
|
2000-09-29 20:01:36 +08:00
|
|
|
AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
|
1999-12-25 07:11:29 +08:00
|
|
|
|
2000-08-23 08:46:23 +08:00
|
|
|
# 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
|
|
|
|
|
2000-03-16 07:48:25 +08:00
|
|
|
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
|
|
|
|
|
2000-09-29 20:01:36 +08:00
|
|
|
CFLAGS="$CFLAGS -I. -I${srcdir-.}"
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Check for some target-specific stuff
|
1999-12-21 08:18:08 +08:00
|
|
|
case "$host" in
|
2000-01-07 11:01:41 +08:00
|
|
|
*-*-aix*)
|
|
|
|
AFS_LIBS="-lld"
|
2000-03-14 10:44:01 +08:00
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
2000-06-20 11:25:52 +08:00
|
|
|
if (test "$LD" != "gcc" && test -z "$blibpath"); then
|
2000-03-17 07:54:15 +08:00
|
|
|
blibpath="/usr/lib:/lib:/usr/local/lib"
|
|
|
|
fi
|
2000-05-17 20:00:02 +08:00
|
|
|
AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
|
2000-01-20 19:38:27 +08:00
|
|
|
AC_DEFINE(BROKEN_GETADDRINFO)
|
2000-06-13 06:34:38 +08:00
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
2000-06-04 00:18:19 +08:00
|
|
|
dnl AIX handles lastlog as part of its login message
|
|
|
|
AC_DEFINE(DISABLE_LASTLOG)
|
2000-07-09 21:53:07 +08:00
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
2000-01-07 11:01:41 +08:00
|
|
|
;;
|
2000-09-05 13:13:06 +08:00
|
|
|
*-*-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
|
|
|
|
;;
|
1999-12-21 08:18:08 +08:00
|
|
|
*-*-hpux10*)
|
|
|
|
if test -z "$GCC"; then
|
2000-05-20 13:33:44 +08:00
|
|
|
CFLAGS="$CFLAGS -Ae"
|
1999-12-21 08:18:08 +08:00
|
|
|
fi
|
|
|
|
CFLAGS="$CFLAGS -D_HPUX_SOURCE"
|
2000-08-30 07:03:33 +08:00
|
|
|
IPADDR_IN_DISPLAY=yes
|
2000-08-23 07:10:39 +08:00
|
|
|
AC_DEFINE(USE_PIPES)
|
2000-09-16 12:55:52 +08:00
|
|
|
AC_DEFINE(DISABLE_SHADOW)
|
2000-09-23 10:57:27 +08:00
|
|
|
AC_DEFINE(DISABLE_UTMP)
|
2000-09-16 12:55:52 +08:00
|
|
|
LIBS="$LIBS -lsec"
|
2000-01-22 10:53:11 +08:00
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
1999-12-21 08:18:08 +08:00
|
|
|
;;
|
2000-04-29 22:47:29 +08:00
|
|
|
*-*-hpux11*)
|
|
|
|
CFLAGS="$CFLAGS -D_HPUX_SOURCE"
|
2000-08-30 07:03:33 +08:00
|
|
|
IPADDR_IN_DISPLAY=yes
|
2000-08-30 06:53:24 +08:00
|
|
|
AC_DEFINE(USE_PIPES)
|
2000-09-16 12:55:52 +08:00
|
|
|
AC_DEFINE(DISABLE_SHADOW)
|
2000-09-23 10:57:27 +08:00
|
|
|
AC_DEFINE(DISABLE_UTMP)
|
2000-09-16 12:55:52 +08:00
|
|
|
LIBS="$LIBS -lsec"
|
2000-04-29 22:47:29 +08:00
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
|
|
|
;;
|
1999-12-28 12:09:35 +08:00
|
|
|
*-*-irix5*)
|
2000-03-14 10:44:01 +08:00
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
2000-06-07 19:05:46 +08:00
|
|
|
LDFLAGS="$LDFLAGS"
|
2000-01-22 11:05:37 +08:00
|
|
|
MANTYPE='$(CATMAN)'
|
2000-01-06 09:03:12 +08:00
|
|
|
no_libsocket=1
|
|
|
|
no_libnsl=1
|
2000-08-16 08:35:58 +08:00
|
|
|
AC_DEFINE(BROKEN_INET_NTOA)
|
2000-01-06 09:03:12 +08:00
|
|
|
;;
|
|
|
|
*-*-irix6*)
|
2000-03-14 10:44:01 +08:00
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
2000-06-07 19:05:46 +08:00
|
|
|
LDFLAGS="$LDFLAGS"
|
2000-01-22 11:05:37 +08:00
|
|
|
MANTYPE='$(CATMAN)'
|
2000-06-28 06:22:29 +08:00
|
|
|
AC_DEFINE(WITH_IRIX_ARRAY)
|
|
|
|
AC_DEFINE(WITH_IRIX_PROJECT)
|
|
|
|
AC_DEFINE(WITH_IRIX_AUDIT)
|
1999-12-28 12:09:35 +08:00
|
|
|
no_libsocket=1
|
|
|
|
no_libnsl=1
|
2000-08-16 08:35:58 +08:00
|
|
|
AC_DEFINE(BROKEN_INET_NTOA)
|
1999-12-28 12:09:35 +08:00
|
|
|
;;
|
2000-01-15 11:12:03 +08:00
|
|
|
*-*-linux*)
|
|
|
|
no_dev_ptmx=1
|
2000-03-11 17:45:40 +08:00
|
|
|
AC_DEFINE(DONT_TRY_OTHER_AF)
|
2000-07-09 19:21:52 +08:00
|
|
|
AC_DEFINE(PAM_TTY_KLUDGE)
|
2000-03-11 17:45:40 +08:00
|
|
|
inet6_default_4in6=yes
|
2000-01-15 11:12:03 +08:00
|
|
|
;;
|
2000-01-20 21:18:15 +08:00
|
|
|
*-*-netbsd*)
|
2000-03-02 20:09:20 +08:00
|
|
|
need_dash_r=1
|
2000-01-20 21:18:15 +08:00
|
|
|
;;
|
2000-06-18 13:43:25 +08:00
|
|
|
*-next-*)
|
|
|
|
conf_lastlog_location="/usr/adm/lastlog"
|
2000-08-29 11:30:37 +08:00
|
|
|
conf_utmp_location=/etc/utmp
|
|
|
|
conf_wtmp_location=/usr/adm/wtmp
|
|
|
|
MAIL=/usr/spool/mail
|
2000-06-18 13:43:25 +08:00
|
|
|
AC_DEFINE(HAVE_NEXT)
|
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
;;
|
2000-01-07 11:01:41 +08:00
|
|
|
*-*-solaris*)
|
2000-03-14 10:44:01 +08:00
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
2000-03-16 04:52:29 +08:00
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
|
2000-03-02 20:09:20 +08:00
|
|
|
need_dash_r=1
|
2000-06-03 22:57:40 +08:00
|
|
|
# hardwire lastlog location (can't detect it on some versions)
|
|
|
|
conf_lastlog_location="/var/adm/lastlog"
|
2000-06-09 09:58:35 +08:00
|
|
|
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
|
2000-01-07 11:01:41 +08:00
|
|
|
;;
|
2000-05-20 13:02:59 +08:00
|
|
|
*-*-sunos4*)
|
|
|
|
CFLAGS="$CFLAGS -DSUNOS4"
|
|
|
|
AC_CHECK_FUNCS(getpwanam)
|
2000-08-09 14:34:27 +08:00
|
|
|
conf_utmp_location=/etc/utmp
|
|
|
|
conf_wtmp_location=/var/adm/wtmp
|
|
|
|
conf_lastlog_location=/var/adm/lastlog
|
2000-08-23 07:10:39 +08:00
|
|
|
AC_DEFINE(USE_PIPES)
|
2000-08-09 14:34:27 +08:00
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
2000-05-20 13:02:59 +08:00
|
|
|
;;
|
2000-07-11 07:29:50 +08:00
|
|
|
*-sni-sysv*)
|
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
|
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
AC_DEFINE(IP_TOS_IS_BROKEN)
|
|
|
|
mansubdir=cat
|
2000-07-12 07:18:33 +08:00
|
|
|
LIBS="$LIBS -lgen -lnsl -lucb"
|
2000-07-11 07:29:50 +08:00
|
|
|
;;
|
2000-09-29 20:01:36 +08:00
|
|
|
*-*-sysv4.2*)
|
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
|
|
|
LIBS="$LIBS -lgen -lsocket -lnsl -lresolv"
|
|
|
|
enable_suid_ssh=no
|
|
|
|
;;
|
|
|
|
*-*-sysv5*)
|
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
|
|
|
LIBS="$LIBS -lgen -lsocket"
|
|
|
|
enable_suid_ssh=no
|
|
|
|
;;
|
2000-01-07 11:01:41 +08:00
|
|
|
*-*-sysv*)
|
2000-03-14 10:44:01 +08:00
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
2000-01-26 09:15:30 +08:00
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
2000-01-07 11:01:41 +08:00
|
|
|
LIBS="$LIBS -lgen -lsocket"
|
|
|
|
;;
|
2000-09-29 20:01:36 +08:00
|
|
|
*-*-sco3.2v4*)
|
2000-08-31 06:20:05 +08:00
|
|
|
AC_DEFINE(USE_PIPES)
|
2000-09-29 20:01:36 +08:00
|
|
|
CFLAGS="$CFLAGS -Dftruncate=chsize -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
|
|
|
LIBS="$LIBS -lgen -lsocket -los -lprot -lx"
|
|
|
|
no_dev_ptmx=1
|
|
|
|
RANLIB=true
|
|
|
|
AC_DEFINE(BROKEN_SYS_TERMIO_H)
|
|
|
|
rsh_path="/usr/bin/rcmd"
|
|
|
|
AC_DEFINE(HAVE_SCO_PROTECTED_PW)
|
|
|
|
;;
|
|
|
|
*-*-sco3.2v5*)
|
2000-06-13 16:57:53 +08:00
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
mansubdir=cat
|
2000-09-29 20:01:36 +08:00
|
|
|
LIBS="$LIBS -lgen -lsocket -lprot -lx"
|
2000-06-13 16:57:53 +08:00
|
|
|
no_dev_ptmx=1
|
2000-09-29 20:01:36 +08:00
|
|
|
rsh_path="/usr/bin/rcmd"
|
|
|
|
AC_DEFINE(HAVE_SCO_PROTECTED_PW)
|
2000-06-13 16:57:53 +08:00
|
|
|
;;
|
2000-06-28 13:22:41 +08:00
|
|
|
*-dec-osf*)
|
|
|
|
# This is untested
|
|
|
|
if test ! -z "USE_SIA" ; then
|
|
|
|
AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
|
|
|
|
if test -f /etc/sia/matrix.conf; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_OSF_SIA)
|
|
|
|
AC_DEFINE(DISABLE_LOGIN)
|
|
|
|
LIBS="$LIBS -lsecurity -ldb -lm -laud"
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
1999-12-21 08:18:08 +08:00
|
|
|
esac
|
|
|
|
|
2000-06-05 07:37:43 +08:00
|
|
|
# Allow user to specify flags
|
|
|
|
AC_ARG_WITH(cflags,
|
|
|
|
[ --with-cflags Specify additional flags to pass to compiler],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
CFLAGS="$CFLAGS $withval"
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
AC_ARG_WITH(ldflags,
|
|
|
|
[ --with-ldlags Specify additional flags to pass to linker],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
LDFLAGS="$LDFLAGS $withval"
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
AC_ARG_WITH(libs,
|
|
|
|
[ --with-libs Specify additional libraries to link with],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
LIBS="$LIBS $withval"
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Checks for libraries.
|
1999-11-11 07:40:23 +08:00
|
|
|
AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
|
|
|
|
AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
|
|
|
|
|
1999-12-28 12:09:35 +08:00
|
|
|
if test -z "$no_libsocket" ; then
|
|
|
|
AC_CHECK_LIB(nsl, yp_match, , )
|
|
|
|
fi
|
|
|
|
if test -z "$no_libnsl" ; then
|
|
|
|
AC_CHECK_LIB(socket, main, , )
|
1999-12-26 07:21:48 +08:00
|
|
|
fi
|
1999-11-11 07:40:23 +08:00
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Checks for header files.
|
2000-09-29 20:01:36 +08:00
|
|
|
AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utmp.h utmpx.h)
|
1999-11-11 07:40:23 +08:00
|
|
|
|
2000-08-23 08:46:23 +08:00
|
|
|
dnl Checks for library functions.
|
2000-09-29 20:01:36 +08:00
|
|
|
AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock fchmod freeaddrinfo futimes gai_strerror getaddrinfo getnameinfo getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid setrlimit sigaction sigvec snprintf strerror strlcat strlcpy strsep strtok_r vsnprintf vhangup _getpty __b64_ntop)
|
2000-08-23 08:46:23 +08:00
|
|
|
dnl Checks for time functions
|
2000-06-03 22:57:40 +08:00
|
|
|
AC_CHECK_FUNCS(gettimeofday time)
|
2000-08-23 08:46:23 +08:00
|
|
|
dnl Checks for libutil functions
|
2000-06-03 22:57:40 +08:00
|
|
|
AC_CHECK_FUNCS(login logout updwtmp logwtmp)
|
2000-08-23 08:46:23 +08:00
|
|
|
dnl Checks for utmp functions
|
2000-06-03 22:57:40 +08:00
|
|
|
AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent)
|
|
|
|
AC_CHECK_FUNCS(utmpname)
|
2000-08-23 08:46:23 +08:00
|
|
|
dnl Checks for utmpx functions
|
2000-06-03 22:57:40 +08:00
|
|
|
AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline )
|
|
|
|
AC_CHECK_FUNCS(setutxent utmpxname)
|
1999-11-15 11:36:53 +08:00
|
|
|
|
2000-07-09 21:53:07 +08:00
|
|
|
AC_CHECK_FUNC(getuserattr,
|
|
|
|
[AC_DEFINE(HAVE_GETUSERATTR)],
|
|
|
|
[AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
|
|
|
|
)
|
|
|
|
|
1999-11-19 12:32:34 +08:00
|
|
|
AC_CHECK_FUNC(login,
|
|
|
|
[AC_DEFINE(HAVE_LOGIN)],
|
|
|
|
[AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_CHECK_FUNC(daemon,
|
|
|
|
[AC_DEFINE(HAVE_DAEMON)],
|
|
|
|
[AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
|
|
|
|
)
|
|
|
|
|
2000-03-05 13:22:59 +08:00
|
|
|
AC_CHECK_FUNC(getpagesize,
|
|
|
|
[AC_DEFINE(HAVE_GETPAGESIZE)],
|
|
|
|
[AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
|
|
|
|
)
|
|
|
|
|
2000-07-01 14:52:55 +08:00
|
|
|
# Check for broken snprintf
|
|
|
|
if test "x$ac_cv_func_snprintf" = "xyes" ; then
|
|
|
|
AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
|
|
|
|
AC_TRY_RUN(
|
|
|
|
[
|
|
|
|
#include <stdio.h>
|
|
|
|
int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
|
|
|
|
],
|
|
|
|
[AC_MSG_RESULT(yes)],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_DEFINE(BROKEN_SNPRINTF)
|
|
|
|
AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2000-09-16 12:39:56 +08:00
|
|
|
AC_FUNC_GETPGRP
|
|
|
|
|
2000-06-18 12:07:04 +08:00
|
|
|
PAM_MSG="no"
|
2000-03-02 20:09:20 +08:00
|
|
|
AC_ARG_WITH(pam,
|
|
|
|
[ --without-pam Disable PAM support ],
|
|
|
|
[
|
|
|
|
if test "x$withval" = "xno" ; then
|
|
|
|
no_pam=1
|
|
|
|
AC_DEFINE(DISABLE_PAM)
|
2000-06-18 12:07:04 +08:00
|
|
|
PAM_MSG="disabled"
|
2000-03-02 20:09:20 +08:00
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
2000-06-20 11:25:52 +08:00
|
|
|
if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
|
2000-03-02 20:09:20 +08:00
|
|
|
AC_CHECK_LIB(dl, dlopen, , )
|
|
|
|
LIBS="$LIBS -lpam"
|
|
|
|
|
2000-05-17 20:16:05 +08:00
|
|
|
AC_CHECK_FUNCS(pam_getenvlist)
|
2000-04-29 22:47:29 +08:00
|
|
|
|
2000-06-26 09:31:33 +08:00
|
|
|
disable_shadow=yes
|
|
|
|
|
2000-06-18 12:07:04 +08:00
|
|
|
PAM_MSG="yes"
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Check PAM strerror arguments (old PAM)
|
|
|
|
AC_MSG_CHECKING([whether pam_strerror takes only one argument])
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-04-23 09:14:01 +08:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <security/pam_appl.h>
|
2000-03-02 20:09:20 +08:00
|
|
|
],
|
|
|
|
[(void)pam_strerror((pam_handle_t *)NULL, -1);],
|
|
|
|
[AC_MSG_RESULT(no)],
|
|
|
|
[
|
|
|
|
AC_DEFINE(HAVE_OLD_PAM)
|
|
|
|
AC_MSG_RESULT(yes)
|
2000-06-18 12:07:04 +08:00
|
|
|
PAM_MSG="yes (old library)"
|
2000-03-02 20:09:20 +08:00
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
# The big search for OpenSSL
|
|
|
|
AC_ARG_WITH(ssl-dir,
|
|
|
|
[ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "$xno" ; then
|
|
|
|
tryssldir=$withval
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
saved_LIBS="$LIBS"
|
2000-03-15 07:04:54 +08:00
|
|
|
saved_LDFLAGS="$LDFLAGS"
|
2000-03-02 20:09:20 +08:00
|
|
|
saved_CFLAGS="$CFLAGS"
|
|
|
|
if test "x$prefix" != "xNONE" ; then
|
|
|
|
tryssldir="$tryssldir $prefix"
|
|
|
|
fi
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
|
|
|
|
|
2000-09-16 14:02:16 +08:00
|
|
|
for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
|
2000-05-08 18:49:37 +08:00
|
|
|
if test ! -z "$ssldir" ; then
|
|
|
|
LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
|
|
|
|
CFLAGS="$saved_CFLAGS -I$ssldir/include"
|
|
|
|
if test ! -z "$need_dash_r" ; then
|
|
|
|
LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
LDFLAGS="$saved_LDFLAGS"
|
2000-03-02 20:09:20 +08:00
|
|
|
fi
|
|
|
|
|
2000-05-17 21:29:18 +08:00
|
|
|
LIBS="$saved_LIBS -lcrypto"
|
2000-03-11 08:37:00 +08:00
|
|
|
|
2000-05-17 21:29:18 +08:00
|
|
|
# Basic test to check for compatible version and correct linking
|
|
|
|
# *does not* test for RSA - that comes later.
|
|
|
|
AC_TRY_RUN(
|
|
|
|
[
|
2000-05-01 18:54:17 +08:00
|
|
|
#include <string.h>
|
|
|
|
#include <openssl/rand.h>
|
2000-04-23 09:14:01 +08:00
|
|
|
int main(void)
|
|
|
|
{
|
2000-05-17 21:29:18 +08:00
|
|
|
char a[2048];
|
|
|
|
memset(a, 0, sizeof(a));
|
2000-04-23 09:14:01 +08:00
|
|
|
RAND_add(a, sizeof(a), sizeof(a));
|
2000-05-17 21:29:18 +08:00
|
|
|
return(RAND_status() <= 0);
|
2000-04-23 09:14:01 +08:00
|
|
|
}
|
2000-05-17 21:29:18 +08:00
|
|
|
],
|
|
|
|
[
|
|
|
|
found_crypto=1
|
|
|
|
break;
|
|
|
|
], []
|
|
|
|
)
|
2000-05-08 18:49:37 +08:00
|
|
|
|
|
|
|
if test ! -z "$found_crypto" ; then
|
|
|
|
break;
|
|
|
|
fi
|
2000-03-11 08:37:00 +08:00
|
|
|
done
|
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
if test -z "$found_crypto" ; then
|
|
|
|
AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
|
|
|
|
fi
|
|
|
|
if test -z "$ssldir" ; then
|
|
|
|
ssldir="(system)"
|
2000-03-11 08:37:00 +08:00
|
|
|
fi
|
2000-03-02 20:09:20 +08:00
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
ac_cv_openssldir=$ssldir
|
|
|
|
])
|
|
|
|
|
2000-06-20 11:25:52 +08:00
|
|
|
if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_DEFINE(HAVE_OPENSSL)
|
|
|
|
dnl Need to recover ssldir - test above runs in subshell
|
|
|
|
ssldir=$ac_cv_openssldir
|
2000-03-15 07:04:54 +08:00
|
|
|
CFLAGS="$saved_CFLAGS -I$ssldir/include"
|
|
|
|
LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
|
|
|
|
if test ! -z "$need_dash_r" ; then
|
|
|
|
LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
|
2000-03-02 20:09:20 +08:00
|
|
|
fi
|
2000-03-17 07:54:15 +08:00
|
|
|
if test ! -z "$blibpath" ; then
|
|
|
|
blibpath="$blibpath:$ssldir:$ssldir/lib"
|
|
|
|
fi
|
2000-03-02 20:09:20 +08:00
|
|
|
fi
|
2000-05-17 21:29:18 +08:00
|
|
|
LIBS="$saved_LIBS -lcrypto"
|
|
|
|
|
|
|
|
# Now test RSA support
|
|
|
|
saved_LIBS="$LIBS"
|
|
|
|
AC_MSG_CHECKING([for RSA support])
|
|
|
|
for WANTS_RSAREF in "" 1 ; do
|
|
|
|
if test -z "$WANTS_RSAREF" ; then
|
|
|
|
LIBS="$saved_LIBS"
|
|
|
|
else
|
|
|
|
LIBS="$saved_LIBS -lRSAglue -lrsaref"
|
|
|
|
fi
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <string.h>
|
|
|
|
#include <openssl/rand.h>
|
|
|
|
#include <openssl/rsa.h>
|
|
|
|
#include <openssl/bn.h>
|
|
|
|
#include <openssl/sha.h>
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
int num; RSA *key; static unsigned char p_in[] = "blahblah";
|
|
|
|
unsigned char c[256], p[256];
|
|
|
|
memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
|
|
|
|
if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
|
|
|
|
num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
|
|
|
|
return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
rsa_works=1
|
|
|
|
break;
|
|
|
|
], [])
|
|
|
|
done
|
|
|
|
|
|
|
|
if test ! -z "$no_rsa" ; then
|
|
|
|
AC_MSG_RESULT(disabled)
|
2000-06-18 12:07:04 +08:00
|
|
|
RSA_MSG="disabled"
|
2000-03-15 07:04:54 +08:00
|
|
|
else
|
2000-05-17 21:29:18 +08:00
|
|
|
if test -z "$rsa_works" ; then
|
|
|
|
AC_MSG_WARN([*** No RSA support found *** ])
|
2000-06-18 12:07:04 +08:00
|
|
|
RSA_MSG="no"
|
2000-05-17 21:29:18 +08:00
|
|
|
else
|
|
|
|
if test -z "$WANTS_RSAREF" ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
2000-06-18 12:07:04 +08:00
|
|
|
RSA_MSG="yes"
|
2000-05-17 21:29:18 +08:00
|
|
|
else
|
2000-06-18 12:07:04 +08:00
|
|
|
RSA_MSG="yes (using RSAref)"
|
2000-05-17 21:29:18 +08:00
|
|
|
AC_MSG_RESULT(using RSAref)
|
|
|
|
LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
|
|
|
|
fi
|
|
|
|
fi
|
2000-03-11 08:37:00 +08:00
|
|
|
fi
|
2000-05-08 18:49:37 +08:00
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Checks for data types
|
2000-01-18 06:12:06 +08:00
|
|
|
AC_CHECK_SIZEOF(char, 1)
|
1999-11-20 09:18:40 +08:00
|
|
|
AC_CHECK_SIZEOF(short int, 2)
|
|
|
|
AC_CHECK_SIZEOF(int, 4)
|
|
|
|
AC_CHECK_SIZEOF(long int, 4)
|
|
|
|
AC_CHECK_SIZEOF(long long int, 8)
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# More checks for data types
|
2000-08-29 08:33:50 +08:00
|
|
|
AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[ #include <sys/types.h> ],
|
|
|
|
[ u_int a; a = 1;],
|
|
|
|
[ ac_cv_have_u_int="yes" ],
|
|
|
|
[ ac_cv_have_u_int="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_u_int" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_U_INT)
|
|
|
|
have_u_int=1
|
|
|
|
fi
|
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[ #include <sys/types.h> ],
|
|
|
|
[ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
|
|
|
|
[ ac_cv_have_intxx_t="yes" ],
|
|
|
|
[ ac_cv_have_intxx_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_intxx_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_INTXX_T)
|
|
|
|
have_intxx_t=1
|
|
|
|
fi
|
|
|
|
|
2000-09-23 11:12:24 +08:00
|
|
|
AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[ #include <sys/types.h> ],
|
|
|
|
[ int64_t a; a = 1;],
|
|
|
|
[ ac_cv_have_int64_t="yes" ],
|
|
|
|
[ ac_cv_have_int64_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_int64_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_INT64_T)
|
|
|
|
have_int64_t=1
|
|
|
|
fi
|
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[ #include <sys/types.h> ],
|
|
|
|
[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
|
|
|
|
[ ac_cv_have_u_intxx_t="yes" ],
|
|
|
|
[ ac_cv_have_u_intxx_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_U_INTXX_T)
|
|
|
|
have_u_intxx_t=1
|
|
|
|
fi
|
1999-11-20 09:18:40 +08:00
|
|
|
|
2000-09-23 11:12:24 +08:00
|
|
|
AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[ #include <sys/types.h> ],
|
|
|
|
[ u_int64_t a; a = 1;],
|
|
|
|
[ ac_cv_have_u_int64_t="yes" ],
|
|
|
|
[ ac_cv_have_u_int64_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_U_INT64_T)
|
|
|
|
have_u_int64_t=1
|
|
|
|
fi
|
|
|
|
|
2000-06-20 11:25:52 +08:00
|
|
|
if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
|
|
|
|
test "x$ac_cv_header_sys_bitypes_h" = "xyes")
|
2000-01-15 11:12:03 +08:00
|
|
|
then
|
|
|
|
AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
|
|
|
|
AC_TRY_COMPILE(
|
2000-05-08 18:49:37 +08:00
|
|
|
[
|
|
|
|
#include <sys/bitypes.h>
|
|
|
|
],
|
2000-01-15 11:12:03 +08:00
|
|
|
[
|
2000-04-03 13:57:06 +08:00
|
|
|
int8_t a; int16_t b; int32_t c;
|
|
|
|
u_int8_t e; u_int16_t f; u_int32_t g;
|
|
|
|
a = b = c = e = f = g = 1;
|
2000-01-15 11:12:03 +08:00
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_DEFINE(HAVE_U_INTXX_T)
|
|
|
|
AC_DEFINE(HAVE_INTXX_T)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
],
|
|
|
|
[AC_MSG_RESULT(no)]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2000-03-17 20:26:46 +08:00
|
|
|
if test -z "$have_u_intxx_t" ; then
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
],
|
|
|
|
[ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
|
|
|
|
[ ac_cv_have_uintxx_t="yes" ],
|
|
|
|
[ ac_cv_have_uintxx_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_UINTXX_T)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
|
2000-03-17 20:26:46 +08:00
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-05-08 18:49:37 +08:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2000-03-17 20:26:46 +08:00
|
|
|
],
|
2000-05-08 18:49:37 +08:00
|
|
|
[socklen_t foo; foo = 1235;],
|
|
|
|
[ ac_cv_have_socklen_t="yes" ],
|
|
|
|
[ ac_cv_have_socklen_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_socklen_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_SOCKLEN_T)
|
2000-03-17 20:26:46 +08:00
|
|
|
fi
|
1999-11-20 09:18:40 +08:00
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-04-23 09:14:01 +08:00
|
|
|
#include <sys/types.h>
|
2000-05-08 18:49:37 +08:00
|
|
|
],
|
|
|
|
[ size_t foo; foo = 1235; ],
|
|
|
|
[ ac_cv_have_size_t="yes" ],
|
|
|
|
[ ac_cv_have_size_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_size_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_SIZE_T)
|
|
|
|
fi
|
1999-12-28 23:24:35 +08:00
|
|
|
|
2000-05-17 20:53:33 +08:00
|
|
|
AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
],
|
|
|
|
[ ssize_t foo; foo = 1235; ],
|
|
|
|
[ ac_cv_have_ssize_t="yes" ],
|
|
|
|
[ ac_cv_have_ssize_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_ssize_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_SSIZE_T)
|
|
|
|
fi
|
|
|
|
|
2000-06-23 06:23:34 +08:00
|
|
|
AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
],
|
|
|
|
[ sa_family_t foo; foo = 1235; ],
|
|
|
|
[ ac_cv_have_sa_family_t="yes" ],
|
2000-09-29 20:01:36 +08:00
|
|
|
[ AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
],
|
|
|
|
[ sa_family_t foo; foo = 1235; ],
|
|
|
|
[ ac_cv_have_sa_family_t="yes" ],
|
|
|
|
|
2000-06-23 06:23:34 +08:00
|
|
|
[ ac_cv_have_sa_family_t="no" ]
|
2000-09-29 20:01:36 +08:00
|
|
|
)]
|
2000-06-23 06:23:34 +08:00
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_SA_FAMILY_T)
|
|
|
|
fi
|
|
|
|
|
2000-06-18 13:43:25 +08:00
|
|
|
AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
],
|
|
|
|
[ pid_t foo; foo = 1235; ],
|
|
|
|
[ ac_cv_have_pid_t="yes" ],
|
|
|
|
[ ac_cv_have_pid_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_pid_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_PID_T)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
],
|
|
|
|
[ mode_t foo; foo = 1235; ],
|
|
|
|
[ ac_cv_have_mode_t="yes" ],
|
|
|
|
[ ac_cv_have_mode_t="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_mode_t" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_MODE_T)
|
|
|
|
fi
|
|
|
|
|
1999-12-29 07:36:45 +08:00
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-04-23 09:14:01 +08:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2000-05-08 18:49:37 +08:00
|
|
|
],
|
|
|
|
[ struct sockaddr_storage s; ],
|
|
|
|
[ ac_cv_have_struct_sockaddr_storage="yes" ],
|
|
|
|
[ ac_cv_have_struct_sockaddr_storage="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
|
|
|
|
fi
|
2000-01-14 12:45:46 +08:00
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-06-18 12:07:04 +08:00
|
|
|
#include <sys/types.h>
|
2000-05-08 18:49:37 +08:00
|
|
|
#include <netinet/in.h>
|
|
|
|
],
|
|
|
|
[ struct sockaddr_in6 s; s.sin6_family = 0; ],
|
|
|
|
[ ac_cv_have_struct_sockaddr_in6="yes" ],
|
|
|
|
[ ac_cv_have_struct_sockaddr_in6="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
|
|
|
|
fi
|
2000-01-14 12:45:46 +08:00
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-06-18 12:07:04 +08:00
|
|
|
#include <sys/types.h>
|
2000-05-08 18:49:37 +08:00
|
|
|
#include <netinet/in.h>
|
|
|
|
],
|
|
|
|
[ struct in6_addr s; s.s6_addr[0] = 0; ],
|
|
|
|
[ ac_cv_have_struct_in6_addr="yes" ],
|
|
|
|
[ ac_cv_have_struct_in6_addr="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
|
|
|
|
fi
|
2000-01-14 12:45:46 +08:00
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-04-23 09:14:01 +08:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netdb.h>
|
2000-05-08 18:49:37 +08:00
|
|
|
],
|
|
|
|
[ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
|
|
|
|
[ ac_cv_have_struct_addrinfo="yes" ],
|
|
|
|
[ ac_cv_have_struct_addrinfo="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_STRUCT_ADDRINFO)
|
|
|
|
fi
|
|
|
|
|
2000-09-29 20:01:36 +08:00
|
|
|
dnl Checks for structure members
|
2000-05-08 18:49:37 +08:00
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
|
2000-05-20 12:53:09 +08:00
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
|
2000-05-08 18:49:37 +08:00
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
|
2000-07-01 11:17:42 +08:00
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
|
2000-05-08 18:49:37 +08:00
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
|
2000-06-03 22:57:40 +08:00
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
|
|
|
|
OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
|
2000-09-29 20:01:36 +08:00
|
|
|
AC_STRUCT_ST_BLKSIZE
|
2000-06-03 22:57:40 +08:00
|
|
|
|
2000-08-18 11:59:06 +08:00
|
|
|
AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
|
|
|
|
ac_cv_have_sun_len_in_struct_sockaddr_un, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
],
|
|
|
|
[ struct sockaddr_un s; s.sun_len = 1; ],
|
|
|
|
[ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
|
|
|
|
[ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
|
|
|
|
fi
|
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
|
|
|
|
ac_cv_have_ss_family_in_struct_ss, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-04-23 09:14:01 +08:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2000-05-08 18:49:37 +08:00
|
|
|
],
|
|
|
|
[ struct sockaddr_storage s; s.ss_family = 1; ],
|
|
|
|
[ ac_cv_have_ss_family_in_struct_ss="yes" ],
|
|
|
|
[ ac_cv_have_ss_family_in_struct_ss="no" ],
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
|
|
|
|
ac_cv_have___ss_family_in_struct_ss, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
2000-04-23 09:14:01 +08:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2000-05-08 18:49:37 +08:00
|
|
|
],
|
|
|
|
[ struct sockaddr_storage s; s.__ss_family = 1; ],
|
|
|
|
[ ac_cv_have___ss_family_in_struct_ss="yes" ],
|
|
|
|
[ ac_cv_have___ss_family_in_struct_ss="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
|
|
|
|
fi
|
|
|
|
|
2000-08-23 08:46:23 +08:00
|
|
|
AC_CACHE_CHECK([for pw_class field in struct passwd],
|
|
|
|
ac_cv_have_pw_class_in_struct_passwd, [
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <pwd.h>
|
|
|
|
],
|
|
|
|
[ struct passwd p s; p.pw_class = NULL; ],
|
|
|
|
[ ac_cv_have_pw_class_in_struct_passwd="yes" ],
|
|
|
|
[ ac_cv_have_pw_class_in_struct_passwd="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
|
|
|
|
fi
|
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
|
|
|
|
AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
|
|
|
|
AC_TRY_LINK([],
|
|
|
|
[ extern char *__progname; printf("%s", __progname); ],
|
|
|
|
[ ac_cv_libc_defines___progname="yes" ],
|
|
|
|
[ ac_cv_libc_defines___progname="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE___PROGNAME)
|
|
|
|
fi
|
1999-12-09 07:16:54 +08:00
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
|
2000-07-15 12:59:14 +08:00
|
|
|
AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
|
|
|
|
AC_TRY_LINK([],
|
|
|
|
[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
|
|
|
|
[ ac_cv_libc_defines_sys_errlist="yes" ],
|
|
|
|
[ ac_cv_libc_defines_sys_errlist="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_SYS_ERRLIST)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2000-08-16 08:35:58 +08:00
|
|
|
AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
|
|
|
|
AC_TRY_LINK([],
|
|
|
|
[ extern int sys_nerr; printf("%i", sys_nerr);],
|
|
|
|
[ ac_cv_libc_defines_sys_nerr="yes" ],
|
|
|
|
[ ac_cv_libc_defines_sys_nerr="no" ]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_SYS_NERR)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Looking for programs, paths and files
|
|
|
|
AC_ARG_WITH(rsh,
|
|
|
|
[ --with-rsh=PATH Specify path to remote shell program ],
|
|
|
|
[
|
2000-03-11 08:37:00 +08:00
|
|
|
if test "x$withval" != "$no" ; then
|
2000-07-08 08:17:40 +08:00
|
|
|
rsh_path=$withval
|
2000-03-02 20:09:20 +08:00
|
|
|
fi
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_PATH_PROG(rsh_path, rsh)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_WITH(xauth,
|
|
|
|
[ --with-xauth=PATH Specify path to xauth program ],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "$xno" ; then
|
2000-06-18 12:07:04 +08:00
|
|
|
xauth_path=$withval
|
2000-03-02 20:09:20 +08:00
|
|
|
fi
|
|
|
|
],
|
|
|
|
[
|
2000-09-29 20:01:36 +08:00
|
|
|
AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
|
2000-06-20 11:25:52 +08:00
|
|
|
if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
|
2000-03-02 20:09:20 +08:00
|
|
|
xauth_path="/usr/openwin/bin/xauth"
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
if test ! -z "$xauth_path" ; then
|
|
|
|
AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
|
|
|
|
fi
|
|
|
|
if test ! -z "$rsh_path" ; then
|
|
|
|
AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check for mail directory (last resort if we cannot get it from headers)
|
|
|
|
if test ! -z "$MAIL" ; then
|
|
|
|
maildir=`dirname $MAIL`
|
|
|
|
AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$no_dev_ptmx" ; then
|
2000-03-02 20:56:12 +08:00
|
|
|
AC_CHECK_FILE("/dev/ptmx",
|
|
|
|
[
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
|
|
|
|
have_dev_ptmx=1
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
AC_CHECK_FILE("/dev/ptc",
|
|
|
|
[
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
|
|
|
|
have_dev_ptc=1
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Options from here on. Some of these are preset by platform above
|
|
|
|
|
|
|
|
# Check for user-specified random device, otherwise check /dev/urandom
|
|
|
|
AC_ARG_WITH(random,
|
|
|
|
[ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
|
|
|
|
[
|
2000-04-03 12:50:43 +08:00
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
RANDOM_POOL="$withval";
|
|
|
|
AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
|
|
|
|
fi
|
2000-03-02 20:09:20 +08:00
|
|
|
],
|
|
|
|
[
|
|
|
|
# Check for random device
|
|
|
|
AC_CHECK_FILE("/dev/urandom",
|
|
|
|
[
|
|
|
|
RANDOM_POOL="/dev/urandom";
|
|
|
|
AC_SUBST(RANDOM_POOL)
|
|
|
|
AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
# Check for EGD pool file
|
|
|
|
AC_ARG_WITH(egd-pool,
|
|
|
|
[ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
|
|
|
|
[
|
2000-04-03 12:50:43 +08:00
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
EGD_SOCKET="$withval";
|
|
|
|
AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
|
|
|
|
fi
|
2000-03-02 20:09:20 +08:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-05-02 07:56:41 +08:00
|
|
|
# detect pathnames for entropy gathering commands, if we need them
|
|
|
|
INSTALL_SSH_PRNG_CMDS=""
|
|
|
|
rm -f prng_commands
|
2000-06-20 11:25:52 +08:00
|
|
|
if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
|
2000-04-08 16:23:30 +08:00
|
|
|
# Use these commands to collect entropy
|
2000-05-08 18:49:37 +08:00
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_W, w)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
|
|
|
|
OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
|
2000-05-02 07:56:41 +08:00
|
|
|
|
|
|
|
INSTALL_SSH_PRNG_CMDS="yes"
|
2000-04-08 16:23:30 +08:00
|
|
|
fi
|
2000-05-02 07:56:41 +08:00
|
|
|
AC_SUBST(INSTALL_SSH_PRNG_CMDS)
|
|
|
|
|
2000-04-08 16:23:30 +08:00
|
|
|
|
2000-01-22 10:53:11 +08:00
|
|
|
AC_ARG_WITH(catman,
|
|
|
|
[ --with-catman=man|cat Install preformatted manpages[no]],
|
|
|
|
[
|
|
|
|
MANTYPE='$(CATMAN)'
|
|
|
|
if test x"$withval" != x"yes" ; then
|
|
|
|
mansubdir=$withval
|
|
|
|
else
|
|
|
|
mansubdir=cat
|
|
|
|
fi
|
|
|
|
], [
|
|
|
|
if test -z "$MANTYPE" ; then
|
|
|
|
MANTYPE='$(TROFFMAN)'
|
|
|
|
mansubdir=man
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
AC_SUBST(MANTYPE)
|
|
|
|
AC_SUBST(mansubdir)
|
1999-12-30 12:50:54 +08:00
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Check whether user wants Kerberos support
|
2000-06-18 12:07:04 +08:00
|
|
|
KRB4_MSG="no"
|
1999-11-19 10:03:25 +08:00
|
|
|
AC_ARG_WITH(kerberos4,
|
2000-01-07 05:45:55 +08:00
|
|
|
[ --with-kerberos4=PATH Enable Kerberos 4 support],
|
1999-11-19 10:03:25 +08:00
|
|
|
[
|
2000-03-11 08:37:00 +08:00
|
|
|
if test "x$withval" != "xno" ; then
|
2000-01-07 05:45:55 +08:00
|
|
|
|
|
|
|
if test "x$withval" != "$xyes" ; then
|
|
|
|
CFLAGS="$CFLAGS -I${withval}/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L${withval}/lib"
|
2000-03-17 07:54:15 +08:00
|
|
|
if test ! -z "$need_dash_r" ; then
|
|
|
|
LDFLAGS="$LDFLAGS -R${withval}/lib"
|
|
|
|
fi
|
|
|
|
if test ! -z "$blibpath" ; then
|
|
|
|
blibpath="$blibpath:${withval}/lib"
|
|
|
|
fi
|
2000-01-07 05:45:55 +08:00
|
|
|
else
|
|
|
|
if test -d /usr/include/kerberosIV ; then
|
|
|
|
CFLAGS="$CFLAGS -I/usr/include/kerberosIV"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(krb.h)
|
|
|
|
AC_CHECK_LIB(krb, main)
|
|
|
|
if test "$ac_cv_header_krb_h" != yes; then
|
|
|
|
AC_MSG_WARN([Cannot find krb.h, build may fail])
|
|
|
|
fi
|
|
|
|
if test "$ac_cv_lib_krb_main" != yes; then
|
|
|
|
AC_MSG_WARN([Cannot find libkrb, build may fail])
|
|
|
|
fi
|
|
|
|
|
2000-01-29 07:20:21 +08:00
|
|
|
KLIBS="-lkrb -ldes"
|
2000-01-07 05:45:55 +08:00
|
|
|
AC_CHECK_LIB(resolv, dn_expand, , )
|
|
|
|
KRB4=yes
|
2000-06-18 12:07:04 +08:00
|
|
|
KRB4_MSG="yes"
|
1999-12-30 12:50:54 +08:00
|
|
|
AC_DEFINE(KRB4)
|
|
|
|
fi
|
1999-11-19 10:03:25 +08:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Check whether user wants AFS support
|
2000-06-18 12:07:04 +08:00
|
|
|
AFS_MSG="no"
|
1999-11-20 09:18:40 +08:00
|
|
|
AC_ARG_WITH(afs,
|
2000-01-07 05:45:55 +08:00
|
|
|
[ --with-afs=PATH Enable AFS support],
|
1999-11-19 10:03:25 +08:00
|
|
|
[
|
2000-03-11 08:37:00 +08:00
|
|
|
if test "x$withval" != "xno" ; then
|
2000-01-07 05:45:55 +08:00
|
|
|
|
|
|
|
if test "x$withval" != "$xyes" ; then
|
|
|
|
CFLAGS="$CFLAGS -I${withval}/include"
|
|
|
|
LFLAGS="$LFLAGS -L${withval}/lib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$KRB4" ; then
|
|
|
|
AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
|
|
|
|
fi
|
|
|
|
|
1999-12-30 12:50:54 +08:00
|
|
|
LIBS="$LIBS -lkafs"
|
2000-01-07 05:45:55 +08:00
|
|
|
if test ! -z "$AFS_LIBS" ; then
|
|
|
|
LIBS="$LIBS $AFS_LIBS"
|
|
|
|
fi
|
|
|
|
AC_DEFINE(AFS)
|
2000-06-18 12:07:04 +08:00
|
|
|
AFS_MSG="yes"
|
1999-12-30 12:50:54 +08:00
|
|
|
fi
|
1999-11-19 10:03:25 +08:00
|
|
|
]
|
|
|
|
)
|
2000-01-29 07:20:21 +08:00
|
|
|
LIBS="$LIBS $KLIBS"
|
1999-11-19 10:03:25 +08:00
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Check whether user wants S/Key support
|
2000-06-18 12:07:04 +08:00
|
|
|
SKEY_MSG="no"
|
1999-11-19 10:03:25 +08:00
|
|
|
AC_ARG_WITH(skey,
|
|
|
|
[ --with-skey Enable S/Key support],
|
|
|
|
[
|
2000-03-11 08:37:00 +08:00
|
|
|
if test "x$withval" != "xno" ; then
|
1999-12-30 12:50:54 +08:00
|
|
|
AC_DEFINE(SKEY)
|
|
|
|
LIBS="$LIBS -lskey"
|
2000-06-18 12:07:04 +08:00
|
|
|
SKEY_MSG="yes"
|
1999-12-30 12:50:54 +08:00
|
|
|
fi
|
1999-11-19 10:03:25 +08:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Check whether user wants TCP wrappers support
|
2000-06-18 12:07:04 +08:00
|
|
|
TCPW_MSG="no"
|
1999-11-22 19:31:49 +08:00
|
|
|
AC_ARG_WITH(tcp-wrappers,
|
1999-11-19 10:03:25 +08:00
|
|
|
[ --with-tcp-wrappers Enable tcpwrappers support],
|
|
|
|
[
|
2000-03-11 08:37:00 +08:00
|
|
|
if test "x$withval" != "xno" ; then
|
2000-03-05 14:02:45 +08:00
|
|
|
saved_LIBS="$LIBS"
|
2000-01-07 05:45:55 +08:00
|
|
|
LIBS="$LIBS -lwrap"
|
2000-03-05 14:02:45 +08:00
|
|
|
AC_MSG_CHECKING(for libwrap)
|
|
|
|
AC_TRY_LINK(
|
|
|
|
[
|
2000-04-23 09:14:01 +08:00
|
|
|
#include <tcpd.h>
|
2000-03-05 14:02:45 +08:00
|
|
|
int deny_severity = 0, allow_severity = 0;
|
|
|
|
],
|
|
|
|
[hosts_access(0);],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(LIBWRAP)
|
2000-06-18 12:07:04 +08:00
|
|
|
TCPW_MSG="yes"
|
2000-03-05 14:02:45 +08:00
|
|
|
],
|
|
|
|
[
|
2000-06-18 12:07:04 +08:00
|
|
|
AC_MSG_ERROR([*** libwrap missing])
|
2000-03-05 14:02:45 +08:00
|
|
|
]
|
|
|
|
)
|
1999-12-30 12:50:54 +08:00
|
|
|
fi
|
1999-11-19 10:03:25 +08:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Check whether to enable MD5 passwords
|
2000-06-18 12:07:04 +08:00
|
|
|
MD5_MSG="no"
|
1999-11-22 19:31:49 +08:00
|
|
|
AC_ARG_WITH(md5-passwords,
|
1999-11-19 12:53:20 +08:00
|
|
|
[ --with-md5-passwords Enable use of MD5 passwords],
|
1999-12-30 12:50:54 +08:00
|
|
|
[
|
2000-03-11 08:37:00 +08:00
|
|
|
if test "x$withval" != "xno" ; then
|
1999-12-30 12:50:54 +08:00
|
|
|
AC_DEFINE(HAVE_MD5_PASSWORDS)
|
2000-06-18 12:07:04 +08:00
|
|
|
MD5_MSG="yes"
|
1999-12-30 12:50:54 +08:00
|
|
|
fi
|
|
|
|
]
|
1999-11-19 12:53:20 +08:00
|
|
|
)
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Whether to disable shadow password support
|
1999-12-21 08:18:08 +08:00
|
|
|
AC_ARG_WITH(shadow,
|
|
|
|
[ --without-shadow Disable shadow password support],
|
|
|
|
[
|
|
|
|
if test "x$withval" = "xno" ; then
|
|
|
|
AC_DEFINE(DISABLE_SHADOW)
|
2000-06-26 09:31:33 +08:00
|
|
|
disable_shadow=yes
|
1999-12-21 08:18:08 +08:00
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-06-26 09:31:33 +08:00
|
|
|
if test -z "$disable_shadow" ; then
|
|
|
|
AC_MSG_CHECKING([if the systems has expire shadow information])
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <shadow.h>
|
|
|
|
struct spwd sp;
|
|
|
|
],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
|
|
|
|
[ sp_expire_available=yes ], []
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x$sp_expire_available" = "xyes" ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAS_SHADOW_EXPIRE)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Use ip address instead of hostname in $DISPLAY
|
2000-08-30 07:03:33 +08:00
|
|
|
if test ! -z "$IPADDR_IN_DISPLAY" ; then
|
|
|
|
DISPLAY_HACK_MSG="yes"
|
|
|
|
AC_DEFINE(IPADDR_IN_DISPLAY)
|
|
|
|
else
|
|
|
|
DISPLAY_HACK_MSG="no"
|
|
|
|
AC_ARG_WITH(ipaddr-display,
|
|
|
|
[ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
AC_DEFINE(IPADDR_IN_DISPLAY)
|
|
|
|
DISPLAY_HACK_MSG="yes"
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
1999-12-21 08:18:08 +08:00
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Whether to mess with the default path
|
2000-06-18 12:07:04 +08:00
|
|
|
SERVER_PATH_MSG="(default)"
|
1999-12-31 06:49:44 +08:00
|
|
|
AC_ARG_WITH(default-path,
|
1999-12-27 06:48:56 +08:00
|
|
|
[ --with-default-path=PATH Specify default \$PATH environment for server],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
2000-09-29 20:01:36 +08:00
|
|
|
user_path="$withval"
|
2000-06-18 12:07:04 +08:00
|
|
|
SERVER_PATH_MSG="$withval"
|
1999-12-27 06:48:56 +08:00
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Whether to force IPv4 by default (needed on broken glibc Linux)
|
2000-06-18 12:07:04 +08:00
|
|
|
IPV4_HACK_MSG="no"
|
2000-01-19 11:36:49 +08:00
|
|
|
AC_ARG_WITH(ipv4-default,
|
|
|
|
[ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
AC_DEFINE(IPV4_DEFAULT)
|
2000-06-18 12:07:04 +08:00
|
|
|
IPV4_HACK_MSG="yes"
|
2000-01-19 11:36:49 +08:00
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-05-08 18:49:37 +08:00
|
|
|
AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
|
2000-06-18 12:07:04 +08:00
|
|
|
IPV4_IN6_HACK_MSG="no"
|
2000-03-11 17:45:40 +08:00
|
|
|
AC_ARG_WITH(4in6,
|
|
|
|
[ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(IPV4_IN_IPV6)
|
2000-06-18 12:07:04 +08:00
|
|
|
IPV4_IN6_HACK_MSG="yes"
|
2000-03-11 17:45:40 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
if test "x$inet6_default_4in6" = "xyes"; then
|
|
|
|
AC_MSG_RESULT([yes (default)])
|
|
|
|
AC_DEFINE(IPV4_IN_IPV6)
|
2000-06-18 12:07:04 +08:00
|
|
|
IPV4_IN6_HACK_MSG="yes"
|
2000-03-11 17:45:40 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no (default)])
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2000-09-29 20:01:36 +08:00
|
|
|
AC_MSG_CHECKING(whether to install ssh as suid root)
|
|
|
|
AC_ARG_ENABLE(suid-ssh,
|
|
|
|
[ --enable-suid-ssh Install ssh as suid root (default)
|
|
|
|
--disable-suid-ssh Install ssh without suid bit],
|
|
|
|
[ case "$enableval" in
|
|
|
|
no)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
SSHMODE=0711
|
|
|
|
;;
|
|
|
|
*) AC_MSG_RESULT(yes)
|
|
|
|
SSHMODE=04711
|
|
|
|
;;
|
|
|
|
esac ],
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
SSHMODE=04711
|
|
|
|
)
|
|
|
|
AC_SUBST(SSHMODE)
|
|
|
|
|
|
|
|
|
2000-03-02 20:09:20 +08:00
|
|
|
# Where to place sshd.pid
|
2000-01-17 19:02:17 +08:00
|
|
|
piddir=/var/run
|
2000-01-16 09:05:18 +08:00
|
|
|
AC_ARG_WITH(pid-dir,
|
|
|
|
[ --with-pid-dir=PATH Specify location of ssh.pid file],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
2000-01-17 19:02:17 +08:00
|
|
|
piddir=$withval
|
2000-01-16 09:05:18 +08:00
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
2000-04-30 07:30:44 +08:00
|
|
|
|
2000-09-29 20:01:36 +08:00
|
|
|
# make sure the directory exists
|
|
|
|
if test ! -d $piddir ; then
|
|
|
|
piddir=`eval echo ${sysconfdir}`
|
|
|
|
case $piddir in
|
|
|
|
NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2000-01-18 05:57:14 +08:00
|
|
|
AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
|
2000-01-17 19:02:17 +08:00
|
|
|
AC_SUBST(piddir)
|
2000-01-16 09:05:18 +08:00
|
|
|
|
2000-06-03 22:57:40 +08:00
|
|
|
dnl allow user to disable some login recording features
|
|
|
|
AC_ARG_ENABLE(lastlog,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --disable-lastlog disable use of lastlog even if detected [no]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ AC_DEFINE(DISABLE_LASTLOG) ]
|
|
|
|
)
|
|
|
|
AC_ARG_ENABLE(utmp,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --disable-utmp disable use of utmp even if detected [no]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ AC_DEFINE(DISABLE_UTMP) ]
|
|
|
|
)
|
|
|
|
AC_ARG_ENABLE(utmpx,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --disable-utmpx disable use of utmpx even if detected [no]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ AC_DEFINE(DISABLE_UTMPX) ]
|
|
|
|
)
|
|
|
|
AC_ARG_ENABLE(wtmp,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --disable-wtmp disable use of wtmp even if detected [no]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ AC_DEFINE(DISABLE_WTMP) ]
|
|
|
|
)
|
|
|
|
AC_ARG_ENABLE(wtmpx,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --disable-wtmpx disable use of wtmpx even if detected [no]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ AC_DEFINE(DISABLE_WTMPX) ]
|
|
|
|
)
|
|
|
|
AC_ARG_ENABLE(libutil,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --disable-libutil disable use of libutil (login() etc.) [no]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ AC_DEFINE(DISABLE_LOGIN) ]
|
|
|
|
)
|
|
|
|
AC_ARG_ENABLE(pututline,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ AC_DEFINE(DISABLE_PUTUTLINE) ]
|
|
|
|
)
|
|
|
|
AC_ARG_ENABLE(pututxline,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ AC_DEFINE(DISABLE_PUTUTXLINE) ]
|
|
|
|
)
|
|
|
|
AC_ARG_WITH(lastlog,
|
2000-06-19 16:23:46 +08:00
|
|
|
[ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
|
2000-06-03 22:57:40 +08:00
|
|
|
[ conf_lastlog_location="$withval"; ],)
|
|
|
|
|
|
|
|
dnl lastlog, [uw]tmpx? detection
|
|
|
|
dnl NOTE: set the paths in the platform section to avoid the
|
|
|
|
dnl need for command-line parameters
|
|
|
|
dnl lastlog and [uw]tmp are subject to a file search if all else fails
|
|
|
|
|
|
|
|
dnl lastlog detection
|
|
|
|
dnl NOTE: the code itself will detect if lastlog is a directory
|
|
|
|
AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <utmp.h>
|
|
|
|
#ifdef HAVE_LASTLOG_H
|
|
|
|
# include <lastlog.h>
|
|
|
|
#endif
|
2000-06-04 13:51:47 +08:00
|
|
|
#ifdef HAVE_PATHS_H
|
2000-06-03 22:57:40 +08:00
|
|
|
# include <paths.h>
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[ char *lastlog = LASTLOG_FILE; ],
|
|
|
|
[ AC_MSG_RESULT(yes) ],
|
2000-06-04 13:51:47 +08:00
|
|
|
[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <utmp.h>
|
|
|
|
#ifdef HAVE_LASTLOG_H
|
|
|
|
# include <lastlog.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_PATHS_H
|
|
|
|
# include <paths.h>
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[ char *lastlog = _PATH_LASTLOG; ],
|
|
|
|
[ AC_MSG_RESULT(yes) ],
|
|
|
|
[
|
2000-06-13 06:34:38 +08:00
|
|
|
AC_MSG_RESULT(no)
|
2000-06-04 13:51:47 +08:00
|
|
|
system_lastlog_path=no
|
|
|
|
])
|
|
|
|
]
|
2000-06-03 22:57:40 +08:00
|
|
|
)
|
2000-06-04 13:51:47 +08:00
|
|
|
|
2000-06-03 22:57:40 +08:00
|
|
|
if test -z "$conf_lastlog_location"; then
|
|
|
|
if test x"$system_lastlog_path" = x"no" ; then
|
|
|
|
for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
|
2000-06-20 11:25:52 +08:00
|
|
|
if (test -d "$f" || test -f "$f") ; then
|
2000-06-03 22:57:40 +08:00
|
|
|
conf_lastlog_location=$f
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test -z "$conf_lastlog_location"; then
|
2000-06-13 07:27:31 +08:00
|
|
|
AC_MSG_WARN([** Cannot find lastlog **])
|
|
|
|
dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
|
2000-06-03 22:57:40 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$conf_lastlog_location"; then
|
|
|
|
AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl utmp detection
|
|
|
|
AC_MSG_CHECKING([if your system defines UTMP_FILE])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <utmp.h>
|
2000-06-04 13:51:47 +08:00
|
|
|
#ifdef HAVE_PATHS_H
|
2000-06-03 22:57:40 +08:00
|
|
|
# include <paths.h>
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[ char *utmp = UTMP_FILE; ],
|
|
|
|
[ AC_MSG_RESULT(yes) ],
|
|
|
|
[ AC_MSG_RESULT(no)
|
|
|
|
system_utmp_path=no ]
|
|
|
|
)
|
|
|
|
if test -z "$conf_utmp_location"; then
|
|
|
|
if test x"$system_utmp_path" = x"no" ; then
|
|
|
|
for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
|
|
|
|
if test -f $f ; then
|
|
|
|
conf_utmp_location=$f
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test -z "$conf_utmp_location"; then
|
|
|
|
AC_DEFINE(DISABLE_UTMP)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test -n "$conf_utmp_location"; then
|
|
|
|
AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl wtmp detection
|
|
|
|
AC_MSG_CHECKING([if your system defines WTMP_FILE])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <utmp.h>
|
2000-06-04 13:51:47 +08:00
|
|
|
#ifdef HAVE_PATHS_H
|
2000-06-03 22:57:40 +08:00
|
|
|
# include <paths.h>
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[ char *wtmp = WTMP_FILE; ],
|
|
|
|
[ AC_MSG_RESULT(yes) ],
|
|
|
|
[ AC_MSG_RESULT(no)
|
|
|
|
system_wtmp_path=no ]
|
|
|
|
)
|
|
|
|
if test -z "$conf_wtmp_location"; then
|
|
|
|
if test x"$system_wtmp_path" = x"no" ; then
|
|
|
|
for f in /usr/adm/wtmp /var/log/wtmp; do
|
|
|
|
if test -f $f ; then
|
|
|
|
conf_wtmp_location=$f
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test -z "$conf_wtmp_location"; then
|
|
|
|
AC_DEFINE(DISABLE_WTMP)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test -n "$conf_wtmp_location"; then
|
|
|
|
AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
dnl utmpx detection - I don't know any system so perverse as to require
|
|
|
|
dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
|
|
|
|
dnl there, though.
|
|
|
|
AC_MSG_CHECKING([if your system defines UTMPX_FILE])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <utmp.h>
|
|
|
|
#ifdef HAVE_UTMPX_H
|
|
|
|
#include <utmpx.h>
|
|
|
|
#endif
|
2000-06-04 13:51:47 +08:00
|
|
|
#ifdef HAVE_PATHS_H
|
2000-06-03 22:57:40 +08:00
|
|
|
# include <paths.h>
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[ char *utmpx = UTMPX_FILE; ],
|
|
|
|
[ AC_MSG_RESULT(yes) ],
|
|
|
|
[ AC_MSG_RESULT(no)
|
|
|
|
system_utmpx_path=no ]
|
|
|
|
)
|
|
|
|
if test -z "$conf_utmpx_location"; then
|
|
|
|
if test x"$system_utmpx_path" = x"no" ; then
|
|
|
|
AC_DEFINE(DISABLE_UTMPX)
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl wtmpx detection
|
|
|
|
AC_MSG_CHECKING([if your system defines WTMPX_FILE])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <utmp.h>
|
|
|
|
#ifdef HAVE_UTMPX_H
|
|
|
|
#include <utmpx.h>
|
|
|
|
#endif
|
2000-06-04 13:51:47 +08:00
|
|
|
#ifdef HAVE_PATHS_H
|
2000-06-03 22:57:40 +08:00
|
|
|
# include <paths.h>
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[ char *wtmpx = WTMPX_FILE; ],
|
|
|
|
[ AC_MSG_RESULT(yes) ],
|
|
|
|
[ AC_MSG_RESULT(no)
|
|
|
|
system_wtmpx_path=no ]
|
|
|
|
)
|
|
|
|
if test -z "$conf_wtmpx_location"; then
|
|
|
|
if test x"$system_wtmpx_path" = x"no" ; then
|
|
|
|
AC_DEFINE(DISABLE_WTMPX)
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
|
|
|
|
fi
|
|
|
|
|
2000-04-30 07:30:44 +08:00
|
|
|
|
|
|
|
# Change default command timeout for builtin PRNG
|
2000-06-07 20:20:23 +08:00
|
|
|
entropy_timeout=200
|
2000-04-30 07:30:44 +08:00
|
|
|
AC_ARG_WITH(entropy-timeout,
|
|
|
|
[ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
|
|
|
|
[
|
|
|
|
if test "x$withval" != "xno" ; then
|
|
|
|
entropy_timeout=$withval
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
|
|
|
|
|
|
|
|
|
2000-03-17 07:54:15 +08:00
|
|
|
if test ! -z "$blibpath" ; then
|
|
|
|
LDFLAGS="$LDFLAGS -blibpath:$blibpath"
|
|
|
|
AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
|
|
|
|
fi
|
|
|
|
|
2000-09-05 13:13:06 +08:00
|
|
|
AC_EXEEXT
|
|
|
|
|
2000-05-02 07:56:41 +08:00
|
|
|
AC_OUTPUT(Makefile ssh_prng_cmds)
|
|
|
|
|
2000-06-18 12:07:04 +08:00
|
|
|
# Print summary of options
|
|
|
|
|
|
|
|
if test x$MANTYPE = x'$(CATMAN)' ; then
|
|
|
|
MAN_MSG=cat
|
|
|
|
else
|
|
|
|
MAN_MSG=man
|
|
|
|
fi
|
|
|
|
if test ! -z "$RANDOM_POOL" ; then
|
|
|
|
RAND_MSG="Device ($RANDOM_POOL)"
|
|
|
|
else
|
|
|
|
if test ! -z "$EGD_SOCKET" ; then
|
|
|
|
RAND_MSG="EGD ($EGD_SOCKET)"
|
|
|
|
else
|
|
|
|
RAND_MSG="Builtin (timeout $entropy_timeout)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Someone please show me a better way :)
|
|
|
|
A=`eval echo ${prefix}` ; A=`eval echo ${A}`
|
|
|
|
B=`eval echo ${bindir}` ; B=`eval echo ${B}`
|
|
|
|
C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
|
|
|
|
D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
|
|
|
|
E=`eval echo ${libexecdir}/ssh/ssh-askpass` ; E=`eval echo ${E}`
|
|
|
|
F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
|
|
|
|
G=`eval echo ${piddir}` ; G=`eval echo ${G}`
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "OpenSSH configured has been configured with the following options."
|
|
|
|
echo " User binaries: $B"
|
|
|
|
echo " System binaries: $C"
|
|
|
|
echo " Configuration files: $D"
|
|
|
|
echo " Askpass program: $E"
|
|
|
|
echo " Manual pages: $F"
|
|
|
|
echo " PID file: $G"
|
|
|
|
echo " Random number collection: $RAND_MSG"
|
|
|
|
echo " Manpage format: $MAN_MSG"
|
|
|
|
echo " PAM support: ${PAM_MSG}"
|
|
|
|
echo " KerberosIV support: $KRB4_MSG"
|
|
|
|
echo " AFS support: $AFS_MSG"
|
|
|
|
echo " S/KEY support: $SKEY_MSG"
|
|
|
|
echo " TCP Wrappers support: $TCPW_MSG"
|
|
|
|
echo " MD5 password support: $MD5_MSG"
|
|
|
|
echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
|
|
|
|
echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
|
|
|
|
echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "Compiler flags: ${CFLAGS}"
|
|
|
|
echo "Linker flags: ${LDFLAGS}"
|
|
|
|
echo "Libraries: ${LIBS}"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|