summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-06-22 10:11:07 -0700
committerRoland McGrath <roland@hack.frob.com>2012-06-22 10:11:07 -0700
commit4248b1b1cf8c641fb51d92c3d2cfac81b02a903e (patch)
tree7be1c86dab37ceca90a5427e71d4735b713d7886
parent116a106aaf21065d3a9c62b38ad84fc60133a135 (diff)
downloadglibc-4248b1b1cf8c641fb51d92c3d2cfac81b02a903e.tar.gz
glibc-4248b1b1cf8c641fb51d92c3d2cfac81b02a903e.tar.xz
glibc-4248b1b1cf8c641fb51d92c3d2cfac81b02a903e.zip
Respect --localstatedir for /var/db parent directory.
-rw-r--r--ChangeLog11
-rw-r--r--Makeconfig2
-rw-r--r--config.make.in1
-rwxr-xr-xconfigure3
-rw-r--r--configure.in2
-rw-r--r--sysdeps/gnu/configure8
-rw-r--r--sysdeps/gnu/configure.in8
7 files changed, 32 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f3676f78a..de044b38c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-06-22  Roland McGrath  <roland@hack.frob.com>
+
+	* configure.in (libc_cv_localstatedir): New substituted variable.
+	* configure: Regenerated.
+	* config.make.in (localstatedir): New variable, substituted from
+	libc_cv_localstatedir.
+	* Makeconfig (vardbdir): Use $(localstatedir) in place of /var.
+	* sysdeps/gnu/configure.in (libc_cv_localstatedir): Change
+	${prefix}/var to /var when we change ${prefix}/etc to /etc.
+	* sysdeps/gnu/configure: Regenerated.
+
 2012-06-21  Jeff Law  <law@redhat.com>
 
 	[BZ #14277]
diff --git a/Makeconfig b/Makeconfig
index cba5db7d23..417fa508a6 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -287,7 +287,7 @@ inst_sysconfdir = $(install_root)$(sysconfdir)
 
 # 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 f0db19929b..65410abe1b 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 4d5d9e49f9..aa7869ff17 100755
--- a/configure
+++ b/configure
@@ -592,6 +592,7 @@ libc_cv_cc_sse4
 libc_cv_cpp_asm_debuginfo
 libc_cv_forced_unwind
 libc_cv_rootsbindir
+libc_cv_localstatedir
 libc_cv_sysconfdir
 libc_cv_localedir
 libc_cv_slibdir
@@ -7448,6 +7449,7 @@ fi
 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
 
@@ -7513,6 +7515,7 @@ fi
 
 
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIC is default" >&5
 $as_echo_n "checking whether -fPIC is default... " >&6; }
 if ${libc_cv_pic_default+:} false; then :
diff --git a/configure.in b/configure.in
index 81b14c9de7..4fe09c488c 100644
--- a/configure.in
+++ b/configure.in
@@ -2119,6 +2119,7 @@ AC_SUBST(libc_extra_cflags)
 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
 
@@ -2159,6 +2160,7 @@ AC_SUBST(old_glibc_headers)
 AC_SUBST(libc_cv_slibdir)
 AC_SUBST(libc_cv_localedir)
 AC_SUBST(libc_cv_sysconfdir)
+AC_SUBST(libc_cv_localstatedir)
 AC_SUBST(libc_cv_rootsbindir)
 AC_SUBST(libc_cv_forced_unwind)
 
diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
index 634e1d0cc6..26327ca3b4 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -25,12 +25,18 @@ case "$prefix" in
     libc_cv_slibdir=/lib
     ;;
   esac
-  # Allow the user to override the path with --sysconfdir
+  # Allow the user to override the path with --sysconfdir.
   if test "$sysconfdir" = '${prefix}/etc'; then
     libc_cv_sysconfdir=/etc
   else
     libc_cv_sysconfdir=$sysconfdir
    fi
+  # Allow the user to override the path with --localstatedir.
+  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/gnu/configure.in b/sysdeps/gnu/configure.in
index 3422007ffe..b8fd74cffc 100644
--- a/sysdeps/gnu/configure.in
+++ b/sysdeps/gnu/configure.in
@@ -25,12 +25,18 @@ case "$prefix" in
     libc_cv_slibdir=/lib
     ;;
   esac
-  # Allow the user to override the path with --sysconfdir
+  # Allow the user to override the path with --sysconfdir.
   if test "$sysconfdir" = '${prefix}/etc'; then
     libc_cv_sysconfdir=/etc
   else
     libc_cv_sysconfdir=$sysconfdir
    fi
+  # Allow the user to override the path with --localstatedir.
+  if test "$localstatedir" = '${prefix}/var'; then
+    libc_cv_localstatedir=/var
+  else
+    libc_cv_localstatedir=$localstatedir
+   fi
   libc_cv_rootsbindir=/sbin
   ;;
 esac