Henrique,

> (GNU makefile snippet):

> export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
> export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

>       ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
>       ....... (other configure options) ......

> This will tell configure to build for the proper architecture, even if you do
> not use dpkg-buildpackage, or manually override DEB_HOST_GNU_TYPE and
> DEB_BUILD_GNU_TYPE for cross-compiling.  It requires GNU make and dpkg-dev, but
> those packages are build-essential in Debian, so that should not be a problem.

If this is the recommended way to call ./configure, should it any longer
be recommended to import updated config.guess scripts from autotools-dev?
One still needs config.sub, but playing with config.guess just gives you
larger diffs.  I think it would be good to state this in the readme.

Also, to canonicalize the host and build values, the above should be

        ./configure --build=$(DEB_BUILD_GNU_TYPE)-gnu --host=$(DEB_HOST_GNU_TYPE)-gnu \
        ....... (other configure options) ......

since the -gnu isn't part of the value that dpkg-architecture returns.

Cheers,
Steve Langasek
postmodern programmer

Attachment: msg04918/pgp00000.pgp
Description: PGP signature

Reply via email to