AC_CONFIG_HEADERS & AC_CONFIG_FILES combo

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

 



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



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

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux