build-sys: change --localstatedir to /run

Enable user to define where run state files are wrote.  Default for
these files is /run.  See reference for rationale why /var/run is no
longer the default.

Reference: http://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html
CC: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pull/16/head
Sami Kerola 10 years ago committed by Karel Zak
parent faebdd91ba
commit 07a16b9d1e
  1. 4
      Makefile.am
  2. 15
      configure.ac

@ -1,8 +1,8 @@
AM_CPPFLAGS = \
-include config.h \
-I$(top_srcdir)/include \
-DLOCALEDIR=\"$(localedir)\"
-DLOCALEDIR=\"$(localedir)\" \
-D_PATH_LOCALSTATEDIR=\"${localstatedir}\"
AM_CFLAGS = -fsigned-char $(WARN_CFLAGS)
AM_LDFLAGS =

@ -60,6 +60,21 @@ NONE:NONE | NONE:/usr | /usr:*)
esac ;;
esac
case $prefix:$localstatedir in
NONE:'${prefix}/var')
localstatedir=/run
AC_MSG_NOTICE([ --localstatedir defaults to /run])
;;
*:'${prefix}/var')
localstatedir=${prefix}/run
;;
NONE:*)
;;
*:*)
localstatedir=${prefix}/${localstatedir}
;;
esac
libdirname=`basename "$libdir"`
AC_SUBST([libdirname])

Loading…
Cancel
Save