scummvm random work
[patches.git] / fillets-ng-use-lua-pkg-config.patch
1 --- configure.in
2 +++ configure.in
3 @@ -36,22 +36,24 @@ dnl Debian, and possibly other systems,
4 LUA_CFLAGS="`[$LUACONFIG --include]`"
5 LUA_LIBS="`[$LUACONFIG --static]`"
6 else dnl ...otherwise, attempt to guess
7 - LUA_CFLAGS=""
8 - LUA_LIBS=""
9 - AC_CHECK_LIB(lua, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua",
10 - [AC_CHECK_LIB(lua50, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua50",
11 - [AC_CHECK_LIB(lua5.0, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua5.0",
12 - [AC_MSG_ERROR([*** Lua5 is required.
13 - Try --with-lua=PREFIX
14 - You can download lua from http://www.lua.org])],
15 - $LUA_LIBS)], $LUA_LIBS)], $LUA_LIBS)
16 -
17 - AC_CHECK_LIB(lualib, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib",
18 - [AC_CHECK_LIB(lualib50, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib50",
19 - [AC_CHECK_LIB(lualib5.0, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib5.0",
20 - [AC_MSG_ERROR([*** Lualib5 is required.
21 - You can download lua from http://www.lua.org])],
22 - $LUA_LIBS)], $LUA_LIBS)], $LUA_LIBS)
23 + PKG_CHECK_MODULES(LUA, lua, [], [
24 + LUA_CFLAGS=""
25 + LUA_LIBS=""
26 + AC_CHECK_LIB(lua, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua",
27 + [AC_CHECK_LIB(lua50, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua50",
28 + [AC_CHECK_LIB(lua5.0, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua5.0",
29 + [AC_MSG_ERROR([*** Lua5 is required.
30 + Try --with-lua=PREFIX
31 + You can download lua from http://www.lua.org])],
32 + $LUA_LIBS)], $LUA_LIBS)], $LUA_LIBS)
33 +
34 + AC_CHECK_LIB(lualib, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib",
35 + [AC_CHECK_LIB(lualib50, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib50",
36 + [AC_CHECK_LIB(lualib5.0, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib5.0",
37 + [AC_MSG_ERROR([*** Lualib5 is required.
38 + You can download lua from http://www.lua.org])],
39 + $LUA_LIBS)], $LUA_LIBS)], $LUA_LIBS)
40 + ])
41 fi
42 fi
43 AC_SUBST(LUA_CFLAGS)