aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorBalint Reczey <balint.reczey@ericsson.com>2008-11-18 14:55:01 +0000
committerBalint Reczey <balint.reczey@ericsson.com>2008-11-18 14:55:01 +0000
commit2b90b483f5ce4ae8004c43115ade41e8614655cc (patch)
treee6254f015803a26918d0574612013e2b3b96b162 /acinclude.m4
parent5498ec1dcef371777edff1cec4035b4019466cec (diff)
Require Lua 5.1 for Lua plugin.
This fixes bug 2510. svn path=/trunk/; revision=26805
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m455
1 files changed, 5 insertions, 50 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 794ed097f7..43c1761197 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -902,8 +902,11 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
# against libm.
LIBS="$LIBS $LUA_LIBS -lm"
- AC_CHECK_LIB(lua, lua_call,
+ AC_CHECK_LIB(lua, luaL_register,
[
+ #
+ # Lua 5.1 found
+ #
if test "x$lua_dir" != "x"
then
#
@@ -917,56 +920,8 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
LUA_LIBS="-llua -lm"
LUA_INCLUDES=""
fi
+ AC_DEFINE(HAVE_LUA_5_1, 1, [Define to use Lua 5.1])
- #
- # we got lua, now look for lualib
- #
- AC_CHECK_LIB(lualib, luaL_openlib,
- [
- #
- # we have 5.0
- #
- LUA_LIBS="$LUA_LIBS -llualib"
- ],[
- #
- # no lualib, in 5.1 there's only liblua
- # do we have 5.1?
- #
-
- LIBS="$wireshark_save_LIBS $LUA_LIBS"
-
- AC_CHECK_LIB(lua, luaL_register,
- [
- #
- # Lua 5.1 found
- #
- AC_DEFINE(HAVE_LUA_5_1, 1, [Define to use Lua 5.1])
- ],[
- #
- # No, it is not 5.1
- #
- if test "x$lua_dir" != "x"
- then
- #
- # Restore the versions of CFLAGS, CPPFLAGS,
- # LDFLAGS, and LIBS before we added the
- # "--with-lua=" directory, as we didn't
- # actually find lua there.
- #
- CFLAGS="$wireshark_save_CFLAGS"
- CPPFLAGS="$wireshark_save_CPPFLAGS"
- LDFLAGS="$wireshark_save_LDFLAGS"
- LIBS="$wireshark_save_LIBS"
- LUA_LIBS=""
- fi
- # User requested --with-lua but it isn't available
- if test "x$want_lua" = "xyes"
- then
- AC_MSG_ERROR(Linking with liblualib failed.)
- fi
- want_lua=no
- ])
- ])
],[
#
# We could not find the libs, maybe we have version number in the lib name