comparison rogue5/configure.ac @ 53:0dbbe2f19084

rogue5: improve defaults for SAVEDIR.
author elwin
date Fri, 14 Oct 2011 16:31:58 +0000
parents 34d46b6113c7
children 8f7c082fde46
comparison
equal deleted inserted replaced
52:ae4f413fe76c 53:0dbbe2f19084
126 AC_MSG_RESULT([disabled]) 126 AC_MSG_RESULT([disabled])
127 fi 127 fi
128 128
129 AC_SUBST(LOCKFILE) 129 AC_SUBST(LOCKFILE)
130 130
131 AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[]) 131 AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[enable_savedir="no"])
132 AC_MSG_CHECKING([for save directory]) 132 AC_MSG_CHECKING([for save directory])
133 if test "x$enable_savedir" = "xno" ; then 133 if test "x$enable_savedir" = "xno" ; then
134 SAVEDIR= 134 SAVEDIR=
135 elif test "x$enable_savedir" = "xyes" ; then 135 elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then
136 SAVEDIR=$progname/ 136 if text "x$GROUPOWNER" != "x"; then
137 elif test "x$enable_savedir" = "x" ; then 137 SAVEDIR="/var/local/games/roguelike/${progname}save/"
138 SAVEDIR= 138 else
139 else 139 SAVEDIR="$progname/"
140 SAVEDIR=$enable_savedir 140 fi
141 else
142 SAVEDIR="$enable_savedir"
141 fi 143 fi
142 144
143 if test "x$SAVEDIR" != "x" ; then 145 if test "x$SAVEDIR" != "x" ; then
144 AC_DEFINE_UNQUOTED([SAVEDIR], ["$SAVEDIR"], [Define to systemwide directory for storing saved games]) 146 AC_DEFINE_UNQUOTED([SAVEDIR], ["$SAVEDIR"], [Define to systemwide directory for storing saved games])
145 AC_MSG_RESULT([$SAVEDIR]) 147 AC_MSG_RESULT([$SAVEDIR])