AC_CHECK_HEADERS([utempter.h utmpx.h])
if test "x$ac_cv_header_utempter_h" = xyes; then
- AC_CHECK_FUNCS([setresuid setresgid],[],
- [AC_MSG_ERROR([setresuid() and setresgid() required for utmpx])])
-
AC_MSG_NOTICE([using utempter])
AC_CHECK_LIB([utempter], [utempter_add_record],
[], [AC_MSG_ERROR([utempter_add_record() required])])
elif test "x$ac_cv_header_utmpx_h" = xyes; then
AC_MSG_NOTICE([using utmp])
+ AC_CHECK_FUNCS([setresuid setresgid],[],
+ [AC_MSG_ERROR([setresuid() and setresgid() required for utmpx])])
AC_DEFINE([USE_UTMPX], 1, [Define to 1 to use utmp.])
+
else
AC_MSG_ERROR([neither utmpx.h nor utempter.h found, aborting])
fi