]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: change --localstatedir to /run
authorSami Kerola <kerolasa@iki.fi>
Sat, 23 Jun 2012 05:05:14 +0000 (07:05 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 10 Jul 2012 10:56:46 +0000 (12:56 +0200)
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>
Makefile.am
configure.ac

index be5dd09fed41ad325ab785873734ffa179b289f9..63ff205c22066bf7511af24ec26ebe597c7d7ea0 100644 (file)
@@ -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 =
 
index 4005768330d17d455977bbc33817a9e76c21b8b2..a86d42e53f354219c22e10a5ba47c8d661474708 100644 (file)
@@ -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])