aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2015-01-23 07:36:50 -0500
committerJeff Morriss <jeff.morriss.ws@gmail.com>2015-02-04 00:53:29 +0000
commit4fe8ca05767f2a4ec160eae412f5b2fd0ee0903b (patch)
tree5a107c11b091f946ae461314d34180e13951c177 /configure.ac
parent0e74e8b0cc3a02457b05c1afd83fb02ba7255927 (diff)
Simplify how we find Lua and expand the places we look.
First, it appears some packagers actually ship a pkg-config file for Lua. Try to use it. (Unfortunately the package name varies so we have to try several package names.) If that fails, try to find Lua directly, accounting for the various naming conventions we've seen. Bug: 10475 Bug: 10572 Change-Id: I82e789c466a488dc12431cdd90c49b4c1052414a Reviewed-on: https://code.wireshark.org/review/6756 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 12 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index c4d4e966bd..7a7abbce6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2355,8 +2355,6 @@ else
fi
dnl Lua check
-AC_MSG_CHECKING(whether to use liblua for the Lua scripting plugin)
-
AC_ARG_WITH(lua,
AC_HELP_STRING( [--with-lua@<:@=DIR@:>@],
[use liblua (located in directory DIR, if supplied) for the Lua scripting plugin @<:@default=yes, if available@:>@]),
@@ -2369,25 +2367,25 @@ AC_ARG_WITH(lua,
want_lua=yes
else
want_lua=yes
- lua_dir=$withval
+ want_lua_dir=$withval
fi
],[
- #
- # Use liblua by default
- #
+ # By default use Lua if we can find it
want_lua=ifavailable
lua_dir=
])
-if test "x$want_lua" = "xno" ; then
- AC_MSG_RESULT(no)
-else
- AC_MSG_RESULT(yes)
+if test "x$want_lua" != "xno" ; then
AC_WIRESHARK_LIBLUA_CHECK
- if test "x$want_lua" = "xno" ; then
- AC_MSG_RESULT(liblua not found - disabling support for the lua scripting plugin)
+
+ if test "x$want_lua" = "xyes" -a "x$have_lua" = "xno"
+ then
+ AC_MSG_ERROR([Lua support was requested, but is not available])
fi
+ AC_DEFINE(HAVE_LUA, 1, [Define to use Lua])
fi
-AM_CONDITIONAL(HAVE_LIBLUA, test x$want_lua = xyes)
+AM_CONDITIONAL(HAVE_LIBLUA, test x$have_lua = xyes)
+AC_SUBST(LUA_LIBS)
+AC_SUBST(LUA_CFLAGS)
dnl portaudio check
@@ -3197,7 +3195,7 @@ else
zlib_message="yes"
fi
-if test "x$want_lua" = "xyes" ; then
+if test "x$have_lua" = "xyes" ; then
lua_message="yes"
else
lua_message="no"