From MAILER-DAEMON Mon Jan 09 18:39:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkOoX-0006vu-1m
	for mharc-autoconf@gnu.org; Mon, 09 Jan 2012 18:39:41 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44956)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkNyp-0006u9-HT
	for autoconf@gnu.org; Mon, 09 Jan 2012 17:46:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkNyo-0005RL-DY
	for autoconf@gnu.org; Mon, 09 Jan 2012 17:46:15 -0500
Received: from mail-pz0-f41.google.com ([209.85.210.41]:35685)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkNyo-0005RH-8e
	for autoconf@gnu.org; Mon, 09 Jan 2012 17:46:14 -0500
Received: by dakl33 with SMTP id l33so3410667dak.0
	for <autoconf@gnu.org>; Mon, 09 Jan 2012 14:46:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	bh=LgpwKxOAnUlHajYlgJz0lsUrBx3uqCpNUS3XVZfhJ+c=;
	b=WiznzXxNwBUgPkaaRFlBX0yDTZZao9NGCzslTqWF5rk5YSxUQFyj4ZxapXjRHJQyJ+
	u5p/usu0OgF9/Xkl82kmJAF/EkrjBekDAKM6zqpI3wohhszacXNqr+Ta/+XOZKgNRKRf
	zxjI4e+4kbrhqs88hiZeh6AiOzBT/1qT1YALE=
MIME-Version: 1.0
Received: by 10.68.72.8 with SMTP id z8mr44623995pbu.111.1326149171179; Mon,
	09 Jan 2012 14:46:11 -0800 (PST)
Sender: royger@gmail.com
Received: by 10.142.178.12 with HTTP; Mon, 9 Jan 2012 14:46:11 -0800 (PST)
Date: Mon, 9 Jan 2012 23:46:11 +0100
X-Google-Sender-Auth: ibpASKGJFAvk5WEVAQ78TW5oGhw
Message-ID: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
Subject: Run automake to create config.sub without any Makefile.am
From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@entel.upc.edu>
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.210.41
X-Mailman-Approved-At: Mon, 09 Jan 2012 18:39:39 -0500
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Jan 2012 22:46:17 -0000

Hello!

I'm a new user of the GNU Autotools build system, and I need some help
from more experienced Autoconf fellows. I'm trying to create an
Autoconf script that generates a config.h and Config.mk to include to
my sources and Makefiles respectively, but I'm having some trouble
when trying to use Autoconf without using Automake. I have a
configure.ac script that goes more or less like this (I'm not posting
the full configure.ac, since I think that's not necessary):

AC_PREREQ([2.67])
AC_INIT([My program], [0.1], [bugs@lists.myprogram.com])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_FILES([Config.mk])
AC_CONFIG_HEADERS([config.h])
AC_PREFIX_DEFAULT([/usr])

AC_USE_SYSTEM_EXTENSIONS
AC_CANONICAL_HOST

m4_include(...)


AC_ARG_ENABLE([foo], AS_HELP_STRING([--disable-foo], [Disable feature foo]))

AS_IF([test "x$enable_foo" != "xno"], [
  dnl Do the stuff needed for enabling the feature
])

AC_ARG_VAR([bar], [Path to bar])

AC_PROG_SED
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PATH_PROG(...)
AC_CHECK_LIB(...)

AC_FUNC_ALLOCA
AC_CHECK_HEADERS(...)

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_STRUCT_ST_BLOCKS
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_CHECK_TYPES([ptrdiff_t])

# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_FUNC_FSEEKO
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_HEADER_MAJOR
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_STRNLEN
AC_FUNC_STRTOD
AC_CHECK_FUNCS(...)

AC_OUTPUT()

Since I don't use any Automake macros, I thought that I dind't need
Automake, and so I executed the following:

$ autoheader && autoconf

Everything runs fine, but when trying to execute configure script:

$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
configure: error: cannot run /bin/bash ./config.sub

Now If I try to run Automake to create the missing files:

$ automake -a
configure.ac: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE,
configure.ac: that aclocal.m4 is present in the top-level directory,
configure.ac: and that aclocal.m4 was recently regenerated (using aclocal).
configure.ac:21: installing `./config.guess'
configure.ac:21: installing `./config.sub'
configure.ac:74: installing `./install-sh'
BUG.am: `install.sh' is an anachronism; use `install-sh' instead
automake: no `Makefile.am' found for any configure output

It creates the needed files, but exits with status 1. Is there anyway
to generate config.sub without relying on Automake, or is there anyway
to run Automake without it trying to parse Makefile.am?

Thanks, Roger.


From MAILER-DAEMON Mon Jan 09 18:49:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkOyA-0008Um-NM
	for mharc-autoconf@gnu.org; Mon, 09 Jan 2012 18:49:38 -0500
Received: from eggs.gnu.org ([140.186.70.92]:42367)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RkOy7-0008Ta-7F
	for autoconf@gnu.org; Mon, 09 Jan 2012 18:49:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RkOy6-0005ax-1N
	for autoconf@gnu.org; Mon, 09 Jan 2012 18:49:35 -0500
Received: from mx1.redhat.com ([209.132.183.28]:35027)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RkOy5-0005al-R2
	for autoconf@gnu.org; Mon, 09 Jan 2012 18:49:34 -0500
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q09NnTPj015966
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 9 Jan 2012 18:49:29 -0500
Received: from [10.3.113.48] (ovpn-113-48.phx2.redhat.com [10.3.113.48])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q09NnTaf018009; Mon, 9 Jan 2012 18:49:29 -0500
Message-ID: <4F0B7D08.5060008@redhat.com>
Date: Mon, 09 Jan 2012 16:49:28 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:9.0) Gecko/20111222 Thunderbird/9.0
MIME-Version: 1.0
To: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@entel.upc.edu>
Subject: Re: Run automake to create config.sub without any Makefile.am
References: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
In-Reply-To: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
X-Enigmail-Version: 1.3.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig7432E39C7CFE03D71C98A777"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 209.132.183.28
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Jan 2012 23:49:36 -0000

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

On 01/09/2012 03:46 PM, Roger Pau Monn=E9 wrote:
> Hello!
>=20
> I'm a new user of the GNU Autotools build system, and I need some help
> from more experienced Autoconf fellows. I'm trying to create an
> Autoconf script that generates a config.h and Config.mk to include to
> my sources and Makefiles respectively, but I'm having some trouble
> when trying to use Autoconf without using Automake.

That's a supported use of autoconf, but if you don't mind me asking,
what do you have against also using automake?

> AC_CANONICAL_HOST

As documented in
https://www.gnu.org/software/autoconf/manual/autoconf.html#Canonicalizing=
,
if you use AC_CANONICAL_*, then _you_ are responsible for providing
config.sub in the AC_CONFIG_AUX_DIR (default '.') directory.  You can
meet this requirement by using automake, or you can meet it by doing 'cp
/some/path/to/config.sub .' by hand.  [Hint - if you built autoconf from
source, then your autoconf source tree includes those files under the
build-aux/ subdirectory]

> Since I don't use any Automake macros, I thought that I dind't need
> Automake, and so I executed the following:
>=20
> $ autoheader && autoconf

This should work, except that you have to provide the helper files
yourself, to avoid...

>=20
> Everything runs fine, but when trying to execute configure script:
> checking whether it is safe to define __EXTENSIONS__... yes
> configure: error: cannot run /bin/bash ./config.sub

this.  You can do the copy before or after running 'autoconf' (that is,
autoconf currently doesn't check that config.sub exists; it might be a
nice enhancement to AC_CANONICAL_* to check for existence and/or even
install the files automatically, but someone would have to submit the
patch).

>=20
> Now If I try to run Automake to create the missing files:
>=20
> $ automake -a
> configure.ac: no proper invocation of AM_INIT_AUTOMAKE was found.

Correct - since you didn't use automake macros, you can't expect
automake to populate config.sub and friends on your behalf.

> It creates the needed files, but exits with status 1. Is there anyway
> to generate config.sub without relying on Automake,

Use 'cp'.  That's all the more automake was doing when it outputs lines
about installing helper files.

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


--------------enig7432E39C7CFE03D71C98A777
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 Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJPC30IAAoJEKeha0olJ0NqgFMH/jbsdob1taRH4COk6SnRebzr
C00Kdvu0xWX8ApDR03O7jUqd9iIoF5DCSAPfRsu6DhXw8suyHvNE4+p8xGHatD/G
W39fc5BXabON9W3s2GnMgVWyPdiO+vPTd+Wj29PWkrBoM2RUdvQ2AnJuFnHj8aId
ct+IswXXiuctg/QEDfbAInafy3MO3SUq9pLIPZtO0qUXen+SvZflgi6Z1yzX4yhv
GnmSVoB5CsV2Fb0I4qmqa8kpfWvoGEU9bSXmP//RgPfUhveMs6d/8jW1UnPaGkaE
XeuMq0d1bF4y+dRoufRuJ/K6GobTZCuim3d/9/Otlusri8PCqkNpsrQJvWRxzpI=
=ulWt
-----END PGP SIGNATURE-----

--------------enig7432E39C7CFE03D71C98A777--


From MAILER-DAEMON Tue Jan 10 03:38:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkXDm-0005KM-Bh
	for mharc-autoconf@gnu.org; Tue, 10 Jan 2012 03:38:18 -0500
Received: from eggs.gnu.org ([140.186.70.92]:37095)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkXDf-0005Is-3t
	for autoconf@gnu.org; Tue, 10 Jan 2012 03:38:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkXDZ-0005sN-8N
	for autoconf@gnu.org; Tue, 10 Jan 2012 03:38:11 -0500
Received: from mail-pz0-f41.google.com ([209.85.210.41]:58958)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkXDY-0005sH-Rv
	for autoconf@gnu.org; Tue, 10 Jan 2012 03:38:05 -0500
Received: by dakl33 with SMTP id l33so3663126dak.0
	for <autoconf@gnu.org>; Tue, 10 Jan 2012 00:38:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=5tzy5XJs4/lLyFaiHMMifIoLX+GCMyqtHTar58+lrX8=;
	b=DKWaJDO3fknBvEtonjXsl11cVaYLLb4ZEhjSedNM6leceqRBzIEVcCuHVd0Hji9CYw
	0DbQ1IcmLPf1te3GcSBfiYdF8GAHBMqtZqoCZJJR78AsOcsWakZ5p2Wd+7VMYx8a7lFl
	LlV5ductw4tjFAXs0hiagIoeTIIT2Vjl+9XxM=
MIME-Version: 1.0
Received: by 10.68.199.38 with SMTP id jh6mr48689180pbc.77.1326184683776; Tue,
	10 Jan 2012 00:38:03 -0800 (PST)
Sender: royger@gmail.com
Received: by 10.142.178.12 with HTTP; Tue, 10 Jan 2012 00:38:03 -0800 (PST)
In-Reply-To: <4F0B7D08.5060008@redhat.com>
References: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
	<4F0B7D08.5060008@redhat.com>
Date: Tue, 10 Jan 2012 09:38:03 +0100
X-Google-Sender-Auth: YRtHEuU5fhqqH3m7yx4p4Mic_qg
Message-ID: <CAPLaKK6SUie4NL3o9OXbhpdzB_VyYdqUJHxUDS67fm653uV2ag@mail.gmail.com>
Subject: Re: Run automake to create config.sub without any Makefile.am
From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@entel.upc.edu>
To: Eric Blake <eblake@redhat.com>
Content-Type: text/plain; charset=UTF-8
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.41
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Jan 2012 08:38:16 -0000

2012/1/10 Eric Blake <eblake@redhat.com>:
> On 01/09/2012 03:46 PM, Roger Pau Monn=C3=A9 wrote:
>> Hello!
>>
>> I'm a new user of the GNU Autotools build system, and I need some help
>> from more experienced Autoconf fellows. I'm trying to create an
>> Autoconf script that generates a config.h and Config.mk to include to
>> my sources and Makefiles respectively, but I'm having some trouble
>> when trying to use Autoconf without using Automake.
>
> That's a supported use of autoconf, but if you don't mind me asking,
> what do you have against also using automake?
>
>> AC_CANONICAL_HOST
>
> As documented in
> https://www.gnu.org/software/autoconf/manual/autoconf.html#Canonicalizing=
,
> if you use AC_CANONICAL_*, then _you_ are responsible for providing
> config.sub in the AC_CONFIG_AUX_DIR (default '.') directory. =C2=A0You ca=
n
> meet this requirement by using automake, or you can meet it by doing 'cp
> /some/path/to/config.sub .' by hand. =C2=A0[Hint - if you built autoconf =
from
> source, then your autoconf source tree includes those files under the
> build-aux/ subdirectory]

Thanks for the tip, I didn't know AC_CANONICAL_HOST was causing this.
Since I only used this macro to get the OS name, I've replaced it with
`uname -s`, and forget about config.sub and config.guess.


From MAILER-DAEMON Tue Jan 10 14:57:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rkhp4-0002gn-7c
	for mharc-autoconf@gnu.org; Tue, 10 Jan 2012 14:57:30 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57437)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1Rkhp1-0002cd-6Q
	for autoconf@gnu.org; Tue, 10 Jan 2012 14:57:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1Rkhoz-0005pc-CK
	for autoconf@gnu.org; Tue, 10 Jan 2012 14:57:26 -0500
Received: from smtp.gentoo.org ([140.211.166.183]:60882)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1Rkhoz-0005pO-7y
	for autoconf@gnu.org; Tue, 10 Jan 2012 14:57:25 -0500
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 675901B4032;
	Tue, 10 Jan 2012 19:57:23 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org
Subject: Re: Run automake to create config.sub without any Makefile.am
Date: Tue, 10 Jan 2012 14:57:23 -0500
User-Agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; )
References: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
	<4F0B7D08.5060008@redhat.com>
	<CAPLaKK6SUie4NL3o9OXbhpdzB_VyYdqUJHxUDS67fm653uV2ag@mail.gmail.com>
In-Reply-To: <CAPLaKK6SUie4NL3o9OXbhpdzB_VyYdqUJHxUDS67fm653uV2ag@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart4141560.AAmvUHuQub";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201201101457.24249.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: Roger Pau =?iso-8859-1?q?Monn=E9?= <roger.pau@entel.upc.edu>,
	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: Tue, 10 Jan 2012 19:57:28 -0000

--nextPart4141560.AAmvUHuQub
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable

On Tuesday 10 January 2012 03:38:03 Roger Pau Monn=C3=A9 wrote:
> 2012/1/10 Eric Blake:
> > On 01/09/2012 03:46 PM, Roger Pau Monn=C3=A9 wrote:
> >> AC_CANONICAL_HOST
> >=20
> > As documented in
> > https://www.gnu.org/software/autoconf/manual/autoconf.html#Canonicalizi=
ng
> > , if you use AC_CANONICAL_*, then _you_ are responsible for providing
> > config.sub in the AC_CONFIG_AUX_DIR (default '.') directory.  You can
> > meet this requirement by using automake, or you can meet it by doing 'cp
> > /some/path/to/config.sub .' by hand.  [Hint - if you built autoconf from
> > source, then your autoconf source tree includes those files under the
> > build-aux/ subdirectory]
>=20
> Thanks for the tip, I didn't know AC_CANONICAL_HOST was causing this.
> Since I only used this macro to get the OS name, I've replaced it with
> `uname -s`, and forget about config.sub and config.guess.

oh god, please do not do that.  that's the exact sort of thing you should=20
_never_ do.  you've just broken any hope of properly cross-compiling your=20
package.
=2Dmike

--nextPart4141560.AAmvUHuQub
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)

iQIcBAABAgAGBQJPDJgkAAoJEEFjO5/oN/WBDT4P/Rs1Q4OlRJ3zPy0mjnZ/Si4e
qakP1iOPt7s1oukxAtCAQjjOjp2zuBPJ0jxhjFWKdW+OngO2tlNU4/+MDRauI9a4
iZpOlp4HWw8e6OgqH6qvGH7/QI3xr1uSKzLZJm7TxVvSLD9qo5SnceSWySs9vBaq
aos891ZPcr7xQezY1H3OwiyWgVXdDUqc1bApmufyQo+Cu+WtJXRNgMVpq7x8E+IM
7L2x0CoAu+PjC+yhusu0ywvuWcsqA3i3qFvRgyHD60QtSB97mpYyxyktx7HpWMhh
BTpPEUOB7FsdziPjIOqN6SYorqGTcEPFfGoxni3MUfMtmqosC4PEh1Zyf22dsfZY
CUqgUrJho5vz2PvvYeaHEdTpTuMUP7s5BZ3n8OTKn2hgG7/p2tipkude1W2YGKjQ
qrWkj3wvneS69iZ16ksmZR8MMInJw9Sou5blF04dqazrYw17OThDVQ5rDEVD45jJ
XN/MiR+pzoiFPLbKVY5FV+hGNySBKgdQSZc0HJMpE85MFxH3cS6+M8ijNGqKXUNi
Pev7CyZ/6K0slvA0p7iuZBYEVrL1pvqprbjxKf/82F+B8Jl6Oyzk+Yb6vrbUi7p0
9bj9dQA+iJTF1x7PJ4FemoWsC1KmfKt9H6pbZ6CfARjMThlN+YA9YOsDNozuXqi4
2ixwOFhsnFQn3qS+0chp
=+rF5
-----END PGP SIGNATURE-----

--nextPart4141560.AAmvUHuQub--


From MAILER-DAEMON Tue Jan 10 15:36:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkiQN-0000o4-Q1
	for mharc-autoconf@gnu.org; Tue, 10 Jan 2012 15:36:03 -0500
Received: from eggs.gnu.org ([140.186.70.92]:55161)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkiQL-0000mO-J4
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:36:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkiQK-0004MA-A8
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:36:01 -0500
Received: from mail-pz0-f41.google.com ([209.85.210.41]:45203)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkiQJ-0004M5-Uw
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:36:00 -0500
Received: by dakl33 with SMTP id l33so4109812dak.0
	for <autoconf@gnu.org>; Tue, 10 Jan 2012 12:35:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=mB3UXJmrB5y5rocJEyHasU+y3nIiTlMh/h40E0UKeuY=;
	b=Of36HmgBmSoKIL6ZsOv7pEP8vsjO2uXeevcMRRshwLufhUtZkmCtn6E26hKDnq3xpa
	3M7IiWHQmw485Ez1a6//ybvTtuVCbGLU0a81p+e6NjKe9jTCNVnKl0afPl4h5M39erbM
	uwP+lmug2rsKuEjVSgv8jMOBtdVbd0akVFhus=
MIME-Version: 1.0
Received: by 10.68.191.100 with SMTP id gx4mr54018991pbc.26.1326227758955;
	Tue, 10 Jan 2012 12:35:58 -0800 (PST)
Sender: royger@gmail.com
Received: by 10.142.178.12 with HTTP; Tue, 10 Jan 2012 12:35:58 -0800 (PST)
In-Reply-To: <201201101457.24249.vapier@gentoo.org>
References: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
	<4F0B7D08.5060008@redhat.com>
	<CAPLaKK6SUie4NL3o9OXbhpdzB_VyYdqUJHxUDS67fm653uV2ag@mail.gmail.com>
	<201201101457.24249.vapier@gentoo.org>
Date: Tue, 10 Jan 2012 21:35:58 +0100
X-Google-Sender-Auth: HI590ej4tR9xsVb7B1BIIy4wAqM
Message-ID: <CAPLaKK487d=mhNR1Opabe9ZSXo1cizf3pKONUCAusfF=BJreWw@mail.gmail.com>
Subject: Re: Run automake to create config.sub without any Makefile.am
From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@entel.upc.edu>
To: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain; charset=UTF-8
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.41
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: Tue, 10 Jan 2012 20:36:02 -0000

2012/1/10 Mike Frysinger <vapier@gentoo.org>:
> On Tuesday 10 January 2012 03:38:03 Roger Pau Monn=C3=A9 wrote:
>> 2012/1/10 Eric Blake:
>> > On 01/09/2012 03:46 PM, Roger Pau Monn=C3=A9 wrote:
>> >> AC_CANONICAL_HOST
>> >
>> > As documented in
>> > https://www.gnu.org/software/autoconf/manual/autoconf.html#Canonicaliz=
ing
>> > , if you use AC_CANONICAL_*, then _you_ are responsible for providing
>> > config.sub in the AC_CONFIG_AUX_DIR (default '.') directory. =C2=A0You=
 can
>> > meet this requirement by using automake, or you can meet it by doing '=
cp
>> > /some/path/to/config.sub .' by hand. =C2=A0[Hint - if you built autoco=
nf from
>> > source, then your autoconf source tree includes those files under the
>> > build-aux/ subdirectory]
>>
>> Thanks for the tip, I didn't know AC_CANONICAL_HOST was causing this.
>> Since I only used this macro to get the OS name, I've replaced it with
>> `uname -s`, and forget about config.sub and config.guess.
>
> oh god, please do not do that. =C2=A0that's the exact sort of thing you s=
hould
> _never_ do. =C2=A0you've just broken any hope of properly cross-compiling=
 your
> package.

Thanks for the tip, I've removed the `uname -s` hack and copied the
necessary files. Also since the package is only available to NetBSD
and Linux the hack would only prevent cross-compiling from Linux to
NetBSD and viceversa.


From MAILER-DAEMON Tue Jan 10 15:40:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkiUG-00024j-K7
	for mharc-autoconf@gnu.org; Tue, 10 Jan 2012 15:40:04 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41181)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RkiUD-00022X-Lp
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:40:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RkiUC-0004pf-Cw
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:40:01 -0500
Received: from smtp.gentoo.org ([140.211.166.183]:36319)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RkiUC-0004pV-7l
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:40:00 -0500
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id F08F81B401A;
	Tue, 10 Jan 2012 20:39:58 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: Roger Pau =?iso-8859-1?q?Monn=E9?= <roger.pau@entel.upc.edu>
Subject: Re: Run automake to create config.sub without any Makefile.am
Date: Tue, 10 Jan 2012 15:39:59 -0500
User-Agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; )
References: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
	<201201101457.24249.vapier@gentoo.org>
	<CAPLaKK487d=mhNR1Opabe9ZSXo1cizf3pKONUCAusfF=BJreWw@mail.gmail.com>
In-Reply-To: <CAPLaKK487d=mhNR1Opabe9ZSXo1cizf3pKONUCAusfF=BJreWw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart4041105.iX13FJIQY4";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201201101540.00075.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
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: Tue, 10 Jan 2012 20:40:02 -0000

--nextPart4041105.iX13FJIQY4
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable

On Tuesday 10 January 2012 15:35:58 Roger Pau Monn=C3=A9 wrote:
> 2012/1/10 Mike Frysinger:
> > On Tuesday 10 January 2012 03:38:03 Roger Pau Monn=C3=A9 wrote:
> >> 2012/1/10 Eric Blake:
> >> > On 01/09/2012 03:46 PM, Roger Pau Monn=C3=A9 wrote:
> >> >> AC_CANONICAL_HOST
> >> >=20
> >> > As documented in
> >> > https://www.gnu.org/software/autoconf/manual/autoconf.html#Canonical=
iz
> >> > ing , if you use AC_CANONICAL_*, then _you_ are responsible for
> >> > providing config.sub in the AC_CONFIG_AUX_DIR (default '.')
> >> > directory.  You can meet this requirement by using automake, or you
> >> > can meet it by doing 'cp /some/path/to/config.sub .' by hand.  [Hint
> >> > - if you built autoconf from source, then your autoconf source tree
> >> > includes those files under the build-aux/ subdirectory]
> >>=20
> >> Thanks for the tip, I didn't know AC_CANONICAL_HOST was causing this.
> >> Since I only used this macro to get the OS name, I've replaced it with
> >> `uname -s`, and forget about config.sub and config.guess.
> >=20
> > oh god, please do not do that.  that's the exact sort of thing you shou=
ld
> > _never_ do.  you've just broken any hope of properly cross-compiling yo=
ur
> > package.
>=20
> Thanks for the tip, I've removed the `uname -s` hack and copied the
> necessary files. Also since the package is only available to NetBSD
> and Linux the hack would only prevent cross-compiling from Linux to
> NetBSD and viceversa.

the much more common case is cross-compiling for the same OS, but different=
=20
architectures
=2Dmike

--nextPart4041105.iX13FJIQY4
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)

iQIcBAABAgAGBQJPDKIgAAoJEEFjO5/oN/WBx1cQAJApBdB5h4juGnz/p5MMT63a
HLGTlAs8JXKqGuPhopSJ+tkspvAekO3BgKvNt7yaXAfJCBqWS5erfnixLquWuiO6
CU/4oR/jpJuDzmu9JI3GNLy+LgqQAZ9AGPZRjWHNlNwTkEWto7gO4/OII7bVOJaw
Y0nRd3Gkewce+bg/oTm/InA9QhK0xUL+9yQrM/xN3pjT1n2e6B5cUMDWn9qysM3u
+XfbN3uNtAkPWAvgzk8mqVa3TPxl+C+yHy1khKZnm9Cj+zPhuVyu/wq9aS9uaXuU
aGHiIdHymfQ1aIKO4OUrW6vSZyMBPuOBuiD6iwWNdVWPinHR64DzYbbdLcLGwy4R
aXT9dgrUztZQINE2lWzBW4KAFU8Gh05doiiwRR08Djb1AXYah0GhINh+guKY3yvR
ud9Yk7HFesb2kW2Qi3oA8KNuewePqAR9KHMOIcshQW8IhRmNHk8YfX9dzTo2PUn8
BskPqViEoOVH1ZGvKOQuBg0pAHTJEQlVSbu1kPR7wix5TccniFw2K6roJv9zPNXf
80weX3G+j62akWTVvybmYQYV3FUrCKwLhIhT+eNWLZO4L3rJnz+0Vgctvvx1tzHC
3yWerPxz5NIBxanRclmUl1ozxwu8JI7dJtnMWa4v+sFctMDSUflhafQ/EHjDeyJe
SklhQPdaidPCvm9ko3NT
=7o1E
-----END PGP SIGNATURE-----

--nextPart4041105.iX13FJIQY4--


From MAILER-DAEMON Tue Jan 10 15:41:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkiW7-0002Oe-QY
	for mharc-autoconf@gnu.org; Tue, 10 Jan 2012 15:41:59 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41751)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RkiW5-0002NY-GD
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:41:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RkiW1-0005Lg-8P
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:41:57 -0500
Received: from smtp.gentoo.org ([140.211.166.183]:36516)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RkiW1-0005Lc-0v
	for autoconf@gnu.org; Tue, 10 Jan 2012 15:41:53 -0500
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 3B2B81B402E;
	Tue, 10 Jan 2012 20:41:52 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org
Subject: Re: Run automake to create config.sub without any Makefile.am
Date: Tue, 10 Jan 2012 15:41:52 -0500
User-Agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; )
References: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
	<4F0B7D08.5060008@redhat.com>
In-Reply-To: <4F0B7D08.5060008@redhat.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1734630.oW8LPGEHyP";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201201101541.53346.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: Roger Pau =?iso-8859-1?q?Monn=E9?= <roger.pau@entel.upc.edu>,
	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: Tue, 10 Jan 2012 20:41:58 -0000

--nextPart1734630.oW8LPGEHyP
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable

On Monday 09 January 2012 18:49:28 Eric Blake wrote:
> On 01/09/2012 03:46 PM, Roger Pau Monn=C3=A9 wrote:
> > It creates the needed files, but exits with status 1. Is there anyway
> > to generate config.sub without relying on Automake,
>=20
> Use 'cp'.  That's all the more automake was doing when it outputs lines
> about installing helper files.

i wish automake (and gettext) had modes where you could say "i just want yo=
u=20
to install XXX helpers for me)".  copying things by hand is error prone due=
 to=20
changing install paths across versions and distros.

automake --foreign -c -f --tools=3D"config.sub config.guess"
=2Dmike

--nextPart1734630.oW8LPGEHyP
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)

iQIcBAABAgAGBQJPDKKRAAoJEEFjO5/oN/WBKEIQANmzAmsSrbjfg7kCUOwPqRjR
JoJVsZmXfdHJVw5wrSueumua2eaPAocrMituwYpWbrnGDuDcGpkg7BuBwF4dYuwU
Ug6QJgUJss/RzXWbFl7bjRENkcGZFJnAJZTXnH5Q4xxQsyS9CfmFswUksNyu1t8H
SbE2MecmPPLgbCGU61sI9BB4xn7qtS+goqhJNSfwxTppX3FPKxZsL5XXyVyKjfgX
UqV4oJOLNByaAtguXBfd2WdiAvrSgBdDWEJH2hTBEQnNX/spWlOd21TAjyuMxCqD
aJdomR6fUPPYY0cSUkUYN3bOFz7VSZ5z+i05U/VJnclSkapEdxRHk+0ize9X2zRv
MbLRyINfgcf76hDAq/FKFyIhKuO7G1WcX3A0OLKmVrssk+vVC7j3yHrh3188VhFv
l54YoGgUjSqH3CEZlE/QB7qzZoQd6tGNNa8dxMYSvQTsgvGYsdhfMOwriBsWjI9N
kyDHI9jjc6ldN19gFYWMZds5VghPtwX4Op5b/qOy5I07hNJixQaPR+7qHEQO5TPp
TeqL0EJVAB4YuCg6jeLdExjWa73ZTWOFmbxRkehuRyu8w5wEWpcXFKd7XudTRAzk
H0vYEQDcNMYrRxf6mncMEz8cpgDTnPRslIl9kY1FlCxxB/qNsUpPGEd2IXhva9Qr
tOBbkRAbPXs5n6HVIcS+
=BEu9
-----END PGP SIGNATURE-----

--nextPart1734630.oW8LPGEHyP--


From MAILER-DAEMON Tue Jan 10 16:39:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkjQ1-0008Ve-13
	for mharc-autoconf@gnu.org; Tue, 10 Jan 2012 16:39:45 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57735)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=nbowler=349c0379f@mail.ellipticsemi.com>)
	id 1RkjPz-0008VT-5a
	for autoconf@gnu.org; Tue, 10 Jan 2012 16:39:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <prvs=nbowler=349c0379f@mail.ellipticsemi.com>)
	id 1RkjPx-0007F3-Q3
	for autoconf@gnu.org; Tue, 10 Jan 2012 16:39:43 -0500
Received: from mx.scalarmail.ca ([98.158.95.75]:28356
	helo=ironport-01.sms.scalar.ca)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prvs=nbowler=349c0379f@mail.ellipticsemi.com>)
	id 1RkjPx-0007BF-Na; Tue, 10 Jan 2012 16:39:41 -0500
Received: from unknown (HELO sms-zimbra-mta-02.sms.scalar.ca) ([192.168.32.56])
	by ironport-01.sms.scalar.ca with ESMTP; 10 Jan 2012 16:10:34 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by sms-zimbra-mta-02.sms.scalar.ca (Postfix) with ESMTP id A6D7187C07; 
	Tue, 10 Jan 2012 16:10:34 -0500 (EST)
Received: from sms-zimbra-mta-02.sms.scalar.ca ([127.0.0.1])
	by localhost (sms-zimbra-mta-02.sms.scalar.ca [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id U4EIjeJXd3ez; Tue, 10 Jan 2012 16:10:31 -0500 (EST)
Received: from mail.ellipticsemi.com (dsl-67-204-24-19.acanac.net
	[67.204.24.19])
	by sms-zimbra-mta-02.sms.scalar.ca (Postfix) with ESMTPSA id A31E187C01;
	Tue, 10 Jan 2012 16:10:30 -0500 (EST)
Received: by mail.ellipticsemi.com (nbSMTP-1.00) for uid 550
	(using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	nbowler@mail.ellipticsemi.com; Tue, 10 Jan 2012 16:10:30 -0500 (EST)
Date: Tue, 10 Jan 2012 16:10:29 -0500
From: Nick Bowler <nbowler@elliptictech.com>
To: Mike Frysinger <vapier@gentoo.org>
Subject: Re: Run automake to create config.sub without any Makefile.am
Message-ID: <20120110211029.GA12196@elliptictech.com>
References: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
	<4F0B7D08.5060008@redhat.com>
	<201201101541.53346.vapier@gentoo.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <201201101541.53346.vapier@gentoo.org>
Organization: Elliptic Technologies Inc.
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 98.158.95.75
Cc: Roger Pau =?iso-8859-1?Q?Monn=E9?= <roger.pau@entel.upc.edu>,
	bug-automake@gnu.org, 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: Tue, 10 Jan 2012 21:39:44 -0000

On 2012-01-10 15:41 -0500, Mike Frysinger wrote:
> On Monday 09 January 2012 18:49:28 Eric Blake wrote:
> > On 01/09/2012 03:46 PM, Roger Pau Monné wrote:
> > > It creates the needed files, but exits with status 1. Is there anyway
> > > to generate config.sub without relying on Automake,
> > 
> > Use 'cp'.  That's all the more automake was doing when it outputs lines
> > about installing helper files.
> 
> i wish automake (and gettext) had modes where you could say "i just want you 
> to install XXX helpers for me)".  copying things by hand is error prone due to 
> changing install paths across versions and distros.
> 
> automake --foreign -c -f --tools="config.sub config.guess"

CCing bug-automake.  This feature would be generally useful: another
example for automake-using packages is that at "foreign" strictness the
INSTALL file is not copied, but maintainers may still want to include it.

Perhaps a simpler and more flexible option is to add an option to
automake which prints out the location where it finds these files,
similar to aclocal --print-ac-dir.  Something like (for example)

 % automake --print-snippet-dir
 /usr/share/automake-1.11

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



From MAILER-DAEMON Tue Jan 10 16:57:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkjhS-0004uC-SM
	for mharc-autoconf@gnu.org; Tue, 10 Jan 2012 16:57:46 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58108)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RkjhP-0004tJ-VR
	for autoconf@gnu.org; Tue, 10 Jan 2012 16:57:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RkjhO-0001XC-O5
	for autoconf@gnu.org; Tue, 10 Jan 2012 16:57:43 -0500
Received: from smtp.gentoo.org ([140.211.166.183]:41581)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>)
	id 1RkjhO-0001Wz-JA; Tue, 10 Jan 2012 16:57:42 -0500
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id A5BA21B4036;
	Tue, 10 Jan 2012 21:57:41 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org
Subject: Re: Run automake to create config.sub without any Makefile.am
Date: Tue, 10 Jan 2012 16:57:41 -0500
User-Agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; )
References: <CAPLaKK7BsNnC4YkL0xAQ3WoE=F1O0GzjoPLZDTxmsrgQS5jGHw@mail.gmail.com>
	<201201101541.53346.vapier@gentoo.org>
	<20120110211029.GA12196@elliptictech.com>
In-Reply-To: <20120110211029.GA12196@elliptictech.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart30852637.FyMEUayDIF";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201201101657.43239.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: Roger Pau =?iso-8859-1?q?Monn=E9?= <roger.pau@entel.upc.edu>,
	Eric Blake <eblake@redhat.com>,
	Nick Bowler <nbowler@elliptictech.com>, bug-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: Tue, 10 Jan 2012 21:57:45 -0000

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

On Tuesday 10 January 2012 16:10:29 Nick Bowler wrote:
> On 2012-01-10 15:41 -0500, Mike Frysinger wrote:
> > On Monday 09 January 2012 18:49:28 Eric Blake wrote:
> > > On 01/09/2012 03:46 PM, Roger Pau Monn=E9 wrote:
> > > > It creates the needed files, but exits with status 1. Is there anyw=
ay
> > > > to generate config.sub without relying on Automake,
> > >=20
> > > Use 'cp'.  That's all the more automake was doing when it outputs lin=
es
> > > about installing helper files.
> >=20
> > i wish automake (and gettext) had modes where you could say "i just want
> > you to install XXX helpers for me)".  copying things by hand is error
> > prone due to changing install paths across versions and distros.
> >=20
> > automake --foreign -c -f --tools=3D"config.sub config.guess"
>=20
> CCing bug-automake.  This feature would be generally useful: another
> example for automake-using packages is that at "foreign" strictness the
> INSTALL file is not copied, but maintainers may still want to include it.
>=20
> Perhaps a simpler and more flexible option is to add an option to
> automake which prints out the location where it finds these files,
> similar to aclocal --print-ac-dir.  Something like (for example)
>=20
>  % automake --print-snippet-dir
>  /usr/share/automake-1.11

i'd be OK with that too if the assumption is that all relevant files people=
=20
want to manually copy would be in there (INSTALL, config.sub, etc...).

another example of why hardcoding paths doesn't scale: the stuff installed =
into=20
the root distro might not be what is found via $PATH.  so if you have local=
=20
builds of autotools in say $HOME/...., `automake` would come from there, bu=
t=20
trying to copy files by hand would look in /usr/share/.... rather than the =
stuff=20
in $HOME.
=2Dmike

--nextPart30852637.FyMEUayDIF
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)

iQIcBAABAgAGBQJPDLRWAAoJEEFjO5/oN/WBDNYP/2Fk2Nepz7VQ5ksWwStY74Pd
4zmZuz3VnsS1rJcnm484SSQJdiQezZ/q4U/fUwTeEOWiOjlohWTF6exRYGwR3Urm
FDjaxfzkB/M4Qm1wzNSZeKoYaxY4ZFdHr7O8lcARaaT8PpYKeOHoaWOO7scKfh7x
3lqVedFsZ/1IgP3SrdoXLLYBaQEF3x/R5X38I2U2+xJ07vpSaL3I8Npx/DSd4o6X
pPanf9vx32L36dCO+qS69O7/Xh1lzgh7mTHyIqCFu2/pYuZ3sguWmT/7/ZuBRX7h
k3+9OCK0MvaCLGfN9KhVbwnGO2salytGqDes9y1yWcQhW1aIT8C5EDXOfMYnqNlS
kdevxeauZPIyn+NopE3IpoJaqAvA8MvLv9fhB5HL2xZNTD0vIw0ENf3o8kZEDysh
OxWxYDMlNsjSrPCIRj71ah1+lyKGYZoYCqZ/6Xme1FWclNHUi5rRgyYu6sx+qEUk
48XYXB9E+DgKsvjSCigyNy0AW3Of5qpYpGhCmnKb/ltgfLgRY9scAvozrTD07EDL
U9UTM6hXoJVSsR29Bsy2q+A/MlMmXyr6E6+PYy5pkW3Oj/5W3n5AWGpxJUCnTMTV
3uy4sJM0O7LdwgiUDcmOw6zEMw1TQOMm/CMsbedLDxISByaLiIt8eisBXXPOaQMc
k5TlLFtAD8pi5D2Jiw3s
=1DUE
-----END PGP SIGNATURE-----

--nextPart30852637.FyMEUayDIF--


From MAILER-DAEMON Wed Jan 11 04:20:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkuLl-0005gL-MY
	for mharc-autoconf@gnu.org; Wed, 11 Jan 2012 04:20:05 -0500
Received: from eggs.gnu.org ([140.186.70.92]:46216)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkuLj-0005ef-6q
	for autoconf@gnu.org; Wed, 11 Jan 2012 04:20:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkuLd-00064G-8A
	for autoconf@gnu.org; Wed, 11 Jan 2012 04:20:03 -0500
Received: from mail-pz0-f41.google.com ([209.85.210.41]:42694)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <royger@gmail.com>) id 1RkuLd-000643-2C
	for autoconf@gnu.org; Wed, 11 Jan 2012 04:19:57 -0500
Received: by dakl33 with SMTP id l33so348558dak.0
	for <autoconf@gnu.org>; Wed, 11 Jan 2012 01:19:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	bh=Ktf2pqch/5Y5y0omxW8bPZBp8SNxjz2GA/UYwyeK98M=;
	b=HlcZYkzrANBy8qQeGtgLKVjnoCUHMWSyjONydDajg/Et3NwgIp5PuuVIUEMq7fljMF
	PSGL+iQupUK1X4KotxuBiBa5BE2AbmUOwGOzQzhlZAzbm6Zu42WpnvCq669/8htfKdhB
	PUoUQJ+Tb+MTVgGYtPioY2JPHQXRccWSn4s10=
MIME-Version: 1.0
Received: by 10.68.189.101 with SMTP id gh5mr1253409pbc.26.1326273595010; Wed,
	11 Jan 2012 01:19:55 -0800 (PST)
Sender: royger@gmail.com
Received: by 10.142.178.12 with HTTP; Wed, 11 Jan 2012 01:19:54 -0800 (PST)
Date: Wed, 11 Jan 2012 10:19:54 +0100
X-Google-Sender-Auth: XNkEkoSZv2uFjwqdknykYNCWzXE
Message-ID: <CAPLaKK7gaKcHpy4HopnY8v-LexNnsKH00nXa9Jc4GfU0OtMgjQ@mail.gmail.com>
Subject: Configure trying to find install-sh when AC_PROG_INSTALL is not set
From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@entel.upc.edu>
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.210.41
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Jan 2012 09:20:04 -0000

Hello again,

After solving the config.sub and config.guess issue, I've found that
configure keeps asking for install.sh, install-sh or shtool even when
AC_PROG_INSTALL is not set in configure.ac. From what I understand
from the manual, configure should only search for install-sh and
related files when AC_PROG_INSTALL is set.

"If you use AC_PROG_INSTALL, you must include either `install-sh' or
`install.sh' in your distribution, or configure will produce an error
message saying it can't find them--even if the system you're on has a
good install program."


I have a custom install.sh, but it is located in "./..", while
config.guess and config.sub are in "." (related to where configure
is), and I can set AC_CONFIG_AUX_DIR([./.. .]), but configure keeps
failing, because it assumes config.sub, config.guess and install.sh
are located in the same folder.

Thanks, Roger.


From MAILER-DAEMON Wed Jan 11 11:40:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rl1Dw-0000rh-Q8
	for mharc-autoconf@gnu.org; Wed, 11 Jan 2012 11:40:28 -0500
Received: from eggs.gnu.org ([140.186.70.92]:51763)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <manutalcual@gmail.com>) id 1Rl0gC-0004Cl-GN
	for autoconf@gnu.org; Wed, 11 Jan 2012 11:05:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <manutalcual@gmail.com>) id 1Rl0g4-0000ia-Qg
	for autoconf@gnu.org; Wed, 11 Jan 2012 11:05:36 -0500
Received: from mail-qy0-f169.google.com ([209.85.216.169]:49751)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <manutalcual@gmail.com>) id 1Rl0g4-0000iS-OJ
	for autoconf@gnu.org; Wed, 11 Jan 2012 11:05:28 -0500
Received: by qcsd17 with SMTP id d17so543666qcs.0
	for <autoconf@gnu.org>; Wed, 11 Jan 2012 08:05:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=soJVHMKN97SxRx24siq15O3cQF16wNBfcuFsv0WOFus=;
	b=f4nc2qRlNdbi5hPOjNOoli4tNJYHMDhMbHKoCvIvzbbeJYZtmYN8/T0uSjITTu7lfr
	46y7qYbLr7R1yB0p9csdPg0DefVHhIs02c9br9AhAmzV5xoLtyIBo8PIc2x55vttvia+
	PaowhOT9I9SiqJKNoB0qnUFFaz8Nq9LytaIKk=
MIME-Version: 1.0
Received: by 10.229.76.217 with SMTP id d25mr9606327qck.146.1326297928183;
	Wed, 11 Jan 2012 08:05:28 -0800 (PST)
Received: by 10.229.80.70 with HTTP; Wed, 11 Jan 2012 08:05:28 -0800 (PST)
Date: Wed, 11 Jan 2012 17:05:28 +0100
Message-ID: <CABo3Yb7_erUXyDRS6nh3kK6gm2Y3NUvD8=x6ZatQv6=Jan8V4A@mail.gmail.com>
Subject: Install programs into two directories.
From: Manuel Cano <manutalcual@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.216.169
X-Mailman-Approved-At: Wed, 11 Jan 2012 11:40:26 -0500
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Jan 2012 16:05:45 -0000

Hi.

I need to install some programs into /bin and some into other
location, like cgi-bin under some non public path (company policy).

Can I do that? Or should I create two sub-projects to configure both
with one --prefix for each one?

Thanks.

-- 
Manuel


From MAILER-DAEMON Thu Jan 12 18:04:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlThG-0005y2-G7
	for mharc-autoconf@gnu.org; Thu, 12 Jan 2012 18:04:38 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45092)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <svante.signell@telia.com>) id 1RlTbH-0005Wk-AE
	for autoconf@gnu.org; Thu, 12 Jan 2012 17:58:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <svante.signell@telia.com>) id 1RlTbF-0003ON-V6
	for autoconf@gnu.org; Thu, 12 Jan 2012 17:58:27 -0500
Received: from smtp-out21.han.skanova.net ([195.67.226.208]:33570)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <svante.signell@telia.com>) id 1RlTbF-0003OF-MI
	for autoconf@gnu.org; Thu, 12 Jan 2012 17:58:25 -0500
Received: from [192.168.0.6] (78.69.11.59) by smtp-out21.han.skanova.net
	(8.5.133) (authenticated as u84406617)
	id 4EC0B93A0160EF88; Thu, 12 Jan 2012 23:58:23 +0100
Message-ID: <1326409104.3525.33.camel@hp.my.own.domain>
Subject: How to write a conditional test in configure.ac
From: Svante Signell <svante.signell@telia.com>
To: autoconf@gnu.org
Date: Thu, 12 Jan 2012 23:58:24 +0100
Organization: Hemma
Content-Type: text/plain; charset="us-ascii"
X-Mailer: Evolution 3.2.2-1 
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 195.67.226.208
X-Mailman-Approved-At: Thu, 12 Jan 2012 18:04:36 -0500
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: svante.signell@telia.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Jan 2012 22:58:28 -0000

Hello.

Consider the code snippet below. How to modify it to get the GNU version
of baseline if defined (in my case GNU/Hurd). The macro 
AC_USE_SYSTEM_EXTENSIONS is stated earlier in configure.ac.

Something like:
>>>if defined _GNU_SOURCE<<<
<check for a working GNU basename>
...
    [AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_GNU_SOURCE
# define _GNU_SOURCE 1
# include <string.h>
#endif
<same tests as below>
...
>>>else<<<
<use the code below>
>>>endif<<<

(Or shorter if possible)
Thanks in advance (so much to learn about auto*...)

>From configure.ac:
# COMPAT_FUNC_BASENAME
# --------------------
# Check for working basename() function.
AC_CHECK_HEADERS([libgen.h])
AC_DEFUN([COMPAT_FUNC_BASENAME], [
  AC_DEFINE([NEED_BASENAME], 1,
            [Define if you want to use the basename function])
  AC_CHECK_HEADERS([libgen.h])
  AC_CACHE_CHECK([for working basename],
    [compat_cv_func_basename_works],

    [AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_LIBGEN_H
# include <libgen.h>
#endif

typedef struct {
  char *test;
  char *result;
} test_t;

const test_t tests[] = {
  { "/usr/local/foo", "foo" },
  { "/usr/local/foo/", "foo" },
  { NULL, NULL }
};

int main() {
  char test1[1024];
  int i;

  for (i = 0; tests[i].test; i++) {
    strcpy(test1, tests[i].test);
    if (strcmp(basename(test1), tests[i].result) ||
        strcmp(test1, tests[i].test))
      exit(1);
  }

  exit(0);
}
],
      [compat_cv_func_basename_works=yes],
      [compat_cv_func_basename_works=no],
      [compat_cv_func_basename_works=no]
    )]
  )
  if test "$compat_cv_func_basename_works" = "yes"; then
    AC_DEFINE([HAVE_BASENAME], 1,
              [Define if your system has a working basename])
  else
    AC_LIBOBJ([basename])
  fi
])




From MAILER-DAEMON Thu Jan 12 18:32:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlU87-0001XX-Kd
	for mharc-autoconf@gnu.org; Thu, 12 Jan 2012 18:32:23 -0500
Received: from eggs.gnu.org ([140.186.70.92]:54743)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RlU85-0001XP-20
	for autoconf@gnu.org; Thu, 12 Jan 2012 18:32:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RlU83-0000Gy-JN
	for autoconf@gnu.org; Thu, 12 Jan 2012 18:32:20 -0500
Received: from mx1.redhat.com ([209.132.183.28]:9846)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RlU83-0000Gm-8w
	for autoconf@gnu.org; Thu, 12 Jan 2012 18:32:19 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0CNWHXW004575
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 12 Jan 2012 18:32:17 -0500
Received: from [10.3.113.44] (ovpn-113-44.phx2.redhat.com [10.3.113.44])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q0CNWGr1017440; Thu, 12 Jan 2012 18:32:17 -0500
Message-ID: <4F0F6D7F.8050105@redhat.com>
Date: Thu, 12 Jan 2012 16:32:15 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:9.0) Gecko/20111222 Thunderbird/9.0
MIME-Version: 1.0
To: svante.signell@telia.com
Subject: Re: How to write a conditional test in configure.ac
References: <1326409104.3525.33.camel@hp.my.own.domain>
In-Reply-To: <1326409104.3525.33.camel@hp.my.own.domain>
X-Enigmail-Version: 1.3.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig80CC8E19BBB4A31953F477AD"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
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: Thu, 12 Jan 2012 23:32:22 -0000

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

On 01/12/2012 03:58 PM, Svante Signell wrote:
> Hello.
>=20
> Consider the code snippet below. How to modify it to get the GNU versio=
n
> of baseline if defined (in my case GNU/Hurd). The macro=20
> AC_USE_SYSTEM_EXTENSIONS is stated earlier in configure.ac.

First, I'd suggest that you _don't_ use basename(); it has severe
portability problems (POSIX allows, but does not require, it to modify
its incoming argument; worse, POSIX states that these functions need not
be thread-safe, rendering them useless in multithreaded programs) - mere
existence of the function in libgen.h does not tell you whether you will
be encountering those subtle differences as you port to other platforms.
 Besides, on glibc, there are two flavors of basename(), and which
version you get depends on your compile-time options - I guess this is a
case where you were probing for the GNU behavior rather than the POSIX
behavior.  Your test program didn't test for those particular
subtleties.  The gnulib module dirname provides functions dir_name,
base_name, and last_component, which have saner semantics that are
uniform to all platforms and not dependent on POSIX vagaries.

But, if I can't convince you to use gnulib and either base_name() or
last_component(), I can still advise you on how to better use autoconf.

>=20
>>From configure.ac:
> # COMPAT_FUNC_BASENAME
> # --------------------
> # Check for working basename() function.
> AC_CHECK_HEADERS([libgen.h])

This is an unconditional check; did you mean for it to be inside the
body of your COMPAT_FUNC_BASENAME?

> AC_DEFUN([COMPAT_FUNC_BASENAME], [
>   AC_DEFINE([NEED_BASENAME], 1,
>             [Define if you want to use the basename function])

This unconditionally defines NEED_BASENAME.  You should instead defer
this line of code until after you have done the cache check.

>   AC_CHECK_HEADERS([libgen.h])

I'd suggest using AC_CHECK_HEADERS_ONCE, as it is more efficient.

>   AC_CACHE_CHECK([for working basename],
>     [compat_cv_func_basename_works],
>=20
>     [AC_TRY_RUN([

AC_TRY_RUN is deprecated; also, instead of open-coding your program, I'd
use AC_LANG_PROGRAM.

> #include <stdio.h>
> #include <stdlib.h>
> #ifdef HAVE_LIBGEN_H
> # include <libgen.h>

For this particular test, there's no need to probe for HAVE_LIBGEN_H -
since you are probing for a working basename(), it's perfectly find to
ditch all platforms that lack <libgen.h> with a compiler error.

>     if (strcmp(basename(test1), tests[i].result) ||
>         strcmp(test1, tests[i].test))
>       exit(1);
>   }

It is actually more portable to use 'return 1' than 'exit(1)' in
configure checks, as then you don't have to worry about <stdlib.h>
working right.  Also, strcmp() requires the use of <string.h>.

> ],
>       [compat_cv_func_basename_works=3Dyes],
>       [compat_cv_func_basename_works=3Dno],
>       [compat_cv_func_basename_works=3Dno]

Good, you provided a sane default for cross compilation.

>     )]
>   )
>   if test "$compat_cv_func_basename_works" =3D "yes"; then
>     AC_DEFINE([HAVE_BASENAME], 1,
>               [Define if your system has a working basename])
>   else
>     AC_LIBOBJ([basename])
>   fi

Yes, this looks like the correct conditional.  In other words, you were
already pretty close - reusing your main() method as-is, I would have
written:

AC_DEFUN([COMPAT_FUNC_BASENAME], [
  AC_CHECK_HEADERS([libgen.h])
  AC_CACHE_CHECK([for working basename],
    [compat_cv_func_basename_works],

    [AC_RUN_IFELSE([[
#include <string.h>
#include <libgen.h>

typedef struct {
  char *test;
  char *result;
} test_t;

const test_t tests[] =3D {
  { "/usr/local/foo", "foo" },
  { "/usr/local/foo/", "foo" },
  { NULL, NULL }
};
]], [[
  char test1[1024];
  int i;

  for (i =3D 0; tests[i].test; i++) {
    strcpy(test1, tests[i].test);
    if (strcmp(basename(test1), tests[i].result) ||
        strcmp(test1, tests[i].test))
      return 1;
  }
]],
      [compat_cv_func_basename_works=3Dyes],
      [compat_cv_func_basename_works=3Dno],
      [compat_cv_func_basename_works=3Dno]
    )]
  )
  if test "$compat_cv_func_basename_works" =3D "yes"; then
    AC_DEFINE([HAVE_BASENAME], 1,
              [Define if your system has a working basename])
  else
    AC_LIBOBJ([basename])
  fi
])

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


--------------enig80CC8E19BBB4A31953F477AD
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 Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJPD22AAAoJEKeha0olJ0NqcX0H/00ZDkleXjHXzpva3xcW8urj
cMkdVAUNAF7PueIiPV+lCMoIflnzJMuGqXyYN9BRGK0aNw17bNTTh43F1trGfDnV
zPj8iXCqaQwyN5Eb5gMYHDbIYXpGrICsSZH21DYu8T3e5Lw8AqjQPCnr/FR8UFX3
IxpNuYWaqorvSE/rUNmiAh2r1C2LnE1j6nyEXXNO0TatG+/jxqWzWwfcU3o0hPD1
NJ8ptPMzNacaRSF9ZEDb/DmrmUPlLEBbFuMz6sO04Fbb1/PwcOAYX9mc1yuTwPIo
Lg128QPjdvwS4q/sNw7s/BrpiGdsA0Z8eYrE6CurGr9jEnYV9Z0zQu4P0/15g6o=
=kKdo
-----END PGP SIGNATURE-----

--------------enig80CC8E19BBB4A31953F477AD--


From MAILER-DAEMON Thu Jan 12 19:12:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlUlC-0002Af-2F
	for mharc-autoconf@gnu.org; Thu, 12 Jan 2012 19:12:46 -0500
Received: from eggs.gnu.org ([140.186.70.92]:34859)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RlUl9-0002AY-Pb
	for autoconf@gnu.org; Thu, 12 Jan 2012 19:12:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RlUl8-0005qK-Mh
	for autoconf@gnu.org; Thu, 12 Jan 2012 19:12:43 -0500
Received: from smtp.gentoo.org ([140.211.166.183]:39541)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1RlUl8-0005q9-II
	for autoconf@gnu.org; Thu, 12 Jan 2012 19:12:42 -0500
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 54BD61B4012;
	Fri, 13 Jan 2012 00:12:39 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org
Subject: Re: How to write a conditional test in configure.ac
Date: Thu, 12 Jan 2012 19:12:48 -0500
User-Agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; )
References: <1326409104.3525.33.camel@hp.my.own.domain>
	<4F0F6D7F.8050105@redhat.com>
In-Reply-To: <4F0F6D7F.8050105@redhat.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart6706393.cWavqpqVPG";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201201121912.49229.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: Eric Blake <eblake@redhat.com>, svante.signell@telia.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, 13 Jan 2012 00:12:44 -0000

--nextPart6706393.cWavqpqVPG
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit

On Thursday 12 January 2012 18:32:15 Eric Blake wrote:
> First, I'd suggest that you _don't_ use basename(); it has severe
> portability problems (POSIX allows, but does not require, it to modify
> its incoming argument

and some systems (like some *BSDs) do modify it :(
-mike

--nextPart6706393.cWavqpqVPG
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)

iQIcBAABAgAGBQJPD3cBAAoJEEFjO5/oN/WB0FMP/R7l3v1wWzAUqOmvRQCT3Svp
vv1+EpTvm+Kwk357OzkUJ42ZIfcdj5yM7XMf+nMZQHoMcfiTC3MZx2H0vPZ0a/B2
pylADcxdydiMdndWZ15xAvraHxkO0EkgXveeHVE788Q4tjGiJyFdekOzcXFFjLVC
BPTWjySJF/6fJtP4SsPLFX3R1en1hhh4p5V2p6K8optnyeB6DVrWpnNZZaOBghJy
hOwNFVAdVvlJvEFir4GOoTlfi07+zpbO72AfTGA9Ogs7FT3CpdLhmkLifUu18cYx
PbSwdBPrGMsWQlpcKFTY38MARYz1DOj9MbxVLl875Tn5Iyg+c6VgBj0Z6WWCx7vW
LbKMTs4PO0duuH1mjf9RRDjeiH1xBGf6d9wwvTMX/muxm06pAzBdWcXL3Mk+hC0w
W520EMK0ljKMCVD6nN4qVeO/FRVZgw7MqX8npfAITnK0/BekSbP+49tiMNgSzHWg
iugrbomDOwp8BFquMnFFgJWT1WclMcTTmbM2Oyg8XrsWYTpik7pRkHe6IN1ELjQq
Y22sGNDHAndomiGiuvTIBXGVAELQC8oQ8haq25PPM071sz75ml91mOIKcf1Z23Z/
KCDDGri62/ZdAwyJuIhXrd5XSiJsFMW/4Ve9h8E+bXbGXyz8hK++W3yPfbgBdPs8
30qarPcr2yZuv8qs7KsU
=GR/G
-----END PGP SIGNATURE-----

--nextPart6706393.cWavqpqVPG--


From MAILER-DAEMON Thu Jan 12 21:19:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlWk2-0001mT-WA
	for mharc-autoconf@gnu.org; Thu, 12 Jan 2012 21:19:42 -0500
Received: from eggs.gnu.org ([140.186.70.92]:54472)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <svante.signell@telia.com>) id 1RlWk0-0001ko-MI
	for autoconf@gnu.org; Thu, 12 Jan 2012 21:19:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <svante.signell@telia.com>) id 1RlWjx-0006dy-HT
	for autoconf@gnu.org; Thu, 12 Jan 2012 21:19:40 -0500
Received: from smtp-out12.han.skanova.net ([195.67.226.212]:58153)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <svante.signell@telia.com>) id 1RlWjx-0006dm-6S
	for autoconf@gnu.org; Thu, 12 Jan 2012 21:19:37 -0500
Received: from [192.168.0.6] (78.69.11.59) by smtp-out12.han.skanova.net
	(8.5.133) (authenticated as u84406617)
	id 4EFC380E003632C9; Fri, 13 Jan 2012 03:19:32 +0100
Message-ID: <1326421167.3525.55.camel@hp.my.own.domain>
Subject: Re: How to write a conditional test in configure.ac
From: Svante Signell <svante.signell@telia.com>
To: Eric Blake <eblake@redhat.com>
Date: Fri, 13 Jan 2012 03:19:27 +0100
In-Reply-To: <4F0F6D7F.8050105@redhat.com>
References: <1326409104.3525.33.camel@hp.my.own.domain>
	<4F0F6D7F.8050105@redhat.com>
Organization: Hemma
Content-Type: text/plain; charset="us-ascii"
X-Mailer: Evolution 3.2.2-1 
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 195.67.226.212
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: svante.signell@telia.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Jan 2012 02:19:41 -0000

Thank you for your (and Mikes) prompt replies.
On Thu, 2012-01-12 at 16:32 -0700, Eric Blake wrote:
> On 01/12/2012 03:58 PM, Svante Signell wrote:
> > Hello.
> > 
> > Consider the code snippet below. How to modify it to get the GNU version
> > of baseline if defined (in my case GNU/Hurd). The macro 
> > AC_USE_SYSTEM_EXTENSIONS is stated earlier in configure.ac.

/baseline/basename/

> First, I'd suggest that you _don't_ use basename(); it has severe
> portability problems (POSIX allows, but does not require, it to modify
> its incoming argument; worse, POSIX states that these functions need not
> be thread-safe, rendering them useless in multithreaded programs) - mere
> existence of the function in libgen.h does not tell you whether you will
> be encountering those subtle differences as you port to other platforms.
>  Besides, on glibc, there are two flavors of basename(), and which
> version you get depends on your compile-time options - I guess this is a
> case where you were probing for the GNU behavior rather than the POSIX
> behavior.  

Yes I want the GNU version, see below.

> Your test program didn't test for those particular
> subtleties.  The gnulib module dirname provides functions dir_name,
> base_name, and last_component, which have saner semantics that are
> uniform to all platforms and not dependent on POSIX vagaries.

This code is not mine, it comes from a package called libtar. Latest
release was in 2003, and there is no upstream any longer. Still some
other packages depends on this code. I'm merely porting the code to get
rid of all MAXPATHLEN definitions, since this is not defined for
GNU/Hurd. And by doing dynamic allocation of strings, modification of
the argument strikes hard freeing allocated strings since the fallback
solution is just the openbsd version! :(

Cite:
On Thursday 12 January 2012 18:32:15 Eric Blake wrote:
> First, I'd suggest that you _don't_ use basename(); it has severe
> portability problems (POSIX allows, but does not require, it to modify
> its incoming argument
and some systems (like some *BSDs) do modify it :(
-mike

All fallback (compat) code are openbsd versions, and I don't want to
port them removing the fixed length strings by dynamic ones since much
better alternatives already exists in glibc.

> But, if I can't convince you to use gnulib and either base_name() or
> last_component(), I can still advise you on how to better use autoconf.

gnulib is not used in this code, so that is not an option. And thanks!

> I would have written:
> 
> AC_DEFUN([COMPAT_FUNC_BASENAME], [
...
Will this code give the GNU version of basename if defined, the POSIX
version if not defined, and the openbsd fallback as last resort?

Another issue with the code is is that the test a flawed, but I know how
to correct it.




From MAILER-DAEMON Thu Jan 19 08:45:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnsJ8-0003aU-4D
	for mharc-autoconf@gnu.org; Thu, 19 Jan 2012 08:45:38 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57676)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1RnsIy-0003SU-QJ
	for autoconf@gnu.org; Thu, 19 Jan 2012 08:45:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1RnsIs-0007Iw-Gd
	for autoconf@gnu.org; Thu, 19 Jan 2012 08:45:28 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:38471)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1RnsIh-0007Hf-CV; Thu, 19 Jan 2012 08:45:11 -0500
Received: by eekc13 with SMTP id c13so1715123eek.0
	for <multiple recipients>; Thu, 19 Jan 2012 05:45:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:cc:subject:content-type
	:content-transfer-encoding;
	bh=g8/bcmk9dr7JipnPVLqZKmSQZ6+eV8p8b1HeJsnm3y8=;
	b=oOJzzJfXIkYars3inyAzNvukbcveREkGr4SRVO8lZkpRH2e12n7+fH3ccuOXGuTAIg
	Nz7dd+RZE1oEwn7JTl5RaVNYIR88mxRgq0YeRD2/avgDIcbOZ4nhbYWAHpATX6BITAB0
	o4tFZJm5NvLQP6NVYL9eZOWKt/Rj+Ul9jY83k=
Received: by 10.14.10.167 with SMTP id 39mr1727115eev.109.1326980710319;
	Thu, 19 Jan 2012 05:45:10 -0800 (PST)
Received: from [87.21.62.175]
	(host175-62-dynamic.21-87-r.retail.telecomitalia.it. [87.21.62.175])
	by mx.google.com with ESMTPS id x43sm113549596eef.8.2012.01.19.05.45.08
	(version=SSLv3 cipher=OTHER); Thu, 19 Jan 2012 05:45:08 -0800 (PST)
Message-ID: <4F181E61.5060807@gmail.com>
Date: Thu, 19 Jan 2012 14:45:05 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: bug-automake@gnu.org
Subject: automake: wrong use of F77FLAGS instead of FFLAGS?
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.83.41
Cc: "<autoconf@gnu.org>" <autoconf@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Jan 2012 13:45:34 -0000

Severity: minor
thanks

In the Automake repository, I'm seeing this:

  $ git grep F77FLAGS
  lib/Automake/Variable.pm:   F77FLAGS => 'AC_PROG_F77',
  $ grep -C 10 F77FLAGS lib/Automake/Variable.pm
  # Macros shipped with Autoconf.
  my %_ac_macro_for_var =
    (
     ALLOCA => 'AC_FUNC_ALLOCA',
     CC => 'AC_PROG_CC',
     CFLAGS => 'AC_PROG_CC',
     CXX => 'AC_PROG_CXX',
     CXXFLAGS => 'AC_PROG_CXX',
     F77 => 'AC_PROG_F77',
     F77FLAGS => 'AC_PROG_F77',
     FC => 'AC_PROG_FC',
     FCFLAGS => 'AC_PROG_FC',
     OBJC => 'AC_PROG_OBJC',
     OBJCFLAGS => 'AC_PROG_OBJC',
     RANLIB => 'AC_PROG_RANLIB',
     UPC => 'AM_PROG_UPC',
     UPCFLAGS => 'AM_PROG_UPC',
     YACC => 'AC_PROG_YACC',
   );

But autoconf uses FFLAGS, not F77FLAGS, as the variable where to look for
switches for the Fortran 77 compiler:

  $ cd src/autoconf
  $ git grep F77FLAGS || echo NOT FOUND
  NOT FOUND
  $ grep FFLAGS lib/autoconf/fortran.m4
  # dialects.  Fortran 77 uses environment variables F77, FFLAGS, and FLIBS,
  ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
  ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
  AC_ARG_VAR([FFLAGS], [Fortran 77 compiler flags])dnl

And the autoconf documentation agrees with that:

  * Variable: FFLAGS
    Debugging and optimization options for the Fortran 77 compiler. If it
    is not set in the environment when configure runs, the default value
    is set when you call AC_PROG_F77 (or empty if you don't). configure
    uses this variable when compiling or linking programs to test for
    Fortran 77 features.

  ...

  ``Fortran 77''
  Do compilation tests using F77 and use extension .f for test programs.
  Use compilation flags: FFLAGS.

So, to all autoconfers: do you happen to know any reason for which Automake
should use F77FLAGS? If not, I'll assume that is due to a typo or clerical
mistake, and fix it (in 48 hours or so).

Thanks,
  Stefano


From MAILER-DAEMON Fri Jan 20 11:41:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RoHWy-0005Mh-V7
	for mharc-autoconf@gnu.org; Fri, 20 Jan 2012 11:41:36 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57328)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prlw1@cam.ac.uk>) id 1RoHWt-0005KT-Ig
	for autoconf@gnu.org; Fri, 20 Jan 2012 11:41:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <prlw1@cam.ac.uk>) id 1RoHWs-0007Bp-C0
	for autoconf@gnu.org; Fri, 20 Jan 2012 11:41:31 -0500
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]:57813)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <prlw1@cam.ac.uk>) id 1RoHWs-0007Bi-7r
	for autoconf@gnu.org; Fri, 20 Jan 2012 11:41:30 -0500
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mull.inf.phy.cam.ac.uk ([131.111.52.77]:49060
	helo=mrao.cam.ac.uk)
	by ppsw-52.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:587)
	with esmtpsa (LOGIN:prlw1) (TLSv1:DHE-RSA-AES128-SHA:128)
	id 1RoHWq-00015y-Fi (Exim 4.72) for autoconf@gnu.org
	(return-path <prlw1@cam.ac.uk>); Fri, 20 Jan 2012 16:41:28 +0000
Date: Fri, 20 Jan 2012 16:41:27 +0000
From: Patrick Welche <prlw1@cam.ac.uk>
To: autoconf@gnu.org
Subject: configure test involving plugin
Message-ID: <20120120164127.GE30160@mrao.cam.ac.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.20 (2009-06-14)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 131.111.8.152
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, 20 Jan 2012 16:41:35 -0000

glib has a configure test to check whether RTLD_GLOBAL is broken on OSF1.
This involves building a plugin using libtool and then essentially
AC_RUN_IFELSE on a piece of code which loads said plugin.

This is all fine, and works. I was just wondering if there was a way
of doing this without invoking libtool, as configure should "know"
everything libtool does as it created libtool.
(a bit of a theoretical question...)


Cheers,

Patrick


From MAILER-DAEMON Fri Jan 20 14:53:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RoKWq-0007ok-0o
	for mharc-autoconf@gnu.org; Fri, 20 Jan 2012 14:53:40 -0500
Received: from eggs.gnu.org ([140.186.70.92]:40300)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1RoKWn-0007lc-06
	for autoconf@gnu.org; Fri, 20 Jan 2012 14:53:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1RoKWi-0001Ea-NV
	for autoconf@gnu.org; Fri, 20 Jan 2012 14:53:36 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:61958)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1RoKWi-0001EV-H3
	for autoconf@gnu.org; Fri, 20 Jan 2012 14:53:32 -0500
Received: by eaad14 with SMTP id d14so341235eaa.0
	for <autoconf@gnu.org>; Fri, 20 Jan 2012 11:53:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type;
	bh=cutaGTvtKnEZtqohIm+fNpRTkVdhNOR7a4l1lJsDXM8=;
	b=u7THGZwM1UZmMKtQ3jvB+4Xeh/QNUcmrwhviQnFTxJPhi8aq2F2aD2HtCfobY9RNW5
	q2CzWX6sBZc1UtyeGp8lFBEutY4EQvi0AIUGWC44R1O1qbWg+JDO4bmbydyCNiF/tLvB
	8Suqi5x665juC72ALushnWvSJJh8+SVDny71s=
Received: by 10.213.9.4 with SMTP id j4mr6933509ebj.100.1327089211536;
	Fri, 20 Jan 2012 11:53:31 -0800 (PST)
Received: from [87.2.95.39] (host39-95-dynamic.2-87-r.retail.telecomitalia.it.
	[87.2.95.39])
	by mx.google.com with ESMTPS id t59sm15457875eeh.10.2012.01.20.11.53.30
	(version=SSLv3 cipher=OTHER); Fri, 20 Jan 2012 11:53:30 -0800 (PST)
Message-ID: <4F19C637.6040800@gmail.com>
Date: Fri, 20 Jan 2012 20:53:27 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: 10555@debbugs.gnu.org
Subject: Re: bug#10555: automake: wrong use of F77FLAGS instead of FFLAGS?
References: <4F181E61.5060807@gmail.com>
In-Reply-To: <4F181E61.5060807@gmail.com>
Content-Type: multipart/mixed; boundary="------------020308010300040608050407"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
Cc: "<autoconf@gnu.org>" <autoconf@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Jan 2012 19:53:38 -0000

This is a multi-part message in MIME format.
--------------020308010300040608050407
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

On 01/19/2012 02:45 PM, Stefano Lattarini wrote:
>
> [SNIP]
>
> So, to all autoconfers: do you happen to know any reason for which Automake
> should use F77FLAGS? If not, I'll assume that is due to a typo or clerical
> mistake, and fix it (in 48 hours or so).
> 
The attached patch should take care of this.  I'll push it tomorrow if there
is no objection.

Thanks,
  Stefano

--------------020308010300040608050407
Content-Type: text/x-diff;
 name="0001-fixlet-flags-for-Fortran77-compiler-are-in-FFLAGS-no.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-fixlet-flags-for-Fortran77-compiler-are-in-FFLAGS-no.pa";
 filename*1="tch"

>From c515aac8817b20a8f0a6ed8969f1f1d0b37c3802 Mon Sep 17 00:00:00 2001
Message-Id: <c515aac8817b20a8f0a6ed8969f1f1d0b37c3802.1327089175.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Fri, 20 Jan 2012 20:52:02 +0100
Subject: [PATCH] fixlet: flags for Fortran77 compiler are in FFLAGS, not
 F77FLAGS

This change fixes automake bug#10555.

* lib/Automake/Variable.pm (%_ac_macro_for_var): The code generated
by AC_PROG_F77 uses FFLAGS, not F77FLAGS, as the variable where to
look for switches for the Fortran 77 compiler: adjust accordingly.
---
 lib/Automake/Variable.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 686847d..8f712bd 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -181,7 +181,7 @@ my %_ac_macro_for_var =
    CXX => 'AC_PROG_CXX',
    CXXFLAGS => 'AC_PROG_CXX',
    F77 => 'AC_PROG_F77',
-   F77FLAGS => 'AC_PROG_F77',
+   FFLAGS => 'AC_PROG_F77',
    FC => 'AC_PROG_FC',
    FCFLAGS => 'AC_PROG_FC',
    OBJC => 'AC_PROG_OBJC',
-- 
1.7.7.3


--------------020308010300040608050407--


From MAILER-DAEMON Sun Jan 22 07:17:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RowMo-0004Yj-R6
	for mharc-autoconf@gnu.org; Sun, 22 Jan 2012 07:17:50 -0500
Received: from eggs.gnu.org ([140.186.70.92]:46165)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1RowMm-0004Wl-FD
	for autoconf@gnu.org; Sun, 22 Jan 2012 07:17:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1RowMl-0002VL-Kk
	for autoconf@gnu.org; Sun, 22 Jan 2012 07:17:48 -0500
Received: from chaos.univ-evry.fr ([194.199.90.27]:61405)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1RowMl-0002Ux-El
	for autoconf@gnu.org; Sun, 22 Jan 2012 07:17:47 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AtwIAKH9G0/Cx1WL/2dsb2JhbABDngwBkBSBBYIxAoIrh2OYPJ8FiQqDHASVGYkqiSU
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos.univ-evry.fr with ESMTP; 22 Jan 2012 13:17:33 +0100
Date: Sun, 22 Jan 2012 13:17:32 +0100 (CET)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: autoconf@gnu.org
Subject: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
Message-ID: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.199.90.27
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 12:17:49 -0000


Hey,

when using AC_FUNC_ALLOCA, the autoconf documentation says that one should 
paste some code. That code generates a warning because:

1) the doc says to paste

#elif defined __GNUC__
# define alloca __builtin_alloca

2) the MinGW-w64 compiler already defines alloca in malloc.h, that header 
files being included by stdlib.h because STDC_HEADERS is defined.

I don't know how to properly fix the doc. One solution would be:

#elif defined __GNUC__
# ifndef alloca
#  define alloca __builtin_alloca
# endif

what do you think ?

regards

Vincent Torri


From MAILER-DAEMON Sun Jan 22 10:21:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RozEs-0005vO-4S
	for mharc-autoconf@gnu.org; Sun, 22 Jan 2012 10:21:50 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35628)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1RozEo-0005qC-PQ
	for autoconf@gnu.org; Sun, 22 Jan 2012 10:21:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1RozEn-0008C6-Cx
	for autoconf@gnu.org; Sun, 22 Jan 2012 10:21:46 -0500
Received: from blade.simplesystems.org ([65.66.246.74]:41818)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1RozEn-0008BU-1x
	for autoconf@gnu.org; Sun, 22 Jan 2012 10:21:45 -0500
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q0MFLZeC022124; Sun, 22 Jan 2012 09:21:37 -0600 (CST)
Date: Sun, 22 Jan 2012 09:21:35 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Vincent Torri <vtorri@univ-evry.fr>
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
In-Reply-To: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
Message-ID: <alpine.GSO.2.01.1201220913560.15666@freddy.simplesystems.org>
References: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
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, 22 Jan 2012 09:21:37 -0600 (CST)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 15:21:48 -0000

On Sun, 22 Jan 2012, Vincent Torri wrote:

> when using AC_FUNC_ALLOCA, the autoconf documentation says that one should 
> paste some code. That code generates a warning because:
>
> 1) the doc says to paste
>
> #elif defined __GNUC__
> # define alloca __builtin_alloca
>
> 2) the MinGW-w64 compiler already defines alloca in malloc.h, that header 
> files being included by stdlib.h because STDC_HEADERS is defined.
>
> I don't know how to properly fix the doc. One solution would be:
>
> #elif defined __GNUC__
> # ifndef alloca
> #  define alloca __builtin_alloca
> # endif
>
> what do you think ?

I think that your work-around is the safe approach and that the docs 
should be fixed.

Other build environments (e.g. Solaris 10) also use a similar macro 
definition and it becomes enabled by the compiler:

#define alloca(x)       __builtin_alloca(x)

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


From MAILER-DAEMON Sun Jan 22 15:40:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rp4Dd-0006QB-80
	for mharc-autoconf@gnu.org; Sun, 22 Jan 2012 15:40:53 -0500
Received: from eggs.gnu.org ([140.186.70.92]:50335)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rp4Da-0006Pj-Li
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:40:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rp4DZ-0000w4-KM
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:40:50 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:33418)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rp4DZ-0000vy-F8
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:40:49 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id D73F2A60004;
	Sun, 22 Jan 2012 12:40:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id oTDCYnlB2CQa; Sun, 22 Jan 2012 12:40:48 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 701E0A60002;
	Sun, 22 Jan 2012 12:40:48 -0800 (PST)
Message-ID: <4F1C7450.707@cs.ucla.edu>
Date: Sun, 22 Jan 2012 12:40:48 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Vincent Torri <vtorri@univ-evry.fr>
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
References: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
In-Reply-To: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 20:40:51 -0000

On 01/22/2012 04:17 AM, Vincent Torri wrote:
> 2) the MinGW-w64 compiler already defines alloca in malloc.h,
> that header files being included by stdlib.h because STDC_HEADERS is defined.

Could you give more details about the problem?
STDC_HEADERS is in the user's space, so the system
stdlib.h should be unaffected by whether STDC_HEADERS
is defined.  Are we talking about the system's stdlib.h
here, or by your own substitute for stdlib.h?  If the
latter, then it might be something outside the
scope of the autoconf documentation.


From MAILER-DAEMON Sun Jan 22 15:45:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rp4IQ-0007AZ-1W
	for mharc-autoconf@gnu.org; Sun, 22 Jan 2012 15:45:50 -0500
Received: from eggs.gnu.org ([140.186.70.92]:57279)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Rp4IM-00076v-J2
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:45:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Rp4IL-0001RL-IP
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:45:46 -0500
Received: from chaos2.univ-evry.fr ([194.199.90.26]:10674)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Rp4IL-0001Qs-BL
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:45:45 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EAGl0HE/Cx1WL/2dsb2JhbABDDqttgimBBYFyAQEEATgCPwULCxguVwaIDwK3XYwmBJUZiSqIbTg
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos2.univ-evry.fr with ESMTP; 22 Jan 2012 21:45:42 +0100
Date: Sun, 22 Jan 2012 21:45:41 +0100 (CET)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
In-Reply-To: <4F1C7450.707@cs.ucla.edu>
Message-ID: <Pine.LNX.4.64.1201222141460.25037@grozny.maths.univ-evry.fr>
References: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
	<4F1C7450.707@cs.ucla.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.199.90.26
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 20:45:47 -0000



On Sun, 22 Jan 2012, Paul Eggert wrote:

> On 01/22/2012 04:17 AM, Vincent Torri wrote:
>> 2) the MinGW-w64 compiler already defines alloca in malloc.h,
>> that header files being included by stdlib.h because STDC_HEADERS is defined.
>
> Could you give more details about the problem?
> STDC_HEADERS is in the user's space, so the system
> stdlib.h should be unaffected by whether STDC_HEADERS
> is defined.  Are we talking about the system's stdlib.h
> here, or by your own substitute for stdlib.h?  If the
> latter, then it might be something outside the
> scope of the autoconf documentation.

there was a warning when using mingw-w64 compilers : redefinition of 
alloca. The line where the redefinition is located is:

#elif defined __GNUC__
# define alloca __builtin_alloca   <---- that one

and there was a redefinition because stdlib.h is included just above, and 
stdlib.h includes malloc.h. And with mingw-w64 compilers, malloc.h 
already defines alloca.

I hope I'm clearer :)

Vincent Torri


From MAILER-DAEMON Sun Jan 22 15:51:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rp4O1-0007jT-IW
	for mharc-autoconf@gnu.org; Sun, 22 Jan 2012 15:51:37 -0500
Received: from eggs.gnu.org ([140.186.70.92]:36102)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rp4Ny-0007fn-UW
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:51:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rp4Nx-0001rY-UL
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:51:34 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:54281)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1Rp4Nx-0001rU-PC
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:51:33 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 200EBA60004;
	Sun, 22 Jan 2012 12:51:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 4mhdpolOLBz2; Sun, 22 Jan 2012 12:51:32 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id C4063A60002;
	Sun, 22 Jan 2012 12:51:32 -0800 (PST)
Message-ID: <4F1C76D5.60908@cs.ucla.edu>
Date: Sun, 22 Jan 2012 12:51:33 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Vincent Torri <vtorri@univ-evry.fr>
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
References: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
	<4F1C7450.707@cs.ucla.edu>
	<Pine.LNX.4.64.1201222141460.25037@grozny.maths.univ-evry.fr>
In-Reply-To: <Pine.LNX.4.64.1201222141460.25037@grozny.maths.univ-evry.fr>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 20:51:35 -0000

On 01/22/2012 12:45 PM, Vincent Torri wrote:
> and there was a redefinition because stdlib.h is included just above,
> and stdlib.h includes malloc.h. And with mingw-w64 compilers, malloc.h already defines alloca.

Is this the stdlib.h that comes with mingw-w64?  Can you
show the code that does that inclusion?  Is it a simple

#include <malloc.h>

or is it protected by an #if or #ifdef?  Also, how does
malloc.h define alloca?   Presumably it does not look like
this:

#define alloca __builtin_alloca

so what does it look like?  And is it defined unconditionally,
or is it protected by an #if?

That's the sort of thing I'm interested in.


From MAILER-DAEMON Sun Jan 22 15:57:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rp4TF-0000W0-15
	for mharc-autoconf@gnu.org; Sun, 22 Jan 2012 15:57:01 -0500
Received: from eggs.gnu.org ([140.186.70.92]:33252)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Rp4TD-0000VN-1R
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:56:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Rp4TC-0002No-0l
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:56:59 -0500
Received: from smtp.univ-evry.fr ([194.199.90.27]:31133
	helo=chaos.univ-evry.fr) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1Rp4TB-0002Ni-Ra
	for autoconf@gnu.org; Sun, 22 Jan 2012 15:56:57 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EAI92HE/Cx1WL/2dsb2JhbABDDqttgimBBYFyAQEEATgCPwULCxguVwaIDwK3YIwmBJUZiSqIbTg
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos.univ-evry.fr with ESMTP; 22 Jan 2012 21:56:56 +0100
Date: Sun, 22 Jan 2012 21:56:56 +0100 (CET)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
In-Reply-To: <4F1C76D5.60908@cs.ucla.edu>
Message-ID: <Pine.LNX.4.64.1201222153510.25037@grozny.maths.univ-evry.fr>
References: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
	<4F1C7450.707@cs.ucla.edu>
	<Pine.LNX.4.64.1201222141460.25037@grozny.maths.univ-evry.fr>
	<4F1C76D5.60908@cs.ucla.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.199.90.27
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 20:56:59 -0000



On Sun, 22 Jan 2012, Paul Eggert wrote:

> On 01/22/2012 12:45 PM, Vincent Torri wrote:
>> and there was a redefinition because stdlib.h is included just above,
>> and stdlib.h includes malloc.h. And with mingw-w64 compilers, malloc.h already defines alloca.
>
> Is this the stdlib.h that comes with mingw-w64?  Can you
> show the code that does that inclusion?  Is it a simple
>
> #include <malloc.h>
>
> or is it protected by an #if or #ifdef?

stdlib.h :

#ifndef _INC_STDLIB
#define _INC_STDLIB

/* content of stdlib.h */

#include <sec_api/stdlib_s.h>
#include <malloc.h>

#endif

that is, it's included just before the final #endif

>  Also, how does
> malloc.h define alloca?   Presumably it does not look like
> this:
>
> #define alloca __builtin_alloca
>
> so what does it look like?  And is it defined unconditionally,
> or is it protected by an #if?

in malloc.h:

#ifdef __GNUC__
#undef _alloca
#define _alloca(x) __builtin_alloca((x))
#else
   void *__cdecl _alloca(size_t _Size) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
#endif

Vincent Torri


From MAILER-DAEMON Mon Jan 23 01:54:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpDnH-0005PP-4m
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 01:54:19 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38608)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpDnE-0005OJ-PZ
	for autoconf@gnu.org; Mon, 23 Jan 2012 01:54:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpDnD-0001K0-Ua
	for autoconf@gnu.org; Mon, 23 Jan 2012 01:54:16 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:53010)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpDnD-0001JW-NT
	for autoconf@gnu.org; Mon, 23 Jan 2012 01:54:15 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 4BEBA39E800D;
	Sun, 22 Jan 2012 22:54:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id s7C8gHeY4tkq; Sun, 22 Jan 2012 22:54:14 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 02C1B39E8006;
	Sun, 22 Jan 2012 22:54:13 -0800 (PST)
Message-ID: <4F1D0411.5010302@cs.ucla.edu>
Date: Sun, 22 Jan 2012 22:54:09 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Vincent Torri <vtorri@univ-evry.fr>
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
References: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
	<4F1C7450.707@cs.ucla.edu>
	<Pine.LNX.4.64.1201222141460.25037@grozny.maths.univ-evry.fr>
	<4F1C76D5.60908@cs.ucla.edu>
	<Pine.LNX.4.64.1201222153510.25037@grozny.maths.univ-evry.fr>
In-Reply-To: <Pine.LNX.4.64.1201222153510.25037@grozny.maths.univ-evry.fr>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Jan 2012 06:54:17 -0000

On 01/22/2012 12:56 PM, Vincent Torri wrote:
> in malloc.h:
> 
> #ifdef __GNUC__
> #undef _alloca
> #define _alloca(x) __builtin_alloca((x))
> #else
>   void *__cdecl _alloca(size_t _Size) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
> #endif

But this doesn't define alloca.
It defines _alloca, which is a different symbol.
So I don't understand the problem.


From MAILER-DAEMON Mon Jan 23 02:01:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpDug-00075j-9t
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 02:01:58 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35235)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1RpDuc-00072r-Qj
	for autoconf@gnu.org; Mon, 23 Jan 2012 02:01:55 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1RpDub-0002Ky-UE
	for autoconf@gnu.org; Mon, 23 Jan 2012 02:01:54 -0500
Received: from smtp.univ-evry.fr ([194.199.90.27]:35593
	helo=chaos.univ-evry.fr) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vtorri@univ-evry.fr>) id 1RpDub-0002KR-ND
	for autoconf@gnu.org; Mon, 23 Jan 2012 02:01:53 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EALIEHU/Cx1WL/2dsb2JhbABDDqtrgiqBBYFyAQEEATgCPxALGC5XBogPArgDjCYElRmJKohtOA
Received: from grozny.maths.univ-evry.fr ([194.199.85.139])
	by chaos.univ-evry.fr with ESMTP; 23 Jan 2012 08:01:51 +0100
Date: Mon, 23 Jan 2012 08:01:51 +0100 (CET)
From: Vincent Torri <vtorri@univ-evry.fr>
X-X-Sender: vtorri@grozny.maths.univ-evry.fr
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
In-Reply-To: <Pine.LNX.4.64.1201222153510.25037@grozny.maths.univ-evry.fr>
Message-ID: <Pine.LNX.4.64.1201230801300.25037@grozny.maths.univ-evry.fr>
References: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
	<4F1C7450.707@cs.ucla.edu>
	<Pine.LNX.4.64.1201222141460.25037@grozny.maths.univ-evry.fr>
	<4F1C76D5.60908@cs.ucla.edu>
	<Pine.LNX.4.64.1201222153510.25037@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
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Jan 2012 07:01:55 -0000



On Sun, 22 Jan 2012, Vincent Torri wrote:

>
>
> On Sun, 22 Jan 2012, Paul Eggert wrote:
>
>> On 01/22/2012 12:45 PM, Vincent Torri wrote:
>>> and there was a redefinition because stdlib.h is included just above,
>>> and stdlib.h includes malloc.h. And with mingw-w64 compilers, malloc.h 
>>> already defines alloca.
>> 
>> Is this the stdlib.h that comes with mingw-w64?  Can you
>> show the code that does that inclusion?  Is it a simple
>> 
>> #include <malloc.h>
>> 
>> or is it protected by an #if or #ifdef?
>
> stdlib.h :
>
> #ifndef _INC_STDLIB
> #define _INC_STDLIB
>
> /* content of stdlib.h */
>
> #include <sec_api/stdlib_s.h>
> #include <malloc.h>
>
> #endif
>
> that is, it's included just before the final #endif
>
>>  Also, how does
>> malloc.h define alloca?   Presumably it does not look like
>> this:
>> 
>> #define alloca __builtin_alloca
>> 
>> so what does it look like?  And is it defined unconditionally,
>> or is it protected by an #if?
>
> in malloc.h:
>
> #ifdef __GNUC__
> #undef _alloca
> #define _alloca(x) __builtin_alloca((x))
> #else
>  void *__cdecl _alloca(size_t _Size) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
> #endif

A bit below in malloc.h :

#ifndef NO_OLDNAMES
#undef alloca
#ifdef __GNUC__
#define alloca(x) __builtin_alloca((x))
#else
#define alloca _alloca
#endif
#endif

Vincent Torri


From MAILER-DAEMON Mon Jan 23 03:13:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpF2C-0007X2-NT
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 03:13:48 -0500
Received: from eggs.gnu.org ([140.186.70.92]:33057)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpF27-0007Vm-9k
	for autoconf@gnu.org; Mon, 23 Jan 2012 03:13:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpF25-0002DY-R3
	for autoconf@gnu.org; Mon, 23 Jan 2012 03:13:43 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:45438)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>)
	id 1RpF1y-00027B-51; Mon, 23 Jan 2012 03:13:34 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 155C1A60002;
	Mon, 23 Jan 2012 00:13:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id HZA+RgQo+5I9; Mon, 23 Jan 2012 00:13:23 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B7C2139E8008;
	Mon, 23 Jan 2012 00:13:23 -0800 (PST)
Message-ID: <4F1D16A2.70402@cs.ucla.edu>
Date: Mon, 23 Jan 2012 00:13:22 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Vincent Torri <vtorri@univ-evry.fr>
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
References: <Pine.LNX.4.64.1201221311080.25037@grozny.maths.univ-evry.fr>
	<4F1C7450.707@cs.ucla.edu>
	<Pine.LNX.4.64.1201222141460.25037@grozny.maths.univ-evry.fr>
	<4F1C76D5.60908@cs.ucla.edu>
	<Pine.LNX.4.64.1201222153510.25037@grozny.maths.univ-evry.fr>
	<Pine.LNX.4.64.1201230801300.25037@grozny.maths.univ-evry.fr>
In-Reply-To: <Pine.LNX.4.64.1201230801300.25037@grozny.maths.univ-evry.fr>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf-patches@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: Mon, 23 Jan 2012 08:13:47 -0000

OK, thanks for the info.  I pushed this somewhat-different fix:

doc: work around mingw-w64 alloca problem with example
* doc/autoconf.texi (Particular Functions): In example code for
alloca, do not re-#define alloca.  This works around a mingw-w64
problem reported by Vincent Torri in
<http://lists.gnu.org/archive/html/autoconf/2012-01/msg00018.html>.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 247a46c..82837a2 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -4863,15 +4863,15 @@ like the following, to declare it properly.
 #endif
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>
-#elif defined __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#elif defined _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-#else
-# ifndef HAVE_ALLOCA
+#elif !defined alloca
+# ifdef __GNUC__
+#  define alloca __builtin_alloca
+# elif defined _AIX
+#  define alloca __alloca
+# elif defined _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# elif !defined HAVE_ALLOCA
 #  ifdef  __cplusplus
 extern "C"
 #  endif


From MAILER-DAEMON Mon Jan 23 12:08:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpNNa-0000tR-FB
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 12:08:26 -0500
Received: from eggs.gnu.org ([140.186.70.92]:42525)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RpNNX-0000qi-BI
	for Autoconf@gnu.org; Mon, 23 Jan 2012 12:08:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RpNNO-0006zQ-5c
	for Autoconf@gnu.org; Mon, 23 Jan 2012 12:08:23 -0500
Received: from mx1.redhat.com ([209.132.183.28]:17551)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1RpNND-0006yK-H9; Mon, 23 Jan 2012 12:08:03 -0500
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0NH7r4r017462
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 23 Jan 2012 12:07:53 -0500
Received: from [10.3.113.142] (ovpn-113-142.phx2.redhat.com [10.3.113.142])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q0NH7pOB005690; Mon, 23 Jan 2012 12:07:52 -0500
Message-ID: <4F1D93E7.9010008@redhat.com>
Date: Mon, 23 Jan 2012 10:07:51 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:9.0) Gecko/20111222 Thunderbird/9.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 2/8] maint: remove empty lines at EOF,
	but excluding modules/*
References: <1326823559-23407-1-git-send-email-jim@meyering.net>
	<4F1ACCFC.7030104@redhat.com> <87ipk5az6h.fsf@rho.meyering.net>
	<3272962.U3UgSdv9iV@linuix> <87r4yt9h66.fsf@rho.meyering.net>
In-Reply-To: <87r4yt9h66.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig69DDA0C11535D83CCF2AA240"
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: bug-gnulib@gnu.org, Paul Eggert <eggert@CS.UCLA.EDU>,
	Bruno Haible <bruno@clisp.org>, Autoconf <Autoconf@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Jan 2012 17:08:24 -0000

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

[adding autoconf]

On 01/21/2012 09:03 AM, Jim Meyering wrote:
> Bruno Haible wrote:
>>
>>> I too would prefer to use Paul's patch and thus to remove the
>>> doc/INSTALL* exemptions.
>>>
>>> Bruno, I know it's not your preference, but would that be ok with you=
=2E
>>
>> My objections were mostly esthetic, hence minor. You can decide to
>> ignore my esthetic preferences.
>=20
> Thanks, Bruno.

I've gone ahead and pushed Paul's patch, and will shortly push a patch
to autoconf so that it's own INSTALL file matches the gnulib INSTALL.

Meanwhile, I have a new question - by default, makeinfo produces `'
quoting by default in the creation of INSTALL, and we have INSTALL.ISO
to convert to '' quoting.  But given our recent push to use '' quoting
everywhere, should we be ditching INSTALL.ISO and make INSTALL use ''
quoting?  Should we be using '@set txicodequotebacktick' or similar
markup in install.texi in order alter the preferred quoting styles to
begin with?

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


--------------enig69DDA0C11535D83CCF2AA240
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 Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJPHZPnAAoJEKeha0olJ0NqoTQH/joPhm6/gYks7qVvn39Lovsq
/8d2NbLwRY6VvRlZ28N+oKzAFYgtNJ4lT9IJTNQzLtrmuV4KJgtJzU2aaVqIBhg0
2STLAbmeNJVRyPAXgbBuCYtZtPv0rsrsToaOpQed6ri7GXTtHdM1PhoQjnE7ifgG
NK7IwRar4FbX/1UOPp1/5zH/5ToaLt5kICoBXTPjvZgzIi8fVqv7tOkESMDwaRBv
9Dh6JXSzi8teR1p9xtr5uSWLlKnv3GFNDuoTWqZvBjJH08DOOE0YCNBsq4w68m8z
p13ejJMF/+5MlDdeBsbZ2RlEkwUIOn2hkaKZSkWuZui70kb//flSPS+2IyNFOCs=
=s3PO
-----END PGP SIGNATURE-----

--------------enig69DDA0C11535D83CCF2AA240--


From MAILER-DAEMON Mon Jan 23 12:24:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpNcr-0002dt-Go
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 12:24:13 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35393)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpNck-0002da-Eu
	for Autoconf@gnu.org; Mon, 23 Jan 2012 12:24:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpNce-0000xe-I0
	for Autoconf@gnu.org; Mon, 23 Jan 2012 12:24:06 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:33480)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>)
	id 1RpNce-0000xN-8z; Mon, 23 Jan 2012 12:24:00 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id E97CA39E800E;
	Mon, 23 Jan 2012 09:23:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id qZub23ezV9bV; Mon, 23 Jan 2012 09:23:58 -0800 (PST)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1BD5539E800D;
	Mon, 23 Jan 2012 09:23:58 -0800 (PST)
Message-ID: <4F1D97AD.7020107@cs.ucla.edu>
Date: Mon, 23 Jan 2012 09:23:57 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH 2/8] maint: remove empty lines at EOF,
	but excluding modules/*
References: <1326823559-23407-1-git-send-email-jim@meyering.net>
	<4F1ACCFC.7030104@redhat.com> <87ipk5az6h.fsf@rho.meyering.net>
	<3272962.U3UgSdv9iV@linuix> <87r4yt9h66.fsf@rho.meyering.net>
	<4F1D93E7.9010008@redhat.com>
In-Reply-To: <4F1D93E7.9010008@redhat.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: bug-gnulib@gnu.org, Autoconf <Autoconf@gnu.org>,
	Bruno Haible <bruno@clisp.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Jan 2012 17:24:12 -0000

On 01/23/2012 09:07 AM, Eric Blake wrote:
> given our recent push to use '' quoting everywhere,
> should we be ditching INSTALL.ISO and make INSTALL use ''
> quoting?

Yes indeed.  I've been meaning to suggest the same thing.

> Should we be using '@set txicodequotebacktick' or similar
> markup in install.texi in order alter the preferred quoting styles to
> begin with?

That'd cause the output to look worse when run through TeX, no?
I expect it's simpler for now to leave install.texi alone.

In the longer term we need to modify makeinfo so that it quotes
'like this' rather than `like this' when generating plain
text output.  I'll send a request to bug-texinfo@gnu.org.


From MAILER-DAEMON Mon Jan 23 12:54:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpO6E-0000VG-Hm
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 12:54:34 -0500
Received: from eggs.gnu.org ([140.186.70.92]:52046)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RpO67-0000Jy-J1
	for autoconf@gnu.org; Mon, 23 Jan 2012 12:54:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RpO5u-0005y1-9Q
	for autoconf@gnu.org; Mon, 23 Jan 2012 12:54:27 -0500
Received: from qmta11.westchester.pa.mail.comcast.net ([76.96.59.211]:35339)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1RpO5u-0005xr-2v
	for autoconf@gnu.org; Mon, 23 Jan 2012 12:54:14 -0500
Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74])
	by QMTA11.westchester.pa.mail.comcast.net with comcast
	id R3Nr1i0021c6gX85B5uDpS; Mon, 23 Jan 2012 17:54:13 +0000
Received: from office.redhat.com ([24.10.251.25])
	by omta23.westchester.pa.mail.comcast.net with comcast
	id R5u91i01a0ZdyUg3j5uCuW; Mon, 23 Jan 2012 17:54:13 +0000
From: Eric Blake <eblake@redhat.com>
To: autoconf-patches@gnu.org
Subject: [PATCH] INSTALL: convert to '' quoting, drop blank line at end
Date: Mon, 23 Jan 2012 10:54:07 -0700
Message-Id: <1327341247-17073-1-git-send-email-eblake@redhat.com>
X-Mailer: git-send-email 1.7.7.5
In-Reply-To: <4F1D93E7.9010008@redhat.com>
References: <4F1D93E7.9010008@redhat.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 76.96.59.211
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Jan 2012 17:54:33 -0000

This is allowed by recent GNU Coding Standards changes, and
mirrors recent gnulib changes:
https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00267.html
https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00298.html

I've confirmed that after these changes, the INSTALL generated and
installed by autoconf matches the INSTALL.ISO in gnulib.

* Makefile.am ($(srcdir)/INSTALL): Match gnulib INSTALL.ISO.

Signed-off-by: Eric Blake <eblake@redhat.com>
---

I'll push this in another day or so if I don't get any reviews.

 Makefile.am |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7608874..79a8e48 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,13 +39,19 @@ AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split

 if MAKE_CASE_SENSITIVE
 pkgdata_DATA = $(srcdir)/INSTALL
-
 MAINTAINERCLEANFILES = $(srcdir)/INSTALL
+
+# Don't leave blank line at end of file.
+OMIT_TRAILING_EMPTY_LINES = '/^$$/H; /^$$/d; x; s/\n//p; s/\n*//; x'
+# Prefer 'plain quotes' over `makeinfo quotes'.
+CONVERT_QUOTES = "s/\`\([^']*\)'/'\1'/g"
+
 $(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi
 	echo @firstparagraphindent insert			\
 	  | cat - $(top_srcdir)/doc/install.texi > tmp.texi
 	$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)	\
-	  --plaintext -o $@ tmp.texi
+	     --plaintext tmp.texi			 	\
+	  | sed -e $(CONVERT_QUOTES) -e $(OMIT_TRAILING_EMPTY_LINES) > $@
 	rm -f tmp.texi
 endif

-- 
1.7.7.5



From MAILER-DAEMON Mon Jan 23 13:19:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpOUR-0007sU-88
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 13:19:35 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44515)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpOUO-0007pB-Og
	for autoconf@gnu.org; Mon, 23 Jan 2012 13:19:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1RpOUN-0001mC-Nd
	for autoconf@gnu.org; Mon, 23 Jan 2012 13:19:32 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:41195)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>)
	id 1RpOUG-0001jf-IS; Mon, 23 Jan 2012 13:19:24 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 5D19E39E800E;
	Mon, 23 Jan 2012 10:19:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id IcaHOdH4kPbk; Mon, 23 Jan 2012 10:19:22 -0800 (PST)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1295939E8008;
	Mon, 23 Jan 2012 10:19:22 -0800 (PST)
Message-ID: <4F1DA4A9.5040406@cs.ucla.edu>
Date: Mon, 23 Jan 2012 10:19:21 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH] INSTALL: convert to '' quoting, drop blank line at end
References: <4F1D93E7.9010008@redhat.com>
	<1327341247-17073-1-git-send-email-eblake@redhat.com>
In-Reply-To: <1327341247-17073-1-git-send-email-eblake@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf-patches@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: Mon, 23 Jan 2012 18:19:34 -0000

That looks good to me, and thanks.


From MAILER-DAEMON Mon Jan 23 13:22:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpOXR-0000z7-Me
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 13:22:41 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45151)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RpOXN-0000xj-MD
	for autoconf@gnu.org; Mon, 23 Jan 2012 13:22:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RpOXM-0002Cn-Fb
	for autoconf@gnu.org; Mon, 23 Jan 2012 13:22:37 -0500
Received: from mx.meyering.net ([88.168.87.75]:38734)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>)
	id 1RpOXG-0002Bv-IA; Mon, 23 Jan 2012 13:22:30 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id C3E6E60190;
	Mon, 23 Jan 2012 19:22:28 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH] INSTALL: convert to '' quoting, drop blank line at end
In-Reply-To: <1327341247-17073-1-git-send-email-eblake@redhat.com> (Eric
	Blake's message of "Mon, 23 Jan 2012 10:54:07 -0700")
References: <4F1D93E7.9010008@redhat.com>
	<1327341247-17073-1-git-send-email-eblake@redhat.com>
Date: Mon, 23 Jan 2012 19:22:28 +0100
Message-ID: <87obtuwa6z.fsf@rho.meyering.net>
Lines: 52
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: autoconf-patches@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: Mon, 23 Jan 2012 18:22:40 -0000

Eric Blake wrote:
> This is allowed by recent GNU Coding Standards changes, and
> mirrors recent gnulib changes:
> https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00267.html
> https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00298.html
>
> I've confirmed that after these changes, the INSTALL generated and
> installed by autoconf matches the INSTALL.ISO in gnulib.
>
> * Makefile.am ($(srcdir)/INSTALL): Match gnulib INSTALL.ISO.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>
> I'll push this in another day or so if I don't get any reviews.
>
>  Makefile.am |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 7608874..79a8e48 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -39,13 +39,19 @@ AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split
>
>  if MAKE_CASE_SENSITIVE
>  pkgdata_DATA = $(srcdir)/INSTALL
> -
>  MAINTAINERCLEANFILES = $(srcdir)/INSTALL
> +
> +# Don't leave blank line at end of file.
> +OMIT_TRAILING_EMPTY_LINES = '/^$$/H; /^$$/d; x; s/\n//p; s/\n*//; x'
> +# Prefer 'plain quotes' over `makeinfo quotes'.
> +CONVERT_QUOTES = "s/\`\([^']*\)'/'\1'/g"
> +
>  $(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi
>  	echo @firstparagraphindent insert			\
>  	  | cat - $(top_srcdir)/doc/install.texi > tmp.texi
>  	$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)	\
> -	  --plaintext -o $@ tmp.texi
> +	     --plaintext tmp.texi			 	\
> +	  | sed -e $(CONVERT_QUOTES) -e $(OMIT_TRAILING_EMPTY_LINES) > $@

Thanks.  That looks fine except for the fact that the new rule redirects
directly to the target, $@.

Please adjust it to use this idiom instead:

  ... > $@-t && mv $@-t $@

so that if/when the sed somehow fails we're not left with a corrupt
file whose last-modification date suggests it is up-to-date.


From MAILER-DAEMON Mon Jan 23 16:40:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpRcm-00049Q-MW
	for mharc-autoconf@gnu.org; Mon, 23 Jan 2012 16:40:24 -0500
Received: from eggs.gnu.org ([140.186.70.92]:34463)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sebastian.hegler@tu-dresden.de>) id 1RpRbH-0003tR-FV
	for autoconf@gnu.org; Mon, 23 Jan 2012 16:38:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <sebastian.hegler@tu-dresden.de>) id 1RpRbG-0004RE-Ir
	for autoconf@gnu.org; Mon, 23 Jan 2012 16:38:51 -0500
Received: from mailout1.zih.tu-dresden.de ([141.30.67.72]:33457)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sebastian.hegler@tu-dresden.de>) id 1RpRbG-0004Qu-EF
	for autoconf@gnu.org; Mon, 23 Jan 2012 16:38:50 -0500
Received: from mail.zih.tu-dresden.de ([141.76.14.4] helo=server-n)
	by mailout1.zih.tu-dresden.de with esmtp (Exim 4.63)
	(envelope-from <sebastian.hegler@tu-dresden.de>) id 1RpRbD-0006ol-54
	for autoconf@gnu.org; Mon, 23 Jan 2012 22:38:47 +0100
Received: from [172.18.137.212] (unknown [81.253.40.238])
	by server-n (Postfix) with ESMTP id D42BCA3B3B
	for <autoconf@gnu.org>; Mon, 23 Jan 2012 22:38:46 +0100 (CET)
From: Sebastian Hegler <sebastian.hegler@tu-dresden.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: Find out host CPU architecture,
	set definitions in config.h accordingly
Date: Mon, 23 Jan 2012 22:38:45 +0100
Message-Id: <5A712029-A0F1-4EE4-9778-7C6A6B50B691@tu-dresden.de>
To: autoconf@gnu.org
Mime-Version: 1.0 (Apple Message framework v1084)
X-Mailer: Apple Mail (2.1084)
X-TUD-Virus-Scanned: mailout1.zih.tu-dresden.de
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 141.30.67.72
X-Mailman-Approved-At: Mon, 23 Jan 2012 16:40:22 -0500
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Jan 2012 21:38:52 -0000

Hello all,

how do I get the host's CPU architecture family written into some =
definition in "config.h"? Is there a ready-to-use macro around already?

Thanks a lot!

Yours,
Sebastian=


