Re: [sr #111014] autoheader doesn't work with AC_DEFINE_UNQUOTED

2024-01-30 Thread Nick Bowler
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



[sr #111014] autoheader doesn't work with AC_DEFINE_UNQUOTED

2024-01-30 Thread anonymous
URL:
  

 Summary: autoheader doesn't work with AC_DEFINE_UNQUOTED
   Group: Autoconf
   Submitter: None
   Submitted: Wed 31 Jan 2024 02:47:58 AM UTC
Priority: 5 - Unprioritized
Severity: 3 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: h...@openldap.org
 Open/Closed: Open
 Discussion Lock: Any
Operating System: None


___

Follow-up Comments:


---
Date: Wed 31 Jan 2024 02:47:58 AM UTC By: Anonymous
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.








___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/