changeset 53:0dbbe2f19084

rogue5: improve defaults for SAVEDIR.
author elwin
date Fri, 14 Oct 2011 16:31:58 +0000
parents ae4f413fe76c
children a31b2cb545c5
files rogue5/configure.ac
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/rogue5/configure.ac	Thu Oct 13 17:44:29 2011 +0000
+++ b/rogue5/configure.ac	Fri Oct 14 16:31:58 2011 +0000
@@ -128,16 +128,18 @@
 
 AC_SUBST(LOCKFILE)
 
-AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[])
+AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[enable_savedir="no"])
 AC_MSG_CHECKING([for save directory])
 if test "x$enable_savedir" = "xno" ; then
 SAVEDIR=
-elif test "x$enable_savedir" = "xyes" ; then
-SAVEDIR=$progname/
-elif test "x$enable_savedir" = "x" ; then
-SAVEDIR=
+elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then
+  if text "x$GROUPOWNER" != "x"; then
+  SAVEDIR="/var/local/games/roguelike/${progname}save/"
+  else
+  SAVEDIR="$progname/"
+  fi
 else
-SAVEDIR=$enable_savedir
+SAVEDIR="$enable_savedir"
 fi
 
 if test "x$SAVEDIR" != "x" ; then