changeset 52:ae4f413fe76c

rogue4: improve defaults for SAVEDIR.
author elwin
date Thu, 13 Oct 2011 17:44:29 +0000
parents a1dc75e38e73
children 0dbbe2f19084
files rogue4/configure.ac
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/rogue4/configure.ac	Tue Oct 11 15:20:40 2011 +0000
+++ b/rogue4/configure.ac	Thu Oct 13 17:44:29 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