[Top][All Lists]

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

Re: extending directory selection, --pkglibdir

From: Ralf Wildenhues
Subject: Re: extending directory selection, --pkglibdir
Date: Wed, 6 Sep 2006 11:30:49 +0200
User-agent: Mutt/1.5.13 (2006-09-01)

* Tommi Mäkitalo wrote on Wed, Sep 06, 2006 at 10:59:30AM CEST:
> Am Mittwoch, 6. September 2006 10:18 schrieb Ralf Wildenhues:
> >
> >   AC_SUBST([pkglibdir], ['${libdir}/'$PACKAGE])

> I want to have a configure-switch, so the packager can decide, where to 
> install them. Something like:
> ./configure --pkgdir=/usr/lib/some/where/else
> Default will be $libdir/$PACKAGE.

So how about this in, after AM_INIT_AUTOMAKE:
    [AS_HELP_STRING([--enable-pkglibdir=DIR], [library modules directory])
    [case $enableval in
      yes|no) AC_MSG_ERROR([invalid pkglibdir `$enableval']) ;;
      *) pkglibdir=$enableval;;

(--with is supposed to be only for decisions about external software, see

You could then add -DPKGLIBDIR="$(pkglibdir)" and
  lt_dlsetsearchpath (PKGLIBDIR);

in your code, before `lt_dlopen'ing the libraries.

Adding --pkglibdir support to Autoconf would be a possibility, but it
would require changing the GNU Coding Standards, which do not allow all
kinds of arbitrary options to configure scripts.  This is done so that
users can execute (possibly recursively) all kinds of configure scripts
and pass identical options to them: --with-* and --enable-* are ignored
for values not recognized in a specific configure script, whereas
arbitrary other options are not ignored.  (Not knowing whether those
took an argument or not prevents robust parsing of the command line in
that case.)

And changing the GCS is not a step done lightly.

Hope that helps.


reply via email to

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