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 @package_vers...@.
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


_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to