diff options
| author | Enji Cooper <ngie@FreeBSD.org> | 2026-08-31 03:19:45 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2026-08-31 03:19:48 +0000 |
| commit | 447d4fe61d8bf55ffa21698ecee0ac51010a9a0f (patch) | |
| tree | 86241b1cad9167b79da5b3335d70d9e22cb8f939 /m4/lua.m4 | |
| parent | 4b2c3eb9d49a797f91eee2be4e41cacb3b8167e7 (diff) | |
vendor/lutok: import 0.6.2vendor/lutok/0.6.2vendor/lutok
This version contains several minor changes related to documentation and
new C++ standards conformance (C++-20+ is now required to build the
project).
This change also uses the version from the official release tarball whereas
the prior imported version (0.4) was committed directly from a git clone.
Obtained from: https://github.com/freebsd/lutok/releases/tag/lutok-0.6.2
Diffstat (limited to 'm4/lua.m4')
| -rw-r--r-- | m4/lua.m4 | 49 |
1 files changed, 20 insertions, 29 deletions
diff --git a/m4/lua.m4 b/m4/lua.m4 index 0d075c576210..3f1aed0a43db 100644 --- a/m4/lua.m4 +++ b/m4/lua.m4 @@ -33,37 +33,28 @@ dnl Helper macro to detect Lua in a variety of systems. dnl AC_DEFUN([KYUA_LUA], [ lua_found=no - - for lua_release in 5.2 5.1; do - if test "${lua_found}" = no; then - PKG_CHECK_MODULES([LUA], [lua${lua_release} >= ${lua_release}], - [lua_found=yes], [true]) - fi - if test "${lua_found}" = no; then - PKG_CHECK_MODULES([LUA], [lua-${lua_release} >= ${lua_release}], - [lua_found=yes], [true]) - fi - if test "${lua_found}" = no; then - PKG_CHECK_MODULES([LUA], [lua >= ${lua_release}], - [lua_found=yes], [true]) + for lua_release in ${LUA_VERSION:-5.4 5.3}; do + PKG_CHECK_MODULES([LUA], [lua-${lua_release} >= ${lua_release}], + [lua_found="lua-${lua_release}"],[ + PKG_CHECK_MODULES([LUA], [lua${lua_release} >= ${lua_release}], + [lua_found="lua${lua_release}"],[ + PKG_CHECK_MODULES([LUA], [lua >= ${lua_release}], + [lua_found="lua"],[]) + ])]) + if test "${lua_found}" != no; then + break fi - - test "${lua_found}" = no || break done - if test "${lua_found}" = no; then - AC_PATH_PROGS([LUA_CONFIG], [lua-config], [unset]) - if test "${LUA_CONFIG}" != unset; then - AC_SUBST([LUA_CFLAGS], [$(${LUA_CONFIG} --include)]) - AC_SUBST([LUA_LIBS], [$(${LUA_CONFIG} --libs)]) - lua_found=yes - fi - fi + AS_IF([test "${lua_found}" = no],[],[ + AC_SUBST([LUA_CFLAGS], [$(${PKG_CONFIG} --cflags ${lua_found})]) + AC_SUBST([LUA_LIBS], [$(${PKG_CONFIG} --libs ${lua_found})]) + ]) - if test "${lua_found}" = no; then - AC_MSG_ERROR([lua (5.1 or newer) is required]) - else - AC_MSG_NOTICE([using LUA_CFLAGS = ${LUA_CFLAGS}]) - AC_MSG_NOTICE([using LUA_LIBS = ${LUA_LIBS}]) - fi + AS_IF([test "${lua_found}" = no], + [AC_MSG_ERROR([lua (5.3 or newer) is required])], + [ +AC_MSG_NOTICE([using LUA_CFLAGS = ${LUA_CFLAGS}]) +AC_MSG_NOTICE([using LUA_LIBS = ${LUA_LIBS}]) + ]) ]) |
