-dnl Copyright (C) 2014 Simon Ruderich
+dnl Copyright (C) 2014-2015 Simon Ruderich
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
AC_CHECK_LIB([utempter], [utempter_remove_record],
[], [AC_MSG_ERROR([utempter_remove_record() required])])
AC_DEFINE([USE_UTEMPTER], 1, [Define to 1 to use utempter.])
+
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
fi])
if test -z "$disable_x11_support"; then
- AX_PTHREAD([],[AC_MSG_ERROR([pthread is required, use --disable-x11])])
+ AX_PTHREAD([],
+ [AC_MSG_ERROR([pthread is required for X, use --disable-x11])])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
CC="$PTHREAD_CC"
CFLAGS="$X_CFLAGS $CFLAGS"
fi
-AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_OUTPUT
if test "x$ac_cv_header_utempter_h" != xyes; then