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: Fri, 24 Apr 2009 15:48:30 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

David Bruce <davidstuartbruce <at> gmail.com> writes:

> > If you want to refer to the path in C code as a macro "LOCALSTATEDIR",
> > you have in Makefile.am:
> >
> >  AM_CPPFLAGS = -DLOCALSTATEDIR=\"$(pkglocalstatedir)\"
> 
> But is pkglocalstatedir predefined, like pkgdatadir, pkglibdir, and
> pkgincludedir? It doesn't seem like it.

Not yet.  But if you file a bug report to automake, I'm sure Ralf would 
consider adding it.

> Am I first supposed to do something like:
> pkglocalstatedir = $(localstatedir)/@PACKAGE@

Until automake provides it, yes.  Or $(localstatedir)/$(PACKAGE), since 
automake already provides $(PACKAGE) as the preferred spelling of @PACKAGE@ 
within Makefile.am.

> Regarding the GNU Coding Standards vs. FHS discrepancy in where the
> files wind up getting installed, am I safe to assume that as the
> "upstream guy" I can just follow the Autotools defaults? The distro
> packagers ought to know to use "./configure --localstatedir=/var" to
> get these files into the FHS-approved place, right?

Yep, you got it in one!  Distro packages could also use a config.site policy to 
get it right without having to add --localstatedir to every ./configure run, 
but the net result is the same.

-- 
Eric Blake







reply via email to

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