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

Re: [RFC] GNU autoconf and dpkg-architecture

On Tue, Feb 05, 2002 at 05:46:13PM -0500, Steve M. Robbins wrote:
> >   confflags += $(DEB_HOT_GNU_TYPE)
> > else
> >   confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
> > endif
> I think you (or RMS) have got it backwards.  If you are NOT going to
> cross-compile, it is --build that you want to specify.  To cross-compile
> specify both --build and --host.

Oh no!  You are right.  This is a horrible mess.  I wonder why they changed
it, because the old way to do it made perfectly sense (well, ok, the new
mway makes sense as well, but oh man).

This is my revised set of example of what to do:

For autoconf2.52 and later: (this is WRONG for older autoconf)
confflags += --build $(DEB_BUILD_GNU_TYPE)
  confflags += --host $(DEB_HOST_GNU_TYPE)

For autoconf 2.13: (this will generate a warning
if used with autoconf 2.52, but will still work until autoconf 3)
  confflags += $(DEB_HOST_GNU_TYPE)
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)

For I-don't-care-and-don't-know-what-I-am-doing: (might not work for some packages)
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)

The last one is safe autoconf-wise (works with any version), but might not
be safe package-wise (some older packages might choke on the build arch
being specified).

> One more reason to dig through the autoconf archives or
> ask Akim about it.  You wouldn't want to find out that you're giving the
> wrong arguments to old configure scripts.

The autoconf manual is quite clear about it ("Specifying the System Type")

> You know, all this is just way too fiddly.

Ah, no.  It is confusing at first glance, but if you know what you do (and I
think we worked it out now), it doesn't change, so there is no problem in
documenting it.

> I can imagine that a debian/rules file gets busted by a typo.

Is that a quote from "Univeral truth about programming", Vol I ? ;)

> Maybe the best thing to do
> is shove it all into a helper script --- dh_configure anyone?

I don't think this is suitable stuff for a helper script.  You do this
before the rules in the Makefile, so you would have to include a helper
Makefile snippet.  This makes sense to some extent, if you can autodetect
the autoconf version used etc.  But I don't think this needs to be part of
dh or anything like that, you can just write such a Makefile snippet and
include it in the package manual or whereever the gory details will be
documented, and people can copy it into their packages and modify it as


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

Reply to: