[collectd] patch fixing collectd.conf.in template path

Sebastian Harl sh at tokkee.org
Thu Jun 19 15:00:33 CEST 2008


Hi,

On Thu, Jun 19, 2008 at 02:20:14PM +0200, Florian Forster wrote:
> On Thu, Jun 19, 2008 at 12:13:14PM +0200, Christian Wiese wrote:
> > -#BaseDir     "@prefix@/var/lib/@PACKAGE_NAME@"
> > -#PIDFile     "@prefix@/var/run/@PACKAGE_NAME at .pid"
> > +#BaseDir     "@localstatedir@/lib/@PACKAGE_NAME@"
> > +#PIDFile     "@localstatedir@/run/@PACKAGE_NAME at .pid"
> 
> I know this is a bit messy and in fact we used @localstatdir@ at first.
> The problem is, that if you don't explicitely use the
> `--localstatedir' option of the configure script, this will expand to
> `${prefix}/var', i. e. the $prefix variable is _not_ expanded.
> 
> _A_ solution may be to expand the variable in the configure script. I'm
> not sure if there is a nice way to do this

No, there is no nice way to do that. The reason why this does not get
expanded in the configure script is to be able to overwrite the value
when running make.

> If you (or anyone else on the list) knows a nice and clean way to expand
> these variables, a solution using AC_SUBST would be the way to go.

This should be done in the Makefile. IIrc, the autoconf or automake
manual even provides an example how to do that fairly nice.

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080619/b43ae5c1/attachment.pgp 


More information about the collectd mailing list