From MAILER-DAEMON Fri Apr 01 03:04:35 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5YPL-0006lx-Gz
	for mharc-autoconf@gnu.org; Fri, 01 Apr 2011 03:04:35 -0400
Received: from [140.186.70.92] (port=33595 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5YPI-0006ll-KP
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:04:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1Q5YPH-0000yq-Fg
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:04:32 -0400
Received: from mail1.ntp.org ([149.20.68.5]:56293)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1Q5YPH-0000y2-8f
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:04:31 -0400
Received: from stenn.ntp.org ([2001:4f8:fff7:1::30])
	by mail1.ntp.org with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.72 (FreeBSD)) (envelope-from <stenn@stenn.ntp.org>)
	id 1Q5YOv-000KPz-Ji; Fri, 01 Apr 2011 07:04:20 +0000
Received: from localhost ([127.0.0.1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.74 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1Q5YOv-000OEo-HP; Fri, 01 Apr 2011 00:04:09 -0700
To: Harlan Stenn <stenn@ntp.org>
In-reply-to: <201103291644.p2TGiW6K081297@stenn.ntp.org> 
References: <4D90DC92.9040001@krellinst.org> <20110329063550.GF27293@gmx.de>
	<AANLkTikzPQADArLwv-4HxdyCTZiE8g4TeCMB+=nKS60M@mail.gmail.com>
	<201103291839.08077.stefano.lattarini@gmail.com>
	<201103291644.p2TGiW6K081297@stenn.ntp.org>
Comments: In-reply-to Harlan Stenn <stenn@ntp.org>
	message dated "Tue, 29 Mar 2011 09:44:32 -0700."
X-Mailer: MH-E 7.4.2; nmh 1.2; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Fri, 01 Apr 2011 00:04:09 -0700
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1Q5YOv-000OEo-HP@stenn.ntp.org>
X-SA-Exim-Connect-IP: 2001:4f8:fff7:1::30
X-SA-Exim-Rcpt-To: stenn@ntp.org, jeg@krellinst.org, Ralf.Wildenhues@gmx.de,
	autoconf@gnu.org, stefano.lattarini@gmail.com,
	nightstrike@gmail.com
X-SA-Exim-Mail-From: stenn@stenn.ntp.org
X-SA-Exim-Version: 4.2
X-SA-Exim-Scanned: Yes (on mail1.ntp.org)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.5
Cc: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>,
	Jim Galarowicz <jeg@krellinst.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	autoconf@gnu.org, NightStrike <nightstrike@gmail.com>
Subject: Re: Multiple subdirectories with non-similar configure needs 
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 07:04:33 -0000

> Stefano wrote:
> >   AC_CONFIG_SUBDIRS([foo], [--with-zardoz])

And I now have a case where I think I want to pass in a CPPFLAGS entry
to a subpackage, based on "stuff" that the "parent" configure knows.

So I'm thinking about:

 AC_CONFIG_SUBDIRS([foo], [--with-zardoz CPPFLAGS=-Isomething])

Not sure if this is a great idea or not, but the only other alternative
I can think of is to modify the configure.ac in the subpackage, and I
would rather not do that as it creates "extra work" when I go to upgrade
the subpackage.

H


From MAILER-DAEMON Fri Apr 01 03:13:40 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5YY8-0004o1-BJ
	for mharc-autoconf@gnu.org; Fri, 01 Apr 2011 03:13:40 -0400
Received: from [140.186.70.92] (port=44737 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5YY6-0004nC-Pj
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:13:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q5YY5-0002lw-QS
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:13:38 -0400
Received: from mailout-de.gmx.net ([213.165.64.23]:43716)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q5YY5-0002lr-CJ
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:13:37 -0400
Received: (qmail invoked by alias); 01 Apr 2011 07:13:35 -0000
Received: from xdsl-78-35-59-247.netcologne.de (EHLO localhost.localdomain)
	[78.35.59.247]
	by mail.gmx.net (mp037) with SMTP; 01 Apr 2011 09:13:35 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX19BajdSyvhB5nTT7Cz2wpHXENtk7QwdcvKxtx655X
	E6B6cJBN1uApBL
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@gmx.de>)
	id 1Q5YY1-0004Zd-MJ; Fri, 01 Apr 2011 09:13:33 +0200
Date: Fri, 1 Apr 2011 09:13:33 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Harlan Stenn <stenn@ntp.org>
Message-ID: <20110401071333.GG14842@gmx.de>
Mail-Followup-To: Harlan Stenn <stenn@ntp.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	Jim Galarowicz <jeg@krellinst.org>, autoconf@gnu.org,
	NightStrike <nightstrike@gmail.com>
References: <4D90DC92.9040001@krellinst.org> <20110329063550.GF27293@gmx.de>
	<AANLkTikzPQADArLwv-4HxdyCTZiE8g4TeCMB+=nKS60M@mail.gmail.com>
	<201103291839.08077.stefano.lattarini@gmail.com>
	<201103291644.p2TGiW6K081297@stenn.ntp.org>
	<E1Q5YOv-000OEo-HP@stenn.ntp.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E1Q5YOv-000OEo-HP@stenn.ntp.org>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 213.165.64.23
Cc: Jim Galarowicz <jeg@krellinst.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	autoconf@gnu.org, NightStrike <nightstrike@gmail.com>
Subject: Re: Multiple subdirectories with non-similar configure needs
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 07:13:39 -0000

* Harlan Stenn wrote on Fri, Apr 01, 2011 at 09:04:09AM CEST:
> 
> Not sure if this is a great idea or not, but the only other alternative
> I can think of is to modify the configure.ac in the subpackage, and I
> would rather not do that as it creates "extra work" when I go to upgrade
> the subpackage.

But you are aware of the configure.gnu "trick"?  See info Autoconf
Subdirectories for the semantics.

The trick is: you adjust the flags in subpkg/configure.gnu, then call
subpkg/configure with them.  The subpkg/configure.gnu file might
actually belong to the toplevel package.  A hack, but fairly easy.

I like the idea of a more flexible AC_CONFIG_SUBDIRS replacement, but
the suggested API does not really look appropriate yet, with all the
finer details of precious variables, (non-)shared config.cache handling
and so on still needing sane and precise semantics.

Cheers,
Ralf


From MAILER-DAEMON Fri Apr 01 03:41:53 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5YzR-0003KM-Ev
	for mharc-autoconf@gnu.org; Fri, 01 Apr 2011 03:41:53 -0400
Received: from [140.186.70.92] (port=53426 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5YzP-0003KE-4h
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:41:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1Q5YzN-0000F4-5U
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:41:50 -0400
Received: from mail1.ntp.org ([149.20.68.5]:62753)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1Q5YzN-0000Ex-06
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:41:49 -0400
Received: from stenn.ntp.org ([2001:4f8:fff7:1::30])
	by mail1.ntp.org with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.72 (FreeBSD)) (envelope-from <stenn@stenn.ntp.org>)
	id 1Q5Yz7-0001SY-H5; Fri, 01 Apr 2011 07:41:46 +0000
Received: from localhost ([127.0.0.1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.74 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1Q5Yz7-000OHo-Em; Fri, 01 Apr 2011 00:41:33 -0700
To: Harlan Stenn <stenn@ntp.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	Jim Galarowicz <jeg@krellinst.org>, autoconf@gnu.org,
	NightStrike <nightstrike@gmail.com>
In-reply-to: <20110401071333.GG14842@gmx.de> 
References: <4D90DC92.9040001@krellinst.org> <20110329063550.GF27293@gmx.de>
	<AANLkTikzPQADArLwv-4HxdyCTZiE8g4TeCMB+=nKS60M@mail.gmail.com>
	<201103291839.08077.stefano.lattarini@gmail.com>
	<201103291644.p2TGiW6K081297@stenn.ntp.org>
	<E1Q5YOv-000OEo-HP@stenn.ntp.org> <20110401071333.GG14842@gmx.de>
Comments: In-reply-to Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
	message dated "Fri, 01 Apr 2011 09:13:33 +0200."
X-Mailer: MH-E 7.4.2; nmh 1.2; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Fri, 01 Apr 2011 00:41:33 -0700
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1Q5Yz7-000OHo-Em@stenn.ntp.org>
X-SA-Exim-Connect-IP: 2001:4f8:fff7:1::30
X-SA-Exim-Rcpt-To: stenn@ntp.org, jeg@krellinst.org, autoconf@gnu.org,
	stefano.lattarini@gmail.com, nightstrike@gmail.com
X-SA-Exim-Mail-From: stenn@stenn.ntp.org
X-SA-Exim-Version: 4.2
X-SA-Exim-Scanned: Yes (on mail1.ntp.org)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.5
Cc: 
Subject: Re: Multiple subdirectories with non-similar configure needs 
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 07:41:52 -0000

Ralf wrote:
> * Harlan Stenn wrote on Fri, Apr 01, 2011 at 09:04:09AM CEST:
> > 
> > Not sure if this is a great idea or not, but the only other alternative
> > I can think of is to modify the configure.ac in the subpackage, and I
> > would rather not do that as it creates "extra work" when I go to upgrade
> > the subpackage.
> 
> But you are aware of the configure.gnu "trick"?  See info Autoconf
> Subdirectories for the semantics.

I'll check that out, thanks.

> The trick is: you adjust the flags in subpkg/configure.gnu, then call
> subpkg/configure with them.  The subpkg/configure.gnu file might
> actually belong to the toplevel package.  A hack, but fairly easy.

In the srcdir?  How would that work for distcheck, which, as I recall,
uses a read-only srcdir to simulate building from read-only media.

But I'll read up on it anyway, to see if configure.gnu can be put in the
build-dir before running srcdir/configure .

> I like the idea of a more flexible AC_CONFIG_SUBDIRS replacement, but
> the suggested API does not really look appropriate yet, with all the
> finer details of precious variables, (non-)shared config.cache handling
> and so on still needing sane and precise semantics.

Understood and agreed - thanks!

H


From MAILER-DAEMON Fri Apr 01 03:47:11 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5Z4Z-0004jh-PA
	for mharc-autoconf@gnu.org; Fri, 01 Apr 2011 03:47:11 -0400
Received: from [140.186.70.92] (port=54947 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5Z4X-0004iM-F2
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:47:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q5Z4V-0001kQ-51
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:47:08 -0400
Received: from mailout-de.gmx.net ([213.165.64.23]:33705)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q5Z4U-0001k7-Lj
	for autoconf@gnu.org; Fri, 01 Apr 2011 03:47:07 -0400
Received: (qmail invoked by alias); 01 Apr 2011 07:47:04 -0000
Received: from xdsl-78-35-59-247.netcologne.de (EHLO localhost.localdomain)
	[78.35.59.247]
	by mail.gmx.net (mp005) with SMTP; 01 Apr 2011 09:47:04 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1//nA8mN+H/QKLx3B5st1mSNTJMpYAUoDXkfeg+GJ
	lIfoIMuzvRY1AJ
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@gmx.de>)
	id 1Q5Z4Q-0005L9-7s; Fri, 01 Apr 2011 09:47:02 +0200
Date: Fri, 1 Apr 2011 09:47:02 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Harlan Stenn <stenn@ntp.org>
Message-ID: <20110401074702.GI14842@gmx.de>
Mail-Followup-To: Harlan Stenn <stenn@ntp.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	Jim Galarowicz <jeg@krellinst.org>, autoconf@gnu.org,
	NightStrike <nightstrike@gmail.com>
References: <4D90DC92.9040001@krellinst.org> <20110329063550.GF27293@gmx.de>
	<AANLkTikzPQADArLwv-4HxdyCTZiE8g4TeCMB+=nKS60M@mail.gmail.com>
	<201103291839.08077.stefano.lattarini@gmail.com>
	<201103291644.p2TGiW6K081297@stenn.ntp.org>
	<E1Q5YOv-000OEo-HP@stenn.ntp.org> <20110401071333.GG14842@gmx.de>
	<E1Q5Yz7-000OHo-Em@stenn.ntp.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E1Q5Yz7-000OHo-Em@stenn.ntp.org>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 213.165.64.23
Cc: Jim Galarowicz <jeg@krellinst.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	autoconf@gnu.org, NightStrike <nightstrike@gmail.com>
Subject: Re: Multiple subdirectories with non-similar configure needs
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 07:47:10 -0000

* Harlan Stenn wrote on Fri, Apr 01, 2011 at 09:41:33AM CEST:
> Ralf wrote:
> > The trick is: you adjust the flags in subpkg/configure.gnu, then call
> > subpkg/configure with them.  The subpkg/configure.gnu file might
> > actually belong to the toplevel package.  A hack, but fairly easy.
> 
> In the srcdir?  How would that work for distcheck, which, as I recall,
> uses a read-only srcdir to simulate building from read-only media.

Well, put it in the distribution:
  EXTRA_DIST = subpkg/configure.gnu

> But I'll read up on it anyway, to see if configure.gnu can be put in the
> build-dir before running srcdir/configure .

Yep.

Cheers,
Ralf


From MAILER-DAEMON Fri Apr 01 04:06:29 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5ZNF-0007s2-Sl
	for mharc-autoconf@gnu.org; Fri, 01 Apr 2011 04:06:29 -0400
Received: from [140.186.70.92] (port=41800 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5ZNE-0007rw-EK
	for autoconf@gnu.org; Fri, 01 Apr 2011 04:06:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1Q5ZND-0005lx-Br
	for autoconf@gnu.org; Fri, 01 Apr 2011 04:06:28 -0400
Received: from mail1.ntp.org ([149.20.68.5]:62613)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1Q5ZND-0005lm-6C
	for autoconf@gnu.org; Fri, 01 Apr 2011 04:06:27 -0400
Received: from stenn.ntp.org ([2001:4f8:fff7:1::30])
	by mail1.ntp.org with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.72 (FreeBSD)) (envelope-from <stenn@stenn.ntp.org>)
	id 1Q5ZN0-0001zC-Jd; Fri, 01 Apr 2011 08:06:25 +0000
Received: from localhost ([127.0.0.1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.74 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1Q5ZN0-000OJp-HE; Fri, 01 Apr 2011 01:06:14 -0700
To: Harlan Stenn <stenn@ntp.org>,
	Stefano Lattarini <stefano.lattarini@gmail.com>,
	Jim Galarowicz <jeg@krellinst.org>, autoconf@gnu.org,
	NightStrike <nightstrike@gmail.com>
In-reply-to: <20110401074702.GI14842@gmx.de> 
References: <4D90DC92.9040001@krellinst.org> <20110329063550.GF27293@gmx.de>
	<AANLkTikzPQADArLwv-4HxdyCTZiE8g4TeCMB+=nKS60M@mail.gmail.com>
	<201103291839.08077.stefano.lattarini@gmail.com>
	<201103291644.p2TGiW6K081297@stenn.ntp.org>
	<E1Q5YOv-000OEo-HP@stenn.ntp.org> <20110401071333.GG14842@gmx.de>
	<E1Q5Yz7-000OHo-Em@stenn.ntp.org> <20110401074702.GI14842@gmx.de>
Comments: In-reply-to Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
	message dated "Fri, 01 Apr 2011 09:47:02 +0200."
X-Mailer: MH-E 7.4.2; nmh 1.2; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Fri, 01 Apr 2011 01:06:14 -0700
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1Q5ZN0-000OJp-HE@stenn.ntp.org>
X-SA-Exim-Connect-IP: 2001:4f8:fff7:1::30
X-SA-Exim-Rcpt-To: stenn@ntp.org, jeg@krellinst.org, autoconf@gnu.org,
	stefano.lattarini@gmail.com, nightstrike@gmail.com
X-SA-Exim-Mail-From: stenn@stenn.ntp.org
X-SA-Exim-Version: 4.2
X-SA-Exim-Scanned: Yes (on mail1.ntp.org)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.5
Cc: 
Subject: Re: Multiple subdirectories with non-similar configure needs 
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 08:06:29 -0000

Ralf wrote:
> * Harlan Stenn wrote on Fri, Apr 01, 2011 at 09:41:33AM CEST:
> > Ralf wrote:
> > > The trick is: you adjust the flags in subpkg/configure.gnu, then call
> > > subpkg/configure with them.  The subpkg/configure.gnu file might
> > > actually belong to the toplevel package.  A hack, but fairly easy.
> > 
> > In the srcdir?  How would that work for distcheck, which, as I recall,
> > uses a read-only srcdir to simulate building from read-only media.
> 
> Well, put it in the distribution:
>   EXTRA_DIST = subpkg/configure.gnu

I'll think about that.

The use-case I have is I'm bootstrapping a package that has a bunch of
sub-packages.  The bootstrap process will "temporarily" install things
in a bootstrap directory, so I need to be able to pass in the -I
(definitely) and -L (maybe, not that far along yet) args for the "rest"
of the bootstrap tools.

Since that "parent" configure uses --prefix= to set this bootstrap
installation directory, I might be able to have configure.gnu say
"configure ... CPPFLAGS='${prefix}/include'" (more or less) and then I
would not need to worry about customizing the location of the include
files on each "run".

> > But I'll read up on it anyway, to see if configure.gnu can be put in the
> > build-dir before running srcdir/configure .
> 
> Yep.

This is a work-in-process, and I am whacking a path thru the jungle...
Sometimes I even have to backtrack and try a different route.

But it's kinda fun.

H


From MAILER-DAEMON Fri Apr 01 05:10:57 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5aNb-0002WP-1W
	for mharc-autoconf@gnu.org; Fri, 01 Apr 2011 05:10:56 -0400
Received: from [140.186.70.92] (port=41566 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5aNX-0002Tv-Dz
	for Autoconf@gnu.org; Fri, 01 Apr 2011 05:10:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q5aNW-0002Rt-LO
	for Autoconf@gnu.org; Fri, 01 Apr 2011 05:10:51 -0400
Received: from mailout-de.gmx.net ([213.165.64.22]:53344)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q5aNW-0002RR-Ap
	for Autoconf@gnu.org; Fri, 01 Apr 2011 05:10:50 -0400
Received: (qmail invoked by alias); 01 Apr 2011 09:10:47 -0000
Received: from xdsl-78-35-59-247.netcologne.de (EHLO localhost.localdomain)
	[78.35.59.247]
	by mail.gmx.net (mp020) with SMTP; 01 Apr 2011 11:10:47 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX18ZbNFFooQZZHDleDVQ1V8ko1uOABhE45eDROJPYC
	6DaGQe4mxH8V7X
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@gmx.de>)
	id 1Q5aNS-0005P4-8y; Fri, 01 Apr 2011 11:10:46 +0200
Date: Fri, 1 Apr 2011 11:10:46 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: David Bruce <davidstuartbruce@gmail.com>, bug-gettext@gnu.org
Message-ID: <20110401091046.GA20754@gmx.de>
Mail-Followup-To: David Bruce <davidstuartbruce@gmail.com>,
	bug-gettext@gnu.org, Autoconf <Autoconf@gnu.org>
References: <AANLkTimynZDNa02F+wr-EZGnXfXTXAJSS-rGPiPP9n1p@mail.gmail.com>
	<AANLkTi=uYa6GQHnGgz7Hy80nDGRYLkAVcUugH3v9AcOg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTi=uYa6GQHnGgz7Hy80nDGRYLkAVcUugH3v9AcOg@mail.gmail.com>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
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 <Autoconf@gnu.org>
Subject: Re: ax_prefix_config_h.m4 causes files to be left after "make
 distclean"
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 09:10:52 -0000

[ adding bug-gettext ]

* David Bruce wrote on Thu, Mar 24, 2011 at 12:40:58PM CET:
> On Wed, Jan 12, 2011 at 9:31 PM, David Bruce wrote:
> > We have reorganized our package (tuxmath) into a smaller package for
> > the game itself, plus a separate library package (t4k_common).  Both
> > packages use autotools, including autoheader.  As part of t4k_common,
> > we provide a couple of replacement functions (alphasort() and
> > scandir()) for platforms lacking these functions.  Thus, our
> > t4k_common.h header needs to have an autoheader include so it can
> > conditionally include the prototypes for these functions.
> >
> > Since just putting #include "config.h" at the top of our library
> > header would cause a name collision with tuxmath's config.h, I have
> > used the ax_prefix_config_h.m4 macro to rename t4k_common's config.h
> > to "t4k_common-config.h", and adapted all the *.c files accordingly.
> 
> I've discovered a more serious issue with my use of
> ax_prefix_config_h.m4 - it appears to be interfering with gettext()
> calls from within the library functions.  Looking at the gettext
> manual for using gettext within a library, it says "If it uses the
> translation domain and POT file of the main program, then the previous
> sections apply without changes.", which I believe is the case here -
> the library source files don't have their own translatable strings,
> but they do have gettext() calls to translate strings that are covered
> by tuxmath's *.po files.
> 
> I'm at a bit of a loss as to how to get this fixed.  As a test, I've
> tried hard-coding the gettext setup functions within the library to
> use the same values as tuxmath (see below), but I still don't get
> output of translated strings.
> 
> {
>     const char *s1, *s2, *s3, *s4;
>     s1 = setlocale(LC_ALL, NULL);
>     s2 = bindtextdomain("tuxmath", "/usr/local/share/locale");
>     s3 = bind_textdomain_codeset("tuxmath", "UTF-8");
>     s4 = textdomain("tuxmath");
>     printf("In InitT4KCommon():\n");
>     printf("setlocale(LC_ALL, \"\") returned: %s\n", s1);
>     printf("bindtextdomain(\"tuxmath\", \"/usr/local/share/locale\")
> returned: %s\n", s2);
>     printf("bind_textdomain_codeset(\"tuxmath\", \"UTF-8\") returned:
> %s\n", s3);
>     printf("textdomain(\"tuxmath\") returned: %s\n", s4);
>     printf("gettext(\"Help\"): %s\n\n", gettext("Help"));
>     printf("_(\"Help\"): %s\n\n", _("Help"));
>   }
> 
> I suspect that something about the renaming done by
> ax_prefix_config_h.m4 is preventing gettext from locating the message
> catelogs properly.  Also, I realize this is getting more into gettext
> than autoconf territory, but it seems there is a lot of overlap in
> expertise within the autotools family.  Should I take this to the
> bug-gnu list that handles gettext issues?

Let's ask on the (fairly new) bug-gettext list.  Do you have a small
reproducer setup?  I guess that could help to pinpoint the issue
quickly.

Thanks,
Ralf


From MAILER-DAEMON Fri Apr 01 10:56:46 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5fmI-0005qo-Lc
	for mharc-autoconf@gnu.org; Fri, 01 Apr 2011 10:56:46 -0400
Received: from [140.186.70.92] (port=33735 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5fmE-0005oO-AW
	for autoconf@gnu.org; Fri, 01 Apr 2011 10:56:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <c.roessel@fz-juelich.de>) id 1Q5fm8-0004E7-PA
	for autoconf@gnu.org; Fri, 01 Apr 2011 10:56:42 -0400
Received: from mailgw-k01.its.kfa-juelich.de ([134.94.4.24]:54388)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <c.roessel@fz-juelich.de>) id 1Q5fm8-0004Dk-9c
	for autoconf@gnu.org; Fri, 01 Apr 2011 10:56:36 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailgw-k01.its.kfa-juelich.de (Postfix) with ESMTP id 6D49186401B
	for <autoconf@gnu.org>; Fri,  1 Apr 2011 16:56:32 +0200 (CEST)
X-Virus-Scanned: amavisd-new at fz-juelich.de
Received: from mailgw-k01.its.kfa-juelich.de ([127.0.0.1])
	by localhost (mailgw-k01.its.kfa-juelich.de [127.0.0.1]) (amavisd-new,
	port 10024) with ESMTP id C05pg8PmdD9F for <autoconf@gnu.org>;
	Fri,  1 Apr 2011 16:56:29 +0200 (CEST)
Received: from hub-e01.ad.fz-juelich.de (hub-e01.its.kfa-juelich.de
	[134.94.4.34]) by mailgw-k01.its.kfa-juelich.de (Postfix) with ESMTP
	for <autoconf@gnu.org>; Fri,  1 Apr 2011 16:56:29 +0200 (CEST)
Received: from [134.94.170.189] (134.94.170.189) by hub-e01.ad.fz-juelich.de
	(134.94.4.38) with Microsoft SMTP Server (TLS) id 8.1.393.1;
	Fri, 1 Apr 2011 16:56:29 +0200
Message-ID: <4D95E79C.5020804@fz-juelich.de>
Date: Fri, 1 Apr 2011 16:56:28 +0200
From: =?ISO-8859-1?Q?Christian_R=F6ssel?= <c.roessel@fz-juelich.de>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8
MIME-Version: 1.0
To: <autoconf@gnu.org>
References: <4D90DC92.9040001@krellinst.org> <20110329063550.GF27293@gmx.de>
In-Reply-To: <20110329063550.GF27293@gmx.de>
Content-Type: multipart/mixed; boundary="------------080304060209000207050009"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 134.94.4.24
Subject: Re: Multiple subdirectories with non-similar configure needs
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 14:56:44 -0000

--------------080304060209000207050009
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Jim, hi Ralf, hi all,

On 03/29/2011 08:35 AM, Ralf Wildenhues wrote:
> Hello Jim,
>
> * Jim Galarowicz wrote on Mon, Mar 28, 2011 at 09:08:02PM CEST:
>> I was wondering if anyone can point me to any information on how to
>> configure from a top-level directory multiple sub-directories with
>> different configure requirements.
>
> Well, you can just write code yourself that calls the sub configure
> scripts with the arguments you intend for it.  Basically your own
> version of AC_CONFIG_SUBDIRS, if you like.

I wrote a macro (AC_CONFIG_SUBDIR_CUSTOM, patch applied) to pass
different arguments to different sub-configures. Like AC_CONFIG_SUBDIRS
it preserves
 * --cache-file
 * --silent
and passes always
 * --srcdir
 * --prefix
 * --disable-option-checking

AC_CONFIG_SUBDIR_CUSTOM takes at least two arguments, the directory
where the sub-configure resides and the additional arguments to be
passed to this specific sub-configure. An optional third parameter
controls if the sub-configure is recognized by a configure --help=3Drecursi=
ve.


> GCC does this in its own tree (except the code is partly in the
> makefile, not only the toplevel configure script).
>
> For simple things, it often suffices to adjust $ac_configure_args during
> configure (beware of the eval quoting though!).
>
> However, you haven't written what kind of adjustments you need at all,
> so it's not clear how to help more.
>
>> My subdirectories are: libcbtf, libcbtf-xml, libcbtf-mrnet.  Each
>> subdirectory has different package requirements and has been set up
>> to use autoconf, automake, libtool, m4, etc..

Jim, you would use it like this in your toplevel configure.ac:

AC_CONFIG_SUBDIR_CUSTOM([libcbtf], [$arguments_to_libcbtf])
AC_CONFIG_SUBDIR_CUSTOM([libcbtf-xml], [$arguments_to_libcbtf-xml])
AC_CONFIG_SUBDIR_CUSTOM([libcbtf-mrnet], [$arguments_to_libcbtf-mrnet])

Cheers,
Christian

---------------------------------------------------------------------------=
---------------------
---------------------------------------------------------------------------=
---------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
---------------------------------------------------------------------------=
---------------------
---------------------------------------------------------------------------=
---------------------

Besuchen Sie uns auf unserem neuen Webauftritt unter www.fz-juelich.de

--------------080304060209000207050009
Content-Type: text/x-patch; name="AC_CONFIG_SUBDIR_CUSTOM.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="AC_CONFIG_SUBDIR_CUSTOM.patch"

diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 46a0341..d028ede 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -191,7 +191,7 @@ m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
 
 # _AC_CONFIG_UNIQUE(MODE, DEST)
 # -----------------------------
-# MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'.
+# MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', `SUBDIRS' or CONFIG_SUBDIR_CUSTOM.
 #
 # Verify that there is no double definition of an output file.
 #
@@ -1097,7 +1097,7 @@ m4_define([AC_OUTPUT_COMMANDS_POST])
 AC_DEFUN([AC_CONFIG_SUBDIRS],
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])]dnl
 [AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])]dnl
-[m4_map_args_w([$1], [_AC_CONFIG_UNIQUE([SUBDIRS],
+[m4_map_args_w([$1], [_AC_CONFIG_UNIQUE([SUBDIRS or CONFIG_SUBDIR_CUSTOM],
   _AC_CONFIG_COMPUTE_DEST(], [))])]dnl
 [m4_append([_AC_LIST_SUBDIRS], [$1], [
 ])]dnl
@@ -1106,6 +1106,41 @@ AC_DEFUN([AC_CONFIG_SUBDIRS],
 [AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])])
 
 
+# AC_CONFIG_SUBDIR_CUSTOM(DIR, ARGUMENTS [, DISABLE_HELP_RECURSIVE])
+# ------------------------------------------------------------------
+# Build a list custom_subdirs of tuples (DIR, ARGUMENTS) where DIR is
+# unique in _AC_LIST_CUSTOM_SUBDIRS and _AC_LIST_SUBDIRS. This list is used in
+# _AC_OUTPUT_SUBDIRS to invoke nested configures in directory DIR with
+# arguments ARGUMENTS. The arguments are modified as in the AC_CONFIG_SUBDIRS
+# case, see _AC_SUB_CONFIGURE_ARGS. If the third argument
+# DISABLE_HELP_RECURSIVE is given, configure --help=recursive will omit DIR.
+AC_DEFUN([AC_CONFIG_SUBDIR_CUSTOM],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])]dnl
+[AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])]dnl
+[m4_foreach_w([_AC_Sub], [$1],
+	      [_AC_CONFIG_UNIQUE([SUBDIRS or CONFIG_SUBDIR_CUSTOM],
+                                 m4_bpatsubst(m4_defn([_AC_Sub]), [:.*]))])]dnl
+
+# build a list of (directory,arguments) tuples that will be processed in _AC_OUTPUT_SUBDIRS
+[if test -z "$custom_subdirs"; then
+  custom_subdirs="custom_sub_configure_dir=\"m4_normalize([$1])\";custom_sub_configure_args=\"m4_normalize([$2])\""
+else
+  custom_subdirs="$custom_subdirs|custom_sub_configure_dir=\"m4_normalize([$1])\";custom_sub_configure_args=\"m4_normalize([$2])\""
+fi]
+
+# per default, enable --help=recursive in directory $1.
+[m4_ifval([$3], 
+          [], 
+          [m4_append([_AC_LIST_SUBDIRS], [$1], [
+])dnl
+])]dnl
+[AS_LITERAL_IF([$1], [],
+	       [AC_DIAGNOSE([syntax], [$0: you should use literals])])]dnl
+[AC_SUBST([subdirs_custom], ["$subdirs_custom m4_normalize([$1])"])]dnl
+)
+# AC_CONFIG_SUBDIR_CUSTOM
+
+
 # _AC_OUTPUT_SUBDIRS
 # ------------------
 # This is a subroutine of AC_OUTPUT, but it does not go into
@@ -1116,12 +1151,50 @@ m4_define([_AC_OUTPUT_SUBDIRS],
 # CONFIG_SUBDIRS section.
 #
 if test "$no_recursion" != yes; then
+  ac_popdir=`pwd`
+
+  # call configures in list $custom_subdirs with directory-specific arguments.
+  OIFS=$IFS
+  IFS='|'
+  list=$custom_subdirs
+  for dir_and_args in $list; do
+    IFS=$OIFS
+    eval $dir_and_args
+    if test "x$custom_sub_configure_dir" = x; then continue; fi
+    ac_custom_sub_configure_args=
+    _AC_SUB_CONFIGURE_ARGS([$custom_sub_configure_args], 
+                           [ac_custom_sub_configure_args])
+    _AC_SUB_CONFIGURE([$custom_sub_configure_dir], 
+                      [$ac_custom_sub_configure_args])
+    cd "$ac_popdir"
+    IFS='|'
+  done
+  IFS=$OIFS  
+
+  # call configures in $subdirs with fixed arguments.
+  ac_sub_configure_args=
+  _AC_SUB_CONFIGURE_ARGS([$ac_configure_args], 
+                         [ac_sub_configure_args])
+  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+     echo "ac_dir(inside): $ac_dir"
+    _AC_SUB_CONFIGURE([$ac_dir], 
+                      [$ac_sub_configure_args])
+    cd "$ac_popdir"
+  done
+fi
+])# _AC_OUTPUT_SUBDIRS
 
+
+# _AC_SUB_CONFIGURE_ARGS(ARGUMENTS_IN, ARGUMENTS_OUT)
+# ---------------------------------------------------
+# Create ARGUMENTS_OUT from ARGUMENTS_IN for use in nested configure calls.
+m4_define([_AC_SUB_CONFIGURE_ARGS],
+[
   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
   # so they do not pile up.
   ac_sub_configure_args=
   ac_prev=
-  eval "set x $ac_configure_args"
+  eval "set x $1"
   shift
   for ac_arg
   do
@@ -1153,7 +1226,7 @@ if test "$no_recursion" != yes; then
       case $ac_arg in
       *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
       esac
-      AS_VAR_APPEND([ac_sub_configure_args], [" '$ac_arg'"]) ;;
+      AS_VAR_APPEND([$2], [" '$ac_arg'"]) ;;
     esac
   done
 
@@ -1163,66 +1236,68 @@ if test "$no_recursion" != yes; then
   case $ac_arg in
   *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
   esac
-  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+  $2="'$ac_arg' $$2"
 
   # Pass --silent
   if test "$silent" = yes; then
-    ac_sub_configure_args="--silent $ac_sub_configure_args"
+    $2="--silent $$2"
   fi
 
   # Always prepend --disable-option-checking to silence warnings, since
   # different subdirs can have different --enable and --with options.
-  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+  $2="--disable-option-checking $$2"
+])# _AC_SUB_CONFIGURE_ARGS
 
-  ac_popdir=`pwd`
-  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
 
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    test -d "$srcdir/$ac_dir" || continue
-
-    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
-    _AS_ECHO_LOG([$ac_msg])
-    _AS_ECHO([$ac_msg])
-    AS_MKDIR_P(["$ac_dir"])
-    _AC_SRCDIRS(["$ac_dir"])
-
-    cd "$ac_dir"
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      ac_sub_configure=$ac_srcdir/configure.gnu
-    elif test -f "$ac_srcdir/configure"; then
-      ac_sub_configure=$ac_srcdir/configure
-    elif test -f "$ac_srcdir/configure.in"; then
-      # This should be Cygnus configure.
-      ac_sub_configure=$ac_aux_dir/configure
-    else
-      AC_MSG_WARN([no configuration information is in $ac_dir])
-      ac_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$ac_sub_configure"; then
-      # Make the cache file name correct relative to the subdirectory.
-      case $cache_file in
-      [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
-      *) # Relative name.
-	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
-      esac
-
-      AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
-      # The eval makes quoting arguments work.
-      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
-	AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
-    fi
+# _AC_SUB_CONFIGURE(DIR, ARGUMENTS)
+# ---------------------------------
+# Call nested configure in DIR with arguments ARGUMENTS.
+m4_define([_AC_SUB_CONFIGURE],
+[
+  sub_configure_dir=$1
+  sub_configure_args=$2
+
+  # Do not complain, so a configure script can configure whichever
+  # parts of a large source tree are present.
+  test -d "$srcdir/$sub_configure_dir" || continue
+
+  ac_msg="=== configuring in $sub_configure_dir (`pwd`/$sub_configure_dir)"
+  _AS_ECHO_LOG([$ac_msg])
+  _AS_ECHO([$ac_msg])
+  AS_MKDIR_P(["$sub_configure_dir"])
+  _AC_SRCDIRS(["$sub_configure_dir"])
+
+  cd "$sub_configure_dir"
+
+  # Check for guested configure; otherwise get Cygnus style configure.
+  if test -f "$ac_srcdir/configure.gnu"; then
+    ac_sub_configure=$ac_srcdir/configure.gnu
+  elif test -f "$ac_srcdir/configure"; then
+    ac_sub_configure=$ac_srcdir/configure
+  elif test -f "$ac_srcdir/configure.in"; then
+    # This should be Cygnus configure.
+    ac_sub_configure=$ac_aux_dir/configure
+  else
+    AC_MSG_WARN([no configuration information is in $sub_configure_dir])
+    ac_sub_configure=
+  fi
 
-    cd "$ac_popdir"
-  done
-fi
-])# _AC_OUTPUT_SUBDIRS
+  # The recursion is here.
+  if test -n "$ac_sub_configure"; then
+    # Make the cache file name correct relative to the subdirectory.
+    case $cache_file in
+    [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
+    *) # Relative name.
+      ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+    esac
 
+    AC_MSG_NOTICE([running $SHELL $ac_sub_configure $sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
+    # The eval makes quoting arguments work.
+    eval "\$SHELL \"\$ac_sub_configure\" $sub_configure_args \
+	 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+      AC_MSG_ERROR([$ac_sub_configure failed for $sub_configure_dir])
+  fi
+])# _AC_SUB_CONFIGURE
 
 
 
@@ -1304,7 +1379,10 @@ if test "$no_create" != yes; then
   $ac_cs_success || AS_EXIT([1])
 fi
 dnl config.status should not do recursion.
-AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
+AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], 
+                  [_AC_OUTPUT_SUBDIRS()],
+                  [AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIR_CUSTOM],
+                                     [_AC_OUTPUT_SUBDIRS()])])dnl
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   AC_MSG_WARN([unrecognized options: $ac_unrecognized_opts])
 fi

--------------080304060209000207050009--


From MAILER-DAEMON Fri Apr 01 17:10:48 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5lcG-0006Bl-CS
	for mharc-autoconf@gnu.org; Fri, 01 Apr 2011 17:10:48 -0400
Received: from [140.186.70.92] (port=48386 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5lcD-00061V-2S
	for autoconf@gnu.org; Fri, 01 Apr 2011 17:10:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1Q5lcC-0007GC-2k
	for autoconf@gnu.org; Fri, 01 Apr 2011 17:10:44 -0400
Received: from fencepost.gnu.org ([140.186.70.10]:44169)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1Q5lcB-0007G8-W7
	for autoconf@gnu.org; Fri, 01 Apr 2011 17:10:44 -0400
Received: from ams by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <ams@gnu.org>)
	id 1Q5lcB-0005FD-UZ; Fri, 01 Apr 2011 17:10:43 -0400
Date: Fri, 01 Apr 2011 17:10:43 -0400
Message-Id: <E1Q5lcB-0005FD-UZ@fencepost.gnu.org>
From: ams@gnu.org (Alfred M. Szmidt)
To: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
In-reply-to: <20110331053533.GC8569@gmx.de> (message from Ralf Wildenhues on
	Thu, 31 Mar 2011 07:35:34 +0200)
References: <E1Q3xOE-0006FG-TA@fencepost.gnu.org>
	<20110331053533.GC8569@gmx.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.10
Cc: autoconf@gnu.org
Subject: Re: autocache
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: ams@gnu.org
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 21:10:46 -0000

   I suggest to not put config.cache in the source tree, which also fits
   the nodist_ description you used in Makefile.am.  If you don't mind,
   I'll push the fix as below.

Please do, that was the idea with the fully writable tree.

   Then, how did you come up with the list of gnulib modules in
   bootstrap.conf and the list of macros to call in configure.ac?
   Ideally, they should not generated and not specified manually, that
   will only lead to bit rot.  If needed, then it is more useful to
   specify exceptions manually.

I first extracted all modules from gnulib, and went over them manually
to figure out what is "sensible"; with a very vauge definition of
"sensible".  Not sure what the best way is to extract them.


From MAILER-DAEMON Sat Apr 02 03:58:42 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q5vjG-0001fE-OR
	for mharc-autoconf@gnu.org; Sat, 02 Apr 2011 03:58:42 -0400
Received: from [140.186.70.92] (port=43394 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5vjE-0001Zh-N4
	for autoconf@gnu.org; Sat, 02 Apr 2011 03:58:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q5vjD-0004eO-JD
	for autoconf@gnu.org; Sat, 02 Apr 2011 03:58:40 -0400
Received: from mailout-de.gmx.net ([213.165.64.23]:46569)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q5vjD-0004eE-7V
	for autoconf@gnu.org; Sat, 02 Apr 2011 03:58:39 -0400
Received: (qmail invoked by alias); 02 Apr 2011 07:58:37 -0000
Received: from xdsl-89-0-79-64.netcologne.de (EHLO localhost.localdomain)
	[89.0.79.64]
	by mail.gmx.net (mp067) with SMTP; 02 Apr 2011 09:58:37 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1+olXIJsFao2cw5A6lEKVP3SVt6BwfYBRePlGrN+d
	Cg6W8GS5D6NfS3
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@gmx.de>)
	id 1Q5vjB-0001Sb-GR; Sat, 02 Apr 2011 09:58:37 +0200
Date: Sat, 2 Apr 2011 09:58:37 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: "Alfred M. Szmidt" <ams@gnu.org>
Message-ID: <20110402075837.GF19544@gmx.de>
Mail-Followup-To: "Alfred M. Szmidt" <ams@gnu.org>, autoconf@gnu.org
References: <E1Q3xOE-0006FG-TA@fencepost.gnu.org>
	<20110331053533.GC8569@gmx.de>
	<E1Q5lcB-0005FD-UZ@fencepost.gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E1Q5lcB-0005FD-UZ@fencepost.gnu.org>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
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
Subject: Re: autocache
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 02 Apr 2011 07:58:41 -0000

* Alfred M. Szmidt wrote on Fri, Apr 01, 2011 at 11:10:43PM CEST:
>    Then, how did you come up with the list of gnulib modules in
>    bootstrap.conf and the list of macros to call in configure.ac?
>    Ideally, they should not generated and not specified manually, that
>    will only lead to bit rot.  If needed, then it is more useful to
>    specify exceptions manually.
> 
> I first extracted all modules from gnulib, and went over them manually
> to figure out what is "sensible"; with a very vauge definition of
> "sensible".  Not sure what the best way is to extract them.

Just generating a list of macros could be done in a number of ways:

- autoconf --trace the macro files, grep for public API namespace,
  use an exclusion list like autoconf/tests/mktests.sh does.
- For gnulib, grep the modules/* files for used macros (supposedly
  those are only public ones), continue with an exclusion list.

Cheers,
Ralf


From MAILER-DAEMON Sat Apr 02 14:25:56 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q65WG-000691-Hf
	for mharc-autoconf@gnu.org; Sat, 02 Apr 2011 14:25:56 -0400
Received: from [140.186.70.92] (port=47522 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q65WE-00068t-4I
	for autoconf@gnu.org; Sat, 02 Apr 2011 14:25:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jengelh@medozas.de>) id 1Q65WC-0000t5-Ni
	for autoconf@gnu.org; Sat, 02 Apr 2011 14:25:53 -0400
Received: from borg.medozas.de ([188.40.89.202]:36979)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jengelh@medozas.de>) id 1Q65WC-0000sP-Cp
	for autoconf@gnu.org; Sat, 02 Apr 2011 14:25:52 -0400
Received: by borg.medozas.de (Postfix, from userid 25121)
	id AC729F0C32345; Sat,  2 Apr 2011 20:25:49 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by borg.medozas.de (Postfix) with ESMTP id 97A6164C0
	for <autoconf@gnu.org>; Sat,  2 Apr 2011 20:25:49 +0200 (CEST)
Date: Sat, 2 Apr 2011 20:25:49 +0200 (CEST)
From: Jan Engelhardt <jengelh@medozas.de>
To: autoconf@gnu.org
Message-ID: <alpine.LNX.2.01.1104022024250.26246@obet.zrqbmnf.qr>
User-Agent: Alpine 2.01 (LNX 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 188.40.89.202
Subject: ac 2.68 - AC_LANG_SOURCE
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 02 Apr 2011 18:25:55 -0000


I have seen the thread at 
http://www.mail-archive.com/bug-autoconf@gnu.org/msg03051.html already, 
though there is a case where the warning persists:

configure.ac:4: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call 
detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
configure.ac:4: the top level

AC_INIT([foo],[0])
AC_PROG_CC
AC_MSG_CHECKING([foo])
AC_LINK_IFELSE(AC_LANG_SOURCE([int main(void) { return 0; }]))

Adding [ ] around AC_LANG_SOURCE would fix it, but I don't see this 
extra quoting being normally required. Can someone elaborate?




From MAILER-DAEMON Sat Apr 02 17:11:41 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q686f-0002Zx-8l
	for mharc-autoconf@gnu.org; Sat, 02 Apr 2011 17:11:41 -0400
Received: from [140.186.70.92] (port=36778 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q686d-0002ZN-5o
	for autoconf@gnu.org; Sat, 02 Apr 2011 17:11:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q686c-0001Y0-3j
	for autoconf@gnu.org; Sat, 02 Apr 2011 17:11:39 -0400
Received: from mailout-de.gmx.net ([213.165.64.23]:36715)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1Q686b-0001Xh-NS
	for autoconf@gnu.org; Sat, 02 Apr 2011 17:11:38 -0400
Received: (qmail invoked by alias); 02 Apr 2011 21:11:35 -0000
Received: from xdsl-89-0-152-83.netcologne.de (EHLO localhost.localdomain)
	[89.0.152.83]
	by mail.gmx.net (mp071) with SMTP; 02 Apr 2011 23:11:35 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX18ZyjIi0tUZIg3EcMTbVQNk+WMj2Zf3N0dygNS3Nb
	p8NhSNVZ7ucY61
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@gmx.de>)
	id 1Q686Z-00031r-Df; Sat, 02 Apr 2011 23:11:35 +0200
Date: Sat, 2 Apr 2011 23:11:35 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Jan Engelhardt <jengelh@medozas.de>
Message-ID: <20110402211135.GB11613@gmx.de>
Mail-Followup-To: Jan Engelhardt <jengelh@medozas.de>, autoconf@gnu.org
References: <alpine.LNX.2.01.1104022024250.26246@obet.zrqbmnf.qr>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <alpine.LNX.2.01.1104022024250.26246@obet.zrqbmnf.qr>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
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
Subject: Re: ac 2.68 - AC_LANG_SOURCE
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 02 Apr 2011 21:11:40 -0000

Hi Jan,

* Jan Engelhardt wrote on Sat, Apr 02, 2011 at 08:25:49PM CEST:
> AC_LINK_IFELSE(AC_LANG_SOURCE([int main(void) { return 0; }]))
> 
> Adding [ ] around AC_LANG_SOURCE would fix it, but I don't see this 
> extra quoting being normally required.

It is required, your assumption is not right.
In many cases the normal quoting rules are not strict, but in this case
they now have become so.  See 'info Autoconf "Quotation Rule Of Thumb"'.

Thanks,
Ralf


From MAILER-DAEMON Mon Apr 04 11:54:00 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q6m6J-0004o6-T1
	for mharc-autoconf@gnu.org; Mon, 04 Apr 2011 11:54:00 -0400
Received: from [140.186.70.92] (port=50204 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q6m6G-0004iw-FM
	for autoconf@gnu.org; Mon, 04 Apr 2011 11:53:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q6m66-0000cZ-Mm
	for autoconf@gnu.org; Mon, 04 Apr 2011 11:53:48 -0400
Received: from mx1.redhat.com ([209.132.183.28]:14251)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q6m66-0000cF-D5
	for autoconf@gnu.org; Mon, 04 Apr 2011 11:53:46 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p34Fri9o002122
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 4 Apr 2011 11:53:45 -0400
Received: from [10.3.113.73] (ovpn-113-73.phx2.redhat.com [10.3.113.73])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id p34FrikH019199; Mon, 4 Apr 2011 11:53:44 -0400
Message-ID: <4D99E987.1080401@redhat.com>
Date: Mon, 04 Apr 2011 09:53:43 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: Jan Engelhardt <jengelh@medozas.de>, autoconf@gnu.org
References: <alpine.LNX.2.01.1104022024250.26246@obet.zrqbmnf.qr>
	<20110402211135.GB11613@gmx.de>
In-Reply-To: <20110402211135.GB11613@gmx.de>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig0C69CC2FC4089929AD2758C8"
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: 
Subject: Re: ac 2.68 - AC_LANG_SOURCE
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Apr 2011 15:53:58 -0000

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

On 04/02/2011 03:11 PM, Ralf Wildenhues wrote:
> Hi Jan,
>=20
> * Jan Engelhardt wrote on Sat, Apr 02, 2011 at 08:25:49PM CEST:
>> AC_LINK_IFELSE(AC_LANG_SOURCE([int main(void) { return 0; }]))
>>
>> Adding [ ] around AC_LANG_SOURCE would fix it, but I don't see this=20
>> extra quoting being normally required.
>=20
> It is required, your assumption is not right.

In particular, if AC_LANG_SOURCE produces any commas, an underquoted
version would end up passing multiple arguments to AC_LINK_IFELSE, where
the quoted version would be a single argument, and the correct behavior
requires a single argument.  And while the current body of
AC_LANG_SOURCE doesn't produce any commas unless its argument also had
commas, you can't rely on that behavior in the future.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig0C69CC2FC4089929AD2758C8
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNmemHAAoJEKeha0olJ0NqTtAH/3vl9irOFJ4mbcG/se4vJqPo
L5P3kI/lIrTle0uGjs7QFabYY1GO8227uyEqCLZunwG5npjAalA60Exud44V5nCK
jPC+51dw4NvNJsYVrn9ibefPgum7O1LRP+uIjafEFEagiqb/6H+WXfCPrboEOKNA
wk1kDisggtDf+ps67AQ8EKt+s99kF6kU7ptQ4yp7FjQoe/K8oTq+dJes9f93s7ac
HS8JzS/4L5JCu3YYE9l9urEGameNLW4LiCYUP+0ZQ8GcDwkcq4UR154YPRoEeNUF
oGIIJSMir+HAFOHgE7e435l3tnmlX/VzhtZsTfSqjTGyG5P4Jk28Ld/n3fDgDhc=
=uo5Y
-----END PGP SIGNATURE-----

--------------enig0C69CC2FC4089929AD2758C8--


From MAILER-DAEMON Mon Apr 04 18:14:58 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q6s30-0005fj-SP
	for mharc-autoconf@gnu.org; Mon, 04 Apr 2011 18:14:58 -0400
Received: from [140.186.70.92] (port=53629 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q6rtS-0006Py-1y
	for autoconf@gnu.org; Mon, 04 Apr 2011 18:05:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <kevin.s.anthony@gmail.com>) id 1Q6rtP-00038r-T0
	for autoconf@gnu.org; Mon, 04 Apr 2011 18:05:05 -0400
Received: from mail-vx0-f169.google.com ([209.85.220.169]:44757)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <kevin.s.anthony@gmail.com>) id 1Q6rtP-00038d-O7
	for autoconf@gnu.org; Mon, 04 Apr 2011 18:05:03 -0400
Received: by vxk20 with SMTP id 20so5854136vxk.0
	for <autoconf@gnu.org>; Mon, 04 Apr 2011 15:05:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:date:message-id:subject:from:to
	:content-type; bh=Hjl5XO6Bh+abcp7XYaMJxSBA9lIdwDJPhw9mU5f1r6w=;
	b=QxAnqWWNNHfmtAQBzgxYYNRj299E6cWqteSQ0vQCEWVOH/w8/geYeMCc50+KvsBGe4
	xIGBXs/EqvXCgmSNuZtfLHBSYtIH7wfpzwVEBp2FLOFWp8qsPJStrS/a9pbrSa3j9qgi
	mq3HVEC09HTb5oPlSsCxWtSJmcOtBDc5XKh58=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=Ym2uEZz9215fzCxSjicQvduCYs/YiGDYWNYnsLALDUT28nmPdldpmNpw+cDlGaKaXV
	yR+9Dk5W7mEA6s+oxywZ2XMOvWSW9f8+dsog7OJAebkwzrYlFsQMPKfO9xvQ+N+2xucA
	pqDF/3qQggryybCTUGA4PnnLO3jNP4xgKYEAc=
MIME-Version: 1.0
Received: by 10.52.115.196 with SMTP id jq4mr7316755vdb.273.1301954702907;
	Mon, 04 Apr 2011 15:05:02 -0700 (PDT)
Received: by 10.52.165.68 with HTTP; Mon, 4 Apr 2011 15:05:02 -0700 (PDT)
Date: Mon, 4 Apr 2011 18:05:02 -0400
Message-ID: <BANLkTi=VPUTW5RRCE3_Fn6jpFD_WACi9qA@mail.gmail.com>
From: Kevin Anthony <kevin.s.anthony@gmail.com>
To: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 209.85.220.169
X-Mailman-Approved-At: Mon, 04 Apr 2011 18:14:57 -0400
Subject: Question about installation configuration
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Apr 2011 22:05:07 -0000

When i install some programs, i occasionally get a blue screen with
default settings, which you can change before installing.

Is there a way to do this with autoconf?
Or is it better to do this at first startup?


-- 
Thanks
Kevin Anthony
www.NoSideRacing.com


From MAILER-DAEMON Mon Apr 04 18:21:06 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q6s8w-0000UO-Cj
	for mharc-autoconf@gnu.org; Mon, 04 Apr 2011 18:21:06 -0400
Received: from [140.186.70.92] (port=41249 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q6s8u-0000Ss-Bw
	for autoconf@gnu.org; Mon, 04 Apr 2011 18:21:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q6s8n-0007cS-Kd
	for autoconf@gnu.org; Mon, 04 Apr 2011 18:21:04 -0400
Received: from mx1.redhat.com ([209.132.183.28]:19480)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q6s8n-0007bZ-9J
	for autoconf@gnu.org; Mon, 04 Apr 2011 18:20:57 -0400
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 p34MKtsR012956
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 4 Apr 2011 18:20:55 -0400
Received: from [10.3.113.73] (ovpn-113-73.phx2.redhat.com [10.3.113.73])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p34MKsF3008638; Mon, 4 Apr 2011 18:20:54 -0400
Message-ID: <4D9A4446.6090701@redhat.com>
Date: Mon, 04 Apr 2011 16:20:54 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: Kevin Anthony <kevin.s.anthony@gmail.com>
References: <BANLkTi=VPUTW5RRCE3_Fn6jpFD_WACi9qA@mail.gmail.com>
In-Reply-To: <BANLkTi=VPUTW5RRCE3_Fn6jpFD_WACi9qA@mail.gmail.com>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig63956D2BA077DAB8AECAE5E5"
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@gnu.org
Subject: Re: Question about installation configuration
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Apr 2011 22:21:05 -0000

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

On 04/04/2011 04:05 PM, Kevin Anthony wrote:
> When i install some programs, i occasionally get a blue screen with
> default settings, which you can change before installing.

What program, and installing onto what operating system?  You didn't
give us very many details to work with?

>=20
> Is there a way to do this with autoconf?

Does the program already use autoconf?  If so, then it is possible to
use autoconf to add --with-xyz or --enable-xyz options to ./configure to
make those decisions at configure time, rather than install time.

> Or is it better to do this at first startup?

I have no idea, without knowing what program it is that presents a "blue
screen" for things to configure at run time.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig63956D2BA077DAB8AECAE5E5
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNmkRGAAoJEKeha0olJ0NqIxgH/33fM1tY/lbJGxIaOsUoAjE/
RPa6NIVtVG2OvARYWlfB+xtKmp1bgOrHuNJqYjhMYnq3yMwGpH+PkLb3xQdAb2Ps
T2bDxEGHk6z2hB/Zx2Q4YCcyiCOPWbRx/yaP7pYu7o533X1N27+D3ml05n+W+vmb
JyHFz2eMIgh9Qu7FaspmGQjoLGWujR5RafEFaar//bhuxCTLIUWc/W+RuYFgy18s
njt2riCeZBEQMMe6W7bXRT7UMEWaZ0u1Wdr5afUr7tQxYj7+qQIRFyPqgno2Yd94
0E9DNL1URgB6SSJiNbyVnPqhOLwyGx/hVbeHnPcyTJHEKvVvB0Cmpn/uaS6jeQY=
=U5WE
-----END PGP SIGNATURE-----

--------------enig63956D2BA077DAB8AECAE5E5--


From MAILER-DAEMON Mon Apr 04 18:30:39 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q6sIB-00026r-N4
	for mharc-autoconf@gnu.org; Mon, 04 Apr 2011 18:30:39 -0400
Received: from [140.186.70.92] (port=40179 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q6sI9-00026m-Eg
	for Autoconf@gnu.org; Mon, 04 Apr 2011 18:30:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q6sI8-00034a-3p
	for Autoconf@gnu.org; Mon, 04 Apr 2011 18:30:37 -0400
Received: from mx1.redhat.com ([209.132.183.28]:65273)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q6sI7-00034U-Ql
	for Autoconf@gnu.org; Mon, 04 Apr 2011 18:30:36 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p34MUYDK016071
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 4 Apr 2011 18:30:34 -0400
Received: from [10.3.113.73] (ovpn-113-73.phx2.redhat.com [10.3.113.73])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p34MUXXw022690; Mon, 4 Apr 2011 18:30:33 -0400
Message-ID: <4D9A4689.1050008@redhat.com>
Date: Mon, 04 Apr 2011 16:30:33 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: Kevin Anthony <kevin.s.anthony@gmail.com>, Autoconf <Autoconf@gnu.org>
References: <BANLkTi=VPUTW5RRCE3_Fn6jpFD_WACi9qA@mail.gmail.com>	<4D9A4446.6090701@redhat.com>
	<BANLkTimbg-7v--vkRXh_aufK1-kJJ4beBQ@mail.gmail.com>
In-Reply-To: <BANLkTimbg-7v--vkRXh_aufK1-kJJ4beBQ@mail.gmail.com>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig6A125456AD345A35109A7A95"
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: 
Subject: Re: Question about installation configuration
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Apr 2011 22:30:38 -0000

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

[re-adding the list]

On 04/04/2011 04:27 PM, Kevin Anthony wrote:
> I suppose i'm guilty of thinking your mind readers.
>=20
> It compiles up on linux boxes, it does use autoconf, and right now i'm
> using --with-foo
>=20
> But i need initial connection information for a MySQL server. so as it
> stands, ./configure looks like --with-mysql-server=3Dipaddress
> --with-mysql-user=3Dusername --with-mysql-pass=3Dpassword
> --with-mysql-database=3Ddatabase
>=20
> I was just wondering if there was an autoconf tool for initial configur=
ation?

Autoconf only provides ./configure --with-mysql-server=3Dipaddress, so it=

looks like you're already using it.

>=20
> The other option was writing an initial start screen, but that would
> require an additional gsetting, as well as all the code that goes with
> checking for first start, every time my program runs.

If your program is a gui, then that may be more appropriate anyways -
especially since the person building your program for a distro is not
going to have the same preferences for default settings as the person
using your gui pre-built from a distro.  But that's well outside the
realm of autoconf, and something you may be better off asking on lists
dedicated to developing with gsetting or other comparable gui setting
managers.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig6A125456AD345A35109A7A95
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNmkaJAAoJEKeha0olJ0NqaHwH/Roy3XXRNlKy7mEoDNLZm3fp
NPeMpbBl4Wt1a9C+2jVeXCp4T0RVbTjHlq54LwpkPVaX1wjoQNd4/f4j/TAXRz5e
EpFdkZExnBRV4EqkOk/FzSj1vGPx2s8vwNtUQgTvJGslFFauCUp+Bbx3CfcXIWMY
a5AFXHaDvzemLhkGu37EVhUcZJmJRcBBUImGin1ndnYt33T02xi3I5CJOSRE+duR
tkljS9kU+G5MItgTDC2q6FBPH/aUP7/Ru1avojwUa7AE5pTA0ager/65ZT9gpx7o
+DAPN7COsTjwCKeQrS2/qMlVwOItNwAFZLQis/FYSvmjNv4qtCimUUlmgMwQedI=
=DNzQ
-----END PGP SIGNATURE-----

--------------enig6A125456AD345A35109A7A95--


From MAILER-DAEMON Tue Apr 05 13:54:56 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7ASu-0007No-NZ
	for mharc-autoconf@gnu.org; Tue, 05 Apr 2011 13:54:56 -0400
Received: from [140.186.70.92] (port=57058 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7ASr-0007Lr-EA
	for autoconf@gnu.org; Tue, 05 Apr 2011 13:54:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jeg@krellinst.org>) id 1Q7ASp-0008CW-3m
	for autoconf@gnu.org; Tue, 05 Apr 2011 13:54:53 -0400
Received: from vermont.krellinst.org ([216.81.228.133]:63480)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jeg@krellinst.org>) id 1Q7ASo-0008Bp-TP
	for autoconf@gnu.org; Tue, 05 Apr 2011 13:54:51 -0400
Received: from 173-21-213-250.client.mchsi.com ([173.21.213.250]
	helo=localhost.localdomain)
	by vermont.krellinst.org with esmtpsa (TLSv1:CAMELLIA256-SHA:256)
	(Exim 4.69 (FreeBSD)) (envelope-from <jeg@krellinst.org>)
	id 1Q7ASh-000Oun-6d; Tue, 05 Apr 2011 12:54:43 -0500
Message-ID: <4D9B57AA.5060804@krellinst.org>
Date: Tue, 05 Apr 2011 12:55:54 -0500
From: Jim Galarowicz <jeg@krellinst.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Thunderbird/3.0.4
MIME-Version: 1.0
To: =?ISO-8859-1?Q?Christian_R=F6ssel?= <c.roessel@fz-juelich.de>
References: <4D90DC92.9040001@krellinst.org> <20110329063550.GF27293@gmx.de>
	<4D95E79C.5020804@fz-juelich.de>
In-Reply-To: <4D95E79C.5020804@fz-juelich.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-krellinst-org-MailScanner-Information: Please contact the Krell Institute
	for more information
X-MailScanner-ID: 1Q7ASh-000Oun-6d
X-krellinst-org-MailScanner: Found to be clean
X-krellinst-org-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=-97.847, required 5, FORGED_RCVD_HELO 0.05,
	J_CHICKENPOX_66 0.60, J_CHICKENPOX_92 0.60, RATWARE_GECKO_BUILD 0.83,
	TW_IB 0.08, USER_IN_WHITELIST -100.00)
X-krellinst-org-MailScanner-From: jeg@krellinst.org
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 216.81.228.133
Cc: autoconf@gnu.org
Subject: Re: Multiple subdirectories with non-similar configure needs
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Apr 2011 17:54:55 -0000

Hi Christian, all,

I've applied the patch to autoconf-2.65 and it works wonderfully!! 
Thanks so much to you and all who have participated in this discussion 
and action.

Since the email thread started we have two more subdirectories.  My 
configure.ac file now has these 5 AC_CONFIG_SUBDIR_CUSTOM lines in it:

AC_CONFIG_SUBDIR_CUSTOM([libcbtf], [--prefix=$CBTF_PREFIX 
--with-boost=$CBTF_BOOST_PREFIX --with-boost-libdir=$CBTF_BOOST_PREFIX_LIB])

AC_CONFIG_SUBDIR_CUSTOM([libcbtf-xml], [--prefix=$CBTF_PREFIX 
--with-cbtf=$CBTF_PREFIX --with-libxerces-c-prefix=$CBTF_XERCESC_PREFIX])

AC_CONFIG_SUBDIR_CUSTOM([libcbtf-mrnet], [--prefix=$CBTF_PREFIX 
--with-cbtf=$CBTF_PREFIX --with-cbtf-xml=$CBTF_PREFIX 
--with-libxerces-c-prefix=$CBTF_XERCESC_PREFIX 
--with-mrnet=$CBTF_MRNET_PREFIX])

AC_CONFIG_SUBDIR_CUSTOM([messages], [--prefix=$CBTF_PREFIX 
--with-cbtf=$CBTF_PREFIX --with-mrnet=$CBTF_MRNET_PREFIX 
--with-libxerces-c-prefix=$CBTF_XERCESC_PREFIX 
--with-cbtf-xml=$CBTF_PREFIX --with-cbtf-mrnet=$CBTF_PREFIX])

AC_CONFIG_SUBDIR_CUSTOM([services], [ --prefix=$CBTF_PREFIX 
--with-mrnet=$CBTF_MRNET_PREFIX --with-cbtf-messages=$CBTF_PREFIX 
--with-libmonitor=$CBTF_ROOT --with-libunwind=$CBTF_ROOT 
--with-papi=$CBTF_ROOT  --with-tls=implicit  --with-binutils=$CBTF_ROOT 
--with-cbtf=$CBTF_PREFIX])

I'm able to bootstrap, configure --prefix=$CBTF_PREFIX at the top level 
and have each of the subdirectories configure with their respective 
configure lines.   Very cool indeed!

Thanks again!

Will this make it into the main line release?

Jim G.


On 04/01/2011 09:56 AM, Christian Rössel wrote:
> Hi Jim, hi Ralf, hi all,
>
> On 03/29/2011 08:35 AM, Ralf Wildenhues wrote:
>> >  Hello Jim,
>> >
>> >  * Jim Galarowicz wrote on Mon, Mar 28, 2011 at 09:08:02PM CEST:
>>> >>  I was wondering if anyone can point me to any information on how to
>>> >>  configure from a top-level directory multiple sub-directories with
>>> >>  different configure requirements.
>> >
>> >  Well, you can just write code yourself that calls the sub configure
>> >  scripts with the arguments you intend for it.  Basically your own
>> >  version of AC_CONFIG_SUBDIRS, if you like.
> I wrote a macro (AC_CONFIG_SUBDIR_CUSTOM, patch applied) to pass
> different arguments to different sub-configures. Like AC_CONFIG_SUBDIRS
> it preserves
>   * --cache-file
>   * --silent
> and passes always
>   * --srcdir
>   * --prefix
>   * --disable-option-checking
>
> AC_CONFIG_SUBDIR_CUSTOM takes at least two arguments, the directory
> where the sub-configure resides and the additional arguments to be
> passed to this specific sub-configure. An optional third parameter
> controls if the sub-configure is recognized by a configure --help=recursive.
>
>
>> >  GCC does this in its own tree (except the code is partly in the
>> >  makefile, not only the toplevel configure script).
>> >
>> >  For simple things, it often suffices to adjust $ac_configure_args during
>> >  configure (beware of the eval quoting though!).
>> >
>> >  However, you haven't written what kind of adjustments you need at all,
>> >  so it's not clear how to help more.
>> >
>>> >>  My subdirectories are: libcbtf, libcbtf-xml, libcbtf-mrnet.  Each
>>> >>  subdirectory has different package requirements and has been set up
>>> >>  to use autoconf, automake, libtool, m4, etc..
> Jim, you would use it like this in your toplevel configure.ac:
>
> AC_CONFIG_SUBDIR_CUSTOM([libcbtf], [$arguments_to_libcbtf])
> AC_CONFIG_SUBDIR_CUSTOM([libcbtf-xml], [$arguments_to_libcbtf-xml])
> AC_CONFIG_SUBDIR_CUSTOM([libcbtf-mrnet], [$arguments_to_libcbtf-mrnet])
>
> Cheers,
> Christian
>
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
> Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
>
> Besuchen Sie uns auf unserem neuen Webauftritt unterwww.fz-juelich.de
>
>
> AC_CONFIG_SUBDIR_CUSTOM.patch
>
>
> diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
> index 46a0341..d028ede 100644
> --- a/lib/autoconf/status.m4
> +++ b/lib/autoconf/status.m4
> @@ -191,7 +191,7 @@ m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
>
>   # _AC_CONFIG_UNIQUE(MODE, DEST)
>   # -----------------------------
> -# MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'.
> +# MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', `SUBDIRS' or CONFIG_SUBDIR_CUSTOM.
>   #
>   # Verify that there is no double definition of an output file.
>   #
> @@ -1097,7 +1097,7 @@ m4_define([AC_OUTPUT_COMMANDS_POST])
>   AC_DEFUN([AC_CONFIG_SUBDIRS],
>   [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])]dnl
>   [AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])]dnl
> -[m4_map_args_w([$1], [_AC_CONFIG_UNIQUE([SUBDIRS],
> +[m4_map_args_w([$1], [_AC_CONFIG_UNIQUE([SUBDIRS or CONFIG_SUBDIR_CUSTOM],
>     _AC_CONFIG_COMPUTE_DEST(], [))])]dnl
>   [m4_append([_AC_LIST_SUBDIRS], [$1], [
>   ])]dnl
> @@ -1106,6 +1106,41 @@ AC_DEFUN([AC_CONFIG_SUBDIRS],
>   [AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])])
>
>
> +# AC_CONFIG_SUBDIR_CUSTOM(DIR, ARGUMENTS [, DISABLE_HELP_RECURSIVE])
> +# ------------------------------------------------------------------
> +# Build a list custom_subdirs of tuples (DIR, ARGUMENTS) where DIR is
> +# unique in _AC_LIST_CUSTOM_SUBDIRS and _AC_LIST_SUBDIRS. This list is used in
> +# _AC_OUTPUT_SUBDIRS to invoke nested configures in directory DIR with
> +# arguments ARGUMENTS. The arguments are modified as in the AC_CONFIG_SUBDIRS
> +# case, see _AC_SUB_CONFIGURE_ARGS. If the third argument
> +# DISABLE_HELP_RECURSIVE is given, configure --help=recursive will omit DIR.
> +AC_DEFUN([AC_CONFIG_SUBDIR_CUSTOM],
> +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])]dnl
> +[AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])]dnl
> +[m4_foreach_w([_AC_Sub], [$1],
> +	      [_AC_CONFIG_UNIQUE([SUBDIRS or CONFIG_SUBDIR_CUSTOM],
> +                                 m4_bpatsubst(m4_defn([_AC_Sub]), [:.*]))])]dnl
> +
> +# build a list of (directory,arguments) tuples that will be processed in _AC_OUTPUT_SUBDIRS
> +[if test -z "$custom_subdirs"; then
> +  custom_subdirs="custom_sub_configure_dir=\"m4_normalize([$1])\";custom_sub_configure_args=\"m4_normalize([$2])\""
> +else
> +  custom_subdirs="$custom_subdirs|custom_sub_configure_dir=\"m4_normalize([$1])\";custom_sub_configure_args=\"m4_normalize([$2])\""
> +fi]
> +
> +# per default, enable --help=recursive in directory $1.
> +[m4_ifval([$3],
> +          [],
> +          [m4_append([_AC_LIST_SUBDIRS], [$1], [
> +])dnl
> +])]dnl
> +[AS_LITERAL_IF([$1], [],
> +	       [AC_DIAGNOSE([syntax], [$0: you should use literals])])]dnl
> +[AC_SUBST([subdirs_custom], ["$subdirs_custom m4_normalize([$1])"])]dnl
> +)
> +# AC_CONFIG_SUBDIR_CUSTOM
> +
> +
>   # _AC_OUTPUT_SUBDIRS
>   # ------------------
>   # This is a subroutine of AC_OUTPUT, but it does not go into
> @@ -1116,12 +1151,50 @@ m4_define([_AC_OUTPUT_SUBDIRS],
>   # CONFIG_SUBDIRS section.
>   #
>   if test "$no_recursion" != yes; then
> +  ac_popdir=`pwd`
> +
> +  # call configures in list $custom_subdirs with directory-specific arguments.
> +  OIFS=$IFS
> +  IFS='|'
> +  list=$custom_subdirs
> +  for dir_and_args in $list; do
> +    IFS=$OIFS
> +    eval $dir_and_args
> +    if test "x$custom_sub_configure_dir" = x; then continue; fi
> +    ac_custom_sub_configure_args=
> +    _AC_SUB_CONFIGURE_ARGS([$custom_sub_configure_args],
> +                           [ac_custom_sub_configure_args])
> +    _AC_SUB_CONFIGURE([$custom_sub_configure_dir],
> +                      [$ac_custom_sub_configure_args])
> +    cd "$ac_popdir"
> +    IFS='|'
> +  done
> +  IFS=$OIFS
> +
> +  # call configures in $subdirs with fixed arguments.
> +  ac_sub_configure_args=
> +  _AC_SUB_CONFIGURE_ARGS([$ac_configure_args],
> +                         [ac_sub_configure_args])
> +  for ac_dir in : $subdirs; do test "x$ac_dir" = x:&&  continue
> +     echo "ac_dir(inside): $ac_dir"
> +    _AC_SUB_CONFIGURE([$ac_dir],
> +                      [$ac_sub_configure_args])
> +    cd "$ac_popdir"
> +  done
> +fi
> +])# _AC_OUTPUT_SUBDIRS
>
> +
> +# _AC_SUB_CONFIGURE_ARGS(ARGUMENTS_IN, ARGUMENTS_OUT)
> +# ---------------------------------------------------
> +# Create ARGUMENTS_OUT from ARGUMENTS_IN for use in nested configure calls.
> +m4_define([_AC_SUB_CONFIGURE_ARGS],
> +[
>     # Remove --cache-file, --srcdir, and --disable-option-checking arguments
>     # so they do not pile up.
>     ac_sub_configure_args=
>     ac_prev=
> -  eval "set x $ac_configure_args"
> +  eval "set x $1"
>     shift
>     for ac_arg
>     do
> @@ -1153,7 +1226,7 @@ if test "$no_recursion" != yes; then
>         case $ac_arg in
>         *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
>         esac
> -      AS_VAR_APPEND([ac_sub_configure_args], [" '$ac_arg'"]) ;;
> +      AS_VAR_APPEND([$2], [" '$ac_arg'"]) ;;
>       esac
>     done
>
> @@ -1163,66 +1236,68 @@ if test "$no_recursion" != yes; then
>     case $ac_arg in
>     *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
>     esac
> -  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
> +  $2="'$ac_arg' $$2"
>
>     # Pass --silent
>     if test "$silent" = yes; then
> -    ac_sub_configure_args="--silent $ac_sub_configure_args"
> +    $2="--silent $$2"
>     fi
>
>     # Always prepend --disable-option-checking to silence warnings, since
>     # different subdirs can have different --enable and --with options.
> -  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
> +  $2="--disable-option-checking $$2"
> +])# _AC_SUB_CONFIGURE_ARGS
>
> -  ac_popdir=`pwd`
> -  for ac_dir in : $subdirs; do test "x$ac_dir" = x:&&  continue
>
> -    # Do not complain, so a configure script can configure whichever
> -    # parts of a large source tree are present.
> -    test -d "$srcdir/$ac_dir" || continue
> -
> -    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
> -    _AS_ECHO_LOG([$ac_msg])
> -    _AS_ECHO([$ac_msg])
> -    AS_MKDIR_P(["$ac_dir"])
> -    _AC_SRCDIRS(["$ac_dir"])
> -
> -    cd "$ac_dir"
> -
> -    # Check for guested configure; otherwise get Cygnus style configure.
> -    if test -f "$ac_srcdir/configure.gnu"; then
> -      ac_sub_configure=$ac_srcdir/configure.gnu
> -    elif test -f "$ac_srcdir/configure"; then
> -      ac_sub_configure=$ac_srcdir/configure
> -    elif test -f "$ac_srcdir/configure.in"; then
> -      # This should be Cygnus configure.
> -      ac_sub_configure=$ac_aux_dir/configure
> -    else
> -      AC_MSG_WARN([no configuration information is in $ac_dir])
> -      ac_sub_configure=
> -    fi
> -
> -    # The recursion is here.
> -    if test -n "$ac_sub_configure"; then
> -      # Make the cache file name correct relative to the subdirectory.
> -      case $cache_file in
> -      [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
> -      *) # Relative name.
> -	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
> -      esac
> -
> -      AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
> -      # The eval makes quoting arguments work.
> -      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
> -	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
> -	AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
> -    fi
> +# _AC_SUB_CONFIGURE(DIR, ARGUMENTS)
> +# ---------------------------------
> +# Call nested configure in DIR with arguments ARGUMENTS.
> +m4_define([_AC_SUB_CONFIGURE],
> +[
> +  sub_configure_dir=$1
> +  sub_configure_args=$2
> +
> +  # Do not complain, so a configure script can configure whichever
> +  # parts of a large source tree are present.
> +  test -d "$srcdir/$sub_configure_dir" || continue
> +
> +  ac_msg="=== configuring in $sub_configure_dir (`pwd`/$sub_configure_dir)"
> +  _AS_ECHO_LOG([$ac_msg])
> +  _AS_ECHO([$ac_msg])
> +  AS_MKDIR_P(["$sub_configure_dir"])
> +  _AC_SRCDIRS(["$sub_configure_dir"])
> +
> +  cd "$sub_configure_dir"
> +
> +  # Check for guested configure; otherwise get Cygnus style configure.
> +  if test -f "$ac_srcdir/configure.gnu"; then
> +    ac_sub_configure=$ac_srcdir/configure.gnu
> +  elif test -f "$ac_srcdir/configure"; then
> +    ac_sub_configure=$ac_srcdir/configure
> +  elif test -f "$ac_srcdir/configure.in"; then
> +    # This should be Cygnus configure.
> +    ac_sub_configure=$ac_aux_dir/configure
> +  else
> +    AC_MSG_WARN([no configuration information is in $sub_configure_dir])
> +    ac_sub_configure=
> +  fi
>
> -    cd "$ac_popdir"
> -  done
> -fi
> -])# _AC_OUTPUT_SUBDIRS
> +  # The recursion is here.
> +  if test -n "$ac_sub_configure"; then
> +    # Make the cache file name correct relative to the subdirectory.
> +    case $cache_file in
> +    [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
> +    *) # Relative name.
> +      ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
> +    esac
>
> +    AC_MSG_NOTICE([running $SHELL $ac_sub_configure $sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
> +    # The eval makes quoting arguments work.
> +    eval "\$SHELL \"\$ac_sub_configure\" $sub_configure_args \
> +	 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
> +      AC_MSG_ERROR([$ac_sub_configure failed for $sub_configure_dir])
> +  fi
> +])# _AC_SUB_CONFIGURE
>
>
>
> @@ -1304,7 +1379,10 @@ if test "$no_create" != yes; then
>     $ac_cs_success || AS_EXIT([1])
>   fi
>   dnl config.status should not do recursion.
> -AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
> +AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS],
> +                  [_AC_OUTPUT_SUBDIRS()],
> +                  [AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIR_CUSTOM],
> +                                     [_AC_OUTPUT_SUBDIRS()])])dnl
>   if test -n "$ac_unrecognized_opts"&&  test "$enable_option_checking" != no; then
>     AC_MSG_WARN([unrecognized options: $ac_unrecognized_opts])
>   fi
>
>
>
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> http://lists.gnu.org/mailman/listinfo/autoconf


From MAILER-DAEMON Wed Apr 06 14:31:03 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7XVP-0000lP-8L
	for mharc-autoconf@gnu.org; Wed, 06 Apr 2011 14:31:03 -0400
Received: from [140.186.70.92] (port=42500 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7XVM-0000Z5-Ip
	for autoconf@gnu.org; Wed, 06 Apr 2011 14:31:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bruce.korb@gmail.com>) id 1Q7XQa-0006Ii-HF
	for autoconf@gnu.org; Wed, 06 Apr 2011 14:26:05 -0400
Received: from mail-pz0-f41.google.com ([209.85.210.41]:56213)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bruce.korb@gmail.com>) id 1Q7XQa-0006IK-3m
	for autoconf@gnu.org; Wed, 06 Apr 2011 14:26:04 -0400
Received: by pzk32 with SMTP id 32so856933pzk.0
	for <autoconf@gnu.org>; Wed, 06 Apr 2011 11:26:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:message-id:date:from:user-agent:mime-version:to
	:subject:content-type:content-transfer-encoding;
	bh=wh4DblOdG+mF31+bsRRdOUfeAm1gLzBn5HCg+B0f2wg=;
	b=vR+1OfqcMhg6CD1Ew/ILPPIjedTp42ip9Q3CIkDrPDLuwzsn51HYlS905FA9fqrpGo
	kphLvSvJ/yoxz4BH2ZkqGUiC0AKT0Jh0FaLoJRw+YGo4BN4ZFcAgpQdz99JXgh4AdmhU
	Yl0PRFLVmGq0qYOWTTB+MFcqE9IdWRjFnaJ8g=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type:content-transfer-encoding;
	b=Uh6K6fn/f2IxihLRB06SBgLKUGNy5iahGZI/0a9GCb9dAj5RksXyGmD1TDcbAhld0Q
	u02n0MsX+WJIfDazR2wzShRLIJvaowDfVt30BWu0GmSqnq344uvdfORUPdFfCnFx0kvx
	Ox9VVJCHBNhabygQansNcnvu28n27NE2HnY44=
Received: by 10.142.212.17 with SMTP id k17mr1223856wfg.191.1302114362646;
	Wed, 06 Apr 2011 11:26:02 -0700 (PDT)
Received: from [10.0.0.2] (adsl-75-2-139-75.dsl.pltn13.sbcglobal.net
	[75.2.139.75])
	by mx.google.com with ESMTPS id x11sm1107575wfd.1.2011.04.06.11.26.01
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 06 Apr 2011 11:26:01 -0700 (PDT)
Message-ID: <4D9CB038.4050604@gmail.com>
Date: Wed, 06 Apr 2011 11:26:00 -0700
From: Bruce Korb <bruce.korb@gmail.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8
MIME-Version: 1.0
To: GNU Autoconf mailing list <autoconf@gnu.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 209.85.210.41
Subject: no AC_LANG_SOURCE call detected in body
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Apr 2011 18:31:01 -0000

I was trying to chase down some still-hanging-around warnings.
This warning is insufficiently clear because I *do* have AC_LANG_SOURCE:

configure.ac:139: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
config/ag_macros.m4:347: AG_WITHLIB_XML2 is expanded from...
config/ag_macros.m4:674: INVOKE_AG_MACROS is expanded from...
configure.ac:139: the top level


     348 AC_DEFUN([AG_WITHLIB_XML2],[
[........]
     422   AC_MSG_CHECKING([whether libxml2 can be linked with])
     423   AC_CACHE_VAL([ag_cv_with_libxml2],[
     424   AC_LINK_IFELSE(
     425     [AC_LANG_SOURCE([[@%:@include <libxml/parser.h>
     426 @%:@include <libxml/tree.h>
     427
     428 int main () {
     429 xmlDocPtr p = xmlParseFile( "mumble.xml" ); }]])],
     430     [ag_cv_with_libxml2=yes],
     431     [ag_cv_with_libxml2=no]) # end of AC_LINK_IFELSE
     432   ]) # end of AC_CACHE_VAL for ag_cv_with_libxml2


From MAILER-DAEMON Wed Apr 06 15:59:18 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7Yso-0004vN-JF
	for mharc-autoconf@gnu.org; Wed, 06 Apr 2011 15:59:18 -0400
Received: from [140.186.70.92] (port=51927 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7Ysm-0004v7-H0
	for autoconf@gnu.org; Wed, 06 Apr 2011 15:59:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bruce.korb@gmail.com>) id 1Q7Ysi-0003do-Nk
	for autoconf@gnu.org; Wed, 06 Apr 2011 15:59:13 -0400
Received: from mail-px0-f179.google.com ([209.85.212.179]:52262)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bruce.korb@gmail.com>) id 1Q7Ysi-0003d5-IW
	for autoconf@gnu.org; Wed, 06 Apr 2011 15:59:12 -0400
Received: by pxi2 with SMTP id 2so959711pxi.38
	for <autoconf@gnu.org>; Wed, 06 Apr 2011 12:59:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:sender:message-id:date:from:reply-to
	:organization:user-agent:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=VztWQ2QBaRln76LXx5XghdsKcRsTjNVOfvm37n9MkVo=;
	b=ScVJdD2Wixbh+zowGzkupDxxN7CIulRCoOGZDkN94bFaFCu5YUoqF5DWJLDw9A+sGU
	foBJvsCMNqVXD2hxCQUGhlZPKivZC1WHMTxxft0akHvWOfZpwoU2GFGvcduBY/FgolXv
	Hbwh0/wwBMWJUUNtvTs67UBHHaqpJoOLcecuk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:reply-to:organization:user-agent
	:mime-version:to:cc:subject:references:in-reply-to:content-type
	:content-transfer-encoding;
	b=gEoOwhUOIWQtneE8ORBepqg3dD1ExJ8nsy3gEHPaW6bMczwX9jBQ+lICXYl8vHe5db
	ZazrvXyTHGfQ3ZRLNCDDH9bR7hNKhA9fOjBFgNdQ29cPdI8iSfQFs48XpETctBlLyfbK
	zh2UWNihz6q/81GTrliul4qFwSO3KAvlcBv3o=
Received: by 10.143.26.16 with SMTP id d16mr21404wfj.309.1302119950830;
	Wed, 06 Apr 2011 12:59:10 -0700 (PDT)
Received: from [10.0.0.2] (adsl-75-2-139-75.dsl.pltn13.sbcglobal.net
	[75.2.139.75])
	by mx.google.com with ESMTPS id o1sm1195327wfl.9.2011.04.06.12.59.09
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 06 Apr 2011 12:59:10 -0700 (PDT)
Sender: Bruce Korb <bruce.korb@gmail.com>
Message-ID: <4D9CC60D.4040300@gnu.org>
Date: Wed, 06 Apr 2011 12:59:09 -0700
From: Bruce Korb <bkorb@gnu.org>
Organization: FSF
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8
MIME-Version: 1.0
To: Bruce Korb <bruce.korb@gmail.com>
References: <4D9CB038.4050604@gmail.com>
In-Reply-To: <4D9CB038.4050604@gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 209.85.212.179
Cc: GNU Autoconf mailing list <autoconf@gnu.org>
Subject: Never mind: no AC_LANG_SOURCE call detected in body
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: bkorb@gnu.org
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Apr 2011 19:59:17 -0000

On 04/06/11 11:26, Bruce Korb wrote:
> I was trying to chase down some still-hanging-around warnings.
> This warning is insufficiently clear because I *do* have AC_LANG_SOURCE:

Never mind.  This has become an irreproducible result.
Without knowing what I've done differently (something, surely),
the issue has disappeared....

> configure.ac:139: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body


From MAILER-DAEMON Wed Apr 06 18:40:18 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7bOc-0003kE-UI
	for mharc-autoconf@gnu.org; Wed, 06 Apr 2011 18:40:18 -0400
Received: from [140.186.70.92] (port=59944 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7b6g-0000nl-Tv
	for autoconf@gnu.org; Wed, 06 Apr 2011 18:21:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gilles.ganault@free.fr>) id 1Q7b6f-0000Vm-Mp
	for autoconf@gnu.org; Wed, 06 Apr 2011 18:21:46 -0400
Received: from smtp5-g21.free.fr ([212.27.42.5]:52856)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gilles.ganault@free.fr>) id 1Q7b6f-0000VT-2k
	for autoconf@gnu.org; Wed, 06 Apr 2011 18:21:45 -0400
Received: from myputer.free.fr (unknown [82.237.75.54])
	by smtp5-g21.free.fr (Postfix) with ESMTP id 271C2D4803C
	for <autoconf@gnu.org>; Thu,  7 Apr 2011 00:21:39 +0200 (CEST)
Message-Id: <7.0.1.0.2.20110407002100.026a6f78@fredshack.com>
X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0
Date: Thu, 07 Apr 2011 00:21:38 +0200
To: autoconf@gnu.org
From: Gilles Ganault <gilles.ganault@free.fr>
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: 212.27.42.5
X-Mailman-Approved-At: Wed, 06 Apr 2011 18:40:18 -0400
Subject: Adding malloc configure test?
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Apr 2011 22:21:47 -0000

Hello

I'm no configure/make expert, and need to cross-compile SSHGuard to 
run on a uClinux-based appliance.

After successfully (?) running "configure", make stops after a few seconds:
==========
...
/usr/src/baps/opt/uClinux/bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc
-I. -O2 -Wall -std=c99  -D_XOPEN_SOURCE  -O2 -Wall -pedantic
-I/usr/src/baps/uClinux-dist/linux-2.6.x/include
-I/usr/src/baps/uClinux-dist/staging/usr/include   -o sshguard
sshguard.o seekers.o sshguard_whitelist.o sshguard_log.o
sshguard_procauth.o sshguard_blacklist.o sshguard_options.o
sshguard_logsuck.o simclist.o hash_32a.o parser/libparser.a
fwalls/libfwall.a -lpthread

sshguard_options.o: In function `.L17':
sshguard_options.c:(.text+0x1d0): undefined reference to `_rpl_malloc'
fwalls/libfwall.a(command.o): In function `_run_command':
==========

The problem is solved by exporting this variable before running "configure":
==========
export ac_cv_func_malloc_0_nonnull=yes
==========

But I'd like to know how to solve this problem more elegantly: Where 
should I put this type of settings?

Thank you.



From MAILER-DAEMON Wed Apr 06 18:52:52 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7bam-0001Fe-1W
	for mharc-autoconf@gnu.org; Wed, 06 Apr 2011 18:52:52 -0400
Received: from [140.186.70.92] (port=57256 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7baj-0001FF-0N
	for autoconf@gnu.org; Wed, 06 Apr 2011 18:52:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q7bah-0000XE-Kb
	for autoconf@gnu.org; Wed, 06 Apr 2011 18:52:48 -0400
Received: from mx1.redhat.com ([209.132.183.28]:36070)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q7bah-0000Wy-BQ
	for autoconf@gnu.org; Wed, 06 Apr 2011 18:52:47 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p36MqiUW006177
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 6 Apr 2011 18:52:44 -0400
Received: from [10.3.113.117] (ovpn-113-117.phx2.redhat.com [10.3.113.117])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id p36MqhFg014995; Wed, 6 Apr 2011 18:52:43 -0400
Message-ID: <4D9CEEBB.7000206@redhat.com>
Date: Wed, 06 Apr 2011 16:52:43 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: Gilles Ganault <gilles.ganault@free.fr>
References: <7.0.1.0.2.20110407002100.026a6f78@fredshack.com>
In-Reply-To: <7.0.1.0.2.20110407002100.026a6f78@fredshack.com>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigEFFC316DFF840DF3EBA33B27"
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
Subject: Re: Adding malloc configure test?
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Apr 2011 22:52:50 -0000

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

On 04/06/2011 04:21 PM, Gilles Ganault wrote:
> Hello
>=20
> I'm no configure/make expert, and need to cross-compile SSHGuard to run=

> on a uClinux-based appliance.
>=20
> After successfully (?) running "configure", make stops after a few seco=
nds:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> ...
> /usr/src/baps/opt/uClinux/bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc
> -I. -O2 -Wall -std=3Dc99  -D_XOPEN_SOURCE  -O2 -Wall -pedantic
> -I/usr/src/baps/uClinux-dist/linux-2.6.x/include
> -I/usr/src/baps/uClinux-dist/staging/usr/include   -o sshguard
> sshguard.o seekers.o sshguard_whitelist.o sshguard_log.o
> sshguard_procauth.o sshguard_blacklist.o sshguard_options.o
> sshguard_logsuck.o simclist.o hash_32a.o parser/libparser.a
> fwalls/libfwall.a -lpthread
>=20
> sshguard_options.o: In function `.L17':
> sshguard_options.c:(.text+0x1d0): undefined reference to `_rpl_malloc'

This is a bug in the sshguard project, and you should report it to them.
 They are disregarding the configure test results, and failing to
provide a replacement malloc.c that provides rpl_malloc as required by
the documentation for AC_FUNC_MALLOC.

However, it could be argued that this is also a bug in the configure
test for AC_FUNC_MALLOC in autoconf itself - it currently guesses
pessimistically while cross-compiling, and could in fact be taught to
probe various known systems where malloc(0) allocates rather than its
current behavior of always guessing no.  However, since there are still
systems where the pessimistic guess is still correct (such as AIX),
fixing the autoconf test to be less pessimistic will only mask the
sshguard bug, not eliminate it.  Having wider exposure for the fallback
code is in one regards a feature rather than a bug.  So I'm not sure
whether it is worth the efforts to try and patch AC_FUNC_MALLOC to be
less pessimistic when cross-compiling.

> The problem is solved by exporting this variable before running
> "configure":
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> export ac_cv_func_malloc_0_nonnull=3Dyes

Rather than exporting the variable, the preferred syntax is:

=2E/configure ac_cv_func_malloc_0_nonnull=3Dyes

(that is, make it an explicit argument to configure, so that it will be
properly remembered for future runs, even if you change your environment
variables later).

> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> But I'd like to know how to solve this problem more elegantly: Where
> should I put this type of settings?

If you find yourself always having to correct pessimistic guesses when
cross-compiling, then it is worth adding a config.site file that will
properly prime the cache for what you know are the right answers for
your system.  But without a config.site file, your approach of
overriding the cache variable is indeed the documented way to fix the
pessimistic guess.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enigEFFC316DFF840DF3EBA33B27
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNnO67AAoJEKeha0olJ0NqyZQH/38A+26sPhJ/hm0aiKUUfuRE
3W9x+0kHDzqilLEZTzT+7ozPzYVRlDkCLiYVjWTYf2HrqPk/47HLIcybZqTJ9L5+
KpPhWHYEd/jgwzOgsmoiOZZRjNTdLnd0Qi7Iv+4smJG4REck57gUGRYuf0TGATzc
QaPrLWgRb79C5rMbND2d6GsO8AP3iQj8y05+JcEzbTx4+H1MFeMbp6Pi0Ehdt23x
MmF3WzKivXMRRcijA/kgP3hOBVpBiB2/7ajGpStIrhGlZCTbOdRKluhkXp6GiN4O
FVQ+F4kfyBX2VlIKnKZQdZxWoSd5KRLXVGa4YFEh/wJooHjbGwgtwzOP7Fbskao=
=BJoI
-----END PGP SIGNATURE-----

--------------enigEFFC316DFF840DF3EBA33B27--


From MAILER-DAEMON Thu Apr 07 07:29:43 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7nPC-0001ax-Ul
	for mharc-autoconf@gnu.org; Thu, 07 Apr 2011 07:29:42 -0400
Received: from [140.186.70.92] (port=59761 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7nPA-0001Zd-GF
	for autoconf@gnu.org; Thu, 07 Apr 2011 07:29:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gilles.ganault@free.fr>) id 1Q7nP9-0006Nk-Kn
	for autoconf@gnu.org; Thu, 07 Apr 2011 07:29:40 -0400
Received: from smtp5-g21.free.fr ([212.27.42.5]:60376)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gilles.ganault@free.fr>) id 1Q7nP9-0006Nc-4H
	for autoconf@gnu.org; Thu, 07 Apr 2011 07:29:39 -0400
Received: from myputer.free.fr (unknown [82.237.75.54])
	by smtp5-g21.free.fr (Postfix) with ESMTP id 0637BD484F2
	for <autoconf@gnu.org>; Thu,  7 Apr 2011 13:29:33 +0200 (CEST)
Message-Id: <7.0.1.0.2.20110407132909.061aaaf8@free.fr>
X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0
Date: Thu, 07 Apr 2011 13:29:32 +0200
To: autoconf@gnu.org
From: Gilles Ganault <gilles.ganault@free.fr>
In-Reply-To: <4D9CEEBB.7000206@redhat.com>
References: <7.0.1.0.2.20110407002100.026a6f78@fredshack.com>
	<4D9CEEBB.7000206@redhat.com>
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: 212.27.42.5
Subject: Re: Adding malloc configure test?
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 11:29:41 -0000

At 00:52 07/04/2011, Eric Blake wrote:
>Rather than exporting the variable, the preferred syntax is:
>
>./configure ac_cv_func_malloc_0_nonnull=yes

Thanks Eric for the explanation + solution.



From MAILER-DAEMON Thu Apr 07 10:10:11 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7puV-0006gH-Fe
	for mharc-autoconf@gnu.org; Thu, 07 Apr 2011 10:10:11 -0400
Received: from [140.186.70.92] (port=59472 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7jnG-0004uI-LX
	for Autoconf@gnu.org; Thu, 07 Apr 2011 03:38:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bounces@nabble.com>) id 1Q7jnB-00077c-2e
	for Autoconf@gnu.org; Thu, 07 Apr 2011 03:38:14 -0400
Received: from sam.nabble.com ([216.139.236.26]:46568)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bounces@nabble.com>) id 1Q7jnA-00074f-VN
	for Autoconf@gnu.org; Thu, 07 Apr 2011 03:38:13 -0400
Received: from isper.nabble.com ([192.168.236.156])
	by sam.nabble.com with esmtp (Exim 4.69)
	(envelope-from <bounces@nabble.com>) id 1Q7jn8-0007Nw-2V
	for Autoconf@gnu.org; Thu, 07 Apr 2011 00:38:10 -0700
Message-ID: <31340213.post@talk.nabble.com>
Date: Thu, 7 Apr 2011 00:38:10 -0700 (PDT)
From: rden <remi.denis@edf.fr>
To: Autoconf@gnu.org
In-Reply-To: <200805302320.17910.keithmarshall@users.sourceforge.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Nabble-From: remi.denis@edf.fr
References: <BD384537F8B71B48ADAEA7DC6AD9802B132754DD@msex3.morningstar.com>
	<200805302320.17910.keithmarshall@users.sourceforge.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 216.139.236.26
X-Mailman-Approved-At: Thu, 07 Apr 2011 10:10:10 -0400
Cc: 
Subject: Re: facing error making autoconf - make[3]: *** [m4sugar.m4f] Error
 1
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 07:38:20 -0000


Hello,

I am currently trying to install autoconf and I'm facing the same problem,
though the solution you proposed seems not to work for me.=20
I'm running MinGW 5.6.1, m4 1.4.15 atm and tried with autoconf 2.60, 2.61,
2.62 and 2.67 atm. I also added some M4 environment variable, no changes.=
=20
However, I am not sure to have properly installed m4, as I'm completely new
at this. I've put the extracted files in my "C:/msys/1.0/bin" and done the
classical "configure/make/make install".

Here is my error:

mv version.m4-t version.m4
autom4te_perllibdir=3D'../..'/lib AUTOM4TE_CFG=3D'../../lib/autom4te.cfg'  =
     =20
../../bin/autom4te -B '../..'/lib -B '../..'/lib                           =
    =20
\
        --language=3Dm4sugar                      \
        --freeze                        \
        --output=3Dm4sugar.m4f
autom4te: freezing produced output:
autom4te:=20
autom4te:=20
....=20
autom4te:=20
autom4te:=20
autom4te:=20
make[3]: *** [m4sugar.m4f] Error 1
make[3]: Leaving directory `/c/build/autoconf-2.67/lib/m4sugar'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/build/autoconf-2.67/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/build/autoconf-2.67'
make: *** [all] Error 2

Any help welcomed...
Thanks in advance.=20

R=C3=A9mi





keithmarshall wrote:
>=20
> On Friday 30 May 2008 17:24, SUNIL NEGI wrote:
>> autom4te: freezing produced output:
>> make[3]: *** [m4sugar.m4f] Error 1
>> make[3]: Leaving directory
>> `/home/snegi1/dlds/autoconf-2.62/lib/m4sugar' make[2]: ***
>> [all-recursive] Error 1
>> make[2]: Leaving directory `/home/snegi1/dlds/autoconf-2.62/lib'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/snegi1/dlds/autoconf-2.62'
>> make: *** [all] Error 2
>=20
> Looks like you are using a native Win32 build of m4, rather than the one=
=20
> supplied with MSYS; that doesn't work.
>=20
>> Doing perl --version on the command prompt tells me that the version
>> is v5.6.1 built for msys.
>=20
> Good; that's as it should be.
>=20
>> I installed msys using "MSYS-1.0.10.exe"
>=20
> You also need msysDTK, but if you use only the msysDTK-1.0.1 package,=20
> that installs only m4-1.4, which is too old.  However, the solution is=20
> *not* to go build a native m4 to replace it; you should install the=20
> m4-1.4.7 update, which you will find as a separate download, in the=20
> same place as the original package:
> http://sourceforge.net/project/showfiles.php?group_id=3D2435&package_id=
=3D67879&release_id=3D131044
> http://downloads.sourceforge.net/mingw/m4-1.4.7-MSYS.tar.bz2
>=20
> Regards,
> Keith.
>=20
>=20
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> http://lists.gnu.org/mailman/listinfo/autoconf
>=20
>=20

--=20
View this message in context: http://old.nabble.com/facing-error-making-aut=
oconf---make-3-%3A-***--m4sugar.m4f--Error-1-tp17563527p31340213.html
Sent from the Gnu - Autoconf - General mailing list archive at Nabble.com.



From MAILER-DAEMON Thu Apr 07 10:13:21 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7pxY-000803-SW
	for mharc-autoconf@gnu.org; Thu, 07 Apr 2011 10:13:20 -0400
Received: from [140.186.70.92] (port=42522 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7pxX-0007zO-8m
	for Autoconf@gnu.org; Thu, 07 Apr 2011 10:13:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q7pxW-0003CJ-2N
	for Autoconf@gnu.org; Thu, 07 Apr 2011 10:13:19 -0400
Received: from mx1.redhat.com ([209.132.183.28]:59476)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q7pxV-0003Bh-Ng
	for Autoconf@gnu.org; Thu, 07 Apr 2011 10:13:18 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p37EDDfo013232
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 7 Apr 2011 10:13:13 -0400
Received: from [10.3.113.117] (ovpn-113-117.phx2.redhat.com [10.3.113.117])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p37EDDhq017529; Thu, 7 Apr 2011 10:13:13 -0400
Message-ID: <4D9DC678.1040506@redhat.com>
Date: Thu, 07 Apr 2011 08:13:12 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: rden <remi.denis@edf.fr>
References: <BD384537F8B71B48ADAEA7DC6AD9802B132754DD@msex3.morningstar.com>	<200805302320.17910.keithmarshall@users.sourceforge.net>
	<31340213.post@talk.nabble.com>
In-Reply-To: <31340213.post@talk.nabble.com>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig3BE031B8A171DCB2EBB5FC1E"
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
Subject: Re: facing error making autoconf - make[3]: *** [m4sugar.m4f] Error
 1
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 14:13:20 -0000

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

On 04/07/2011 01:38 AM, rden wrote:
>=20
> Hello,
>=20
> I am currently trying to install autoconf and I'm facing the same probl=
em,
> though the solution you proposed seems not to work for me.=20
> I'm running MinGW 5.6.1, m4 1.4.15 atm and tried with autoconf 2.60, 2.=
61,
> 2.62 and 2.67 atm. I also added some M4 environment variable, no change=
s.=20
> However, I am not sure to have properly installed m4, as I'm completely=
 new
> at this. I've put the extracted files in my "C:/msys/1.0/bin" and done =
the
> classical "configure/make/make install".
>=20
> Here is my error:
>=20
> mv version.m4-t version.m4
> autom4te_perllibdir=3D'../..'/lib AUTOM4TE_CFG=3D'../../lib/autom4te.cf=
g'       =20
> ../../bin/autom4te -B '../..'/lib -B '../..'/lib                       =
        =20
> \
>         --language=3Dm4sugar                      \
>         --freeze                        \
>         --output=3Dm4sugar.m4f
> autom4te: freezing produced output:
> autom4te:=20

This is almost surely caused by running on a platform that is not
consistently handling carriage returns (some, but not all, of the
programs in your tool chain are handling files in text mode instead of
binary mode).

You may have better luck asking on mingw lists to see how other people
have solved this, or try a different port for windows (such as cygwin,
which I know from personal experience does not suffer from these problems=
).

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig3BE031B8A171DCB2EBB5FC1E
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNncZ4AAoJEKeha0olJ0NqdYoH/2ziP/LTMwMnoFjTxDOp++/B
gtOUbUMGze9hxYZyK7gl17Iz2/JLm2MQ3iBCmOz7PXAWhWNP2DkTbXoVgzMjSYxl
IABarMKyD/MrV9cvly8q+8wIt9d311PG7UtmE4L8YPZ9P6EzXEGWAbYpFHYVXYKL
01Yi831g6akjlkELQoTNadpkLWJQm9u7HXunC5vKpcyZN+IsaCLBSOmpgOLBOYki
jSSPkeT1ZVisRX8B3Lk814Ma4NXO29L8gnq4VaxXRwntATDjfNI1MvwHYHHy41Cu
PXONA/oMK/e1zVeizWaNrDH9S+bRukhrimhs+q61cDyjIeJEqCh0agUOgINAFOc=
=OQao
-----END PGP SIGNATURE-----

--------------enig3BE031B8A171DCB2EBB5FC1E--


From MAILER-DAEMON Thu Apr 07 12:53:37 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7sSf-0005IU-9h
	for mharc-autoconf@gnu.org; Thu, 07 Apr 2011 12:53:37 -0400
Received: from [140.186.70.92] (port=37045 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7sSc-0005EL-N8
	for autoconf@gnu.org; Thu, 07 Apr 2011 12:53:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ramercer@gmail.com>) id 1Q7sSb-0000fT-Lc
	for autoconf@gnu.org; Thu, 07 Apr 2011 12:53:34 -0400
Received: from mail-iw0-f169.google.com ([209.85.214.169]:44674)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ramercer@gmail.com>) id 1Q7sSb-0000f9-Ia
	for autoconf@gnu.org; Thu, 07 Apr 2011 12:53:33 -0400
Received: by iwg8 with SMTP id 8so3577041iwg.0
	for <autoconf@gnu.org>; Thu, 07 Apr 2011 09:53:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:from:date
	:x-google-sender-auth:message-id:subject:to:content-type;
	bh=GafpKktOMj+LwcfNrM8kHBCwj3USwUHl4xWqwCNP5P4=;
	b=R3PfjKo9oKiug0pvu2mP+bCR2TR4fpwNbVcQULIjvOoWe+gwPWRTa2lXoidOpdWDJB
	KjCVqYmXkuvOSvUd5b9B5rZFObNbdR0BaW7kN9xku+US+b+YPnmJA7sRqlzseQW0hW3r
	tMuEp3e/pX0Ah6lO10Ap/hZmOlEjyfBc4aBRs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:from:date:x-google-sender-auth:message-id
	:subject:to:content-type;
	b=k+W/m0AuSPS09Kp07R+V0Comva5rmDns6ObU7RQ4VjJmAfCNVn1PhIBVW1+RAsz4FJ
	WuGVg7+tXwRQVdKRlAO9M1SS0qtQQeAotJsLNzaWfA88BSFlH7lN5WEqlt6ECiAw2EBc
	Ycv+As2Cf4n6eJbZKGdMvbol+lz59dmMd+1xk=
Received: by 10.43.46.136 with SMTP id uo8mr1809846icb.346.1302195212178; Thu,
	07 Apr 2011 09:53:32 -0700 (PDT)
MIME-Version: 1.0
Sender: ramercer@gmail.com
Received: by 10.42.167.193 with HTTP; Thu, 7 Apr 2011 09:52:52 -0700 (PDT)
From: Adam Mercer <ram@gravity.phys.uwm.edu>
Date: Thu, 7 Apr 2011 11:52:52 -0500
X-Google-Sender-Auth: 7wOvSQP73whDtgQhlgSPO2AGE68
Message-ID: <BANLkTinOf8dkv3UFwRU6H614n4OQBCyE8A@mail.gmail.com>
To: autoconf@gnu.org
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 209.85.214.169
Subject: Handling multiple conditions in if statements
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 16:53:35 -0000

Hi

In one of my macros I need to do one thing on linux platforms and
another on others, in the macro I have the followings:

  if test "x$build_os" = "xlinux"; then
    # case for linux
  else
    # other platforms
  fi

I recently received a bug report that this wasn't working as the users
system had $build_os defined as 'linux-gnu', whereas on others it was
just 'linux'. I then tried to change the if statement to:

  if test "x$build_os" = "xlinux" -o test "x$build_os" = "xlinux-gnu"; then

but that didn't work, in fact any of the usual ways I would do an OR
in shell script didn't work.

How can I have an if statement with multiple conditions? Or is there a
better way to accomplish this?

Cheers

Adam


From MAILER-DAEMON Thu Apr 07 13:02:18 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7sb4-0002dJ-Dh
	for mharc-autoconf@gnu.org; Thu, 07 Apr 2011 13:02:18 -0400
Received: from [140.186.70.92] (port=51832 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7sb0-0002as-KK
	for autoconf@gnu.org; Thu, 07 Apr 2011 13:02:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <prvs=07141d095=jeff.daily@pnl.gov>)
	id 1Q7saz-0004kZ-B6
	for autoconf@gnu.org; Thu, 07 Apr 2011 13:02:14 -0400
Received: from emailgw03.pnl.gov ([192.101.109.31]:54928)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=07141d095=jeff.daily@pnl.gov>)
	id 1Q7saz-0004jK-6Y
	for autoconf@gnu.org; Thu, 07 Apr 2011 13:02:13 -0400
Received: from emailhub02.pnl.gov ([130.20.251.62])
	by emailgw03.pnl.gov with ESMTP/TLS/AES128-SHA;
	07 Apr 2011 10:02:10 -0700
Received: from Email05.pnl.gov ([130.20.251.69]) by emailhub02.pnl.gov
	([130.20.251.62]) with mapi; Thu, 7 Apr 2011 10:01:26 -0700
From: "Daily, Jeff A" <jeff.daily@pnl.gov>
To: Adam Mercer <ram@gravity.phys.uwm.edu>
Date: Thu, 7 Apr 2011 10:02:08 -0700
Thread-Topic: Handling multiple conditions in if statements
Thread-Index: Acv1RGYk5ABVJcr+RdWN7HgsMNDhhQAALC/w
Message-ID: <F0F90F8B4D282340A6D984CE8FA7A0A701234FA19B3E@EMAIL05.pnl.gov>
References: <BANLkTinOf8dkv3UFwRU6H614n4OQBCyE8A@mail.gmail.com>
In-Reply-To: <BANLkTinOf8dkv3UFwRU6H614n4OQBCyE8A@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 192.101.109.31
Cc: "autoconf@gnu.org" <autoconf@gnu.org>
Subject: RE: Handling multiple conditions in if statements
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 17:02:15 -0000

> -----Original Message-----
> From: autoconf-bounces+jeff.daily=3Dpnl.gov@gnu.org [mailto:autoconf-
> bounces+jeff.daily=3Dpnl.gov@gnu.org] On Behalf Of Adam Mercer
> Sent: Thursday, April 07, 2011 9:53 AM
> To: autoconf@gnu.org
> Subject: Handling multiple conditions in if statements
>=20
> Hi
>=20
> In one of my macros I need to do one thing on linux platforms and another
> on others, in the macro I have the followings:
>=20
>   if test "x$build_os" =3D "xlinux"; then
>     # case for linux
>   else
>     # other platforms
>   fi
>=20
> I recently received a bug report that this wasn't working as the users sy=
stem
> had $build_os defined as 'linux-gnu', whereas on others it was just 'linu=
x'. I
> then tried to change the if statement to:
>=20
>   if test "x$build_os" =3D "xlinux" -o test "x$build_os" =3D "xlinux-gnu"=
; then
>=20
> but that didn't work, in fact any of the usual ways I would do an OR in s=
hell
> script didn't work.
>=20
> How can I have an if statement with multiple conditions? Or is there a be=
tter
> way to accomplish this?

Try a case statement.  I use the m4sh version e.g.

AS_CASE([$build_os],
	[*linux*], [AS_ECHO(["case for linux"])],
	[AS_ECHO(["other platforms"])])


From MAILER-DAEMON Thu Apr 07 13:14:07 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7smV-0006Ug-7r
	for mharc-autoconf@gnu.org; Thu, 07 Apr 2011 13:14:07 -0400
Received: from [140.186.70.92] (port=33344 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7smT-0006SG-Aj
	for autoconf@gnu.org; Thu, 07 Apr 2011 13:14:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q7smR-0008SR-W8
	for autoconf@gnu.org; Thu, 07 Apr 2011 13:14:05 -0400
Received: from mx1.redhat.com ([209.132.183.28]:64305)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q7smR-0008S4-Nh
	for autoconf@gnu.org; Thu, 07 Apr 2011 13:14:03 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p37HE2VC014098
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 7 Apr 2011 13:14:02 -0400
Received: from [10.3.113.117] (ovpn-113-117.phx2.redhat.com [10.3.113.117])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p37HE10R018324; Thu, 7 Apr 2011 13:14:01 -0400
Message-ID: <4D9DF0D8.6080706@redhat.com>
Date: Thu, 07 Apr 2011 11:14:00 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: Adam Mercer <ram@gravity.phys.uwm.edu>
References: <BANLkTinOf8dkv3UFwRU6H614n4OQBCyE8A@mail.gmail.com>
In-Reply-To: <BANLkTinOf8dkv3UFwRU6H614n4OQBCyE8A@mail.gmail.com>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigDAFAD2CFF7079E901213B9BE"
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
Subject: Re: Handling multiple conditions in if statements
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 17:14:06 -0000

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

On 04/07/2011 10:52 AM, Adam Mercer wrote:
> Hi
>=20
> In one of my macros I need to do one thing on linux platforms and
> another on others, in the macro I have the followings:
>=20
>   if test "x$build_os" =3D "xlinux"; then
>     # case for linux
>   else
>     # other platforms
>   fi
>=20
> I recently received a bug report that this wasn't working as the users
> system had $build_os defined as 'linux-gnu', whereas on others it was
> just 'linux'. I then tried to change the if statement to:
>=20
>   if test "x$build_os" =3D "xlinux" -o test "x$build_os" =3D "xlinux-gn=
u"; then

'test -o' is completely non-portable.  But even if you use it, you had a
syntax error (notice your extra 'test' operand); you meant:

if test "x$build_os" =3D "xlinux" -o "x$build_os" =3D "xlinux-gnu"; then

But, seeing how -o is non-portable, this is the correct portable
alternative:

if test "x$build_os" =3D xlinux || test "x$build_os" =3D xlinux-gnu; then=


However, that gets tedious.  When doing host comparisons, it's often
faster to use case statements (the glob lets you match multiple
platforms in one pattern, and you can match multiple patterns).  For
example:

case $build_os in
  linux* | cygwin*) # case for linux, linux-gnu, and cygwin
    ;;
  *) # other platforms
    ;;
esac

Be careful with globs that do ranges; you need to double quote to
preserve those ranges into the output.  Bad:

case $build_os in
  solaris[89]) ...;;
esac

Good, option 1 (useful if ... has no macros, allowing copy and paste to
and from the shell):

[
case $build_os in
  solaris[89]) var=3Dvalue;;
esac
]

Good, option 2 (useful if ... has macros that must not be double-quoted,
and where shell copy and paste is already a non-issue):

case $build_os in
  solaris[[89]]) AC_MSG_ERROR([unsupported]);;
esac


Finally, remember that while there are cases, like making sane guesses
while cross-compiling, where probing $host_os is the only way, it goes
against autoconf philosophy of testing features rather than platforms.
And make sure that if you are making platform-specific variables that:
1) your code will still work even if your platform-specific guess was
wrong (ie. guess pessimistically), and 2) you provide a cache variable
to allow the user to override things if you guess wrong.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enigDAFAD2CFF7079E901213B9BE
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNnfDYAAoJEKeha0olJ0NqEZgH/2c4fYgZ2y4JayTtclVfrDaq
ozWRSG8+J7dfrLH1qMSAV49JOq4+Fy/za+GTkqsBzQOTosntw9Hk+2M5tIILgxPB
pCsnMsqJp4KcHXBqsb5jGB1EoayA5WmLVeeaNy7PcBJlMQ117VP3Oq5Q5weedqrH
hbEhIoyaJLchfU+tqr5T+Wfc1+WARD3Lz32gYrz4Lfd8BwmqvEWQFFzyIXpVArQx
i/2AFJBXyoZmTq94Jk1GWSvcXICdssa8NWK5X1fc000t8dj0f0UvSFyI9wN+PyZL
0d9lpEC6HIBoWC8spDJvMlrnd+p0I8wmxw8brL9W6a5w6D0fQHgQcWx+FVDZ9ZQ=
=6umu
-----END PGP SIGNATURE-----

--------------enigDAFAD2CFF7079E901213B9BE--


From MAILER-DAEMON Thu Apr 07 14:02:37 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7tXQ-0000Bp-Ut
	for mharc-autoconf@gnu.org; Thu, 07 Apr 2011 14:02:36 -0400
Received: from [140.186.70.92] (port=43106 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7tXP-0000BS-Cr
	for autoconf@gnu.org; Thu, 07 Apr 2011 14:02:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ramercer@gmail.com>) id 1Q7tXO-0006QT-9T
	for autoconf@gnu.org; Thu, 07 Apr 2011 14:02:35 -0400
Received: from mail-iy0-f169.google.com ([209.85.210.169]:61966)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ramercer@gmail.com>) id 1Q7tXO-0006Q6-4g
	for autoconf@gnu.org; Thu, 07 Apr 2011 14:02:34 -0400
Received: by iyf13 with SMTP id 13so3638509iyf.0
	for <autoconf@gnu.org>; Thu, 07 Apr 2011 11:02:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc:content-type:content-transfer-encoding;
	bh=JW2XS9kdpRebjjG6yFUW9pleZ5ha0AzZCSpi9r0ZmZA=;
	b=Ewd46gPoWvh22O05NAl83p7Ph8ja4TsujJPqjdCgUuuOWNPMkw/+vFG2jm1nQiyKYs
	njaNnmHizVS0G/shRBGyM+sJ52KpqsBZ6/ktT6XjqPk2y18eMmD63KkcCTtf5iraWl+R
	we/gJrw5j3PfDp6P4hauT9iFzzdYADjkqooQ4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=uVAaI3GJBF7D50QGXmOj1dVMULdfmjpbGh8gNEopMHTN74HHO1zhV/qsKQl+hUu3NT
	J/O0YV1OVGYFM+7jBGUyCFsOSN37yzju1qdbIZLKmEPQ7fbV6qq5hAaG2gGwBtpuH4zu
	OoJOU+JgFi0JZtUic4ogp/YlndYqgFSCKOFq4=
Received: by 10.42.142.9 with SMTP id q9mr1852676icu.413.1302199353088; Thu,
	07 Apr 2011 11:02:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.42.167.193 with HTTP; Thu, 7 Apr 2011 11:01:53 -0700 (PDT)
In-Reply-To: <F0F90F8B4D282340A6D984CE8FA7A0A701234FA19B3E@EMAIL05.pnl.gov>
References: <BANLkTinOf8dkv3UFwRU6H614n4OQBCyE8A@mail.gmail.com>
	<F0F90F8B4D282340A6D984CE8FA7A0A701234FA19B3E@EMAIL05.pnl.gov>
From: Adam Mercer <ramercer@gmail.com>
Date: Thu, 7 Apr 2011 13:01:53 -0500
Message-ID: <BANLkTikVraMe+VfaiyLGAauMc6P7jHrAoQ@mail.gmail.com>
To: "Daily, Jeff A" <jeff.daily@pnl.gov>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 209.85.210.169
Cc: "autoconf@gnu.org" <autoconf@gnu.org>
Subject: Re: Handling multiple conditions in if statements
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 18:02:36 -0000

On Thu, Apr 7, 2011 at 12:02, Daily, Jeff A <jeff.daily@pnl.gov> wrote:

> Try a case statement. =A0I use the m4sh version e.g.
>
> AS_CASE([$build_os],
> =A0 =A0 =A0 =A0[*linux*], [AS_ECHO(["case for linux"])],
> =A0 =A0 =A0 =A0[AS_ECHO(["other platforms"])])

Thanks, I didn't think about case. Thats seems the most appropriate
way to handle this.

Cheers

Adam


From MAILER-DAEMON Thu Apr 07 14:05:18 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q7ta2-0001pa-Cv
	for mharc-autoconf@gnu.org; Thu, 07 Apr 2011 14:05:18 -0400
Received: from [140.186.70.92] (port=46329 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q7ta0-0001pJ-N9
	for autoconf@gnu.org; Thu, 07 Apr 2011 14:05:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ramercer@gmail.com>) id 1Q7tZz-0007iv-NX
	for autoconf@gnu.org; Thu, 07 Apr 2011 14:05:16 -0400
Received: from mail-iw0-f169.google.com ([209.85.214.169]:39009)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ramercer@gmail.com>) id 1Q7tZz-0007ie-DP
	for autoconf@gnu.org; Thu, 07 Apr 2011 14:05:15 -0400
Received: by iwg8 with SMTP id 8so3657362iwg.0
	for <autoconf@gnu.org>; Thu, 07 Apr 2011 11:05:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc:content-type:content-transfer-encoding;
	bh=kBu5InKiArLxWmPF1ZxXg9thgEBASXFlZmKzgYyjsCk=;
	b=T9fZf/WG7bNZD0BB7clol9a+BMiIlUkToUBMTmS9WSVudX280voGHYudNnoIODiGgY
	kP6cpw0QG7ytrYD7zXPrAUBgwFZ1rw5Lj1mH922Um30Mk2bZTj89GcmYYPr0opoeJlZm
	2nUhOussWk/LZp7ytxM5cOQjp83AQuL5VXJSg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=D45aKu+YTy9eS1ZnEi7Myg3FadEuoXVd18dfPZLjX5RkevO/mcJqzPQBzX1Hyk92U5
	i715NvQ/O+DtY4dXXoRMKrV09HaSia4QegSWs/9azj9wsa/zFwV+JIEaXz3MRo5+2+LA
	WHDrpW3vEgqdP2FTGFsSggZKuD63p+GWdc/pU=
Received: by 10.43.65.71 with SMTP id xl7mr1652515icb.480.1302199514560; Thu,
	07 Apr 2011 11:05:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.42.167.193 with HTTP; Thu, 7 Apr 2011 11:04:31 -0700 (PDT)
In-Reply-To: <4D9DF0D8.6080706@redhat.com>
References: <BANLkTinOf8dkv3UFwRU6H614n4OQBCyE8A@mail.gmail.com>
	<4D9DF0D8.6080706@redhat.com>
From: Adam Mercer <ramercer@gmail.com>
Date: Thu, 7 Apr 2011 13:04:31 -0500
Message-ID: <BANLkTinmFGX=emHKekmm8FrF9grhorJ6yg@mail.gmail.com>
To: Eric Blake <eblake@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 209.85.214.169
Cc: autoconf@gnu.org
Subject: Re: Handling multiple conditions in if statements
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 18:05:17 -0000

On Thu, Apr 7, 2011 at 12:14, Eric Blake <eblake@redhat.com> wrote:

> 'test -o' is completely non-portable.

Best to avoid that then

> case $build_os in
> =A0linux* | cygwin*) # case for linux, linux-gnu, and cygwin
> =A0 =A0;;
> =A0*) # other platforms
> =A0 =A0;;
> esac

case seems like the appropriate solution. Thanks.

> Finally, remember that while there are cases, like making sane guesses
> while cross-compiling, where probing $host_os is the only way, it goes
> against autoconf philosophy of testing features rather than platforms.
> And make sure that if you are making platform-specific variables that:
> 1) your code will still work even if your platform-specific guess was
> wrong (ie. guess pessimistically), and 2) you provide a cache variable
> to allow the user to override things if you guess wrong.

Thanks for the warning.

Cheers

Adam


From MAILER-DAEMON Fri Apr 08 14:07:27 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q8G5f-0007xM-7T
	for mharc-autoconf@gnu.org; Fri, 08 Apr 2011 14:07:27 -0400
Received: from [140.186.70.92] (port=55984 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q8Fzx-0002xW-Ht
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:01:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Stephen.Henry@synopsys.com>) id 1Q8Fzv-0005SS-R2
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:01:33 -0400
Received: from alvesta.synopsys.com ([198.182.60.77]:47063)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Stephen.Henry@synopsys.com>) id 1Q8Fzv-0005Ru-Jf
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:01:31 -0400
Received: from crone.synopsys.com (crone.synopsys.com [146.225.7.23])
	by alvesta.synopsys.com (Postfix) with ESMTP id 3211346EF
	for <autoconf@gnu.org>; Fri,  8 Apr 2011 11:01:28 -0700 (PDT)
Received: from us01wxhtc2.internal.synopsys.com (localhost [127.0.0.1])
	by crone.synopsys.com (8.9.1/8.9.1) with ESMTP id LAA24737
	for <autoconf@gnu.org>; Fri, 8 Apr 2011 11:01:22 -0700 (PDT)
Received: from US01WXMBX1.internal.synopsys.com ([10.15.75.41]) by
	us01wxhtc2.internal.synopsys.com ([10.15.75.40]) with mapi;
	Fri, 8 Apr 2011 11:01:21 -0700
From: Stephen Henry <Stephen.Henry@synopsys.com>
To: "autoconf@gnu.org" <autoconf@gnu.org>
Date: Fri, 8 Apr 2011 11:01:20 -0700
Thread-Topic: error: '' is already registered with AC_CONFIG_FILES
Thread-Index: Acv2FvbuTpQncp8oSnmgNJdLQQ149A==
Message-ID: <C4697C080F3434439C6619791F95C52D01489E1DD9@US01WXMBX1.internal.synopsys.com>
Accept-Language: en-US
Content-Language: en-US
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 198.182.60.77
X-Mailman-Approved-At: Fri, 08 Apr 2011 14:07:25 -0400
Cc: Stephen Henry <Stephen.Henry@synopsys.com>
Subject: error: '' is already registered with AC_CONFIG_FILES
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Apr 2011 18:01:34 -0000

Hi,

We are using autoconf as part of our build system but have run into an erro=
r. When invoking autoconf, the following error is reported:

configure.in:295: error: '<filename>' is already registered with AC_CONFIG_=
FILES

where: <filename> is the name of a Makefile.am in our project.

The construct in which this error appears is:

AS_IF([test...],
[AC_CONFIG_FILES([
	... list of Makefiles in various directories
	[AS_IF([test...],
		 [makefile1.am
		  makefile2.am
		  makefile3.am])]
	])
])

I have verified that the list does not contain duplicate Makefile entries. =
The configuration script works fine when I remove the [AS_IF] statement, bu=
t not when it is included. I am fairly confident that the syntax used is co=
rrect and I have removed all trailing whitespace etc... Also, all of the Ma=
kefiles have been verified to be in UNIX format.

I am using autoconf 2.68 and m4 1.4.15.

Any help would be appreciated.

Kind regards,

Steve


From MAILER-DAEMON Fri Apr 08 14:17:06 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q8GF0-0000EC-4W
	for mharc-autoconf@gnu.org; Fri, 08 Apr 2011 14:17:06 -0400
Received: from [140.186.70.92] (port=42347 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q8GEx-0000BU-Ad
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:17:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q8GEv-0002VS-O5
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:17:03 -0400
Received: from mx1.redhat.com ([209.132.183.28]:53526)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1Q8GEv-0002V4-AB
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:17:01 -0400
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 p38IH02Q027590
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 8 Apr 2011 14:17:00 -0400
Received: from [10.3.113.117] (ovpn-113-117.phx2.redhat.com [10.3.113.117])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p38IGxP4024856; Fri, 8 Apr 2011 14:16:59 -0400
Message-ID: <4D9F511A.8010503@redhat.com>
Date: Fri, 08 Apr 2011 12:16:58 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: Stephen Henry <Stephen.Henry@synopsys.com>
References: <C4697C080F3434439C6619791F95C52D01489E1DD9@US01WXMBX1.internal.synopsys.com>
In-Reply-To: <C4697C080F3434439C6619791F95C52D01489E1DD9@US01WXMBX1.internal.synopsys.com>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigD30A71AE6B44344445AC79CE"
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@gnu.org" <autoconf@gnu.org>
Subject: Re: error: '' is already registered with AC_CONFIG_FILES
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Apr 2011 18:17:04 -0000

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

On 04/08/2011 12:01 PM, Stephen Henry wrote:
>=20
> The construct in which this error appears is:
>=20
> AS_IF([test...],
> [AC_CONFIG_FILES([
> 	... list of Makefiles in various directories
> 	[AS_IF([test...],
> 		 [makefile1.am
> 		  makefile2.am
> 		  makefile3.am])]
> 	])
> ])

Try swapping your conditionals.  AC_CONFIG_FILES expects literal file
names, but the text "[AS_IF..." is not a literal filename.  Meanwhile,
it is safe to call AC_CONFIG_FILES more than once.

AC_CONFIG_FILES([... list of unconditional makefiles])
AS_IF([test...],
  [AC_CONFIG_FILES([makefile1.am makefile2.am makefile3.am])])

>=20
> I have verified that the list does not contain duplicate Makefile entri=
es. The configuration script works fine when I remove the [AS_IF] stateme=
nt, but not when it is included. I am fairly confident that the syntax us=
ed is correct and I have removed all trailing whitespace etc... Also, all=
 of the Makefiles have been verified to be in UNIX format.
>=20
> I am using autoconf 2.68 and m4 1.4.15.

Consider upgrading to m4 1.4.16; there was a nasty strstr() bug in m4
1.4.15 that has been proven to generate broken configure files in some
cases.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enigD30A71AE6B44344445AC79CE
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNn1EaAAoJEKeha0olJ0Nq4tkIAIN6q219Ulk79Wyq/oZjWNU0
2ige458dHqb6abHpaOAlg1ZvVRVYi/X3NK5M6qmWE6uDkhzwV3BiOUQb7D9iD/NK
I9G8PbJ+CJyevTuLql5JF7qcpS8TeRhZ12Ckm0UM2DGZ1IOagdEo/883cbSY8Rhd
+S3Ex0s/zSs1JPtEkylxUV5BFHWUlEzChrOlQpEWbwN+2BvavNfvt4jOu8eh07sT
YGaCBI57OQxBYRV9WPWbQQS4xnWhcdEdH0rLgbruvNE0gUFSS1jnpEDzit1RiF6N
7flkeGhtiZmCZ3xGKkX3VWdFaWtp79q9OhFs59JVR1NnOE39dOU/gZQQ46h/YFU=
=Rs2M
-----END PGP SIGNATURE-----

--------------enigD30A71AE6B44344445AC79CE--


From MAILER-DAEMON Fri Apr 08 14:28:05 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q8GPd-0002MF-7W
	for mharc-autoconf@gnu.org; Fri, 08 Apr 2011 14:28:05 -0400
Received: from [140.186.70.92] (port=39771 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q8GPb-0002LP-5d
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:28:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Stephen.Henry@synopsys.com>) id 1Q8GPZ-0006Ty-JF
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:28:03 -0400
Received: from us01smtp3.synopsys.com ([198.182.44.81]:34644
	helo=hermes.synopsys.com) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Stephen.Henry@synopsys.com>) id 1Q8GPZ-0006TP-Ev
	for autoconf@gnu.org; Fri, 08 Apr 2011 14:28:01 -0400
Received: from mother.synopsys.com (mother.synopsys.com [146.225.100.171])
	by hermes.synopsys.com (Postfix) with ESMTP id 854D944AD;
	Fri,  8 Apr 2011 11:27:58 -0700 (PDT)
Received: from us01wxhtc3.internal.synopsys.com (localhost [127.0.0.1])
	by mother.synopsys.com (8.9.1/8.9.1) with ESMTP id LAA18788;
	Fri, 8 Apr 2011 11:27:57 -0700 (PDT)
Received: from US01WXMBX1.internal.synopsys.com ([10.15.75.41]) by
	us01wxhtc3.internal.synopsys.com ([10.12.231.72]) with mapi;
	Fri, 8 Apr 2011 11:27:57 -0700
From: Stephen Henry <Stephen.Henry@synopsys.com>
To: Eric Blake <eblake@redhat.com>, Stephen Henry <Stephen.Henry@synopsys.COM>
Date: Fri, 8 Apr 2011 11:27:55 -0700
Thread-Topic: error: '' is already registered with AC_CONFIG_FILES
Thread-Index: Acv2GSmHWvMnsu73SR+H3lgPVuSICAAAWURg
Message-ID: <C4697C080F3434439C6619791F95C52D01489E1E2C@US01WXMBX1.internal.synopsys.com>
References: <C4697C080F3434439C6619791F95C52D01489E1DD9@US01WXMBX1.internal.synopsys.com>
	<4D9F511A.8010503@redhat.com>
In-Reply-To: <4D9F511A.8010503@redhat.com>
Accept-Language: en-US
Content-Language: en-US
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 198.182.44.81
Cc: "autoconf@gnu.org" <autoconf@gnu.org>
Subject: RE: error: '' is already registered with AC_CONFIG_FILES
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Apr 2011 18:28:04 -0000

It would appear that altering the code into two AC_CONFIG_FILE statements w=
orked. Thank you for the help. I'll up to the later version of m4 too.

Thanks,
Steve

-----Original Message-----
From: Eric Blake [mailto:eblake@redhat.com]=20
Sent: Friday, April 08, 2011 11:17 AM
To: Stephen Henry
Cc: autoconf@gnu.org
Subject: Re: error: '' is already registered with AC_CONFIG_FILES

On 04/08/2011 12:01 PM, Stephen Henry wrote:
>=20
> The construct in which this error appears is:
>=20
> AS_IF([test...],
> [AC_CONFIG_FILES([
> 	... list of Makefiles in various directories
> 	[AS_IF([test...],
> 		 [makefile1.am
> 		  makefile2.am
> 		  makefile3.am])]
> 	])
> ])

Try swapping your conditionals.  AC_CONFIG_FILES expects literal file names=
, but the text "[AS_IF..." is not a literal filename.  Meanwhile, it is saf=
e to call AC_CONFIG_FILES more than once.

AC_CONFIG_FILES([... list of unconditional makefiles]) AS_IF([test...],
  [AC_CONFIG_FILES([makefile1.am makefile2.am makefile3.am])])

>=20
> I have verified that the list does not contain duplicate Makefile entries=
. The configuration script works fine when I remove the [AS_IF] statement, =
but not when it is included. I am fairly confident that the syntax used is =
correct and I have removed all trailing whitespace etc... Also, all of the =
Makefiles have been verified to be in UNIX format.
>=20
> I am using autoconf 2.68 and m4 1.4.15.

Consider upgrading to m4 1.4.16; there was a nasty strstr() bug in m4
1.4.15 that has been proven to generate broken configure files in some case=
s.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



From MAILER-DAEMON Sun Apr 10 11:28:30 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q8wYw-0003Hp-CD
	for mharc-autoconf@gnu.org; Sun, 10 Apr 2011 11:28:30 -0400
Received: from [140.186.70.92] (port=35340 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q8wYu-0003Hh-Sz
	for autoconf@gnu.org; Sun, 10 Apr 2011 11:28:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1Q8wYt-0003kn-MS
	for autoconf@gnu.org; Sun, 10 Apr 2011 11:28:28 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:39875)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>)
	id 1Q8wYt-0003k2-DS; Sun, 10 Apr 2011 11:28:27 -0400
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
	p3AFSIQC014688; Sun, 10 Apr 2011 10:28:19 -0500 (CDT)
Date: Sun, 10 Apr 2011 10:28:18 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Bruce Korb <bkorb@gnu.org>
In-Reply-To: <4D9CC60D.4040300@gnu.org>
Message-ID: <alpine.GSO.2.01.1104101025480.10593@freddy.simplesystems.org>
References: <4D9CB038.4050604@gmail.com> <4D9CC60D.4040300@gnu.org>
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]);
	Sun, 10 Apr 2011 10:28:19 -0500 (CDT)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
Cc: GNU Autoconf mailing list <autoconf@gnu.org>
Subject: Re: Never mind: no AC_LANG_SOURCE call detected in body
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 10 Apr 2011 15:28:29 -0000

On Wed, 6 Apr 2011, Bruce Korb wrote:

> On 04/06/11 11:26, Bruce Korb wrote:
>> I was trying to chase down some still-hanging-around warnings.
>> This warning is insufficiently clear because I *do* have AC_LANG_SOURCE:
>
> Never mind.  This has become an irreproducible result.
> Without knowing what I've done differently (something, surely),
> the issue has disappeared....

I encountered this same situation yesterday.  The "solution" was to 
re-libtoolize and re-bootstrap the project and then the problem went 
away.

Bob

>
>> configure.ac:139: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call 
>> detected in body
>
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> http://lists.gnu.org/mailman/listinfo/autoconf
>

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


From MAILER-DAEMON Thu Apr 14 10:24:37 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QANTJ-00085V-1A
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 10:24:37 -0400
Received: from eggs.gnu.org ([140.186.70.92]:54921)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QAMES-0003o1-6Z
	for autoconf@gnu.org; Thu, 14 Apr 2011 09:05:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QAMEN-0004Y7-7s
	for autoconf@gnu.org; Thu, 14 Apr 2011 09:05:12 -0400
Received: from lo.gmane.org ([80.91.229.12]:44482)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QAMEM-0004Xw-RK
	for autoconf@gnu.org; Thu, 14 Apr 2011 09:05:07 -0400
Received: from list by lo.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QAMEK-00031l-Eg
	for autoconf@gnu.org; Thu, 14 Apr 2011 15:05:04 +0200
Received: from mar92-9-82-237-75-54.fbx.proxad.net ([82.237.75.54])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Thu, 14 Apr 2011 15:05:04 +0200
Received: from codecomplete by mar92-9-82-237-75-54.fbx.proxad.net with local
	(Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Thu, 14 Apr 2011 15:05:04 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: autoconf@gnu.org
From: Gilles <codecomplete@free.fr>
Subject: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Thu, 14 Apr 2011 15:02:22 +0200
Lines: 22
Message-ID: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: mar92-9-82-237-75-54.fbx.proxad.net
X-Newsreader: Forte Agent 3.1/32.783
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 80.91.229.12
X-Mailman-Approved-At: Thu, 14 Apr 2011 10:24:35 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Apr 2011 13:05:13 -0000

Hello,

A cross-compile toolchain that I use just refuses to compile any code
that uses fork() because uClinux uses vfork() instead:

"undefined reference to `_fork'"

However, some applications use if/else blocks just as this one instead
of eg. "#ifdef HAVE_FOR" conditional compiling:
============
if (uClinux) {
	*pid = vfork();
} else {
	*pid = fork();
}
============

Is it possible to modify configure.ac so that it goes ahead and
compiles applications that handle fork/vfork without preprocessor
commands?

Thank you.



From MAILER-DAEMON Thu Apr 14 14:27:57 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QARGn-0001o3-9J
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 14:27:57 -0400
Received: from eggs.gnu.org ([140.186.70.92]:37747)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARGl-0001nx-0e
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:27:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARGj-0006TQ-Uc
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:27:54 -0400
Received: from nspiron-3.llnl.gov ([128.115.41.83]:35354 helo=smtp.llnl.gov)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARGj-0006TD-Q1
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:27:53 -0400
X-Attachments: None
Received: from nspexhub-1.llnl.gov (HELO nspexhub-1.the-lab.llnl.gov)
	([128.115.54.113])
	by smtp.llnl.gov with ESMTP; 14 Apr 2011 11:27:51 -0700
Received: from NSPEXMBX-C.the-lab.llnl.gov ([128.115.54.107]) by
	nspexhub-1.the-lab.llnl.gov ([172.16.54.113]) with mapi;
	Thu, 14 Apr 2011 11:27:41 -0700
From: "Too, Justin A." <too1@llnl.gov>
To: "autoconf@gnu.org" <autoconf@gnu.org>
Date: Thu, 14 Apr 2011 11:27:40 -0700
Subject: Proper m4 quoting
Thread-Topic: Proper m4 quoting
Thread-Index: Acv60aN5hC76RIdTTlaZ1prZmac2Zg==
Message-ID: <C9CC8AAC.4E8C%too1@llnl.gov>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-MacOutlook/14.2.0.101115
acceptlanguage: en-US
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 128.115.41.83
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Apr 2011 18:27:55 -0000

Hi all,

I need some help with m4 quoting, http://pastebin.com/xzQNKCFv yet again =
=3D)

Thanks,
Justin

From MAILER-DAEMON Thu Apr 14 14:36:05 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAROf-0003Ra-G1
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 14:36:05 -0400
Received: from eggs.gnu.org ([140.186.70.92]:59369)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QAROd-0003RU-4A
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:36:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QAROb-0008Up-W9
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:36:03 -0400
Received: from mx1.redhat.com ([209.132.183.28]:11149)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QAROb-0008UV-KV
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:36:01 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3EIZx0l024396
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 14 Apr 2011 14:35:59 -0400
Received: from [10.3.113.38] (ovpn-113-38.phx2.redhat.com [10.3.113.38])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p3EIZw2O014730; Thu, 14 Apr 2011 14:35:58 -0400
Message-ID: <4DA73E8D.8000800@redhat.com>
Date: Thu, 14 Apr 2011 12:35:57 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: "Too, Justin A." <too1@llnl.gov>
Subject: Re: Proper m4 quoting
References: <C9CC8AAC.4E8C%too1@llnl.gov>
In-Reply-To: <C9CC8AAC.4E8C%too1@llnl.gov>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig47CABB5A83B302848C6A3E59"
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Apr 2011 18:36:04 -0000

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

On 04/14/2011 12:27 PM, Too, Justin A. wrote:
> Hi all,
>=20
> I need some help with m4 quoting, http://pastebin.com/xzQNKCFv yet agai=
n =3D)

That didn't resolve.  Furthermore, pastebin expires posts after a
certain amount of time; but I'd rather have your question archived in
the mailing list so that others facing the same issue may learn from it.
 Would you mind reposting your issue directly to the list instead of
using pastebin?

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig47CABB5A83B302848C6A3E59
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNpz6OAAoJEKeha0olJ0NqqFUH/RwPSJ7o2vGNEw5QRQwEusGZ
rc4QdNf6CRDvB3VfI0J6G5Sm3XdHCaLSqY3SqxWvV/j+ms3S3QdmnY4GJPfbMDsX
DW81kkcDZTOe1QwRgn/0rn95IK1tHTS8br9lR30QhRh4aTzEiEddh4A4F/oKV48a
b7eMZm0d3ki5Cd0bSwr9A5IdYCDTebD/RxXGVkeVSUK/PUlBv+14AtRPsIvnzxkL
aIDPsfYYU2UxXqArYUY+oNX/K/3gFR5MhG2qN1U5E0Oc2ddbCPcJcZlsLmiRyATS
VyPl1Q6STVYnPtxHTXJdIJ446fwGmyuLELobLVsOMTQkbmFp0RqSe2R9U/u9c9A=
=/eSK
-----END PGP SIGNATURE-----

--------------enig47CABB5A83B302848C6A3E59--


From MAILER-DAEMON Thu Apr 14 14:39:35 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QARS3-0003jt-9Q
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 14:39:35 -0400
Received: from eggs.gnu.org ([140.186.70.92]:60084)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARS1-0003jk-FQ
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:39:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARS0-0000gk-6w
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:39:33 -0400
Received: from nspiron-1.llnl.gov ([128.115.41.81]:3217)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARS0-0000gZ-2b
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:39:32 -0400
X-Attachments: None
Received: from nspexhub-1.llnl.gov (HELO nspexhub-1.the-lab.llnl.gov)
	([128.115.54.113])
	by nspiron-1.llnl.gov with ESMTP; 14 Apr 2011 11:39:31 -0700
Received: from NSPEXMBX-C.the-lab.llnl.gov ([128.115.54.107]) by
	nspexhub-1.the-lab.llnl.gov ([172.16.54.113]) with mapi;
	Thu, 14 Apr 2011 11:39:31 -0700
From: "Too, Justin A." <too1@llnl.gov>
To: Eric Blake <eblake@redhat.com>
Date: Thu, 14 Apr 2011 11:39:29 -0700
Subject: Re: Proper m4 quoting
Thread-Topic: Proper m4 quoting
Thread-Index: Acv600ppCd2mHvw1TQC1yH8lYYvUjg==
Message-ID: <C9CC8D26.4E92%too1@llnl.gov>
In-Reply-To: <4DA73E8D.8000800@redhat.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-MacOutlook/14.2.0.101115
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 128.115.41.81
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Apr 2011 18:39:34 -0000

Hi Eric,

Sorry, here you are:

I've tried many permutations of quoting, but obviously I'm missing a
fundamental understanding for this use case:

------------------------------------------------------------------------

AC_DEFUN([SUPPORT_TEST],
[
AC_MSG_CHECKING([for test])

test_executable=3D"$$][(top_builddir)/scripts/test/bin/my_test"
AC_SUBST(QMTEST, [$test_executable])

AC_MSG_RESULT([done])
])


Evaluates to:=20

22839(top_builddir)/scripts/test_harness/test/bin/my_test

I need

$(top_builddir)/scripts/test_harness/test/bin/my_test


------------------------------------------------------------------------

Thanks,
Justin


On 4/14/11 11:35 AM, "Eric Blake" <eblake@redhat.com> wrote:

>On 04/14/2011 12:27 PM, Too, Justin A. wrote:
>> Hi all,
>>=20
>> I need some help with m4 quoting, http://pastebin.com/xzQNKCFv yet
>>again =3D)
>
>That didn't resolve.  Furthermore, pastebin expires posts after a
>certain amount of time; but I'd rather have your question archived in
>the mailing list so that others facing the same issue may learn from it.
> Would you mind reposting your issue directly to the list instead of
>using pastebin?
>
>--=20
>Eric Blake   eblake@redhat.com    +1-801-349-2682
>Libvirt virtualization library http://libvirt.org
>



From MAILER-DAEMON Thu Apr 14 14:49:16 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QARbQ-0004Mv-Ck
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 14:49:16 -0400
Received: from eggs.gnu.org ([140.186.70.92]:35029)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QARbN-0004Mo-Uc
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:49:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QARbM-0002qr-RG
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:49:13 -0400
Received: from mx1.redhat.com ([209.132.183.28]:19694)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QARbM-0002ql-H3
	for autoconf@gnu.org; Thu, 14 Apr 2011 14:49:12 -0400
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 p3EInARl028485
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 14 Apr 2011 14:49:11 -0400
Received: from [10.3.113.38] (ovpn-113-38.phx2.redhat.com [10.3.113.38])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p3EInAPL021064; Thu, 14 Apr 2011 14:49:10 -0400
Message-ID: <4DA741A5.3060805@redhat.com>
Date: Thu, 14 Apr 2011 12:49:09 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: "Too, Justin A." <too1@llnl.gov>
Subject: Re: Proper m4 quoting
References: <C9CC8D26.4E92%too1@llnl.gov>
In-Reply-To: <C9CC8D26.4E92%too1@llnl.gov>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig6C3E544960D6BA74947E037D"
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: "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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Apr 2011 18:49:15 -0000

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

[please don't top-post on technical lists]

On 04/14/2011 12:39 PM, Too, Justin A. wrote:
> Hi Eric,
>=20
> Sorry, here you are:

Thanks.

>=20
> I've tried many permutations of quoting, but obviously I'm missing a
> fundamental understanding for this use case:
>=20
> -----------------------------------------------------------------------=
-
>=20
> AC_DEFUN([SUPPORT_TEST],
> [
> AC_MSG_CHECKING([for test])
>=20
> test_executable=3D"$$][(top_builddir)/scripts/test/bin/my_test"

Why the $$ here?  M4 doesn't give $$ any special treatment, and the m4
end-quote/start-quote sequence of ][ doesn't really matter.  You ended
up creating the following line of shell code:

test_executable=3D"$$(top_builddir)/scripts/test/bin/my_test"

and, at shell time, $$ is the process id, explaining your results.

> AC_SUBST(QMTEST, [$test_executable])

While this line works as-is (provided QMTEST is not an m4 macro name),
you are better off getting in the habit of recommended quoting style:

AC_SUBST([QMTEST], [$test_executable])

>=20
> 22839(top_builddir)/scripts/test_harness/test/bin/my_test
>=20
> I need
>=20
> $(top_builddir)/scripts/test_harness/test/bin/my_test

Then use:

test_executable=3D"\$(top_builddir)/scripts/test/bin/my_test"

to get a literal $ into the contents of $test_executable, or:

test_executable=3D"$top_builddir/scripts/test/bin/my_test"

if you wanted the shell to expand $top_builddir prior to assigning to
$test_executable.  At any rate, neither line variant contains anything
that requires extra m4 quoting or escaping.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig6C3E544960D6BA74947E037D
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNp0GlAAoJEKeha0olJ0Nq6f0IAJCaKyiT6elKHuWqLlJVzIRO
fAlfcdCEfraFyOAyoqRq3/jSHLgSnpoRhg4IgSrLfBasI1VCQAEzNS7gHQc47LtJ
thQMHEwn/6qqaY+8WGr/2uYaclK5Zyf/kUYZ74oeLy18pyrM2gYX23DRwe5J4vHx
2kzAGl6H25IQ2Vlg/0fvMY+6aKIkRc45dr7fXnZRkpiRKqrMksbYUgvCvxdOaD3i
Xud7H3oPzI+sNRl73ikSfxXaBw4ZF4lHmbpqKuKlew9Fkf9LXDBDR04P+HrdvHCR
t0U5mygn45bCge5LIYlTRDlkehTe4m138yTSBsIs8LfRTKLRXfK7J1Q9SqbVUN0=
=/juk
-----END PGP SIGNATURE-----

--------------enig6C3E544960D6BA74947E037D--


From MAILER-DAEMON Thu Apr 14 15:05:04 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QARqh-0006VH-V7
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 15:05:04 -0400
Received: from eggs.gnu.org ([140.186.70.92]:56305)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARqf-0006VB-TS
	for autoconf@gnu.org; Thu, 14 Apr 2011 15:05:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARqe-0005MO-JL
	for autoconf@gnu.org; Thu, 14 Apr 2011 15:05:01 -0400
Received: from nspiron-1.llnl.gov ([128.115.41.81]:27980)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QARqe-0005MI-Ca
	for autoconf@gnu.org; Thu, 14 Apr 2011 15:05:00 -0400
X-Attachments: None
Received: from nspexhub-2.llnl.gov (HELO nspexhub-2.the-lab.llnl.gov)
	([128.115.54.114])
	by nspiron-1.llnl.gov with ESMTP; 14 Apr 2011 12:04:59 -0700
Received: from NSPEXMBX-C.the-lab.llnl.gov ([128.115.54.107]) by
	nspexhub-2.the-lab.llnl.gov ([172.16.54.114]) with mapi;
	Thu, 14 Apr 2011 12:04:59 -0700
From: "Too, Justin A." <too1@llnl.gov>
To: Eric Blake <eblake@redhat.com>
Date: Thu, 14 Apr 2011 12:04:56 -0700
Subject: Re: Proper m4 quoting
Thread-Topic: Proper m4 quoting
Thread-Index: Acv61tkJmx+fyuWpRyCWIrcYxI2G3w==
Message-ID: <C9CC92F3.4EAC%too1@llnl.gov>
In-Reply-To: <4DA741A5.3060805@redhat.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-MacOutlook/14.2.0.101115
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 128.115.41.81
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Apr 2011 19:05:03 -0000

On 4/14/11 11:49 AM, "Eric Blake" <eblake@redhat.com> wrote:

>[please don't top-post on technical lists]

I have much to learn =3D)

>
>On 04/14/2011 12:39 PM, Too, Justin A. wrote:
>> Hi Eric,
>>=20
>> Sorry, here you are:
>
>Thanks.
>
>>=20
>> I've tried many permutations of quoting, but obviously I'm missing a
>> fundamental understanding for this use case:
>>=20
>> ------------------------------------------------------------------------
>>=20
>> AC_DEFUN([SUPPORT_TEST],
>> [
>> AC_MSG_CHECKING([for test])
>>=20
>> test_executable=3D"$$][(top_builddir)/scripts/test/bin/my_test"
>
>Why the $$ here?  M4 doesn't give $$ any special treatment, and the m4
>end-quote/start-quote sequence of ][ doesn't really matter.  You ended
>up creating the following line of shell code:
>
>test_executable=3D"$$(top_builddir)/scripts/test/bin/my_test"
>
>and, at shell time, $$ is the process id, explaining your results.

I think in my rush, I was confusing Automake/m4 issues, hence the '$$',
since I was trying to keep the '$'.

>
>> AC_SUBST(QMTEST, [$test_executable])
>
>While this line works as-is (provided QMTEST is not an m4 macro name),
>you are better off getting in the habit of recommended quoting style:
>
>AC_SUBST([QMTEST], [$test_executable])
>
>>=20
>> 22839(top_builddir)/scripts/test_harness/test/bin/my_test
>>=20
>> I need
>>=20
>> $(top_builddir)/scripts/test_harness/test/bin/my_test
>
>Then use:
>
>test_executable=3D"\$(top_builddir)/scripts/test/bin/my_test"
>
>to get a literal $ into the contents of $test_executable, or:
>
>test_executable=3D"$top_builddir/scripts/test/bin/my_test"
>
>if you wanted the shell to expand $top_builddir prior to assigning to
>$test_executable.  At any rate, neither line variant contains anything
>that requires extra m4 quoting or escaping.
>
>--=20
>Eric Blake   eblake@redhat.com    +1-801-349-2682
>Libvirt virtualization library http://libvirt.org
>

Thank you for your help, everything is good to go now.


Justin


>



From MAILER-DAEMON Thu Apr 14 15:24:25 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAS9R-0000XW-Qd
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 15:24:25 -0400
Received: from eggs.gnu.org ([140.186.70.92]:33031)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QAS9Q-0000Wn-I5
	for autoconf@gnu.org; Thu, 14 Apr 2011 15:24:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QAS9P-0000O5-Dm
	for autoconf@gnu.org; Thu, 14 Apr 2011 15:24:24 -0400
Received: from mx1.redhat.com ([209.132.183.28]:33960)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QAS9P-0000O0-3l
	for autoconf@gnu.org; Thu, 14 Apr 2011 15:24:23 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3EJOLjr012111
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 14 Apr 2011 15:24:21 -0400
Received: from [10.3.113.38] (ovpn-113-38.phx2.redhat.com [10.3.113.38])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p3EJOKJr030500; Thu, 14 Apr 2011 15:24:20 -0400
Message-ID: <4DA749E3.8070508@redhat.com>
Date: Thu, 14 Apr 2011 13:24:19 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: "Too, Justin A." <too1@llnl.gov>
Subject: Re: Proper m4 quoting
References: <C9CC92F3.4EAC%too1@llnl.gov>
In-Reply-To: <C9CC92F3.4EAC%too1@llnl.gov>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig7BB6A15595B375C5EA8D8E22"
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Apr 2011 19:24:25 -0000

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

On 04/14/2011 01:04 PM, Too, Justin A. wrote:
>> test_executable=3D"$$(top_builddir)/scripts/test/bin/my_test"
>>
>> and, at shell time, $$ is the process id, explaining your results.
>=20
> I think in my rush, I was confusing Automake/m4 issues, hence the '$$',=

> since I was trying to keep the '$'.

Yep - inside makefiles, for shell code where you want a $ to be visible
to the shell instead of make, you have to escape $ as $$.  It's a bit of
a shame that all three tools (m4, shell, make) have subtly different
behaviors on when $ is special.

>=20
> Thank you for your help, everything is good to go now.

Glad to hear it.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig7BB6A15595B375C5EA8D8E22
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNp0njAAoJEKeha0olJ0NqWvsH/iV2mD8Np8dPV8/0qV0AgYMM
kb2m7qiPW1N8AX2hxUo/HdRHx4c9WLsyhbE2tKcOrqo2mItSX1E2v2/ouzaXI6ht
Y8/v+A9ForcyPUwzGygat1ZRPbjCJJaCzXMR1M/QHJ+RH7QzIkMq6YCVHY/rPPPB
3LozBir4Jds8UAK/TCHwflmB2cAvDeyJQSMVCyYY30559z0XYFGl5FipDsfcLNWL
aVg/MIEQTZN1IoZWylh48Jmogodj1BsWmDOpgmyARtW7in7XmAIkQZK2y92aPA9n
68UNPPubI3GeQoxqB0oBtEvVn9SE+t1l3d4bwQkQ+eZkh3Wb5rYl+9rp7r1D6E4=
=iMD8
-----END PGP SIGNATURE-----

--------------enig7BB6A15595B375C5EA8D8E22--


From MAILER-DAEMON Thu Apr 14 18:53:58 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAVQE-0002Jx-Ig
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 18:53:58 -0400
Received: from eggs.gnu.org ([140.186.70.92]:52464)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bounces@nabble.com>) id 1QAVOU-0002Fm-Ks
	for Autoconf@gnu.org; Thu, 14 Apr 2011 18:52:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bounces@nabble.com>) id 1QAVOS-0004v6-OL
	for Autoconf@gnu.org; Thu, 14 Apr 2011 18:52:10 -0400
Received: from sam.nabble.com ([216.139.236.26]:41846)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bounces@nabble.com>) id 1QAVOS-0004uK-Eo
	for Autoconf@gnu.org; Thu, 14 Apr 2011 18:52:08 -0400
Received: from isper.nabble.com ([192.168.236.156])
	by sam.nabble.com with esmtp (Exim 4.69)
	(envelope-from <bounces@nabble.com>) id 1QAVOR-00022m-6a
	for Autoconf@gnu.org; Thu, 14 Apr 2011 15:52:07 -0700
Message-ID: <31401406.post@talk.nabble.com>
Date: Thu, 14 Apr 2011 15:52:07 -0700 (PDT)
From: imacky <ian@macky.net>
To: Autoconf@gnu.org
Subject: AC_CHECK_LIB for X11 libraries
MIME-Version: 1.0
X-Nabble-From: ian@macky.net
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 216.139.236.26
X-Mailman-Approved-At: Thu, 14 Apr 2011 18:53:57 -0400
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Apr 2011 22:52:11 -0000


I'm using autoconf 2.65.  My configure script (which works fine under Ubuntu
10.04) does not work on an older SuSE system.  Here's the problem bit in my
.ac:

AC_CHECK_LIB([Xext], [XShmAttach],
        [HAS_LIBXEXT=1;
         AC_DEFINE([HAVE_XSHM], 1,
                [Define to 1 if you have the `Xext' library (-Xext)
providing
                 the MIT Shared Memory Extension (SHM), for
double-buffering])],
        [HAS_LIBXEXT=0])


X11 is installed in /usr/X11R6/lib etc on this SuSE, one of the older
standard locations; the AC_PATH_X documentation says "...configure looks for
the files in several directories where they often reside", but it does NOT
look in  /usr/X11R6/lib.  I can satisfy AC_PATH_X by specifying
--x-libraries manually, but that does me no good with the above snippet 
since AC_CHECK_LIB doesn't honor --x-libraries, or even know if a given
library is part of X or not.


So....how is this supposed to work??


The whole point of using autoconf is to spare the end-user the need to
configure manually (obviously), so AC_PATH_X not finding X11 is a definite
bummer.


Thanks to any and all help.  This is my first time using autotools.


--ian
-- 
View this message in context: http://old.nabble.com/AC_CHECK_LIB-for-X11-libraries-tp31401406p31401406.html
Sent from the Gnu - Autoconf - General mailing list archive at Nabble.com.

From MAILER-DAEMON Thu Apr 14 22:07:22 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAYRO-0008Ss-SR
	for mharc-autoconf@gnu.org; Thu, 14 Apr 2011 22:07:22 -0400
Received: from eggs.gnu.org ([140.186.70.92]:44307)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QAYRM-0008Og-94
	for autoconf@gnu.org; Thu, 14 Apr 2011 22:07:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QAYRL-0006Iu-43
	for autoconf@gnu.org; Thu, 14 Apr 2011 22:07:20 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:38470)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QAYRK-0006Fl-RC
	for autoconf@gnu.org; Thu, 14 Apr 2011 22:07:19 -0400
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
	p3F277ru017934; Thu, 14 Apr 2011 21:07:08 -0500 (CDT)
Date: Thu, 14 Apr 2011 21:07:07 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Gilles <codecomplete@free.fr>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
In-Reply-To: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
Message-ID: <alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
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]);
	Thu, 14 Apr 2011 21:07:09 -0500 (CDT)
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 02:07:21 -0000

On Thu, 14 Apr 2011, Gilles wrote:
>
> However, some applications use if/else blocks just as this one instead
> of eg. "#ifdef HAVE_FOR" conditional compiling:
> ============
> if (uClinux) {
> 	*pid = vfork();
> } else {
> 	*pid = fork();
> }
> ============
>
> Is it possible to modify configure.ac so that it goes ahead and
> compiles applications that handle fork/vfork without preprocessor
> commands?

The proper solution for this is to have configure test for both fork() 
and vfork() (and maybe posix_spawn()).  Then you have to decide which 
one you prefer:

In configure.ac:

AC_CHECK_FUNCS([fork posix_spawnp spawnvp vfork])

In the program:

#if HAVE_VFORK
   use vfork
#if HAVE_POSIX_SPAWNP
   use posix_spawn
#if HAVE_SPAWNVP
   use spawnvp
#elif HAVE_FORK
   use fork
#else
#error Need a way to fork a program!
#else

Vfork was supposed to be antique and going away but has been making a 
resurgence in heavily-threaded programs, however, posix_spawnp() is 
still preferred in that case (when available).

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


From MAILER-DAEMON Fri Apr 15 18:23:21 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QArQ9-0000hP-Iz
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 18:23:21 -0400
Received: from eggs.gnu.org ([140.186.70.92]:42930)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QArQ8-0000fF-1Y
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:23:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QArQ6-0000w5-Vg
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:23:20 -0400
Received: from lo.gmane.org ([80.91.229.12]:49187)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QArQ6-0000vy-Q1
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:23:18 -0400
Received: from list by lo.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QArQ4-00064p-TZ
	for autoconf@gnu.org; Sat, 16 Apr 2011 00:23:16 +0200
Received: from mar92-9-82-237-75-54.fbx.proxad.net ([82.237.75.54])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Sat, 16 Apr 2011 00:23:16 +0200
Received: from codecomplete by mar92-9-82-237-75-54.fbx.proxad.net with local
	(Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Sat, 16 Apr 2011 00:23:16 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: autoconf@gnu.org
From: Gilles <codecomplete@free.fr>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Sat, 16 Apr 2011 00:23:03 +0200
Lines: 30
Message-ID: <46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: mar92-9-82-237-75-54.fbx.proxad.net
X-Newsreader: Forte Agent 3.1/32.783
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 80.91.229.12
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 22:23:20 -0000

On Thu, 14 Apr 2011 21:07:07 -0500 (CDT), Bob Friesenhahn
<bfriesen@simple.dallas.tx.us> wrote:
>The proper solution for this is to have configure test for both fork() 
>and vfork() (and maybe posix_spawn()).  Then you have to decide which 
>one you prefer:
>
>In configure.ac:
>
>AC_CHECK_FUNCS([fork posix_spawnp spawnvp vfork])
>
>In the program:
>
>#if HAVE_VFORK
>   use vfork

Thanks Bob, but some applications don't use conditional compiling and
simply use code like this:
============
if (uClinux) {
	*pid = vfork();
} else {
	*pid = fork();
}
============

Will the cross-compiler go ahead and compile that type of code?
Currently, it refuses to proceed because fork() is not available on
non-MMU CPU's.

Thank you.



From MAILER-DAEMON Fri Apr 15 18:28:50 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QArVS-0001Ep-1d
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 18:28:50 -0400
Received: from eggs.gnu.org ([140.186.70.92]:45029)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1QArVP-0001Ej-SS
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:28:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1QArVP-0001XS-00
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:28:47 -0400
Received: from stenn.ntp.org ([149.20.68.30]:38434)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1QArVO-0001WF-S3
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:28:46 -0400
Received: from localhost ([127.0.0.1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.74 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1QArVH-000NML-C5; Fri, 15 Apr 2011 15:28:39 -0700
To: Gilles <codecomplete@free.fr>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork? 
In-reply-to: <46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com> 
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
Comments: In-reply-to Gilles <codecomplete@free.fr>
	message dated "Sat, 16 Apr 2011 00:23:03 +0200."
X-Mailer: MH-E 7.4.2; nmh 1.2; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Fri, 15 Apr 2011 15:28:39 -0700
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1QArVH-000NML-C5@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@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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 22:28:48 -0000

Giles wrote:
> Thanks Bob, but some applications don't use conditional compiling and
> simply use code like this:
> ============
> if (uClinux) {
> 	*pid = vfork();
> } else {
> 	*pid = fork();
> }
> ============
> 
> Will the cross-compiler go ahead and compile that type of code?
> Currently, it refuses to proceed because fork() is not available on
> non-MMU CPU's.

If you do not want to "force" people to change their code, you will
probably need to offer a "stub" fork() to link against on non-MMU CPUs.

H


From MAILER-DAEMON Fri Apr 15 18:31:45 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QArYH-0001gt-T8
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 18:31:45 -0400
Received: from eggs.gnu.org ([140.186.70.92]:43720)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QArYF-0001g2-IY
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:31:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QArYC-0001tw-2b
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:31:43 -0400
Received: from lo.gmane.org ([80.91.229.12]:49671)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QArYB-0001tm-Qo
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:31:40 -0400
Received: from list by lo.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QArY9-000218-88
	for autoconf@gnu.org; Sat, 16 Apr 2011 00:31:37 +0200
Received: from mar92-9-82-237-75-54.fbx.proxad.net ([82.237.75.54])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Sat, 16 Apr 2011 00:31:37 +0200
Received: from codecomplete by mar92-9-82-237-75-54.fbx.proxad.net with local
	(Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Sat, 16 Apr 2011 00:31:37 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: autoconf@gnu.org
From: Gilles <codecomplete@free.fr>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Sat, 16 Apr 2011 00:31:25 +0200
Lines: 6
Message-ID: <2ohhq6d56an9r5e07mibfkbrmjmrgh05qv@4ax.com>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
	<E1QArVH-000NML-C5@stenn.ntp.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: mar92-9-82-237-75-54.fbx.proxad.net
X-Newsreader: Forte Agent 3.1/32.783
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 80.91.229.12
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 22:31:44 -0000

On Fri, 15 Apr 2011 15:28:39 -0700, Harlan Stenn <stenn@ntp.org>
wrote:
>If you do not want to "force" people to change their code, you will
>probably need to offer a "stub" fork() to link against on non-MMU CPUs.

Thanks for the tip.



From MAILER-DAEMON Fri Apr 15 18:41:54 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAri6-0003xq-Bz
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 18:41:54 -0400
Received: from eggs.gnu.org ([140.186.70.92]:42631)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QAri3-0003wV-Q1
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:41:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QArhy-0003fh-Rn
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:41:51 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:38212)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QArhy-0003fa-JQ
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:41:46 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 34F951B4001;
	Fri, 15 Apr 2011 22:41:45 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Fri, 15 Apr 2011 18:41:41 -0400
User-Agent: KMail/1.13.6 (Linux/2.6.37.3; KDE/4.6.0; x86_64; ; )
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
In-Reply-To: <46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart2656930.5p3bPDVGi1";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201104151841.42390.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.211.166.183
Cc: Gilles <codecomplete@free.fr>
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 22:41:52 -0000

--nextPart2656930.5p3bPDVGi1
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Friday, April 15, 2011 18:23:03 Gilles wrote:
> On Thu, 14 Apr 2011 21:07:07 -0500 (CDT), Bob Friesenhahn
>=20
> <bfriesen@simple.dallas.tx.us> wrote:
> >The proper solution for this is to have configure test for both fork()
> >and vfork() (and maybe posix_spawn()).  Then you have to decide which
> >one you prefer:
> >
> >In configure.ac:
> >
> >AC_CHECK_FUNCS([fork posix_spawnp spawnvp vfork])
> >
> >In the program:
> >
> >#if HAVE_VFORK
> >
> >   use vfork
>=20
> Thanks Bob, but some applications don't use conditional compiling and
> simply use code like this:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> if (uClinux) {
> 	*pid =3D vfork();
> } else {
> 	*pid =3D fork();
> }
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

so change it to #ifdef

> Will the cross-compiler go ahead and compile that type of code?
> Currently, it refuses to proceed because fork() is not available on
> non-MMU CPU's.

it depends on the optimization level.  you need a high enough level where t=
he=20
compiler will do dead code removal, otherwise it wont link.
=2Dmike

--nextPart2656930.5p3bPDVGi1
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJNqMmmAAoJEEFjO5/oN/WBbAoQAI/BZqxSZbU0qpOKRgRdSXCu
lzMXZNP6AUeu8i1tJyf/mW6UbRhE6yhSCy1G3TqMPudj8inp9CdLqZIab/lUGvuO
eo/AYYlh76mv27pZq4QrogoHpBZuEcilUwRAS2niYLAeNElGt1dM6oh1TwTQKckA
i7Mp7O7U6uVp7cKD5o1VqHB7WRHF/ShrT4l60/fi4MAD3+VByh2T9n7/7asAp/9z
SC4EWXtdstOzW6ysdjjPTcI14I8zxeN1Uvfaj8fR8DZP1ibJ2CoqhavObjIUtHYt
emqlydLm/57T3X6lBcKYv+fLW3Gu6pMMHJtaJ6iOkxQPKlHjiFrbN8lKF2P0apdJ
MlAk+NePYRLRPHiB3eYCI8AT1q6JkRXMZ2gDa9Fsxt338moAg2tqkoSYi4u63/W5
riQbjueyuvi13C2eN5sM+QlBxixNSSajfT0Wu14IKPQMIf/+jI1l7kyNTSkBTkqk
w7J9eHfSuRqD2FT5N7SBe0BqNdyzqY9Xf6yqJAYtmccqLOEXqDdvukyjMTlw+F/I
vTH3al0YySTEEnaIDF3OlEGCg57fo5uKG9ILwmx6Dn4ScusIvY3ba4WnW75Iatiz
Y1SIIcP8xczxc/c4j/cRGTpiJy0W6eKwt8hxZiAZtO0FYsXJ+7p7XP2YwfQznxJG
7DXc+QVQnTnb02xAVqmY
=m8Os
-----END PGP SIGNATURE-----

--nextPart2656930.5p3bPDVGi1--


From MAILER-DAEMON Fri Apr 15 18:42:45 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAriv-0004Px-5B
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 18:42:45 -0400
Received: from eggs.gnu.org ([140.186.70.92]:42993)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QAris-0004PG-Nk
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:42:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QArir-0003sh-QZ
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:42:42 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:38321)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QArir-0003sY-Gg
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:42:41 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id C58141B4001;
	Fri, 15 Apr 2011 22:42:40 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Fri, 15 Apr 2011 18:42:38 -0400
User-Agent: KMail/1.13.6 (Linux/2.6.37.3; KDE/4.6.0; x86_64; ; )
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
	<E1QArVH-000NML-C5@stenn.ntp.org>
In-Reply-To: <E1QArVH-000NML-C5@stenn.ntp.org>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart4168852.KBeARImVCt";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201104151842.38938.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.211.166.183
Cc: Harlan Stenn <stenn@ntp.org>, Gilles <codecomplete@free.fr>
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 22:42:43 -0000

--nextPart4168852.KBeARImVCt
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Friday, April 15, 2011 18:28:39 Harlan Stenn wrote:
> Giles wrote:
> > Thanks Bob, but some applications don't use conditional compiling and
> > simply use code like this:
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > if (uClinux) {
> >=20
> > 	*pid =3D vfork();
> >=20
> > } else {
> >=20
> > 	*pid =3D fork();
> >=20
> > }
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >=20
> > Will the cross-compiler go ahead and compile that type of code?
> > Currently, it refuses to proceed because fork() is not available on
> > non-MMU CPU's.
>=20
> If you do not want to "force" people to change their code, you will
> probably need to offer a "stub" fork() to link against on non-MMU CPUs.

the majority of the time, it isnt just fork() that needs to change.  any=20
exit() in the child needs to be changed to _exit() too.
=2Dmike

--nextPart4168852.KBeARImVCt
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJNqMneAAoJEEFjO5/oN/WBg2EP/03/lMEchxqYtBHKwthdbNyE
fiab+cnZmvs1Y2O1xiqFJQ0SFtVicFJflVwAwYydxpdUy4hyEMKzcfq9nfFMwHVS
fBCwgSEjY9/l5PDffA1KwfnYz29sv3BT/CCSc+1IZdamsuLXr/hd6baLqZRJPLxd
FLMpYlHSSMI8DihSDam4g07s6Zj/xDOWZK+7ThWXDPiIXAbWxaFxIArcISxAYz84
Ozwd1DDej1ymHq3WPR1OkSm0dUYvs0YVUc3KOA5VIc7rJAtiSPAUwMThkhukoxKv
oXq4vpfXHwrORSE+AaAzHSYo/H0OcYIbyT0WSD//GyyomNFdXob0/Zz2Y+uWxGmq
rU+PxrZo2V/wdJg2BYucp894n8IskELFoAb0nwy2TdoCXMSAvD4uTzUJedbHt/l9
kMBUk51DNiLpKTxC6yrrSJRs3xEs93KIo+7O9UJlX1gObCsFteNbBeacJr4wSn4Q
97EfOjTmYQIn0aMvCZMj2ebUgqYwzYBRxBrhPkEmZPaHXW+V6ADwwI3Sv9Vy241k
aCUjfVVFYkAh8khqCAXcMebYUF63uXFUUbSCRlerBU2rfb2FgnKeJuNEnhjdJEmH
L4LZJX6A3BbpGa/aPIgkK5fmD/17+jREHXei1ZQmGGaCMr7/WzfPMtFLUmtwRka2
gBrMNC/Xbfe7iGe4z5PH
=L+LH
-----END PGP SIGNATURE-----

--nextPart4168852.KBeARImVCt--


From MAILER-DAEMON Fri Apr 15 18:53:38 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QArtS-0007Tv-58
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 18:53:38 -0400
Received: from eggs.gnu.org ([140.186.70.92]:40160)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QArtP-0007Tn-Vm
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:53:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QArtO-0005mP-PG
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:53:35 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:41647)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QArtO-0005ly-IO
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:53:34 -0400
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
	p3FMrOHc023141; Fri, 15 Apr 2011 17:53:24 -0500 (CDT)
Date: Fri, 15 Apr 2011 17:53:24 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Mike Frysinger <vapier@gentoo.org>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
In-Reply-To: <201104151842.38938.vapier@gentoo.org>
Message-ID: <alpine.GSO.2.01.1104151751590.22707@freddy.simplesystems.org>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
	<E1QArVH-000NML-C5@stenn.ntp.org>
	<201104151842.38938.vapier@gentoo.org>
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]);
	Fri, 15 Apr 2011 17:53:24 -0500 (CDT)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
Cc: Harlan Stenn <stenn@ntp.org>, autoconf@gnu.org,
	Gilles <codecomplete@free.fr>
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 22:53:37 -0000

On Fri, 15 Apr 2011, Mike Frysinger wrote:
>>
>> If you do not want to "force" people to change their code, you will
>> probably need to offer a "stub" fork() to link against on non-MMU CPUs.
>
> the majority of the time, it isnt just fork() that needs to change.  any
> exit() in the child needs to be changed to _exit() too.

The sole purpose of vfork is to immediately invoke exec()  Any other 
purpose is forbidden.  In what case would an exit even be required?

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


From MAILER-DAEMON Fri Apr 15 18:56:33 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QArwH-0000QH-0g
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 18:56:33 -0400
Received: from eggs.gnu.org ([140.186.70.92]:45113)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andrew.w.nosenko@gmail.com>) id 1QArwE-0000MO-QL
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:56:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andrew.w.nosenko@gmail.com>) id 1QArwD-00067N-T6
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:56:30 -0400
Received: from mail-iw0-f169.google.com ([209.85.214.169]:48778)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andrew.w.nosenko@gmail.com>) id 1QArwD-00067I-Pq
	for autoconf@gnu.org; Fri, 15 Apr 2011 18:56:29 -0400
Received: by iwg8 with SMTP id 8so3625899iwg.0
	for <autoconf@gnu.org>; Fri, 15 Apr 2011 15:56:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=Gkd/SgHJylSk09lCgG7QqJNsFpSi+7iIgpHFNgJFC1U=;
	b=jYu9MJ4hJVoKUwQTqNwf8Jfs2N5D/8RewEdkHNSC56IsFR0ar6ljcZgiU8eev0rt8f
	Ie1Qdk3ysUD2JRJC3fADDZASvDOTRAnM6O2mbvHP4CuQPIbQLvPfv5a5tddx7hHaFoVh
	CqwlSWohWZLmgVMoiUQXEjO1iq60RVDvNniqI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=u6ZnatglFKqbM/YQZXdIvl/ax8SvPZzhQGMBqbYvbW1vlEW9Bjm8IdnRRyAzmw0j+j
	uNE66yH+b76fnqTwNo/BLcePRBkTuSdYdUNeFG93IIueEDl4HCIgJGGFetVEsgxtaPdw
	pGJvnTG8l4KvgyL7ibeD03Oe2tKepJ9d77YOM=
MIME-Version: 1.0
Received: by 10.42.154.136 with SMTP id q8mr3190946icw.213.1302908188617; Fri,
	15 Apr 2011 15:56:28 -0700 (PDT)
Received: by 10.42.134.138 with HTTP; Fri, 15 Apr 2011 15:56:28 -0700 (PDT)
In-Reply-To: <alpine.GSO.2.01.1104151751590.22707@freddy.simplesystems.org>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
	<E1QArVH-000NML-C5@stenn.ntp.org>
	<201104151842.38938.vapier@gentoo.org>
	<alpine.GSO.2.01.1104151751590.22707@freddy.simplesystems.org>
Date: Sat, 16 Apr 2011 01:56:28 +0300
Message-ID: <BANLkTinY3KtmM3eOqwFrEsf5PcA78xaaYw@mail.gmail.com>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
From: "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com>
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 209.85.214.169
Cc: Harlan Stenn <stenn@ntp.org>, autoconf@gnu.org,
	Mike Frysinger <vapier@gentoo.org>, Gilles <codecomplete@free.fr>
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 22:56:31 -0000

On Sat, Apr 16, 2011 at 01:53, Bob Friesenhahn
<bfriesen@simple.dallas.tx.us> wrote:
> On Fri, 15 Apr 2011, Mike Frysinger wrote:
>>>
>>> If you do not want to "force" people to change their code, you will
>>> probably need to offer a "stub" fork() to link against on non-MMU CPUs.
>>
>> the majority of the time, it isnt just fork() that needs to change. =A0a=
ny
>> exit() in the child needs to be changed to _exit() too.
>
> The sole purpose of vfork is to immediately invoke exec() =A0Any other pu=
rpose
> is forbidden. =A0In what case would an exit even be required?
>

exec() may fail.  And you need to exit somehow.  Calling of exit() in
such situation is a bad thing because it call atexit handlers.  Thus
you need _exit().

--=20
Andrew W. Nosenko <andrew.w.nosenko@gmail.com>


From MAILER-DAEMON Fri Apr 15 19:02:10 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAs1h-0003lr-VY
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 19:02:09 -0400
Received: from eggs.gnu.org ([140.186.70.92]:42399)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QAs1f-0003lg-Rg
	for autoconf@gnu.org; Fri, 15 Apr 2011 19:02:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QAs1f-0006iA-30
	for autoconf@gnu.org; Fri, 15 Apr 2011 19:02:07 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:49817)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QAs1e-0006i3-Mo
	for autoconf@gnu.org; Fri, 15 Apr 2011 19:02:07 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 7013D1B4046;
	Fri, 15 Apr 2011 23:02:04 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Fri, 15 Apr 2011 19:02:01 -0400
User-Agent: KMail/1.13.6 (Linux/2.6.37.3; KDE/4.6.0; x86_64; ; )
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<201104151842.38938.vapier@gentoo.org>
	<alpine.GSO.2.01.1104151751590.22707@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1104151751590.22707@freddy.simplesystems.org>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart6283449.LghZ1I0If5";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201104151902.02464.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.211.166.183
Cc: Harlan Stenn <stenn@ntp.org>, autoconf@gnu.org,
	Gilles <codecomplete@free.fr>
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Apr 2011 23:02:08 -0000

--nextPart6283449.LghZ1I0If5
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Friday, April 15, 2011 18:53:24 Bob Friesenhahn wrote:
> On Fri, 15 Apr 2011, Mike Frysinger wrote:
> >> If you do not want to "force" people to change their code, you will
> >> probably need to offer a "stub" fork() to link against on non-MMU CPUs.
> >=20
> > the majority of the time, it isnt just fork() that needs to change.  any
> > exit() in the child needs to be changed to _exit() too.
>=20
> The sole purpose of vfork is to immediately invoke exec()  Any other
> purpose is forbidden.  In what case would an exit even be required?

ignoring the fact that Linux allows many many more things to safely happen =
in=20
the child of a vfork, what exactly are you supposed to do when that exec fa=
ils=20
and returns ?  or you pray it never does ?
=2Dmike

--nextPart6283449.LghZ1I0If5
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJNqM5qAAoJEEFjO5/oN/WBNBIP+gP8rvMV58Jxk1yIFxmeGWgk
tA1hq9WWKg98AnUWF4a1olzX8stF9c524mbDS7WDqzUoTA9FmSgdYVCvYUKJzc7r
Z2sD7m2NUdslH5w1py6IP7LZevt+aekoPbcYO+ORhdluN0p60HTgCfwf7l+m1B/H
X7hCdGTAsCfcNh3yBupqW/s+f7izdiJ2wVYRLRYeMYOYU04enbPf9K0FqaAJVYvW
iY4FvluNmAFUNGDCjJdWAVaPH7fwrcBhHGyCtkP0vj2B3DRras+HApOqoJZll1xy
JoSmiZC79o19oVlkT4AOdTURty9KbM0xpcN+Z/g1hgHMbiZ3LPj9TLF21iTpy37A
zm9s/ihUw4WcHFlSTYV/C5/jjVKS8pZaa4TFPauFNsOE8b5Y+KwrTw8z7zi2XjeD
niT0/1+iFnOztWq6FkaxALzG+BagPbi1Dk/NfTFP/W6zgCOSZHBcZLyTjjd1ysiS
Y0Z05KnY8jNaAFoF8bPi6L9Oky+Ln3WbjMutoKfsflEdZqnwHMy3j3UGC7ebMPZg
qcgTYOkB9i1MYLaGwO1uyfBZpg5L+x8t0HbPqWgMuCzqrbggk5/hLG7QtSwDSZcZ
cIvUCb6Wc/Y483q8vYxFlqkaV0N0WXRStn5RXYneSJK62UwXFQZTwjz8DFhM6QjF
yN9PLwIztAklW1MIQwBK
=KtZn
-----END PGP SIGNATURE-----

--nextPart6283449.LghZ1I0If5--


From MAILER-DAEMON Fri Apr 15 21:54:37 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAuib-00058c-9r
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 21:54:37 -0400
Received: from eggs.gnu.org ([140.186.70.92]:54529)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QAuiZ-00058U-1t
	for autoconf@gnu.org; Fri, 15 Apr 2011 21:54:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QAuiX-0003oX-TD
	for autoconf@gnu.org; Fri, 15 Apr 2011 21:54:35 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:41824)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QAuiX-0003oR-JE
	for autoconf@gnu.org; Fri, 15 Apr 2011 21:54:33 -0400
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
	p3G1sSuZ023583; Fri, 15 Apr 2011 20:54:29 -0500 (CDT)
Date: Fri, 15 Apr 2011 20:54:28 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Mike Frysinger <vapier@gentoo.org>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
In-Reply-To: <201104151902.02464.vapier@gentoo.org>
Message-ID: <alpine.GSO.2.01.1104152046500.20825@freddy.simplesystems.org>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<201104151842.38938.vapier@gentoo.org>
	<alpine.GSO.2.01.1104151751590.22707@freddy.simplesystems.org>
	<201104151902.02464.vapier@gentoo.org>
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]);
	Fri, 15 Apr 2011 20:54:29 -0500 (CDT)
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Apr 2011 01:54:36 -0000

On Fri, 15 Apr 2011, Mike Frysinger wrote:
>>
>> The sole purpose of vfork is to immediately invoke exec()  Any other
>> purpose is forbidden.  In what case would an exit even be required?
>
> ignoring the fact that Linux allows many many more things to safely happen in
> the child of a vfork, what exactly are you supposed to do when that exec fails
> and returns ?  or you pray it never does ?

Apparently I would pray.  Of course exec could fail and it is 
then necessary to invoke _exit(2).

This was a temporary brain malfunction on my part.  All better now.

Regardless, using posix_spawn() or posix_spawnp() is a better solution 
now if one does not need the full-fledged fork().

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


From MAILER-DAEMON Fri Apr 15 22:55:53 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QAvft-0004as-A2
	for mharc-autoconf@gnu.org; Fri, 15 Apr 2011 22:55:53 -0400
Received: from eggs.gnu.org ([140.186.70.92]:57651)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QAvfr-0004aj-0V
	for autoconf@gnu.org; Fri, 15 Apr 2011 22:55:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QAvfp-0003JQ-PZ
	for autoconf@gnu.org; Fri, 15 Apr 2011 22:55:50 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:37028)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QAvfp-0003JM-JN
	for autoconf@gnu.org; Fri, 15 Apr 2011 22:55:49 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 9738D1B409A;
	Sat, 16 Apr 2011 02:55:47 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Fri, 15 Apr 2011 22:55:41 -0400
User-Agent: KMail/1.13.6 (Linux/2.6.37.3; KDE/4.6.0; x86_64; ; )
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<201104151902.02464.vapier@gentoo.org>
	<alpine.GSO.2.01.1104152046500.20825@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1104152046500.20825@freddy.simplesystems.org>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart3114293.BxnVORPkpb";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201104152255.43830.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.211.166.183
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Apr 2011 02:55:51 -0000

--nextPart3114293.BxnVORPkpb
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Friday, April 15, 2011 21:54:28 Bob Friesenhahn wrote:
> Regardless, using posix_spawn() or posix_spawnp() is a better solution
> now if one does not need the full-fledged fork().

in some cases, that is sufficient, assuming that the system in question doe=
s=20
support posix_spawn.  we cant all be so lucky ;).
=2Dmike

--nextPart3114293.BxnVORPkpb
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJNqQUvAAoJEEFjO5/oN/WB1McP/0R8M+F3+dSFsdVYUr9ygPtg
3Rh2R/RHJlxpG8xTFqDUgIu11j8jQFFKXK7G6LkarYsl2//wxvjjPnDLhrjUmqYU
mmU9CNX0gyAVxNL31DxnmAFh0rHn9v5O7GY1hASA6SDlbBsDjbY6QhIKAL95qjGx
HJPGChwfUNjm4Q/9szbw3HTxNESDGZ/rym24oyYzV2bwSHC8DUEmHMMAyWNyAyUL
daOO+3mWkPO9e5wPqjwuaEz44e7A7v9Di3PmZMjiFdAJh6LpjXMGgjrjjLSZ4YiD
xPjloFfUjJN0/J9k7HnQ2o/aK2/E6nWrFQ3K1P38nq9wcZJHGuq3VkFY4sTmALUN
bumQv1Fvzb+uzEiRNP/7s9ipC+bmnhR1foU2x5CC4bwAT84PYlkxiZ8KiqcXauiy
0UX0iK0sjKpHoxbL92YAK6zAu2S4OHt2J3U/YY1SeLLo433qlJgby22B7qsW1eJo
cOmf1Dqc77k9MnqM+W45z3VcYERvz/ht5jr5dx5EZNi+Dt0iIHf3sUz8POIzbymL
e3CeQ418usp491+/blO4jDbqQ6tHMjZoKROb6rZivWNREtIAM74ugnWp/9jSBVEQ
V2RL2Qe6oSB0gU6PCUFPhCevvMY8dV+JCbfAyQk/1f8/nCgS4fpSwYCMHacUi30K
mMm0/Q4TikCqMZFGTy9t
=Foru
-----END PGP SIGNATURE-----

--nextPart3114293.BxnVORPkpb--


From MAILER-DAEMON Sat Apr 16 05:26:54 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QB1mI-0005TV-J4
	for mharc-autoconf@gnu.org; Sat, 16 Apr 2011 05:26:54 -0400
Received: from eggs.gnu.org ([140.186.70.92]:53481)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QB1mH-0005Q8-1b
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:26:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QB1mF-000221-DS
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:26:52 -0400
Received: from lo.gmane.org ([80.91.229.12]:41866)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QB1mF-00021s-7t
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:26:51 -0400
Received: from list by lo.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QB1mD-0007Vd-Rz
	for autoconf@gnu.org; Sat, 16 Apr 2011 11:26:49 +0200
Received: from mar92-9-82-237-75-54.fbx.proxad.net ([82.237.75.54])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Sat, 16 Apr 2011 11:26:49 +0200
Received: from codecomplete by mar92-9-82-237-75-54.fbx.proxad.net with local
	(Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Sat, 16 Apr 2011 11:26:49 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: autoconf@gnu.org
From: Gilles <codecomplete@free.fr>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Sat, 16 Apr 2011 11:26:37 +0200
Lines: 41
Message-ID: <g6liq6tg89u2tfoojlnl7kf7e5s117tdgr@4ax.com>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
	<201104151841.42390.vapier@gentoo.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: mar92-9-82-237-75-54.fbx.proxad.net
X-Newsreader: Forte Agent 3.1/32.783
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 80.91.229.12
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Apr 2011 09:26:53 -0000

On Fri, 15 Apr 2011 18:41:41 -0400, Mike Frysinger <vapier@gentoo.org>
wrote:
>so change it to #ifdef

The whole point of my question was: opkg's gz_open.c contains the
following code:
============
if (uClinux) {
	*pid = vfork();
} else {
	*pid = fork();
}
============

IOW, it appears that it was (re)written to run on Linux kernels that
uses vfork() instead of fork() just fine.

So instead of modifying that type of _code_ manually, I'd like to
modify the 2010 Blackfin _toolchain_ so, instead of having the linker
stop dead with an error...
==============
  LINK  opkg-cl
../libopkg/.libs/libopkg.a(libbb_la-gz_open.o): In function `gz_open':
/usr/src/opkg-read-only/libbb/gz_open.c:67: undefined reference to
`_fork'
==============

... it behave like the 2009 and simply display a warning (instead of
not saying anything, like the 2007 toolchain):
==============
  LINK  opkg-cl
../libopkg/.libs/libopkg.a(libbb_la-gz_open.o): In function `gz_open':
/usr/src/opkg-read-only/libbb/gz_open.c:67: warning: fork: this
function is not implemented on no-mmu systems
==============

Is this possible to modify AutoConf's configure  so that it display a
warning instead of an error when it encounters the use of fork() in an
application that is known to handle it OK like the above?

Thank you.



From MAILER-DAEMON Sat Apr 16 05:32:01 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QB1rF-0007nb-N6
	for mharc-autoconf@gnu.org; Sat, 16 Apr 2011 05:32:01 -0400
Received: from eggs.gnu.org ([140.186.70.92]:36901)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1QB1rC-0007nL-T4
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:31:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1QB1rB-0002Yx-TV
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:31:58 -0400
Received: from stenn.ntp.org ([149.20.68.30]:23936)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1QB1rB-0002Yl-Oe
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:31:57 -0400
Received: from localhost ([127.0.0.1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.74 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1QB1rA-000NyA-Ia; Sat, 16 Apr 2011 02:31:56 -0700
To: Gilles <codecomplete@free.fr>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork? 
In-reply-to: <g6liq6tg89u2tfoojlnl7kf7e5s117tdgr@4ax.com> 
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
	<201104151841.42390.vapier@gentoo.org>
	<g6liq6tg89u2tfoojlnl7kf7e5s117tdgr@4ax.com>
Comments: In-reply-to Gilles <codecomplete@free.fr>
	message dated "Sat, 16 Apr 2011 11:26:37 +0200."
X-Mailer: MH-E 7.4.2; nmh 1.2; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Sat, 16 Apr 2011 02:31:56 -0700
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1QB1rA-000NyA-Ia@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@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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Apr 2011 09:31:59 -0000

A quick hack (and it may not work well) would be to detect these
systems, and stuff in something that effectively does '#define fork
vfork'.

H


From MAILER-DAEMON Sat Apr 16 05:46:44 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QB25U-0001Of-NZ
	for mharc-autoconf@gnu.org; Sat, 16 Apr 2011 05:46:44 -0400
Received: from eggs.gnu.org ([140.186.70.92]:38734)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QB25T-0001OZ-2I
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:46:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QB25S-0004Ui-3A
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:46:43 -0400
Received: from lo.gmane.org ([80.91.229.12]:37826)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QB25R-0004Uc-Sh
	for autoconf@gnu.org; Sat, 16 Apr 2011 05:46:42 -0400
Received: from list by lo.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-autoconf@m.gmane.org>) id 1QB25Q-0000ok-Fx
	for autoconf@gnu.org; Sat, 16 Apr 2011 11:46:40 +0200
Received: from mar92-9-82-237-75-54.fbx.proxad.net ([82.237.75.54])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Sat, 16 Apr 2011 11:46:40 +0200
Received: from codecomplete by mar92-9-82-237-75-54.fbx.proxad.net with local
	(Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <autoconf@gnu.org>; Sat, 16 Apr 2011 11:46:40 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: autoconf@gnu.org
From: Gilles <codecomplete@free.fr>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Sat, 16 Apr 2011 11:46:29 +0200
Lines: 12
Message-ID: <l9piq6514229fm5r37qmiaj3m9g5tfctsd@4ax.com>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
	<201104151841.42390.vapier@gentoo.org>
	<g6liq6tg89u2tfoojlnl7kf7e5s117tdgr@4ax.com>
	<E1QB1rA-000NyA-Ia@stenn.ntp.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: mar92-9-82-237-75-54.fbx.proxad.net
X-Newsreader: Forte Agent 3.1/32.783
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 80.91.229.12
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Apr 2011 09:46:43 -0000

On Sat, 16 Apr 2011 02:31:56 -0700, Harlan Stenn <stenn@ntp.org>
wrote:
>A quick hack (and it may not work well) would be to detect these
>systems, and stuff in something that effectively does '#define fork
>vfork'.

What I'd like, is to learn how to modify the linker so that it
displays a warning instead of an error, like it used to.

Does someone know how to do this?

Thank you.



From MAILER-DAEMON Sat Apr 16 10:27:52 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QB6TY-0006Fd-KP
	for mharc-autoconf@gnu.org; Sat, 16 Apr 2011 10:27:52 -0400
Received: from eggs.gnu.org ([140.186.70.92]:38209)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QB6TV-0006EL-Po
	for autoconf@gnu.org; Sat, 16 Apr 2011 10:27:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QB6TU-0006ij-GO
	for autoconf@gnu.org; Sat, 16 Apr 2011 10:27:49 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:42757)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1QB6TU-0006iH-4G
	for autoconf@gnu.org; Sat, 16 Apr 2011 10:27:48 -0400
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
	p3GERbfi025769; Sat, 16 Apr 2011 09:27:37 -0500 (CDT)
Date: Sat, 16 Apr 2011 09:27:37 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Gilles <codecomplete@free.fr>
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
In-Reply-To: <l9piq6514229fm5r37qmiaj3m9g5tfctsd@4ax.com>
Message-ID: <alpine.GSO.2.01.1104160857370.20825@freddy.simplesystems.org>
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<alpine.GSO.2.01.1104142055430.20825@freddy.simplesystems.org>
	<46hhq6tdhqdmmjlteib4loid0ubesfmrcu@4ax.com>
	<201104151841.42390.vapier@gentoo.org>
	<g6liq6tg89u2tfoojlnl7kf7e5s117tdgr@4ax.com>
	<E1QB1rA-000NyA-Ia@stenn.ntp.org>
	<l9piq6514229fm5r37qmiaj3m9g5tfctsd@4ax.com>
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]);
	Sat, 16 Apr 2011 09:27:38 -0500 (CDT)
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Apr 2011 14:27:50 -0000

On Sat, 16 Apr 2011, Gilles wrote:

> On Sat, 16 Apr 2011 02:31:56 -0700, Harlan Stenn <stenn@ntp.org>
> wrote:
>> A quick hack (and it may not work well) would be to detect these
>> systems, and stuff in something that effectively does '#define fork
>> vfork'.
>
> What I'd like, is to learn how to modify the linker so that it
> displays a warning instead of an error, like it used to.
>
> Does someone know how to do this?

What you are looking to do ultimately has nothing to do with autoconf. 
Autoconf is all about configuration prior to compilation of the 
application software.  It has nothing to do with link-time or run-time 
configuration.

An alternate approach you could use is to use dlopen(0,RTLD_NOLOAD) 
and then dlsym() to see if the "fork" symbol is available at run time 
to the running program. If it is available, then use it.  This avoids 
directly linking against fork().

Here is some completely untested code which might even compile:

#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <link.h>

int my_fork_func(void)
{
   void *dl_handle;
   pid_t (*fork_f)(void);
   int status=-1;

   dl_handle=dlopen(0,RTLD_NOLOAD);
   if (dl_handle)
     {
       fork_f=dlsym(dl_handle,"fork");
       if !(fork_f)
         fork_f=dlsym(dl_handle,"vfork");
       if (fork_f)
         status=fork_f();
       (void) dlclose(dl_handle);
     }
   return status;
}

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


From MAILER-DAEMON Sat Apr 16 14:35:34 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QBALG-00023J-Nd
	for mharc-autoconf@gnu.org; Sat, 16 Apr 2011 14:35:34 -0400
Received: from eggs.gnu.org ([140.186.70.92]:52927)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QBALF-00022w-0Q
	for autoconf@gnu.org; Sat, 16 Apr 2011 14:35:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QBALD-0005wC-Ur
	for autoconf@gnu.org; Sat, 16 Apr 2011 14:35:32 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:52485)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1QBALD-0005vx-Q1
	for autoconf@gnu.org; Sat, 16 Apr 2011 14:35:31 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 7732E1B4056;
	Sat, 16 Apr 2011 18:35:29 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org
Subject: Re: [configure.ac/uClinux] Adding code for fork/vfork?
Date: Sat, 16 Apr 2011 14:35:27 -0400
User-Agent: KMail/1.13.6 (Linux/2.6.37.3; KDE/4.6.0; x86_64; ; )
References: <3qrdq6pd778kopsktcvmad5js8oasvrl6o@4ax.com>
	<201104151841.42390.vapier@gentoo.org>
	<g6liq6tg89u2tfoojlnl7kf7e5s117tdgr@4ax.com>
In-Reply-To: <g6liq6tg89u2tfoojlnl7kf7e5s117tdgr@4ax.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart5169580.u5JmytULgs";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201104161435.28359.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.211.166.183
Cc: Gilles <codecomplete@free.fr>
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Apr 2011 18:35:33 -0000

--nextPart5169580.u5JmytULgs
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Saturday, April 16, 2011 05:26:37 Gilles wrote:
> On Fri, 15 Apr 2011 18:41:41 -0400, Mike Frysinger wrote:
> >so change it to #ifdef
>=20
> The whole point of my question was: opkg's gz_open.c contains the
> following code:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> if (uClinux) {
> 	*pid =3D vfork();
> } else {
> 	*pid =3D fork();
> }
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> IOW, it appears that it was (re)written to run on Linux kernels that
> uses vfork() instead of fork() just fine.
>=20
> So instead of modifying that type of _code_ manually, I'd like to
> modify the 2010 Blackfin _toolchain_ so, instead of having the linker
> stop dead with an error...

opkg is broken.  fix opkg with ifdefs.  it's really that simple.
=2Dmike

--nextPart5169580.u5JmytULgs
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJNqeFwAAoJEEFjO5/oN/WBFlQQAOD4ufitbxWy+PH4ahSz7QHg
t7heDbcyYhPfh3/3joRN/xG0J6UiPfQ+doOcOIxrtUBFneuwWwyl0XERnpOuBUrg
cWblVPCwsl5bEGvTALN0iLaIL1vJXgK44c+Txj05lt91FWk02KfAAFaXy9H0tYJs
W1v32ZIx6hHBoqzKuCiRlWTOnKsgeXLUq3Q0o3HTH1RKgb3nTPUKNFMdDuaXhi+H
ZA3bxdd0zeVe9uEH4PopPM1BxiGxrak+aIfCYsaXSwoNLaG7QjFA1Ez/WqegLZjo
mOYOxsYFKxnsmLSBAqaa+cF0cZwdig/xxEuZqRwPBn53s7HJVsjCKeVrN/qp2hVr
krViOFME29J0b5ZyBIf9MrkdC4dc+FDi/D6p5XNi+1RYI50010lCouiIUytpO6U+
FMRVgTvSII1M08hJmqfmzd91uhU7PXe3XcvFNHdnlRdTX750GlAsyOaOxaDSUHZD
rWcc74USRDSXfqgMiQGtQQcAtsZa3xJP3oD+2C76MblDTA6soX6gK6IJFl729Ixu
E4GoEPCyOateP8iY2M+/7EF/rOrgoje65iKnfP0ximxk8CdU9iNT/bbb5eCPufs8
+ddADN/cBVn0jTcK6t+OVWAXF/feBVWaVzQ7IweWCSQzVpoehCzsRQMIFk71IBx1
DhF59AT3XN/FdYaHUSbj
=MtFO
-----END PGP SIGNATURE-----

--nextPart5169580.u5JmytULgs--


From MAILER-DAEMON Sat Apr 16 15:40:43 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QBBMJ-0003K1-D0
	for mharc-autoconf@gnu.org; Sat, 16 Apr 2011 15:40:43 -0400
Received: from eggs.gnu.org ([140.186.70.92]:38929)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bounces@nabble.com>) id 1QBBMG-0003Jl-Rh
	for Autoconf@gnu.org; Sat, 16 Apr 2011 15:40:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bounces@nabble.com>) id 1QBBMF-0007Ex-RR
	for Autoconf@gnu.org; Sat, 16 Apr 2011 15:40:40 -0400
Received: from sam.nabble.com ([216.139.236.26]:37149)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bounces@nabble.com>) id 1QBBMF-0007Es-Ln
	for Autoconf@gnu.org; Sat, 16 Apr 2011 15:40:39 -0400
Received: from isper.nabble.com ([192.168.236.156])
	by sam.nabble.com with esmtp (Exim 4.69)
	(envelope-from <bounces@nabble.com>) id 1QBBME-0000Ig-Mr
	for Autoconf@gnu.org; Sat, 16 Apr 2011 12:40:38 -0700
Message-ID: <31414609.post@talk.nabble.com>
Date: Sat, 16 Apr 2011 12:40:38 -0700 (PDT)
From: imacky <ian@macky.net>
To: Autoconf@gnu.org
Subject: Re: AC_CHECK_LIB for X11 libraries
In-Reply-To: <31401406.post@talk.nabble.com>
MIME-Version: 1.0
X-Nabble-From: ian@macky.net
References: <31401406.post@talk.nabble.com>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 216.139.236.26
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Apr 2011 19:40:41 -0000


I am working around the problem by adding

AC_CHECK_FILE([/usr/X11R6/lib], [LDFLAGS="-L/usr/X11R6/lib"])



-- 
View this message in context: http://old.nabble.com/AC_CHECK_LIB-for-X11-libraries-tp31401406p31414609.html
Sent from the Gnu - Autoconf - General mailing list archive at Nabble.com.

From MAILER-DAEMON Mon Apr 18 02:59:51 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QBiR5-0001b9-Ij
	for mharc-autoconf@gnu.org; Mon, 18 Apr 2011 02:59:51 -0400
Received: from eggs.gnu.org ([140.186.70.92]:41168)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1QBiQz-0001aI-IC
	for autoconf@gnu.org; Mon, 18 Apr 2011 02:59:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1QBiQv-00088b-68
	for autoconf@gnu.org; Mon, 18 Apr 2011 02:59:45 -0400
Received: from [194.199.90.27] (port=42046 helo=chaos.univ-evry.fr)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1QBiQu-00083h-VH
	for autoconf@gnu.org; Mon, 18 Apr 2011 02:59:41 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AkQIANHVq03Cx1WL/2dsb2JhbACYFQEBjUF3wjyFcQSOAg
X-IronPort-AV: E=Sophos;i="4.64,231,1301868000"; 
   d="scan'208";a="6721685"
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos.univ-evry.fr with ESMTP; 18 Apr 2011 08:13:50 +0200
Date: Mon, 18 Apr 2011 08:13:48 +0200 (CEST)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: autoconf@gnu.org
Subject: how to pass new path to aclocal when using autoreconf
Message-ID: <Pine.LNX.4.64.1104180803310.16920@grozny.maths.univ-evry.fr>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.199.90.27
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Apr 2011 06:59:50 -0000


Hey,

I want to install XCB on  Windows. It requires libXau, which requires 
xorg-macros. I install everything in /usr/x11 (prefix value)

The autotools are in /usr/local

libXau's configure.ac wants xorg-macros.m4 which is in 
/usr/x11/share/aclocal, and libXau's autogen.sh calls autoreconf.

It fails as xorg-macros.m4 is not found

I tried to export ACLOCAL_FLAGS to "-I /usr/x11/share/aclocal" but it does 
not help; not surprising, actually, as that env var is not documented 
here:

http://www.gnu.org/software/automake/manual/automake.html#Macro-Search-Path

I would like to avoid copying that file in /usr/local/share/aclocal. Is 
there another way for autoreconf to make aclocal aware of anotheraclocal 
path ?

thank you

Vincent Torri


From MAILER-DAEMON Mon Apr 18 03:28:08 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QBisS-0005wD-8U
	for mharc-autoconf@gnu.org; Mon, 18 Apr 2011 03:28:08 -0400
Received: from eggs.gnu.org ([140.186.70.92]:60043)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QBisN-0005w7-DR
	for autoconf@gnu.org; Mon, 18 Apr 2011 03:28:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QBisJ-0003rE-2y
	for autoconf@gnu.org; Mon, 18 Apr 2011 03:28:03 -0400
Received: from mailout-de.gmx.net ([213.165.64.23]:47321)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QBisI-0003r8-MS
	for autoconf@gnu.org; Mon, 18 Apr 2011 03:27:59 -0400
Received: (qmail 15355 invoked by uid 0); 18 Apr 2011 07:27:56 -0000
Received: from 131.220.223.4 by www063.gmx.net with HTTP;
	Mon, 18 Apr 2011 09:27:53 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Date: Mon, 18 Apr 2011 09:27:53 +0200
From: "Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>
In-Reply-To: <Pine.LNX.4.64.1104180803310.16920@grozny.maths.univ-evry.fr>
Message-ID: <20110418072753.28020@gmx.net>
MIME-Version: 1.0
Organization: Institute for Numerical Simulation, University of Bonn
References: <Pine.LNX.4.64.1104180803310.16920@grozny.maths.univ-evry.fr>
Subject: Re: how to pass new path to aclocal when using autoreconf
To: Vincent Torri <vtorri@univ-evry.fr>
X-Authenticated: #13673931
X-Flags: 0001
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
X-Mutt-Fcc: =autoconf
X-Mutt-References: <Pine.LNX.4.64.1104180803310.16920@grozny.maths.univ-evry.fr>
X-Priority: 3
X-Provags-ID: V01U2FsdGVkX19/8Fln7AZ/lHHCDvBf2dVzC8HjK/z2ShiMm6HqZf
	LkyCkOTrzTAXyYHEEkdaJ1HhNBpQjmJiPXOw== 
Content-Transfer-Encoding: 8bit
X-GMX-UID: ytCZfMYiIydmFu7ApGdrF3dSa2FkZlW8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
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: <http://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: <http://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Apr 2011 07:28:07 -0000

Hello Vincent,

* Vincent Torri wrote on Mon, Apr 18, 2011 at 08:13:48AM CEST:
> I want to install XCB on  Windows. It requires libXau, which requires
> xorg-macros. I install everything in /usr/x11 (prefix value)
> 
> The autotools are in /usr/local
> 
> libXau's configure.ac wants xorg-macros.m4 which is in
> /usr/x11/share/aclocal, and libXau's autogen.sh calls autoreconf.
> 
> It fails as xorg-macros.m4 is not found

Two possibilities:
1) add the line /usr/x11/share/aclocal to the file
/usr/local/share/aclocal/dirlist

2) ACLOCAL='aclocal -I /usr/x11/share/aclocal' ./autogen.sh
(autoreconf honors the environment variable).

> I tried to export ACLOCAL_FLAGS to "-I /usr/x11/share/aclocal" but it does
> not help; not surprising, actually, as that env var is not documented here:

That will only work in the next version.

Cheers,
Ralf


From MAILER-DAEMON Wed Apr 20 18:52:02 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QCgFe-0004WJ-Rp
	for mharc-autoconf@gnu.org; Wed, 20 Apr 2011 18:52:02 -0400
Received: from eggs.gnu.org ([140.186.70.92]:49396)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QCgFc-0004UT-Sz
	for autoconf@gnu.org; Wed, 20 Apr 2011 18:52:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QCgFc-0001Se-0d
	for autoconf@gnu.org; Wed, 20 Apr 2011 18:52:00 -0400
Received: from nspiron-1.llnl.gov ([128.115.41.81]:29628)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QCgFb-0001SI-Rq
	for autoconf@gnu.org; Wed, 20 Apr 2011 18:51:59 -0400
X-Attachments: None
Received: from nspexhub-2.llnl.gov (HELO nspexhub-2.the-lab.llnl.gov)
	([128.115.54.114])
	by nspiron-1.llnl.gov with ESMTP; 20 Apr 2011 15:51:57 -0700
Received: from NSPEXMBX-C.the-lab.llnl.gov ([128.115.54.107]) by
	nspexhub-2.the-lab.llnl.gov ([172.16.54.114]) with mapi;
	Wed, 20 Apr 2011 15:51:55 -0700
From: "Too, Justin A." <too1@llnl.gov>
To: "autoconf@gnu.org" <autoconf@gnu.org>
Date: Wed, 20 Apr 2011 15:51:54 -0700
Subject: Autoconf versions: srcdir either relative/absolute
Thread-Topic: Autoconf versions: srcdir either relative/absolute
Thread-Index: Acv/rYvjqFP6fbqtRGee9hnz5xyXog==
Message-ID: <C9D4B19A.559C%too1@llnl.gov>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-MacOutlook/14.2.0.101115
acceptlanguage: en-US
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 128.115.41.81
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
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, 20 Apr 2011 22:52:01 -0000

Hi all,

I have the build trees for a few projects (don't know what version of autot=
ools they used), but I notice that srcdir varies.  From my local tests, it =
looks like newer versions of Autoconf set srcdir to be an absolute path, is=
 this correct?  Also, in which version of Autoconf did this change occur?

Thanks,
Justin

From MAILER-DAEMON Wed Apr 20 19:13:31 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QCgaR-0007aK-MH
	for mharc-autoconf@gnu.org; Wed, 20 Apr 2011 19:13:31 -0400
Received: from eggs.gnu.org ([140.186.70.92]:59647)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QCgaQ-0007aC-GD
	for autoconf@gnu.org; Wed, 20 Apr 2011 19:13:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QCgaP-00057S-AU
	for autoconf@gnu.org; Wed, 20 Apr 2011 19:13:30 -0400
Received: from mailout-de.gmx.net ([213.165.64.22]:33689)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QCgaO-000576-UQ
	for autoconf@gnu.org; Wed, 20 Apr 2011 19:13:29 -0400
Received: (qmail invoked by alias); 20 Apr 2011 23:13:26 -0000
Received: from xdsl-89-0-154-203.netcologne.de (EHLO localhost.localdomain)
	[89.0.154.203]
	by mail.gmx.net (mp060) with SMTP; 21 Apr 2011 01:13:26 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX18VkhJ57UEVdtOt4Wa11d+Nur/4C2wcMY0Lo2bvSA
	i/DNwGtqZHtD/p
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@gmx.de>)
	id 1QCgaL-00031V-H6; Thu, 21 Apr 2011 01:13:25 +0200
Date: Thu, 21 Apr 2011 01:13:25 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: "Too, Justin A." <too1@llnl.gov>
Subject: Re: Autoconf versions: srcdir either relative/absolute
Message-ID: <20110420231325.GB11453@gmx.de>
Mail-Followup-To: "Too, Justin A." <too1@llnl.gov>,
	"autoconf@gnu.org" <autoconf@gnu.org>
References: <C9D4B19A.559C%too1@llnl.gov>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <C9D4B19A.559C%too1@llnl.gov>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
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" <autoconf@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Apr 2011 23:13:31 -0000

Hello Justin,

* Too, Justin A. wrote on Thu, Apr 21, 2011 at 12:51:54AM CEST:
> I have the build trees for a few projects (don't know what version of
> autotools they used), but I notice that srcdir varies.  From my local
> tests, it looks like newer versions of Autoconf set srcdir to be an
> absolute path, is this correct?  Also, in which version of Autoconf
> did this change occur?

1) If you use
  ../src/configure

then srcdir will be relative.

2) If you use
  /absolute/path/to/configure

then srcdir will be absolute.

3) If you pass --srcdir=... to configure, it will be, well, whatever you
passed.

4) If you use
  `pwd`/configure

then old Autoconf versions would set an absolute srcdir, while newer
ones try to be smart and set srcdir to '.'.  Same happens in (3) if the
passed name happens to resolve to '.'.

Hope that helps.

Cheers,
Ralf


From MAILER-DAEMON Fri Apr 22 16:55:43 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QDNOB-0007on-Db
	for mharc-autoconf@gnu.org; Fri, 22 Apr 2011 16:55:43 -0400
Received: from eggs.gnu.org ([140.186.70.92]:53147)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QDNOA-0007oh-BW
	for autoconf@gnu.org; Fri, 22 Apr 2011 16:55:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QDNO9-0003nZ-DM
	for autoconf@gnu.org; Fri, 22 Apr 2011 16:55:42 -0400
Received: from nic.netdirect.ca ([216.16.235.2]:38929
	helo=rubicon.netdirect.ca) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QDNO9-0003mn-6m
	for autoconf@gnu.org; Fri, 22 Apr 2011 16:55:41 -0400
X-Originating-Ip: 216.16.235.2
Received: from localhost (nic.NetDirect.CA [216.16.235.2])
	by rubicon.netdirect.ca (8.13.8/8.13.8) with ESMTP id p3MKrT1L020811
	for <autoconf@gnu.org>; Fri, 22 Apr 2011 16:53:29 -0400
Date: Fri, 22 Apr 2011 16:53:29 -0400
From: Chris Frey <cdfrey@foursquare.net>
To: autoconf@gnu.org
Subject: how to override precious variables for subdirs
Message-ID: <20110422205329.GA20698@foursquare.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.2i
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 216.16.235.2
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, 22 Apr 2011 20:55:43 -0000

Hi,

I have a software package (Barry) that contains a number of subdirectories,
using the AC_CONFIG_SUBDIRS feature.

These subdirectories depend on the library that is built in the main tree.

Normally, I just export PKG_CONFIG_PATH to include the main tree, so
that the subdirectories' configure scripts can find the library.

Recently, PKG_CONFIG_PATH has become precious.  This means that when the
subdirectory configures are run, then PKG_CONFIG_PATH is set on the
command line, if it was set for the main directory.

So far, I have been unable to find any way to override this precious state
for subdirectories.

Is there a way to override this?  Is there a better way to achieve the
same ends?

Thanks!
- Chris



From MAILER-DAEMON Sat Apr 23 06:13:22 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QDZq6-0006qR-Kq
	for mharc-autoconf@gnu.org; Sat, 23 Apr 2011 06:13:22 -0400
Received: from eggs.gnu.org ([140.186.70.92]:40571)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QDZq3-0006oY-RZ
	for autoconf@gnu.org; Sat, 23 Apr 2011 06:13:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QDZq2-0007z2-Mc
	for autoconf@gnu.org; Sat, 23 Apr 2011 06:13:19 -0400
Received: from mailout-de.gmx.net ([213.165.64.22]:37358)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QDZq2-0007yn-5I
	for autoconf@gnu.org; Sat, 23 Apr 2011 06:13:18 -0400
Received: (qmail invoked by alias); 23 Apr 2011 10:13:14 -0000
Received: from xdsl-89-0-83-199.netcologne.de (EHLO localhost.localdomain)
	[89.0.83.199]
	by mail.gmx.net (mp042) with SMTP; 23 Apr 2011 12:13:14 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1+4Vitp4Ua48uZzSRKpRyh8I4y9+5wh/NKMWJ5ejz
	sEpjx7jw0+FjE0
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@gmx.de>)
	id 1QDZpx-0003ss-7e; Sat, 23 Apr 2011 12:13:13 +0200
Date: Sat, 23 Apr 2011 12:13:13 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Chris Frey <cdfrey@foursquare.net>
Subject: Re: how to override precious variables for subdirs
Message-ID: <20110423101313.GC14677@gmx.de>
Mail-Followup-To: Chris Frey <cdfrey@foursquare.net>, autoconf@gnu.org
References: <20110422205329.GA20698@foursquare.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110422205329.GA20698@foursquare.net>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
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: Sat, 23 Apr 2011 10:13:21 -0000

Hello Chris,

* Chris Frey wrote on Fri, Apr 22, 2011 at 10:53:29PM CEST:
> I have a software package (Barry) that contains a number of subdirectories,
> using the AC_CONFIG_SUBDIRS feature.
> 
> These subdirectories depend on the library that is built in the main tree.

Interesting.  Most subpackage setups I've come across work depth-first,
i.e., upper level packages depend on stuff built in sub packages.

> Normally, I just export PKG_CONFIG_PATH to include the main tree, so
> that the subdirectories' configure scripts can find the library.
> 
> Recently, PKG_CONFIG_PATH has become precious.  This means that when the
> subdirectory configures are run, then PKG_CONFIG_PATH is set on the
> command line, if it was set for the main directory.
> 
> So far, I have been unable to find any way to override this precious state
> for subdirectories.
> 
> Is there a way to override this?  Is there a better way to achieve the
> same ends?

I don't think it's possible to override precious-ness at configure time.
It may be hackable from within configure.ac, but that strategy doesn't
seem advisable.

It is possible to amend or modify $ac_configure_args from within the
toplevel configure (watch out with quoting, its contents are to be
eval'ed later), but that might mean you'd have to turn off config.cache.

Incidentally, a patch has been proposed quite recently to add extra
arguments to (some) sub package configure invocations.  It is still
pending copyright assignment clearance before review, but definitely
interesting.  It might help you.  However, given the preciousness it
might also mean that an eventual config.cache file cannot be shared
between the different configure scripts.

Hope that helps.

Cheers,
Ralf


From MAILER-DAEMON Mon Apr 25 15:31:13 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QERV3-0008WF-Kl
	for mharc-autoconf@gnu.org; Mon, 25 Apr 2011 15:31:13 -0400
Received: from eggs.gnu.org ([140.186.70.92]:40719)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QERV2-0008W8-9J
	for autoconf@gnu.org; Mon, 25 Apr 2011 15:31:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QERV1-0005BT-EZ
	for autoconf@gnu.org; Mon, 25 Apr 2011 15:31:12 -0400
Received: from nic.netdirect.ca ([216.16.235.2]:44080
	helo=rubicon.netdirect.ca) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QERV1-0005Az-AH
	for autoconf@gnu.org; Mon, 25 Apr 2011 15:31:11 -0400
X-Originating-Ip: 216.16.235.2
Received: from localhost (nic.NetDirect.CA [216.16.235.2])
	by rubicon.netdirect.ca (8.13.8/8.13.8) with ESMTP id p3PJSpFt007684
	for <autoconf@gnu.org>; Mon, 25 Apr 2011 15:28:51 -0400
Date: Mon, 25 Apr 2011 15:28:51 -0400
From: Chris Frey <cdfrey@foursquare.net>
To: autoconf@gnu.org
Subject: Re: how to override precious variables for subdirs
Message-ID: <20110425192851.GA7408@foursquare.net>
References: <20110422205329.GA20698@foursquare.net>
	<20110423101313.GC14677@gmx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110423101313.GC14677@gmx.de>
User-Agent: Mutt/1.4.2.2i
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 216.16.235.2
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, 25 Apr 2011 19:31:13 -0000

On Sat, Apr 23, 2011 at 12:13:13PM +0200, Ralf Wildenhues wrote:
> It is possible to amend or modify $ac_configure_args from within the
> toplevel configure (watch out with quoting, its contents are to be
> eval'ed later), but that might mean you'd have to turn off config.cache.

There is no API to do this, though, is there?  As I understand it,
$ac_configure_args is just one long string containing the arguments.

I did try to hack the individual $ac_env_PKG_CONFIG_PATH_value and
$ac_cv_env_*_value variables, but the command line arguments for
subdir processing seem to be generated before any user code.
By the time my code runs, the arguments are set.


> Incidentally, a patch has been proposed quite recently to add extra
> arguments to (some) sub package configure invocations.  It is still
> pending copyright assignment clearance before review, but definitely
> interesting.  It might help you.  However, given the preciousness it
> might also mean that an eventual config.cache file cannot be shared
> between the different configure scripts.

Where might I find this patch?  Maybe I could give it a try.

Thanks,
- Chris



From MAILER-DAEMON Tue Apr 26 09:50:27 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QEiep-0007R2-Jd
	for mharc-autoconf@gnu.org; Tue, 26 Apr 2011 09:50:27 -0400
Received: from eggs.gnu.org ([140.186.70.92]:56784)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <heber@ins.uni-bonn.de>) id 1QEieh-0007QE-P6
	for autoconf@gnu.org; Tue, 26 Apr 2011 09:50:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <heber@ins.uni-bonn.de>) id 1QEieg-0000RD-JS
	for autoconf@gnu.org; Tue, 26 Apr 2011 09:50:19 -0400
Received: from merkur.ins.uni-bonn.de ([131.220.223.13]:56719)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <heber@ins.uni-bonn.de>) id 1QEieg-0000Qp-Cv
	for autoconf@gnu.org; Tue, 26 Apr 2011 09:50:18 -0400
Received: from localhost (localhost [127.0.0.1])
	by merkur.ins.uni-bonn.de (Postfix) with ESMTP id 886E340525357
	for <autoconf@gnu.org>; Tue, 26 Apr 2011 15:50:16 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at merkur.ins.uni-bonn.de
Received: from merkur.ins.uni-bonn.de ([127.0.0.1])
	by localhost (merkur.ins.uni-bonn.de [127.0.0.1]) (amavisd-new,
	port 10024) with ESMTP id i27itKjL8t1w for <autoconf@gnu.org>;
	Tue, 26 Apr 2011 15:50:11 +0200 (CEST)
Received: from [192.168.200.63] (gibraltar [192.168.193.254])
	by merkur.ins.uni-bonn.de (Postfix) with ESMTPSA id 2145640525355
	for <autoconf@gnu.org>; Tue, 26 Apr 2011 15:50:11 +0200 (CEST)
Message-ID: <4DB6CD93.4090407@ins.uni-bonn.de>
Date: Tue, 26 Apr 2011 15:50:11 +0200
From: Frederik Heber <heber@ins.uni-bonn.de>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: regression tests: AT_DATA that can copy files?
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.220.223.13
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, 26 Apr 2011 13:50:25 -0000

Hey folks,

I need a hand with my regression tests and hope you find some time to
help me on.

I have some executable, let's call it 'foo', that parses a file,
performs something, saves the file.

I have regression testsuites for this code, each in the following manner:

AT_SETUP([Some nifty test])
AT_CHECK([/bin/cp -f <test_path>/pre/test.bar test.bar], 0)
AT_CHECK([../../foo test.bar --do-something], 0, [ignore], [ignore])
AT_CHECK([file=test.bar; diff $file <test_path>/post/test.bar], 0)
AT_CLEANUP

where "test_path" is some path in the source tree. It contains in the
subfolders "pre" and "post" the source file to use and the target file
as it should come out after 'foo' processed the source file with
"do-something" to compare to.

Now to my first problem: I would rather like to use AT_DATA for setting
up the test stage but would then be rendered to have the contents of
test.bar within the testscript which I consider unclean and not easy to
manage. Having the test files in separate files and folders, as
described above, is more to my liking. AT_DATA as it is is good for e.g.
interactive programs that parse their input from a AT_DATA generated
file, e.g. AT_DATA(input, [q\nx]) and foo <input ... but not for larger
files.

And my second one: the problem with my construct above is: 'make
distcheck' fails here because files from source tree (included with
EXTRA_DIST in Makefile.am) are set to read-only (and rightly so to avoid
writing the source tree itself). Hence, 'foo' can't write the file and
the test fails.
Now, of course, I could add another line,
AT_CHECK([chmod u+w test.bar], 0),
but I already don't like the use of /bin/cp ...

So, is there something like AT_DATA that can copy a file and keeping
sensible permissions? I generally like the ansatz with AT_SETUP and
AT_DATA to prepare the test, AT_CHECK to do and AT_CLEANUP to end it.
However, AT_DATA falls a bit short. What about a binary file being
required? ...


Kind regards,

Frederik


P.S.: Maybe I should add the way how I built my test source tree:
tests/regression
    test1/
    test1/pre/somefiles
    test1/post/somefilestocompareto
    test1/testsuite-test1.at
    test2/...
    ...
    testsuite.at (includes all .at files from subdirs)
    Makefile.am (contains EXTRA_DIST of all subdirs)

-- 
Dipl.Phys. Frederik Heber
Wegelerstrasse 6/5.011, 53115 Bonn
Tel.: +49 228 73 3866
(Arbeitsgruppe Prof. Dr. M. Griebel)


From MAILER-DAEMON Wed Apr 27 02:15:58 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QEy2Y-0007Nb-L6
	for mharc-autoconf@gnu.org; Wed, 27 Apr 2011 02:15:58 -0400
Received: from eggs.gnu.org ([140.186.70.92]:38002)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QEy2T-0007NS-Dz
	for autoconf@gnu.org; Wed, 27 Apr 2011 02:15:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QEy2P-0006pq-Ff
	for autoconf@gnu.org; Wed, 27 Apr 2011 02:15:53 -0400
Received: from mailout-de.gmx.net ([213.165.64.22]:54773)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@gmx.de>) id 1QEy2O-0006pY-Us
	for autoconf@gnu.org; Wed, 27 Apr 2011 02:15:49 -0400
Received: (qmail invoked by alias); 27 Apr 2011 06:15:47 -0000
Received: from xdsl-89-0-68-206.netcologne.de (EHLO localhost.localdomain)
	[89.0.68.206]
	by mail.gmx.net (mp040) with SMTP; 27 Apr 2011 08:15:47 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX19JbudOzsdJLghETxXF2JKWs5h7UIMvXXQqr7mSVT
	FNcZsR/iRmLKhw
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@gmx.de>)
	id 1QEy2M-0004pJ-Ay; Wed, 27 Apr 2011 08:15:46 +0200
Date: Wed, 27 Apr 2011 08:15:46 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Chris Frey <cdfrey@foursquare.net>
Subject: Re: how to override precious variables for subdirs
Message-ID: <20110427061546.GB17569@gmx.de>
Mail-Followup-To: Chris Frey <cdfrey@foursquare.net>, autoconf@gnu.org
References: <20110422205329.GA20698@foursquare.net>
	<20110423101313.GC14677@gmx.de>
	<20110425192851.GA7408@foursquare.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110425192851.GA7408@foursquare.net>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
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: Wed, 27 Apr 2011 06:15:57 -0000

Hello Chris,

* Chris Frey wrote on Mon, Apr 25, 2011 at 09:28:51PM CEST:
> On Sat, Apr 23, 2011 at 12:13:13PM +0200, Ralf Wildenhues wrote:
> > It is possible to amend or modify $ac_configure_args from within the
> > toplevel configure (watch out with quoting, its contents are to be
> > eval'ed later), but that might mean you'd have to turn off config.cache.
> 
> There is no API to do this, though, is there?

Not really.

> As I understand it,
> $ac_configure_args is just one long string containing the arguments.

Yes.  But they are quoted suitably to survive being eval'ed.  This
latter bit is important: you cannot analyze them either without using
eval.

> I did try to hack the individual $ac_env_PKG_CONFIG_PATH_value and
> $ac_cv_env_*_value variables, but the command line arguments for
> subdir processing seem to be generated before any user code.
> By the time my code runs, the arguments are set.

Right.

> > Incidentally, a patch has been proposed quite recently to add extra
> > arguments to (some) sub package configure invocations.  It is still
> > pending copyright assignment clearance before review, but definitely
> > interesting.  It might help you.  However, given the preciousness it
> > might also mean that an eventual config.cache file cannot be shared
> > between the different configure scripts.
> 
> Where might I find this patch?  Maybe I could give it a try.

http://thread.gmane.org/gmane.comp.sysutils.autoconf.general/13805/focus=13828

As I said, it wouldn't yet solve the config.cache issues with your
approach (so you shouldn't use -C with it for now).

Cheers,
Ralf


From MAILER-DAEMON Fri Apr 29 11:01:37 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QFpCL-0007m4-67
	for mharc-autoconf@gnu.org; Fri, 29 Apr 2011 11:01:37 -0400
Received: from eggs.gnu.org ([140.186.70.92]:52874)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <u.utku.turuncoglu@be.itu.edu.tr>) id 1QFpA4-0007fu-HA
	for autoconf@gnu.org; Fri, 29 Apr 2011 10:59:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <u.utku.turuncoglu@be.itu.edu.tr>) id 1QFpA3-0002EH-9z
	for autoconf@gnu.org; Fri, 29 Apr 2011 10:59:16 -0400
Received: from mail1.be.itu.edu.tr ([160.75.90.16]:36531
	helo=outgoing.be.itu.edu.tr) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <u.utku.turuncoglu@be.itu.edu.tr>) id 1QFpA2-0002Du-UV
	for autoconf@gnu.org; Fri, 29 Apr 2011 10:59:15 -0400
Received: from webmail.be.itu.edu.tr (web1.be.itu.edu.tr [160.75.90.14])
	by outgoing.be.itu.edu.tr (Postfix) with ESMTP id 2D99CC3D16
	for <autoconf@gnu.org>; Fri, 29 Apr 2011 18:08:44 +0300 (EEST)
Received: from 140.105.47.82 (proxying for 140.105.20.60, 127.0.0.1)
	(SquirrelMail authenticated user u.utku.turuncoglu)
	by webmail.be.itu.edu.tr with HTTP;
	Fri, 29 Apr 2011 18:08:37 +0300 (EEST)
Message-ID: <34805.140.105.47.82.1304089717.squirrel@webmail.be.itu.edu.tr>
Date: Fri, 29 Apr 2011 18:08:37 +0300 (EEST)
Subject: using content of an include file in configure.ac ...
From: u.utku.turuncoglu@be.itu.edu.tr
To: autoconf@gnu.org
User-Agent: SquirrelMail/1.4.8-4.0.1.el5
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
X-Priority: 3 (Normal)
Importance: Normal
X-be_itu_edu_tr-MailScanner-Information: Please contact the ISP for more
	information
X-be_itu_edu_tr-MailScanner-ID: 2D99CC3D16.5C3B1
X-be_itu_edu_tr-MailScanner: Found to be clean
X-be_itu_edu_tr-MailScanner-From: u.utku.turuncoglu@be.itu.edu.tr
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 160.75.90.16
X-Mailman-Approved-At: Fri, 29 Apr 2011 11:01:35 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Apr 2011 14:59:17 -0000

Hi,

I have an include file (belongs to an external library, defs.mk) that
contains bunch of definitions such as,

F90COMPILER=3Dmpif90
F90LINKER=3Dmpif90
F90COMPILEOPTS=3D-O -fPIC -m64 -mcmodel=3Dsmall -threads  -openmp

in it and i just want to use these definitions in the configure.ac file
without hard coding them. Is there any specific autoconf macro to do that=
?
Before using autoconf, i could use it by simply adding include statement
at the top of the makefile.

Regards,

--ufuk


--=20
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



From MAILER-DAEMON Fri Apr 29 11:04:47 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QFpFP-00081M-3H
	for mharc-autoconf@gnu.org; Fri, 29 Apr 2011 11:04:47 -0400
Received: from eggs.gnu.org ([140.186.70.92]:44882)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QFpFM-00080b-M5
	for autoconf@gnu.org; Fri, 29 Apr 2011 11:04:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QFpFL-0003Dp-D0
	for autoconf@gnu.org; Fri, 29 Apr 2011 11:04:44 -0400
Received: from mx1.redhat.com ([209.132.183.28]:38083)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QFpFL-0003D7-2x
	for autoconf@gnu.org; Fri, 29 Apr 2011 11:04:43 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3TF4d7g025643
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 29 Apr 2011 11:04:39 -0400
Received: from [10.3.113.75] (ovpn-113-75.phx2.redhat.com [10.3.113.75])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id p3TF4dg5010774; Fri, 29 Apr 2011 11:04:39 -0400
Message-ID: <4DBAD386.5080409@redhat.com>
Date: Fri, 29 Apr 2011 09:04:38 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: u.utku.turuncoglu@be.itu.edu.tr
Subject: Re: using content of an include file in configure.ac ...
References: <34805.140.105.47.82.1304089717.squirrel@webmail.be.itu.edu.tr>
In-Reply-To: <34805.140.105.47.82.1304089717.squirrel@webmail.be.itu.edu.tr>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig639EBAE7A23442672B252AEB"
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: Fri, 29 Apr 2011 15:04:45 -0000

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

On 04/29/2011 09:08 AM, u.utku.turuncoglu@be.itu.edu.tr wrote:
> Hi,
>=20
> I have an include file (belongs to an external library, defs.mk) that
> contains bunch of definitions such as,
>=20
> F90COMPILER=3Dmpif90
> F90LINKER=3Dmpif90
> F90COMPILEOPTS=3D-O -fPIC -m64 -mcmodel=3Dsmall -threads  -openmp

So this is a file that you want included in your Makefile, right?

>=20
> in it and i just want to use these definitions in the configure.ac file=

> without hard coding them. Is there any specific autoconf macro to do th=
at?

No need for an autoconf macro.  If you are using automake, then this is
an automake question (but yes, automake has support for including
makefile fragments in your Makefile.am).  If you are not using automake,
then write the same include statement in your Makefile.in that you were
used to seeing in your Makefile, and autoconf won't care (autoconf just
substitutes the @text@ markers in Makefile.in, it doesn't do any parsing
of those contents; and automake parses Makefile.am contents to create
Makefile.in).

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig639EBAE7A23442672B252AEB
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNutOHAAoJEKeha0olJ0NqaEoH/iBxU67JnyGLF481R5bHSLPg
QlW+tHeA6XBpiVwpu7MBY82nGbDqVYiVKuMYit3yRelq8pbhktzzZaCau1Sa8h28
x5j32JELt3t32ww4XzWyMpMmLxdEfMclTZ2WRtl4LyDJ4RfHzD6LDrOBWyDvZNCj
BOANpM4pF1FkTxnUb8/zrGlrprKIdEULfnKa2y1GmyJU4gZUjyvOuSbWXKMyEboC
n2FyUjScLzd7qEknxG95Ra/UmIoGZWbnhanotS7StReGuOnMWoPNZTlCkqUGOtA5
ZzBz//EFVCMfn1rQlRKgAG/KAkZeJTlQQjFCoCIXrX1TzHYnL8aKdaPbOjjg2cs=
=xYAl
-----END PGP SIGNATURE-----

--------------enig639EBAE7A23442672B252AEB--


From MAILER-DAEMON Fri Apr 29 12:02:58 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QFq9i-0003tU-0j
	for mharc-autoconf@gnu.org; Fri, 29 Apr 2011 12:02:58 -0400
Received: from eggs.gnu.org ([140.186.70.92]:38828)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <u.utku.turuncoglu@be.itu.edu.tr>) id 1QFq9f-0003rv-RW
	for autoconf@gnu.org; Fri, 29 Apr 2011 12:02:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <u.utku.turuncoglu@be.itu.edu.tr>) id 1QFq9b-00057A-4t
	for autoconf@gnu.org; Fri, 29 Apr 2011 12:02:55 -0400
Received: from smtp1.ictp.it ([140.105.16.51]:56120)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <u.utku.turuncoglu@be.itu.edu.tr>) id 1QFq9a-00056k-SY
	for autoconf@gnu.org; Fri, 29 Apr 2011 12:02:51 -0400
Received: from localhost (localhost [127.0.0.1])
	by smtp1.ictp.it (Postfix) with ESMTP id E7CFFB8D;
	Fri, 29 Apr 2011 18:02:46 +0200 (CEST)
X-Virus-Scanned: amavisd-new at 
Received: from smtp1.ictp.it ([127.0.0.1])
	by localhost (localhost [127.0.0.1]) (amavisd-new, port 10025)
	with LMTP id ihiwFCjpVBY1; Fri, 29 Apr 2011 18:02:44 +0200 (CEST)
Received: from wf0-20-60.ictp.it (unknown [140.105.20.60])
	(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp1.ictp.it (Postfix) with ESMTPSA id 0D7482D6;
	Fri, 29 Apr 2011 18:02:43 +0200 (CEST)
Message-ID: <4DBAE124.50703@be.itu.edu.tr>
Date: Fri, 29 Apr 2011 18:02:44 +0200
From: "Ufuk Utku Turuncoglu (BE)" <u.utku.turuncoglu@be.itu.edu.tr>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
	rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
Subject: Re: using content of an include file in configure.ac ...
References: <34805.140.105.47.82.1304089717.squirrel@webmail.be.itu.edu.tr>
	<4DBAD386.5080409@redhat.com>
In-Reply-To: <4DBAD386.5080409@redhat.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.105.16.51
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
Cc: 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: Fri, 29 Apr 2011 16:02:57 -0000

Hi,

Thanks for your help. Okay, i can add the following line into Makefile.in,

@DO_COMPILE_LIBEXT_TRUE@ include @LIB_PREFIX@/def.ex

and it solves the problem but i just wonder that the automake solution. 
I think that automake will be much more generic solution. Do you have 
any idea about implementing that kind of logic in automake?

Thanks again,

--ufuk

On 4/29/11 5:04 PM, Eric Blake wrote:
> On 04/29/2011 09:08 AM, u.utku.turuncoglu@be.itu.edu.tr wrote:
>> Hi,
>>
>> I have an include file (belongs to an external library, defs.mk) that
>> contains bunch of definitions such as,
>>
>> F90COMPILER=mpif90
>> F90LINKER=mpif90
>> F90COMPILEOPTS=-O -fPIC -m64 -mcmodel=small -threads  -openmp
> So this is a file that you want included in your Makefile, right?
>
>> in it and i just want to use these definitions in the configure.ac file
>> without hard coding them. Is there any specific autoconf macro to do that?
> No need for an autoconf macro.  If you are using automake, then this is
> an automake question (but yes, automake has support for including
> makefile fragments in your Makefile.am).  If you are not using automake,
> then write the same include statement in your Makefile.in that you were
> used to seeing in your Makefile, and autoconf won't care (autoconf just
> substitutes the @text@ markers in Makefile.in, it doesn't do any parsing
> of those contents; and automake parses Makefile.am contents to create
> Makefile.in).
>
>
>
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/listinfo/autoconf


From MAILER-DAEMON Fri Apr 29 15:22:28 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QFtGm-00016q-Qw
	for mharc-autoconf@gnu.org; Fri, 29 Apr 2011 15:22:28 -0400
Received: from eggs.gnu.org ([140.186.70.92]:35756)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QFtGk-00016j-24
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:22:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QFtGi-00028v-85
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:22:25 -0400
Received: from nic.netdirect.ca ([216.16.235.2]:39135
	helo=rubicon.netdirect.ca) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QFtGi-00028N-4V
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:22:24 -0400
X-Originating-Ip: 216.16.235.2
Received: from localhost (nic.NetDirect.CA [216.16.235.2])
	by rubicon.netdirect.ca (8.13.8/8.13.8) with ESMTP id p3TJJsCU002795
	for <autoconf@gnu.org>; Fri, 29 Apr 2011 15:19:54 -0400
Date: Fri, 29 Apr 2011 15:19:53 -0400
From: Chris Frey <cdfrey@foursquare.net>
To: autoconf@gnu.org
Subject: --disable-rpath does not work for me
Message-ID: <20110429191953.GA2610@foursquare.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.2i
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 216.16.235.2
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, 29 Apr 2011 19:22:27 -0000

Hi,

I've done a number of tests on a number of distros and a number of
autoconf releases, and the best I can discover is that --disable-rpath
is a noop.  I hope that's not true.

If anyone can figure out how to get the following minimal test case to build
and install into /tmp/libtestcase, and have the resulting bin/testcase
installed without an rpath, *please* let me know how you did it.

	http://pages.netdirect.ca/~cdfrey/disable-rpath-0.1.tar.gz

Thanks!
- Chris



From MAILER-DAEMON Fri Apr 29 15:47:37 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QFtf6-0004OK-V3
	for mharc-autoconf@gnu.org; Fri, 29 Apr 2011 15:47:37 -0400
Received: from eggs.gnu.org ([140.186.70.92]:59805)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QFtf4-0004OD-Q2
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:47:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QFtf3-0005g9-Ou
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:47:34 -0400
Received: from mx1.redhat.com ([209.132.183.28]:53971)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1QFtf3-0005g5-C9
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:47:33 -0400
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 p3TJlQFL029922
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 29 Apr 2011 15:47:26 -0400
Received: from [10.3.113.75] (ovpn-113-75.phx2.redhat.com [10.3.113.75])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p3TJlPU0031958; Fri, 29 Apr 2011 15:47:25 -0400
Message-ID: <4DBB15CD.2040209@redhat.com>
Date: Fri, 29 Apr 2011 13:47:25 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: Chris Frey <cdfrey@foursquare.net>
Subject: Re: --disable-rpath does not work for me
References: <20110429191953.GA2610@foursquare.net>
In-Reply-To: <20110429191953.GA2610@foursquare.net>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig18792DC589D8B3B379EF17BC"
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: 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, 29 Apr 2011 19:47:35 -0000

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

On 04/29/2011 01:19 PM, Chris Frey wrote:
> Hi,
>=20
> I've done a number of tests on a number of distros and a number of
> autoconf releases, and the best I can discover is that --disable-rpath
> is a noop.  I hope that's not true.

Autoconf proper does not have a --disable-rpath option.  However, the
havelib module of gnulib documents such an option, as provided by the
file m4/lib-link.m4.  Perhaps you'd get better results by asking Bruno
Haible, the author of that file, over on the bug-gnulib mailing list.
--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig18792DC589D8B3B379EF17BC
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNuxXNAAoJEKeha0olJ0NqNZoH/iOLavjtqyesM4CUegjZVyLI
cccRgXL73yeChhuimR5We1F8cUK8GAR9wG+/MnrTpdxKhEwUfTHFZ6TmIWOolbce
CxvxV2kzPP0mONdEsSoJEjGQPN/sKFIQiQQIXdeveboG6vqCOIEqN55O6Yx0HF5J
CelHPYyo8Kiz2z1LO9PPPuLLJIvGP6/WR9idMv2jjPbW8B5++Bqpp44lc32KuZ6q
QpfcJ4rOtxKcgl/b5eqcw4XcA+zbQv88faGNcqXcZS8t4Vdb1NBQGjY5CnZxhd6J
KYy/tGBhWKx0FUWj2k8srjISznwwJHwki4KHNE50WR+pFlHVJJ2hSnSuWjcLFAI=
=mVtq
-----END PGP SIGNATURE-----

--------------enig18792DC589D8B3B379EF17BC--


From MAILER-DAEMON Fri Apr 29 15:53:51 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QFtl9-0005Xs-Sr
	for mharc-autoconf@gnu.org; Fri, 29 Apr 2011 15:53:51 -0400
Received: from eggs.gnu.org ([140.186.70.92]:41442)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QFtl7-0005XH-Ur
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:53:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QFtl6-0006Xa-W0
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:53:49 -0400
Received: from nic.netdirect.ca ([216.16.235.2]:49389
	helo=rubicon.netdirect.ca) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cdfrey@foursquare.net>) id 1QFtl6-0006XT-RY
	for autoconf@gnu.org; Fri, 29 Apr 2011 15:53:48 -0400
X-Originating-Ip: 216.16.235.2
Received: from localhost (nic.NetDirect.CA [216.16.235.2])
	by rubicon.netdirect.ca (8.13.8/8.13.8) with ESMTP id p3TJpNHY005110;
	Fri, 29 Apr 2011 15:51:23 -0400
Date: Fri, 29 Apr 2011 15:51:23 -0400
From: Chris Frey <cdfrey@foursquare.net>
To: Eric Blake <eblake@redhat.com>
Subject: Re: --disable-rpath does not work for me
Message-ID: <20110429195123.GA4583@foursquare.net>
References: <20110429191953.GA2610@foursquare.net>
	<4DBB15CD.2040209@redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4DBB15CD.2040209@redhat.com>
User-Agent: Mutt/1.4.2.2i
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 216.16.235.2
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, 29 Apr 2011 19:53:50 -0000

On Fri, Apr 29, 2011 at 01:47:25PM -0600, Eric Blake wrote:
> Autoconf proper does not have a --disable-rpath option.  However, the
> havelib module of gnulib documents such an option, as provided by the
> file m4/lib-link.m4.  Perhaps you'd get better results by asking Bruno
> Haible, the author of that file, over on the bug-gnulib mailing list.

I didn't realize it was not an autoconf option, although I should
have noticed that in my own test case.

Thanks very much for the correction and pointer.

- Chris



From MAILER-DAEMON Fri Apr 29 23:34:22 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QG0wo-0000G1-Lv
	for mharc-autoconf@gnu.org; Fri, 29 Apr 2011 23:34:22 -0400
Received: from eggs.gnu.org ([140.186.70.92]:38262)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QG0wm-0000FW-DA
	for autoconf@gnu.org; Fri, 29 Apr 2011 23:34:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QG0wl-0001NC-7C
	for autoconf@gnu.org; Fri, 29 Apr 2011 23:34:20 -0400
Received: from nspiron-1.llnl.gov ([128.115.41.81]:35582)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QFwvI-0004ul-65
	for autoconf@gnu.org; Fri, 29 Apr 2011 19:16:32 -0400
X-Attachments: None
Received: from nspexhub-1.llnl.gov (HELO nspexhub-1.the-lab.llnl.gov)
	([128.115.54.113])
	by nspiron-1.llnl.gov with ESMTP; 29 Apr 2011 16:16:29 -0700
Received: from NSPEXMBX-C.the-lab.llnl.gov ([128.115.54.103]) by
	nspexhub-1.the-lab.llnl.gov ([172.16.54.113]) with mapi;
	Fri, 29 Apr 2011 16:16:29 -0700
From: "Too, Justin A." <too1@llnl.gov>
To: "autoconf@gnu.org" <autoconf@gnu.org>
Date: Fri, 29 Apr 2011 16:16:28 -0700
Subject: AM_PROG_UPC
Thread-Topic: AM_PROG_UPC
Thread-Index: AcwGw3g42QodgTRoRgGvdzoue8cQHg==
Message-ID: <C9E094DC.69F1%too1@llnl.gov>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-MacOutlook/14.2.0.101115
acceptlanguage: en-US
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 128.115.41.81
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
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, 30 Apr 2011 03:34:21 -0000

Hi all,

In my configure.ac I simply invoke: AC_PROG_UPC

=85
$ aclocal =85
    aclocal:configure.ac:12: warning: macro `AM_PROG_UPC' not found in libr=
ary
=85
$ autoconf
    Configure.ac:12: error: possibly undefined macro: AM_PROG_UPC
If this token and others are legitimate, please use m4patternallow.
See the Autoconf documentation.

Is this a non-standard macro?  Then, how can I add UPC support to my Autoto=
ols project?

Thanks,
Justin

From MAILER-DAEMON Fri Apr 29 23:57:19 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QG1J1-000239-5p
	for mharc-autoconf@gnu.org; Fri, 29 Apr 2011 23:57:19 -0400
Received: from eggs.gnu.org ([140.186.70.92]:49077)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1QG1Iy-00022P-Li
	for autoconf@gnu.org; Fri, 29 Apr 2011 23:57:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1QG1Ix-00030E-II
	for autoconf@gnu.org; Fri, 29 Apr 2011 23:57:16 -0400
Received: from mout2.freenet.de ([195.4.92.92]:51438)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1QG1Ix-0002zd-DL
	for autoconf@gnu.org; Fri, 29 Apr 2011 23:57:15 -0400
Received: from [195.4.92.28] (helo=18.mx.freenet.de)
	by mout2.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (port
	25) (Exim 4.72 #5)
	id 1QG1Iu-00064A-0P; Sat, 30 Apr 2011 05:57:12 +0200
Received: from hsi-kbw-109-193-024-246.hsi7.kabel-badenwuerttemberg.de
	([109.193.24.246]:64107 helo=[192.168.1.104])
	by 18.mx.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de)
	(TLSv1:CAMELLIA256-SHA:256) (port 587) (Exim 4.72 #3)
	id 1QG1It-0000LP-T9; Sat, 30 Apr 2011 05:57:11 +0200
Message-ID: <4DBB8893.7080308@freenet.de>
Date: Sat, 30 Apr 2011 05:57:07 +0200
From: Ralf Corsepius <rc040203@freenet.de>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14
	Thunderbird/3.1.9
MIME-Version: 1.0
To: "Too, Justin A." <too1@llnl.gov>
Subject: Re: AM_PROG_UPC
References: <C9E094DC.69F1%too1@llnl.gov>
In-Reply-To: <C9E094DC.69F1%too1@llnl.gov>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 195.4.92.92
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: Sat, 30 Apr 2011 03:57:17 -0000

On 04/30/2011 01:16 AM, Too, Justin A. wrote:
> Hi all,
>
> In my configure.ac I simply invoke: AC_PROG_UPC
>
> â€¦
> $ aclocal â€¦
>      aclocal:configure.ac:12: warning: macro `AM_PROG_UPC' not found in library
> â€¦
> $ autoconf
>      Configure.ac:12: error: possibly undefined macro: AM_PROG_UPC
> If this token and others are legitimate, please use m4patternallow.
> See the Autoconf documentation.
>
> Is this a non-standard macro?
Yes.

[Apart of this, AM_PROG_UPC violates auto*tools naming conventions; 
AM_*/AM_* prefixed macros are reserved for autoconf rsp. automake.]

> Then, how can I add UPC support to my Autotools project?
Non-standard macros need to be supplied by either the package itself or 
by other packages.

There are several ways to do so, so answering your question would 
require knowing more details about the package you are trying to build.

Ralf



From MAILER-DAEMON Sat Apr 30 14:34:47 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QGF0B-00048X-UN
	for mharc-autoconf@gnu.org; Sat, 30 Apr 2011 14:34:47 -0400
Received: from eggs.gnu.org ([140.186.70.92]:45101)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QGF09-00047m-7k
	for autoconf@gnu.org; Sat, 30 Apr 2011 14:34:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QGF08-00006w-0V
	for autoconf@gnu.org; Sat, 30 Apr 2011 14:34:45 -0400
Received: from nspiron-1.llnl.gov ([128.115.41.81]:34486)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <too1@llnl.gov>) id 1QGF07-00006k-SP
	for autoconf@gnu.org; Sat, 30 Apr 2011 14:34:43 -0400
X-Attachments: None
Received: from nspexhub-1.llnl.gov (HELO nspexhub-1.the-lab.llnl.gov)
	([128.115.54.113])
	by nspiron-1.llnl.gov with ESMTP; 30 Apr 2011 11:34:42 -0700
Received: from NSPEXMBX-C.the-lab.llnl.gov ([128.115.54.103]) by
	nspexhub-1.the-lab.llnl.gov ([172.16.54.113]) with mapi;
	Sat, 30 Apr 2011 11:34:42 -0700
From: "Too, Justin A." <too1@llnl.gov>
To: Ralf Corsepius <rc040203@freenet.de>
Date: Sat, 30 Apr 2011 11:34:41 -0700
Subject: Re: AM_PROG_UPC
Thread-Topic: AM_PROG_UPC
Thread-Index: AcwHZUUiL7xP7d5DSh6YYIa9AWmwOQ==
Message-ID: <C9E1A191.6A2F%too1@llnl.gov>
In-Reply-To: <4DBB8893.7080308@freenet.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-MacOutlook/14.2.0.101115
acceptlanguage: en-US
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 128.115.41.81
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: Sat, 30 Apr 2011 18:34:46 -0000

On 4/29/11 8:57 PM, "Ralf Corsepius" <rc040203@freenet.de> wrote:

>On 04/30/2011 01:16 AM, Too, Justin A. wrote:
>> Hi all,
>>
>> In my configure.ac I simply invoke: AC_PROG_UPC
>>
>> =8A
>> $ aclocal =8A
>>      aclocal:configure.ac:12: warning: macro `AM_PROG_UPC' not found in
>>library
>> =8A
>> $ autoconf
>>      Configure.ac:12: error: possibly undefined macro: AM_PROG_UPC
>> If this token and others are legitimate, please use m4patternallow.
>> See the Autoconf documentation.
>>
>> Is this a non-standard macro?
>Yes.
>
>[Apart of this, AM_PROG_UPC violates auto*tools naming conventions;
>AM_*/AM_* prefixed macros are reserved for autoconf rsp. automake.]
>
>> Then, how can I add UPC support to my Autotools project?
>Non-standard macros need to be supplied by either the package itself or
>by other packages.
>
>There are several ways to do so, so answering your question would
>require knowing more details about the package you are trying to build.

Currently, I'm setting my upc file extensions to .c so that they will
compile without complaint from Automake, however it's obviously more clear
if they had a .upc extension:

foo_la_SOURCES =3D \
 main.c
 test.c

I want:

foo_la_SOURCES =3D \
 main.upc
 test.upc



I found this documentation:

    18.2 Handling new file extensions
   =20
https://idlebox.net/2009/apidocs/automake-1.11.zip/automake_18.html#SEC148

So I'm assuming I can do this:

.upc.o:
        upcc -c -o $@ $<


But this would have to be in every Makefile.am where I'd want to compile
UPC.  Also, I would have to do a lot of configure checking and setting up
myself so that I can use $(UPC) as the compiler in my rule, check that
upc/upcc is available, etc.  The AM_PROG_UPC macro seemed like the most
convenient method.


Thanks,
Justin


>
>Ralf
>



From MAILER-DAEMON Sat Apr 30 16:10:55 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QGGVD-0004Xd-SU
	for mharc-autoconf@gnu.org; Sat, 30 Apr 2011 16:10:55 -0400
Received: from eggs.gnu.org ([140.186.70.92]:60247)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1QGGVA-0004VX-JA
	for autoconf@gnu.org; Sat, 30 Apr 2011 16:10:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1QGGV9-0004pT-8W
	for autoconf@gnu.org; Sat, 30 Apr 2011 16:10:52 -0400
Received: from mail-wy0-f169.google.com ([74.125.82.169]:36304)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1QGGV6-0004oa-25; Sat, 30 Apr 2011 16:10:48 -0400
Received: by wyf19 with SMTP id 19so4291789wyf.0
	for <multiple recipients>; Sat, 30 Apr 2011 13:10:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:from:to:subject:date:user-agent:cc:references
	:in-reply-to:mime-version:content-type:content-transfer-encoding
	:message-id; bh=9TG/0+KGMBCr+E/G7ty3xBRGYYV4mk8fauE90UMLjMo=;
	b=BEeq6w99K0C4NhDIxabTCQweJw0BZCAXGwHtguN4IXY+qU9lAhDGA3P1PKPXYxpVjp
	/AAJTkIaYlfGeptLhs/qPnE1bMIYl3iHmr/QvtyAK+Q3LTOcr3V7cogeRbzuhkA2u2b/
	wIwymuM5/vkaE2uJEnm/sl4R7tcAOyTD2JQ+U=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	b=fhWrGOOHtUk+I6qU5AkzyYlq5xPB+JVnO/SNVJqLshR7tfjifrDPMjQP/JaI4YEoUd
	+P/64LrWx580too794UadiK8FBKpoJ7+pVEZmzC9QgJwL3Tx4bejwu7BecZlrywn7saq
	Na3tKIye2xzYlHivHGbksa7vzp9f9Hm1dcHw0=
Received: by 10.216.134.207 with SMTP id s57mr1257710wei.25.1304194246324;
	Sat, 30 Apr 2011 13:10:46 -0700 (PDT)
Received: from bigio.localnet
	(host80-30-dynamic.56-82-r.retail.telecomitalia.it [82.56.30.80])
	by mx.google.com with ESMTPS id t72sm1939087wei.44.2011.04.30.13.10.43
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sat, 30 Apr 2011 13:10:44 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: bug-automake@gnu.org
Subject: upc (Unified Parallel C) support in automake (was: Re: AM_PROG_UPC)
Date: Sat, 30 Apr 2011 22:10:34 +0200
User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
References: <C9E1A191.6A2F%too1@llnl.gov>
In-Reply-To: <C9E1A191.6A2F%too1@llnl.gov>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Message-Id: <201104302210.35351.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 74.125.82.169
Cc: "Too, Justin A." <too1@llnl.gov>, autoconf@gnu.org,
	Ralf Corsepius <rc040203@freenet.de>, automake@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, 30 Apr 2011 20:10:53 -0000

[adding automake and bug-automake lists]
[follow-ups might drop autoconf list IMHO]
[Reference: <http://lists.gnu.org/archive/html/autoconf/2011-04/msg00072.ht=
ml>]

Hello Justin and Ralf, and sorry for the delay.

On Saturday 30 April 2011, Justin  wrote:
> On 4/29/11 8:57 PM, "Ralf Corsepius" <rc040203@freenet.de> wrote:
>=20
> >On 04/30/2011 01:16 AM, Too, Justin A. wrote:
> >> Hi all,
> >>
> >> In my configure.ac I simply invoke: AC_PROG_UPC
> >>
> >> =C5=A0
> >> $ aclocal =C5=A0
> >>      aclocal:configure.ac:12: warning: macro `AM_PROG_UPC' not found in
> >>library
> >> =C5=A0
> >> $ autoconf
> >>      Configure.ac:12: error: possibly undefined macro: AM_PROG_UPC
> >> If this token and others are legitimate, please use m4patternallow.
> >> See the Autoconf documentation.
> >>
> >> Is this a non-standard macro?
> >Yes.
> >
No, it's not (well, it shouldn't be).  It is defined in the file
`upc.m4' provided by automake.  Thus the failure above, if not due
to some misconfiguration or user error, is an automake bug.

Justin, could you please provide more details about the failure you
encountered?  What system are you on?  Which automake version are you
using?  What is the content of your configure.ac and Makefile.am files?
And everything else you think might be useful.

> >[Apart of this, AM_PROG_UPC violates auto*tools naming conventions;
> >AM_*/AM_* prefixed macros are reserved for autoconf rsp. automake.]
> >
> >> Then, how can I add UPC support to my Autotools project?
> >Non-standard macros need to be supplied by either the package itself or
> >by other packages.
> >
> >There are several ways to do so, so answering your question would
> >require knowing more details about the package you are trying to build.
>=20
> Currently, I'm setting my upc file extensions to .c so that they will
> compile without complaint from Automake, however it's obviously more clear
> if they had a .upc extension:
>=20
> foo_la_SOURCES =3D \
>  main.c
>  test.c
>=20
> I want:
>=20
> foo_la_SOURCES =3D \
>  main.upc
>  test.upc
>=20
>
Well, this should be supported out of the box with Automake (there is
even a testcase about this in the automake testsuite)...  Have you really
tried it?  Does it fail for you?  If yes, what is the error?

>=20
> I found this documentation:
>=20
>     18.2 Handling new file extensions
>    =20
> https://idlebox.net/2009/apidocs/automake-1.11.zip/automake_18.html#SEC148
>=20
> So I'm assuming I can do this:
>
> .upc.o:
>         upcc -c -o $@ $<
>=20
>=20
> But this would have to be in every Makefile.am where I'd want to compile
> UPC.  Also, I would have to do a lot of configure checking and setting up
> myself so that I can use $(UPC) as the compiler in my rule, check that
> upc/upcc is available, etc.  The AM_PROG_UPC macro seemed like the most
> convenient method.
>=20
>
You might take a look at this documentation instead:

 <http://www.gnu.org/software/automake/manual/html_node/Unified-Parallel-C-=
Support.html>

Admittedly, it is sketchy and suboptimal, and could benefit from some
extensions and examples. I will probably write patch sooner or later
if nobody beats me (but I hope somebody will do, since I know nothing
about UPC and doesn't have it available for testing).

Regards,
  Stefano


