On 2024-01-30 21:47, anonymous wrote: > If you use AC_DEFINE_UNQUOTED to define symbols whose names are > expanded from variables, autoheader won't emit them to the template > header file. Later when you run configure, these symbols won't get > defined because the matching define/undef line that is looked for > during substitution doesn't exist.
Autoheader can't possibly know in advance what text some arbitrary shell expansion might contain when the configure script is executed. So, as documented[1], it only works when the first argument to AC_DEFINE_UNQUOTED is a "literal" (essentially, something that looks like it will be unchanged by shell quotation). You can use AH_TEMPLATE[2] to instruct autoheader about any template lines that it should include which are not determined automatically. [1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#autoheader-Invocation [2] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#Autoheader-Macros Hope that helps, Nick