On Thu, 3 Apr 2003, Russ Allbery wrote: > If you have fifty support programs, and install them directly into > libexecdir, then when I build your package they all end up directly in > /usr/local/lib. Ick. You want to install things into a subdirectory of > libexecdir instead.
Oh, yes. Sorry, that was a given to install in a $(PACKAGE) subdirectory For example, I currently use this in the Makefile.am[1]: helperdir = $(libexecdir)/$(PACKAGE) helper_SCRIPTS = some_helper_script > (I unfortunately don't know how to make it default to .../lib or I'd let > you know. You may be able to just set the shell variable directly, > though, at the top of your configure script. I'd try that first.) 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 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. > > It's probably easier to go the CPPFLAGS route since that makes sure all > the variables get expanded for you. Ok. Just seems like since I'm already using a acconfig.h file, it would be a nice place too keep all the defines. And means I'll need a wider screen when compiling... ;) Thanks again, [1] Actually, I'd like to set "helperdir" in configure so that I don't have to define it in every Makefie.am, but that's yet another thing I can't seem to make work: scriptdir="$(libexecdir)/$(PACKAGE)" AC_SUBST(scriptdir) results in: ./configure: line 1: libexecdir: command not found ./configure: line 1: PACKAGE: command not found Here's my test setups: $ cat configure.in AC_PREREQ(2.50) AC_INIT(somescript) PACKAGE=mypackage VERSION=1.0 AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AC_PROG_CC scriptdir="$(libexecdir)/$(PACKAGE)/config" AC_SUBST(scriptdir) AC_CONFIG_FILES(Makefile) AC_OUTPUT $ cat Makefile.am ## seems I need to have a program, can't just install a script. bin_PROGRAMS = lala lala_SOURCES = lala.c helperdir = $(libexecdir)/$(PACKAGE) helper_SCRIPTS = somescript mydir = $(scriptdir) my_SCRIPTS = myscript -- Bill Moseley [EMAIL PROTECTED]
