autoconf
[Top][All Lists]
Advanced

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

Re: Autoconf and apt


From: Allan Clark
Subject: Re: Autoconf and apt
Date: Tue, 19 Aug 2008 13:11:27 -0400

On Tue, Aug 19, 2008 at 03:24, Erik de Castro Lopo <address@hidden>wrote:

> Robert Rehammar wrote:
> > This way autotools would
> > integrate with (e.g.) apt to make installations more smooth. This would
> > save the user the work to download and install all packages that bar
> > depends on and that exists in the apt repository.
>
> A better idea would be to defined an M4 macro which wraps AC_CHECK_LIB
> and the PKG_CHECK_* macros. The wrapper would be called with whatever
> info is required to see if the library is installed plus the name of
> the required debian package.
>
> If the macro fails to find the lib using AC_CHECK_LIB/PKG_CHECK_* then
> it would add the debian package name to a list. At the end of the config
> process if the debian package name list is not empty, it would print
> out something like:
>
>  AC_MSG_ERROR([Missing packages. Please run 'apt-get install $deb_pkgs'.])


The product of autoconf is a script that runs on possibly different
environment than it was built on.  For example, running "autoconf" building
a configure that is sued later on a Solaris box.

The safest step would be:

AC_MSG_ERROR([Missing component $foo probably provided by project $bar or
package $dog.])

In short, this allows for possible later extensions, while taking a step
towards that in a helpful hint-message.

This could later be extended so that if there's a platform-specific "go get
lib$foo" script to translate to a "apt-get build-dep $thispkg" or "apt-get
install $foo" or "pkgadd $dog" or "custom -i $dog" or "dpkg install $bar" or
"yum -y install $dog".  A URI could also be given in the $foo maintainers to
allow for equivalent package/project names to help resolve this dependnecy,
but that only a possibility.  The first step would probably be the "hint"
message that possibly takes maintainer-declared hints of a list of canonical
identifiers.  ...ugh, maintaining that list could suck, but this is the
possibility that this kind of step takes in a way that doesn't put the
maintenance burden onto Autoconf's shoulders.

Allan
-- 
address@hidden "金鱼" http://linkedin.com/in/goldfish
please, no proprietary attachments (http://tinyurl.com/cbgq)

reply via email to

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