diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-16 15:13:25 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-16 15:37:52 +0300 |
commit | d48e6c8380ebd1f8d4d4f2c80237dc1488da4721 (patch) | |
tree | 004158090fc80b15a620f2c960b0e029cad25835 /configure.ac | |
parent | 23f6917b10b6579f39199e4cf831bb13fc596824 (diff) | |
download | librpm-tizen-d48e6c8380ebd1f8d4d4f2c80237dc1488da4721.tar.gz librpm-tizen-d48e6c8380ebd1f8d4d4f2c80237dc1488da4721.tar.bz2 librpm-tizen-d48e6c8380ebd1f8d4d4f2c80237dc1488da4721.zip |
Start phasing out internal copy of Lua
- don't build internal copy of Lua
- move 3rd party extensions (posix and rexlib) to toplevel luaext/
directory, built by default (unless --without-lua specified)
- auto*foo checks for external Lua
- minimal tweaks to lposix.c and rpmlua.c to get them build with Lua 5.1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index fae5bf65c..d471f3aea 100644 --- a/configure.ac +++ b/configure.ac @@ -803,12 +803,24 @@ WITH_LUA_LIB= WITH_LUA_INCLUDE= AC_ARG_WITH(lua, [ --with-lua build with lua support ],,[with_lua=yes]) AS_IF([test "$with_lua" = yes],[ + AC_CHECK_HEADER([lua.h],[ + AC_CHECK_LIB(lua,[luaL_openlibs],[with_lua=yes],[ + AC_MSG_ERROR([--with-lua given, but liblua not found]) + ], + [-lm]) + ],[ + AC_MSG_ERROR([--with-lua given, but lua.h not found]) + ]) +]) + +AS_IF([test "$with_lua" = yes],[ AC_DEFINE(WITH_LUA, 1, [Build with lua support?]) - WITH_LUA_INCLUDE="-I\${top_srcdir}/lua/include -I\${top_srcdir}/lua/local" - WITH_LUA_LIB="\$(top_builddir)/lua/liblua.la" + WITH_LUA_INCLUDE="-I\${top_srcdir}/luaext" + WITH_LUA_LIB="-llua -lm \$(top_builddir)/luaext/libluaext.la" ]) AC_SUBST(WITH_LUA_LIB) AC_SUBST(WITH_LUA_INCLUDE) +AM_CONDITIONAL(WITH_LUAEXT,[test "$with_lua" = yes]) with_dmalloc=no AC_ARG_WITH(dmalloc, [ --with-dmalloc build with dmalloc debugging support ]) @@ -1060,7 +1072,7 @@ AC_CONFIG_FILES([Makefile misc/Makefile doc/Makefile python/Makefile - lua/Makefile + luaext/Makefile tests/Makefile ]) AC_OUTPUT |