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?
If you want to refer to the path in C code as a macro "LOCALSTATEDIR", you have in Makefile.am: AM_CPPFLAGS = -DLOCALSTATEDIR=\"$(pkglocalstatedir)\" Also in Makefile.am, you need this to install data: dist_pkglocalstate_DATA = <path_to_tux_state_data> If there's no data to install but you just need the directory created, i think you need: install-data-hook: $(install_sh) -d -m 755 $(DESTDIR)$(pkglocalstatedir) uninstall-hook: rm -rf $(DESTDIR)$(pkglocalstatedir) Autoconf stuff is all too vague to figure out from the manual. A lot of things are figured out by the errors given by "make distcheck", and looking through the generated Makefile.in and Makefile. _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf