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)
;;
;;
*-*-irix5*)
CFLAGS="$CFLAGS -I/usr/local/include"
- LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ LDFLAGS="$LDFLAGS"
MANTYPE='$(CATMAN)'
no_libsocket=1
no_libnsl=1
;;
*-*-irix6*)
CFLAGS="$CFLAGS -I/usr/local/include"
- LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ LDFLAGS="$LDFLAGS"
MANTYPE='$(CATMAN)'
AC_MSG_WARN([*** Irix 6.x is not tested, please report you experiences *** ])
no_libsocket=1
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"
mansubdir=cat
LIBS="$LIBS -lgen -lsocket"
;;
+*-*-sco3*)
+ CFLAGS="$CFLAGS -I/usr/local/include"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ MANTYPE='$(CATMAN)'
+ mansubdir=cat
+ LIBS="$LIBS -lgen -lsocket"
+ no_dev_ptmx=1
+ ;;
esac
+# 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
+ ]
+)
+
+
# Checks for libraries.
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")
fi
# Checks for header files.
-AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.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/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h util.h utmp.h utmpx.h)
+AC_CHECK_HEADERS(bstring.h endian.h lastlog.h limits.h login.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/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h util.h utmp.h utmpx.h)
# Checks for library functions.
AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage innetgr md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy vsnprintf vhangup _getpty __b64_ntop)
#ifdef HAVE_LASTLOG_H
# include <lastlog.h>
#endif
-#ifdef PATHS_H
+#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
],
[ char *lastlog = LASTLOG_FILE; ],
[ AC_MSG_RESULT(yes) ],
- [ AC_MSG_RESULT(no)
- system_lastlog_path=no ]
+ [
+ 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) ],
+ [
+ AC_MSG_RESULT(no)
+ system_lastlog_path=no
+ ])
+ ]
)
+
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
- if test -e $f ; then
+ if test -d "$f" -o -f "$f" ; then
conf_lastlog_location=$f
fi
done
if test -z "$conf_lastlog_location"; then
- AC_MSG_WARN([** Cannot find lastlog - disabling feature **])
- AC_DEFINE(DISABLE_LASTLOG)
+ AC_MSG_WARN([** Cannot find lastlog **])
+ dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
fi
fi
fi
AC_TRY_COMPILE([
#include <sys/types.h>
#include <utmp.h>
-#ifdef PATHS_H
+#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
],
AC_TRY_COMPILE([
#include <sys/types.h>
#include <utmp.h>
-#ifdef PATHS_H
+#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
],
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif
-#ifdef PATHS_H
+#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
],
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif
-#ifdef PATHS_H
+#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
],
# Change default command timeout for builtin PRNG
-entropy_timeout=100
+entropy_timeout=200
AC_ARG_WITH(entropy-timeout,
[ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
[