From 72acb40ac9a477bdfb3f214b642ae6a7929a1dd9 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 16 Aug 2006 13:22:39 +0000 Subject: Added the lua library. --- configure.in | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index cc4e9a7..72b8b96 100644 --- a/configure.in +++ b/configure.in @@ -36,7 +36,7 @@ if test x$with_debug == xyes; then fi AC_ARG_WITH(client, [ --without-client Build without client support]) -if test x$with_client != xno && test -z "$CLIENT"; then +if test x$with_client != xno; then CLIENT_DIR=client AC_SUBST(CLIENT_DIR) @@ -91,7 +91,7 @@ else fi AC_ARG_WITH(server, [ --without-server Build without server support]) -if test x$with_server != xno && test -z "$SERVER"; then +if test x$with_server != xno; then SERVER_DIR=server AC_SUBST(SERVER_DIR) @@ -126,6 +126,36 @@ dnl Check for getopt dnl ====================== AC_HAVE_HEADERS(getopt.h) +dnl ====================== +dnl Check for the lua library +dnl ====================== +AC_ARG_WITH(luadir, [ --with-luadir=DIR The prefix to where LUA 5.1 is installed], + LDFLAGS="${LDFLAGS} -L${withval}/lib" + LIBS="${LIBS} -llua -lm" + CFLAGS="${CFLAGS} -I${withval}/include" + CXXFLAGS="${CXXFLAGS} -I${withval}/include" + CPPFLAGS="${CPPFLAGS} -I${withval}/include" +) +AC_SUBST(CFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(LIBS) +AC_CHECK_HEADER(lua.h, , AC_MSG_ERROR([*** lua headers not found!])) +AC_CHECK_HEADER(lualib.h, , AC_MSG_ERROR([*** lualib header not found!])) +AC_CHECK_HEADER(lauxlib.h, , AC_MSG_ERROR([*** lauxlib header not found!])) +#AC_CHECK_LIB(lua, lua_open, , AC_MSG_ERROR([*** lib lua not found!])) +AC_MSG_CHECKING([for lua_open in -llua]) +AC_TRY_RUN([ +#include + +int main(int argc, char *argv[]) +{ + lua_open(); + return 0; +} +],, AC_MSG_ERROR([*** lib lua not found!])) + dnl ====================== dnl Check for pthread library dnl ====================== -- cgit v1.2.3