Skip to content

Commit

Permalink
fixup! fixup! chore(tooling): Backport autoconf-archive 45 ax_lua macros
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Nov 13, 2024
1 parent 0c2e785 commit 25e7cbd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
27 changes: 10 additions & 17 deletions build-aux/ax_lua.m4
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,13 @@

#serial 48


AC_DEFUN([_AX_LUA_ADD_WITH], [AC_ARG_WITH([luajit], [AS_HELP_STRING([--with-luajit-_LJ], [prefer LuaJIT over PUC Lua, even if the latter is newer])])])
AC_DEFUN([_AX_LUA_ASK],[
m4_if([$1], [allow], [
AC_ARG_WITH([luajit], [AS_HELP_STRING([--with-luajit], [prefer LuaJIT over PUC Lua, even if the latter is newer])])
], [$1], [prefer], [
AC_ARG_WITH([luajit], [AS_HELP_STRING([--without-luajit], [prefer PUC Lua over LuaJIT])])
])
])

dnl =========================================================================
dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION],
Expand All @@ -217,16 +222,8 @@ AC_DEFUN([AX_PROG_LUA],
AS_CASE(["m4_default([$5], [never])"],
[never], [with_luajit=no],
[always], [with_luajit=yes],
[allow], [
pushdef([_LJ],[inny])
_AX_LUA_ADD_WITH
popdef([_LJ])
],
[prefer], [
pushdef([_LJ],[outty])
_AX_LUA_ADD_WITH
popdef([_LJ])
])
[allow], [_AX_LUA_ASK($5)],
[prefer], [_AX_LUA_ASK($5)])
AM_CONDITIONAL([LUAJIT], [test "x$with_luajit" == 'xyes'])
dnl Find a Lua interpreter.
Expand Down Expand Up @@ -395,11 +392,7 @@ AC_DEFUN([AX_PROG_LUA],
])

dnl AX_WITH_LUA is now the same thing as AX_PROG_LUA.
AC_DEFUN([AX_WITH_LUA],
[
AC_MSG_WARN([[$0 is deprecated, please use AX_PROG_LUA instead]])
AX_PROG_LUA
])
AU_DEFUN([AX_WITH_LUA], [AX_PROG_LUA], [$0 is deprecated, please use AX_PROG_LUA instead])


dnl =========================================================================
Expand Down
2 changes: 0 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ AM_COND_IF([DEVELOPER_MODE], [
QUE_PROGVAR([typos])
])

echo bob
AX_WITH_PROG([DECASIFY], [decasify], [echo truthy], [echo falsey])
AX_PROG_LUA([5.1], [], [], [], [prefer])
AX_LUA_HEADERS
AX_LUA_LIBS
Expand Down

0 comments on commit 25e7cbd

Please sign in to comment.