Lines Matching refs:Lua
14 # Detect a Lua interpreter, optionally specifying a minimum and maximum
15 # version number. Set up important Lua paths, such as the directories in
18 # Also detect Lua headers and libraries. The Lua version contained in the
19 # header is checked to match the Lua interpreter version exactly. When
20 # searching for Lua libraries, the version number is used as a suffix.
21 # This is done with the goal of supporting multiple Lua installs (5.1,
47 # AX_PROG_LUA: Search for the Lua interpreter, and set up important Lua
48 # paths. Adds precious variable LUA, which may contain the path of the Lua
52 # If MINIMUM-VERSION is supplied, then only Lua interpreters with a
54 # TOO-BIG-VERSION is also supplied, then only Lua interpreters with a
58 # The Lua version number, LUA_VERSION, is found from the interpreter, and
64 # luadir Directory to install Lua scripts.
66 # luaexecdir Directory to install Lua modules.
69 # These paths are found based on $prefix, $exec_prefix, Lua's
73 # should work on all reasonable Lua installations. If a path cannot be
84 # If an acceptable Lua interpreter is found, then ACTION-IF-FOUND is
89 # AX_LUA_HEADERS: Search for Lua headers. Requires that AX_PROG_LUA be
91 # may contain Lua specific include flags, e.g. -I/usr/include/lua5.1. If
95 # LUA_INCLUDE can be used by Automake to compile Lua modules or
114 # (Where X.Y is the Lua version number, e.g. 5.1.)
116 # The Lua version number found in the headers is always checked to match
117 # the Lua interpreter's version number. Lua headers with mismatched
125 # AX_LUA_LIBS: Search for Lua libraries. Requires that AX_PROG_LUA be
127 # contain Lua specific linker flags, e.g. -llua5.1. If LUA_LIB is blank,
130 # LUA_LIB can be used by Automake to link Lua modules or executables with
134 # This macro searches for the Lua library. More technically, it searches
197 AC_ARG_VAR([LUA], [The Lua interpreter, e.g. /usr/bin/lua5.1])
199 dnl Find a Lua interpreter.
204 [ dnl No version check is needed. Find any Lua interpreter.
210 [ dnl At least check if this is a Lua interpreter.
211 AC_MSG_CHECKING([if $LUA is a Lua interpreter])
215 AC_MSG_ERROR([not a Lua interpreter])
221 [ dnl Check if this is a Lua interpreter.
222 AC_MSG_CHECKING([if $LUA is a Lua interpreter])
226 AC_MSG_ERROR([not a Lua interpreter])
241 [_ax_check_text="for a Lua interpreter with version >= $1"],
242 [_ax_check_text="for a Lua interpreter with version >= $1, < $2"])
261 m4_default([$4], [AC_MSG_ERROR([cannot find suitable Lua interpreter])])
263 [ dnl Query Lua for its version number.
270 local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)")
274 [AC_MSG_ERROR([invalid Lua version number])])
280 dnl which OS platform Lua thinks this is.
293 dnl Lua provides no way to query the script directory, and instead
319 dnl Lua provides no way to query the module directory, and instead
364 dnl A minimal Lua factorial to prove this is an interpreter. This should work
365 dnl for Lua interpreters version 5.0 and beyond.
387 dnl Check that the Lua version is within the bounds. Only the major and minor
388 dnl version numbers are considered. This should work for Lua interpreters
399 local _, _, trimver = string.find(_VERSION, "^Lua (.*)")
417 dnl Get the script or module directory by querying the Lua interpreter,
423 dnl LUA_CPATH. This is done for compatibility with Lua 5.0.
464 AC_MSG_ERROR([cannot check Lua headers without knowing LUA_VERSION])
468 AC_ARG_VAR([LUA_INCLUDE], [The Lua includes, e.g. -I/usr/include/lua5.1])
496 AC_MSG_CHECKING([for Lua headers in])
523 [ AC_CACHE_CHECK([for Lua header version],
540 $SED -n "s|^Lua \(@<:@0-9@:>@\{1,\}\.@<:@0-9@:>@\{1,\}\).\{0,\}|\1|p"`
547 AC_MSG_CHECKING([if Lua header version matches $LUA_VERSION])
568 [m4_default([$2], [AC_MSG_ERROR([cannot find Lua includes])])])
590 AC_MSG_ERROR([cannot check Lua libs without knowing LUA_VERSION])
594 AC_ARG_VAR([LUA_LIB], [The Lua library, e.g. -llua5.1])
626 dnl Try to find the Lua libs.
648 [m4_default([$2], [AC_MSG_ERROR([cannot find Lua libs])])])