autoconf
[Top][All Lists]
Advanced

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

AC_CONFIG_HEADERS & AC_CONFIG_FILES combo


From: Sam Steingold
Subject: AC_CONFIG_HEADERS & AC_CONFIG_FILES combo
Date: Fri, 16 Oct 2009 11:49:47 -0400
User-agent: Thunderbird 2.0.0.22 (X11/20090625)

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.
nothing changed, no warning or error on configure generation.
so I added this to configure.in:

AC_CONFIG_HEADERS([avcall.h],
[sed "s/@PACKAGE_VERSION@/${PACKAGE_VERSION}/" avcall.h > tmp
mv -f tmp avcall.h])

now @PACKAGE_VERSION@ is removed, nothing is inserted.
if I replace " with ' or escape $ with \, I see ${PACKAGE_VERSION} instead of its value in configure.

I am sure this can be fixed with some judicious use of quoting (how?!),
but I am wondering if there is a simpler way around.

Thanks.
Sam.





reply via email to

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