From: Andreas Schwab <schwab@redhat.com>
To: libc-hacker@sourceware.org
Subject: [PATCH] Define vardbdir relative to prefix
Date: Fri, 01 Jul 2011 10:42:00 -0000 [thread overview]
Message-ID: <m3y60ie0z8.fsf@redhat.com> (raw)
2011-07-01 Andreas Schwab <schwab@redhat.com>
* configure.in (libc_cv_rootsbindir): Substitute.
* configure: Regenerate.
* config.make.in (localstatedir): Define.
* Makeconfig (localstatedir): Define.
(vardbdir): Use $(localstatedir).
* sysdeps/unix/sysv/linux/configure.in (libc_cv_localstatedir):
Set to /var by default.
* sysdeps/unix/sysv/linux/configure: Regenerate.
---
Makeconfig | 9 ++++++++-
config.make.in | 1 +
configure | 3 +++
configure.in | 2 ++
sysdeps/unix/sysv/linux/configure | 5 +++++
sysdeps/unix/sysv/linux/configure.in | 5 +++++
6 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/Makeconfig b/Makeconfig
index 1110811..8a6cd8b 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -291,9 +291,16 @@ sysconfdir = $(prefix)/etc
endif
inst_sysconfdir = $(install_root)$(sysconfdir)
+# Where to install data files which the programs modify
+# while they run, and that pertain to one specific machine.
+ifndef localstatedir
+localstatedir = $(prefix)/var
+endif
+inst_localstatedir = $(install_root)$(localstatedir)
+
# Directory for the database files and Makefile for nss_db.
ifndef vardbdir
-vardbdir = /var/db
+vardbdir = $(localstatedir)/db
endif
inst_vardbdir = $(install_root)$(vardbdir)
diff --git a/config.make.in b/config.make.in
index 0656b1b..1606b17 100644
--- a/config.make.in
+++ b/config.make.in
@@ -18,6 +18,7 @@ rootsbindir = @libc_cv_rootsbindir@
infodir = @infodir@
includedir = @includedir@
datarootdir = @datarootdir@
+localstatedir = @libc_cv_localstatedir@
# Should we use and build ldconfig?
use-ldconfig = @use_ldconfig@
diff --git a/configure b/configure
index 20e7340..9e5c47b 100755
--- a/configure
+++ b/configure
@@ -627,6 +627,7 @@ libc_cv_cc_avx
libc_cv_cc_sse4
libc_cv_cpp_asm_debuginfo
libc_cv_forced_unwind
+libc_cv_localstatedir
libc_cv_rootsbindir
libc_cv_sysconfdir
libc_cv_localedir
@@ -7646,6 +7647,7 @@ sizeof_long_double=$ac_cv_sizeof_long_double
use_ldconfig=no
ldd_rewrite_script=no
libc_cv_sysconfdir=$sysconfdir
+libc_cv_localstatedir=$localstatedir
libc_cv_gcc_unwind_find_fde=no
libc_cv_idn=no
@@ -7708,6 +7710,7 @@ fi
+
if test $elf = yes; then
$as_echo "#define HAVE_ELF 1" >>confdefs.h
diff --git a/configure.in b/configure.in
index f2b3921..127161c 100644
--- a/configure.in
+++ b/configure.in
@@ -2175,6 +2175,7 @@ AC_SUBST(sizeof_long_double)
use_ldconfig=no
ldd_rewrite_script=no
libc_cv_sysconfdir=$sysconfdir
+libc_cv_localstatedir=$localstatedir
libc_cv_gcc_unwind_find_fde=no
libc_cv_idn=no
@@ -2219,6 +2220,7 @@ AC_SUBST(libc_cv_slibdir)
AC_SUBST(libc_cv_localedir)
AC_SUBST(libc_cv_sysconfdir)
AC_SUBST(libc_cv_rootsbindir)
+AC_SUBST(libc_cv_localstatedir)
AC_SUBST(libc_cv_forced_unwind)
dnl sysdeps/CPU/configure.in checks set this via arch-specific asm tests
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index d05bd13..7ed7489 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -430,6 +430,11 @@ case "$prefix" in
else
libc_cv_sysconfdir=$sysconfdir
fi
+ if test $localstatedir = '${prefix}/var'; then
+ libc_cv_localstatedir=/var
+ else
+ libc_cv_localstatedir=$localstatedir
+ fi
libc_cv_rootsbindir="/sbin"
;;
esac
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index 8f00407..8bb8508 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -169,6 +169,11 @@ case "$prefix" in
else
libc_cv_sysconfdir=$sysconfdir
fi
+ if test $localstatedir = '${prefix}/var'; then
+ libc_cv_localstatedir=/var
+ else
+ libc_cv_localstatedir=$localstatedir
+ fi
libc_cv_rootsbindir="/sbin"
;;
esac
--
1.7.6
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
next reply other threads:[~2011-07-01 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 10:42 Andreas Schwab [this message]
2011-07-01 23:29 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3y60ie0z8.fsf@redhat.com \
--to=schwab@redhat.com \
--cc=libc-hacker@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).