applied the configure-lua patch to the lua branch

This commit is contained in:
Jan Kneschke 2009-08-13 20:07:02 +02:00
parent 5d222575ef
commit 8470738ff3
2 changed files with 31 additions and 1 deletions

View File

@ -1,4 +1,4 @@
SUBDIRS = include src examples tests
SUBDIRS = include src bindings examples tests
EXTRA_DIST=\
CMakeLists.txt \

View File

@ -108,6 +108,34 @@ AS_IF([test "x$with_valgrind" != xno],
])
AM_CONDITIONAL(USE_VALGRIND, test "x$VALGRIND" != x)
dnl Check for lua
AC_MSG_CHECKING(if with lua)
AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua]),
[WITH_LUA=$withval],[WITH_LUA=no])
if test "$WITH_LUA" != "no"; then
AC_MSG_RESULT($WITH_LUA)
# try pkgconfig
if test "$WITH_LUA" = "yes"; then
LUAPC=lua
else
LUAPC=$WITH_LUA
fi
PKG_CHECK_MODULES(LUA, $LUAPC >= 5.1, [
AC_DEFINE([HAVE_LUA], [1], [liblua])
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
],[
PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, [
AC_DEFINE([HAVE_LUA], [1], [liblua])
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
])
])
AC_SUBST(LUA_CFLAGS)
AC_SUBST(LUA_LIBS)
fi
AC_CONFIG_FILES([
Makefile
include/Makefile
@ -126,6 +154,8 @@ src/os/win32/Makefile
examples/Makefile
src/sigar_version_autoconf.c
tests/Makefile
bindings/Makefile
bindings/lua/Makefile
])
AC_OUTPUT