From MAILER-DAEMON Fri Feb 03 04:36:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtFZe-0005kT-NW
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 04:36:54 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59254)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtFZb-0005j1-Ko
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:36:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtFZV-0004qj-U6
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:36:51 -0500
Received: from mailout-de.gmx.net ([213.165.64.23]:41929)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtFZV-0004qY-N0
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:36:45 -0500
Received: (qmail invoked by alias); 03 Feb 2012 09:36:42 -0000
Received: from 77.119.18.109.wireless.dyn.drei.com (EHLO localhost)
	[77.119.18.109]
	by mail.gmx.net (mp017) with SMTP; 03 Feb 2012 10:36:42 +0100
X-Authenticated: #54312696
X-Provags-ID: V01U2FsdGVkX186DzRREao6ByrPdu+f86STkf40Gfkb7XcNRmRD0S
	KT0gGX4zvqm4em
Date: Fri, 03 Feb 2012 10:36:34 +0100 (CET)
Message-Id: <20120203.103634.439880364.wl@gnu.org>
To: autoconf@gnu.org
Subject: detecting windows
From: Werner LEMBERG <wl@gnu.org>
X-Mailer: Mew version 6.4rc1 on Emacs 24.0.92.1 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
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.23
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, 03 Feb 2012 09:36:52 -0000


Folks,


is there an autoconf macro to detect MS Windows?


    Werner


From MAILER-DAEMON Fri Feb 03 04:40:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtFcg-0006bA-Mo
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 04:40:02 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57289)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <olenz@icp.uni-stuttgart.de>) id 1RtFca-0006al-R6
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:40:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <olenz@icp.uni-stuttgart.de>) id 1RtFcU-0005ZS-WE
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:39:56 -0500
Received: from anoa.ica1.uni-stuttgart.de ([129.69.120.76]:52117)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <olenz@icp.uni-stuttgart.de>) id 1RtFcU-0005ZO-Re
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:39:50 -0500
Received: from [127.0.0.1] (anoa.ica1.uni-stuttgart.de [129.69.120.76])
	by anoa.ica1.uni-stuttgart.de (Postfix) with ESMTP id 1F731A422E;
	Fri,  3 Feb 2012 10:39:49 +0100 (CET)
Message-ID: <4F2BAB63.3090507@icp.uni-stuttgart.de>
Date: Fri, 03 Feb 2012 10:39:47 +0100
From: Olaf Lenz <olenz@icp.uni-stuttgart.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:9.0) Gecko/20120107 Thunderbird/9.0
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Re: detecting windows
References: <20120203.103634.439880364.wl@gnu.org>
In-Reply-To: <20120203.103634.439880364.wl@gnu.org>
X-TagToolbar-Keys: D20120203103947420
Content-Type: multipart/mixed; boundary="------------040804050303010705010400"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 129.69.120.76
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: olenz@icp.uni-stuttgart.de
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, 03 Feb 2012 09:40:01 -0000

This is a multi-part message in MIME format.
--------------040804050303010705010400
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi!

On 02/03/2012 10:36 AM, Werner LEMBERG wrote:
> is there an autoconf macro to detect MS Windows?

Is that a joke? The trouble is, that autoconf requires a shell and M4,
which Windows doesn't provide (only in Cygwin). So MS Windows is
detected when autoconf/configure does not run...

Olaf


--=20
Dr. rer. nat. Olaf Lenz
Institut f=C3=BCr Computerphysik, Pfaffenwaldring 27, D-70569 Stuttgart
Phone: +49-711-685-63607

--------------040804050303010705010400
Content-Type: text/x-vcard; charset=utf-8;
 name="olenz.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="olenz.vcf"

YmVnaW46dmNhcmQNCmZuOk9sYWYgTGVueg0KbjpMZW56O09sYWYNCm9yZztxdW90ZWQtcHJp
bnRhYmxlO3F1b3RlZC1wcmludGFibGU6VW5pdmVyc2l0PUMzPUE0dCBTdHV0dGdhcnQ7SW5z
dGl0dXQgZj1DMz1CQ3IgQ29tcHV0ZXJwaHlzaWsNCmFkcjo7O1BmYWZmZW53YWxkcmluZyAy
NztTdHV0dGdhcnQ7OzcwNTY5O0dlcm1hbnkNCmVtYWlsO2ludGVybmV0Om9sZW56QGljcC51
bmktc3R1dHRnYXJ0LmRlDQp0aXRsZTpEci4gcmVyLiBuYXQuDQp0ZWw7d29yazorNDkuNzEx
LjY4NS42MzYwNw0KdGVsO2ZheDorNDkuNzExLjY4NS42MzY4NQ0KeC1tb3ppbGxhLWh0bWw6
RkFMU0UNCnVybDpodHRwOi8vd3d3LmljcC51bmktc3R1dHRnYXJ0LmRlL35pY3AvT2xhZl9M
ZW56DQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg==
--------------040804050303010705010400--


From MAILER-DAEMON Fri Feb 03 04:46:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtFii-00087f-Fu
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 04:46:16 -0500
Received: from eggs.gnu.org ([140.186.70.92]:48472)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtFib-00086A-R3
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:46:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtFiX-0006CX-K2
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:46:09 -0500
Received: from mailout-de.gmx.net ([213.165.64.23]:60169)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtFiX-0006CO-8Z
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:46:05 -0500
Received: (qmail invoked by alias); 03 Feb 2012 09:46:02 -0000
Received: from 77.119.18.109.wireless.dyn.drei.com (EHLO localhost)
	[77.119.18.109]
	by mail.gmx.net (mp017) with SMTP; 03 Feb 2012 10:46:02 +0100
X-Authenticated: #54312696
X-Provags-ID: V01U2FsdGVkX19H1vJtAXZHGqGWITSu9RoN6IH6EL8v+bcloTYeGv
	B4QU1gbvL3nfYv
Date: Fri, 03 Feb 2012 10:45:54 +0100 (CET)
Message-Id: <20120203.104554.391043174.wl@gnu.org>
To: olenz@icp.uni-stuttgart.de
Subject: Re: detecting windows
From: Werner LEMBERG <wl@gnu.org>
In-Reply-To: <4F2BAB63.3090507@icp.uni-stuttgart.de>
References: <20120203.103634.439880364.wl@gnu.org>
	<4F2BAB63.3090507@icp.uni-stuttgart.de>
X-Mailer: Mew version 6.4rc1 on Emacs 24.0.92.1 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
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.23
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, 03 Feb 2012 09:46:15 -0000


>> is there an autoconf macro to detect MS Windows?
> 
> Is that a joke?  The trouble is, that autoconf requires a shell and
> M4, which Windows doesn't provide (only in Cygwin). So MS Windows is
> detected when autoconf/configure does not run...

Very witty :-) No, it's not a joke.  I don't want to detect the
compiler or the build environment, but I want a macro which detects
the Windows GUI abilities, similar to macro which detects the
availability of X11, regardless of the platform.


    Werner


From MAILER-DAEMON Fri Feb 03 04:52:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtFos-0002oe-CW
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 04:52:38 -0500
Received: from eggs.gnu.org ([140.186.70.92]:34525)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <olenz@icp.uni-stuttgart.de>) id 1RtFol-0002Ze-Ed
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:52:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <olenz@icp.uni-stuttgart.de>) id 1RtFoh-000769-7L
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:52:31 -0500
Received: from anoa.ica1.uni-stuttgart.de ([129.69.120.76]:52266)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <olenz@icp.uni-stuttgart.de>) id 1RtFog-000765-OL
	for autoconf@gnu.org; Fri, 03 Feb 2012 04:52:27 -0500
Received: from [127.0.0.1] (anoa.ica1.uni-stuttgart.de [129.69.120.76])
	by anoa.ica1.uni-stuttgart.de (Postfix) with ESMTP id 92D56A422E;
	Fri,  3 Feb 2012 10:52:25 +0100 (CET)
Message-ID: <4F2BAE57.4050303@icp.uni-stuttgart.de>
Date: Fri, 03 Feb 2012 10:52:23 +0100
From: Olaf Lenz <olenz@icp.uni-stuttgart.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:9.0) Gecko/20120107 Thunderbird/9.0
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Re: detecting windows
References: <20120203.103634.439880364.wl@gnu.org>
	<4F2BAB63.3090507@icp.uni-stuttgart.de>
	<20120203.104554.391043174.wl@gnu.org>
In-Reply-To: <20120203.104554.391043174.wl@gnu.org>
X-TagToolbar-Keys: D20120203105223831
Content-Type: multipart/mixed; boundary="------------040406080301040601060804"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 129.69.120.76
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: olenz@icp.uni-stuttgart.de
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, 03 Feb 2012 09:52:37 -0000

This is a multi-part message in MIME format.
--------------040406080301040601060804
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi!

On 02/03/2012 10:45 AM, Werner LEMBERG wrote:
>> Is that a joke?  The trouble is, that autoconf requires a shell
>> and M4, which Windows doesn't provide (only in Cygwin). So MS
>> Windows is detected when autoconf/configure does not run...
>
> Very witty :-) No, it's not a joke.  I don't want to detect the
> compiler or the build environment, but I want a macro which detects
> the Windows GUI abilities, similar to macro which detects the
> availability of X11, regardless of the platform.

I did not try to be witty. I was really wondering whether the question
was meant as a joke.
The problem of detecting MS Windows with autoconf is much deeper than
not having a macro for it. You simply cannot run autoconf on MS Windows,
as it requires other tools that are not available on Windows, so there
is no macro to detect it.
Or are you talking of Cygwin?

Olaf
--=20
Dr. rer. nat. Olaf Lenz
Institut f=C3=BCr Computerphysik, Pfaffenwaldring 27, D-70569 Stuttgart
Phone: +49-711-685-63607

--------------040406080301040601060804
Content-Type: text/x-vcard; charset=utf-8;
 name="olenz.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="olenz.vcf"

YmVnaW46dmNhcmQNCmZuOk9sYWYgTGVueg0KbjpMZW56O09sYWYNCm9yZztxdW90ZWQtcHJp
bnRhYmxlO3F1b3RlZC1wcmludGFibGU6VW5pdmVyc2l0PUMzPUE0dCBTdHV0dGdhcnQ7SW5z
dGl0dXQgZj1DMz1CQ3IgQ29tcHV0ZXJwaHlzaWsNCmFkcjo7O1BmYWZmZW53YWxkcmluZyAy
NztTdHV0dGdhcnQ7OzcwNTY5O0dlcm1hbnkNCmVtYWlsO2ludGVybmV0Om9sZW56QGljcC51
bmktc3R1dHRnYXJ0LmRlDQp0aXRsZTpEci4gcmVyLiBuYXQuDQp0ZWw7d29yazorNDkuNzEx
LjY4NS42MzYwNw0KdGVsO2ZheDorNDkuNzExLjY4NS42MzY4NQ0KeC1tb3ppbGxhLWh0bWw6
RkFMU0UNCnVybDpodHRwOi8vd3d3LmljcC51bmktc3R1dHRnYXJ0LmRlL35pY3AvT2xhZl9M
ZW56DQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg==
--------------040406080301040601060804--


From MAILER-DAEMON Fri Feb 03 05:06:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtG2f-0007AV-UA
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 05:06:53 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58007)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vincent.torri@gmail.com>) id 1RtG2a-00078C-6V
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:06:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vincent.torri@gmail.com>) id 1RtG2U-0002FN-IM
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:06:48 -0500
Received: from mail-qy0-f169.google.com ([209.85.216.169]:57669)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vincent.torri@gmail.com>) id 1RtG2U-0002FH-G9
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:06:42 -0500
Received: by qcsd16 with SMTP id d16so2204862qcs.0
	for <autoconf@gnu.org>; Fri, 03 Feb 2012 02:06:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	bh=+S9UwlWZQyfqMvJfY4ZvU9xBj7C1LyGPG6sDOWA6+58=;
	b=Y+WDBnUITDH2Uwn4x7Uflm6KJnzFWfT0/E1xztYDdjDPYBIiiqiZ8fIdAjJqHhDRuw
	PPthxWLKSHJq96oD9xkNev/KkoMo7og5xvPEVy1eohs6DcfKBG2XkQ11/f2QRO3kEcF+
	5EacA0X8toEX3efB8OOjpflmhlrPpBmWWOFQg=
MIME-Version: 1.0
Received: by 10.224.183.5 with SMTP id ce5mr8683355qab.35.1328263601878; Fri,
	03 Feb 2012 02:06:41 -0800 (PST)
Received: by 10.224.37.131 with HTTP; Fri, 3 Feb 2012 02:06:41 -0800 (PST)
In-Reply-To: <4F2BAE57.4050303@icp.uni-stuttgart.de>
References: <20120203.103634.439880364.wl@gnu.org>
	<4F2BAB63.3090507@icp.uni-stuttgart.de>
	<20120203.104554.391043174.wl@gnu.org>
	<4F2BAE57.4050303@icp.uni-stuttgart.de>
Date: Fri, 3 Feb 2012 11:06:41 +0100
Message-ID: <CAMq1adoP-wgxjyjdjOCDc_+M_bnHAMCmNXVE0=8Snpi5c9m5QQ@mail.gmail.com>
Subject: Re: detecting windows
From: Vincent Torri <vincent.torri@gmail.com>
To: olenz@icp.uni-stuttgart.de
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.169
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, 03 Feb 2012 10:06:52 -0000

On Fri, Feb 3, 2012 at 10:52 AM, Olaf Lenz <olenz@icp.uni-stuttgart.de> wro=
te:
> Hi!
>
>
> On 02/03/2012 10:45 AM, Werner LEMBERG wrote:
>>>
>>> Is that a joke? =A0The trouble is, that autoconf requires a shell
>>> and M4, which Windows doesn't provide (only in Cygwin). So MS
>>> Windows is detected when autoconf/configure does not run...
>>
>>
>> Very witty :-) No, it's not a joke. =A0I don't want to detect the
>> compiler or the build environment, but I want a macro which detects
>> the Windows GUI abilities, similar to macro which detects the
>> availability of X11, regardless of the platform.
>
>
> I did not try to be witty. I was really wondering whether the question
> was meant as a joke.
> The problem of detecting MS Windows with autoconf is much deeper than
> not having a macro for it. You simply cannot run autoconf on MS Windows,
> as it requires other tools that are not available on Windows, so there
> is no macro to detect it.
> Or are you talking of Cygwin?

MSYS exists too ;) (though MSYS is based on cygwin code).

Werner: when using autotools with MSYS or when cross compiling on
linux, I check the host. Something like that in configure.ac:

AC_CANONICAL_HOST

have_windows=3D"no"
case "$host_os" in
   mingw*)
      have_windows=3D"yes"
   ;;
esac

Note that this also detects Windows CE gcc cross compiler.

regards

Vincent Torri


From MAILER-DAEMON Fri Feb 03 05:09:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtG5f-0008FD-KA
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 05:09:59 -0500
Received: from eggs.gnu.org ([140.186.70.92]:40232)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RtG5Y-0008EX-Ht
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:09:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1RtG5R-0002mL-NJ
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:09:52 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:43516)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>)
	id 1RtG5R-0002ly-Di; Fri, 03 Feb 2012 05:09:45 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id D692B40009;
	Fri,  3 Feb 2012 11:09:42 +0100 (CET)
Received: from [192.168.0.150] (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 37DAB40003;
	Fri,  3 Feb 2012 11:09:42 +0100 (CET)
Message-ID: <4F2BB26D.6070202@lysator.liu.se>
Date: Fri, 03 Feb 2012 11:09:49 +0100
From: Peter Rosin <peda@lysator.liu.se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: Werner LEMBERG <wl@gnu.org>
Subject: Re: detecting windows
References: <20120203.103634.439880364.wl@gnu.org>
	<4F2BAB63.3090507@icp.uni-stuttgart.de>
	<20120203.104554.391043174.wl@gnu.org>
In-Reply-To: <20120203.104554.391043174.wl@gnu.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
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, 03 Feb 2012 10:09:58 -0000

Werner LEMBERG skrev 2012-02-03 10:45:
> 
>>> is there an autoconf macro to detect MS Windows?
>>
>> Is that a joke?  The trouble is, that autoconf requires a shell and
>> M4, which Windows doesn't provide (only in Cygwin). So MS Windows is
>> detected when autoconf/configure does not run...
> 
> Very witty :-) No, it's not a joke.  I don't want to detect the
> compiler or the build environment, but I want a macro which detects
> the Windows GUI abilities, similar to macro which detects the
> availability of X11, regardless of the platform.

(don't listen the Olaf, he's obviously ignorant, I use autotools
on Windows almost daily.  Sometimes with Cygwin providing the needed
tools, sometimes with MSYS providing the tools, but there are
other options as well, such as cross-compiling from *nix)

You do as you do with whatever else you are requiring.  Check if
#include <windows.h> is there, and check if you can link with some
API of your choice.  However, there is (at least) one caveat and
that is the calling convention used by Windows API.  A standard
link test, as is usually done by Autoconf, will use the cdecl
calling convention and the Windows API uses the stdcall calling
convention and the symbols are decorated, so you need to #include
<windows.h> in the link test in order to get the calling convention
right.  At least that's what I have found to be cleanest.

Cheers,
Peter


From MAILER-DAEMON Fri Feb 03 05:16:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtGBf-0002nf-2u
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 05:16:11 -0500
Received: from eggs.gnu.org ([140.186.70.92]:55232)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vincent.torri@gmail.com>) id 1RtGBX-0002hW-0l
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:16:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vincent.torri@gmail.com>) id 1RtGBM-0004SA-Ua
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:16:02 -0500
Received: from mail-qw0-f41.google.com ([209.85.216.41]:47660)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vincent.torri@gmail.com>)
	id 1RtGBM-0004Rz-SD; Fri, 03 Feb 2012 05:15:52 -0500
Received: by qadz32 with SMTP id z32so641507qad.0
	for <multiple recipients>; Fri, 03 Feb 2012 02:15:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	bh=O4muGpDTTMv1bUuwy7uxa7oo2to3IqBqf/xKk0K2pm4=;
	b=XNON5tqjaCNdNxgcTKU2X26v2auP6QMyxK7b5VFX9qjkDGymHrilpS4a9HaDeQpM6c
	olYdZ+OUkRzO6jDZrq005y5mkwf/UOQyhxvglXe9BfzHr14yrufLbl+QpaOvFA2ueatU
	j2GPADCRSxhkat397u+D2FpeFVbN2KUMLSR04=
MIME-Version: 1.0
Received: by 10.224.183.5 with SMTP id ce5mr8718730qab.35.1328264152053; Fri,
	03 Feb 2012 02:15:52 -0800 (PST)
Received: by 10.224.37.131 with HTTP; Fri, 3 Feb 2012 02:15:51 -0800 (PST)
In-Reply-To: <4F2BB26D.6070202@lysator.liu.se>
References: <20120203.103634.439880364.wl@gnu.org>
	<4F2BAB63.3090507@icp.uni-stuttgart.de>
	<20120203.104554.391043174.wl@gnu.org>
	<4F2BB26D.6070202@lysator.liu.se>
Date: Fri, 3 Feb 2012 11:15:51 +0100
Message-ID: <CAMq1adp8V0wEB627DTPXUi9wu6KEPDoaJ_6q3WLpM+r58f_+JQ@mail.gmail.com>
Subject: Re: detecting windows
From: Vincent Torri <vincent.torri@gmail.com>
To: Peter Rosin <peda@lysator.liu.se>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.41
Cc: Werner LEMBERG <wl@gnu.org>, 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, 03 Feb 2012 10:16:09 -0000

On Fri, Feb 3, 2012 at 11:09 AM, Peter Rosin <peda@lysator.liu.se> wrote:
> Werner LEMBERG skrev 2012-02-03 10:45:
>>
>>>> is there an autoconf macro to detect MS Windows?
>>>
>>> Is that a joke? =A0The trouble is, that autoconf requires a shell and
>>> M4, which Windows doesn't provide (only in Cygwin). So MS Windows is
>>> detected when autoconf/configure does not run...
>>
>> Very witty :-) No, it's not a joke. =A0I don't want to detect the
>> compiler or the build environment, but I want a macro which detects
>> the Windows GUI abilities, similar to macro which detects the
>> availability of X11, regardless of the platform.
>
> (don't listen the Olaf, he's obviously ignorant, I use autotools
> on Windows almost daily. =A0Sometimes with Cygwin providing the needed
> tools, sometimes with MSYS providing the tools, but there are
> other options as well, such as cross-compiling from *nix)
>
> You do as you do with whatever else you are requiring. =A0Check if
> #include <windows.h> is there, and check if you can link with some
> API of your choice. =A0However, there is (at least) one caveat and
> that is the calling convention used by Windows API. =A0A standard
> link test, as is usually done by Autoconf, will use the cdecl
> calling convention and the Windows API uses the stdcall calling
> convention and the symbols are decorated, so you need to #include
> <windows.h> in the link test in order to get the calling convention
> right. =A0At least that's what I have found to be cleanest.

when i asked similar question to MinGW ML about that years ago, they
told me that, if the host is mingw*, there's no need to check for
headers and libs. If they are not available, it's just that the
compiler is not correctly installed anyway, so it will not work. In
addition, using MSYS is sooooo slow that removing some tests is not
neglectible :p Nowadays, i almost always cross compile on linux

regards

Vincent Torri


From MAILER-DAEMON Fri Feb 03 05:20:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtGFr-0004lb-U7
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 05:20:31 -0500
Received: from eggs.gnu.org ([140.186.70.92]:47500)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtGFm-0004kN-5e
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:20:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtGFf-0004xZ-KO
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:20:26 -0500
Received: from mailout-de.gmx.net ([213.165.64.22]:58443)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtGFf-0004xV-9A
	for autoconf@gnu.org; Fri, 03 Feb 2012 05:20:19 -0500
Received: (qmail invoked by alias); 03 Feb 2012 10:20:16 -0000
Received: from 77.119.18.109.wireless.dyn.drei.com (EHLO localhost)
	[77.119.18.109]
	by mail.gmx.net (mp010) with SMTP; 03 Feb 2012 11:20:16 +0100
X-Authenticated: #54312696
X-Provags-ID: V01U2FsdGVkX18fY4U/P4ofC4SGYO+YLQy+PZoCufK/TOLmNmvS5P
	4XQ/c4wg9lSIyf
Date: Fri, 03 Feb 2012 11:20:04 +0100 (CET)
Message-Id: <20120203.112004.135509652.wl@gnu.org>
To: peda@lysator.liu.se
Subject: Re: detecting windows
From: Werner LEMBERG <wl@gnu.org>
In-Reply-To: <4F2BB26D.6070202@lysator.liu.se>
References: <4F2BAB63.3090507@icp.uni-stuttgart.de>
	<20120203.104554.391043174.wl@gnu.org>
	<4F2BB26D.6070202@lysator.liu.se>
X-Mailer: Mew version 6.4rc1 on Emacs 24.0.92.1 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
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
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, 03 Feb 2012 10:20:30 -0000


Thanks for the answers, Vincent and Peter!

> You do as you do with whatever else you are requiring.  Check if
> #include <windows.h> is there, and check if you can link with some
> API of your choice.  [...]

I would have expected something like this as a ready-to-run macro in
the autoconf-macro archive, but surprisingly there is nothing as far
as I can see.


    Werner


From MAILER-DAEMON Fri Feb 03 09:09:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtJpO-0005YZ-1Z
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 09:09:26 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44196)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1RtJpF-0005Mi-NV
	for autoconf@gnu.org; Fri, 03 Feb 2012 09:09:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1RtJpA-0001GM-5Q
	for autoconf@gnu.org; Fri, 03 Feb 2012 09:09:17 -0500
Received: from mail-ww0-f49.google.com ([74.125.82.49]:52185)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>)
	id 1RtJoy-0001E5-0o; Fri, 03 Feb 2012 09:09:00 -0500
Received: by wgbdt13 with SMTP id dt13so3017673wgb.30
	for <multiple recipients>; Fri, 03 Feb 2012 06:08:59 -0800 (PST)
Received: by 10.180.82.227 with SMTP id l3mr9899570wiy.1.1328278139064;
	Fri, 03 Feb 2012 06:08:59 -0800 (PST)
Received: from [192.168.13.4] (know-mailgateway-2.server.virginmedia.net.
	[62.254.26.101])
	by mx.google.com with ESMTPS id n5sm17716440wiw.7.2012.02.03.06.08.56
	(version=SSLv3 cipher=OTHER); Fri, 03 Feb 2012 06:08:57 -0800 (PST)
Sender: Keith Marshall <keith.d.marshall@ntlworld.com>
Message-ID: <4F2BEA75.7050607@users.sourceforge.net>
Date: Fri, 03 Feb 2012 14:08:53 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Organization: MinGW Project Administrator
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16
MIME-Version: 1.0
To: Werner LEMBERG <wl@gnu.org>
Subject: Re: detecting windows
References: <4F2BAB63.3090507@icp.uni-stuttgart.de>	<20120203.104554.391043174.wl@gnu.org>	<4F2BB26D.6070202@lysator.liu.se>
	<20120203.112004.135509652.wl@gnu.org>
In-Reply-To: <20120203.112004.135509652.wl@gnu.org>
X-Enigmail-Version: 1.1.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: peda@lysator.liu.se, 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, 03 Feb 2012 14:09:21 -0000

On 03/02/12 10:20, Werner LEMBERG wrote:
> 
> Thanks for the answers, Vincent and Peter!
> 
>> You do as you do with whatever else you are requiring.  Check if
>> #include <windows.h> is there, and check if you can link with some
>> API of your choice.  [...]
> 
> I would have expected something like this as a ready-to-run macro in
> the autoconf-macro archive, but surprisingly there is nothing as far
> as I can see.

There are some MINGW_AC... macros, which we sort of maintain informally
via the mingw-users ML.  To check for windows, I normally check for GCC
defining _WIN32, (which it always does when compiling for the native
platform, whether 32-bit or 64-bit).

I'll dig out the MINGW_AC... "standard" macro I use, and post it later.

-- 
Regards,
Keith.


From MAILER-DAEMON Fri Feb 03 09:35:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtKEn-0004oc-TW
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 09:35:41 -0500
Received: from eggs.gnu.org ([140.186.70.92]:33221)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1RtKEh-0004oG-HW
	for autoconf@gnu.org; Fri, 03 Feb 2012 09:35:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1RtKEb-0006Sl-EN
	for autoconf@gnu.org; Fri, 03 Feb 2012 09:35:35 -0500
Received: from mail-wi0-f169.google.com ([209.85.212.169]:54248)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>)
	id 1RtKER-0006OV-8h; Fri, 03 Feb 2012 09:35:19 -0500
Received: by wibhj13 with SMTP id hj13so3763064wib.0
	for <multiple recipients>; Fri, 03 Feb 2012 06:35:18 -0800 (PST)
Received: by 10.180.89.67 with SMTP id bm3mr12012943wib.13.1328279718217;
	Fri, 03 Feb 2012 06:35:18 -0800 (PST)
Received: from [192.168.13.4] (know-mailgateway-2.server.virginmedia.net.
	[62.254.26.101])
	by mx.google.com with ESMTPS id ex2sm17996509wib.1.2012.02.03.06.35.16
	(version=SSLv3 cipher=OTHER); Fri, 03 Feb 2012 06:35:17 -0800 (PST)
Sender: Keith Marshall <keith.d.marshall@ntlworld.com>
Message-ID: <4F2BF0A3.1080804@users.sourceforge.net>
Date: Fri, 03 Feb 2012 14:35:15 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Organization: MinGW Project Administrator
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16
MIME-Version: 1.0
To: Werner LEMBERG <wl@gnu.org>
Subject: Re: detecting windows
References: <4F2BAB63.3090507@icp.uni-stuttgart.de>	<20120203.104554.391043174.wl@gnu.org>	<4F2BB26D.6070202@lysator.liu.se>
	<20120203.112004.135509652.wl@gnu.org>
	<4F2BEA75.7050607@users.sourceforge.net>
In-Reply-To: <4F2BEA75.7050607@users.sourceforge.net>
X-Enigmail-Version: 1.1.1
Content-Type: multipart/mixed; boundary="------------080801030206060708070705"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.169
Cc: peda@lysator.liu.se, 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, 03 Feb 2012 14:35:41 -0000

This is a multi-part message in MIME format.
--------------080801030206060708070705
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 03/02/12 14:08, Keith Marshall wrote:
> I'll dig out the MINGW_AC... "standard" macro I use, and post it later.

Found it, quicker than I expected; attached.

-- 
Regards,
Keith.

--------------080801030206060708070705
Content-Type: text/plain;
 name="w32.m4"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="w32.m4"

# MINGW_AC_WIN32_NATIVE_HOST
# --------------------------
# Check if the runtime platform is a native Win32 host.
#
AC_DEFUN([MINGW_AC_WIN32_NATIVE_HOST],
[AC_CACHE_CHECK([whether we are building for a Win32 host], [mingw_cv_win32_host],
 AC_COMPILE_IFELSE([[
#ifdef _WIN32
 choke me
#endif]], [mingw_cv_win32_host=no], [mingw_cv_win32_host=yes]))dnl
])# MINGW_AC_WIN32_NATIVE_HOST

--------------080801030206060708070705--


From MAILER-DAEMON Fri Feb 03 11:00:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtLZA-0008BZ-TH
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 11:00:48 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44019)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <giuliopaci@gmail.com>) id 1RtJoT-0005Hq-5Q
	for autoconf@gnu.org; Fri, 03 Feb 2012 09:08:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <giuliopaci@gmail.com>) id 1RtJoN-00014e-UW
	for autoconf@gnu.org; Fri, 03 Feb 2012 09:08:29 -0500
Received: from mail-ww0-f49.google.com ([74.125.82.49]:35933)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <giuliopaci@gmail.com>) id 1RtJoN-00013i-QD
	for autoconf@gnu.org; Fri, 03 Feb 2012 09:08:23 -0500
Received: by mail-ww0-f49.google.com with SMTP id dt13so3017073wgb.30
	for <autoconf@gnu.org>; Fri, 03 Feb 2012 06:08:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type:content-transfer-encoding;
	bh=ZRayIhawVswO6MWhh1E1GKwideuL6tuC0A73xkXoOhE=;
	b=f4QVpw+Kw5GuHvNJfw07ocx//t+LkkK8jQHv6JmgVCj8+RUUK0I+SngVoS3GuFZRSm
	ZoguYIF85e7u2XKaaCX3gcJMQpwXwhNiP3qjit+3VP23Fh+ihLBYrLdeMO0nnwZeVq3N
	e8iWAOSGSh5Dlr3PFSkryRry/wRPlrIAc/1Pw=
Received: by 10.180.103.97 with SMTP id fv1mr11816338wib.17.1328278103065;
	Fri, 03 Feb 2012 06:08:23 -0800 (PST)
Received: from [0.0.0.0] (inet-1g-gw.dp.uaip.org. [188.95.153.254])
	by mx.google.com with ESMTPS id g6sm12700922wig.9.2012.02.03.06.08.20
	(version=SSLv3 cipher=OTHER); Fri, 03 Feb 2012 06:08:22 -0800 (PST)
Message-ID: <4F2BEA73.5040908@gmail.com>
Date: Fri, 03 Feb 2012 15:08:51 +0100
From: Giulio Paci <giuliopaci@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: How to deal problems in current autoconf version of M4 macros
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
X-Mailman-Approved-At: Fri, 03 Feb 2012 11:00:47 -0500
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, 03 Feb 2012 14:08:33 -0000

Hi to all,
	some time ago I converted a project (http://code.google.com/p/mitlm/)
build system from a simple Makefile to autoconf+automake.

The project needs a fortran compiler. Unfortunately the fortran.m4 file
shipped with autoconf 2.68 seems not to work on many current OSes (my
own, just to give an example). After investigating a little bit I
provided a patch for autoconf that was included in the development tree.

Time has passed, the last autoconf release is still 2.68, users keeps
complaining and it is difficult to setup a system that is suitable to
create a proper configure script.

My question is: is there any easy/clear way to include a patched
fortran.m4 file within the project and use that version only if autoconf
version is less than 2.69? Is there a more elegant fix to that?

Bests,
	Giulio.


From MAILER-DAEMON Fri Feb 03 11:22:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtLtx-0004fC-CP
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 11:22:17 -0500
Received: from eggs.gnu.org ([140.186.70.92]:51127)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1RtLtq-0004eX-2G
	for autoconf@gnu.org; Fri, 03 Feb 2012 11:22:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1RtLth-0003pr-OO
	for autoconf@gnu.org; Fri, 03 Feb 2012 11:22:09 -0500
Received: from smtp02.hiroshima-u.ac.jp ([133.41.15.117]:53295)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1RtLth-0003pV-4g
	for autoconf@gnu.org; Fri, 03 Feb 2012 11:22:01 -0500
Received: from smtp02.hiroshima-u.ac.jp (smtp02.hiroshima-u.ac.jp [127.0.0.1])
	by dummy.hiroshima-u.ac.jp (Postfix) with ESMTP id 8740D88D288;
	Sat,  4 Feb 2012 01:21:57 +0900 (JST)
Received: from [121.111.214.220] (KD121111214220.ppp.prin.ne.jp
	[121.111.214.220])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp02.hiroshima-u.ac.jp (Postfix) with ESMTP id C1084889B60;
	Sat,  4 Feb 2012 01:21:55 +0900 (JST)
Message-ID: <4F2C09A7.7010808@hiroshima-u.ac.jp>
Date: Sat, 04 Feb 2012 01:21:59 +0900
From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)
MIME-Version: 1.0
To: Giulio Paci <giuliopaci@gmail.com>
Subject: Re: [autoconf] How to deal problems in current autoconf version of
	M4 macros
References: <4F2BEA73.5040908@gmail.com>
In-Reply-To: <4F2BEA73.5040908@gmail.com>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1326-6.8.0.1017-18688.000
X-TM-AS-Result: No--21.049-10.0-31-10
X-imss-scan-details: No--21.049-10.0-31-10
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-TMASE-MatchedRID: voxmZxvAR2JITndh1lLRAZpaQZrxtVBsWyQijpt1UQl94c+e7fWIcByV
	gVL1usJvsDI19zhAldgPy3TBMnhjzUKd0deB5Y04e8FaKRfM2oMEa8g1x8eqF1S+oHmj8upzcam
	vz988laLI11uDDo8ZZsVg0vwFmJ6pdT7rfTiuL8UmtTGirqG/DwvxMaV6x4s8IBYCwGbs2HURdg
	9HrnewJO9fBMf483U6chX8YIY3uxJDahNSFRo/UmA/V00XWjDtGSqdEmeD/nVXopZjyO6CZWnu3
	7n5F9ihx6yZ5AQ90vwvk6d9DoCjPTRn2xdwrsXpw4PlNTUpnLkuwUJXiV/h4TRCaZSKE/Os7nP5
	+9Z3Og03VfC26sC2PT8hzx5rqlJoFXw6f0h5kXE5f9Xw/xqKXdr835OrKH5+i76rPO2HauZTf23
	9Z52oiiDZlOavT/vWxEHRux+uk8jpP8tMOyYmaA==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 133.41.15.117
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, 03 Feb 2012 16:22:15 -0000

Hi,

I'm not sure if I'm understanding the situation correctly,
but if the trouble occurs in the generation of configure,
I propose to consider an inclusion of autogen.sh script to
the project. You can check the version of automake/autoconf
and control the options to give aclocal, automake, autoconf,
thus, you can add /or ignore the directory including
your own fortran.m4 by changing "-I xxx" option.

Regards,
mpsuzuki

Giulio Paci wrote:
> Hi to all,
> 	some time ago I converted a project (http://code.google.com/p/mitlm/)
> build system from a simple Makefile to autoconf+automake.
> 
> The project needs a fortran compiler. Unfortunately the fortran.m4 file
> shipped with autoconf 2.68 seems not to work on many current OSes (my
> own, just to give an example). After investigating a little bit I
> provided a patch for autoconf that was included in the development tree.
> 
> Time has passed, the last autoconf release is still 2.68, users keeps
> complaining and it is difficult to setup a system that is suitable to
> create a proper configure script.
> 
> My question is: is there any easy/clear way to include a patched
> fortran.m4 file within the project and use that version only if autoconf
> version is less than 2.69? Is there a more elegant fix to that?
> 
> Bests,
> 	Giulio.
> 
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/listinfo/autoconf



From MAILER-DAEMON Fri Feb 03 13:05:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtNWJ-0008Es-8O
	for mharc-autoconf@gnu.org; Fri, 03 Feb 2012 13:05:59 -0500
Received: from eggs.gnu.org ([140.186.70.92]:60072)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <giuliopaci@gmail.com>) id 1RtNWC-0008ED-Ja
	for autoconf@gnu.org; Fri, 03 Feb 2012 13:05:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <giuliopaci@gmail.com>) id 1RtNW8-0002Sg-OW
	for autoconf@gnu.org; Fri, 03 Feb 2012 13:05:52 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:47579)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <giuliopaci@gmail.com>) id 1RtNW8-0002Sa-Dy
	for autoconf@gnu.org; Fri, 03 Feb 2012 13:05:48 -0500
Received: by eekc13 with SMTP id c13so1231769eek.0
	for <autoconf@gnu.org>; Fri, 03 Feb 2012 10:05:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=X1iV1pDIGF797ohxdn1f1C9D1eoiSF1woZvKpr5T/Rw=;
	b=WIXs8k7oJGhc35D+emABXwR+7b1iis/D/IJixXwaKJL/g9dPeWYKpnZI4TgPuZFpj8
	Fawq03k31daM4co6+kFeU8tDSdNARailY4jjQD6hMYcKnmkq4SPsFcPQ6KWMOQpW3+V0
	Y8ICtgmeRKK4kLRjGysiN3AcD8RDW5oiaqSSg=
Received: by 10.14.119.202 with SMTP id n50mr2619359eeh.120.1328292347288;
	Fri, 03 Feb 2012 10:05:47 -0800 (PST)
Received: from [0.0.0.0] (inet-1g-gw.dp.uaip.org. [188.95.153.254])
	by mx.google.com with ESMTPS id x4sm24425427eeb.4.2012.02.03.10.05.41
	(version=SSLv3 cipher=OTHER); Fri, 03 Feb 2012 10:05:46 -0800 (PST)
Message-ID: <4F2C2205.30804@gmail.com>
Date: Fri, 03 Feb 2012 19:05:57 +0100
From: Giulio Paci <giuliopaci@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Re: [autoconf] How to deal problems in current autoconf version of
	M4 macros
References: <4F2BEA73.5040908@gmail.com> <4F2C09A7.7010808@hiroshima-u.ac.jp>
In-Reply-To: <4F2C09A7.7010808@hiroshima-u.ac.jp>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.83.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: Fri, 03 Feb 2012 18:05:58 -0000

Hi,

On 02/03/2012 05:21 PM, suzuki toshiya wrote:
> I'm not sure if I'm understanding the situation correctly,
> but if the trouble occurs in the generation of configure,
> I propose to consider an inclusion of autogen.sh script to
> the project.
The problem is that generating configure with current version (2.68) of
autoconf ends in a configure script that is not able to guess proper
settings for fortran compilers in some environments.

> You can check the version of automake/autoconf
> and control the options to give aclocal, automake, autoconf,
> thus, you can add /or ignore the directory including
> your own fortran.m4 by changing "-I xxx" option.
If I understand correctly you are suggesting to add a directory with a
replacement for fortran.m4 and conditionally include that directory
depending on the tools version. Is it right?
Will the tools chose my own version of fortran.m4 instead of the
autoconf one, using this approach (and why?)?
Is it possible to achieve something similar that also works with autoreconf?

> Giulio Paci wrote:
>> Hi to all,
>> 	some time ago I converted a project (http://code.google.com/p/mitlm/)
>> build system from a simple Makefile to autoconf+automake.
>>
>> The project needs a fortran compiler. Unfortunately the fortran.m4 file
>> shipped with autoconf 2.68 seems not to work on many current OSes (my
>> own, just to give an example). After investigating a little bit I
>> provided a patch for autoconf that was included in the development tree.
>>
>> Time has passed, the last autoconf release is still 2.68, users keeps
>> complaining and it is difficult to setup a system that is suitable to
>> create a proper configure script.
>>
>> My question is: is there any easy/clear way to include a patched
>> fortran.m4 file within the project and use that version only if autoconf
>> version is less than 2.69? Is there a more elegant fix to that?
>>
>> Bests,
>> 	Giulio.
>>
>> _______________________________________________
>> Autoconf mailing list
>> Autoconf@gnu.org
>> https://lists.gnu.org/mailman/listinfo/autoconf
> 



From MAILER-DAEMON Sat Feb 04 01:45:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtZNl-0000w2-Ry
	for mharc-autoconf@gnu.org; Sat, 04 Feb 2012 01:45:57 -0500
Received: from eggs.gnu.org ([140.186.70.92]:43336)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtZNi-0000tt-8X
	for autoconf@gnu.org; Sat, 04 Feb 2012 01:45:55 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtZNh-0000js-7g
	for autoconf@gnu.org; Sat, 04 Feb 2012 01:45:54 -0500
Received: from mailout-de.gmx.net ([213.165.64.22]:45820)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <werner.lemberg@gmx.de>) id 1RtZNg-0000jT-Ql
	for autoconf@gnu.org; Sat, 04 Feb 2012 01:45:53 -0500
Received: (qmail invoked by alias); 04 Feb 2012 06:45:49 -0000
Received: from 178.115.55.42.wireless.dyn.drei.com (EHLO localhost)
	[178.115.55.42]
	by mail.gmx.net (mp002) with SMTP; 04 Feb 2012 07:45:49 +0100
X-Authenticated: #54312696
X-Provags-ID: V01U2FsdGVkX1+ky1QiYGykn9P6rk4Z9QqJheVkmECZUeX92/8jPp
	Y2FqeoPzo4KOLi
Date: Sat, 04 Feb 2012 07:45:38 +0100 (CET)
Message-Id: <20120204.074538.22141787.wl@gnu.org>
To: keithmarshall@users.sourceforge.net
Subject: Re: detecting windows
From: Werner LEMBERG <wl@gnu.org>
In-Reply-To: <4F2BF0A3.1080804@users.sourceforge.net>
References: <20120203.112004.135509652.wl@gnu.org>
	<4F2BEA75.7050607@users.sourceforge.net>
	<4F2BF0A3.1080804@users.sourceforge.net>
X-Mailer: Mew version 6.4rc1 on Emacs 24.0.92.1 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
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
Cc: peda@lysator.liu.se, 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: Sat, 04 Feb 2012 06:45:55 -0000


> On 03/02/12 14:08, Keith Marshall wrote:
>> I'll dig out the MINGW_AC... "standard" macro I use, and post it later.
> 
> Found it, quicker than I expected; attached.

Thanks!  Shall I take care of __WIN32__also to be as much generic as
possible?  According to

  http://sourceforge.net/apps/mediawiki/predef

Borland C++ is defining this.  Presumably it defines _WIN32 also,
but...


    Werner


From MAILER-DAEMON Thu Feb 09 17:35:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvcaE-0000xu-QI
	for mharc-autoconf@gnu.org; Thu, 09 Feb 2012 17:35:18 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44638)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1Rvca8-0000v1-PA
	for autoconf@gnu.org; Thu, 09 Feb 2012 17:35:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1Rvca3-0005RH-R6
	for autoconf@gnu.org; Thu, 09 Feb 2012 17:35:12 -0500
Received: from plane.gmane.org ([80.91.229.3]:53029)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1Rvca2-0005Li-N3
	for autoconf@gnu.org; Thu, 09 Feb 2012 17:35:07 -0500
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RvcZy-00088Q-VM
	for autoconf@gnu.org; Thu, 09 Feb 2012 23:35:02 +0100
Received: from g224123158.adsl.alicedsl.de ([92.224.123.158])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Thu, 09 Feb 2012 23:35:02 +0100
Received: from tim by g224123158.adsl.alicedsl.de with local (Gmexim 0.1
	(Debian)) id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Thu, 09 Feb 2012 23:35:02 +0100
X-Injected-Via-Gmane: http://gmane.org/
Mail-Followup-To: autoconf@gnu.org
To: autoconf@gnu.org
From: Tim Landscheidt <tim@tim-landscheidt.de>
Subject: autoscan: Advising that AC_FUNC_REALLOC is not The Right Thing (TM)
Date: Thu, 09 Feb 2012 22:10:34 +0000
Organization: <URI:http://www.tim-landscheidt.de/>
Lines: 23
Message-ID: <m3r4y3fyjp.fsf@passepartout.tim-landscheidt.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: g224123158.adsl.alicedsl.de
Mail-Copies-To: never
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock: sha1:oi87jaP3VCEppdvbAYgd+YMNYms=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 80.91.229.3
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: Thu, 09 Feb 2012 22:35:16 -0000

Hi,

for background, I'm looking at tackling a bug
(<URI:https://sourceforge.net/tracker/?func=detail&aid=1899047&group_id=97492&atid=618177>)
with flex's build system that seems to stem from the use of
AC_FUNC_REALLOC in configure.in without including gnulib's
(or another) implementation.  I believe this can be fixed by
simply omitting AC_FUNC_REALLOC (on the premise that
realloc(p, 0) is never used).

  The macro was originally added to configure.in on the sug-
gestion of autoscan which basically means that in a few
years some well-meaning developer will probably re-run auto-
scan, re-add the macro and the bug will re-appear.

  So is there a way to advise autoscan that it shouldn't
suggest AC_FUNC_REALLOC?  Another (human) solution would of
course be to add appropriate comments to configure.in and
hope that they will be read, but I'd prefer something more
robust.

TIA,
Tim



From MAILER-DAEMON Tue Feb 14 10:18:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RxK9R-0002ht-64
	for mharc-autoconf@gnu.org; Tue, 14 Feb 2012 10:18:41 -0500
Received: from eggs.gnu.org ([140.186.70.92]:51621)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RxK9K-0002hW-3V
	for autoconf@gnu.org; Tue, 14 Feb 2012 10:18:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RxK9A-0005fn-8a
	for autoconf@gnu.org; Tue, 14 Feb 2012 10:18:34 -0500
Received: from plane.gmane.org ([80.91.229.3]:57838)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RxK99-0005fa-S0
	for autoconf@gnu.org; Tue, 14 Feb 2012 10:18:24 -0500
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RxK97-0005jT-ST
	for autoconf@gnu.org; Tue, 14 Feb 2012 16:18:21 +0100
Received: from 204.19.0.214 ([204.19.0.214])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Tue, 14 Feb 2012 16:18:21 +0100
Received: from sds by 204.19.0.214 with local (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Tue, 14 Feb 2012 16:18:21 +0100
X-Injected-Via-Gmane: http://gmane.org/
Mail-Followup-To: autoconf@gnu.org
To: autoconf@gnu.org
From: Sam Steingold <sds@gnu.org>
Subject: how do I avoid dynamic libraries?
Date: Tue, 14 Feb 2012 10:18:04 -0500
Organization: disorganization
Lines: 30
Message-ID: <87d39higur.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: 204.19.0.214
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)
Mail-Copies-To: never
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
Cancel-Lock: sha1:khetyvBqW4Iux5BxIWAU/noDjZU=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 80.91.229.3
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: sds@gnu.org
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, 14 Feb 2012 15:18:39 -0000

There is a problem with the libffcall (http://www.gnu.org/software/libffcall/
http://savannah.gnu.org/projects/libffcall) package (un)maintained by
Bruno Haible, described in <https://bugs.launchpad.net/bugs/274951>:

-- libffcall should be built without shared libraries as explained in
   its README[1] file (most of the code is in headers anyway &c)

-- when clisp is linked against libffcall's shared libraries it crashes
   on self-test

So, I have two questions:

1. how do I modify the libffcall's configure.in[2] so that the shared
   libraries are never built even if the user asks for them?

2. how do I modify the clisp's configure.in[3] so that it never finds
   libffcall's shared libraries even if they are mistakenly installed?

[1] http://cvs.savannah.gnu.org/viewvc/*checkout*/ffcall/README?root=libffcall

[2] http://cvs.savannah.gnu.org/viewvc/*checkout*/ffcall/configure.in?root=libffcall

[3] http://clisp.hg.sourceforge.net/hgweb/clisp/clisp/file/tip/src/m4/ffcall.m4


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://memri.org http://camera.org http://iris.org.il
http://openvotingconsortium.org http://www.memritv.org
Oral sex was invented by mermaids.



From MAILER-DAEMON Tue Feb 14 12:34:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RxMGi-0007VG-W3
	for mharc-autoconf@gnu.org; Tue, 14 Feb 2012 12:34:20 -0500
Received: from eggs.gnu.org ([140.186.70.92]:60738)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1RxMGd-0007Tj-Eq
	for autoconf@gnu.org; Tue, 14 Feb 2012 12:34:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1RxMGZ-0001mN-6m
	for autoconf@gnu.org; Tue, 14 Feb 2012 12:34:15 -0500
Received: from smtp01.hiroshima-u.ac.jp ([133.41.15.116]:48760)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1RxMGY-0001l3-Kl
	for autoconf@gnu.org; Tue, 14 Feb 2012 12:34:11 -0500
Received: from smtp01.hiroshima-u.ac.jp (smtp01.hiroshima-u.ac.jp [127.0.0.1])
	by dummy.hiroshima-u.ac.jp (Postfix) with ESMTP id 2707E52207D
	for <autoconf@gnu.org>; Wed, 15 Feb 2012 02:34:05 +0900 (JST)
Received: from [121.111.217.13] (KD121111217013.ppp.prin.ne.jp
	[121.111.217.13]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp01.hiroshima-u.ac.jp (Postfix) with ESMTP id 01A6452207C
	for <autoconf@gnu.org>; Wed, 15 Feb 2012 02:33:45 +0900 (JST)
Message-ID: <4F3A9ADE.3070509@hiroshima-u.ac.jp>
Date: Wed, 15 Feb 2012 02:33:18 +0900
From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Re: [autoconf] how do I avoid dynamic libraries?
References: <87d39higur.fsf@gnu.org>
In-Reply-To: <87d39higur.fsf@gnu.org>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1326-6.8.0.1017-18710.000
X-TM-AS-Result: No--27.792-10.0-31-10
X-imss-scan-details: No--27.792-10.0-31-10
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-TMASE-MatchedRID: mJt40tgS0QBITndh1lLRAe5i6weAmSDKQrO4XR6BRQNLgo8+IIHbcLmg
	4urERD7oGWtzbrhLRgjkY5jnILkv8eUCnwjs0Blw4pdq9sdj8LW94JvJnfFrHoKwF4K/wIz9MVB
	Vb5kin5EqEExr5058LjSbZepgD2nctDyv3gNOnrezI1v7J4hECoVdLK46KrcfXCmcAC8DBrPMV0
	8BegCxU/iEc6LcybXf3lHIwvm0uaxqGo1rERB4aL8geKdegO7hoKO8hENbdcv1gF7PCEF9bjDKO
	Byvrk6BC2LSbHrzHY3lPWOZdnoFfGe90Z2gWyxaQr2qXCJMSV9d1i4o7aANgNDmz6BAnpknU9a6
	zfLFA1Z7W4fLIIw/OuwFAXG5XM8DS+TGKJDBZ9RN3UUbIf4espxtmRxYqTYbP3NIZuw9lzIN/BY
	oxcDCEhmjgSlktaagucTaKO3I778KQjtweN2DTkY41YX/o/8K66cYQGo+KX4+WVT1m0MMz7xAi7
	jPoeEQftwZ3X11IV0=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 133.41.15.116
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, 14 Feb 2012 17:34:19 -0000

I'm not a user of LISP, so my comment could be pointless...

1. it seems that libffcall is already using GNU Libtool,
   so adding "-static" flag to the option when la file is built
   would be the easiest way, like,

(current)
libavcall.la : $(OBJECTS)
	$(LIBTOOL_LINK) $(CC) -o libavcall.la -rpath $(libdir) $(OBJECTS)

(modified)
libavcall.la : $(OBJECTS)
	$(LIBTOOL_LINK) $(CC) -static -o libavcall.la -rpath $(libdir) $(OBJECTS)

See also http://sourceware.org/autobook/autobook/autobook_88.html

2. I don't have good idea. I think there is no portable flag making
a linker to ignore specific shared library as far as we use "-lxxx"
option. Thus, we should do such by "add the pathname of archive
library to LIBS flag, and do not use -lxxx option in it". It is not
so difficult if the users of libffcall can specify the prefix of
the directory of libffcall, like "--with-libffcall=/somewhere", but,
if the location of libffcall is unknown, searching it would not be
deterministic. It would be heuristic, aslike the conventional search
for X11 library/headers. Another headache is that we cannot distinguish
archive library and shared library by its extensions (e.g. IBM AIX uses
".a" for both library), and I don't have good idea to distinguish them
quickly and precisely.

Regards,
mpsuzuki

Sam Steingold wrote:
> There is a problem with the libffcall (http://www.gnu.org/software/libffcall/
> http://savannah.gnu.org/projects/libffcall) package (un)maintained by
> Bruno Haible, described in <https://bugs.launchpad.net/bugs/274951>:
> 
> -- libffcall should be built without shared libraries as explained in
>    its README[1] file (most of the code is in headers anyway &c)
> 
> -- when clisp is linked against libffcall's shared libraries it crashes
>    on self-test
> 
> So, I have two questions:
> 
> 1. how do I modify the libffcall's configure.in[2] so that the shared
>    libraries are never built even if the user asks for them?
> 
> 2. how do I modify the clisp's configure.in[3] so that it never finds
>    libffcall's shared libraries even if they are mistakenly installed?
> 
> [1] http://cvs.savannah.gnu.org/viewvc/*checkout*/ffcall/README?root=libffcall
> 
> [2] http://cvs.savannah.gnu.org/viewvc/*checkout*/ffcall/configure.in?root=libffcall
> 
> [3] http://clisp.hg.sourceforge.net/hgweb/clisp/clisp/file/tip/src/m4/ffcall.m4
> 
> 



From MAILER-DAEMON Tue Feb 14 12:46:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RxMSG-00036h-DG
	for mharc-autoconf@gnu.org; Tue, 14 Feb 2012 12:46:16 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57676)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=nbowler=38460ad0d@mail.ellipticsemi.com>)
	id 1RxMSA-00035z-L5
	for autoconf@gnu.org; Tue, 14 Feb 2012 12:46:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <prvs=nbowler=38460ad0d@mail.ellipticsemi.com>)
	id 1RxMS4-0004IA-7Q
	for autoconf@gnu.org; Tue, 14 Feb 2012 12:46:10 -0500
Received: from mx.scalarmail.ca ([98.158.95.75]:46956
	helo=ironport-01.sms.scalar.ca)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=nbowler=38460ad0d@mail.ellipticsemi.com>)
	id 1RxMS4-0004EE-51; Tue, 14 Feb 2012 12:46:04 -0500
Received: from unknown (HELO sms-zimbra-mta-01.sms.scalar.ca) ([192.168.32.56])
	by ironport-01.sms.scalar.ca with ESMTP; 14 Feb 2012 12:13:50 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by sms-zimbra-mta-01.sms.scalar.ca (Postfix) with ESMTP id 2306E17F66; 
	Tue, 14 Feb 2012 12:13:50 -0500 (EST)
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 O70V81J0oIFg; Tue, 14 Feb 2012 12:13:45 -0500 (EST)
Received: from mail.ellipticsemi.com (dsl-67-204-24-19.acanac.net
	[67.204.24.19])
	by sms-zimbra-mta-01.sms.scalar.ca (Postfix) with ESMTPSA id 761F717F63;
	Tue, 14 Feb 2012 12:13:44 -0500 (EST)
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; Tue, 14 Feb 2012 12:13:44 -0500 (EST)
Date: Tue, 14 Feb 2012 12:13:43 -0500
From: Nick Bowler <nbowler@elliptictech.com>
To: autoconf@gnu.org
Subject: Re: how do I avoid dynamic libraries?
Message-ID: <20120214171343.GA12743@elliptictech.com>
References: <87d39higur.fsf@gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87d39higur.fsf@gnu.org>
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: libtool@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, 14 Feb 2012 17:46:15 -0000

Hi Sam,

This sounds like a libtool question, so I'll Cc the libtool list and
try to answer it based on that assumption.

On 2012-02-14 10:18 -0500, Sam Steingold wrote:
> There is a problem with the libffcall (http://www.gnu.org/software/libffcall/
> http://savannah.gnu.org/projects/libffcall) package (un)maintained by
> Bruno Haible, described in <https://bugs.launchpad.net/bugs/274951>:
> 
> -- libffcall should be built without shared libraries as explained in
>    its README[1] file (most of the code is in headers anyway &c)
> 
> -- when clisp is linked against libffcall's shared libraries it crashes
>    on self-test
> 
> So, I have two questions:
> 
> 1. how do I modify the libffcall's configure.in[2] so that the shared
>    libraries are never built even if the user asks for them?

If you use LT_INIT([disable-shared]) in configure.ac, then the default
will be to not build shared libraries.  The user can still enable them
explicitly, though.

To totally disable generating a shared library, you'll need to link the
library using libtool's -static flag (if you're using automake, this
probably means adding it to libffcall_la_LDFLAGS).

Another option is to not use libtool at all.

> 2. how do I modify the clisp's configure.in[3] so that it never finds
>    libffcall's shared libraries even if they are mistakenly installed?

The easiest way is to say "don't do that".

Nevertheless, libtool provides the flag -static-libtool-libs to force it
to use only static libtool libraries.  However, this will affect *all*
libtool libraries that you link against.  I don't know if possible to
link only a subset of the libtool libraries statically.

Another option is to not link against the libtool library at all.

> 
> [1] http://cvs.savannah.gnu.org/viewvc/*checkout*/ffcall/README?root=libffcall
> 
> [2] http://cvs.savannah.gnu.org/viewvc/*checkout*/ffcall/configure.in?root=libffcall
> 
> [3] http://clisp.hg.sourceforge.net/hgweb/clisp/clisp/file/tip/src/m4/ffcall.m4

Hope that helps,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)



From MAILER-DAEMON Wed Feb 15 08:04:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RxeWp-0000Iz-Os
	for mharc-autoconf@gnu.org; Wed, 15 Feb 2012 08:04:11 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41983)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dherring@tentpost.com>) id 1RxTYJ-0006Lg-Vr
	for autoconf@gnu.org; Tue, 14 Feb 2012 20:21:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dherring@tentpost.com>) id 1RxTYJ-0002iD-3Z
	for autoconf@gnu.org; Tue, 14 Feb 2012 20:20:59 -0500
Received: from caiajhbdcaid.dreamhost.com ([208.97.132.83]:55448
	helo=homiemail-a22.g.dreamhost.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dherring@tentpost.com>)
	id 1RxTYI-0002hS-Nm; Tue, 14 Feb 2012 20:20:58 -0500
Received: from homiemail-a22.g.dreamhost.com (localhost [127.0.0.1])
	by homiemail-a22.g.dreamhost.com (Postfix) with ESMTP id E28081A8069;
	Tue, 14 Feb 2012 17:20:56 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws; d=tentpost.com; h=date:from:to:cc
	:subject:in-reply-to:message-id:references:mime-version:
	content-type; q=dns; s=tentpost.com; b=S0dX3WEaTfbLLNtnrwv0gM1HB
	7lGJYVNyYvl+jRuNiULbWRdgCYlv8HgDvsqk8DEdE6CnblO9ZE2t76wGkTyfsFdx
	eLJflGWDm4f3WolNElLvEiMXal4QiNbebqwgQLAXDocvcqUk8v+q/6k0hGV7Mlge
	Hf8aebBrn94dmt6S8E=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=tentpost.com; h=date:from
	:to:cc:subject:in-reply-to:message-id:references:mime-version:
	content-type; s=tentpost.com; bh=WwuR+kN0lVsmAbdFUs86FYG6jBA=;
	b=IwlB9CjJm5dMNbdGuTQpmqoZxfw0UeuQoExBsk8HRzw+ll8tlarXMYhnJOAhp
	5b3UvkrHXZcoBbWVBf/M7ip573i6O/sCcHmXluu68JIEqoZQXmgD50U48/KvWQup
	hpl7PgOG2IgR9bClr55NGMXPgaGhvXGgQx0F4HIKuyV0z8=
Received: from strider2.home (pool-173-76-234-249.bstnma.fios.verizon.net
	[173.76.234.249])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	(Authenticated sender: dherring@tentpost.com)
	by homiemail-a22.g.dreamhost.com (Postfix) with ESMTPSA id 4BB2B1A8063; 
	Tue, 14 Feb 2012 17:20:56 -0800 (PST)
Date: Tue, 14 Feb 2012 20:20:54 -0500 (EST)
From: Daniel Herring <dherring@tentpost.com>
X-X-Sender: nuntius@strider2.example.org
To: Nick Bowler <nbowler@elliptictech.com>
Subject: Re: how do I avoid dynamic libraries?
In-Reply-To: <20120214171343.GA12743@elliptictech.com>
Message-ID: <alpine.LNX.2.00.1202142006180.5967@strider2.example.org>
References: <87d39higur.fsf@gnu.org> <20120214171343.GA12743@elliptictech.com>
User-Agent: Alpine 2.00 (LNX 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.97.132.83
X-Mailman-Approved-At: Wed, 15 Feb 2012 08:04:09 -0500
Cc: autoconf@gnu.org, libtool@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, 15 Feb 2012 01:21:01 -0000

The only sure way I know to statically link a single library is to 
dispense with the common -lname and directly specify /path/to/libffcall.a 
(or the platform-specific equivalent) on the linker command line.

- Daniel


From MAILER-DAEMON Sun Feb 19 03:46:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rz2Pi-0000ZZ-7C
	for mharc-autoconf@gnu.org; Sun, 19 Feb 2012 03:46:34 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58419)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jklowden@schemamania.org>) id 1RyvaT-0007NX-R5
	for autoconf@gnu.org; Sat, 18 Feb 2012 20:29:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jklowden@schemamania.org>) id 1RyvaR-0002wd-IB
	for autoconf@gnu.org; Sat, 18 Feb 2012 20:29:13 -0500
Received: from mail14.sea5.speakeasy.net ([69.17.117.16]:51394)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jklowden@schemamania.org>) id 1RyvaR-0002wX-54
	for autoconf@gnu.org; Sat, 18 Feb 2012 20:29:11 -0500
Received: (qmail 3297 invoked from network); 19 Feb 2012 01:29:08 -0000
Received: by simscan 1.4.0 ppid: 1823, pid: 25511, t: 0.1091s
	scanners: clamav: 0.88.2/m:52/d:10739
Received: from mxperim3.sea5.speakeasy.net ([69.17.117.68])
	(envelope-sender <jklowden@schemamania.org>)
	by mail14.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP
	for <autoconf@gnu.org>; 19 Feb 2012 01:29:08 -0000
Received: from localhost (localhost [127.0.0.1])
	by mxperim3.sea5.speakeasy.net (Postfix) with ESMTP id 80C2243C83
	for <autoconf@gnu.org>; Sat, 18 Feb 2012 17:29:08 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at mxperim3.sea5.speakeasy.net
Received: from mxperim3.sea5.speakeasy.net ([127.0.0.1])
	by localhost (mxperim3.sea5.speakeasy.net [127.0.0.1]) (amavisd-new,
	port 10024) with ESMTP id O5wS7ASjK43i for <autoconf@gnu.org>;
	Sat, 18 Feb 2012 17:29:08 -0800 (PST)
Received: from oak.schemamania.org (dsl254-083-208.nyc1.dsl.speakeasy.net
	[216.254.83.208]) by mxperim3.sea5.speakeasy.net (Postfix) with ESMTP
	for <autoconf@gnu.org>; Sat, 18 Feb 2012 17:29:07 -0800 (PST)
Received: from oak.schemamania.org (localhost [IPv6:::1])
	by oak.schemamania.org (Postfix) with SMTP id E83DC30E13EE
	for <autoconf@gnu.org>; Sat, 18 Feb 2012 20:29:06 -0500 (EST)
Date: Sat, 18 Feb 2012 20:29:06 -0500
From: "James K. Lowden" <jklowden@schemamania.org>
To: autoconf@gnu.org
Subject: modernizing xdiv
Message-Id: <20120218202906.01d38d93.jklowden@schemamania.org>
X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64--netbsd)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 69.17.117.16
X-Mailman-Approved-At: Sun, 19 Feb 2012 03:46:32 -0500
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, 19 Feb 2012 01:29:15 -0000

I thought I'd update the autoconf setup for xdiv to make it work on
OS X.  I did what I thought was needed, and managed to generate a
non-working configure script.  Where did I go wrong?   

Original tarball: http://math.berkeley.edu/~vojta/xdvi/xdvi-22.85.tar.gz
Modified sources: http://www.schemamania.org/xdvi-22.85/

Full output of "nohup sh -x ../configure > log" is in
	http://www.schemamania.org/xdvi-22.85/build/log

Changes so far:

rename configure.in to configure.ac 
rename Makefile.in to Makefile.am
rename aclocal.m4 to acinclude.m4 
remove acinclude.h
update configure.ac, Makefile.am, and acinclude.h (diff below)
run aclocal, autoreconf, autoconf, and automake

Example result:

$ (cd build/ && ../configure --x-include=/usr/X11/include
--x-lib=/usr/X11/lib 2>&1) | tail 
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for whether setsid() is allowed within vfork()... no
checking for waitpid... yes
../configure: line 10559: syntax error: unexpected end of file

I realize there are many sources of error, but it's difficult to know
where to start.   

Details follow.  Many thanks for your kind assistance.  

--jkl

$ (autoconf --version; automake --version) |  grep ^auto
autoconf (GNU Autoconf) 2.61
automake (GNU automake) 1.10

 --- /tmp/xdvi-22.85/configure.in        2008-03-27 18:04:48.000000000
-0400 +++ configure.ac        2012-02-18 18:19:11.000000000 -0500
@@ -1,7 +1,9 @@
 dnl Process this file with xautoconf (not autoconf!) to produce a
 dnl configure script.  See xautocnf.txt for details on xautoconf.
 dnl
-AC_INIT(xdvi.c)
+AC_INIT([xdvi], [22.85])
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([xdvi.c])
 AC_CONFIG_HEADER(config.h:config.hin)
 
 AC_PROG_CC
@@ -24,7 +26,7 @@
 
 AC_PATH_X
 AC_PATH_XTRA
-AC_REQUIRE_X
+dnl jkl AC_REQUIRE_X
 
 ac_save_cpp=$ac_cpp
 ac_cpp="$ac_cpp $X_CFLAGS"
@@ -316,9 +318,10 @@
                           set default print command to CMD],
 DEFAULT_DVIPS_PATH, "dvips")
 
-AC_SUBST(OPT_SRCS)dnl
-AC_SUBST(OPT_OBJS)dnl
+AC_SUBST(OPT_SRCS)
+AC_SUBST(OPT_OBJS)
 
 dnl Done.
 dnl Makefile is automatically included, unless imake is in use.
-AC_OUTPUT()
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT

--- /tmp/xdvi-22.85/Makefile.in 2003-11-17 20:43:12.000000000 -0500
+++ Makefile.am 2012-02-18 18:05:33.000000000 -0500
@@ -27,7 +27,7 @@
 X_CFLAGS=@X_CFLAGS@
 
 LDFLAGS=@LDFLAGS@
-X_LDFLAGS=@LDFLAGS@ @x_linker_options@ @X_LIBS@
+LDFLAGS_XDVI=@LDFLAGS@ @x_linker_options@ @X_LIBS@
 X_LIBS=@X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@
 LIBS=@LIBS@ @MATH_LIB@
 
@@ -38,12 +38,12 @@
 
 INSTALL=@INSTALL@
 INSTALL_PROGRAM=@INSTALL_PROGRAM@
-INSTALL_DATA=@INSTALL_DATA@
+## jkl INSTALL_DATA=@INSTALL_DATA@
 
 all: xdvi$(EXEEXT) xdvi.man
 
 xdvi$(EXEEXT): $(OBJS)
-       $(CC) $(X_LDFLAGS) -o xdvi $(OBJS) $(X_LIBS) $(LIBS)
+       $(CC) $(LDFLAGS_XDVI) -o xdvi $(OBJS) $(X_LIBS) $(LIBS)
        $(CHMOD) go+rx xdvi$(EXEEXT)
 
 .c.o:

# The m4 stuff is all about quoting 

--- /tmp/xdvi-22.85/aclocal.m4  2003-11-17 20:40:08.000000000 -0500
+++ acinclude.m4        2012-02-18 17:48:19.000000000 -0500
@@ -1,6 +1,6 @@
 dnl ### Determine integer type to use for bitmaps
 
-AC_DEFUN(XDVI_C_BITMAP_TYPE,
+AC_DEFUN([XDVI_C_BITMAP_TYPE],
 [AC_MSG_CHECKING(for integer type to use in bitmaps)
 AC_CACHE_VAL(xdvi_cv_bitmap_type,
 [AC_TRY_RUN(
@@ -29,7 +29,7 @@
 
 dnl ### Check for whether the C compiler does string concatenation
 
-AC_DEFUN(XDVI_CC_CONCAT,
+AC_DEFUN([XDVI_CC_CONCAT],
 [AC_CACHE_CHECK([for whether the C compiler supports string
concatenation], xdvi_cc_concat,
 [AC_TRY_COMPILE(
@@ -46,7 +46,7 @@
 
 dnl ### Check for at-least-pretend Streams capability
 
-AC_DEFUN(XDVI_SYS_STREAMS,
+AC_DEFUN([XDVI_SYS_STREAMS],
 [AC_CACHE_CHECK([for stropts.h and isastream()], xdvi_cv_sys_streams,
 [AC_TRY_LINK(
 [#include <stropts.h>
@@ -62,7 +62,7 @@
 
 dnl ### Check for poll()
 
-AC_DEFUN(XDVI_FUNC_POLL,
+AC_DEFUN([XDVI_FUNC_POLL],
 [AC_CACHE_CHECK([for poll.h and poll()], xdvi_cv_func_poll,
 [AC_TRY_LINK(
 [#include <poll.h>
@@ -77,7 +77,7 @@
 
 dnl ### Check for ulltostr() and for the long long type
 
-AC_DEFUN(XDVI_FUNC_ULLTOSTR,
+AC_DEFUN([XDVI_FUNC_ULLTOSTR],
 [AC_CACHE_CHECK([for the function ulltostr() and the long long type],
 xdvi_cv_func_ulltostr,
 [AC_TRY_LINK(
@@ -97,7 +97,7 @@
 
 dnl ### Check for a C99-compatible implementation of (v)snprintf()
 
-AC_DEFUN(XDVI_FUNC_C99_VSNPRINTF,
+AC_DEFUN([XDVI_FUNC_C99_VSNPRINTF],
 [AC_CACHE_CHECK([for a c99-compatible implementation of (v)snprintf()],
 xdvi_cv_func_good_vsnprintf,
 [AC_TRY_RUN(
@@ -116,7 +116,7 @@
 
 dnl ### Check for SunOS 4
 
-AC_DEFUN(XDVI_SYS_SUNOS_4,
+AC_DEFUN([XDVI_SYS_SUNOS_4],
 [AC_CACHE_CHECK([for SunOS 4], xdvi_cv_sys_sunos_4,
 [case "`(uname -sr) 2>/dev/null`" in
 "SunOS 4."*)
@@ -130,7 +130,7 @@
 
 dnl ### Check for certain broken versions of Linux
 
-AC_DEFUN(XDVI_SYS_OLD_LINUX,
+AC_DEFUN([XDVI_SYS_OLD_LINUX],
 [AC_CACHE_CHECK([for certain old versions of Linux],
xdvi_cv_sys_old_linux, [case "`(uname -sr) 2>/dev/null`" in
 "Linux 2."[[01]].* | "Linux 2.2."[[0-8]] | "Linux 2.2."[[0-8]]-*)
@@ -145,7 +145,7 @@
 dnl ### Process a string argument
 
 dnl XDVI_ARG_STRING(PACKAGE, HELP-STRING, VARIABLE, DEFAULT_VALUE)
-AC_DEFUN(XDVI_ARG_STRING,
+AC_DEFUN([XDVI_ARG_STRING],
 [AC_ARG_WITH($1, [$2], [AC_DEFINE_UNQUOTED($3, "$withval")
 ], [AC_DEFINE($3, [$4])
 ])])
@@ -153,7 +153,7 @@
 
 dnl ### Check for whether we need -lXpm
 
-AC_DEFUN(XDVI_CHECK_XPM,
+AC_DEFUN([XDVI_CHECK_XPM],
 [if test -z "$imake"; then
 # Cygwin needs -lXpm to be linked in explicitly; yet on older (<4.2)
 # versions of XFree86, -lXpm exists, but is not needed.  So we do two
checks. @@ -175,7 +175,7 @@
 dnl ### Check for whether setsid() is allowed within vfork()
 dnl (Mac OS X 10.3 (Panther, 11/2003) is one O/S which does not allow
this.) 
-AC_DEFUN(XDVI_FUNC_SETSID_IN_VFORK,
+AC_DEFUN([XDVI_FUNC_SETSID_IN_VFORK],
 [if test $ac_cv_func_vfork_works = yes; then
 AC_CACHE_CHECK([for whether setsid() is allowed within vfork()],
 xdvi_cv_setsid_in_vfork,
@@ -227,7 +227,7 @@
 dnl ### Check if the --allow-multiple-definition linker flag is
 dnl ### available (assuming that we need to use it if it is)
 
-AC_DEFUN(XDVI_LINKER_MULTIPLE_DEFNS,
+AC_DEFUN([XDVI_LINKER_MULTIPLE_DEFNS],
 [AC_CACHE_CHECK([whether linker supports the
--allow-multiple-definition flag], xdvi_linker_multiple_defns,
 xdvi_save_LDFLAGS="$LDFLAGS"


From MAILER-DAEMON Mon Feb 20 04:12:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RzPIU-0002nN-V0
	for mharc-autoconf@gnu.org; Mon, 20 Feb 2012 04:12:38 -0500
Received: from eggs.gnu.org ([140.186.70.92]:48190)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peb@mppmu.mpg.de>) id 1RzPIO-0002mg-FN
	for autoconf@gnu.org; Mon, 20 Feb 2012 04:12:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peb@mppmu.mpg.de>) id 1RzPIJ-00040W-3j
	for autoconf@gnu.org; Mon, 20 Feb 2012 04:12:32 -0500
Received: from smtp.mppmu.mpg.de ([134.107.24.58]:50814)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peb@mppmu.mpg.de>) id 1RzPII-0003z6-Qg
	for autoconf@gnu.org; Mon, 20 Feb 2012 04:12:27 -0500
Received: by smtp.mppmu.mpg.de (Postfix, from userid 998)
	id 50337282843D; Mon, 20 Feb 2012 10:12:24 +0100 (CET)
Received: from mail.mppmu.mpg.de (mail-6.mppmu.mpg.de [134.107.6.12])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.mppmu.mpg.de (Postfix) with ESMTP id 4F27D2828070;
	Mon, 20 Feb 2012 10:12:15 +0100 (CET)
Received: from pcl321.mppmu.mpg.de (pcl321.mppmu.mpg.de [134.107.3.54])
	by mail.mppmu.mpg.de (Postfix) with ESMTP id 1CDC31A156B;
	Mon, 20 Feb 2012 10:12:15 +0100 (CET)
Received: from pcl321.mppmu.mpg.de (localhost [127.0.0.1])
	by pcl321.mppmu.mpg.de (8.14.2/8.14.1) with ESMTP id q1K9CFxu001483;
	Mon, 20 Feb 2012 10:12:15 +0100
Received: from localhost (peb@localhost)
	by pcl321.mppmu.mpg.de (8.14.2/8.14.2/Submit) with ESMTP id
	q1K9CEsA001479; Mon, 20 Feb 2012 10:12:15 +0100
X-Authentication-Warning: pcl321.mppmu.mpg.de: peb owned process doing -bs
Date: Mon, 20 Feb 2012 10:12:14 +0100 (CET)
From: Peter Breitenlohner <peb@mppmu.mpg.de>
To: "James K. Lowden" <jklowden@schemamania.org>
Subject: Re: modernizing xdvi
In-Reply-To: <20120218202906.01d38d93.jklowden@schemamania.org>
Message-ID: <alpine.LNX.2.00.1202201004320.13913@pcl321.mppmu.mpg.de>
References: <20120218202906.01d38d93.jklowden@schemamania.org>
User-Agent: Alpine 2.00 (LNX 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 134.107.24.58
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, 20 Feb 2012 09:12:37 -0000

On Sat, 18 Feb 2012, James K. Lowden wrote:

> I thought I'd update the autoconf setup for xdiv to make it work on
> OS X.  I did what I thought was needed, and managed to generate a
> non-working configure script.  Where did I go wrong?
>
> Original tarball: http://math.berkeley.edu/~vojta/xdvi/xdvi-22.85.tar.gz
> Modified sources: http://www.schemamania.org/xdvi-22.85/
>
> Full output of "nohup sh -x ../configure > log" is in
> 	http://www.schemamania.org/xdvi-22.85/build/log
>
> Changes so far:
>
> rename configure.in to configure.ac
> rename Makefile.in to Makefile.am
> rename aclocal.m4 to acinclude.m4
> remove acinclude.h
> update configure.ac, Makefile.am, and acinclude.h (diff below)
> run aclocal, autoreconf, autoconf, and automake

Why not use xdvik which is part of the TeX Live distribution (the current
version is 22.16 with latest xdvi changes from May 2009, i..e, newer than
22.85 from Paul Vojta), or at least use that as a guide how to proceed?

> $ (autoconf --version; automake --version) |  grep ^auto
> autoconf (GNU Autoconf) 2.61
> automake (GNU automake) 1.10

IMHO it makes no sense to base new work on such ancient versions.

Regards
Peter Breitenlohner <peb@mppmu.mpg.de>


From MAILER-DAEMON Mon Feb 20 04:24:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RzPTt-0005e9-JC
	for mharc-autoconf@gnu.org; Mon, 20 Feb 2012 04:24:25 -0500
Received: from eggs.gnu.org ([140.186.70.92]:51427)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles.bader.fz@renesas.com>) id 1RzPTo-0005bx-5M
	for autoconf@gnu.org; Mon, 20 Feb 2012 04:24:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <miles.bader.fz@renesas.com>) id 1RzPTi-0005wh-Fn
	for autoconf@gnu.org; Mon, 20 Feb 2012 04:24:20 -0500
Received: from relmlor1.renesas.com ([210.160.252.171]:36911)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles.bader.fz@renesas.com>) id 1RzPTi-0005wQ-6p
	for autoconf@gnu.org; Mon, 20 Feb 2012 04:24:14 -0500
Received: from relmlir4.idc.renesas.com ([10.200.68.154])
	by relmlor1.idc.renesas.com ( SJSMS)
	with ESMTP id <0LZO00M3RQ3L8L10@relmlor1.idc.renesas.com> for
	autoconf@gnu.org; Mon, 20 Feb 2012 18:23:45 +0900 (JST)
Received: from relmlac1.idc.renesas.com ([10.200.69.21])
	by relmlir4.idc.renesas.com ( SJSMS)
	with ESMTP id <0LZO00ALUQ3L8260@relmlir4.idc.renesas.com> for
	autoconf@gnu.org; Mon, 20 Feb 2012 18:23:45 +0900 (JST)
Received: by relmlac1.idc.renesas.com (Postfix, from userid 0)
	id AC9B68015B; Mon, 20 Feb 2012 18:23:45 +0900 (JST)
Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1])
	by relmlac1.idc.renesas.com (Postfix) with ESMTP id A6E5080030; Mon,
	20 Feb 2012 18:23:45 +0900 (JST)
Received: from relmlii1.idc.renesas.com [10.200.68.65]	by
	relmlac1.idc.renesas.com with ESMTP id UAJ11223; Mon,
	20 Feb 2012 18:23:45 +0900
X-IronPort-AV: E=Sophos;i="4.73,450,1325430000";   d="scan'208";a="68827399"
Received: from unknown (HELO relay61.aps.necel.com) ([10.29.19.64])
	by relmlii1.idc.renesas.com with ESMTP; Mon, 20 Feb 2012 18:23:45 +0900
Received: from dhlpc061 (dhlpc061.dev.necel.com [10.114.97.40])
	by relay61.aps.necel.com (8.14.4+Sun/8.14.4) with ESMTP id
	q1K9NfT7007314; Mon, 20 Feb 2012 18:23:41 +0900 (JST)
Received: by dhlpc061 (Postfix, from userid 31295)	id CAB8052E1E3; Mon,
	20 Feb 2012 18:23:40 +0900 (JST)
From: Miles Bader <miles@gnu.org>
To: Peter Breitenlohner <peb@mppmu.mpg.de>
Subject: Re: modernizing xdvi
References: <20120218202906.01d38d93.jklowden@schemamania.org>
	<alpine.LNX.2.00.1202201004320.13913@pcl321.mppmu.mpg.de>
System-Type: x86_64-unknown-linux-gnu
Blat: Foop
Date: Mon, 20 Feb 2012 18:23:39 +0900
In-reply-to: <alpine.LNX.2.00.1202201004320.13913@pcl321.mppmu.mpg.de>
Message-id: <buok43hc0ys.fsf@dhlpc061.dev.necel.com>
Lines: 22
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?)
X-Received-From: 210.160.252.171
Cc: "James K. Lowden" <jklowden@schemamania.org>, 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, 20 Feb 2012 09:24:24 -0000

Peter Breitenlohner <peb@mppmu.mpg.de> writes:
>> $ (autoconf --version; automake --version) |  grep ^auto
>> autoconf (GNU Autoconf) 2.61
>> automake (GNU automake) 1.10
>
> IMHO it makes no sense to base new work on such ancient versions.

I've noticed some projects use them because they're afraid of the
GPLv3...

[My depressing story:  I tried to recommend that Mesa project upgrade
their autotools versions, but one guy (not a major dev) worked at
Apple, and apparently Apple pushes its employees who work on free
software to refuse to work on anything that uses any GPLv3 tools --
even when there's no legal repercussion to using them (_use_ of the
tools isn't affected by GPLv3).]

-Miles

--=20
=E9=AD=94=E5=8A=9B=E3=82=92=E6=8C=81=E3=81=A3=E3=81=9F=E8=AC=8E=E3=81=AE=E7=
=9F=B3=E4=BB=8F
=E8=8B=94=E5=9C=B0=E8=94=B5=E6=A7=98=E3=81=AB=E8=BF=91=E3=81=A5=E3=81=84=E3=
=81=A6


From MAILER-DAEMON Mon Feb 20 12:57:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RzXUO-0001hu-LP
	for mharc-autoconf@gnu.org; Mon, 20 Feb 2012 12:57:28 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41175)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RzXUF-0001eW-Ra
	for autoconf@gnu.org; Mon, 20 Feb 2012 12:57:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RzXUA-00052H-EE
	for autoconf@gnu.org; Mon, 20 Feb 2012 12:57:19 -0500
Received: from plane.gmane.org ([80.91.229.3]:56490)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RzXFM-0002MV-RW
	for autoconf@gnu.org; Mon, 20 Feb 2012 12:41:56 -0500
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1RzXFJ-0008NE-CP
	for autoconf@gnu.org; Mon, 20 Feb 2012 18:41:53 +0100
Received: from g231145060.adsl.alicedsl.de ([92.231.145.60])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Mon, 20 Feb 2012 18:41:53 +0100
Received: from tim by g231145060.adsl.alicedsl.de with local (Gmexim 0.1
	(Debian)) id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Mon, 20 Feb 2012 18:41:53 +0100
X-Injected-Via-Gmane: http://gmane.org/
Mail-Followup-To: autoconf@gnu.org
To: autoconf@gnu.org
From: Tim Landscheidt <tim@tim-landscheidt.de>
Subject: Re: autoscan: Advising that AC_FUNC_REALLOC is not The Right Thing
	(TM)
Date: Mon, 20 Feb 2012 17:41:40 +0000
Organization: <URI:http://www.tim-landscheidt.de/>
Lines: 24
Message-ID: <m3aa4dieqz.fsf@passepartout.tim-landscheidt.de>
References: <m3r4y3fyjp.fsf@passepartout.tim-landscheidt.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: g231145060.adsl.alicedsl.de
Mail-Copies-To: never
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock: sha1:7E7/u+eXG3qwuhOembSHvc8TyGM=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 80.91.229.3
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, 20 Feb 2012 17:57:27 -0000

I wrote:

> for background, I'm looking at tackling a bug
> (<URI:https://sourceforge.net/tracker/?func=detail&aid=1899047&group_id=97492&atid=618177>)
> with flex's build system that seems to stem from the use of
> AC_FUNC_REALLOC in configure.in without including gnulib's
> (or another) implementation.  I believe this can be fixed by
> simply omitting AC_FUNC_REALLOC (on the premise that
> realloc(p, 0) is never used).

>   The macro was originally added to configure.in on the sug-
> gestion of autoscan which basically means that in a few
> years some well-meaning developer will probably re-run auto-
> scan, re-add the macro and the bug will re-appear.

>   So is there a way to advise autoscan that it shouldn't
> suggest AC_FUNC_REALLOC?  Another (human) solution would of
> course be to add appropriate comments to configure.in and
> hope that they will be read, but I'd prefer something more
> robust.

No ideas at all? :-)

Tim



From MAILER-DAEMON Mon Feb 20 13:02:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RzXYv-0004My-J4
	for mharc-autoconf@gnu.org; Mon, 20 Feb 2012 13:02:09 -0500
Received: from eggs.gnu.org ([140.186.70.92]:50859)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1RzXYp-0004Mg-0n
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:02:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1RzXYj-0006Df-Lh
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:02:02 -0500
Received: from blade.simplesystems.org ([65.66.246.74]:43886)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1RzXYj-0006Da-6P
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:01:57 -0500
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q1KI1tFc016514; Mon, 20 Feb 2012 12:01:55 -0600 (CST)
Date: Mon, 20 Feb 2012 12:01:55 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Tim Landscheidt <tim@tim-landscheidt.de>
Subject: Re: autoscan: Advising that AC_FUNC_REALLOC is not The Right Thing
	(TM)
In-Reply-To: <m3aa4dieqz.fsf@passepartout.tim-landscheidt.de>
Message-ID: <alpine.GSO.2.01.1202201158180.22010@freddy.simplesystems.org>
References: <m3r4y3fyjp.fsf@passepartout.tim-landscheidt.de>
	<m3aa4dieqz.fsf@passepartout.tim-landscheidt.de>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Mon, 20 Feb 2012 12:01:55 -0600 (CST)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
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, 20 Feb 2012 18:02:08 -0000

On Mon, 20 Feb 2012, Tim Landscheidt wrote:
>
>>   So is there a way to advise autoscan that it shouldn't
>> suggest AC_FUNC_REALLOC?  Another (human) solution would of
>> course be to add appropriate comments to configure.in and
>> hope that they will be read, but I'd prefer something more
>> robust.
>
> No ideas at all? :-)

My proposal is to never run autoscan.

Configure scripts should be based on requirements, design, and 
thorough testing, rather than automated proposals.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


From MAILER-DAEMON Mon Feb 20 13:07:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RzXe1-0005Ak-F7
	for mharc-autoconf@gnu.org; Mon, 20 Feb 2012 13:07:25 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59482)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RzXdy-00059c-8o
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:07:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RzXdx-0007JD-6Z
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:07:22 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:35782)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RzXdx-0007J5-0m
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:07:21 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 8684639E8008;
	Mon, 20 Feb 2012 10:07:20 -0800 (PST)
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 XTxc8U+tLiJY; Mon, 20 Feb 2012 10:07:20 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2290939E8007;
	Mon, 20 Feb 2012 10:07:20 -0800 (PST)
Message-ID: <4F428BF2.3000101@cs.ucla.edu>
Date: Mon, 20 Feb 2012 10:07:46 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Subject: Re: autoscan: Advising that AC_FUNC_REALLOC is not The Right Thing
	(TM)
References: <m3r4y3fyjp.fsf@passepartout.tim-landscheidt.de>
	<m3aa4dieqz.fsf@passepartout.tim-landscheidt.de>
	<alpine.GSO.2.01.1202201158180.22010@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1202201158180.22010@freddy.simplesystems.org>
Content-Type: text/plain; charset=UTF-8
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, Tim Landscheidt <tim@tim-landscheidt.de>
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, 20 Feb 2012 18:07:23 -0000

On 02/20/2012 10:01 AM, Bob Friesenhahn wrote:
> My proposal is to never run autoscan.

That's what *I* do.

But if you really want to run it, I suppose you can fool it, e.g.,:

  q = realloc /* Pacify autoscan, since 'newsize' can't be zero.  */ (p, newsize);

Ouch!  Now I'd better go hide under a rock....


From MAILER-DAEMON Mon Feb 20 13:25:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RzXvQ-0004jn-P2
	for mharc-autoconf@gnu.org; Mon, 20 Feb 2012 13:25:24 -0500
Received: from eggs.gnu.org ([140.186.70.92]:52833)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RzXvI-0004ja-Px
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:25:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RzXvD-000229-Me
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:25:16 -0500
Received: from mx1.redhat.com ([209.132.183.28]:22308)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RzXvD-00021t-6s
	for autoconf@gnu.org; Mon, 20 Feb 2012 13:25:11 -0500
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1KIP9Z4016829
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <autoconf@gnu.org>; Mon, 20 Feb 2012 13:25:09 -0500
Received: from [10.3.113.161] (ovpn-113-161.phx2.redhat.com [10.3.113.161])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q1KIP8pS010216
	for <autoconf@gnu.org>; Mon, 20 Feb 2012 13:25:09 -0500
Message-ID: <4F429004.1040703@redhat.com>
Date: Mon, 20 Feb 2012 11:25:08 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Re: autoscan: Advising that AC_FUNC_REALLOC is not The Right Thing
	(TM)
References: <m3r4y3fyjp.fsf@passepartout.tim-landscheidt.de>
In-Reply-To: <m3r4y3fyjp.fsf@passepartout.tim-landscheidt.de>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig8ACEC09C50D70C1C408C0F15"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
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, 20 Feb 2012 18:25:24 -0000

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

On 02/09/2012 03:10 PM, Tim Landscheidt wrote:
> Hi,
>=20
> for background, I'm looking at tackling a bug
> (<URI:https://sourceforge.net/tracker/?func=3Ddetail&aid=3D1899047&grou=
p_id=3D97492&atid=3D618177>)
> with flex's build system that seems to stem from the use of
> AC_FUNC_REALLOC in configure.in without including gnulib's
> (or another) implementation.  I believe this can be fixed by
> simply omitting AC_FUNC_REALLOC (on the premise that
> realloc(p, 0) is never used).
>=20
>   The macro was originally added to configure.in on the sug-
> gestion of autoscan which basically means that in a few
> years some well-meaning developer will probably re-run auto-
> scan, re-add the macro and the bug will re-appear.

Autoscan is primarily designed as a once-only program, only done when
first converting to autotools, and not something you repeatedly run (and
it shows, due to the lack of attention given to autoscan - these days,
the ratio of projects converting to autoconf for the first time compared
to the projects already using autoconf is dropping, compared to when
autoscan was first implemented).  I personally haven't used autoscan.

>=20
>   So is there a way to advise autoscan that it shouldn't
> suggest AC_FUNC_REALLOC?  Another (human) solution would of
> course be to add appropriate comments to configure.in and
> hope that they will be read, but I'd prefer something more
> robust.

Very hackish (and untested by me), but you could try to do this in your
configure.ac (or in an included .m4 file):

# This package promises to never use realloc(n, 0), so we don't
# want autoscan to suggest AC_FUNC_REALLOC, by redefining the
# problem
m4_define([AN_FUNCTION], [m4_if([$1], [realloc], [],
  [AN_OUTPUT([function], $@)])])

The idea here is that you redefine AN_FUNCTION (which is the magic that
makes autoscan actually suggest AC_FUNC_REALLOC in the first place, when
encountering an instance of 'realloc' in the scanned source code) to
something that is innocuous for 'realloc' while still being effective
for other suggested fixes.

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


--------------enig8ACEC09C50D70C1C408C0F15
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/

iQEcBAEBCAAGBQJPQpAEAAoJEKeha0olJ0NqZHIH/iTkyfA3S3rWrKCFsUXKfWBN
GP+QKQ1wvDZXuPh9U/Wz94RDuSCOmBPXiYEUejxoVq0oZCB0Gwey0in3H7Jytu5q
eSA66U8V4oUYAfnTxCj1vVexciW1n5UkOcZ9v38CecDsKk/CPUawNbSrC9r7bkZO
MdrJTzyTvVmmEGA6MvDvWGdSAhy8C3lr8Ixn5z4QtkXzRhxtyfwiGx4am1RIQdOM
bgsRPbL671nfua3kN9GsCfC8btRqc4M4whLMTrjkbN5Shm+3TddIG5hquosDXNsx
7RBjsXlNdD3MSPlmu9ixtaO/vs94u5FasztOffWCkkHxZYqxtcLOnfyHJ82e6xo=
=WZWI
-----END PGP SIGNATURE-----

--------------enig8ACEC09C50D70C1C408C0F15--


From MAILER-DAEMON Mon Feb 20 15:11:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RzZaZ-0005jm-Br
	for mharc-autoconf@gnu.org; Mon, 20 Feb 2012 15:11:59 -0500
Received: from eggs.gnu.org ([140.186.70.92]:40293)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jklowden@schemamania.org>) id 1RzZaW-0005gu-TZ
	for autoconf@gnu.org; Mon, 20 Feb 2012 15:11:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jklowden@schemamania.org>) id 1RzZaV-0000jb-7v
	for autoconf@gnu.org; Mon, 20 Feb 2012 15:11:56 -0500
Received: from mail19.sea5.speakeasy.net ([69.17.117.21]:54984)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jklowden@schemamania.org>) id 1RzZaU-0000j9-Vl
	for autoconf@gnu.org; Mon, 20 Feb 2012 15:11:55 -0500
Received: (qmail 32108 invoked from network); 20 Feb 2012 20:11:51 -0000
Received: by simscan 1.4.0 ppid: 10118, pid: 1877, t: 0.2496s
	scanners: clamav: 0.88.2/m:52/d:10739
Received: from mxperim8.sea5.speakeasy.net ([69.17.117.73])
	(envelope-sender <jklowden@schemamania.org>)
	by mail19.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP
	for <autoconf@gnu.org>; 20 Feb 2012 20:11:50 -0000
Received: from localhost (localhost [127.0.0.1])
	by mxperim8.sea5.speakeasy.net (Postfix) with ESMTP id 95C758389A;
	Mon, 20 Feb 2012 12:11:50 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at mxperim8.sea5.speakeasy.net
Received: from mxperim8.sea5.speakeasy.net ([127.0.0.1])
	by localhost (mxperim8.sea5.speakeasy.net [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id H1qF5K2o7hna; Mon, 20 Feb 2012 12:11:50 -0800 (PST)
Received: from oak.schemamania.org (dsl254-083-208.nyc1.dsl.speakeasy.net
	[216.254.83.208])
	by mxperim8.sea5.speakeasy.net (Postfix) with ESMTP;
	Mon, 20 Feb 2012 12:11:49 -0800 (PST)
Received: from oak.schemamania.org (localhost [IPv6:::1])
	by oak.schemamania.org (Postfix) with SMTP id B263F30E126B;
	Mon, 20 Feb 2012 15:11:48 -0500 (EST)
Date: Mon, 20 Feb 2012 15:11:48 -0500
From: "James K. Lowden" <jklowden@schemamania.org>
To: Peter Breitenlohner <peb@mppmu.mpg.de>
Subject: Re: modernizing xdvi
Message-Id: <20120220151148.b0aa3742.jklowden@schemamania.org>
In-Reply-To: <alpine.LNX.2.00.1202201004320.13913@pcl321.mppmu.mpg.de>
References: <20120218202906.01d38d93.jklowden@schemamania.org>
	<alpine.LNX.2.00.1202201004320.13913@pcl321.mppmu.mpg.de>
X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64--netbsd)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 69.17.117.21
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, 20 Feb 2012 20:11:57 -0000

On Mon, 20 Feb 2012 10:12:14 +0100 (CET)
Peter Breitenlohner <peb@mppmu.mpg.de> wrote:

> Why not use xdvik which is part of the TeX Live distribution (the
> current version is 22.16 with latest xdvi changes from May 2009,
> i..e, newer than 22.85 from Paul Vojta), or at least use that as a
> guide how to proceed?

Because I am not using TeX.  Because Paul Vojta still maintains a
distribution and clearly could use assistance keeping it up to date.
Because xdvik has more dependencies.  

I didn't post to discuss my motivation.  I posted because
"syntax error: unexpected end of file" is singularly unhelpful. I
posted because I followed, as best I could, the recommendations from
autoconf to modify the sources, and wound up with a nonworking script
despite no warnings or errors from the tools.  

FWIW, I actually began at the xdvik site (not vojta's).  It pointed me
to
http://sourceforge.net/projects/xdvi/files/latest/download?source=files,
which is supposed to be 22.85.  Same version, newer date.  Whatever.  

> > $ (autoconf --version; automake --version) |  grep ^auto
> > autoconf (GNU Autoconf) 2.61
> > automake (GNU automake) 1.10
> 
> IMHO it makes no sense to base new work on such ancient versions.

We have different opinions.  I am working with the tools I have, on two
platforms.  Chasing the latest version of autoconf is not my hobby.  

If you know the problem I'm reporting is fixed in a later version,
fine, I'll upgrade and move on.  If you, with your shiny new version,
can generate a working configure from my posted sources, I'll
gratefully adopt your version.  If not, I'd very much appreciate help
with the task at hand.  

But enough about me.  Let's talk about autoconf.  

--jkl


From MAILER-DAEMON Mon Feb 20 18:37:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rzcnl-0001iB-0k
	for mharc-autoconf@gnu.org; Mon, 20 Feb 2012 18:37:49 -0500
Received: from eggs.gnu.org ([140.186.70.92]:56042)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1Rzcni-0001i0-3S
	for autoconf@gnu.org; Mon, 20 Feb 2012 18:37:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1Rzcnf-0005zY-Rz
	for autoconf@gnu.org; Mon, 20 Feb 2012 18:37:45 -0500
Received: from smtp11.dentaku.gol.com ([203.216.5.73]:52394)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>)
	id 1Rzcnf-0005z6-Ke; Mon, 20 Feb 2012 18:37:43 -0500
Received: from 61.245.22.152.eo.eaccess.ne.jp ([61.245.22.152]
	helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku)
	(envelope-from <miles@gnu.org>)
	id 1Rzcnc-00004u-Sh; Tue, 21 Feb 2012 08:37:40 +0900
Received: by catnip.gol.com (Postfix, from userid 1000)
	id 7F6DFDFA0; Tue, 21 Feb 2012 08:37:39 +0900 (JST)
From: Miles Bader <miles@gnu.org>
To: Eric Blake <eblake@redhat.com>
Subject: Re: autoscan: Advising that AC_FUNC_REALLOC is not The Right Thing
	(TM)
References: <m3r4y3fyjp.fsf@passepartout.tim-landscheidt.de>
	<4F429004.1040703@redhat.com>
System-Type: x86_64-unknown-linux-gnu
Date: Tue, 21 Feb 2012 08:37:39 +0900
In-Reply-To: <4F429004.1040703@redhat.com> (Eric Blake's message of "Mon, 20
	Feb 2012 11:25:08 -0700")
Message-ID: <87linxm5z0.fsf@catnip.gol.com>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: ClamAV GOL (outbound)
X-Abuse-Complaints: abuse@gol.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 203.216.5.73
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, 20 Feb 2012 23:37:47 -0000

Eric Blake <eblake@redhat.com> writes:
>>   The macro was originally added to configure.in on the sug-
>> gestion of autoscan which basically means that in a few
>> years some well-meaning developer will probably re-run auto-
>> scan, re-add the macro and the bug will re-appear.
>
> Autoscan is primarily designed as a once-only program, only done when
> first converting to autotools, and not something you repeatedly run

Exactly.  It also assumes the worst case, advising you check for
things that are pretty much guaranteed to exist on 99.9% of systems
these days (so for a typical project, much of autoscan's advice should
simply be ignored).  Standards conformance is far better these days
than it was in 1995, and most people really don't need to port to
ye-olde-K&R-only-with-bugs systems...

So maybe the best solution is simple: don't run autoscan (again), or
if you do, take its advice with a huge grain of salt.

[If there _is_ some desire to re-run it periodically to catch mistakes
or something, another possible solution would be to keep a simple grep
filter to apply to the autoscan output, which lists all the macros
autoscan suggested in the past which were determined to actually not
be necessary.]

-miles

-- 
Year, n. A period of three hundred and sixty-five disappointments.


From MAILER-DAEMON Tue Feb 21 19:33:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S009S-0006oT-38
	for mharc-autoconf@gnu.org; Tue, 21 Feb 2012 19:33:46 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58502)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1S009P-0006oN-Gv
	for autoconf@gnu.org; Tue, 21 Feb 2012 19:33:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1S009O-00046a-8X
	for autoconf@gnu.org; Tue, 21 Feb 2012 19:33:43 -0500
Received: from plane.gmane.org ([80.91.229.3]:42203)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1S009O-00046A-3T
	for autoconf@gnu.org; Tue, 21 Feb 2012 19:33:42 -0500
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1S009M-0004tx-6l
	for autoconf@gnu.org; Wed, 22 Feb 2012 01:33:40 +0100
Received: from g231145177.adsl.alicedsl.de ([92.231.145.177])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Wed, 22 Feb 2012 01:33:40 +0100
Received: from tim by g231145177.adsl.alicedsl.de with local (Gmexim 0.1
	(Debian)) id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Wed, 22 Feb 2012 01:33:40 +0100
X-Injected-Via-Gmane: http://gmane.org/
Mail-Followup-To: autoconf@gnu.org
To: autoconf@gnu.org
From: Tim Landscheidt <tim@tim-landscheidt.de>
Subject: Re: autoscan: Advising that AC_FUNC_REALLOC is not The Right Thing
	(TM)
Date: Wed, 22 Feb 2012 00:33:30 +0000
Organization: <URI:http://www.tim-landscheidt.de/>
Lines: 40
Message-ID: <m3pqd7906d.fsf@passepartout.tim-landscheidt.de>
References: <m3r4y3fyjp.fsf@passepartout.tim-landscheidt.de>
	<4F429004.1040703@redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: g231145177.adsl.alicedsl.de
Mail-Copies-To: never
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock: sha1:6DgFxKW5hmKzq1sxIl80jtKlVBM=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 80.91.229.3
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, 22 Feb 2012 00:33:44 -0000

Eric Blake <eblake@redhat.com> wrote:

>> for background, I'm looking at tackling a bug
>> (<URI:https://sourceforge.net/tracker/?func=detail&aid=1899047&group_id=97492&atid=618177>)
>> with flex's build system that seems to stem from the use of
>> AC_FUNC_REALLOC in configure.in without including gnulib's
>> (or another) implementation.  I believe this can be fixed by
>> simply omitting AC_FUNC_REALLOC (on the premise that
>> realloc(p, 0) is never used).

>>   The macro was originally added to configure.in on the sug-
>> gestion of autoscan which basically means that in a few
>> years some well-meaning developer will probably re-run auto-
>> scan, re-add the macro and the bug will re-appear.

> Autoscan is primarily designed as a once-only program, only done when
> first converting to autotools, and not something you repeatedly run (and
> it shows, due to the lack of attention given to autoscan - these days,
> the ratio of projects converting to autoconf for the first time compared
> to the projects already using autoconf is dropping, compared to when
> autoscan was first implemented).  I personally haven't used autoscan.
> [...]

Thanks for the hack and also the others for their opinions.

  There seems to be a consensus that autoscan shouldn't be
used for maintenance.  Yet the manual advertizes exactly
that; and even if you use it on a new project (again as re-
commended by the manual), it will suggest for example
AC_FUNC_REALLOC without any further explanation.  In
autoscan.log, it will just state very matter-of-factly:

| autoscan: warning: missing AC_FUNC_REALLOC wanted by:
|         main.c:123

So the more I think about it, I would consider autoscan's
current behaviour a bug that just doesn't surface in glibc/
Gnulib environments.  Hmmm.

Tim



From MAILER-DAEMON Wed Feb 22 15:29:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0IoR-0004vC-Op
	for mharc-autoconf@gnu.org; Wed, 22 Feb 2012 15:29:19 -0500
Received: from eggs.gnu.org ([140.186.70.92]:46173)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0IoO-0004tQ-Ql
	for autoconf@gnu.org; Wed, 22 Feb 2012 15:29:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0IoO-00068R-0A
	for autoconf@gnu.org; Wed, 22 Feb 2012 15:29:16 -0500
Received: from mail-bk0-f41.google.com ([209.85.214.41]:32886)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0IoN-00068B-KU
	for autoconf@gnu.org; Wed, 22 Feb 2012 15:29:15 -0500
Received: by bkty12 with SMTP id y12so593137bkt.0
	for <autoconf@gnu.org>; Wed, 22 Feb 2012 12:29:14 -0800 (PST)
Received-SPF: pass (google.com: domain of stefano.lattarini@gmail.com
	designates 10.204.153.206 as permitted sender)
	client-ip=10.204.153.206; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	stefano.lattarini@gmail.com designates 10.204.153.206 as
	permitted sender) smtp.mail=stefano.lattarini@gmail.com;
	dkim=pass header.i=stefano.lattarini@gmail.com
Received: from mr.google.com ([10.204.153.206])
	by 10.204.153.206 with SMTP id l14mr17111338bkw.3.1329942554655
	(num_hops = 1); Wed, 22 Feb 2012 12:29:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:subject:content-type
	:content-transfer-encoding;
	bh=Xs6RslM+IJe/Yb66yLGbz/6mpUiutM/l/ioPjVDf7ss=;
	b=OSXA3NhCoDaldyp0icGauNILX5rbVNSjJqU1L+XlVBuSENa2UFHmut7OOpFgMXNbFx
	T5v3Nm8iga4fEmMSCE4uoiXBki+XxM11x6juMHKuAQE/2yAhNW/Do+yKhzvqIagYPPQS
	LaODEP+7vTDCE2w4Qd6xFbJBFOEASqvVohMDI=
Received: by 10.204.153.206 with SMTP id l14mr13816320bkw.3.1329942554559;
	Wed, 22 Feb 2012 12:29:14 -0800 (PST)
Received: from [79.20.98.105]
	(host105-98-dynamic.20-79-r.retail.telecomitalia.it. [79.20.98.105])
	by mx.google.com with ESMTPS id y9sm53765382bkw.5.2012.02.22.12.29.12
	(version=SSLv3 cipher=OTHER); Wed, 22 Feb 2012 12:29:13 -0800 (PST)
Message-ID: <4F455016.1020806@gmail.com>
Date: Wed, 22 Feb 2012 21:29:10 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: "<autoconf@gnu.org>" <autoconf@gnu.org>
Subject: Releasing autoconf 2.69?
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.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: Wed, 22 Feb 2012 20:29:18 -0000

Hello autoconfers.

What would you think about the suggestion of rolling out a new autoconf
release in the next week or so?  I'd like to see this happen for at
least the following reasons:

* Automake's own configure.ac (in master) needs the commit bd962acf
  "fortran: define $GFC to "yes" if $FC is a GNU compiler" in order
  to work 100% as expected, and since I'm planning to release
  Automake 1.12 in a couple of weeks or so, I'd like to see that
  change in a released Autoconf version, so that I won't be forced
  to require a development version of Autoconf as a bootstrap
  prerequisite;

* The manual has been enhanced by documenting many new portability
  pitfalls (e.g., signal handling in shells, more make VPATH rewrite
  issues, more BSD parallel make incompatibilities, the Korn Shell
  cloexec behaviour, etc.), and it's a pity to see all these changes
  remain confined in the git repository instead of being "shared with
  the world";

* To check whether my change b5832028 "configure: will re-execute with
  $CONFIG_SHELL, if it's set" truly works in the wild, or whether we
  will have to revert it (in which case, the sooner the better, or at
  least the less painful).

WDYT?

Regards,
  Stefano


From MAILER-DAEMON Thu Feb 23 02:44:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0TLm-00082K-Ga
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 02:44:26 -0500
Received: from eggs.gnu.org ([140.186.70.92]:50489)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1S0TLh-00081f-7J
	for autoconf@gnu.org; Thu, 23 Feb 2012 02:44:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1S0TLd-0005IW-HB
	for autoconf@gnu.org; Thu, 23 Feb 2012 02:44:21 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:51467)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1S0TLd-0005IM-D4
	for autoconf@gnu.org; Thu, 23 Feb 2012 02:44:17 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 4A89F39E800B;
	Wed, 22 Feb 2012 23:44:16 -0800 (PST)
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 tbck35tnmQ9D; Wed, 22 Feb 2012 23:44:16 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id ED18A39E8008;
	Wed, 22 Feb 2012 23:44:15 -0800 (PST)
Message-ID: <4F45EE54.9000508@cs.ucla.edu>
Date: Wed, 22 Feb 2012 23:44:20 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: Releasing autoconf 2.69?
References: <4F455016.1020806@gmail.com>
In-Reply-To: <4F455016.1020806@gmail.com>
Content-Type: text/plain; charset=UTF-8
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: Thu, 23 Feb 2012 07:44:25 -0000

On 02/22/2012 12:29 PM, Stefano Lattarini wrote:
> What would you think about the suggestion of rolling out a new autoconf
> release in the next week or so?

Sounds good to me.  I don't know of any obstacles.


From MAILER-DAEMON Thu Feb 23 17:42:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0hN0-0001l0-58
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 17:42:38 -0500
Received: from eggs.gnu.org ([140.186.70.92]:40772)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0hMw-0001eQ-0U
	for Autoconf@gnu.org; Thu, 23 Feb 2012 17:42:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0hMu-0002PL-TL
	for Autoconf@gnu.org; Thu, 23 Feb 2012 17:42:33 -0500
Received: from mx1.redhat.com ([209.132.183.28]:56657)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1S0hMq-0002Od-HZ; Thu, 23 Feb 2012 17:42:28 -0500
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 q1NMgRP8020832
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Feb 2012 17:42:27 -0500
Received: from [10.3.113.70] (ovpn-113-70.phx2.redhat.com [10.3.113.70])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q1NMgQZG001798; Thu, 23 Feb 2012 17:42:26 -0500
Message-ID: <4F46C0D1.5080801@redhat.com>
Date: Thu, 23 Feb 2012 15:42:25 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
In-Reply-To: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigCE2C70E210531F40DFEEC7EC"
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 <Autoconf@gnu.org>, automake-patches@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: Thu, 23 Feb 2012 22:42:35 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCE2C70E210531F40DFEEC7EC
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 02/23/2012 02:48 PM, Stefano Lattarini wrote:
> * lib/Makefile.am (installcheck-local): To verify that the installed
> scripts are actually executable, simply use 'test -x', instead of
> resorting to perl and its '-x' file operator.  Today, 'test -x'
> should today be portable to any non-museum system.  Since we are at
> it, improve diagnostic in case of failure.

The autoconf manual still recommends:

Do not use @samp{test -x}, because 4.3BSD does not
have it.

Is this still an issue?  Or should we be updating the autoconf manual?

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


--------------enigCE2C70E210531F40DFEEC7EC
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/

iQEcBAEBCAAGBQJPRsDSAAoJEKeha0olJ0NqRxQH/AvwD7v1kDXIz49RAhIQvGN9
Rkz50VLZJ+7C9m/MhAjJ5YaMb1jtzslwq4zK8RfxbyCKzn32VVqDGvyU+hfdaNng
cv8gZCCWQqqAzjoIJg1l/o5BQl/R15KTBsFVX3DQLZwRCPgnISa6hHiCszK1mwPB
FpbDLelUxv+m27gIXIylSaPFW4ilbp0em4mePl2xYBAvVdgFNityikwLoZxNLML6
ZhksiMwvI6HmRgR+UKr2hzDf+FlZygKQ40lJXM3tAtS39A3wxX/qtPOXRsKkTiDc
A4ImkoKk1zsxD6JQzjdfpMLSPKDh4c53jhldhyBa1dk0jBRIIZF5X2SCK0LaVnQ=
=N4LV
-----END PGP SIGNATURE-----

--------------enigCE2C70E210531F40DFEEC7EC--


From MAILER-DAEMON Thu Feb 23 17:49:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0hTR-00036j-NM
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 17:49:17 -0500
Received: from eggs.gnu.org ([140.186.70.92]:37982)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1S0hTM-00036c-Bt
	for Autoconf@gnu.org; Thu, 23 Feb 2012 17:49:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1S0hTI-0003bv-B1
	for Autoconf@gnu.org; Thu, 23 Feb 2012 17:49:12 -0500
Received: from stenn.ntp.org ([149.20.68.30]:49318)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>)
	id 1S0hTI-0003bE-6f; Thu, 23 Feb 2012 17:49:08 -0500
Received: from localhost ([127.0.0.1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.76 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1S0hTA-000K3P-8d; Thu, 23 Feb 2012 14:49:00 -0800
To: Eric Blake <eblake@redhat.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
In-reply-to: <4F46C0D1.5080801@redhat.com>
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com>
Comments: In-reply-to Eric Blake <eblake@redhat.com>
	message dated "Thu, 23 Feb 2012 15:42:25 -0700."
X-Mailer: MH-E 7.4.2; nmh 1.3; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Thu, 23 Feb 2012 14:49:00 -0800
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1S0hTA-000K3P-8d@stenn.ntp.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.30
Cc: Autoconf <Autoconf@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>, automake-patches@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: Thu, 23 Feb 2012 22:49:16 -0000

Eric wrote:
> The autoconf manual still recommends:
> 
> Do not use @samp{test -x}, because 4.3BSD does not
> have it.
> 
> Is this still an issue?  Or should we be updating the autoconf manual?

I remember this biting me within the last ~4 years' time.

I don't know if it's still an issue or not, though, as we might have
places in our codebase where 'test -x' may have crept back in since
then.

If there is an easy way to test for it, I'd rather there was something
like an AC_SANITY macro that would test for these ancient cases and
squawk if the running system botched them.

H


From MAILER-DAEMON Thu Feb 23 18:00:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0he2-00051W-Vm
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:00:14 -0500
Received: from eggs.gnu.org ([140.186.70.92]:49694)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1S0hdw-0004yV-Gw
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:00:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1S0hdt-0005Z9-T4
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:00:07 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:51867)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>)
	id 1S0hdt-0005UT-HZ; Thu, 23 Feb 2012 18:00:05 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id B305EA60002;
	Thu, 23 Feb 2012 14:59:55 -0800 (PST)
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 XKZYc+isjWQl; Thu, 23 Feb 2012 14:59:54 -0800 (PST)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A8C4B39E8007;
	Thu, 23 Feb 2012 14:59:54 -0800 (PST)
Message-ID: <4F46C4EA.9060508@cs.ucla.edu>
Date: Thu, 23 Feb 2012 14:59:54 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0) Gecko/20120131 Thunderbird/10.0
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com>
In-Reply-To: <4F46C0D1.5080801@redhat.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 <Autoconf@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>, automake-patches@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: Thu, 23 Feb 2012 23:00:13 -0000

It's been Quite Some Time since I've had to deal with
4.3BSD, or any host with a "test -x" problem, so I suggest
the following patch to the Autoconf manual:

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 607d8dc..443ec07 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -18125,9 +18125,9 @@ It is safe to use @samp{!} as a @command{test} operator.  For example,
 To enable @command{configure} scripts to support cross-compilation, they
 shouldn't do anything that tests features of the build system instead of
 the host system.  But occasionally you may find it necessary to check
-whether some arbitrary file exists.  To do so, use @samp{test -f} or
-@samp{test -r}.  Do not use @samp{test -x}, because 4.3BSD does not
-have it.  Do not use @samp{test -e} either, because Solaris @command{/bin/sh}
+whether some arbitrary file exists.  To do so, use @samp{test -f},
+@samp{test -r}, or @samp{test -x}.  Do not use @samp{test -e},
+because Solaris @command{/bin/sh}
 lacks it.  To test for symbolic links on systems that have them, use
 @samp{test -h} rather than @samp{test -L}; either form conforms to
 Posix 1003.1-2001, but older shells like Solaris 8
@@ -26320,8 +26320,8 @@ Unix M4 started to dump core because of the length of the
 macros that Autoconf defined, and several bugs showed up in GNU
 M4 as well.  Eventually, we realized that we needed to use some
 features that only GNU M4 has.  4.3BSD M4, in
-particular, has an impoverished set of builtin macros; the System V
-version is better, but still doesn't provide everything we need.
+particular, had an impoverished set of builtin macros; the System V
+version was better, but still didn't provide everything we need.
 
 More development occurred as people put Autoconf under more stresses
 (and to uses I hadn't anticipated).  Karl Berry added checks for X11.


From MAILER-DAEMON Thu Feb 23 18:05:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0hjL-0005bU-4r
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:05:43 -0500
Received: from eggs.gnu.org ([140.186.70.92]:60168)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0hjI-0005aE-7j
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:05:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0hjG-0006fZ-Nj
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:05:40 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:45439)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0hjG-0006fG-Bo
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:05:38 -0500
Received: by eaag11 with SMTP id g11so748948eaa.0
	for <Autoconf@gnu.org>; Thu, 23 Feb 2012 15:05:37 -0800 (PST)
Received-SPF: pass (google.com: domain of stefano.lattarini@gmail.com
	designates 10.14.53.74 as permitted sender)
	client-ip=10.14.53.74; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	stefano.lattarini@gmail.com designates 10.14.53.74 as permitted
	sender) smtp.mail=stefano.lattarini@gmail.com;
	dkim=pass header.i=stefano.lattarini@gmail.com
Received: from mr.google.com ([10.14.53.74])
	by 10.14.53.74 with SMTP id f50mr2029144eec.5.1330038337497 (num_hops =
	1); Thu, 23 Feb 2012 15:05:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=yH1Dssn0MlgaPJIpK7Pi6PR39HMwIX90O8Wa1GMSRSM=;
	b=o6dIDI2Vw8ZemQovvozIgAm2TkWaTxE2LqSMEJLmJ8qzTT226PuoIM5cDBbP/iEUej
	JlKD4QTMAJpQY+kPFdX5UpF4Lph2Hi9wfAOm2JsZWYM6aYwgPayRIN9HphgEnmJkoCgE
	sCXS7hqMp3NLnFkMnxEd+HPiumhr2Pd5jYCr4=
Received: by 10.14.53.74 with SMTP id f50mr1563468eec.5.1330038337408;
	Thu, 23 Feb 2012 15:05:37 -0800 (PST)
Received: from [80.116.81.239]
	(host239-81-dynamic.116-80-r.retail.telecomitalia.it.
	[80.116.81.239])
	by mx.google.com with ESMTPS id n56sm10715223eeh.6.2012.02.23.15.05.34
	(version=SSLv3 cipher=OTHER); Thu, 23 Feb 2012 15:05:36 -0800 (PST)
Message-ID: <4F46C63C.6010107@gmail.com>
Date: Fri, 24 Feb 2012 00:05:32 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <4F46C4EA.9060508@cs.ucla.edu>
In-Reply-To: <4F46C4EA.9060508@cs.ucla.edu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
Cc: Autoconf <Autoconf@gnu.org>, Eric Blake <eblake@redhat.com>
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: Thu, 23 Feb 2012 23:05:41 -0000

[Dropping automake-patches]

Hi Paul, sorry for stepping on your toes here, but ...

On 02/23/2012 11:59 PM, Paul Eggert wrote:
> It's been Quite Some Time since I've had to deal with
> 4.3BSD, or any host with a "test -x" problem, so I suggest
> the following patch to the Autoconf manual:
> 
> [SNIP]
>
.. I was preparing a patch about this already, that also
took care of removing the workaround for missing "test -x"
in M4SH.

Autoconfers, WDYT?

Thanks,
  Stefano

>From c5a8a69e15ad16b81031882334724df0a8456134 Mon Sep 17 00:00:00 2001
Message-Id: <c5a8a69e15ad16b81031882334724df0a8456134.1330038238.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Thu, 23 Feb 2012 22:29:26 +0100
Subject: [PATCH] general: assume 'test -x' is portable today

* doc/autoconf.texi (@command{test} (files)):  Don't tell that
'text -x' shouldn't be used; the only systems that lack it today
are museum pieces.  Since we are at it, report known version of
Solaris whose /bin/sh doesn't grok 'test -e', rather than just
"hand-waving" to a generic Solaris system.
* lib/autoconf/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Just assume
that 'test -x' works.  Adjust comments accordingly.
---
 doc/autoconf.texi   |    9 ++++-----
 lib/m4sugar/m4sh.m4 |   35 ++++-------------------------------
 2 files changed, 8 insertions(+), 36 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 5c3feef..145788d 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -18126,11 +18126,10 @@ To enable @command{configure} scripts to support cross-compilation, they
 shouldn't do anything that tests features of the build system instead of
 the host system.  But occasionally you may find it necessary to check
 whether some arbitrary file exists.  To do so, use @samp{test -f} or
-@samp{test -r}.  Do not use @samp{test -x}, because 4.3BSD does not
-have it.  Do not use @samp{test -e} either, because Solaris @command{/bin/sh}
-lacks it.  To test for symbolic links on systems that have them, use
-@samp{test -h} rather than @samp{test -L}; either form conforms to
-Posix 1003.1-2001, but older shells like Solaris 8
+@samp{test -r}.  Do not use @samp{test -e} either, because Solaris 10
+@command{/bin/sh} lacks it.  To test for symbolic links on systems that
+have them, use @samp{test -h} rather than @samp{test -L}; either form
+conforms to Posix 1003.1-2001, but older shells like Solaris 8
 @code{/bin/sh} support only @option{-h}.

 @item @command{test} (strings)
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 38e0bef..734bfd0 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1367,38 +1367,11 @@ esac[]])# AS_SET_CATFILE

 # _AS_TEST_PREPARE
 # ----------------
-# Find out whether `test -x' works.  If not, prepare a substitute
-# that should work well enough for most scripts.
-#
-# Here are some of the problems with the substitute.
-# The 'ls' tests whether the owner, not the current user, can execute/search.
-# The eval means '*', '?', and '[' cause inadvertent file name globbing
-# after the 'eval', so jam together as many tokens as we can to minimize
-# the likelihood that the inadvertent globbing will actually do anything.
-# Luckily, this gorp is needed only on really ancient hosts.
-#
+# This used to check whether `test -x' worked.  Today, this should be
+# the case on all non-museum systems, so just assume it works.
+# FIXME: this macro should probably be removed in a future refactoring.
 m4_defun([_AS_TEST_PREPARE],
-[if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$[]1"; then
-	test -d "$[]1/.";
-      else
-	case $[]1 in @%:@(
-	-*)set "./$[]1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$[]1" 2>/dev/null` in @%:@((
-	???[[sx]]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
+[as_test_x='test -x'
 dnl as_executable_p is present for backward compatibility with Libtool
 dnl 1.5.22, but it should go away at some point.
 as_executable_p=$as_test_x
-- 
1.7.9


From MAILER-DAEMON Thu Feb 23 18:10:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0hnz-0006QK-QV
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:10:31 -0500
Received: from eggs.gnu.org ([140.186.70.92]:36883)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0hnx-0006QE-TJ
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:10:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0hnw-0007XI-CF
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:10:29 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:53944)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1S0hnw-0007X3-1b; Thu, 23 Feb 2012 18:10:28 -0500
Received: by eaag11 with SMTP id g11so751712eaa.0
	for <multiple recipients>; Thu, 23 Feb 2012 15:10:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=GjsO4EdK+FB/scUHMtsH1hYQdPDeOoRXgI1CzwiOLm4=;
	b=hq2d3Al3wp2sdFOvBIeCLJzN5CEVjiI+csGqI7kIjN49rE5Uh7rZGp/38POaPaVFOa
	Eb28ZhDyZo0/Kp5tlMe1HivLmqLzcEVIbYaVRdztMS0iOHDr84mdaRNHWqVqr7+iQ1v9
	13rUbKAc+cNwILVasAg1xXsBcAoDYIJbzk1qg=
Received: by 10.213.6.209 with SMTP id a17mr5844eba.137.1330038626944;
	Thu, 23 Feb 2012 15:10:26 -0800 (PST)
Received: from [80.116.81.239]
	(host239-81-dynamic.116-80-r.retail.telecomitalia.it.
	[80.116.81.239])
	by mx.google.com with ESMTPS id o49sm10748784eeb.7.2012.02.23.15.10.24
	(version=SSLv3 cipher=OTHER); Thu, 23 Feb 2012 15:10:25 -0800 (PST)
Message-ID: <4F46C75E.8050303@gmail.com>
Date: Fri, 24 Feb 2012 00:10:22 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Harlan Stenn <stenn@ntp.org>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <E1S0hTA-000K3P-8d@stenn.ntp.org>
In-Reply-To: <E1S0hTA-000K3P-8d@stenn.ntp.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
Cc: Autoconf <Autoconf@gnu.org>, Eric Blake <eblake@redhat.com>,
	automake-patches@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: Thu, 23 Feb 2012 23:10:30 -0000

On 02/23/2012 11:49 PM, Harlan Stenn wrote:
> Eric wrote:
>> The autoconf manual still recommends:
>>
>> Do not use @samp{test -x}, because 4.3BSD does not
>> have it.
>>
>> Is this still an issue?  Or should we be updating the autoconf manual?
> 
> I remember this biting me within the last ~4 years' time.
> 
> I don't know if it's still an issue or not, though, as we might have
> places in our codebase where 'test -x' may have crept back in since
> then.
> 
> If there is an easy way to test for it, I'd rather there was something
> like an AC_SANITY macro that would test for these ancient cases and
> squawk if the running system botched them.
> 
This sounds like a great idea IMO.  Automake could immediately benefit
from it, by having it verify that the system 'rm' does not complain if
given no file operand when the '-f' option is in use, which would allow a
nice simplification of the automake-generated cleanup rules; reference:

  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10828>

Regards,
  Stefano



From MAILER-DAEMON Thu Feb 23 18:22:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0hzI-0007ms-Af
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:22:12 -0500
Received: from eggs.gnu.org ([140.186.70.92]:42808)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0hzG-0007mM-4q
	for autoconf@gnu.org; Thu, 23 Feb 2012 18:22:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0hzE-0000sT-Qv
	for autoconf@gnu.org; Thu, 23 Feb 2012 18:22:10 -0500
Received: from mx1.redhat.com ([209.132.183.28]:4047)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0hzE-0000sO-Hx
	for autoconf@gnu.org; Thu, 23 Feb 2012 18:22:08 -0500
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 q1NNM74O023188
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Feb 2012 18:22:07 -0500
Received: from [10.3.113.70] (ovpn-113-70.phx2.redhat.com [10.3.113.70])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q1NNM6Dc020206; Thu, 23 Feb 2012 18:22:07 -0500
Message-ID: <4F46CA1E.5060203@redhat.com>
Date: Thu, 23 Feb 2012 16:22:06 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: Releasing autoconf 2.69?
References: <4F455016.1020806@gmail.com>
In-Reply-To: <4F455016.1020806@gmail.com>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig37686CCC5B864C06E9C2086B"
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>" <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: Thu, 23 Feb 2012 23:22:11 -0000

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

On 02/22/2012 01:29 PM, Stefano Lattarini wrote:
> Hello autoconfers.
>=20
> What would you think about the suggestion of rolling out a new autoconf=

> release in the next week or so?  I'd like to see this happen for at
> least the following reasons:

I'm in favor of the idea.  Let me post an alpha release this weekend, so
we can get some wider test coverage and hopefully plug any last few
remaining issues to avoid a brown-paper-bag public release in another
week or so.

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


--------------enig37686CCC5B864C06E9C2086B
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/

iQEcBAEBCAAGBQJPRsoeAAoJEKeha0olJ0NqmvMH/jjqSrHm4MmPiatfQnAW/lPc
+izXtdfWBzQCDamm1t6ef/gn3z4sDl3s+7akOrpGF1mQWtUH7g/efhdUFeobsATB
a23YUH1G15+1xD63bfU9r5NljC5i/czv4DRGQ93W/IiK79zA6fvKmagZefwZC/2T
DXtjpwSwUNNIQJBiw7DsBvpvZhgtEIay4FG6JTkzvAFe8kXzL2DfiW/XtE+kBsbO
m7tGsnos+el6YileLlRv0i3BUr+GSrgUoqz6WcQQBayDEfNEGbdq2uA+FzgN4llo
mdQglVg/V57Bx2lVtLfwlWhWLtRYBF/OTI1+DgclgttWup7yg2pChGHFCmi9Zg0=
=Vnm2
-----END PGP SIGNATURE-----

--------------enig37686CCC5B864C06E9C2086B--


From MAILER-DAEMON Thu Feb 23 18:26:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0i2z-0008Bl-V6
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:26:01 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59732)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0i2w-0008Al-Uj
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:26:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0i2v-0001rY-Bs
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:25:58 -0500
Received: from mx1.redhat.com ([209.132.183.28]:3616)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0i2v-0001rT-3q
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:25:57 -0500
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 q1NNPtLE004104
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Feb 2012 18:25:55 -0500
Received: from [10.3.113.70] (ovpn-113-70.phx2.redhat.com [10.3.113.70])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q1NNPtJO021662; Thu, 23 Feb 2012 18:25:55 -0500
Message-ID: <4F46CB02.8000908@redhat.com>
Date: Thu, 23 Feb 2012 16:25:54 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <E1S0hTA-000K3P-8d@stenn.ntp.org>
	<4F46C75E.8050303@gmail.com>
In-Reply-To: <4F46C75E.8050303@gmail.com>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig69E89BFABB66C376944A5C44"
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: Harlan Stenn <stenn@ntp.org>, Autoconf <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: Thu, 23 Feb 2012 23:26:00 -0000

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

On 02/23/2012 04:10 PM, Stefano Lattarini wrote:
> On 02/23/2012 11:49 PM, Harlan Stenn wrote:
>> Eric wrote:
>>> The autoconf manual still recommends:
>>>
>>> Do not use @samp{test -x}, because 4.3BSD does not
>>> have it.
>>>
>>> Is this still an issue?  Or should we be updating the autoconf manual=
?
>>
>> I remember this biting me within the last ~4 years' time.
>>
>> I don't know if it's still an issue or not, though, as we might have
>> places in our codebase where 'test -x' may have crept back in since
>> then.
>>
>> If there is an easy way to test for it, I'd rather there was something=

>> like an AC_SANITY macro that would test for these ancient cases and
>> squawk if the running system botched them.

Using the M4sh language of autoconf already has _AS_DETECT_BETTER_SHELL;
we've used it for sanity probes in the past, and doing a sanity probe
for a working 'test -x' and 'rm -f' now would be reasonable.

Question - should this still be advisory for autoconf 2.69 (probe, and
loudly complain about failures of the probe, but use the fallback
throughout the rest of the script) or mandatory (probe, and outright
refuse to continue if the system doesn't meet the bare minimums, so we
can simplify the rest of the script).

For 'test -x', that's usually a shell builtin; so we can require it of
the shell.  For 'rm -f', that's a separate executable, so I'm leaning
more towards a probe, and see what feedback we get, while still using
the workarounds for now.

Thoughts?


>>
> .. I was preparing a patch about this already, that also
> took care of removing the workaround for missing "test -x"
> in M4SH.

You took care of part of it,...


> +# This used to check whether `test -x' worked.  Today, this should be
> +# the case on all non-museum systems, so just assume it works.
> +# FIXME: this macro should probably be removed in a future refactoring=
=2E
>  m4_defun([_AS_TEST_PREPARE],
> -[if test -x / >/dev/null 2>&1; then
> -  as_test_x=3D'test -x'
> -else
> -  if ls -dL / >/dev/null 2>&1; then
> -    as_ls_L_option=3DL
> -  else
> -    as_ls_L_option=3D
> -  fi
> -  as_test_x=3D'
> -    eval sh -c '\''
> -      if test -d "$[]1"; then
> -	test -d "$[]1/.";
> -      else
> -	case $[]1 in @%:@(
> -	-*)set "./$[]1";;
> -	esac;
> -	case `ls -ld'$as_ls_L_option' "$[]1" 2>/dev/null` in @%:@((
> -	???[[sx]]*):;;*)false;;esac;fi
> -    '\'' sh
> -  '
> -fi
> +[as_test_x=3D'test -x'
>  dnl as_executable_p is present for backward compatibility with Libtool=

>  dnl 1.5.22, but it should go away at some point.
>  as_executable_p=3D$as_test_x

We still have to set as_test_x for libtool; but I'm thinking we should
go one step further, and rewrite AS_TEST_X to just blindly call 'test
-x' rather than '$as_test_x', if we go with the minimum shell requirement=
=2E

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


--------------enig69E89BFABB66C376944A5C44
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/

iQEcBAEBCAAGBQJPRssDAAoJEKeha0olJ0Nq+UIH/1JDOauVqq/7IdCI5HKAUYPD
WW8qAq0fpypZWfgTy5Av54SVV8U5Ce9yLbHHAioScE5rM0SqintJVorfd5Szjn10
/tbOxQeWyYSR6km5an9pccRhBxYEgUiibRSnRTXV+ucYf6yOiFXaQf/nSdmaH7S2
w866DeYEtGXBit1YHexQlxF/OzKYTHZFg5QEuynCJJk3jSxNhA1skVNkemPGp4Pp
u8INPkap2ePznqr14YmZHvaeJmELvfTRB3u6ULtSEeyazxX+h+FwrKHvTnnNPWAn
jI7dmn9RoIHrhlvZHRrIRJGjRb02Zs1WPfHsctOjjo0RhZQg0FNSIqvycbtczYM=
=00GE
-----END PGP SIGNATURE-----

--------------enig69E89BFABB66C376944A5C44--


From MAILER-DAEMON Thu Feb 23 18:30:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0i7B-0000o0-Mt
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:30:21 -0500
Received: from eggs.gnu.org ([140.186.70.92]:46759)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0i79-0000nu-Um
	for autoconf@gnu.org; Thu, 23 Feb 2012 18:30:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0i78-0002hT-JT
	for autoconf@gnu.org; Thu, 23 Feb 2012 18:30:19 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:51517)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0i78-0002hN-CY
	for autoconf@gnu.org; Thu, 23 Feb 2012 18:30:18 -0500
Received: by eaag11 with SMTP id g11so761550eaa.0
	for <autoconf@gnu.org>; Thu, 23 Feb 2012 15:30:17 -0800 (PST)
Received-SPF: pass (google.com: domain of stefano.lattarini@gmail.com
	designates 10.14.28.199 as permitted sender)
	client-ip=10.14.28.199; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	stefano.lattarini@gmail.com designates 10.14.28.199 as
	permitted sender) smtp.mail=stefano.lattarini@gmail.com;
	dkim=pass header.i=stefano.lattarini@gmail.com
Received: from mr.google.com ([10.14.28.199])
	by 10.14.28.199 with SMTP id g47mr2046988eea.16.1330039817552 (num_hops
	= 1); Thu, 23 Feb 2012 15:30:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=Bga8kaGl06XXU6CMwKPu+k1qHaVB6+l8r6fvlYsTfDc=;
	b=RwidWX5cssJS4kc4n2N2dmKHucHeS/GMkn/sRBfv7SnCrLyJgEswcOXiPjyPnd/tBL
	ICOKXSe8c7T6tKuMKHZmhBYMDfNEoEHELxSSph8x3kDE+cP5SpycNdsFoVMBAlKoNMS7
	xoVZQtKKRO/eue92sEIM6ckQkvxkG0aYXalpk=
Received: by 10.14.28.199 with SMTP id g47mr1577514eea.16.1330039817488;
	Thu, 23 Feb 2012 15:30:17 -0800 (PST)
Received: from [80.116.81.239]
	(host239-81-dynamic.116-80-r.retail.telecomitalia.it.
	[80.116.81.239])
	by mx.google.com with ESMTPS id n56sm10932590eeh.6.2012.02.23.15.30.15
	(version=SSLv3 cipher=OTHER); Thu, 23 Feb 2012 15:30:16 -0800 (PST)
Message-ID: <4F46CC05.4000903@gmail.com>
Date: Fri, 24 Feb 2012 00:30:13 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: Releasing autoconf 2.69?
References: <4F455016.1020806@gmail.com> <4F46CA1E.5060203@redhat.com>
In-Reply-To: <4F46CA1E.5060203@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
Cc: "<autoconf@gnu.org>" <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: Thu, 23 Feb 2012 23:30:20 -0000

On 02/24/2012 12:22 AM, Eric Blake wrote:
> On 02/22/2012 01:29 PM, Stefano Lattarini wrote:
>> Hello autoconfers.
>>
>> What would you think about the suggestion of rolling out a new autoconf
>> release in the next week or so?  I'd like to see this happen for at
>> least the following reasons:
> 
> I'm in favor of the idea.  Let me post an alpha release this weekend, so
> we can get some wider test coverage and hopefully plug any last few
> remaining issues to avoid a brown-paper-bag public release in another
> week or so.
> 
Thanks.  I will try to test the alpha on some non-very-common systems I
have access to (at least NetBSD 5.1, OpenBSD 5.0 and Solaris 10).

Regards,
  Stefano


From MAILER-DAEMON Thu Feb 23 18:39:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0iFu-0001wq-Q7
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:39:22 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58307)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0iFs-0001tv-41
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:39:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0iFq-0004MS-Lr
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:39:20 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:50776)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0iFq-0004MM-A4
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:39:18 -0500
Received: by eeke53 with SMTP id e53so343802eek.0
	for <Autoconf@gnu.org>; Thu, 23 Feb 2012 15:39:16 -0800 (PST)
Received-SPF: pass (google.com: domain of stefano.lattarini@gmail.com
	designates 10.14.124.204 as permitted sender)
	client-ip=10.14.124.204; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	stefano.lattarini@gmail.com designates 10.14.124.204 as
	permitted sender) smtp.mail=stefano.lattarini@gmail.com;
	dkim=pass header.i=stefano.lattarini@gmail.com
Received: from mr.google.com ([10.14.124.204])
	by 10.14.124.204 with SMTP id x52mr1953049eeh.77.1330040356893
	(num_hops = 1); Thu, 23 Feb 2012 15:39:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=oUKsGoYSJDzCsIx5iGqHlHc/Kg7o1nsRPXcAapl7J2Y=;
	b=ZY6Prr4IZYHlkJlAQWFr+p+OZLaH6gsR1gKNY8Sr7zdxl//KB6jucSGhUrx9AU8E/X
	hxd2KXbIa5E9Sw37KEzvUa4Fl69xua9peualeSB7/ZRzwLMCXX2ccXWGxXI2Ww/DCioR
	VhHPdJhAlVYVcY+rHyByY1ZoWfXYeyd+F4LzQ=
Received: by 10.14.124.204 with SMTP id x52mr1512804eeh.77.1330040356785;
	Thu, 23 Feb 2012 15:39:16 -0800 (PST)
Received: from [80.116.81.239]
	(host239-81-dynamic.116-80-r.retail.telecomitalia.it.
	[80.116.81.239])
	by mx.google.com with ESMTPS id u9sm10969307eem.11.2012.02.23.15.39.14
	(version=SSLv3 cipher=OTHER); Thu, 23 Feb 2012 15:39:15 -0800 (PST)
Message-ID: <4F46CE20.2010008@gmail.com>
Date: Fri, 24 Feb 2012 00:39:12 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <E1S0hTA-000K3P-8d@stenn.ntp.org>
	<4F46C75E.8050303@gmail.com> <4F46CB02.8000908@redhat.com>
In-Reply-To: <4F46CB02.8000908@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.83.41
Cc: Harlan Stenn <stenn@ntp.org>, Autoconf <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: Thu, 23 Feb 2012 23:39:21 -0000

Hi Eric, thanks for the quick feedback!

On 02/24/2012 12:25 AM, Eric Blake wrote:
> On 02/23/2012 04:10 PM, Stefano Lattarini wrote:
>> On 02/23/2012 11:49 PM, Harlan Stenn wrote:
>>> Eric wrote:
>>>> The autoconf manual still recommends:
>>>>
>>>> Do not use @samp{test -x}, because 4.3BSD does not
>>>> have it.
>>>>
>>>> Is this still an issue?  Or should we be updating the autoconf manual?
>>>
>>> I remember this biting me within the last ~4 years' time.
>>>
>>> I don't know if it's still an issue or not, though, as we might have
>>> places in our codebase where 'test -x' may have crept back in since
>>> then.
>>>
>>> If there is an easy way to test for it, I'd rather there was something
>>> like an AC_SANITY macro that would test for these ancient cases and
>>> squawk if the running system botched them.
> 
> Using the M4sh language of autoconf already has _AS_DETECT_BETTER_SHELL;
> we've used it for sanity probes in the past, and doing a sanity probe
> for a working 'test -x' and 'rm -f' now would be reasonable.
> 
Still, this is not 100% correct, as, e.g., a probe on 'rm' does not truly
pertain to a macro that, judging from its name, should check the features
of the shell.  Of course, taking this "route of least resistance" might be
good enough for the moment, so I'm not opposing your idea; but I believe
that a *public* AC_SANITY macro is the way to go in the long term.

> Question - should this still be advisory for autoconf 2.69 (probe, and
> loudly complain about failures of the probe, but use the fallback
> throughout the rest of the script) or mandatory (probe, and outright
> refuse to continue if the system doesn't meet the bare minimums, so we
> can simplify the rest of the script).
> 
> For 'test -x', that's usually a shell builtin; so we can require it of
> the shell.  For 'rm -f', that's a separate executable, so I'm leaning
> more towards a probe, and see what feedback we get, while still using
> the workarounds for now.
>
Sounds good to me...  but what is the "rm -f" workaround you are referring
to exactly? (and sorry if this is a dumb question).

>>>
>> .. I was preparing a patch about this already, that also
>> took care of removing the workaround for missing "test -x"
>> in M4SH.
> 
> You took care of part of it,...
> 
> 
>> +# This used to check whether `test -x' worked.  Today, this should be
>> +# the case on all non-museum systems, so just assume it works.
>> +# FIXME: this macro should probably be removed in a future refactoring.
>>  m4_defun([_AS_TEST_PREPARE],
>> -[if test -x / >/dev/null 2>&1; then
>> -  as_test_x='test -x'
>> -else
>> -  if ls -dL / >/dev/null 2>&1; then
>> -    as_ls_L_option=L
>> -  else
>> -    as_ls_L_option=
>> -  fi
>> -  as_test_x='
>> -    eval sh -c '\''
>> -      if test -d "$[]1"; then
>> -	test -d "$[]1/.";
>> -      else
>> -	case $[]1 in @%:@(
>> -	-*)set "./$[]1";;
>> -	esac;
>> -	case `ls -ld'$as_ls_L_option' "$[]1" 2>/dev/null` in @%:@((
>> -	???[[sx]]*):;;*)false;;esac;fi
>> -    '\'' sh
>> -  '
>> -fi
>> +[as_test_x='test -x'
>>  dnl as_executable_p is present for backward compatibility with Libtool
>>  dnl 1.5.22, but it should go away at some point.
>>  as_executable_p=$as_test_x
> 
> We still have to set as_test_x for libtool; but I'm thinking we should
> go one step further, and rewrite AS_TEST_X to just blindly call 'test
> -x' rather than '$as_test_x', if we go with the minimum shell requirement.
> 
That's fine by me; I just took the "path of least modification" out of
laziness :-)  Do you want me to tweak and re-submit my patch, or will
you take care of it?

Thanks,
  Stefano


From MAILER-DAEMON Thu Feb 23 18:45:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0iLh-0002le-Og
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:45:21 -0500
Received: from eggs.gnu.org ([140.186.70.92]:47608)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0iLg-0002lS-4D
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:45:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0iLe-0005Z7-VF
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:45:20 -0500
Received: from mx1.redhat.com ([209.132.183.28]:29437)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0iLe-0005Z1-OZ
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:45:18 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1NNjGa1030281
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Feb 2012 18:45:17 -0500
Received: from [10.3.113.70] (ovpn-113-70.phx2.redhat.com [10.3.113.70])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q1NNjGds023827; Thu, 23 Feb 2012 18:45:16 -0500
Message-ID: <4F46CF8B.2040701@redhat.com>
Date: Thu, 23 Feb 2012 16:45:15 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <E1S0hTA-000K3P-8d@stenn.ntp.org>
	<4F46C75E.8050303@gmail.com> <4F46CB02.8000908@redhat.com>
	<4F46CE20.2010008@gmail.com>
In-Reply-To: <4F46CE20.2010008@gmail.com>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigC4CBCFE5D895C7BAD8CFCE15"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: Harlan Stenn <stenn@ntp.org>, Autoconf <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: Thu, 23 Feb 2012 23:45:21 -0000

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

On 02/23/2012 04:39 PM, Stefano Lattarini wrote:
>> Using the M4sh language of autoconf already has _AS_DETECT_BETTER_SHEL=
L;
>> we've used it for sanity probes in the past, and doing a sanity probe
>> for a working 'test -x' and 'rm -f' now would be reasonable.
>>
> Still, this is not 100% correct, as, e.g., a probe on 'rm' does not tru=
ly
> pertain to a macro that, judging from its name, should check the featur=
es
> of the shell.

It would be checking the features of the 'shell scripting environment',
not just the shell.  But you are right - choosing a different shell
won't fix a broken rm, so the best we can do is:

>> For 'test -x', that's usually a shell builtin; so we can require it of=

>> the shell.  For 'rm -f', that's a separate executable, so I'm leaning
>> more towards a probe, and see what feedback we get, while still using
>> the workarounds for now.
>>
> Sounds good to me...  but what is the "rm -f" workaround you are referr=
ing
> to exactly? (and sorry if this is a dumb question).

Instead of 'rm -f $list', you have to use 'test -n "$list" || rm -f $list=
'.

>> We still have to set as_test_x for libtool; but I'm thinking we should=

>> go one step further, and rewrite AS_TEST_X to just blindly call 'test
>> -x' rather than '$as_test_x', if we go with the minimum shell requirem=
ent.
>>
> That's fine by me; I just took the "path of least modification" out of
> laziness :-)  Do you want me to tweak and re-submit my patch, or will
> you take care of it?

I'll take it from here, if you'd like, since I've done probes before, so
I know where to edit.

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


--------------enigC4CBCFE5D895C7BAD8CFCE15
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/

iQEcBAEBCAAGBQJPRs+LAAoJEKeha0olJ0Nq61YH/iuVP92nEDa6GhdA+OUl2VrB
QP2A8EoZsNI+M1pcy6W+suFJ7PLeRi9gSbpHznGXwI4zuNlexq8CGSDwMpxlK3yV
IUdAS0P9A4b6yepqZ5gejA9ZbDGywG01ftMgGKw3bahmR2NBe0PSzkrcIzxHQvJS
V3fsjhXL5NM5ujSlMseqG8N03qaXgKAexFNtXoPeGB4X9q6Eaw3Exv9ker9qrjv7
BfzD8tUGO8LEQzlNI2c1EbAwuK+zL1RKD1VBn2gDxpKqDiRNUBgF9ZcQ1IvJQiRJ
hjuFvR+d3R+CspLm8vzxwE3uuOMQliDW24fpsil5jalkytigyZGUbcuWY16gIQM=
=f+Iq
-----END PGP SIGNATURE-----

--------------enigC4CBCFE5D895C7BAD8CFCE15--


From MAILER-DAEMON Thu Feb 23 18:50:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0iQl-0004Au-8T
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:50:35 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59804)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1S0iQj-0004Ah-Cu
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:50:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1S0iQi-0006vf-72
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:50:33 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:41042)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1S0iQi-0006vX-2b
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:50:32 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id ECF7C39E800B;
	Thu, 23 Feb 2012 15:50:30 -0800 (PST)
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 Ef8X0QLSEqdx; Thu, 23 Feb 2012 15:50:30 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 8A1B139E8008;
	Thu, 23 Feb 2012 15:50:30 -0800 (PST)
Message-ID: <4F46D0BD.2030408@cs.ucla.edu>
Date: Thu, 23 Feb 2012 15:50:21 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <4F46C4EA.9060508@cs.ucla.edu>
	<4F46C63C.6010107@gmail.com>
In-Reply-To: <4F46C63C.6010107@gmail.com>
Content-Type: text/plain; charset=UTF-8
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 <Autoconf@gnu.org>, Eric Blake <eblake@redhat.com>
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: Thu, 23 Feb 2012 23:50:34 -0000

On 02/23/2012 03:05 PM, Stefano Lattarini wrote:
> +@samp{test -r}.  Do not use @samp{test -e} either, because Solaris 10

The word "either" should be removed.  Otherwise looks OK.


From MAILER-DAEMON Thu Feb 23 18:50:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0iQz-0004Md-CK
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 18:50:49 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59873)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0iQw-0004LC-5k
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:50:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0iQu-0006yB-Qv
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:50:46 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:55591)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S0iQu-0006y3-F0
	for Autoconf@gnu.org; Thu, 23 Feb 2012 18:50:44 -0500
Received: by eaag11 with SMTP id g11so767767eaa.0
	for <Autoconf@gnu.org>; Thu, 23 Feb 2012 15:50:42 -0800 (PST)
Received-SPF: pass (google.com: domain of stefano.lattarini@gmail.com
	designates 10.14.37.203 as permitted sender)
	client-ip=10.14.37.203; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	stefano.lattarini@gmail.com designates 10.14.37.203 as
	permitted sender) smtp.mail=stefano.lattarini@gmail.com;
	dkim=pass header.i=stefano.lattarini@gmail.com
Received: from mr.google.com ([10.14.37.203])
	by 10.14.37.203 with SMTP id y51mr2041107eea.61.1330041042983 (num_hops
	= 1); Thu, 23 Feb 2012 15:50:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=e71C4RtR0jPLXa/7yuiAKmnkJ+sYCLHVaMiDXu/CDuU=;
	b=Al8nRq+m5/xo8nwAW1A9PbcmfJGqiVT/ePfZ2BffHJzsUR49M/CSp+DXOwMIzk0AZM
	D/AUjxiDgM5Hyzw8MZcwsmu2BbFk7G8qqgwPsRmvYy3PcBqucHf7RtMh0cb4SZj6lu3e
	soDcW6S9DaaGdy2NrCgi7zbUXp7bFEVhJa/sg=
Received: by 10.14.37.203 with SMTP id y51mr1568801eea.61.1330041042879;
	Thu, 23 Feb 2012 15:50:42 -0800 (PST)
Received: from [80.116.81.239]
	(host239-81-dynamic.116-80-r.retail.telecomitalia.it.
	[80.116.81.239])
	by mx.google.com with ESMTPS id n52sm11132728eea.5.2012.02.23.15.50.40
	(version=SSLv3 cipher=OTHER); Thu, 23 Feb 2012 15:50:41 -0800 (PST)
Message-ID: <4F46D0CE.3020503@gmail.com>
Date: Fri, 24 Feb 2012 00:50:38 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <E1S0hTA-000K3P-8d@stenn.ntp.org>
	<4F46C75E.8050303@gmail.com> <4F46CB02.8000908@redhat.com>
	<4F46CE20.2010008@gmail.com> <4F46CF8B.2040701@redhat.com>
In-Reply-To: <4F46CF8B.2040701@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
Cc: Harlan Stenn <stenn@ntp.org>, Autoconf <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: Thu, 23 Feb 2012 23:50:47 -0000

On 02/24/2012 12:45 AM, Eric Blake wrote:
> On 02/23/2012 04:39 PM, Stefano Lattarini wrote:
>
> I'll take it from here, if you'd like,
>
Oh yes, I would :-)

> since I've done probes before, so I know where to edit.
> 

Thanks,
  Stefano


From MAILER-DAEMON Thu Feb 23 19:14:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0inZ-0006Gt-DR
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 19:14:09 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45878)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0inV-0006Fh-KU
	for Autoconf@gnu.org; Thu, 23 Feb 2012 19:14:06 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0inU-0002np-M9
	for Autoconf@gnu.org; Thu, 23 Feb 2012 19:14:05 -0500
Received: from mx1.redhat.com ([209.132.183.28]:7189)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S0inU-0002n5-9D
	for Autoconf@gnu.org; Thu, 23 Feb 2012 19:14:04 -0500
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 q1O0Duwu007564
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Feb 2012 19:13:56 -0500
Received: from [10.3.113.70] (ovpn-113-70.phx2.redhat.com [10.3.113.70])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q1O0DtLF004715; Thu, 23 Feb 2012 19:13:56 -0500
Message-ID: <4F46D643.5040205@redhat.com>
Date: Thu, 23 Feb 2012 17:13:55 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1
MIME-Version: 1.0
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <4F46C4EA.9060508@cs.ucla.edu>
	<4F46C63C.6010107@gmail.com> <4F46D0BD.2030408@cs.ucla.edu>
In-Reply-To: <4F46D0BD.2030408@cs.ucla.edu>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig49575390F932B5657196F343"
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 <Autoconf@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>
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, 24 Feb 2012 00:14:06 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig49575390F932B5657196F343
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 02/23/2012 04:50 PM, Paul Eggert wrote:
> On 02/23/2012 03:05 PM, Stefano Lattarini wrote:
>> +@samp{test -r}.  Do not use @samp{test -e} either, because Solaris 10=

>=20
> The word "either" should be removed.  Otherwise looks OK.

I just thought of another issue worth documenting:

On systems where access(,X_OK) gives bogus results when run as root, it
is also possible for 'test -x' to give those same bogus results (that
is, POSIX allows but discourages test -x as root to always succeed,
where no one can actually execute the file).  Also, in the presence of
ACLs, it is unspecified whether test matches the ACLs or just the stat
mode bits (POSIX recommends matching the ACLs, but that in turn can be
surprising when a file mode 0600 owned by someone else passes 'test -r'
for the current user due to an ACL).

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


--------------enig49575390F932B5657196F343
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/

iQEcBAEBCAAGBQJPRtZDAAoJEKeha0olJ0NqFaQH/AseNCaDIfc/CSk9Rx7izzDz
2AlL4kB8paKLrT3Rh91lBta3dJoG1drhGXMkoBbpnGa2ZjFZzy9+UaUGhnc6jpua
YzT939hhZ6CKs92fKShAflcOCNxIAikaHUroA268tNbWofMQOChtaxs9+NxGtyxd
lUrt3N1uaX1cLf+l5YgWKZu1Zt2zSm1l23hak50OFtVgeWZIzih+CJq4ph6RQRit
EVhO9H8x1w5X90OXxZDnp8TgJLOHQQo8uCbp/SRt5v4lmYU+CEVI6PgoVLavZ5JF
WFJbTRVdLPa9ZdWi8S8xwGfGzG2vYlRtb9SiLqZutZTG9qxKZZDdoOueCg+4Td4=
=6zH5
-----END PGP SIGNATURE-----

--------------enig49575390F932B5657196F343--


From MAILER-DAEMON Thu Feb 23 23:42:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0mzQ-0004nd-Um
	for mharc-autoconf@gnu.org; Thu, 23 Feb 2012 23:42:40 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35636)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1S0mzN-0004ky-Rv
	for Autoconf@gnu.org; Thu, 23 Feb 2012 23:42:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1S0mzL-0004Aw-VS
	for Autoconf@gnu.org; Thu, 23 Feb 2012 23:42:37 -0500
Received: from stenn.ntp.org ([149.20.68.30]:39172)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1S0mzL-0004Al-Qi
	for Autoconf@gnu.org; Thu, 23 Feb 2012 23:42:35 -0500
Received: from localhost ([127.0.0.1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.76 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1S0mzJ-000KPp-2p; Thu, 23 Feb 2012 20:42:33 -0800
To: Eric Blake <eblake@redhat.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
In-reply-to: <4F46CF8B.2040701@redhat.com>
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <E1S0hTA-000K3P-8d@stenn.ntp.org>
	<4F46C75E.8050303@gmail.com> <4F46CB02.8000908@redhat.com>
	<4F46CE20.2010008@gmail.com> <4F46CF8B.2040701@redhat.com>
Comments: In-reply-to Eric Blake <eblake@redhat.com>
	message dated "Thu, 23 Feb 2012 16:45:15 -0700."
X-Mailer: MH-E 7.4.2; nmh 1.3; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Thu, 23 Feb 2012 20:42:32 -0800
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1S0mzJ-000KPp-2p@stenn.ntp.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.30
Cc: Harlan Stenn <stenn@ntp.org>, Autoconf <Autoconf@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>
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, 24 Feb 2012 04:42:39 -0000

Eric wrote:
> Instead of 'rm -f $list', you have to use
> 'test -n "$list" || rm -f $list'.

This may also not be an issue any longer, but (many) years ago I learned
(probably from Larry Wall) to avoid using 'test -n ...' when possible,
as it was too often *not* a shell builtin and therefore was a
performance hog as a subshell was spawned.  I routinely use 'case'
statements instead of any tests for (non-)empty strings.

H


From MAILER-DAEMON Fri Feb 24 22:48:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S18ci-0000Nk-Lv
	for mharc-autoconf@gnu.org; Fri, 24 Feb 2012 22:48:40 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45958)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S18cc-0000NV-9T
	for Autoconf@gnu.org; Fri, 24 Feb 2012 22:48:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S18cW-00028S-20
	for Autoconf@gnu.org; Fri, 24 Feb 2012 22:48:34 -0500
Received: from mx1.redhat.com ([209.132.183.28]:40502)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1S18cL-00026d-KY; Fri, 24 Feb 2012 22:48:17 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1P3m8rv020957
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 24 Feb 2012 22:48:08 -0500
Received: from [10.3.113.113] (ovpn-113-113.phx2.redhat.com [10.3.113.113])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q1P3m7EH018277; Fri, 24 Feb 2012 22:48:08 -0500
Message-ID: <4F4859F7.30506@redhat.com>
Date: Fri, 24 Feb 2012 20:48:07 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1
MIME-Version: 1.0
To: "autoconf-patches@gnu.org" <autoconf-patches@gnu.org>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <4F46C4EA.9060508@cs.ucla.edu>
	<4F46C63C.6010107@gmail.com> <4F46D0BD.2030408@cs.ucla.edu>
	<4F46D643.5040205@redhat.com>
In-Reply-To: <4F46D643.5040205@redhat.com>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig99BAE5521274888275A0BA4B"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: Paul Eggert <eggert@cs.ucla.edu>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	Autoconf <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: Sat, 25 Feb 2012 03:48:39 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig99BAE5521274888275A0BA4B
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 02/23/2012 05:13 PM, Eric Blake wrote:
> On 02/23/2012 04:50 PM, Paul Eggert wrote:
>> On 02/23/2012 03:05 PM, Stefano Lattarini wrote:
>>> +@samp{test -r}.  Do not use @samp{test -e} either, because Solaris 1=
0
>>
>> The word "either" should be removed.  Otherwise looks OK.
>=20
> I just thought of another issue worth documenting:
>=20
> On systems where access(,X_OK) gives bogus results when run as root, it=

> is also possible for 'test -x' to give those same bogus results (that
> is, POSIX allows but discourages test -x as root to always succeed,
> where no one can actually execute the file).  Also, in the presence of
> ACLs, it is unspecified whether test matches the ACLs or just the stat
> mode bits (POSIX recommends matching the ACLs, but that in turn can be
> surprising when a file mode 0600 owned by someone else passes 'test -r'=

> for the current user due to an ACL).

Here's what I'm pushing for the doc side; I'm still working on the shell
probe for a working 'test -x'.  I also note that AS_TEST_X is
undocumented, although I don't want to delete it just yet.

=46rom a66fcb0003e6d942dcda5d48860df0cff7e861e3 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Fri, 24 Feb 2012 20:45:35 -0700
Subject: [PATCH] doc: mention more pitfalls of file mode tests

4.3BSD is museum-ware now, so we can assume that test -x exists;
however, we still can't assume that it always does what we want.

* doc/autoconf.texi (Limitations of Builtins) <test (files)>:
Treat 'test -x' as mostly portable, but mention problems with
root user, ACLs, and TOCTTOU races.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 doc/autoconf.texi |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 607d8dc..762c455 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -18125,14 +18125,30 @@ Limitations of Builtins
 To enable @command{configure} scripts to support cross-compilation, they=

 shouldn't do anything that tests features of the build system instead of=

 the host system.  But occasionally you may find it necessary to check
-whether some arbitrary file exists.  To do so, use @samp{test -f} or
-@samp{test -r}.  Do not use @samp{test -x}, because 4.3BSD does not
-have it.  Do not use @samp{test -e} either, because Solaris
@command{/bin/sh}
+whether some arbitrary file exists.  To do so, use @samp{test -f},
+@samp{test -r}, or @samp{test -x}.  Do not use @samp{test -e}, because
+Solaris @command{/bin/sh}
 lacks it.  To test for symbolic links on systems that have them, use
 @samp{test -h} rather than @samp{test -L}; either form conforms to
 Posix 1003.1-2001, but older shells like Solaris 8
 @code{/bin/sh} support only @option{-h}.

+For historical reasons, Posix reluctantly allows implementations of
+@samp{test -x} that will succeed for the root user, even if no execute
+permissions are present.  Furthermore, shells do not all agree on
+whether Access Control Lists should affect @samp{test -r}, @samp{test
+-w}, and @samp{test -x}; some shells base test results strictly on the
+current user id compared to file owner and mode, as if by
+@code{stat(2)}; while other shells base test results on whether the
+current user has the given right, even if that right is only granted by
+an ACL, as if by @code{faccessat(2)}.  Furthermore, there is a classic
+time of check to time of use race between any use of @command{test}
+followed by operating on the just-checked file.  Therefore, it is a good=

+idea to write scripts that actually attempt an operation, and are
+prepared for the resulting failure if permission is denied, rather than
+trying to avoid an operation based solely on whether @command{test}
+guessed that it might be permitted.
+
 @item @command{test} (strings)
 @c ---------------------------
 Posix says that @samp{test "@var{string}"} succeeds if @var{string} is
--=20
1.7.7.6



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


--------------enig99BAE5521274888275A0BA4B
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/

iQEcBAEBCAAGBQJPSFn3AAoJEKeha0olJ0Nqi5gH/2WUdtGoyUU+lS9EM6do3ZFs
7/lpehbpgr5IBfRwkBqaeKZHx8wXqmubmpz3zrQP610XQLGYxL9B987UXgqT6CfF
XVuM0P2j18ju9aM4+A8jG+CHS/gBh1QsqhEafbo31ElF+wFGCZopxapLJpYN1oE4
NhD8mYuhNY1+ssQFVCONyP3o5ukmlG/IPoqrhrvXSd8SfsGI3VOHHDBbaecY2XyU
guBLZX50HuItV8cuJTP856r/+Vp63Njak083F32IeJfpxVVXOp2/gt3bqZBa7M9t
ZmNv9cjsXKE+FtFIPpoWex64y1m2fK80iPSrekkrqbK4pWtJMUL5brLyXB00Hhk=
=u1jK
-----END PGP SIGNATURE-----

--------------enig99BAE5521274888275A0BA4B--


From MAILER-DAEMON Sat Feb 25 18:21:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1Qvq-00056Q-DB
	for mharc-autoconf@gnu.org; Sat, 25 Feb 2012 18:21:38 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48286)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <phcoder@gmail.com>) id 1S1PVk-00023s-7J
	for autoconf@gnu.org; Sat, 25 Feb 2012 16:50:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <phcoder@gmail.com>) id 1S1PVd-0006wg-6C
	for autoconf@gnu.org; Sat, 25 Feb 2012 16:50:36 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:43743)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <phcoder@gmail.com>) id 1S1PVc-0006wa-Vd
	for autoconf@gnu.org; Sat, 25 Feb 2012 16:50:29 -0500
Received: by eeke53 with SMTP id e53so1128276eek.0
	for <autoconf@gnu.org>; Sat, 25 Feb 2012 13:50:27 -0800 (PST)
Received-SPF: pass (google.com: domain of phcoder@gmail.com designates
	10.14.94.66 as permitted sender) client-ip=10.14.94.66; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of phcoder@gmail.com
	designates 10.14.94.66 as permitted sender)
	smtp.mail=phcoder@gmail.com;
	dkim=pass header.i=phcoder@gmail.com
Received: from mr.google.com ([10.14.94.66])
	by 10.14.94.66 with SMTP id m42mr4408008eef.66.1330206627868 (num_hops
	= 1); Sat, 25 Feb 2012 13:50:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type:content-transfer-encoding;
	bh=33bIlAGcPjM0NFWh6cBjlg0riIozQdLfOR6kzFZlbPE=;
	b=CSBDg3fCYv4O1S7sgDstBkCYvGFQgmjjAWZfgEoSY2+S8mn4l1L42puCF4qP5Ez0iX
	toQlgTEH5RazPUoYcN35h2iRB0k0UcVp5nmYWMzc3/MUvxZv4a4l69bcCh6WDUZBK93t
	xMj6V+oaLieDv1XFlH79rOKNh6RT1bkG/Od+g=
Received: by 10.14.94.66 with SMTP id m42mr3324903eef.66.1330206627733;
	Sat, 25 Feb 2012 13:50:27 -0800 (PST)
Received: from debian.x201.phnet (111-233.197-178.cust.bluewin.ch.
	[178.197.233.111])
	by mx.google.com with ESMTPS id y14sm36513966eef.10.2012.02.25.13.50.25
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sat, 25 Feb 2012 13:50:26 -0800 (PST)
Message-ID: <4F4957A0.3020600@gmail.com>
Date: Sat, 25 Feb 2012 22:50:24 +0100
From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?=
	<phcoder@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120216 Icedove/8.0
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: pkgdatadir and program_transform_name
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.83.41
X-Mailman-Approved-At: Sat, 25 Feb 2012 18:21:36 -0500
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, 25 Feb 2012 21:50:43 -0000

Hello, we've discovered that the "package" component in pkgdatadir isn't 
transformed through program_transform_name. In grub project we install 
some files to pkgdatadir and some distros apply the transformation 
grub->grub2 but make install still installs to /usr/local/share/grub and 
not /usr/local/share/grub2. Will it be fixed?IS there any way to make 
older automake behave correctly?

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



From MAILER-DAEMON Sat Feb 25 18:29:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1R35-0006Dy-3a
	for mharc-autoconf@gnu.org; Sat, 25 Feb 2012 18:29:07 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48089)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S1R2z-0006C8-2s
	for autoconf@gnu.org; Sat, 25 Feb 2012 18:29:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S1R2u-0005CT-Kh
	for autoconf@gnu.org; Sat, 25 Feb 2012 18:29:00 -0500
Received: from mx1.redhat.com ([209.132.183.28]:8644)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S1R2u-0005BS-33
	for autoconf@gnu.org; Sat, 25 Feb 2012 18:28:56 -0500
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 q1PNSqp6024984
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 25 Feb 2012 18:28:52 -0500
Received: from [10.3.113.31] (ovpn-113-31.phx2.redhat.com [10.3.113.31])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q1PNSqb2003337; Sat, 25 Feb 2012 18:28:52 -0500
Message-ID: <4F496EB3.20006@redhat.com>
Date: Sat, 25 Feb 2012 16:28:51 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1
MIME-Version: 1.0
To: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?=
	<phcoder@gmail.com>
Subject: Re: pkgdatadir and program_transform_name
References: <4F4957A0.3020600@gmail.com>
In-Reply-To: <4F4957A0.3020600@gmail.com>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig31E4AFE0BA3DA1BCAB88F2A7"
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: Sat, 25 Feb 2012 23:29:05 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig31E4AFE0BA3DA1BCAB88F2A7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 02/25/2012 02:50 PM, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote:=

> Hello, we've discovered that the "package" component in pkgdatadir isn'=
t
> transformed through program_transform_name. In grub project we install
> some files to pkgdatadir and some distros apply the transformation
> grub->grub2 but make install still installs to /usr/local/share/grub an=
d
> not /usr/local/share/grub2. Will it be fixed?IS there any way to make
> older automake behave correctly?

That sounds like it is probably more of a question for the automake
list.  But this seems like a pretty specific case, not supported in the
generic automake program transformation abilities, so my guess is that
it will probably have to be more like a patch specific to the grub
configure.ac to allow something like ./configure
--with-package-name=3Dgrub2 as a way to then trigger an automake
conditional, where Makefile.am then determines whether to install into
grub or into grub2 based on the conditional.

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


--------------enig31E4AFE0BA3DA1BCAB88F2A7
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/

iQEcBAEBCAAGBQJPSW60AAoJEKeha0olJ0Nq1WUH/3IhPYm6bdtEdlIzN08JrZgz
M36Q5TO7IqkHltUPkCpwvTORjTFTE25b4i0aQSwhv3hDngv3xVRxU8L4LngZoHZJ
9byJ13mHGf9qE8J6kGOF5IAr+SLxdxMjLZjWm3wsubFWGGt21cY9XmjCdBHEIMPZ
32YJIzoK7zaXRE7xtT6CKnxxy5tBRrgetstwlpouZFDadVDpvfsCajk99TIeoyqA
zWtqkCP0o/5ODwb2inFgJyM3omcDfb+cJWCOtnex8a376MIE6rlIRVkbCqjJvoNP
bw39RFlmBVNa7kHPGa9dabiJtgrk+tLpGc4LCp4udZKQGtMAIcq1Y+4nnUP0nQA=
=F+EJ
-----END PGP SIGNATURE-----

--------------enig31E4AFE0BA3DA1BCAB88F2A7--


From MAILER-DAEMON Sun Feb 26 09:32:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1f93-0007LB-VU
	for mharc-autoconf@gnu.org; Sun, 26 Feb 2012 09:32:13 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45224)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1S1f8v-0007Kw-EW
	for autoconf@gnu.org; Sun, 26 Feb 2012 09:32:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1S1f8n-0004Bu-G5
	for autoconf@gnu.org; Sun, 26 Feb 2012 09:32:05 -0500
Received: from smtp12.dentaku.gol.com ([203.216.5.74]:53261)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>)
	id 1S1f8n-0004Bo-6k; Sun, 26 Feb 2012 09:31:57 -0500
Received: from 61.245.22.71.eo.eaccess.ne.jp ([61.245.22.71]
	helo=catnip.gol.com) by smtp12.dentaku.gol.com with esmtpa (Dentaku)
	(envelope-from <miles@gnu.org>)
	id 1S1f8l-0002ft-8R; Sun, 26 Feb 2012 23:31:55 +0900
Received: by catnip.gol.com (Postfix, from userid 1000)
	id B8885DF9D; Sun, 26 Feb 2012 23:31:53 +0900 (JST)
From: Miles Bader <miles@gnu.org>
To: =?utf-8?Q?Vladimir_'=CF=86-coder=2Fphcoder'_Serbinenko?=
	<phcoder@gmail.com>
Subject: Re: pkgdatadir and program_transform_name
References: <4F4957A0.3020600@gmail.com>
System-Type: x86_64-unknown-linux-gnu
Date: Sun, 26 Feb 2012 23:31:53 +0900
In-Reply-To: <4F4957A0.3020600@gmail.com> ("Vladimir =?utf-8?Q?'=CF=86-cod?=
	=?utf-8?Q?er=2Fphcoder'?=
	Serbinenko"'s message of "Sat, 25 Feb 2012 22:50:24 +0100")
Message-ID: <87vcmtbr8m.fsf@catnip.gol.com>
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: ClamAV GOL (outbound)
X-Abuse-Complaints: abuse@gol.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 203.216.5.74
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, 26 Feb 2012 14:32:12 -0000

"Vladimir '=CF=86-coder/phcoder' Serbinenko" <phcoder@gmail.com> writes:
> Hello, we've discovered that the "package" component in pkgdatadir
> isn't transformed through program_transform_name. In grub project we
> install some files to pkgdatadir and some distros apply the
> transformation grub->grub2 but make install still installs to
> /usr/local/share/grub and not /usr/local/share/grub2.

I don't think that's the intended use of program_transform_name -- the
latter is specifically targeted at changing the names of executables
to avoid conflicting with system executables.  It's not for "changing
the package name" in general.

[As to _why_ it works that way, here's my guess:  package names can
show up in all sorts of places (consider when it installs a library
"libblah.so"), and correctly changing _all_ of them would be kind of
difficult to do automatically.  Changing the names of only executable
files, on the other hand is very simple and historically was useful
because of GNU was writing many executables with the same names as
system executables.]

> Will it be fixed?  Is there any way to make older automake behave
> correctly?

As it doesn't seem to be broken, presumably it won't be "fixed."

If you want to change pkgdatadir, there's a configure option to do
that, of course.

-Miles

--=20
Liberty, n. One of imagination's most precious possessions.


From MAILER-DAEMON Sun Feb 26 09:36:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1fDV-0007xB-JV
	for mharc-autoconf@gnu.org; Sun, 26 Feb 2012 09:36:49 -0500
Received: from eggs.gnu.org ([208.118.235.92]:59505)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <phcoder@gmail.com>) id 1S1fDN-0007wU-Jt
	for autoconf@gnu.org; Sun, 26 Feb 2012 09:36:48 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <phcoder@gmail.com>) id 1S1fDG-00054f-Mm
	for autoconf@gnu.org; Sun, 26 Feb 2012 09:36:41 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:52524)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <phcoder@gmail.com>)
	id 1S1fD8-00053d-R4; Sun, 26 Feb 2012 09:36:26 -0500
Received: by eeke53 with SMTP id e53so1292218eek.0
	for <multiple recipients>; Sun, 26 Feb 2012 06:36:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	bh=K/bP6RBrC7FQVruuUehCdiKf39AZYiYqDBbGAHkVBIU=;
	b=t+A1/upis8PlJMJl/06370CZ4NgCCjwDbmUJ7VrRdM1+WMXzR5FJphIPk1jG5DdDPn
	TqRSP45MpNaLn3vgPAA6vftd/4kZZ0bnR0CRM8LMFX/YsnN2ygHZzhyLqO7BaNynINQc
	aV1/ZXyTUr0LhvBonBBaDBA/AKHhxYUHB6Ru0=
Received: by 10.14.100.80 with SMTP id y56mr4466908eef.68.1330266985493;
	Sun, 26 Feb 2012 06:36:25 -0800 (PST)
Received: from debian.x201.phnet (51-234.197-178.cust.bluewin.ch.
	[178.197.234.51])
	by mx.google.com with ESMTPS id r5sm33393473eef.6.2012.02.26.06.36.23
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 26 Feb 2012 06:36:24 -0800 (PST)
Message-ID: <4F4A4365.3060100@gmail.com>
Date: Sun, 26 Feb 2012 15:36:21 +0100
From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?=
	<phcoder@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120216 Icedove/8.0
MIME-Version: 1.0
To: Miles Bader <miles@gnu.org>
Subject: Re: pkgdatadir and program_transform_name
References: <4F4957A0.3020600@gmail.com> <87vcmtbr8m.fsf@catnip.gol.com>
In-Reply-To: <87vcmtbr8m.fsf@catnip.gol.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.83.41
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, 26 Feb 2012 14:36:48 -0000

On 26.02.2012 15:31, Miles Bader wrote:
> If you want to change pkgdatadir, there's a configure option to do
> that, of course.
I don't see any in ./configure --help

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



From MAILER-DAEMON Sun Feb 26 09:53:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1fTc-0002i4-KA
	for mharc-autoconf@gnu.org; Sun, 26 Feb 2012 09:53:28 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44068)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <snogglethorpe@gmail.com>) id 1S1fTV-0002gC-SW
	for autoconf@gnu.org; Sun, 26 Feb 2012 09:53:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <snogglethorpe@gmail.com>) id 1S1fTP-0007Qk-Eu
	for autoconf@gnu.org; Sun, 26 Feb 2012 09:53:21 -0500
Received: from mail-vx0-f169.google.com ([209.85.220.169]:54207)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <snogglethorpe@gmail.com>) id 1S1fTP-0007Qc-Ab
	for autoconf@gnu.org; Sun, 26 Feb 2012 09:53:15 -0500
Received: by vcbf13 with SMTP id f13so3072034vcb.0
	for <autoconf@gnu.org>; Sun, 26 Feb 2012 06:53:14 -0800 (PST)
Received-SPF: pass (google.com: domain of snogglethorpe@gmail.com designates
	10.52.24.40 as permitted sender) client-ip=10.52.24.40; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	snogglethorpe@gmail.com designates 10.52.24.40 as permitted
	sender) smtp.mail=snogglethorpe@gmail.com;
	dkim=pass header.i=snogglethorpe@gmail.com
Received: from mr.google.com ([10.52.24.40])
	by 10.52.24.40 with SMTP id r8mr927068vdf.108.1330267994317 (num_hops =
	1); Sun, 26 Feb 2012 06:53:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=ekv5P3vl9Lhz5feauURiMuO7dLxAE5VzrhDDXDWrq+Y=;
	b=fq4mzu+qmscoESHTKk5M4P5Q0U89AAMngLgKEqh4/yWAGTfzP9ZPUw2WiUoOGR20gS
	gtpHrK0FBh4is987KlFzdA/o/L/dGqyi5X/Ww3F4oDbLPA/eco79RFA2+gpzjKNMEQjh
	M8BxLXkD5PMZLYzk8AzetJ96KhjSjLoWTyTRc=
Received: by 10.52.24.40 with SMTP id r8mr773496vdf.108.1330267994273; Sun, 26
	Feb 2012 06:53:14 -0800 (PST)
MIME-Version: 1.0
Sender: snogglethorpe@gmail.com
Received: by 10.220.106.195 with HTTP; Sun, 26 Feb 2012 06:52:34 -0800 (PST)
In-Reply-To: <4F4A4365.3060100@gmail.com>
References: <4F4957A0.3020600@gmail.com> <87vcmtbr8m.fsf@catnip.gol.com>
	<4F4A4365.3060100@gmail.com>
From: Miles Bader <miles@gnu.org>
Date: Sun, 26 Feb 2012 23:52:34 +0900
X-Google-Sender-Auth: XF_dF1xQL8eaSTpJH0F0Tplm6pE
Message-ID: <CADCnXoZjJhykeid594orr8k7usnjs5kmHoTM363=bGoT9gWO2w@mail.gmail.com>
Subject: Re: pkgdatadir and program_transform_name
To: =?ISO-8859-7?Q?Vladimir_=27=F6=2Dcoder=2Fphcoder=27_Serbinenko?=
	<phcoder@gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
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, 26 Feb 2012 14:53:27 -0000

2012=E5=B9=B42=E6=9C=8826=E6=97=A523:36 Vladimir '=CF=86-coder/phcoder' Ser=
binenko <phcoder@gmail.com>:
> On 26.02.2012 15:31, Miles Bader wrote:
>>
>> If you want to change pkgdatadir, there's a configure option to do
>> that, of course.
>
> I don't see any in ./configure --help

Gee, you're right!

I guess there should be either options to set that, or an option to
override the package name...

I think a bug report to add such options seems more likely to succeed
than a request to change program_transform_name tho.

Thanks,

-miles

--=20
Cat is power.  Cat is peace.


From MAILER-DAEMON Sun Feb 26 15:11:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1kRY-00064o-0M
	for mharc-autoconf@gnu.org; Sun, 26 Feb 2012 15:11:40 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40330)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <phcoder@gmail.com>) id 1S1kRU-00064G-HV
	for autoconf@gnu.org; Sun, 26 Feb 2012 15:11:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <phcoder@gmail.com>) id 1S1kRT-00029R-In
	for autoconf@gnu.org; Sun, 26 Feb 2012 15:11:36 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:49766)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <phcoder@gmail.com>)
	id 1S1kRR-00025x-DG; Sun, 26 Feb 2012 15:11:33 -0500
Received: by mail-ey0-f169.google.com with SMTP id g11so1784023eaa.0
	for <multiple recipients>; Sun, 26 Feb 2012 12:11:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	bh=BZsWR3mhllN95k1P9iRyOlwZXI+Rwamo32Sunp1Ha/w=;
	b=mTwKL13+pRV2RrfZmfTSfLJjRFp2JJKJdJTw7tDrouGaPKDSEKp2wOEewr7+waVoOq
	fWce/r0JmtKyraIOTv8oF41Hkd2HtbrQmhNSjsIPCagWRiqcII4/v+RxH+pHEdE4UaPn
	JqXI092pPFMhZnYOdFtzyIe72PqnefZ3Tg3Pw=
Received: by 10.14.183.130 with SMTP id q2mr4772273eem.101.1330287092646;
	Sun, 26 Feb 2012 12:11:32 -0800 (PST)
Received: from debian.x201.phnet (51-234.197-178.cust.bluewin.ch.
	[178.197.234.51])
	by mx.google.com with ESMTPS id y14sm48953361eef.10.2012.02.26.12.11.29
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 26 Feb 2012 12:11:31 -0800 (PST)
Message-ID: <4F4A91ED.3020500@gmail.com>
Date: Sun, 26 Feb 2012 21:11:25 +0100
From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?=
	<phcoder@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120216 Icedove/8.0
MIME-Version: 1.0
To: Miles Bader <miles@gnu.org>
Subject: Re: pkgdatadir and program_transform_name
References: <4F4957A0.3020600@gmail.com> <87vcmtbr8m.fsf@catnip.gol.com>
In-Reply-To: <87vcmtbr8m.fsf@catnip.gol.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
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, 26 Feb 2012 20:11:38 -0000

On 26.02.2012 15:31, Miles Bader wrote:
>> Will it be fixed?  Is there any way to make older automake behave
>> >  correctly?
> As it doesn't seem to be broken, presumably it won't be "fixed."
Why is pkglibdir transformed then?

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



From MAILER-DAEMON Sun Feb 26 17:14:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1mMJ-0007yq-GI
	for mharc-autoconf@gnu.org; Sun, 26 Feb 2012 17:14:23 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35936)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1S1mMH-0007yd-1s
	for Autoconf@gnu.org; Sun, 26 Feb 2012 17:14:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1S1mME-0002fC-PR
	for Autoconf@gnu.org; Sun, 26 Feb 2012 17:14:20 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:50283)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>)
	id 1S1mME-0002f6-JG; Sun, 26 Feb 2012 17:14:18 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 36A6D4001E;
	Sun, 26 Feb 2012 23:14:14 +0100 (CET)
Received: from [192.168.0.150] (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id E8A4D4001C;
	Sun, 26 Feb 2012 23:14:13 +0100 (CET)
Message-ID: <4F4AAEB5.3090307@lysator.liu.se>
Date: Sun, 26 Feb 2012 23:14:13 +0100
From: Peter Rosin <peda@lysator.liu.se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com>
In-Reply-To: <4F46C0D1.5080801@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
Cc: Autoconf <Autoconf@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>, automake-patches@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, 26 Feb 2012 22:14:22 -0000

Eric Blake skrev 2012-02-23 23:42:
> On 02/23/2012 02:48 PM, Stefano Lattarini wrote:
>> * lib/Makefile.am (installcheck-local): To verify that the installed
>> scripts are actually executable, simply use 'test -x', instead of
>> resorting to perl and its '-x' file operator.  Today, 'test -x'
>> should today be portable to any non-museum system.  Since we are at
>> it, improve diagnostic in case of failure.
> 
> The autoconf manual still recommends:
> 
> Do not use @samp{test -x}, because 4.3BSD does not
> have it.
> 
> Is this still an issue?  Or should we be updating the autoconf manual?

Hi!

Sorry for the late reply, but this might be relevant.  Personally, I wouldn't
classify the below as a working "test -x", but I'm not sure what working is in
this context...

Cheers,
Peter

$ uname -a
MINGW32_NT-6.1 PEDA-PC 1.0.17(0.48/3/2) 2011-04-24 23:39 i686 Msys
$ touch gurka
$ test -x gurka
$ echo $?
1
$ test -x gurka.exe
$ echo $?
1
$ chmod +x gurka
$ test -x gurka
$ echo $?
1
$ test -x gurka.exe
$ echo $?
1
$ rm gurka
$ touch gurka.exe
$ test -x gurka
$ echo $?
0
$ test -x gurka.exe
$ echo $?
0
$ chmod -x gurka.exe
$ test -x gurka
$ echo $?
0
$ test -x gurka.exe
$ echo $?
0


From MAILER-DAEMON Sun Feb 26 19:02:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1o2v-0005gl-C3
	for mharc-autoconf@gnu.org; Sun, 26 Feb 2012 19:02:29 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57171)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <snogglethorpe@gmail.com>) id 1S1o2t-0005gS-8x
	for autoconf@gnu.org; Sun, 26 Feb 2012 19:02:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <snogglethorpe@gmail.com>) id 1S1o2s-0000tK-8q
	for autoconf@gnu.org; Sun, 26 Feb 2012 19:02:27 -0500
Received: from mail-vx0-f169.google.com ([209.85.220.169]:48837)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <snogglethorpe@gmail.com>) id 1S1o2s-0000tF-49
	for autoconf@gnu.org; Sun, 26 Feb 2012 19:02:26 -0500
Received: by vcbfk14 with SMTP id fk14so105730vcb.0
	for <autoconf@gnu.org>; Sun, 26 Feb 2012 16:02:25 -0800 (PST)
Received-SPF: pass (google.com: domain of snogglethorpe@gmail.com designates
	10.220.106.133 as permitted sender) client-ip=10.220.106.133; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	snogglethorpe@gmail.com designates 10.220.106.133 as permitted
	sender) smtp.mail=snogglethorpe@gmail.com;
	dkim=pass header.i=snogglethorpe@gmail.com
Received: from mr.google.com ([10.220.106.133])
	by 10.220.106.133 with SMTP id x5mr1350195vco.39.1330300945442
	(num_hops = 1); Sun, 26 Feb 2012 16:02:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=8/qX3smKxmtRCjK/UT/Rv+eJKxjl/im46gXyLqFTq2A=;
	b=ifuu02zO/lJGgHMPHlrZClnTWXN6WVAD09tOVffUYEaMN80CP22CEEYYxJPSeDEJgK
	0K5XsmjSovMXI4Dt5rXDy49iuH3vWyPz2GKzobabO+qR5xlasUMrkWTI5lTUwauXo8LH
	h5xvxL68XtqYo2KzNAbvN+5VwfNmxkMNYYcbI=
Received: by 10.220.106.133 with SMTP id x5mr1109099vco.39.1330300945372; Sun,
	26 Feb 2012 16:02:25 -0800 (PST)
MIME-Version: 1.0
Sender: snogglethorpe@gmail.com
Received: by 10.220.106.195 with HTTP; Sun, 26 Feb 2012 16:01:45 -0800 (PST)
In-Reply-To: <4F4A91ED.3020500@gmail.com>
References: <4F4957A0.3020600@gmail.com> <87vcmtbr8m.fsf@catnip.gol.com>
	<4F4A91ED.3020500@gmail.com>
From: Miles Bader <miles@gnu.org>
Date: Mon, 27 Feb 2012 09:01:45 +0900
X-Google-Sender-Auth: hVJiku9JDht7KPiPh3FvjzHhLIk
Message-ID: <CADCnXoY6mK5nLQtzUC2TmjG9-50-0n_c5vEB-Pp1hHEqSMR9wQ@mail.gmail.com>
Subject: Re: pkgdatadir and program_transform_name
To: =?ISO-8859-7?Q?Vladimir_=27=F6=2Dcoder=2Fphcoder=27_Serbinenko?=
	<phcoder@gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
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, 27 Feb 2012 00:02:28 -0000

2012=E5=B9=B42=E6=9C=8827=E6=97=A55:11 Vladimir '=CF=86-coder/phcoder' Serb=
inenko <phcoder@gmail.com>:
> On 26.02.2012 15:31, Miles Bader wrote:
>>> Will it be fixed?  Is there any way to make older automake behave
>>> correctly?
>>
>> As it doesn't seem to be broken, presumably it won't be "fixed."
>
> Why is pkglibdir transformed then?

Er, it isn't...

[At least with my version of automake, 1.11.3.]

-miles

--=20
Cat is power.  Cat is peace.


From MAILER-DAEMON Mon Feb 27 08:58:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S216D-0002MM-Jv
	for mharc-autoconf@gnu.org; Mon, 27 Feb 2012 08:58:45 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36323)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S2166-0002At-AE
	for Autoconf@gnu.org; Mon, 27 Feb 2012 08:58:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S215z-0000nM-R4
	for Autoconf@gnu.org; Mon, 27 Feb 2012 08:58:38 -0500
Received: from mx1.redhat.com ([209.132.183.28]:64586)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1S215z-0000n6-Ip; Mon, 27 Feb 2012 08:58:31 -0500
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1RDwSsB024022
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 27 Feb 2012 08:58:28 -0500
Received: from [10.3.113.8] ([10.3.113.8])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q1RDwQ5w001748; Mon, 27 Feb 2012 08:58:27 -0500
Message-ID: <4F4B8BFA.7070208@redhat.com>
Date: Mon, 27 Feb 2012 06:58:18 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1
MIME-Version: 1.0
To: Peter Rosin <peda@lysator.liu.se>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <4F4AAEB5.3090307@lysator.liu.se>
In-Reply-To: <4F4AAEB5.3090307@lysator.liu.se>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig41EBBB88C05F0D00BE43BE14"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: Autoconf <Autoconf@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>, automake-patches@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, 27 Feb 2012 13:58:44 -0000

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

On 02/26/2012 03:14 PM, Peter Rosin wrote:

> Sorry for the late reply, but this might be relevant.  Personally, I wo=
uldn't
> classify the below as a working "test -x", but I'm not sure what workin=
g is in
> this context...

Thanks for chiming in.  I still haven't pushed my proposed patches to
autoconf, and I'd like to make sure that what I'm proposing for autoconf
still gets by on your MSYS system (I don't have MSYS set up myself, so
getting feedback from you would be fastest).  I assume that some of MSYS
behavior on FAT is similar to cygwin on FAT, and I have been testing
Cygwin on FAT, but I also know that Cygwin and MSYS have diverged so
that is not necessarily a reliable result.

> $ uname -a
> MINGW32_NT-6.1 PEDA-PC 1.0.17(0.48/3/2) 2011-04-24 23:39 i686 Msys
> $ touch gurka
> $ test -x gurka
> $ echo $?
> 1

This says an empty file is not executable.  Fine - there's no #! in the
file, and MSYS tends to store files on FAT filesystems that can't track
real permissions, anyway, so faking things based on contents is not an
issue.

What does './gurka; echo $?' do in this situation?

> $ chmod +x gurka
> $ test -x gurka
> $ echo $?
> 1

You didn't show $? nor 'ls -l' after 'chmod +x', but your transcript
implies that since the filesystem can't record executable bits, that
chmod is silently ignored, and the faking of executability is still
being done.

> $ touch gurka.exe
> $ test -x gurka
> $ echo $?
> 0

This says part of the faking is done via file extension (although an
empty length .exe should never occur in practice).

I'm also interested in the behavior of the following (which is what I
have proposed that autoconf adds to all configure scripts, and will fail
if it cannot find a shell that claims to work):

test -x /; echo $?
test -x .; echo $?
printf '#!/bin/sh\nexit 0\n' > foo.sh
=2E/foo.sh; echo $?
test -x foo.sh; echo $?
chmod a+x foo.sh; echo $?
=2E/foo.sh; echo $?
test -x foo.sh; echo $?

Once I know those behaviors, I think I can ensure that my proposed test
to require a "working" 'test -x' as a pre-req of finding a sane shell
should still work for MSYS.

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


--------------enig41EBBB88C05F0D00BE43BE14
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/

iQEcBAEBCAAGBQJPS4wCAAoJEKeha0olJ0Nq6CgH/iqL5+/xwUNFeSQf8M68pg9R
K9z46b70EcGj+JmU3ZxXDgRfMLWHEZuQdTZsOiYyjapjiLz+1W37hOT4EJnsBeTz
m0d3ZykwRKfdHm0ACMYz6ttxnBJ6Rh1C1Nb+ELBtyKNEgvq/98SYRS2FPhihRe4K
QxAcrU2oovX2kB2iyulA3tmE853ri27OT1bl7SOM6gxVSsx1WH9bTt6pXZ+SHIzV
Of16UgsWPJ+peEHfQYaUXpzxMXpKjoeSqCsbEu4jlo/0WNmx07Sbw0UccIQPmPX9
3j5NMxe7GkobKoxlFtCDUd6UqP/5msbcgt1gkWKDxqJRIjUjhaAQO7zbigZ9tGs=
=pHtI
-----END PGP SIGNATURE-----

--------------enig41EBBB88C05F0D00BE43BE14--


From MAILER-DAEMON Mon Feb 27 09:51:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S21vN-0005nH-EX
	for mharc-autoconf@gnu.org; Mon, 27 Feb 2012 09:51:37 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42110)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1S21vC-0005mL-KJ
	for Autoconf@gnu.org; Mon, 27 Feb 2012 09:51:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1S21v4-000217-79
	for Autoconf@gnu.org; Mon, 27 Feb 2012 09:51:26 -0500
Received: from mail.lysator.liu.se ([130.236.254.3]:45540)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>)
	id 1S21v3-00020G-T9; Mon, 27 Feb 2012 09:51:18 -0500
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 6626540007;
	Mon, 27 Feb 2012 15:51:14 +0100 (CET)
Received: from [192.168.0.150] (h57n3fls301o1095.telia.com [81.230.178.57])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 1B45040004;
	Mon, 27 Feb 2012 15:51:13 +0100 (CET)
Message-ID: <4F4B9862.9030706@lysator.liu.se>
Date: Mon, 27 Feb 2012 15:51:14 +0100
From: Peter Rosin <peda@lysator.liu.se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <4F4AAEB5.3090307@lysator.liu.se>
	<4F4B8BFA.7070208@redhat.com>
In-Reply-To: <4F4B8BFA.7070208@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
Cc: Autoconf <Autoconf@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>, automake-patches@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, 27 Feb 2012 14:51:36 -0000

Eric Blake skrev 2012-02-27 14:58:
> On 02/26/2012 03:14 PM, Peter Rosin wrote:
> 
>> Sorry for the late reply, but this might be relevant.  Personally, I wouldn't
>> classify the below as a working "test -x", but I'm not sure what working is in
>> this context...
> 
> Thanks for chiming in.  I still haven't pushed my proposed patches to
> autoconf, and I'd like to make sure that what I'm proposing for autoconf
> still gets by on your MSYS system (I don't have MSYS set up myself, so
> getting feedback from you would be fastest).  I assume that some of MSYS
> behavior on FAT is similar to cygwin on FAT, and I have been testing
> Cygwin on FAT, but I also know that Cygwin and MSYS have diverged so
> that is not necessarily a reliable result.

Note, this is all MSYS on NTFS, no FAT in sight.

>> $ uname -a
>> MINGW32_NT-6.1 PEDA-PC 1.0.17(0.48/3/2) 2011-04-24 23:39 i686 Msys
>> $ touch gurka
>> $ test -x gurka
>> $ echo $?
>> 1
> 
> This says an empty file is not executable.  Fine - there's no #! in the
> file, and MSYS tends to store files on FAT filesystems that can't track
> real permissions, anyway, so faking things based on contents is not an
> issue.
> 
> What does './gurka; echo $?' do in this situation?
>> $ chmod +x gurka
>> $ test -x gurka
>> $ echo $?
>> 1
> 
> You didn't show $? nor 'ls -l' after 'chmod +x', but your transcript
> implies that since the filesystem can't record executable bits, that
> chmod is silently ignored, and the faking of executability is still
> being done.

$ touch gurka
$ ./gurka; echo $?
0
$ ls -lG gurka
-rw-r--r-- 1 peda 0 Feb 27 15:39 gurka
$ chmod +x gurka; echo $?
0
$ ls -lG gurka
-rw-r--r-- 1 peda 0 Feb 27 15:39 gurka
$ ./gurka; echo $?
0
$ echo paprika > gurka
$ ./gurka; echo $?
./gurka: line 1: paprika: command not found
127
$ rm gurka
$ echo "echo gurka" > gurka
$ ls -lG gurka
-rw-r--r-- 1 peda 11 Feb 27 15:49 gurka
$ ./gurka; echo $?
gurka
0

>> $ touch gurka.exe
>> $ test -x gurka
>> $ echo $?
>> 0
> 
> This says part of the faking is done via file extension (although an
> empty length .exe should never occur in practice).
> 
> I'm also interested in the behavior of the following (which is what I
> have proposed that autoconf adds to all configure scripts, and will fail
> if it cannot find a shell that claims to work):
> 
> test -x /; echo $?
> test -x .; echo $?
> printf '#!/bin/sh\nexit 0\n' > foo.sh
> ./foo.sh; echo $?
> test -x foo.sh; echo $?
> chmod a+x foo.sh; echo $?
> ./foo.sh; echo $?
> test -x foo.sh; echo $?
> 
> Once I know those behaviors, I think I can ensure that my proposed test
> to require a "working" 'test -x' as a pre-req of finding a sane shell
> should still work for MSYS.

$ test -x /; echo $?
0
$ test -x .; echo $?
0
$ printf '#!/bin/sh\nexit 0\n' > foo.sh
$ ./foo.sh; echo $?
0
$ test -x foo.sh; echo $?
0
$ chmod a+x foo.sh; echo $?
0
$ ./foo.sh; echo $?
0
$ test -x foo.sh; echo $?
0

Cheers,
Peter


From MAILER-DAEMON Mon Feb 27 09:53:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S21xZ-00077P-7i
	for mharc-autoconf@gnu.org; Mon, 27 Feb 2012 09:53:53 -0500
Received: from eggs.gnu.org ([208.118.235.92]:55999)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1S21xR-000751-Ul
	for Autoconf@gnu.org; Mon, 27 Feb 2012 09:53:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1S21xN-0002Ks-LP
	for Autoconf@gnu.org; Mon, 27 Feb 2012 09:53:45 -0500
Received: from mail-vw0-f41.google.com ([209.85.212.41]:43420)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1S21xN-0002Km-Hb
	for Autoconf@gnu.org; Mon, 27 Feb 2012 09:53:41 -0500
Received: by vbbey12 with SMTP id ey12so724140vbb.0
	for <Autoconf@gnu.org>; Mon, 27 Feb 2012 06:53:40 -0800 (PST)
Received-SPF: pass (google.com: domain of keith.d.marshall@ntlworld.com
	designates 10.220.141.142 as permitted sender)
	client-ip=10.220.141.142; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	keith.d.marshall@ntlworld.com designates 10.220.141.142 as
	permitted sender) smtp.mail=keith.d.marshall@ntlworld.com
Received: from mr.google.com ([10.220.141.142])
	by 10.220.141.142 with SMTP id m14mr8274532vcu.41.1330354420545
	(num_hops = 1); Mon, 27 Feb 2012 06:53:40 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.141.142 with SMTP id m14mr6627168vcu.41.1330354420369;
	Mon, 27 Feb 2012 06:53:40 -0800 (PST)
Sender: keith.d.marshall@ntlworld.com
Received: by 10.52.70.13 with HTTP; Mon, 27 Feb 2012 06:53:40 -0800 (PST)
X-Originating-IP: [141.227.1.35]
In-Reply-To: <4F4B8BFA.7070208@redhat.com>
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <4F4AAEB5.3090307@lysator.liu.se>
	<4F4B8BFA.7070208@redhat.com>
Date: Mon, 27 Feb 2012 14:53:40 +0000
X-Google-Sender-Auth: yVxGYjOq1d6J6WbZGVPsjoEF5mM
Message-ID: <CA+xnXL9PZyJTmrqLPVNas4man+u1LA8rGOzPh_r723CZU_RXXw@mail.gmail.com>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
From: Keith Marshall <keithmarshall@users.sourceforge.net>
To: Eric Blake <eblake@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Gm-Message-State: ALoCoQmf707hDV9VjAXgOklmTXC9RFRrJro8n7giOhnsnWbVtgB2nlrnzU/KkEFouJkuUULtO31F
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: Peter Rosin <peda@lysator.liu.se>, Autoconf <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, 27 Feb 2012 14:53:51 -0000

On 27 February 2012 13:58, Eric Blake wrote:
> I'm also interested in the behavior of the following (which is what I
> have proposed that autoconf adds to all configure scripts, and will fail
> if it cannot find a shell that claims to work):
>
> test -x /; echo $?
> test -x .; echo $?
> printf '#!/bin/sh\nexit 0\n' > foo.sh
> ./foo.sh; echo $?
> test -x foo.sh; echo $?
> chmod a+x foo.sh; echo $?
> ./foo.sh; echo $?
> test -x foo.sh; echo $?
>
> Once I know those behaviors, I think I can ensure that my proposed test
> to require a "working" 'test -x' as a pre-req of finding a sane shell
> should still work for MSYS.

$ uname -a
MINGW32_NT-6.0 ... 1.0.17(0.48/3/2) 2011-04-24 23:39 i686 Msys

$ cat <<\EOF> bar.sh
> test -x /; echo $?
> test -x .; echo $?
> printf '#!/bin/sh\nexit 0\n' > foo.sh
> ./foo.sh; echo $?
> test -x foo.sh; echo $?
> chmod a+x foo.sh; echo $?
> ./foo.sh; echo $?
> test -x foo.sh; echo $?
> EOF

$ sh -v bar.sh
test -x /; echo $?
0
test -x .; echo $?
0
printf '#!/bin/sh\nexit 0\n' > foo.sh
./foo.sh; echo $?
0
test -x foo.sh; echo $?
0
chmod a+x foo.sh; echo $?
0
./foo.sh; echo $?
0
test -x foo.sh; echo $?
0

-- 
Regards,
Keith.


From MAILER-DAEMON Mon Feb 27 14:56:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S26gC-0001Ed-CM
	for mharc-autoconf@gnu.org; Mon, 27 Feb 2012 14:56:16 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35165)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S26gA-0001EX-7U
	for Autoconf@gnu.org; Mon, 27 Feb 2012 14:56:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S26g3-00073M-Vj
	for Autoconf@gnu.org; Mon, 27 Feb 2012 14:56:14 -0500
Received: from mx1.redhat.com ([209.132.183.28]:24582)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1S26g3-00073G-NR; Mon, 27 Feb 2012 14:56:07 -0500
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 q1RJu5nB030677
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 27 Feb 2012 14:56:05 -0500
Received: from [10.3.113.13] ([10.3.113.13])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q1RJu5FG015632; Mon, 27 Feb 2012 14:56:05 -0500
Message-ID: <4F4BDFD4.7090507@redhat.com>
Date: Mon, 27 Feb 2012 12:56:04 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1
MIME-Version: 1.0
To: Peter Rosin <peda@lysator.liu.se>
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>
	<4F46C0D1.5080801@redhat.com> <4F4AAEB5.3090307@lysator.liu.se>
	<4F4B8BFA.7070208@redhat.com> <4F4B9862.9030706@lysator.liu.se>
In-Reply-To: <4F4B9862.9030706@lysator.liu.se>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigDC5A02918D1A0BB1ACA6002D"
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 <Autoconf@gnu.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>, automake-patches@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, 27 Feb 2012 19:56:15 -0000

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

On 02/27/2012 07:51 AM, Peter Rosin wrote:
>> Thanks for chiming in.  I still haven't pushed my proposed patches to
>> autoconf, and I'd like to make sure that what I'm proposing for autoco=
nf
>> still gets by on your MSYS system (I don't have MSYS set up myself, so=

>> getting feedback from you would be fastest).  I assume that some of MS=
YS
>> behavior on FAT is similar to cygwin on FAT, and I have been testing
>> Cygwin on FAT, but I also know that Cygwin and MSYS have diverged so
>> that is not necessarily a reliable result.
>=20
> Note, this is all MSYS on NTFS, no FAT in sight.

Yuck.  NTFS supports executable bits, without having to fake things so
horribly, as evidenced by cygwin; cygwin only has to fake things on FAT.
 So it was a specific decision of the MSYS folks to fake it this badly.

>> You didn't show $? nor 'ls -l' after 'chmod +x', but your transcript
>> implies that since the filesystem can't record executable bits, that
>> chmod is silently ignored, and the faking of executability is still
>> being done.
>=20
> $ touch gurka
> $ ./gurka; echo $?
> 0

That's a POSIX violation.  Oh well - MSYS wasn't really trying for
POSIX, so much as bare minimum hacks to get things running for native
Windows, and this is just one of those hacks.

> $ ls -lG gurka
> -rw-r--r-- 1 peda 0 Feb 27 15:39 gurka
> $ chmod +x gurka; echo $?
> 0
> $ ls -lG gurka
> -rw-r--r-- 1 peda 0 Feb 27 15:39 gurka

Sure enough, chmod is (silently) ignored, because permissions are being
faked; but it's a shame that 'x' doesn't appear in the ls -l output in
the case of the permissions being faked.

>> Once I know those behaviors, I think I can ensure that my proposed tes=
t
>> to require a "working" 'test -x' as a pre-req of finding a sane shell
>> should still work for MSYS.
>=20
> $ test -x /; echo $?
> 0

Good - this will pass the 'minimum support for test -x' probe that I'm
sticking into configure.

> $ test -x .; echo $?
> 0
> $ printf '#!/bin/sh\nexit 0\n' > foo.sh
> $ ./foo.sh; echo $?
> 0

Good - even though there are no x bits, the test that I'm adding to the
autoconf testsuite is smart enough to recognize that if the script
_gets_ executed,...

> $ test -x foo.sh; echo $?
> 0

=2E..and 'test -x' says it could be executed, in spite of the missing 'x'=

bits, then the test will pass in spite of the brokenness of the 'x'
semantics on that file system.

> $ chmod a+x foo.sh; echo $?
> 0
> $ ./foo.sh; echo $?
> 0
> $ test -x foo.sh; echo $?
> 0

So I'm pretty sure that I'm safe to check in my patches without causing
grief for MSYS, although if you'd test the pre-release before 2.69, it
can't hurt things.  I hope to have the pre-release announcement out
later today.

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


--------------enigDC5A02918D1A0BB1ACA6002D
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/

iQEcBAEBCAAGBQJPS9/UAAoJEKeha0olJ0NqngkIALCIk6yArYoSI8OxQ9jb1Y6Q
pnlgO16fboGMetsvq/XoqsZT5TF6mfwIbtecm/A50WMVrsQIlT98XWyV38Q53EwR
YddhPuE8DOWld/TjlmXWHTRSGFMl1IZBiKHfVYBVSLDCg//RwNQsl/enFEqQH//b
pU+H3B+w25sUakpU6C62clP9nW0Fi2E7jKi22jqQLFgposGDSv/4V2OIqgSBmuSf
zZcxQYNZuhkTyoRB63JIShkwBdqd69PU5HYXtgt59nC+VW9TR8uEJ8wY5c6/I8fT
BV54S4Q7GEyDoq2t7UlobbREDa5wlVDClu7wu7M/oH2DxBbujIXMQpRaoBbhj88=
=yXEL
-----END PGP SIGNATURE-----

--------------enigDC5A02918D1A0BB1ACA6002D--


From MAILER-DAEMON Mon Feb 27 16:03:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S27j8-0003eb-3C
	for mharc-autoconf@gnu.org; Mon, 27 Feb 2012 16:03:22 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44742)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1S27j5-0003d3-1b
	for autoconf@gnu.org; Mon, 27 Feb 2012 16:03:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1S27iq-0002Ke-IY
	for autoconf@gnu.org; Mon, 27 Feb 2012 16:03:18 -0500
Received: from mail-we0-f169.google.com ([74.125.82.169]:61976)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <keith.d.marshall@ntlworld.com>) id 1S27iq-0002K8-BC
	for autoconf@gnu.org; Mon, 27 Feb 2012 16:03:04 -0500
Received: by werj55 with SMTP id j55so973025wer.0
	for <autoconf@gnu.org>; Mon, 27 Feb 2012 13:03:03 -0800 (PST)
Received-SPF: pass (google.com: domain of keith.d.marshall@ntlworld.com
	designates 10.180.78.233 as permitted sender)
	client-ip=10.180.78.233; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	keith.d.marshall@ntlworld.com designates 10.180.78.233 as
	permitted sender) smtp.mail=keith.d.marshall@ntlworld.com
Received: from mr.google.com ([10.180.78.233])
	by 10.180.78.233 with SMTP id e9mr686779wix.0.1330376583011 (num_hops =
	1); Mon, 27 Feb 2012 13:03:03 -0800 (PST)
Received: by 10.180.78.233 with SMTP id e9mr543622wix.0.1330376582944;
	Mon, 27 Feb 2012 13:03:02 -0800 (PST)
Received: from [192.168.13.4] (know-mailgateway-4.server.virginmedia.net.
	[62.254.26.109])
	by mx.google.com with ESMTPS id gf3sm24465101wib.6.2012.02.27.13.03.00
	(version=SSLv3 cipher=OTHER); Mon, 27 Feb 2012 13:03:01 -0800 (PST)
Sender: Keith Marshall <keith.d.marshall@ntlworld.com>
Message-ID: <4F4B954D.6080903@users.sourceforge.net>
Date: Mon, 27 Feb 2012 14:38:05 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Organization: MinGW Project Administrator
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.26) Gecko/20120131 Thunderbird/3.1.18
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
References: <f6dc3b772fb39fcd2fdbf93fe645ac2c5b127a47.1330033666.git.stefano.lattarini@gmail.com>	<4F46C0D1.5080801@redhat.com>
	<4F4AAEB5.3090307@lysator.liu.se>
In-Reply-To: <4F4AAEB5.3090307@lysator.liu.se>
X-Enigmail-Version: 1.1.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Gm-Message-State: ALoCoQkHx4pL9Bkj1G6TkeFZ+j3uVGmM8ciKRZHh8aGi+yZUtwkcjNY+tj1Xc8V3NfuyMsBuL21V
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.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: Mon, 27 Feb 2012 21:03:20 -0000

On 26/02/12 22:14, Peter Rosin wrote:
> Sorry for the late reply, but this might be relevant.  Personally, I wouldn't
> classify the below as a working "test -x",

On the contrary...

> but I'm not sure what working is in this context...
> 
> $ uname -a
> MINGW32_NT-6.1 PEDA-PC 1.0.17(0.48/3/2) 2011-04-24 23:39 i686 Msys

This tells me you are running MSYS on a recent MS-Windows system;
AFAIK, 'test -x' works correctly (as expected) on MSYS.

> $ touch gurka

Presumably creating an empty file.  No extension to mark it as
executable, and no content to shebang it, so...

> $ test -x gurka
> $ echo $?
> 1

...this is exactly as expected.

> $ test -x gurka.exe
> $ echo $?
> 1

Does gurka.exe exist?  If not, then this too is exactly as expected.

> $ chmod +x gurka
> $ test -x gurka
> $ echo $?
> 1

'chmod [-+]x ...' is a no-op in MSYS.  (Ignore Eric's FAT vs. NTFS red
herring; MS-Windows doesn't support executable attribute bits, so the
*only* way to mark a file as executable is by naming it with a suitable
extension, or, specific to MSYS, shebang it; this applies equally to FAT
and NTFS).  Here, gurka has neither a suitable extension, nor a shebang,
so it remains non-executable; again 'test -x' is working correctly, by
telling you this.

> $ test -x gurka.exe
> $ echo $?
> 1

You still don't have any gurka.exe, so 'test -x' is correct again.

> $ rm gurka
> $ touch gurka.exe
> $ test -x gurka
> $ echo $?
> 0

Now, you've created an (empty) gurka.exe; by virtue of its extension, it
is considered executable.  In searching for a file which might be
executed when you enter the command

  $ ./gurka

MSYS emulates MS-Windows own behaviour when you specify a command name
with no explicit extension -- it can't match the unqualified name, so it
tries again with known executable extensions appended; it finds
gurka.exe, (which is executable), and correctly reports it so.

> $ test -x gurka.exe
> $ echo $?
> 0

Correct again.

> $ chmod -x gurka.exe

Another no-op...

> $ test -x gurka
> $ echo $?
> 0

...so gurka (aka gurka.exe) remains executable, and this is again correct...

> $ test -x gurka.exe
> $ echo $?
> 0

...as is this.

It isn't 'test -x ...' that isn't working correctly here; it is your
understanding of MSYS, (and in particular the limitations of its chmod
command wrt file attributes which aren't supported by the underlying
MS-Windows OS), which is lacking.

-- 
Regards,
Keith.


From MAILER-DAEMON Tue Feb 28 11:52:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S2QHv-0005kk-R1
	for mharc-autoconf@gnu.org; Tue, 28 Feb 2012 11:52:31 -0500
Received: from eggs.gnu.org ([208.118.235.92]:32952)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S2QHo-0005k5-Au
	for Autoconf@gnu.org; Tue, 28 Feb 2012 11:52:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1S2QHh-0007do-Sj
	for Autoconf@gnu.org; Tue, 28 Feb 2012 11:52:23 -0500
Received: from mx1.redhat.com ([209.132.183.28]:33852)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1S2QHD-0007Zh-4S; Tue, 28 Feb 2012 11:51:47 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1SGpMbP008491
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 28 Feb 2012 11:51:22 -0500
Received: from [10.3.113.13] ([10.3.113.13])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q1SGpLJw010944; Tue, 28 Feb 2012 11:51:21 -0500
Message-ID: <4F4D0609.6060305@redhat.com>
Date: Tue, 28 Feb 2012 09:51:21 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: bug#10898: test-suite output of automake-1.11.3 - it requested
	I send it to you!
References: <4F4A4A42.3050802@Picciano.org> <4F4BB502.9060107@Picciano.org>
	<4F4BDCA9.6060102@gmail.com> <4F4CDF2B.3010407@Picciano.org>
	<4F4D040D.1050006@gmail.com>
In-Reply-To: <4F4D040D.1050006@gmail.com>
X-Enigmail-Version: 1.3.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigA23C5A135F47CD553D3BCDBC"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: 10898@debbugs.gnu.org, Autoconf <Autoconf@gnu.org>,
	Lou Picciano <Lou@Picciano.org>, automake-patches@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, 28 Feb 2012 16:52:30 -0000

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

[adding autoconf]

On 02/28/2012 09:42 AM, Stefano Lattarini wrote:

>>    Ah, likely the famous ksh bug with "$@" and empty arguments:
>>=20
>>      <http://lists.gnu.org/archive/html/automake-patches/2009-12/msg00=
037.html>

> See automake bug#10898.
>=20
> At least the AT&T and OpenSolaris versions of the Korn shell have a
> strange bug regarding the expression ${1+"$@"}: when exactly *one*
> empty argument is passed to a shell function, inside that function
> the expression ${1+"$@"} will expand to *nothing*, rather than to
> to the single empty string, as one would expect.  This was causing
> a spurious failure in our testsuite when a shell suffering of this
> bug was used to run the test cases.

Yuck - this sounds like it should be documented in the autoconf manual.
 Is it only shell functions that are affected, but global use of
${1+"$@"} is still safe?

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


--------------enigA23C5A135F47CD553D3BCDBC
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/

iQEcBAEBCAAGBQJPTQYJAAoJEKeha0olJ0NqqYwH/1js3E6fE1cynelzxsOH9dng
64QAIrtPGYKhXG6Z/bxLiwjRi+ZOzX4OKdMpG6Tk7eFYAxHtZH6kSxtQGLrNgI1i
F3AkvlZXG8FyCv54lfwAw4/QGi0M5vX2LTxZKBbriXhDMMi2QTnQ5nFi6DZf0dAt
jO3euaCKuLpvaJ9lNrHCzMJ6d17eBbz4nvLpo89NLeVy2ZTsU712u3lz6KxS/Ks6
SGW4VWj1vzAQ2rhY5ZZ4k0CzZ6pptqyfZ2cGayoA0WnMFxnTuz7VQbRRHenXZGLD
DWtohx8Rngg4wfsGgt6CSRfsNDqvkfSC/VbAsxf1aNZeD9gbdyiwg78g846ZQOk=
=6Kak
-----END PGP SIGNATURE-----

--------------enigA23C5A135F47CD553D3BCDBC--


From MAILER-DAEMON Tue Feb 28 12:15:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S2Qdy-0006EH-Bz
	for mharc-autoconf@gnu.org; Tue, 28 Feb 2012 12:15:18 -0500
Received: from eggs.gnu.org ([208.118.235.92]:41373)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S2QdW-000667-Ad
	for Autoconf@gnu.org; Tue, 28 Feb 2012 12:15:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1S2QdU-0003LX-83
	for Autoconf@gnu.org; Tue, 28 Feb 2012 12:14:49 -0500
Received: from mail-bk0-f41.google.com ([209.85.214.41]:45797)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1S2QdG-0003Jy-IO; Tue, 28 Feb 2012 12:14:34 -0500
Received: by bkty12 with SMTP id y12so6127952bkt.0
	for <multiple recipients>; Tue, 28 Feb 2012 09:14:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=7oxu5X17T+8OoWmUD48Or9BNbEjZVXi16Akh/vmKxNE=;
	b=erW4xo7lk431AQYpTumLlJK2r0VMwaU1lVKrrMOgWXSXnAtwQ2NN5viW/vGm+JIBiQ
	c308QZgzrDenwLqD4ICHwkUiFK2XJmXryqm7G3WO5UUwLCz071nCGhueYfItNEsbkmb6
	NWdfj4AAyTxM6eZu2lnEgK5d6pSLlMeeCUi6k=
Received: by 10.204.130.204 with SMTP id u12mr2635699bks.49.1330449271478;
	Tue, 28 Feb 2012 09:14:31 -0800 (PST)
Received: from [87.2.102.53]
	(host53-102-dynamic.2-87-r.retail.telecomitalia.it. [87.2.102.53])
	by mx.google.com with ESMTPS id 20sm1783484bky.13.2012.02.28.09.14.29
	(version=SSLv3 cipher=OTHER); Tue, 28 Feb 2012 09:14:30 -0800 (PST)
Message-ID: <4F4D0B73.90802@gmail.com>
Date: Tue, 28 Feb 2012 18:14:27 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: bug#10898: test-suite output of automake-1.11.3 - it requested
	I send it to you!
References: <4F4A4A42.3050802@Picciano.org> <4F4BB502.9060107@Picciano.org>
	<4F4BDCA9.6060102@gmail.com> <4F4CDF2B.3010407@Picciano.org>
	<4F4D040D.1050006@gmail.com> <4F4D0609.6060305@redhat.com>
In-Reply-To: <4F4D0609.6060305@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
Cc: 10898@debbugs.gnu.org, Autoconf <Autoconf@gnu.org>,
	Lou Picciano <Lou@Picciano.org>, automake-patches@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, 28 Feb 2012 17:15:16 -0000

On 02/28/2012 05:51 PM, Eric Blake wrote:
> [adding autoconf]
> 
> On 02/28/2012 09:42 AM, Stefano Lattarini wrote:
> 
>>>    Ah, likely the famous ksh bug with "$@" and empty arguments:
>>>
>>>      <http://lists.gnu.org/archive/html/automake-patches/2009-12/msg00037.html>
> 
>> See automake bug#10898.
>>
>> At least the AT&T and OpenSolaris versions of the Korn shell have a
>> strange bug regarding the expression ${1+"$@"}: when exactly *one*
>> empty argument is passed to a shell function, inside that function
>> the expression ${1+"$@"} will expand to *nothing*, rather than to
>> to the single empty string, as one would expect.  This was causing
>> a spurious failure in our testsuite when a shell suffering of this
>> bug was used to run the test cases.
> 
> Yuck - this sounds like it should be documented in the autoconf manual.
>  Is it only shell functions that are affected, but global use of
> ${1+"$@"} is still safe?
> 
I can't be sure anymore -- the only affected shell I've ever encountered was
Debian's /bin/ksh (from the Debian package 'ksh' - "The real, AT&T version of
the Korn shell"), and the bugs has been fixed in it meanwhile:

 $ /bin/ksh -c 'foo () { for i in ${1+"$@"}; do echo ":$i:"; done; }; foo ""'
 ::

Sorry,
  Stefano


From MAILER-DAEMON Tue Feb 28 14:43:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S2SxL-0008AE-O8
	for mharc-autoconf@gnu.org; Tue, 28 Feb 2012 14:43:27 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45435)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chrisstankevitz@gmail.com>) id 1S2SnS-00059S-62
	for autoconf@gnu.org; Tue, 28 Feb 2012 14:33:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chrisstankevitz@gmail.com>) id 1S2SnN-00040H-Gc
	for autoconf@gnu.org; Tue, 28 Feb 2012 14:33:13 -0500
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61780)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chrisstankevitz@gmail.com>) id 1S2SnN-0003zr-7G
	for autoconf@gnu.org; Tue, 28 Feb 2012 14:33:09 -0500
Received: by bkty12 with SMTP id y12so6302470bkt.0
	for <autoconf@gnu.org>; Tue, 28 Feb 2012 11:33:06 -0800 (PST)
Received-SPF: pass (google.com: domain of chrisstankevitz@gmail.com designates
	10.204.145.70 as permitted sender) client-ip=10.204.145.70; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	chrisstankevitz@gmail.com designates 10.204.145.70 as permitted
	sender) smtp.mail=chrisstankevitz@gmail.com;
	dkim=pass header.i=chrisstankevitz@gmail.com
Received: from mr.google.com ([10.204.145.70])
	by 10.204.145.70 with SMTP id c6mr9978172bkv.41.1330457586482 (num_hops
	= 1); Tue, 28 Feb 2012 11:33:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=dHD1ruGMeS3gkkBGWY0mo//wNPtlR1Nj4hCLxilGGAM=;
	b=tcDViG5+sL3shTfVfdlPi29mTLEDFriyS6Sc7UInCiceO4iI1cVRMahPGVWEpfjFn9
	Q6nJXY8NSvVR9RBBNntcbNYCZWWTNw1/XFUHz8LvujwMDTPcuRnvg/KECdZeS7iL7Kdv
	gxvyscjbJ6dUdytD4SiHMLoYLdvTkvEpxdhf8=
MIME-Version: 1.0
Received: by 10.204.145.70 with SMTP id c6mr8067986bkv.41.1330457586374; Tue,
	28 Feb 2012 11:33:06 -0800 (PST)
Received: by 10.204.226.194 with HTTP; Tue, 28 Feb 2012 11:33:06 -0800 (PST)
Date: Tue, 28 Feb 2012 11:33:06 -0800
Message-ID: <CAPi0psvMso8vC_+Aqg8cpSRg9QY8MVP7VzLATxBxOMB29fq0sw@mail.gmail.com>
Subject: Passing flags to AC_CHECK_HEADER
From: Chris Stankevitz <chrisstankevitz@gmail.com>
To: autoconf@gnu.org
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Tue, 28 Feb 2012 14:43:26 -0500
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, 28 Feb 2012 19:33:15 -0000

Hello,

The following command assigns the variable OPENCV_CFLAGS with "-I
/path/to/opencv/include":
PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.1,, AC_MSG_ERROR(${OPENCV_PKG_ERRORS}))

Q1: How to I tell AC_CHECK_HEADER to use the include directory
specified in OPENCV_CFLAGS?

A1: CPPFLAGS="${OPENCV_CFLAGS} $CPPFLAGS"

Q2: But I thought I wasn't supposed to mess with CPPFLAGS, it was only
for the user to play with.  Plus I don't want to affect all CPPFLAGS
for the entire project.  I intend to selectively apply OPENCV_CFLAGS
where needed.

A2: That's not a question.

Thank you,

Chris


From MAILER-DAEMON Tue Feb 28 15:53:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S2U3A-0003Di-GF
	for mharc-autoconf@gnu.org; Tue, 28 Feb 2012 15:53:32 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50072)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=nbowler=3981d9b91@mail.ellipticsemi.com>)
	id 1S2U37-0003DN-Ef
	for autoconf@gnu.org; Tue, 28 Feb 2012 15:53:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <prvs=nbowler=3981d9b91@mail.ellipticsemi.com>)
	id 1S2U35-0000vu-8V
	for autoconf@gnu.org; Tue, 28 Feb 2012 15:53:28 -0500
Received: from mx.scalarmail.ca ([98.158.95.75]:54389
	helo=ironport-01.sms.scalar.ca)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=nbowler=3981d9b91@mail.ellipticsemi.com>)
	id 1S2U35-0000so-41
	for autoconf@gnu.org; Tue, 28 Feb 2012 15:53:27 -0500
Received: from unknown (HELO sms-zimbra-mta-02.sms.scalar.ca) ([192.168.32.56])
	by ironport-01.sms.scalar.ca with ESMTP; 28 Feb 2012 15:00:32 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by sms-zimbra-mta-02.sms.scalar.ca (Postfix) with ESMTP id 1A4754C06D; 
	Tue, 28 Feb 2012 15:00:32 -0500 (EST)
Received: from sms-zimbra-mta-02.sms.scalar.ca ([127.0.0.1])
	by localhost (sms-zimbra-mta-02.sms.scalar.ca [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id zF9oxfgTOjJy; Tue, 28 Feb 2012 15:00:31 -0500 (EST)
Received: from mail.ellipticsemi.com (dsl-67-204-24-19.acanac.net
	[67.204.24.19])
	by sms-zimbra-mta-02.sms.scalar.ca (Postfix) with ESMTPSA id 75DBC4C060;
	Tue, 28 Feb 2012 15:00:30 -0500 (EST)
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; Tue, 28 Feb 2012 15:00:30 -0500 (EST)
Date: Tue, 28 Feb 2012 15:00:29 -0500
From: Nick Bowler <nbowler@elliptictech.com>
To: Chris Stankevitz <chrisstankevitz@gmail.com>
Subject: Re: Passing flags to AC_CHECK_HEADER
Message-ID: <20120228200029.GA32266@elliptictech.com>
References: <CAPi0psvMso8vC_+Aqg8cpSRg9QY8MVP7VzLATxBxOMB29fq0sw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAPi0psvMso8vC_+Aqg8cpSRg9QY8MVP7VzLATxBxOMB29fq0sw@mail.gmail.com>
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: Tue, 28 Feb 2012 20:53:31 -0000

Hi Chris,

On 2012-02-28 11:33 -0800, Chris Stankevitz wrote:
> The following command assigns the variable OPENCV_CFLAGS with "-I
> /path/to/opencv/include":
> PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.1,, AC_MSG_ERROR(${OPENCV_PKG_ERRORS}))

Not directly related to your problem, but you should quote the macro
arguments above, as in:

   PKG_CHECK_MODULES([OPENCV], [opencv >= 2.3.1],, [AC_MSG_ERROR([${OPENCV_PKG_ERRORS}])])

Otherwise, the arguments are subject to macro expansion /before/ they are
substituted into the body of PKG_CHECK_MODULES.

> Q1: How to I tell AC_CHECK_HEADER to use the include directory
> specified in OPENCV_CFLAGS?
> 
> A1: CPPFLAGS="${OPENCV_CFLAGS} $CPPFLAGS"
> 
> Q2: But I thought I wasn't supposed to mess with CPPFLAGS, it was only
> for the user to play with.  Plus I don't want to affect all CPPFLAGS
> for the entire project.  I intend to selectively apply OPENCV_CFLAGS
> where needed.

That is essentially correct, you should allow the user to override
CPPFLAGS.  For tests like the above, though, you can save/restore the
CPPFLAGS (or other similar variables) temporarily.  Something like the
following (untested)

  old_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="${OPENCV_CPPFLAGS} $CPPFLAGS"
  
  # do stuff
  
  CPPFLAGS=$old_CPPFLAGS

should do the trick.

Hope that helps,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)



From MAILER-DAEMON Tue Feb 28 16:37:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S2Ujw-00062o-74
	for mharc-autoconf@gnu.org; Tue, 28 Feb 2012 16:37:44 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38602)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chrisstankevitz@gmail.com>) id 1S2Ujt-000620-6S
	for autoconf@gnu.org; Tue, 28 Feb 2012 16:37:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chrisstankevitz@gmail.com>) id 1S2UjY-0003SM-D2
	for autoconf@gnu.org; Tue, 28 Feb 2012 16:37:40 -0500
Received: from mail-bk0-f41.google.com ([209.85.214.41]:62660)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chrisstankevitz@gmail.com>) id 1S2UjY-0003Rr-43
	for autoconf@gnu.org; Tue, 28 Feb 2012 16:37:20 -0500
Received: by bkty12 with SMTP id y12so6457914bkt.0
	for <autoconf@gnu.org>; Tue, 28 Feb 2012 13:37:18 -0800 (PST)
Received-SPF: pass (google.com: domain of chrisstankevitz@gmail.com designates
	10.204.128.211 as permitted sender) client-ip=10.204.128.211; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	chrisstankevitz@gmail.com designates 10.204.128.211 as
	permitted sender) smtp.mail=chrisstankevitz@gmail.com;
	dkim=pass header.i=chrisstankevitz@gmail.com
Received: from mr.google.com ([10.204.128.211])
	by 10.204.128.211 with SMTP id l19mr10774131bks.59.1330465038009
	(num_hops = 1); Tue, 28 Feb 2012 13:37:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	bh=ARq0M5zvUcmHF6KtkEU98S08HMLCgtO8gwdyALmNiJ8=;
	b=RZAt7VxGrAcp6ItXzjUMt7U5zbQSaIiLZb5Dx/Oohqx9DertBhYb5eUp6Wzn17u+9z
	65NoIO5mY8SKS0vvG4zOuI7BD1I8MMCEmiTgBLt/QIVTcR35LRc6rJDl7F82LJ63BEDN
	oyJ5+bXIwk/OHR32ysksh8dLkw2p6w45Di8oQ=
MIME-Version: 1.0
Received: by 10.204.128.211 with SMTP id l19mr8731551bks.59.1330465037911;
	Tue, 28 Feb 2012 13:37:17 -0800 (PST)
Received: by 10.204.226.194 with HTTP; Tue, 28 Feb 2012 13:37:17 -0800 (PST)
In-Reply-To: <20120228200029.GA32266@elliptictech.com>
References: <CAPi0psvMso8vC_+Aqg8cpSRg9QY8MVP7VzLATxBxOMB29fq0sw@mail.gmail.com>
	<20120228200029.GA32266@elliptictech.com>
Date: Tue, 28 Feb 2012 13:37:17 -0800
Message-ID: <CAPi0psvCP6sSg-DofgG0yhQHAsV28L6qUd6p=_H1Kr_+nMrepg@mail.gmail.com>
Subject: Re: Passing flags to AC_CHECK_HEADER
From: Chris Stankevitz <chrisstankevitz@gmail.com>
To: Nick Bowler <nbowler@elliptictech.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 28 Feb 2012 21:37:42 -0000

On Tue, Feb 28, 2012 at 12:00 PM, Nick Bowler <nbowler@elliptictech.com> wr=
ote:
> =A0old_CPPFLAGS=3D$CPPFLAGS
> =A0CPPFLAGS=3D"${OPENCV_CPPFLAGS} $CPPFLAGS"
>
> =A0# do stuff
>
> =A0CPPFLAGS=3D$old_CPPFLAGS

Foolproof!  Thank you Nick, I will do this.

Chris


