From MAILER-DAEMON Sun Jul 01 06:12:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SlH8M-0004gN-G3
	for mharc-autoconf@gnu.org; Sun, 01 Jul 2012 06:12:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35456)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SlH8I-0004cz-Am
	for autoconf@gnu.org; Sun, 01 Jul 2012 06:11:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SlH8G-0005ZY-Tc
	for autoconf@gnu.org; Sun, 01 Jul 2012 06:11:57 -0400
Received: from smtp.univ-evry.fr ([194.199.90.27]:58897
	helo=chaos.univ-evry.fr) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SlH8G-0005ZL-N8
	for autoconf@gnu.org; Sun, 01 Jul 2012 06:11:56 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0IAJ4h8E/Cx1WL/2dsb2JhbABFg0GiTQGQSoEHglcCih+aPKA6jjmDHAOVNIkmhl2CYQ
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos.univ-evry.fr with ESMTP; 01 Jul 2012 12:11:53 +0200
Date: Sun, 1 Jul 2012 12:11:53 +0200 (CEST)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: autoconf@gnu.org
Subject: m4_foreach_w and "options"
Message-ID: <Pine.LNX.4.64.1207011204140.12235@grozny.maths.univ-evry.fr>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.199.90.27
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jul 2012 10:11:59 -0000


Hey

usually, when we want to write an m4 macro that will be used like that:

my_macro([foo1 foo2])

we can use m4_foreach_w:

AC_DEFUN([my_macro],
[
m4_foreach_w([fct], [$2], [my_check(m4_defn([fct]))])
])

But I would like to write am m4 macro that would be used like that:

my_macro([foo1 foo2], [bar1 bar2])

and I would like to "associate" bar1 to foo1 and bar2 to foo2 (bar* would 
options for the macros called by m4_foreach_w() in my_check (see above)), 
that is

for foo1, my_check would be called with bar1
for foo2, my_check would be called with bar2

is it possible ?

thank you

Vincent Torri


From MAILER-DAEMON Mon Jul 02 13:02:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Slk1G-0005fv-B0
	for mharc-autoconf@gnu.org; Mon, 02 Jul 2012 13:02:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50342)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Slk19-0005eK-E9
	for autoconf@gnu.org; Mon, 02 Jul 2012 13:02:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Slk12-0004Mn-9F
	for autoconf@gnu.org; Mon, 02 Jul 2012 13:02:30 -0400
Received: from mx1.redhat.com ([209.132.183.28]:26606)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Slk12-0004MR-0c
	for autoconf@gnu.org; Mon, 02 Jul 2012 13:02:24 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q62H2M46010306
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 2 Jul 2012 13:02:22 -0400
Received: from [10.3.113.29] (ovpn-113-29.phx2.redhat.com [10.3.113.29])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q62H2L0b023053; Mon, 2 Jul 2012 13:02:22 -0400
Message-ID: <4FF1D41B.1090001@redhat.com>
Date: Mon, 02 Jul 2012 11:02:19 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Vincent Torri <vtorri@univ-evry.fr>
Subject: Re: m4_foreach_w and "options"
References: <Pine.LNX.4.64.1207011204140.12235@grozny.maths.univ-evry.fr>
In-Reply-To: <Pine.LNX.4.64.1207011204140.12235@grozny.maths.univ-evry.fr>
X-Enigmail-Version: 1.4.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigCD3741BD9F897ADF85F6370A"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Jul 2012 17:02:36 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCD3741BD9F897ADF85F6370A
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 07/01/2012 04:11 AM, Vincent Torri wrote:

> But I would like to write am m4 macro that would be used like that:
>=20
> my_macro([foo1 foo2], [bar1 bar2])
>=20
> and I would like to "associate" bar1 to foo1 and bar2 to foo2 (bar*
> would options for the macros called by m4_foreach_w() in my_check (see
> above)), that is
>=20
> for foo1, my_check would be called with bar1
> for foo2, my_check would be called with bar2
>=20
> is it possible ?

Not directly with a single m4_foreach_w, but it would be possible with
other macro constructs.  Note that m4 is better suited for
comma-separated lists instead of whitespace-separated lists, as the
first part of my suggestion below is just to convert my_macro into a
call to _my_macro with my preferred comma separation.

m4_define([my_macro],
[_$0(m4_dquote(m4_map_args_w([$1], [], [], [,])),
     m4_dquote(m4_map_args_w([$2], [], [], [,])))])
m4_define([_my_macro],
[m4_for([i], [1], m4_count($1), [],
  [my_pair(m4_argn(i, $1), m4_argn(i, $2))])])

Then define my_pair([arg1], [arg2]) do do whatever you want with an
individual pair.

I just tested it myself, and satisfied myself that:

my_macro([a b c], [1 2 3])

invokes

_my_macro([[a], [b], [c]], [[1], [2], [3]])

invokes

my_pair([a], [1])my_pair([b], [2])my_pair([c], [3])

You can also add some sanity checking in _my_macro, such as whether
m4_count($1) and m4_count($2) are equal.

Do be aware that what I've written is inherently quadratic at best,
since m4_argn is O(n) rather than O(1) in the amount of text that it
parses, and you are calling m4_argn with O(n) iterations - if users
start passing huge lists of names to be paired, they will experience a
noticeable slowdown due to the scaling effects.  There may be a more
efficient way to crawl through two whitespace-separated lists at once
and form pairs in a single O(n) pass, but such an operation is not
natively provided by m4, and would probably involve a lot of black magic
abuse of the m4 language (the sort of thing that m4sugar is already
doing for you in its implementation of m4_foreach_w); but I don't think
autoconf has such a method already available.

Maybe you should also consider having your users pass in the arguments
already paired, as in:

my_macro([[foo1, bar1], [foo2, bar2]])

at which point life is much easier for you to operate on each pair in
the order they were passed, instead of you having to crawl through the
two lists to create the pairings yourself.  Changing your calling
conventions in that manner would also make it much easier to write an
O(N) algorithm instead of an O(N^2) one.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enigCD3741BD9F897ADF85F6370A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJP8dQcAAoJEKeha0olJ0Nq3zAH/Rt96+X9Vkd+cHK3ntR+QnSd
Cm622A/XIP9dbOnWp5VGv1YP43acIxhxwemwA5s+1ee3AOgtRSItFSREzAG3Mg7N
fsUE2FmqC2lcbdM72H+Ycimiydhj/HnN3FzgBIaZuMdr1Cpy13PX9nHp3X7BQZE1
/QB93SV+ptaGwk8bO/lWLR8qdgHeaupGMHfWPfWusuJsgdFQutJaWg+XGAys9heE
YB4YLq1FZ4UAfbQuYBAiQC35HdG2upcpgQZlUOFOBnMwAPtwm2Kolnn9Mn/LjP2L
U3qvc1gWRmL1gdjNjWlwx3V/QpHGN44iH2lpvJwRLQHSnEgU7/7S6Kx1omNssiA=
=/ilI
-----END PGP SIGNATURE-----

--------------enigCD3741BD9F897ADF85F6370A--


From MAILER-DAEMON Tue Jul 03 02:58:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Slx4a-0008Cz-7D
	for mharc-autoconf@gnu.org; Tue, 03 Jul 2012 02:58:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50413)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Slx4X-0008Ck-0o
	for autoconf@gnu.org; Tue, 03 Jul 2012 02:58:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Slx4U-0002FG-OT
	for autoconf@gnu.org; Tue, 03 Jul 2012 02:58:52 -0400
Received: from chaos.univ-evry.fr ([194.199.90.27]:48656)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Slx4U-0002Dt-Hl
	for autoconf@gnu.org; Tue, 03 Jul 2012 02:58:50 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EACOX8k/Cx1WL/2dsb2JhbABCA7ZsgQeCGAEBBAE4Aj8FCwsOCi5XBhMZAodrCbs0iziCeYMhA5U1gRKIFIZdgmE
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos.univ-evry.fr with ESMTP; 03 Jul 2012 08:58:45 +0200
Date: Tue, 3 Jul 2012 08:58:43 +0200 (CEST)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: Eric Blake <eblake@redhat.com>
Subject: Re: m4_foreach_w and "options"
In-Reply-To: <4FF1D41B.1090001@redhat.com>
Message-ID: <Pine.LNX.4.64.1207030857430.12235@grozny.maths.univ-evry.fr>
References: <Pine.LNX.4.64.1207011204140.12235@grozny.maths.univ-evry.fr>
	<4FF1D41B.1090001@redhat.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.199.90.27
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jul 2012 06:58:54 -0000



On Mon, 2 Jul 2012, Eric Blake wrote:

> On 07/01/2012 04:11 AM, Vincent Torri wrote:
>
>> But I would like to write am m4 macro that would be used like that:
>>
>> my_macro([foo1 foo2], [bar1 bar2])
>>
>> and I would like to "associate" bar1 to foo1 and bar2 to foo2 (bar*
>> would options for the macros called by m4_foreach_w() in my_check (see
>> above)), that is
>>
>> for foo1, my_check would be called with bar1
>> for foo2, my_check would be called with bar2
>>
>> is it possible ?
>
> Not directly with a single m4_foreach_w, but it would be possible with
> other macro constructs.  Note that m4 is better suited for
> comma-separated lists instead of whitespace-separated lists, as the
> first part of my suggestion below is just to convert my_macro into a
> call to _my_macro with my preferred comma separation.
>
> m4_define([my_macro],
> [_$0(m4_dquote(m4_map_args_w([$1], [], [], [,])),
>     m4_dquote(m4_map_args_w([$2], [], [], [,])))])
> m4_define([_my_macro],
> [m4_for([i], [1], m4_count($1), [],
>  [my_pair(m4_argn(i, $1), m4_argn(i, $2))])])
>
> Then define my_pair([arg1], [arg2]) do do whatever you want with an
> individual pair.
>
> I just tested it myself, and satisfied myself that:
>
> my_macro([a b c], [1 2 3])
>
> invokes
>
> _my_macro([[a], [b], [c]], [[1], [2], [3]])
>
> invokes
>
> my_pair([a], [1])my_pair([b], [2])my_pair([c], [3])
>
> You can also add some sanity checking in _my_macro, such as whether
> m4_count($1) and m4_count($2) are equal.
>
> Do be aware that what I've written is inherently quadratic at best,
> since m4_argn is O(n) rather than O(1) in the amount of text that it
> parses, and you are calling m4_argn with O(n) iterations - if users
> start passing huge lists of names to be paired, they will experience a
> noticeable slowdown due to the scaling effects.  There may be a more
> efficient way to crawl through two whitespace-separated lists at once
> and form pairs in a single O(n) pass, but such an operation is not
> natively provided by m4, and would probably involve a lot of black magic
> abuse of the m4 language (the sort of thing that m4sugar is already
> doing for you in its implementation of m4_foreach_w); but I don't think
> autoconf has such a method already available.
>
> Maybe you should also consider having your users pass in the arguments
> already paired, as in:
>
> my_macro([[foo1, bar1], [foo2, bar2]])

I think that this is the best solution, actually.

thank you

Vincent Torri

> at which point life is much easier for you to operate on each pair in
> the order they were passed, instead of you having to crawl through the
> two lists to create the pairings yourself.  Changing your calling
> conventions in that manner would also make it much easier to write an
> O(N) algorithm instead of an O(N^2) one.
>
> -- 
> Eric Blake   eblake@redhat.com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>


From MAILER-DAEMON Wed Jul 04 02:58:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SmJY1-0008Hf-TX
	for mharc-autoconf@gnu.org; Wed, 04 Jul 2012 02:58:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39802)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SmJXz-0008HV-Or
	for autoconf@gnu.org; Wed, 04 Jul 2012 02:58:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SmJXy-0001Oa-2z
	for autoconf@gnu.org; Wed, 04 Jul 2012 02:58:47 -0400
Received: from smtp.univ-evry.fr ([194.199.90.26]:10172
	helo=chaos2.univ-evry.fr) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SmJXx-0001OP-Sh
	for autoconf@gnu.org; Wed, 04 Jul 2012 02:58:46 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAMno80/Cx1WL/2dsb2JhbABEtyCBB4IYAQEEATgCRAtRV4gfCbppizmDG4McAwSVM4kmhl2CYQ
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos2.univ-evry.fr with ESMTP; 04 Jul 2012 08:58:43 +0200
Date: Wed, 4 Jul 2012 08:58:43 +0200 (CEST)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: autoconf@gnu.org
Subject: m4_foreach_w vs m4_foreach
In-Reply-To: <4FF1D41B.1090001@redhat.com>
Message-ID: <Pine.LNX.4.64.1207040856240.12235@grozny.maths.univ-evry.fr>
References: <Pine.LNX.4.64.1207011204140.12235@grozny.maths.univ-evry.fr>
	<4FF1D41B.1090001@redhat.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.199.90.26
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Jul 2012 06:58:49 -0000



On Mon, 2 Jul 2012, Eric Blake wrote:

> Not directly with a single m4_foreach_w, but it would be possible with
> other macro constructs.  Note that m4 is better suited for
> comma-separated lists instead of whitespace-separated lists,

when you say 'better suited', you mean faster ?

I ask because I used a simple macro that uses m4_foreach_w. Should I use 
m4_foreach instead ?

Vincent Torri


From MAILER-DAEMON Wed Jul 04 06:50:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SmNA7-0006KX-SX
	for mharc-autoconf@gnu.org; Wed, 04 Jul 2012 06:50:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43923)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SmNA1-0006Io-5D
	for autoconf@gnu.org; Wed, 04 Jul 2012 06:50:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SmN9w-0007cJ-6y
	for autoconf@gnu.org; Wed, 04 Jul 2012 06:50:16 -0400
Received: from mx1.redhat.com ([209.132.183.28]:25101)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SmN9v-0007c6-Uw
	for autoconf@gnu.org; Wed, 04 Jul 2012 06:50:12 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q64Ao8aW009353
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 4 Jul 2012 06:50:09 -0400
Received: from [10.3.113.17] ([10.3.113.17])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q64Ao7BY026317; Wed, 4 Jul 2012 06:50:08 -0400
Message-ID: <4FF41FDF.6010105@redhat.com>
Date: Wed, 04 Jul 2012 04:50:07 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Vincent Torri <vtorri@univ-evry.fr>
Subject: Re: m4_foreach_w vs m4_foreach
References: <Pine.LNX.4.64.1207011204140.12235@grozny.maths.univ-evry.fr>
	<4FF1D41B.1090001@redhat.com>
	<Pine.LNX.4.64.1207040856240.12235@grozny.maths.univ-evry.fr>
In-Reply-To: <Pine.LNX.4.64.1207040856240.12235@grozny.maths.univ-evry.fr>
X-Enigmail-Version: 1.4.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigFD15A560D69D6AA429AF32D2"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Jul 2012 10:50:21 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigFD15A560D69D6AA429AF32D2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 07/04/2012 12:58 AM, Vincent Torri wrote:
>=20
>=20
> On Mon, 2 Jul 2012, Eric Blake wrote:
>=20
>> Not directly with a single m4_foreach_w, but it would be possible with=

>> other macro constructs.  Note that m4 is better suited for
>> comma-separated lists instead of whitespace-separated lists,
>=20
> when you say 'better suited', you mean faster ?

Yes.  m4_foreach_w is more or less a wrapper that converts spaces into
commas, then calls m4_foreach on the comma-separated result.  Starting
with comma-separated lists in the first place can use native m4 handling
rather than having to do under-the-hood conversions.

>=20
> I ask because I used a simple macro that uses m4_foreach_w. Should I us=
e
> m4_foreach instead ?

That all depends on the syntax you want your users to be aware of.
There are some cases where whitespace-separated lists are easier for
users to type.  Furthermore, in autoconf particularly, there is a
benefit to using whitespace separation when you are interacting with
shell code output (for example, having the flexibility to write 'for i
in $1; do', but also do m4 processing on each element of $1).  In other
words, the trade-off between m4 speed and ease of use is not always trivi=
al.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enigFD15A560D69D6AA429AF32D2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJP9B/fAAoJEKeha0olJ0NqZAYIAJaSDLOFyjGYgZpWbBfxw6mh
6ggSeB2UwX5T3hCU2p9MBMABxGKE76KvV0AR7lKNnLdt+6tm7+DJ7B7+MVxu0KJn
GsWW614KYbo7ZSlGLw09FGp2I+zs60TUzMrqK0xzTA3tJ0wdi+C//MuwvBEwAZLa
29W7qHfp1Uh3VX2MEpYBlaJ0tiNWjTmBeNDtvPszpC2MABf5JR7SEJtspqZ8P1Tc
1b0xTuTeg88xVQwYY1S0nG80a6Nu2ABGiYZ2dWDmN5Ki3qKUPv/oUX32/dkL/KfO
R5z9Se/vR5PDl5Ci/DkuqUg3qaS5QEbXiEPCOCHaw/70ER3JIGjOqPPPLb5czc0=
=LHdJ
-----END PGP SIGNATURE-----

--------------enigFD15A560D69D6AA429AF32D2--


From MAILER-DAEMON Wed Jul 04 07:34:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SmNqt-0006a4-Jw
	for mharc-autoconf@gnu.org; Wed, 04 Jul 2012 07:34:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56961)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SmNqm-0006Zc-R7
	for autoconf@gnu.org; Wed, 04 Jul 2012 07:34:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SmNql-00031B-55
	for autoconf@gnu.org; Wed, 04 Jul 2012 07:34:28 -0400
Received: from smtp.univ-evry.fr ([194.199.90.27]:21305
	helo=chaos.univ-evry.fr) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1SmNqk-0002zz-Uu
	for autoconf@gnu.org; Wed, 04 Jul 2012 07:34:27 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EACMp9E/Cx1WL/2dsb2JhbABEs0qDUoEHghgBAQQBOAI/BQsLDgouVwaIGQm7OYs5hjcDlTeJJoZdgmE
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos.univ-evry.fr with ESMTP; 04 Jul 2012 13:34:20 +0200
Date: Wed, 4 Jul 2012 13:34:17 +0200 (CEST)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: Eric Blake <eblake@redhat.com>
Subject: Re: m4_foreach_w vs m4_foreach
In-Reply-To: <4FF41FDF.6010105@redhat.com>
Message-ID: <Pine.LNX.4.64.1207041332090.4784@grozny.maths.univ-evry.fr>
References: <Pine.LNX.4.64.1207011204140.12235@grozny.maths.univ-evry.fr>
	<4FF1D41B.1090001@redhat.com>
	<Pine.LNX.4.64.1207040856240.12235@grozny.maths.univ-evry.fr>
	<4FF41FDF.6010105@redhat.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.199.90.27
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Jul 2012 11:34:34 -0000



On Wed, 4 Jul 2012, Eric Blake wrote:

> On 07/04/2012 12:58 AM, Vincent Torri wrote:
>>
>>
>> On Mon, 2 Jul 2012, Eric Blake wrote:
>>
>>> Not directly with a single m4_foreach_w, but it would be possible with
>>> other macro constructs.  Note that m4 is better suited for
>>> comma-separated lists instead of whitespace-separated lists,
>>
>> when you say 'better suited', you mean faster ?
>
> Yes.  m4_foreach_w is more or less a wrapper that converts spaces into
> commas, then calls m4_foreach on the comma-separated result.  Starting
> with comma-separated lists in the first place can use native m4 handling
> rather than having to do under-the-hood conversions.
>
>>
>> I ask because I used a simple macro that uses m4_foreach_w. Should I use
>> m4_foreach instead ?
>
> That all depends on the syntax you want your users to be aware of.
> There are some cases where whitespace-separated lists are easier for
> users to type.  Furthermore, in autoconf particularly, there is a
> benefit to using whitespace separation when you are interacting with
> shell code output (for example, having the flexibility to write 'for i
> in $1; do', but also do m4 processing on each element of $1).  In other
> words, the trade-off between m4 speed and ease of use is not always trivial.

as I'm the maintainer of the autotools, I use the syntax I want. I just 
want to call m4 macro for all the tokens, so using a comma separated list 
is fine.

thank you

Vincent Torri


From MAILER-DAEMON Mon Jul 09 15:11:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SoJMX-0006Z3-TY
	for mharc-autoconf@gnu.org; Mon, 09 Jul 2012 15:11:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45702)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <perkinjo@cse.ohio-state.edu>) id 1SoG8l-0008Nm-K7
	for autoconf@gnu.org; Mon, 09 Jul 2012 11:44:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <perkinjo@cse.ohio-state.edu>) id 1SoG8j-0002RH-DZ
	for autoconf@gnu.org; Mon, 09 Jul 2012 11:44:47 -0400
Received: from mail.cse.ohio-state.edu ([164.107.115.49]:42366
	helo=cse.ohio-state.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <perkinjo@cse.ohio-state.edu>) id 1SoG8j-0002R1-8V
	for autoconf@gnu.org; Mon, 09 Jul 2012 11:44:45 -0400
Received: from cse.ohio-state.edu (nowlab.cse.ohio-state.edu [164.107.116.100])
	(authenticated bits=0)
	by cse.ohio-state.edu (8.12.11.20060308/8.12.11) with ESMTP id
	q69Fifnd023667
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
	Mon, 9 Jul 2012 11:44:42 -0400 (EDT)
Date: Mon, 9 Jul 2012 11:44:41 -0400
From: Jonathan Perkins <perkinjo@cse.ohio-state.edu>
To: autoconf@gnu.org
Subject: Cross Compilation for Intel MIC
Message-ID: <20120709154441.GM28363@cse.ohio-state.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Solaris 8 (1)
X-Received-From: 164.107.115.49
X-Mailman-Approved-At: Mon, 09 Jul 2012 15:11:13 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Jul 2012 15:44:50 -0000

Hi all:
I hope that I'm posting on the right place.  Please point me in the
right direction if this is not.

I'm working with software which uses autoconf as part of its build
system.  Currently we're working with emerging hardware (Intel MIC) that
is based on x86_64 but the executables will not run on the plain x86_64
build system.

To get configure to work we've forced it to cross compile using the
following...

    ./configure --host=blackfin ...

This works reasonably well but I wonder if there is a better and more
direct way.  The first thing that comes to mind is to be able to specify

    ./configure --host=mic

instead.  This should behave similarly with the hopeful addition of
adding the correct options to the compiler used (currently we use icc
-mmic).

So the question, has this sort of thing been done previously?  If not,
what would be the proper way forward.  I've read in a paper that an arch
can be added to config.sub but I'm not sure of what all this entails.

Thanks in advance for any help that can be provided.

-- 
Jonathan Perkins
http://www.cse.ohio-state.edu/~perkinjo


From MAILER-DAEMON Fri Jul 13 11:50:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Spi8E-0000zi-Qr
	for mharc-autoconf@gnu.org; Fri, 13 Jul 2012 11:50:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53043)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <maynardj@us.ibm.com>) id 1Sphx0-000786-HS
	for autoconf@gnu.org; Fri, 13 Jul 2012 11:38:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <maynardj@us.ibm.com>) id 1Sphwz-0002TM-Ae
	for autoconf@gnu.org; Fri, 13 Jul 2012 11:38:38 -0400
Received: from e36.co.us.ibm.com ([32.97.110.154]:50277)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <maynardj@us.ibm.com>) id 1Sphwz-0002TD-44
	for autoconf@gnu.org; Fri, 13 Jul 2012 11:38:37 -0400
Received: from /spool/local
	by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only!
	Violators will be prosecuted
	for <autoconf@gnu.org> from <maynardj@us.ibm.com>;
	Fri, 13 Jul 2012 09:38:34 -0600
Received: from d01dlp03.pok.ibm.com (9.56.224.17)
	by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway:
	Authorized Use Only! Violators will be prosecuted; 
	Fri, 13 Jul 2012 09:37:46 -0600
Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236])
	by d01dlp03.pok.ibm.com (Postfix) with ESMTP id AB31AC90063
	for <autoconf@gnu.org>; Fri, 13 Jul 2012 11:37:40 -0400 (EDT)
Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167])
	by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id
	q6DFbdLD300922
	for <autoconf@gnu.org>; Fri, 13 Jul 2012 11:37:40 -0400
Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1])
	by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP
	id q6DFbH28017131
	for <autoconf@gnu.org>; Fri, 13 Jul 2012 09:37:18 -0600
Received: from oc3431575272.ibm.com (sig-9-65-210-121.mts.ibm.com
	[9.65.210.121])
	by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id
	q6DFbHmS017057
	for <autoconf@gnu.org>; Fri, 13 Jul 2012 09:37:17 -0600
Message-ID: <500040AD.9090700@us.ibm.com>
Date: Fri, 13 Jul 2012 10:37:17 -0500
From: Maynard Johnson <maynardj@us.ibm.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.5) Gecko/20120601 Thunderbird/10.0.5
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: configuring with non-standard location of gcc
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Content-Scanned: Fidelis XPS MAILER
x-cbid: 12071315-7606-0000-0000-000001FB9889
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 32.97.110.154
X-Mailman-Approved-At: Fri, 13 Jul 2012 11:50:13 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Jul 2012 15:38:42 -0000

Hi,
I'm working on a project that uses autoconf/automake.  Currently, the configure.in defined for this project has a "--with-gcc" option that was added back in 2005 to allow specifying the location of the compiler to use.  I'm doing some cleanup of our configure script and have found that this option simply doesn't work since our use of AC_PROG_CC is being executed prior to the "--with-gcc" option, even though the configure.in has the "--with-gcc" option first.  In my investigation of this issue, it seems to me that the "--with-gcc" option is not a valid method for setting CC, and that users should pass "CC=blah" to ./configure instead.  Is that correct?

Thanks.
-Maynard



From MAILER-DAEMON Fri Jul 13 11:54:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SpiCU-000245-Og
	for mharc-autoconf@gnu.org; Fri, 13 Jul 2012 11:54:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59978)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SpiCP-00022z-4E
	for autoconf@gnu.org; Fri, 13 Jul 2012 11:54:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SpiCK-0006om-5g
	for autoconf@gnu.org; Fri, 13 Jul 2012 11:54:32 -0400
Received: from mx1.redhat.com ([209.132.183.28]:63397)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SpiCJ-0006oU-Tm
	for autoconf@gnu.org; Fri, 13 Jul 2012 11:54:28 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6DFsQ8k026030
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 13 Jul 2012 11:54:26 -0400
Received: from [10.3.113.64] (ovpn-113-64.phx2.redhat.com [10.3.113.64])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q6DFsQoT001991; Fri, 13 Jul 2012 11:54:26 -0400
Message-ID: <500044B1.8020505@redhat.com>
Date: Fri, 13 Jul 2012 09:54:25 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Maynard Johnson <maynardj@us.ibm.com>
Subject: Re: configuring with non-standard location of gcc
References: <500040AD.9090700@us.ibm.com>
In-Reply-To: <500040AD.9090700@us.ibm.com>
X-Enigmail-Version: 1.4.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigBD42FB861B408D007F79FEE2"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Jul 2012 15:54:37 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigBD42FB861B408D007F79FEE2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 07/13/2012 09:37 AM, Maynard Johnson wrote:
> Hi,
> I'm working on a project that uses autoconf/automake.  Currently, the c=
onfigure.in defined for this project has a "--with-gcc" option that was a=
dded back in 2005 to allow specifying the location of the compiler to use=
=2E  I'm doing some cleanup of our configure script and have found that t=
his option simply doesn't work since our use of AC_PROG_CC is being execu=
ted prior to the "--with-gcc" option, even though the configure.in has th=
e "--with-gcc" option first.  In my investigation of this issue, it seems=
 to me that the "--with-gcc" option is not a valid method for setting CC,=
 and that users should pass "CC=3Dblah" to ./configure instead.  Is that =
correct?

You are correct that './configure CC=3D/path/to/compiler' is the preferre=
d
and documented mechanism for selecting an alternate compiler.

Also, you should upgrade to using configure.ac; configure.in is an
obsolete file, and the next automake release will not support it
(autoconf will probably follow suit soon).

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org




--------------enigBD42FB861B408D007F79FEE2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQAESxAAoJEKeha0olJ0NqmNcH/jBABQFACyYcZOvl6/BbeZSs
JDNPXSHL1OAKsCGqqVD6Gc/glmwUMg7WICe8NBpdUBORhNx7C7aoIDADKSsPCaTG
zbpOLhONV76FB/lahIskgQbP4M8ACbFVxZzxYwBeIGFelJTS2DxlapOASIXVPoRT
xTiW9x/fFZjHuN6JfjCbaB3KznFEkHmaX4cBrqj/FKuYexvhhlzWt82oj/Evx7p2
AkZyWospE/JtGLU3hPouqMhljKJU4CNhzwL4wa2ps0/KPHWJ3LKdl44MzrykS3Qc
VIsHRoepY467Z4plQr1qn99uYnGgWtHAA3lYsOe250/1phQzjdP/Ukot5b+RxZ4=
=T0Ug
-----END PGP SIGNATURE-----

--------------enigBD42FB861B408D007F79FEE2--


From MAILER-DAEMON Fri Jul 13 13:08:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SpjMM-0007Yf-Tq
	for mharc-autoconf@gnu.org; Fri, 13 Jul 2012 13:08:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35751)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1SpjMK-0007Wn-QI
	for autoconf@gnu.org; Fri, 13 Jul 2012 13:08:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1SpjMJ-00059x-Nq
	for autoconf@gnu.org; Fri, 13 Jul 2012 13:08:52 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:52968)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1SpjMJ-00059U-I2
	for autoconf@gnu.org; Fri, 13 Jul 2012 13:08:51 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 23B8EA60003;
	Fri, 13 Jul 2012 10:08:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id yevv+eUEfDvu; Fri, 13 Jul 2012 10:08:50 -0700 (PDT)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id C0733A60001;
	Fri, 13 Jul 2012 10:08:50 -0700 (PDT)
Message-ID: <50005622.6060702@cs.ucla.edu>
Date: Fri, 13 Jul 2012 10:08:50 -0700
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120605 Thunderbird/13.0
MIME-Version: 1.0
To: Maynard Johnson <maynardj@us.ibm.com>
Subject: Re: configuring with non-standard location of gcc
References: <500040AD.9090700@us.ibm.com>
In-Reply-To: <500040AD.9090700@us.ibm.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Jul 2012 17:08:53 -0000

On 07/13/2012 08:37 AM, Maynard Johnson wrote:
> it seems to me that the "--with-gcc" option is not a valid method for setting CC,
> and that users should pass "CC=blah" to ./configure instead

Yes, that's how everybody else does it, and it works.
One could probably get a --with-gcc option to work too,
but it'd be a pain to get it right, and why bother?


From MAILER-DAEMON Sat Jul 21 05:27:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SsVy8-0002yr-1o
	for mharc-autoconf@gnu.org; Sat, 21 Jul 2012 05:27:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49726)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <trojkan@gmail.com>) id 1SsVy5-0002yi-Kq
	for autoconf@gnu.org; Sat, 21 Jul 2012 05:27:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <trojkan@gmail.com>) id 1SsVy4-000211-JB
	for autoconf@gnu.org; Sat, 21 Jul 2012 05:27:21 -0400
Received: from mail-pb0-f41.google.com ([209.85.160.41]:45549)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <trojkan@gmail.com>) id 1SsVy4-00020m-Cj
	for autoconf@gnu.org; Sat, 21 Jul 2012 05:27:20 -0400
Received: by pbbrp2 with SMTP id rp2so9105057pbb.0
	for <autoconf@gnu.org>; Sat, 21 Jul 2012 02:27:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type:content-transfer-encoding;
	bh=cLCrJMArwtl4BnRzJstmwkUjx1oZzWqPcQcnWxY+IBg=;
	b=otT0Rm1htgO0rm2B7KsWENuRwMc8nnblfJf1Dz4ftfOg1IU5CmOqekjXvgSj0miyOa
	Iu+O+IQpWg5GzN1Ha8MBUjbkUOciivJzHEvbRq5Y9ZYOPLBHmJQyvow0v0zgfFxJcJXo
	Z6p0v5d/NB7j7Snz/G0wzCknkb53gDxz1z+yXdJPB+I1JAzZwWBk50r5EYnuGpLLqd2O
	MpFa3R07ixFqPcQmGhuUWIWYG4uxXqChSNDHLmlpHObPHOKrJCSM8JWMjnuiV7OgnSpD
	tuIvb23xIszOR3/S6pNVuj3lgj6SqM7CQo/uHNuolP1hd3Kn5LdlPgr9bpOnvDMqPqoB
	JTXQ==
Received: by 10.66.76.226 with SMTP id n2mr17185930paw.67.1342862838935;
	Sat, 21 Jul 2012 02:27:18 -0700 (PDT)
Received: from limpar.local (124-171-210-159.dyn.iinet.net.au.
	[124.171.210.159])
	by mx.google.com with ESMTPS id ms9sm5726806pbb.43.2012.07.21.02.27.16
	(version=SSLv3 cipher=OTHER); Sat, 21 Jul 2012 02:27:17 -0700 (PDT)
Message-ID: <500A75DE.3010400@gmail.com>
Date: Sat, 21 Jul 2012 19:26:54 +1000
From: Peter Johansson <trojkan@gmail.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US;
	rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: test if compiler warns
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.160.41
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Jul 2012 09:27:22 -0000

Hi autoconfers,

In one of my projects, we noticed that some versions of g++ does not 
recognize option '-pthread', but gives a warning

i686-apple-darwin8-g++-4.0.1: unrecognized option '-pthread'

Now I'd like to test this at configure time, so I wonder if there is a good mechanism to test if compiler is complaining to stderr.
Or do I need to write a low-level macro myself for this?

Thank you.

Peter




From MAILER-DAEMON Sat Jul 21 09:06:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SsZNg-000588-Cx
	for mharc-autoconf@gnu.org; Sat, 21 Jul 2012 09:06:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35400)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <trojkan@gmail.com>) id 1SsZNd-00051b-G8
	for autoconf@gnu.org; Sat, 21 Jul 2012 09:05:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <trojkan@gmail.com>) id 1SsZNc-0007eg-H4
	for autoconf@gnu.org; Sat, 21 Jul 2012 09:05:57 -0400
Received: from mail-gg0-f169.google.com ([209.85.161.169]:51545)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <trojkan@gmail.com>) id 1SsZNc-0007eb-Cs
	for autoconf@gnu.org; Sat, 21 Jul 2012 09:05:56 -0400
Received: by ggm4 with SMTP id 4so5548286ggm.0
	for <autoconf@gnu.org>; Sat, 21 Jul 2012 06:05:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=J6NBKcGYqr6O9ciZYTLbvSd52B3knYS65oRB3+9mLdc=;
	b=FT+k5gBqezhjJE3kizgUqVotqdeOW8C/1Rwb611INoMwuMqb3XSNls+/orEjWn/zjm
	1m+aZSEp9S9Cb7i9xdkxyAKbMotwRGGHtARBZM4FTwGjH10e3svNR/O7ELAcYTYg0r64
	c89JTYgfdDeAdhRWnf9J9Rh2ju9fiqeeoBVPcTIFCKI7xEEakwGRz/X/5coVjY4a2Lk4
	AB5ECcq/tUK9+3hvCEEeIJDt3HN+P8G/+r8SG/iJiBD33C9hOtTXu89swvxOHQq72cmc
	GoHhAeBvjrmSquQNf3+GZVGolcesEad90RLGdbgOmTcInsahasEYzJ8697JIpdH3CbuC
	hPrA==
Received: by 10.66.77.7 with SMTP id o7mr18397271paw.37.1342875955491;
	Sat, 21 Jul 2012 06:05:55 -0700 (PDT)
Received: from limpar.local (124-171-210-159.dyn.iinet.net.au.
	[124.171.210.159])
	by mx.google.com with ESMTPS id he9sm6015242pbc.68.2012.07.21.06.05.52
	(version=SSLv3 cipher=OTHER); Sat, 21 Jul 2012 06:05:54 -0700 (PDT)
Message-ID: <500AA919.7020609@gmail.com>
Date: Sat, 21 Jul 2012 23:05:29 +1000
From: Peter Johansson <trojkan@gmail.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US;
	rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Re: test if compiler warns
References: <500A75DE.3010400@gmail.com>
In-Reply-To: <500A75DE.3010400@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.161.169
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Jul 2012 13:05:58 -0000

Hi again,

I found AC_LANG_WERROR which seems to do what I want.

I also found this discussion on how to revert AC_LANG_WERROR
http://lists.gnu.org/archive/html/autoconf/2007-04/msg00030.html
but guess that discussion died.

Cheers,
Peter

On 7/21/12 7:26 PM, Peter Johansson wrote:
> Hi autoconfers,
>
> In one of my projects, we noticed that some versions of g++ does not 
> recognize option '-pthread', but gives a warning
>
> i686-apple-darwin8-g++-4.0.1: unrecognized option '-pthread'
>
> Now I'd like to test this at configure time, so I wonder if there is a 
> good mechanism to test if compiler is complaining to stderr.
> Or do I need to write a low-level macro myself for this?
>
> Thank you.
>
> Peter
>
>
>
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/listinfo/autoconf


-- 
Peter Johansson



From MAILER-DAEMON Sat Jul 21 20:21:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ssjuy-0002tC-Bb
	for mharc-autoconf@gnu.org; Sat, 21 Jul 2012 20:21:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35860)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peter.lee.cpp@gmail.com>) id 1Ssjuv-0002rF-D9
	for autoconf@gnu.org; Sat, 21 Jul 2012 20:21:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peter.lee.cpp@gmail.com>) id 1Ssjuu-0002L9-AG
	for autoconf@gnu.org; Sat, 21 Jul 2012 20:21:01 -0400
Received: from mail-vc0-f169.google.com ([209.85.220.169]:60900)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peter.lee.cpp@gmail.com>) id 1Ssjuu-0002L3-69
	for autoconf@gnu.org; Sat, 21 Jul 2012 20:21:00 -0400
Received: by vcbfl10 with SMTP id fl10so4759115vcb.0
	for <autoconf@gnu.org>; Sat, 21 Jul 2012 17:20:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=r04ztWHD794pptK67QECC8NIfS3RoYAoRZ+yr+oIeE4=;
	b=uAenYe3Lk+Jx27zqRSd6NbeLiituKTRA/vki0GBal4Xhev1I7crkgwOQ22ILTRYh3b
	9CftXMDGVVSj0aWMHD/7NgX0lHeaQzioVX8hptRJFfHSEB201/5WGV2KMEpTasCYP5Gy
	fX0XC5DD0VkAMwe9Qkpsfwx8dbhJMu328kZHklE+ndIroDvTYxG+20s5yRgZUwRCE3NN
	RP/65VfvPkgvvFQm9pJyEpybTs4eootsr1cuXd1pdJArPNMzZAg0RrnuUJwhvWK6v26E
	PLoKNwETBQedoR9bo6Lzxx34n0csuQ5s8bmU8W1sEZAWa3PmGqMvRjWNhd83N78dAWvH
	giBQ==
MIME-Version: 1.0
Received: by 10.52.69.237 with SMTP id h13mr7507210vdu.82.1342916459374; Sat,
	21 Jul 2012 17:20:59 -0700 (PDT)
Received: by 10.58.237.132 with HTTP; Sat, 21 Jul 2012 17:20:59 -0700 (PDT)
Received: by 10.58.237.132 with HTTP; Sat, 21 Jul 2012 17:20:59 -0700 (PDT)
In-Reply-To: <500AA919.7020609@gmail.com>
References: <500A75DE.3010400@gmail.com>
	<500AA919.7020609@gmail.com>
Date: Sun, 22 Jul 2012 10:20:59 +1000
Message-ID: <CAFV7M0MNY=AUjNWcrdmdFOhcyARo9KQF8z-iT0-BKRC9GEmH8Q@mail.gmail.com>
Subject: Re: test if compiler warns
From: Peter Lee <peter.lee.cpp@gmail.com>
To: Peter Johansson <trojkan@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jul 2012 00:21:02 -0000

Peter,
thanks for sharing, any other ideas out there ?
cheers
 On Jul 21, 2012 11:06 PM, "Peter Johansson" <trojkan@gmail.com> wrote:

> Hi again,
>
> I found AC_LANG_WERROR which seems to do what I want.
>
> I also found this discussion on how to revert AC_LANG_WERROR
> http://lists.gnu.org/archive/**html/autoconf/2007-04/**msg00030.html<http://lists.gnu.org/archive/html/autoconf/2007-04/msg00030.html>
> but guess that discussion died.
>
> Cheers,
> Peter
>
> On 7/21/12 7:26 PM, Peter Johansson wrote:
>
>> Hi autoconfers,
>>
>> In one of my projects, we noticed that some versions of g++ does not
>> recognize option '-pthread', but gives a warning
>>
>> i686-apple-darwin8-g++-4.0.1: unrecognized option '-pthread'
>>
>> Now I'd like to test this at configure time, so I wonder if there is a
>> good mechanism to test if compiler is complaining to stderr.
>> Or do I need to write a low-level macro myself for this?
>>
>> Thank you.
>>
>> Peter
>>
>>
>>
>> ______________________________**_________________
>> Autoconf mailing list
>> Autoconf@gnu.org
>> https://lists.gnu.org/mailman/**listinfo/autoconf<https://lists.gnu.org/mailman/listinfo/autoconf>
>>
>
>
> --
> Peter Johansson
>
>
> ______________________________**_________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/**listinfo/autoconf<https://lists.gnu.org/mailman/listinfo/autoconf>
>

From MAILER-DAEMON Wed Jul 25 13:58:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Su5rF-0007m3-5j
	for mharc-autoconf@gnu.org; Wed, 25 Jul 2012 13:58:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52906)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <svenjoac@gmx.de>) id 1Su5hP-0000Np-Sy
	for autoconf@gnu.org; Wed, 25 Jul 2012 13:48:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <svenjoac@gmx.de>) id 1Su5hO-0001Wt-OU
	for autoconf@gnu.org; Wed, 25 Jul 2012 13:48:39 -0400
Received: from mailout-de.gmx.net ([213.165.64.22]:48081)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <svenjoac@gmx.de>) id 1Su5hO-0001Wb-E1
	for autoconf@gnu.org; Wed, 25 Jul 2012 13:48:38 -0400
Received: (qmail invoked by alias); 25 Jul 2012 17:21:57 -0000
Received: from p4FC776AD.dip.t-dialin.net (EHLO turtle.gmx.de) [79.199.118.173]
	by mail.gmx.net (mp028) with SMTP; 25 Jul 2012 19:21:57 +0200
X-Authenticated: #28250155
X-Provags-ID: V01U2FsdGVkX18OF6hAWKAOu/+Oei3USRkwASQ2z68oYpGQux/4qV
	z37q8LlunqLfHN
Received: by turtle.gmx.de (Postfix, from userid 1000)
	id 4406A3F48B; Wed, 25 Jul 2012 19:21:58 +0200 (CEST)
From: Sven Joachim <svenjoac@gmx.de>
To: autoconf@gnu.org
Subject: Intended behavior if "--build" and "--host" are set to the same value
Date: Wed, 25 Jul 2012 19:21:58 +0200
Message-ID: <877gtreoy1.fsf@turtle.gmx.de>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 213.165.64.22
X-Mailman-Approved-At: Wed, 25 Jul 2012 13:58:48 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Jul 2012 17:48:41 -0000

Hello,

I have been wondering=B9 what the intended behavior of `configure' is if
both "--build" and "--host" are given and are identical.  The manual
says

,----
|    They all default to the result of running `config.guess', unless you
| specify either `--build' or `--host'.  In this case, the default
| becomes the system type you specified.  If you specify both, and
| they're different, `configure' enters cross compilation mode, so it
| doesn't run any tests that require execution.
`----

This seems to imply "if they are not different, `configure' does not
enter cross compilation mode", and this is how it actually has been
behaving for the last twelve years.  However, the manual also says

,----
|    Now, `configure' enters cross-compilation mode if and only if
| `--host' is passed.
`----

contradicting that.  What is the intended behavior that will be
implemented when hell freez^W^W autoconf 2.13 bug compatibility gets
finally removed?

Cheers,
       Sven


=B9 http://bugs.debian.org/682780


From MAILER-DAEMON Wed Jul 25 15:52:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Su7cv-00086y-Qr
	for mharc-autoconf@gnu.org; Wed, 25 Jul 2012 15:52:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48994)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=nbowler=546b57dca@mail.ellipticsemi.com>)
	id 1Su7ct-000859-4Y
	for autoconf@gnu.org; Wed, 25 Jul 2012 15:52:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <prvs=nbowler=546b57dca@mail.ellipticsemi.com>)
	id 1Su7cr-0003Hk-Oh
	for autoconf@gnu.org; Wed, 25 Jul 2012 15:52:07 -0400
Received: from mx.scalarmail.ca ([98.158.95.75]:49909
	helo=ironport-01.sms.scalar.ca)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=nbowler=546b57dca@mail.ellipticsemi.com>)
	id 1Su7cr-0003Fk-KC
	for autoconf@gnu.org; Wed, 25 Jul 2012 15:52:05 -0400
Received: from unknown (HELO sms-zimbra-mta-01.sms.scalar.ca) ([192.168.32.56])
	by ironport-01.sms.scalar.ca with ESMTP; 25 Jul 2012 15:51:43 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by sms-zimbra-mta-01.sms.scalar.ca (Postfix) with ESMTP id 9A35017F49; 
	Wed, 25 Jul 2012 15:51:43 -0400 (EDT)
Received: from sms-zimbra-mta-01.sms.scalar.ca ([127.0.0.1])
	by localhost (sms-zimbra-mta-01.sms.scalar.ca [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id 9rfWL+LxDkqI; Wed, 25 Jul 2012 15:51:43 -0400 (EDT)
Received: from mail.ellipticsemi.com (dsl-67-204-24-19.acanac.net
	[67.204.24.19]) (Authenticated sender: nbowler@elliptictech.com)
	by sms-zimbra-mta-01.sms.scalar.ca (Postfix) with ESMTPSA id 7DBD517F48;
	Wed, 25 Jul 2012 15:51:42 -0400 (EDT)
Received: by mail.ellipticsemi.com (nbSMTP-1.00) for uid 550
	(using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	nbowler@mail.ellipticsemi.com; Wed, 25 Jul 2012 15:51:42 -0400 (EDT)
Date: Wed, 25 Jul 2012 15:51:42 -0400
From: Nick Bowler <nbowler@elliptictech.com>
To: Sven Joachim <svenjoac@gmx.de>
Subject: Re: Intended behavior if "--build" and "--host" are set to the same
	value
Message-ID: <20120725195142.GA10503@elliptictech.com>
References: <877gtreoy1.fsf@turtle.gmx.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <877gtreoy1.fsf@turtle.gmx.de>
Organization: Elliptic Technologies Inc.
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 98.158.95.75
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Jul 2012 19:52:08 -0000

On 2012-07-25 19:21 +0200, Sven Joachim wrote:
> Hello,
> 
> I have been wonderingı what the intended behavior of `configure' is if
> both "--build" and "--host" are given and are identical.  The manual
> says
> 
> ,----
> |    They all default to the result of running `config.guess', unless you
> | specify either `--build' or `--host'.  In this case, the default
> | becomes the system type you specified.  If you specify both, and
> | they're different, `configure' enters cross compilation mode, so it
> | doesn't run any tests that require execution.
> `----
> 
> This seems to imply "if they are not different, `configure' does not
> enter cross compilation mode", and this is how it actually has been
> behaving for the last twelve years.  However, the manual also says

OK, so according to your own tests, autoconf behaves as documented above
when both --build and --host are specified, which is good.

> ,----
> |    Now, `configure' enters cross-compilation mode if and only if
> | `--host' is passed.
> `----

Given the rest of the document, and the actual behaviour of autoconf, I
think this is simply a typo, and should read:

  Now, `configure' enters cross-compilation mode only if `--host' is
  passed.

that is, configure will never enter cross compilation mode unless
--host appears on the configure command line (although this is still
not strictly true, since you can also enter cross compilation mode by
setting cross_compiling=yes).

In fact, just below the above quoted passage the document explains
precisely what happens when only --host (and not --build) is specified:

  If you specify --host, but not --build, when configure performs the
  first compiler test it tries to run an executable produced by the
  compiler. If the execution fails, it enters cross-compilation mode.

> contradicting that.  What is the intended behavior that will be
> implemented when hell freez^W^W autoconf 2.13 bug compatibility gets
> finally removed?

Presumably when the compatibility is removed, then --build will default
to config.guess in all operating modes, the magic autodetection of cross
compilation will go away, and we will all be happier for it.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)



