bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

autoheader 2.66 bug: .in output file.


From: Van de Bugger
Subject: autoheader 2.66 bug: .in output file.
Date: Wed, 02 Mar 2011 02:57:37 +0300

Hi,

I am a newbie in autoconf, just trying to create my first project using
the tools. Spent a lot of time understanding why autoreconf finishes
with error:

> autoreconf: Entering directory `.'
> autoreconf: configure.ac: not using Gettext
> autoreconf: running: aclocal
> autoreconf: configure.ac: tracing
> autoreconf: configure.ac: not using Libtool
> autoreconf: running: /usr/bin/autoconf
> autoreconf: running: /usr/bin/autoheader
> autoreconf: running: automake --add-missing --no-force
> configure.ac:3: installing `./install-sh'
> configure.ac:3: installing `./missing'
> configure.ac:4: required file `config.h.in' not found
> autoreconf: automake failed with exit status: 1

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 ])
AC_CONFIG_FILES([ Makefile ])
AC_OUTPUT

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/ .*//;

Deleting everything starting from the first space is a bad idea.
Something like this works better:

$config_h =~ s/\A\s*(\S+).*\z/$1/;

See all the files in the attached archive. It includes configure.ac,
Makefile.am, two scripts (to run autoreconf and clean the directory),
and autoreconf output.

I run it on Fedora Linux 14 (x86_64), autoheader (GNU Autoconf) 2.66
(autoconf-2.66-2.fc14.noarch).

--Van

Attachment: autoheader-bug.tgz
Description: application/compressed-tar


reply via email to

[Prev in Thread] Current Thread [Next in Thread]