summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJoakim Verona <joakim@verona.se>2015-01-22 00:05:27 +0100
committerJoakim Verona <joakim@verona.se>2015-01-22 00:05:27 +0100
commitd6ada5ae0fad7a5c85eb28b102bc460e9fe0aceb (patch)
treeaa8b504032eb09caa6f5eae6038a38b87ada198b /configure.ac
parent487d6cdc4dfc6500885dfa57a7c2fac8a1760fec (diff)
parent20f66485526b69eb26f2e70bd835a5e1333559d5 (diff)
Merge branch 'master' into xwidget
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 20 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 1d206dbc5a0..0c2555792c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -394,10 +394,25 @@ OPTION_DEFAULT_ON([compress-install],
make GZIP_PROG= install])
AC_ARG_WITH(gameuser,dnl
-[AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])])
-test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
- && gameuser="${with_gameuser}"
-test "X$gameuser" = X && gameuser=games
+[AS_HELP_STRING([--with-gameuser=USER_OR_GROUP],
+ [user for shared game score files.
+ An argument prefixed by ':' specifies a group instead.])])
+gameuser=
+gamegroup=
+case ${with_gameuser} in
+ no) ;;
+ "" | yes)
+ AC_MSG_CHECKING([whether a 'games' user exists])
+ if id -u games >/dev/null 2>&1; then
+ AC_MSG_RESULT([yes])
+ gameuser=games
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ :*) gamegroup=`echo "${with_gameuser}" | sed -e "s/://"` ;;
+ *) gameuser=${with_gameuser} ;;
+esac
AC_ARG_WITH([gnustep-conf],dnl
[AS_HELP_STRING([--with-gnustep-conf=FILENAME],
@@ -4721,6 +4736,7 @@ AC_SUBST(etcdocdir)
AC_SUBST(bitmapdir)
AC_SUBST(gamedir)
AC_SUBST(gameuser)
+AC_SUBST(gamegroup)
## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
## end of LIBX_BASE, but nothing ever set it.