AC_PROG_RANLIB
AC_PROG_INSTALL
AC_CHECK_PROG(AR, ar, ar)
+
+dnl Checks for compiler characteristics
if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
+AC_C_INLINE
dnl Check for OpenSSL/SSLeay directories.
AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
if test "$ssldir" != "/usr"; then
CFLAGS="$CFLAGS -I$ssldir/include"
- LIBS="$LIBS -L$ssldir/lib"
+ LDFLAGS="$LDFLAGS -L$ssldir/lib"
fi
LIBS="$LIBS -lssl -lcrypto"
AC_MSG_RESULT($ssldir)
AC_CHECK_LIB(pam, pam_authenticate, , )
dnl Checks for header files.
-AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h pty.h shadow.h util.h utmp.h sys/select.h sys/time.h)
+AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h poll.h pty.h shadow.h util.h utmp.h utmpx.h sys/poll.h sys/select.h sys/stropts.h sys/time.h)
dnl Checks for library functions.
AC_CHECK_FUNCS(arc4random mkdtemp openpty _getpty setenv setlogin setproctitle snprintf strlcat strlcpy vsnprintf)
[AC_MSG_RESULT(no)]
)
+dnl Check for ut_host field in utmpx
+AC_MSG_CHECKING([whether utmpx.h has ut_host field])
+AC_EGREP_HEADER(ut_host, utmpx.h,
+ [AC_DEFINE(HAVE_HOST_IN_UTMPX) AC_MSG_RESULT(yes); ],
+ [AC_MSG_RESULT(no)]
+)
+
dnl Look for lastlog location
AC_MSG_CHECKING([location of lastlog file])
for lastlog in /var/log/lastlog /var/adm/lastlog /etc/security/lastlog ; do
[ --with-tcp-wrappers Enable tcpwrappers support],
[
AC_DEFINE(LIBWRAP)
- LIBS="$LIBS -lwrap"
+ LIBWRAP="-lwrap"
]
)
+AC_SUBST(LIBWRAP)
dnl Check whether to enable MD5 passwords
AC_ARG_WITH(md5-passwords,
[AC_DEFINE(HAVE_MD5_PASSWORDS)]
)
+dnl Check for the path to xauth
+AC_PATH_PROG(xauth_path, xauth)
+AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
+
AC_OUTPUT(Makefile)