-dnl RTGROUP
-AC_ARG_WITH(rt-group,
- AC_HELP_STRING([--with-rt-group=GROUP],
- [group to own all files (default: rt)]),
- RTGROUP=$withval,
- RTGROUP=rt)
-AC_SUBST(RTGROUP)
+
+# ACRT_USER_EXISTS( users, variable, default )
+# - users is a list of users [www apache www-docs]
+# from highest to lowest priority to high priority (i.e. first match)
+# - variable is what you set with the result
+#
+
+AC_DEFUN([ACRT_USER_GUESS],
+ [
+ $2=$3
+ for x in $1; do
+ AC_MSG_CHECKING([if user $x exists])
+ AS_IF([ $PERL -e"exit( defined getpwnam('$x') ? 0 : 1)" ],
+ [ AC_MSG_RESULT([found]); $2=$x ; break],
+ [ AC_MSG_RESULT([not found]) ])
+ done
+ ])
+AC_DEFUN([ACRT_GROUP_GUESS],
+ [
+ $2=$3
+ for x in $1; do
+ AC_MSG_CHECKING([if group $x exists])
+ AS_IF([ $PERL -e"exit( defined getgrnam('$x') ? 0 : 1)" ],
+ [ AC_MSG_RESULT([found]); $2=$x ; break],
+ [ AC_MSG_RESULT([not found]) ])
+ done
+ ])