summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-05-09 22:08:40 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-05-10 18:08:32 +0200
commit5dbb0a7b2a4fd212fc4fee181fc86e778243dac9 (patch)
tree2f96ee268fa50f4a75bb068a654692efd7a666ae /configure.ac
parentMerge pull request #4275 from ton31337/fix/move_outside_bgp_input_modifier (diff)
downloadfrr-5dbb0a7b2a4fd212fc4fee181fc86e778243dac9.tar.xz
frr-5dbb0a7b2a4fd212fc4fee181fc86e778243dac9.zip
build: fix Lua build
Each of Lua's major versions are incompatible with each other. Ubuntu, at least, does not provide a single liblua.so or /usr/include/lua; all SOs and headers are versioned, e.g. liblua5.3.so and /usr/include/lua5.3. There's already an m4 macro in the GNU collection to handle this situation, so let's use that. This allows building with Lua enabled to work on platforms other than Fedora. * Move lib/lua.[ch] -> lib/frrlua.[ch] to prevent path conflicts * Fix configure.ac search for proper CPP and linker flags * Add Lua include path to AM_CPPFLAGS * Update vtysh/extract.pl.in Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 86168a848..b7ddf87b4 100755
--- a/configure.ac
+++ b/configure.ac
@@ -222,9 +222,12 @@ elif test "x${enable_dev_build}" = "xyes"; then
AC_C_FLAG([-O0])
fi
if test "x${enable_lua}" = "xyes"; then
- AC_CHECK_LIB([lua], [lua_newstate],
- [LIBS="$LIBS -llua"])
- AC_DEFINE([HAVE_LUA], [1], [Lua enabled for development])
+ AX_PROG_LUA([5.3])
+ AX_LUA_HEADERS
+ AX_LUA_LIBS([
+ AC_DEFINE([HAVE_LUA], [1], [Have support for Lua interpreter])
+ LIBS="$LIBS $LUA_LIB"
+ ])
fi
else
if test "x${enable_lua}" = "xyes"; then