[Top][All Lists]

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

Re: (wishlist) Automated lib-config script generation

From: Guido Draheim
Subject: Re: (wishlist) Automated lib-config script generation
Date: Mon, 23 Jul 2001 02:01:02 +0200

Tim Van Holder wrote:
> > Nowadays, many shared libraries include a -config script e.g. libgtk
> > [...]
> > There is much duplication of code here.  Anyone wishing to use this
> > scheme must duplicate the script and then amend it for their use, and
> > also convert the m4 macro as well, to AM_PATH_<LIB>.  libtool could be
> > used to automate this.  Currently I maintain the gimp-print build
> It seems to me this really is something that would fall under autoconf's
> jurisdiction, so I've CC'd that list.
> >[...]
> > To remove the need for m4 macro duplication, a single macro could be
> > used instead.  E.g.:
> >
> > AC_PATH_LIB(libname, minimum_version, header, config-script)
> > where libname is the name of the library to check for e.g. gtk, gimp.
> >       minimum version is the lowest version to allow
> >       header is the header to include when compiling the test program
> >         (default libname/libname.h)
> >       script is the config script to run (default libname-config)
> This seems potentially useful, though it would depend on how compatible
> <lib>-config scripts actually are (i.e. if gtk-config and sdl-config,
> for example, were to take different options, the usefulness of this
> macro would be limited at best).
> > Duplication of the config scripts is unavoidable, as information such
> > as library location, libraries to link against, and header locations
> > are hard-coded into them.  However, an m4 macro could be used to
> > generate them.  E.g.:
> >
> > AC_LIB_CONFIG(libname, location)
> > this would generate the script libname-config in the specified
> > location in the source tree.  The following variables would be used in
> That should be be AC_CONFIG_LIBCONFIG, to match the existing
> AC_CONFIG_* macros.  I'm not sure this has to be a specific macro though,
> as it could be easily created using the existing config.status mechanism.
> [...]

There is a generic-config macro that I'm using quite often. However it
does not implant code into config.status - it would be best to have
that done somehow. Anyway, check the m4 source in the ac-archive under:

btw, it does complement a generic lib-check macro that can be found as:

-- guido                         http://www.gnu.org/software/ac-archive
31:GCS/E/S/P C++$++++ ULHS L++w- N++@  d(+-) s+a- h.r(*@)>+++ y++ 5++X-

reply via email to

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