summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2014-01-08 16:34:24 +0000
committerKinsey Moore <kmoore@digium.com>2014-01-08 16:34:24 +0000
commit537f4a9dacc066893dad17a8a96c450de48abbdb (patch)
treeec14ea88c330d9b0f7ef967d139c24c1f5944b34 /configure.ac
parent522593f901baff3f1ba334ecaad9eefd6a9c9316 (diff)
pbx_lua: Add support for Lua 5.2
This adds support for Lua 5.2 in pbx_lua which is available on newer operating systems. (closes issue ASTERISK-23011) Review: https://reviewboard.asterisk.org/r/3075/ Reported by: George Joseph Patch by: George Joseph ........ Merged revisions 405090 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 405091 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 405124 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ae5ddea09..fb14b2936 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2113,6 +2113,15 @@ if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
[${PWLIB_INCLUDE}], [${PWLIB_LIB}])
fi
+AST_EXT_LIB_CHECK([LUA], [lua5.2], [luaL_newstate], [lua5.2/lua.h], [-lm])
+if test "x${PBX_LUA}" = "x1" ; then
+ if test x"${LUA_DIR}" = x; then
+ LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.2"
+ else
+ LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.2"
+ fi
+fi
+
AST_EXT_LIB_CHECK([LUA], [lua5.1], [luaL_newstate], [lua5.1/lua.h], [-lm])
if test "x${PBX_LUA}" = "x1" ; then
if test x"${LUA_DIR}" = x; then
@@ -2123,7 +2132,7 @@ if test "x${PBX_LUA}" = "x1" ; then
fi
# Some distributions (like SuSE) remove the 5.1 suffix.
-AST_EXT_LIB_CHECK([LUA], [lua], [luaL_register], [lua.h], [-lm])
+AST_EXT_LIB_CHECK([LUA], [lua], [luaL_openlib], [lua.h], [-lm])
AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])