Mercurial > gnulib
changeset 37183:b296df26556b
configmake: support new --runstatedir option
http://lwn.net/Articles/436012/ documents that many distros
are now preferring to use /run rather than /var/run for
storage of pid files and other per-process temporary files
that must not be cleaned out during arbitrary TMPDIR sweeps.
As such, the GNU Coding Standards were recently changed to
recommend a new configure option to make it easy to choose
this directory at configure time, and autoconf 2.70 will
support the new directory by default. This patch adds support
for propagating results of the new option (for new enough
autotools) or providing a sane default (for older autotools)
into C code.
* m4/configmake.m4 (gl_CONFIGMAKE_PREP): Substitute runstatedir
even if autoconf was too old to provide the command line option.
* modules/configmake (Makefile.am): Propagate it to .h file.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Thu, 12 Sep 2013 16:23:31 -0600 |
parents | f0feefa03458 |
children | 3f9fcbf929c7 |
files | ChangeLog m4/configmake.m4 modules/configmake |
diffstat | 3 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Sep 22 21:25:25 2013 -0700 +++ b/ChangeLog Thu Sep 12 16:23:31 2013 -0600 @@ -1,3 +1,10 @@ +2013-09-23 Eric Blake <eblake@redhat.com> + + configmake: support new --runstatedir option + * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Substitute runstatedir + even if autoconf was too old to provide the command line option. + * modules/configmake (Makefile.am): Propagate it to .h file. + 2013-09-22 Paul Eggert <eggert@cs.ucla.edu> ctype, string: depend on extern-inline
--- a/m4/configmake.m4 Sun Sep 22 21:25:25 2013 -0700 +++ b/m4/configmake.m4 Thu Sep 12 16:23:31 2013 -0600 @@ -1,4 +1,4 @@ -# configmake.m4 serial 1 +# configmake.m4 serial 2 dnl Copyright (C) 2010-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,8 +7,9 @@ # gl_CONFIGMAKE_PREP # ------------------ # Guarantee all of the standard directory variables, even when used with -# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake -# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.). +# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir +# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b, +# and runstatedir in 1.14.1). AC_DEFUN([gl_CONFIGMAKE_PREP], [ dnl Technically, datadir should default to datarootdir. But if @@ -43,6 +44,10 @@ if test "x$localedir" = x; then AC_SUBST([localedir], ['${datarootdir}/locale']) fi + dnl Added in autoconf 2.70 + if test "x$runstatedir" = x; then + AC_SUBST([runstatedir], ['${localstatedir}/run']) + fi dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
--- a/modules/configmake Sun Sep 22 21:25:25 2013 -0700 +++ b/modules/configmake Thu Sep 12 16:23:31 2013 -0600 @@ -11,7 +11,7 @@ Makefile.am: # Listed in the same order as the GNU makefile conventions, and -# provided by autoconf 2.59c+. +# provided by autoconf 2.59c+ or 2.70. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile @@ -27,6 +27,7 @@ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ + echo '#define RUNSTATEDIR "$(runstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \