[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoheader 2.66 bug: .in output file.
From: |
Eric Blake |
Subject: |
Re: autoheader 2.66 bug: .in output file. |
Date: |
Tue, 01 Mar 2011 17:18:16 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 03/01/2011 04:57 PM, Van de Bugger wrote:
> autoheader completed without error, so config.h.in should exists...
> Finally I found the cause of the problem. Here is my configure.ac file:
>
> AC_PREREQ([2.66])
> AC_INIT([autoheader-bug], [0.1], address@hidden)
> AM_INIT_AUTOMAKE([ foreign -Wall -Werror ])
> AC_CONFIG_HEADERS([ config.h ])
Thanks for the report. Hmm, the m4 code is using m4_normalize on the
AC_CONFIG_HEADERS argument (so the leading and trailing whitespace is
ignored), but bin/autoheader is going off the --trace for
AC_CONFIG_HEADERS which is before the m4_normalize call has had a chance
to run.
> The problem caused by a space before config.h. autoheader successfully
> created ".in" file (note: it is a hidden file), but automake looks for
> "config.h.in". autoheader incorrectly gets name of the first file:
>
> # We template only the first CONFIG_HEADER.
> $config_h =~ s/ .*//;
You are therefore correct that this is a mismatch between the m4 code
and the autoheader perl script.
>
> Deleting everything starting from the first space is a bad idea.
> Something like this works better:
>
> $config_h =~ s/\A\s*(\S+).*\z/$1/;
Rather than doing something that complex, should we instead change
autoheader to --trace _AC_CONFIG_HEADERS, and have AC_CONFIG_HEADERS map
to _AC_CONFIG_HEADERS(m4_normalize([$1]), m4_shift($@)), at which point
deleting everything after the first space of the traced helper macro is
indeed correct?
At any rate, I agree that something needs to be done. And in the
meantime, your workaround is to avoid the leading spaces.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature