summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--m4/efl_lua.m413
2 files changed, 9 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index caae382707..5f1643778e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3470,7 +3470,7 @@ EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_multisense}], [ecore-audio])
3470EFL_ADD_FEATURE([EDJE], [physics]) 3470EFL_ADD_FEATURE([EDJE], [physics])
3471EFL_ADD_FEATURE([EDJE], [multisense]) 3471EFL_ADD_FEATURE([EDJE], [multisense])
3472 3472
3473EFL_CHECK_LUA_5_1([EDJE]) 3473EFL_CHECK_LUA([EDJE])
3474EFL_ADD_LIBS([EDJE], [-lm]) 3474EFL_ADD_LIBS([EDJE], [-lm])
3475 3475
3476EFL_EVAL_PKGS([EDJE]) 3476EFL_EVAL_PKGS([EDJE])
diff --git a/m4/efl_lua.m4 b/m4/efl_lua.m4
index 61eccf1193..b66ad0c7e8 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}])