From: Sami Kerola Date: Sat, 23 Jun 2012 05:05:14 +0000 (+0200) Subject: build-sys: change --localstatedir to /run X-Git-Tag: v2.22-rc1~168 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07a16b9d1e5a48550a0d19abb9a900853433ffa2;p=thirdparty%2Futil-linux.git 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 Signed-off-by: Sami Kerola --- diff --git a/Makefile.am b/Makefile.am index be5dd09fed..63ff205c22 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 = diff --git a/configure.ac b/configure.ac index 4005768330..a86d42e53f 100644 --- a/configure.ac +++ b/configure.ac @@ -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])