Hi David,
On 4/22/2009 11:52 AM, David Bruce wrote:
Hi,
I'm about to start modifying my program (Tux Typing) so as to allow
creation of custom word lists. The gist is that I need to have
modifiable files that are visible to all users. I have been told by
knowledgable people that the appropriate location for these files
would be /var/lib/tuxtype, similar to where databases place their
files. (I presume /var/lib/tuxtype is correct if prefix is /usr, but
it would be /var/local/tuxtype with the default prefix /usr/local?).
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?
1. Where to put your program-updated data files. Refer to Chapter 5 of
the file system hierarchy standard (latest version is 2.3). I think
you're friends are probably right on the money with where your files
should go:
http://www.pathname.com/fhs
2. As far as /usr/var vs. /var, well that's another story. And I don't
know the history behind it, but it's got to be ugly. :-) The FHS
document alludes to there being a link between /usr/var and /var on
systems where /var is on the same partition as /usr. The same applies to
/usr/local/var and /var/local. However, that's as far as I can get in
digging around about it. Perhaps one of the old-timers on the list knows
more of the history.
The localstatedir variable is indeed the root of your package's state
information from an Autotools perspective. Often system packagers for
Linux distros will set localstatedir directly to /var on the configure
command line when building an APT or RPM package. This fixes the issues
about where stuff should go during make install.
John
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf