autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which variable expands to /var?


From: Eric Blake
Subject: Re: Which variable expands to /var?
Date: Fri, 08 Feb 2008 08:18:44 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 2/8/2008 12:08 AM:
| Maybe I'm being dense, but there are lots of users complaining that
| configure already has far too many options.  And you want to introduce
| yet another one as a shortcut for
|
| cat >path/to/config.site <<EOF
| # Change to FHS defaults if installing below /usr, and the
| # respective other settings have not been changed on the command line.
| if test "$prefix" = /usr; then
|   test "$sysconfdir" = '$prefix/etc' && localstatedir=/etc
|   test "$sharedstatedir" = '$prefix/com' && sharedstatedir=/var
|   test "$localstatedir" = '$prefix/var' && localstatedir=/var
| fi
| EOF

Thanks for the feedback.  I withdraw my support for a --with-fhs option;
instead, I'm adding this to the manual:

2008-02-08  Eric Blake  <address@hidden>

        Describe a config.site that can be used for FHS compliance.
        * doc/autoconf.texi (Site Defaults): Fix typo.  Add new example
        for FHS.
        * THANKS: Update.
        Reported by Jules Colding and Ralf Wildenhues.

Should the manual also offer a link to this URL?
http://www.pathname.com/fhs/

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHrHLT84KuGfSFAYARAj3CAJ9895zFzl9ke8wZIHsIme2zlmYyXQCeIcdC
PadsgXP8q2PQgJVqcRBT0s0=
=6Y2I
-----END PGP SIGNATURE-----
>From e3e3e6b546981978dff59d7e40e39901ea832bb7 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Fri, 8 Feb 2008 08:13:27 -0700
Subject: [PATCH] Describe a config.site that can be used for FHS compliance.

* doc/autoconf.texi (Site Defaults): Fix typo.  Add new example
for FHS.
* THANKS: Update.
Reported by Jules Colding and Ralf Wildenhues.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog         |    8 ++++++++
 THANKS            |    1 +
 doc/autoconf.texi |   24 ++++++++++++++++++++++--
 3 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b61b26c..a003d47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-02-08  Eric Blake  <address@hidden>
+
+       Describe a config.site that can be used for FHS compliance.
+       * doc/autoconf.texi (Site Defaults): Fix typo.  Add new example
+       for FHS.
+       * THANKS: Update.
+       Reported by Jules Colding and Ralf Wildenhues.
+
 2008-02-02  Eric Blake  <address@hidden>
 
        * doc/autoconf.texi (Limitations of Usual Tools) <grep>: Fix typo.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 395b2c1..f94d0d5 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -17865,8 +17865,8 @@ file (if @code{CONFIG_SITE} is not set to a different 
file).
 # Change some defaults.
 test "$prefix" = NONE && prefix=/usr/share/local/gnu
 test "$exec_prefix" = NONE && exec_prefix=/usr/local/gnu
-test "$sharedstatedir" = '$prefix/com' && sharedstatedir=/var
-test "$localstatedir" = '$prefix/var' && localstatedir=/var
+test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var
+test "$localstatedir" = '${prefix}/var' && localstatedir=/var
 
 # Give Autoconf 2.x generated configure scripts a shared default
 # cache file for feature test results, architecture-specific.
@@ -17877,6 +17877,26 @@ if test "$cache_file" = /dev/null; then
 fi
 @end example
 
address@hidden Filesystem Hierarchy Standard
address@hidden FHS
+
+Another use of @file{config.site} is for priming the directory variables
+in a manner consistent with the Filesystem Hierarchy Standard
+(@acronym{FHS}).  Once the following file is installed at
address@hidden/usr/share/config.site}, a user can execute simply
address@hidden/configure --prefix=/usr} to get all the directories chosen in
+the locations recommended by @acronym{FHS}.
+
address@hidden
+# /usr/local/config.site for FHS defaults when installing below /usr,
+# and the respective settings were not changed on the command line.
+if test "$prefix" = /usr; then
+  test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
+  test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var
+  test "$localstatedir" = '${prefix}/var' && localstatedir=/var
+fi
address@hidden example
+
 
 @c ============================================== Running configure Scripts.
 
-- 
1.5.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]