summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDavid Walter Seikel <won_fang@yahoo.com.au>2013-08-20 18:29:01 +1000
committerDavid Walter Seikel <won_fang@yahoo.com.au>2013-08-20 18:29:01 +1000
commit857fcebbf971acd50286d8e52d362d88e2baae50 (patch)
treef5a03af510b31827dd2a8d9c4778bfe1308c29f0 /m4
parenta7399da8f68dc4ff46aad421350894ea47b92010 (diff)
Check for both Lua 5.1 and 5.2.
Patch inspired by a similar patch from Robert Heller.
Diffstat (limited to 'm4')
-rw-r--r--m4/efl_lua.m413
1 files changed, 8 insertions, 5 deletions
diff --git a/m4/efl_lua.m4 b/m4/efl_lua.m4
index 61eccf1..b66ad0c 100644
--- a/m4/efl_lua.m4
+++ b/m4/efl_lua.m4
@@ -1,14 +1,17 @@
1dnl EFL_CHECK_LUA_5_1(EFL) 1dnl EFL_CHECK_LUA(EFL)
2dnl checks for lua5.1 in pkg-config (multiple names) and -llua directly 2dnl checks for lua 5.1 or 5.2 in pkg-config (multiple names) and -llua directly
3dnl will call EFL_ADD_LIBS() or EFL_DEPEND_PKG() as required. 3dnl will call EFL_ADD_LIBS() or EFL_DEPEND_PKG() as required.
4dnl this is a strict call and will abort if lua is not found 4dnl this is a strict call and will abort if lua is not found
5AC_DEFUN([EFL_CHECK_LUA_5_1], 5AC_DEFUN([EFL_CHECK_LUA],
6[dnl 6[dnl
7requirement_lua="" 7requirement_lua=""
8PKG_CHECK_EXISTS([lua >= 5.1.0], [requirement_lua="lua >= 5.1.0"], 8PKG_CHECK_EXISTS([lua >= 5.1.0], [requirement_lua="lua >= 5.1.0"],
9 [PKG_CHECK_EXISTS([lua5.1 >= 5.1.0], [requirement_lua="lua5.1 >= 5.1.0"], 9 [PKG_CHECK_EXISTS([lua5.1 >= 5.1.0], [requirement_lua="lua5.1 >= 5.1.0"],
10 [PKG_CHECK_EXISTS([lua-5.1 >= 5.1.0], [requirement_lua="lua-5.1 >= 5.1.0"], 10 [PKG_CHECK_EXISTS([lua-5.1 >= 5.1.0], [requirement_lua="lua-5.1 >= 5.1.0"],
11 [PKG_CHECK_EXISTS([lua51 >= 5.1.0], [requirement_lua="lua51 >= 5.1.0"])])])]) 11 [PKG_CHECK_EXISTS([lua51 >= 5.1.0], [requirement_lua="lua51 >= 5.1.0"],
12 [PKG_CHECK_EXISTS([lua5.2 >= 5.2.0], [requirement_lua="lua5.2 >= 5.2.0"],
13 [PKG_CHECK_EXISTS([lua-5.2 >= 5.2.0], [requirement_lua="lua-5.2 >= 5.2.0"],
14 [PKG_CHECK_EXISTS([lua52 >= 5.2.0], [requirement_lua="lua52 >= 5.2.0"])])])])])])])
12 15
13if test "x${requirement_lua}" = "x"; then 16if test "x${requirement_lua}" = "x"; then
14 AC_MSG_CHECKING([whether lua_newstate() is in liblua]) 17 AC_MSG_CHECKING([whether lua_newstate() is in liblua])
@@ -18,7 +21,7 @@ if test "x${requirement_lua}" = "x"; then
18 [have_lua="no"]) 21 [have_lua="no"])
19 AC_MSG_RESULT([${have_lua}]) 22 AC_MSG_RESULT([${have_lua}])
20 if test "${have_lua}" = "no"; then 23 if test "${have_lua}" = "no"; then
21 AC_MSG_ERROR([Missing lua 5.1 support]) 24 AC_MSG_ERROR([Missing lua 5.1 or 5.2 support])
22 fi 25 fi
23else 26else
24 EFL_DEPEND_PKG([$1], [LUA], [${requirement_lua}]) 27 EFL_DEPEND_PKG([$1], [LUA], [${requirement_lua}])