1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
diff --git a/config/sc_include.m4 b/config/sc_include.m4
index f6f7873..3befe0e 100644
--- a/config/sc_include.m4
+++ b/config/sc_include.m4
@@ -281,8 +281,7 @@ AC_DEFUN([SC_CHECK_LIBRARIES],
[
SC_REQUIRE_LIB([m], [fabs])
SC_CHECK_LIB([z], [adler32_combine], [ZLIB], [$1])
-SC_CHECK_LIB([lua53 lua5.3 lua52 lua5.2 lua51 lua5.1 lua lua5], [lua_createtable],
- [LUA], [$1])
+SC_CHECK_LIB([$LUA_IMPL], [lua_createtable], [LUA], [$1])
SC_CHECK_BLAS_LAPACK([$1])
SC_BUILTIN_ALL_PREFIX([$1])
SC_CHECK_PTHREAD([$1])
diff --git a/configure.ac b/configure.ac
index ce462e0..b291685 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ echo "o---------------------------------------"
AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/select.h sys/stat.h])
AC_CHECK_HEADERS([linux/videodev2.h])
AC_CHECK_HEADERS([execinfo.h signal.h sys/time.h sys/types.h time.h])
-AC_CHECK_HEADERS([lua.h lua5.1/lua.h lua5.2/lua.h lua5.3/lua.h])
+AC_CHECK_HEADERS([$LUA_IMPL/lua.h])
echo "o---------------------------------------"
echo "| Checking functions"
diff --git a/src/sc_lua.h b/src/sc_lua.h
index 770b52f..a6db175 100644
--- a/src/sc_lua.h
+++ b/src/sc_lua.h
@@ -30,29 +30,9 @@
SC_EXTERN_C_BEGIN;
-#ifdef SC_HAVE_LUA5_3_LUA_H
-#include <lua5.3/lua.h>
-#include <lua5.3/lualib.h>
-#include <lua5.3/lauxlib.h>
-#else
-#ifdef SC_HAVE_LUA5_2_LUA_H
-#include <lua5.2/lua.h>
-#include <lua5.2/lualib.h>
-#include <lua5.2/lauxlib.h>
-#else
-#ifdef SC_HAVE_LUA5_1_LUA_H
-#include <lua5.1/lua.h>
-#include <lua5.1/lualib.h>
-#include <lua5.1/lauxlib.h>
-#else
-#ifdef SC_HAVE_LUA_H
-#include <lua.h>
-#include <lualib.h>
-#include <lauxlib.h>
-#endif
-#endif
-#endif
-#endif
+#include <@LUA_IMPL@/lua.h>
+#include <@LUA_IMPL@/lualib.h>
+#include <@LUA_IMPL@/lauxlib.h>
SC_EXTERN_C_END;
|