[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CONFIG_HEADERS & AC_CONFIG_FILES combo
From: |
Paolo Bonzini |
Subject: |
Re: AC_CONFIG_HEADERS & AC_CONFIG_FILES combo |
Date: |
Tue, 20 Oct 2009 19:41:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 |
On 10/16/2009 05:49 PM, Sam Steingold wrote:
I have a header file avcall.h which collects the results of autoconf
tests, so it is mentioned in AC_CONFIG_HEADERS.
I also want it to define the package version cpp macro, so I added
#if !defined(LIBFFCALL_VERSION)
# define LIBFFCALL_VERSION @PACKAGE_VERSION@
#endif
to it (there are several such headers, each has these 3 lines).
however, configure did not substitute @address@hidden
thus I added avcall.h to AC_CONFIG_FILES.
Right.
AC_CONFIG_HEADERS has to have a very specific format. You'd do
AC_DEFINE_UNQUOTED([LIBFFCALL_VERSION], ["$PACKAGE_VERSION"],
[Version of libffcall, for avcall.h])
and in avcall.h.in
#ifndef LIBFFCALL_VERSION
#undef LIBFFCALL_VERSION
#endif
but I'm not sure whether autoheader would destroy avcall.h.in, so
Peter's solution is preferred.
Paolo