Permalink
Browse files

Add LM_CONFIG_DIR define

  • Loading branch information...
1 parent e92ddf7 commit 0d353145708159822422ac058193ffc03e7d7f84 @endrift committed Feb 6, 2011
Showing with 8 additions and 2 deletions.
  1. +1 −1 common.mk
  2. +1 −1 common/Configuration.cpp
  3. +6 −0 configure
View
@@ -34,7 +34,7 @@ ifneq ($(NO_UPGRADE_NAG),)
CFLAGS += -DLM_NO_UPGRADE_NAG
endif
-CFLAGS += -DLM_DATA_DIR=\"$(DATADIR)\" -DLM_VERSION="\"$(VERSION)\""
+CFLAGS += -DLM_DATA_DIR=\"$(DATADIR)\" -DLM_VERSION="\"$(VERSION)\"" -DLM_CONFIG_DIR="\"$(SYSCONFDIR)\""
MACHINE ?= $(shell uname -s)
# Windows is the only supported platform that doesn't have uname
View
@@ -79,7 +79,7 @@ const string& Configuration::global_dir() {
cfg = ".\\";
#else
// TODO make this a build flag
- cfg = "/etc/legesmotus/";
+ cfg = LM_CONFIG_DIR "/";
#endif
}
View
@@ -16,6 +16,7 @@ then
fi
prefix=/usr/local
+sysconfdir=/etc/legesmotus
sound=1
nobundle=1
universal=1
@@ -40,6 +41,7 @@ display_help () {
echo " --mandir=DIR Install manual pages at DIR [default: PREFIX/man]"
echo " --datadir=DIR Install data files at DIR [default: PREFIX/share/games/legesmotus]"
echo " --sharedir=DIR Install shared files at DIR [default: PREFIX/share]"
+ echo " --sysconfdir=DIR Install configuration files at DIR [default: /etc/legesmotus]"
echo " --disable-sound Disable sound support in this build"
echo " --disable-upgrade-check Disable upgrade checking in this build"
echo " --disable-client Disable building the client"
@@ -115,6 +117,9 @@ do
--sharedir=*)
sharedir="`echo "$arg" | cut -f2 -d=`"
;;
+ --sysconfdir=*)
+ sysconfdir="`echo "$arg" | cut -f2 -d=`"
+ ;;
--debug)
debug=1
;;
@@ -345,6 +350,7 @@ echo "BINDIR = \"${bindir}\"" >> config.mk
echo "MANDIR = \"${mandir}\"" >> config.mk
echo "DATADIR = \"${datadir}\"" >> config.mk
echo "SHAREDIR = \"${sharedir}\"" >> config.mk
+echo "SYSCONFDIR = \"${sysconfdir}\"" >> config.mk
echo "TARGETS =${targets}" >> config.mk
if [ $sound -ne 0 ]

0 comments on commit 0d35314

Please sign in to comment.