autoconf
[Top][All Lists]
Advanced

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

Re: How to specify /var/lib in autoconf?


From: Eric Blake
Subject: Re: How to specify /var/lib in autoconf?
Date: Wed, 22 Apr 2009 20:41:08 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

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

According to David Bruce on 4/22/2009 11:52 AM:
> Anyway, how do I specify this in an autotools-based program?  The
> closest predefined variable seems to be "localstatedir", but the
> autoconf manual says it is "$prefix/var."  My Debian system doesn't
> have either "/usr/var" or "/usr/local/var".  Any suggestions?

You are correct that you want to use localstatedir.  Some of your
confusion stems from the fact that there are two competing standards.
Remember, the GNU Coding Standards state that a user must be able to
install a package completely under $prefix (consider the case when a user
installs for himself under $HOME), hence the default for localstatedir
must be $prefix/var.  The FHS states that you should prefer raw /var (and
not /usr/var or /usr/local/var).  So, anyone configuring your package that
wants to use /var instead of $prefix/var has the liberty to call
./configure --localstatedir=/var.

Additionally, you can create /usr/local/share/config.site to always make
packages installing into a prefix of /usr/local (the default) honor your
choice of localstatedir rather than having them use the autoconf default
of $prefix/var.  In fact, I wish more distros would do this - if a distro
wants to enforce the FHS layout, then they should seriously consider
installing a config.site to make it easy.

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

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

iEYEARECAAYFAknv1UQACgkQ84KuGfSFAYCN4QCgni4Tz8OFE9qMeuGY5Ks25g+O
WRgAoIMy5w5bmUMBVgBXUwrrp+JLxLQ+
=m+UO
-----END PGP SIGNATURE-----




reply via email to

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