mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
configure: Adopt for Lua 5.4
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
b330e6d3eb
commit
708f2ca620
53
configure.ac
53
configure.ac
|
@ -375,26 +375,45 @@ fi
|
|||
AM_CONDITIONAL([SCRIPTING], [test "$enable_scripting" = "yes"])
|
||||
|
||||
if test "$enable_scripting" = "yes"; then
|
||||
AX_PROG_LUA([5.3], [5.4], [], [
|
||||
AC_MSG_ERROR([Lua 5.3 is required to build with Lua support. No other version is supported.])
|
||||
AX_PROG_LUA([5.3], [], [], [
|
||||
AC_MSG_ERROR([Lua >= 5.3 is required to build with Lua support. No other version is supported.])
|
||||
])
|
||||
AX_LUA_HEADERS([], [
|
||||
AC_MSG_ERROR([Lua 5.3 headers are required to build with Lua support. No other version is supported.])
|
||||
AC_MSG_ERROR([Lua >= 5.3 headers are required to build with Lua support. No other version is supported.])
|
||||
])
|
||||
PKG_CHECK_MODULES([LUA], [lua5.3], [
|
||||
AC_DEFINE([HAVE_SCRIPTING], [1], [Have support for scripting])
|
||||
LIBS="$LIBS $LUA_LIBS"
|
||||
SCRIPTING=true
|
||||
], [
|
||||
AX_LUA_LIBS([
|
||||
AC_DEFINE([HAVE_SCRIPTING], [1], [Have support for scripting])
|
||||
LIBS="$LIBS $LUA_LIB"
|
||||
SCRIPTING=true
|
||||
], [
|
||||
SCRIPTING=false
|
||||
AC_MSG_ERROR([Lua 5.3 libraries are required to build with Lua support. No other version is supported.])
|
||||
])
|
||||
])
|
||||
|
||||
for version in 5.3 5.4; do
|
||||
PKG_CHECK_MODULES([LUA], [lua >= $version], [
|
||||
AC_DEFINE([HAVE_SCRIPTING], [1], [Have support for scripting])
|
||||
LIBS="$LIBS $LUA_LIBS"
|
||||
SCRIPTING=true
|
||||
break
|
||||
], [
|
||||
PKG_CHECK_MODULES([LUA], [lua$version], [
|
||||
AC_DEFINE([HAVE_SCRIPTING], [1], [Have support for scripting])
|
||||
LIBS="$LIBS $LUA_LIBS"
|
||||
SCRIPTING=true
|
||||
break
|
||||
], [
|
||||
PKG_CHECK_MODULES([LUA], [lua-$version], [
|
||||
AC_DEFINE([HAVE_SCRIPTING], [1], [Have support for scripting])
|
||||
LIBS="$LIBS $LUA_LIBS"
|
||||
SCRIPTING=true
|
||||
break
|
||||
], [])
|
||||
])
|
||||
])
|
||||
done
|
||||
|
||||
if [ "$SCRIPTING" != "true" ]; then
|
||||
AX_LUA_LIBS([
|
||||
AC_DEFINE([HAVE_SCRIPTING], [1], [Have support for scripting])
|
||||
LIBS="$LIBS $LUA_LIB"
|
||||
SCRIPTING=true
|
||||
], [
|
||||
AC_MSG_ERROR([Lua >= 5.3 libraries are required to build with Lua support. No other version is supported.])
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl the following flags go in CFLAGS rather than AC_CFLAGS since they make
|
||||
|
|
Loading…
Reference in a new issue