diff rogue5/configure.ac @ 34:655c317b6237

rogue5: add savedir, logfile, bugfixes
author elwin
date Mon, 24 May 2010 20:16:15 +0000
parents f502bf60e6e4
children 2a59cf36ae38
line wrap: on
line diff
--- a/rogue5/configure.ac	Mon May 24 20:10:59 2010 +0000
+++ b/rogue5/configure.ac	Mon May 24 20:16:15 2010 +0000
@@ -86,6 +86,27 @@
 
 AC_SUBST(SCOREFILE)
 
+AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[])
+AC_MSG_CHECKING([for log file])
+if test "x$enable_logfile" = "xno" ; then
+LOGFILE=
+elif test "x$enable_logfile" = "xyes" ;  then
+LOGFILE=$progname.log
+elif test "x$enable_logfile" = "x" ; then
+LOGFILE=$progname.log
+else
+LOGFILE=$enable_logfile
+fi
+
+if test "x$LOGFILE" != "x" ; then
+AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log])
+AC_MSG_RESULT([$LOGFILE])
+else
+AC_MSG_RESULT([disabled])
+fi
+
+AC_SUBST(LOGFILE)
+
 AC_ARG_ENABLE([lockfile],[AC_HELP_STRING([--enable-lockfile=LOCKFILE], [enable scoreboard lockfile with given filename])],[],[])
 AC_MSG_CHECKING([for scoreboard lockfile file])
 if test "x$enable_lockfile" = "xno" ; then
@@ -107,6 +128,27 @@
 
 AC_SUBST(LOCKFILE)
 
+AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[])
+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=$progname/
+else
+SAVEDIR=$enable_savedir
+fi
+
+if test "x$SAVEDIR" != "x" ; then
+AC_DEFINE_UNQUOTED([SAVEDIR], ["$SAVEDIR"], [Define to systemwide directory for storing saved games])
+AC_MSG_RESULT([$SAVEDIR])
+else
+AC_MSG_RESULT([disabled])
+fi
+
+AC_SUBST(SAVEDIR)
+
 AC_ARG_ENABLE([wizardmode],[AC_HELP_STRING([--enable-wizardmode], [enable availability of wizard mode @<:@default=no@:>@])],[],[])
 AC_MSG_CHECKING([if wizard mode is enabled])
 if test "x$enable_wizardmode" = "xno" ; then