patchGNU Autoconf Archive - Patches: patch #10546, commit 1eeb8c "ax_lua.m4: add...

 
 

patch #10546: commit 1eeb8c "ax_lua.m4: add LuaJIT support" breaks configurations not requesting LuaJIT

Submitter:  Diab Jerius <djerius>
Submitted:  Thu 06 Nov 2025 03:29:00 PM UTC
   
 
Priority:  7 - High Status:  None
Assigned to:  None Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Thu 06 Nov 2025 03:29:00 PM UTC, original submission:  

commit 1eeb8c70a6dc8df17825260a22f9d9ee7115735d introduces the use of the LUAJIT automake conditional, and documents it as optional:

#   Optionally a LUAJIT option may be set ahead of time to look for and
#   validate a LuaJIT install instead of PUC Lua. Usage might look like:
#
#     AC_ARG_WITH(luajit, [AS_HELP_STRING([--with-luajit],
#         [Prefer LuaJIT over PUC Lua, even if the latter is newer. Default: no])
#     ])
#     AM_CONDITIONAL([LUAJIT], [test "x$with_luajit" != 'xno'])

However, if LUAJIT is not defined, this causes things to break, for example, with a simple configure.ac:

AC_INIT([foo])
AX_PROG_LUA

running aclocal results in

% aclocal
configure.ac:2: error: AM_COND_IF: no such condition "LUAJIT"
/proj/axaf/ots/x86_64-linux_debian-10/share/aclocal-1.18/cond-if.m4:23: AM_COND_IF is expanded from...
/proj/axaf/ots/share/aclocal/ax_lua.m4:199: AX_PROG_LUA is expanded from...
configure.ac:2: the top level
autom4te: error: /usr/bin/m4 failed with exit status: 1
aclocal: error: autom4te failed with exit status: 1

which breaks existing configurations.

automake documents that

[...] you must arrange for _every_ ‘AM_CONDITIONAL’ to be invoked every time ‘configure’ is run.


which, I believe precludes creating the conditional inside the body of the AX_PROG_LUA macro, as that may be invoked conditionally if Lua is an optional component.

I think the only viable option is to introduce another parameter to the AX_PROG_LUA macro.

Diab Jerius <djerius>

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by djerius (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-a7ba.
    Corresponding source code