]> ruderich.org/simon Gitweb - wall-notify/wall-notify.git/blobdiff - configure.ac
configure.ac: check for setresuid/setresuid when using utmpx.h
[wall-notify/wall-notify.git] / configure.ac
index 84c3e324ea395864d4147e43a6f1b19be1b4f80e..3c1939664a6a5c5ec1922a2cdd45d92c41596eb0 100644 (file)
@@ -37,9 +37,6 @@ fi
 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])])
@@ -49,7 +46,10 @@ if test "x$ac_cv_header_utempter_h" = xyes; then
 
 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