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], [bug-autoconf@gnu.org]) > 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 ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature