aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2017-12-02 17:42:16 -0500
committerAnders Broman <a.broman58@gmail.com>2017-12-14 06:05:36 +0000
commit11ccd830685e4037c3cce04a3dbfd2d05a5145f7 (patch)
tree231f60e876d06e44427d6b6ceaea57e33db43752
parenta9f50164298d641be3d107261e8ec1166a6fcf2a (diff)
Fix detection of Lua when there's no pkgconfig file.
Linking with liblua requires libdl on Linux; if the test link with liblua fails try including libdl. Fixes the problem reported in: https://www.wireshark.org/lists/wireshark-dev/201711/msg00102.html Change-Id: I8561f15f8d9adbab52d668d102811fb821b45034 Reviewed-on: https://code.wireshark.org/review/24678 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--acinclude.m413
1 files changed, 12 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index f0591bd..c53ac7c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -704,7 +704,18 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
LUA_LIBS="-L$lua_dir/lib $ac_cv_search_luaL_openlibs -lm"
have_lua=yes
],[
- have_lua=no
+ # Try again with -ldl
+
+ # Tell autoconf we don't want to use the cached result
+ unset ac_cv_search_luaL_openlibs
+
+ AC_SEARCH_LIBS(luaL_openlibs, [lua-${lua_ver} lua${lua_ver} lua],
+ [
+ LUA_LIBS="-L$lua_dir/lib $ac_cv_search_luaL_openlibs -lm -ldl"
+ have_lua=yes
+ ],[
+ have_lua=no
+ ], -lm -ldl)
], -lm)
fi
fi