Lua configure.ac improvements

Use PKG_WIRESHARK_CHECK_SYSTEM_MODULES for consistency with other
system dependencies.

Give slightly more informative configure messages other than multiple
'checking for LUA'.

Check for headers using pkg-config to avoid undefined symbols in
config.h.

Change-Id: I8d3df9ccf6f718d7d055da4f713af60d46d89e33
Reviewed-on: https://code.wireshark.org/review/14173
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
João Valverde 2016-02-26 09:51:57 +00:00 committed by João Valverde
parent f61b5d3203
commit b3d8785ab5
1 changed files with 12 additions and 1 deletions

View File

@ -720,10 +720,21 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
# work reliably (some package names are not searched for).
for pkg in "lua < 5.3" lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua5.0 lua-5.0 lua50
do
PKG_CHECK_MODULES(LUA, $pkg, [have_lua=yes], [true])
AC_MSG_CHECKING(if you have $pkg)
PKG_CHECK_EXISTS($pkg,
[
AC_MSG_RESULT(yes)
have_lua=yes
],
[
AC_MSG_RESULT(no)
])
if test "x$have_lua" = "xyes"
then
PKG_WIRESHARK_CHECK_SYSTEM_MODULES(LUA, $pkg)
CPPFLAGS="$LUA_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS(lua.h lualib.h lauxlib.h)
break
fi
done