From: Bill Moseley <[EMAIL PROTECTED]>

Yes, that's exactly my question -- how to change the default value of
$(libexecdir). I've tried adding the variable in the configure script as
you suggest:


libexecdir=$(prefix)/lib

and that will set libexecdir, but $(prefix) is undefined so it tries to
install in /lib/$(PACKAGE).  And that also prevents overriding with
--libexecdir option.  So that's not going to work.

I believe you want to do this:


libexecdir='${prefix}/lib'

which will carry over unexpanded to your Makefiles, where prefix is given a proper value. That way, someone can do

make install prefix=/some/other/place

and the Right Thing (tm) happens. The Gnu guidelines mandate this, for what it's worth.

I use acconfig.h (generated by autoheader).  Can I get $libexecdir (or
$(libexecdir)/$(PACKAGE) into acconfig.h so I can use it in my C code?
Or should I use @libexecdir@ in something like foo_CPPFLAGS when
building foo?  Seems like acconfig.h would be a good place to define
that.

I don't do Automake, but I'd say you should do neither of the above - you should do something like


foo_CPPFLAGS = '-Dlibexecdir=${libexecdir}'

for the same reason as above - if someone changes prefix or libexecdir at install time via the make command line, your executable is going to have the wrong value hard-coded into it.

- John Burger
  MITRE






Reply via email to