|
|
8229d4 |
From a197431414088a417b407b9b20583b2e8f7363bd Mon Sep 17 00:00:00 2001
|
|
|
8229d4 |
From: Eric Blake <eblake@redhat.com>
|
|
|
8229d4 |
Date: Thu, 12 Sep 2013 15:11:29 -0600
|
|
|
8229d4 |
Subject: [PATCH] AC_INIT: add --runstatedir option to configure
|
|
|
8229d4 |
|
|
|
8229d4 |
http://lwn.net/Articles/436012/ documents that many distros
|
|
|
8229d4 |
are now preferring to use /run rather than /var/run for
|
|
|
8229d4 |
storage of pid files and other per-process temporary files
|
|
|
8229d4 |
that must not be cleaned out during arbitrary TMPDIR sweeps.
|
|
|
8229d4 |
As such, the GNU Coding Standards were recently changed to
|
|
|
8229d4 |
recommend a new configure option to make it easy to choose
|
|
|
8229d4 |
this directory at configure time. This patch adds support
|
|
|
8229d4 |
for the option to all configure scripts built by autoconf.
|
|
|
8229d4 |
|
|
|
8229d4 |
* general.m4 (_AC_INIT_PARSE_ARGS): Add new directory option.
|
|
|
8229d4 |
(_AC_INIT_HELP): Document it.
|
|
|
8229d4 |
* doc/autoconf.texi (Installation Directory Variables): Document
|
|
|
8229d4 |
new option.
|
|
|
8229d4 |
(Site Defaults): Mention typical use within a distro.
|
|
|
8229d4 |
* NEWS: Mention the addition.
|
|
|
8229d4 |
|
|
|
8229d4 |
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
8229d4 |
---
|
|
|
8229d4 |
NEWS | 5 +++++
|
|
|
8229d4 |
doc/autoconf.texi | 14 +++++++++++++-
|
|
|
8229d4 |
lib/autoconf/general.m4 | 13 ++++++++++++-
|
|
|
8229d4 |
3 files changed, 30 insertions(+), 2 deletions(-)
|
|
|
8229d4 |
|
|
|
8229d4 |
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
|
|
|
8229d4 |
index 26e7b17..4932067 100644
|
|
|
8229d4 |
--- a/doc/autoconf.texi
|
|
|
8229d4 |
+++ b/doc/autoconf.texi
|
|
|
8229d4 |
@@ -2826,7 +2826,18 @@ usually has a subdirectory per locale.
|
|
|
8229d4 |
|
|
|
8229d4 |
@defvar localstatedir
|
|
|
8229d4 |
@ovindex localstatedir
|
|
|
8229d4 |
-The directory for installing modifiable single-machine data.
|
|
|
8229d4 |
+The directory for installing modifiable single-machine data. Content in
|
|
|
8229d4 |
+this directory typically survives a reboot.
|
|
|
8229d4 |
+@end defvar
|
|
|
8229d4 |
+
|
|
|
8229d4 |
+@defvar runstatedir
|
|
|
8229d4 |
+@ovindex runstatedir
|
|
|
8229d4 |
+The directory for installing temporary modifiable single-machine data.
|
|
|
8229d4 |
+Content in this directory survives as long as the process is running
|
|
|
8229d4 |
+(such as pid files), as contrasted with @file{/tmp} that may be
|
|
|
8229d4 |
+periodically cleaned. Conversely, this directory is typically cleaned
|
|
|
8229d4 |
+on a reboot. By default, this is a subdirectory of
|
|
|
8229d4 |
+@code{localstatedir}.
|
|
|
8229d4 |
@end defvar
|
|
|
8229d4 |
|
|
|
8229d4 |
@defvar mandir
|
|
|
8229d4 |
@@ -22606,6 +22617,7 @@ test "$prefix" = NONE && prefix=/usr/share/local/gnu
|
|
|
8229d4 |
test "$exec_prefix" = NONE && exec_prefix=/usr/local/gnu
|
|
|
8229d4 |
test "$sharedstatedir" = '$@{prefix@}/com' && sharedstatedir=/var
|
|
|
8229d4 |
test "$localstatedir" = '$@{prefix@}/var' && localstatedir=/var
|
|
|
8229d4 |
+test "$runstatedir" = '$@{localstatedir@}/run' && runstatedir=/run
|
|
|
8229d4 |
|
|
|
8229d4 |
# Give Autoconf 2.x generated configure scripts a shared default
|
|
|
8229d4 |
# cache file for feature test results, architecture-specific.
|
|
|
8229d4 |
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
|
|
|
8229d4 |
index 70b0168..1ce9922 100644
|
|
|
8229d4 |
--- a/lib/autoconf/general.m4
|
|
|
8229d4 |
+++ b/lib/autoconf/general.m4
|
|
|
8229d4 |
@@ -586,6 +586,7 @@ AC_SUBST([datadir], ['${datarootdir}'])dnl
|
|
|
8229d4 |
AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
|
|
|
8229d4 |
AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
|
|
|
8229d4 |
AC_SUBST([localstatedir], ['${prefix}/var'])dnl
|
|
|
8229d4 |
+AC_SUBST([runstatedir], ['${localstatedir}/run'])dnl
|
|
|
8229d4 |
AC_SUBST([includedir], ['${prefix}/include'])dnl
|
|
|
8229d4 |
AC_SUBST([oldincludedir], ['/usr/include'])dnl
|
|
|
8229d4 |
AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
|
|
|
8229d4 |
@@ -812,6 +813,15 @@ do
|
|
|
8229d4 |
| -silent | --silent | --silen | --sile | --sil)
|
|
|
8229d4 |
silent=yes ;;
|
|
|
8229d4 |
|
|
|
8229d4 |
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
|
|
|
8229d4 |
+ | --runstate | --runstat | --runsta | --runst | --runs \
|
|
|
8229d4 |
+ | --run | --ru | --r)
|
|
|
8229d4 |
+ ac_prev=runstatedir ;;
|
|
|
8229d4 |
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
|
|
8229d4 |
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
|
|
8229d4 |
+ | --run=* | --ru=* | --r=*)
|
|
|
8229d4 |
+ runstatedir=$ac_optarg ;;
|
|
|
8229d4 |
+
|
|
|
8229d4 |
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
|
|
8229d4 |
ac_prev=sbindir ;;
|
|
|
8229d4 |
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
|
|
8229d4 |
@@ -921,7 +931,7 @@ fi
|
|
|
8229d4 |
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
|
|
8229d4 |
datadir sysconfdir sharedstatedir localstatedir includedir \
|
|
|
8229d4 |
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
|
|
8229d4 |
- libdir localedir mandir
|
|
|
8229d4 |
+ libdir localedir mandir runstatedir
|
|
|
8229d4 |
do
|
|
|
8229d4 |
eval ac_val=\$$ac_var
|
|
|
8229d4 |
# Remove trailing slashes.
|
|
|
8229d4 |
@@ -1058,6 +1068,7 @@ Fine tuning of the installation directories:
|
|
|
8229d4 |
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
|
|
8229d4 |
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
|
|
8229d4 |
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
|
|
8229d4 |
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
|
|
8229d4 |
--libdir=DIR object code libraries [EPREFIX/lib]
|
|
|
8229d4 |
--includedir=DIR C header files [PREFIX/include]
|
|
|
8229d4 |
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
|
|
8229d4 |
--
|
|
|
8229d4 |
1.7.2.5
|