You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.7 KiB
51 lines
1.7 KiB
4 years ago
|
Prevent automagical detection of Lua, abort if Lua support has been
|
||
|
requested but Lua cannot be found with pkg-config, and use the Lua
|
||
|
pkg-config module set up by the eclass-provided wrapper (or unslotted Lua)
|
||
|
instead of enumerating installed versions.
|
||
|
|
||
|
--- a/auxdir/x_ac_lua.m4
|
||
|
+++ b/auxdir/x_ac_lua.m4
|
||
|
@@ -12,18 +12,21 @@
|
||
|
|
||
|
AC_DEFUN([X_AC_LUA],
|
||
|
[
|
||
|
- x_ac_lua_pkg_name="lua"
|
||
|
- #check for 5.3 then 5.2 then 5.1
|
||
|
- PKG_CHECK_EXISTS([lua5.3], [x_ac_lua_pkg_name=lua5.3],
|
||
|
- [PKG_CHECK_EXISTS([lua-5.3], [x_ac_lua_pkg_name=lua-5.3],
|
||
|
- [PKG_CHECK_EXISTS([lua5.2], [x_ac_lua_pkg_name=lua5.2],
|
||
|
- [PKG_CHECK_EXISTS([lua-5.2], [x_ac_lua_pkg_name=lua-5.2],
|
||
|
- [PKG_CHECK_EXISTS([lua5.1], [x_ac_lua_pkg_name=lua5.1],
|
||
|
- [PKG_CHECK_EXISTS([lua-5.1], [x_ac_lua_pkg_name=lua-5.1],
|
||
|
- [x_ac_lua_pkg_name="lua >= 5.1"])])])])])])
|
||
|
- PKG_CHECK_MODULES([lua], ${x_ac_lua_pkg_name},
|
||
|
- [x_ac_have_lua="yes"],
|
||
|
- [x_ac_have_lua="no"])
|
||
|
+ AC_MSG_CHECKING([whether to enable support for job scripts written in Lua])
|
||
|
+ AC_ARG_ENABLE(
|
||
|
+ [lua],
|
||
|
+ AS_HELP_STRING(--enable-lua, enable support for job scripts written in Lua),
|
||
|
+ [x_ac_enable_lua="$enableval"],
|
||
|
+ [x_ac_enable_lua=yes])
|
||
|
+ AC_MSG_RESULT([$x_ac_enable_lua])
|
||
|
+
|
||
|
+ x_ac_have_lua=no
|
||
|
+ if test "x$x_ac_enable_lua" = "xyes"; then
|
||
|
+ x_ac_lua_pkg_name="lua"
|
||
|
+ PKG_CHECK_MODULES([lua], ${x_ac_lua_pkg_name},
|
||
|
+ [x_ac_have_lua="yes"],
|
||
|
+ [AC_MSG_ERROR([Lua support requested but Lua not found])])
|
||
|
+ fi
|
||
|
|
||
|
if test "x$x_ac_have_lua" = "xyes"; then
|
||
|
saved_CFLAGS="$CFLAGS"
|
||
|
@@ -52,8 +55,6 @@
|
||
|
fi
|
||
|
CFLAGS="$saved_CFLAGS"
|
||
|
LIBS="$saved_LIBS"
|
||
|
- else
|
||
|
- AC_MSG_WARN([unable to locate lua package])
|
||
|
fi
|
||
|
|
||
|
AM_CONDITIONAL(HAVE_LUA, test "x$x_ac_have_lua" = "xyes")
|