summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2006-08-16 13:22:39 +0000
committerdeva <deva>2006-08-16 13:22:39 +0000
commit72acb40ac9a477bdfb3f214b642ae6a7929a1dd9 (patch)
treea7683be68c5d9db4b25d2cfc176bb7b36a650663
parent5a00b6f95ebe4d6e487ef96c88d385844541a15b (diff)
Added the lua library.
-rw-r--r--configure.in34
1 files 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)
@@ -127,6 +127,36 @@ 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 <lua.h>
+
+int main(int argc, char *argv[])
+{
+ lua_open();
+ return 0;
+}
+],, AC_MSG_ERROR([*** lib lua not found!]))
+
+dnl ======================
dnl Check for pthread library
dnl ======================
AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR([*** pthread headers not found!]))