mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-13 14:43:09 +00:00
Merge pull request #158 from devurandom/fix/check-lua-compat
Check whether Lua library was compiled with compat support
This commit is contained in:
commit
5aa4d497cb
27
configure.ac
27
configure.ac
@ -68,6 +68,33 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_LIBS="${LIBS}"
|
||||||
|
_CFLAGS="${CFLAGS}"
|
||||||
|
_CPPFLAGS="${CPPFLAGS}"
|
||||||
|
LIBS="${LIBS} ${LUA_LIBS}"
|
||||||
|
CFLAGS="${CFLAGS} ${LUA_CFLAGS}"
|
||||||
|
CPPFLAGS="${CPPFLAGS} ${LUA_CFLAGS}"
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether Lua library was compiled with compat support])
|
||||||
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([
|
||||||
|
#define LUA_COMPAT_ALL
|
||||||
|
#include <lauxlib.h>
|
||||||
|
],[luaL_register(0,0,0);])],
|
||||||
|
[lua_compat_support=yes],
|
||||||
|
[lua_compat_support=no]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT([${lua_compat_support}])
|
||||||
|
|
||||||
|
if test "x${lua_compat_support}" = xno ; then
|
||||||
|
AC_MSG_ERROR([Lua library needs to be compiled with compat support])
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIBS="${_LIBS}"
|
||||||
|
CFLAGS="${_CFLAGS}"
|
||||||
|
CPPFLAGS="${_CPPFLAGS}"
|
||||||
|
unset _LIBS _CFLAGS _CPPFLAGS
|
||||||
|
|
||||||
AX_SUBST_L([LUA_CFLAGS], [LUA_LIBS], [LUA], [LUAC])
|
AX_SUBST_L([LUA_CFLAGS], [LUA_LIBS], [LUA], [LUAC])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user