use FIFODIR instead of LOCALSTATEDIR

This commit is contained in:
Jon Daniel 2005-03-21 21:45:44 +00:00
parent 7cee60c12c
commit 2ac32fa803
3 changed files with 12 additions and 6 deletions

View file

@ -131,6 +131,12 @@ AC_ARG_ENABLE([server],
[server=$enableval],
[server=no])
AC_ARG_WITH([fifodir],
AS_HELP_STRING([--with-fifodir], [directory for the wesnothd fifo socket file]),
[fifodir=$withval],
[fifodir=$localstatedir/run/wesnotd])
AC_SUBST([fifodir])
AC_ARG_WITH([server-uid],
AS_HELP_STRING([--with-server-uid]. [user id of the user who runs wesnothd]),
[serveruid=$withval],

View file

@ -538,7 +538,7 @@ wesnoth_zip_SOURCES = \
wesnoth_zip_LDADD = @SDL_LIBS@ @SDL_NET_LIBS@
AM_CXXFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@ -DWESNOTH_PATH=\"$(pkgdatadir)\" \
-DLOCALEDIR=\"$(LOCALEDIR)\" -DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR) -DLOCALSTATEDIR=\"$(localstatedir)\"
-DLOCALEDIR=\"$(LOCALEDIR)\" -DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR) -DFIFODIR=\"$(fifodir)\"
AM_CFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@ -DWESNOTH_PATH=\"$(pkgdatadir)\" \
-DLOCALEDIR=\"$(LOCALEDIR)\" -DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR)
@ -574,8 +574,8 @@ endif
if SERVER
install-exec-hook:
mkdir -p -m 0700 $(localstatedir)/wesnothd
chown $(serveruid):$(servergid) $(localstatedir)/wesnothd
mkdir -p -m 0700 $(fifodir)
chown $(serveruid):$(servergid) $(fifodir)
uninstall-hook:
rm -rf $(localstatedir)/wesnothd/

View file

@ -870,10 +870,10 @@ int main(int argc, char** argv)
network::set_default_send_size(4096);
#ifndef LOCALSTATEDIR
# define LOCALSTATEDIR "/var/run"
#ifndef FIFODIR
# define FIFODIR "/var/run/wesnothd"
#endif
std::string fifo_path = std::string(LOCALSTATEDIR) + "/wesnothd/socket";
std::string fifo_path = std::string(FIFODIR) + "/socket";
for(int arg = 1; arg != argc; ++arg) {
const std::string val(argv[arg]);