Support building with bundled LuaJIT.

This commit is contained in:
Alexey Kopytov
2016-03-20 01:38:36 +03:00
parent dec6b9b9e3
commit bf94de28f6
7 changed files with 45 additions and 22 deletions

View File

@ -32,11 +32,15 @@ AC_CACHE_CHECK([whether to build with system or bundled LuaJIT],
AC_MSG_RESULT([system])
PKG_CHECK_MODULES([LUAJIT], [luajit])
], [
AC_MSG_RESULT([bunled])
AC_MSG_ERROR([Building with bundled LuaJIT is not yet implemented, use --with-system-luajit])
AC_MSG_RESULT([bundled])
LUAJIT_CFLAGS="-I\$(abs_top_builddir)/third_party/luajit/inc"
LUAJIT_LIBS="\$(abs_top_builddir)/third_party/luajit/lib/libluajit-5.1.a"
])
])
AC_DEFINE_UNQUOTED([SB_WITH_LUAJIT], ["$sb_use_luajit"],
[Whether system or bundled LuaJIT is used])
# Add extra flags when building a 64-bit application on OS X,
# http://luajit.org/install.html
AS_CASE([$host_os:$host_cpu],
@ -45,4 +49,3 @@ AS_CASE([$host_os:$host_cpu],
AC_SUBST([LUAJIT_LDFLAGS])
])