autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default for libexecdir


From: John Burger
Subject: Re: Default for libexecdir
Date: Thu, 3 Apr 2003 17:44:22 -0500

From: Bill Moseley <address@hidden>

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

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