diff options
author | deva <deva> | 2006-08-16 13:57:10 +0000 |
---|---|---|
committer | deva <deva> | 2006-08-16 13:57:10 +0000 |
commit | de810b12050f2d0eb80cdd0d95de51c631cb0fe8 (patch) | |
tree | 59767903ac5e7613e84665f13e2d0a4e1ecc8806 | |
parent | cf12fc537ae68ff27e300306b98addb232c2c7a3 (diff) |
Fixed some problems on Fedora Core 5
-rw-r--r-- | configure.in | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/configure.in b/configure.in index 72b8b96..6c78153 100644 --- a/configure.in +++ b/configure.in @@ -129,13 +129,18 @@ AC_HAVE_HEADERS(getopt.h) dnl ====================== dnl Check for the lua library dnl ====================== +LUADIR="/usr" + 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" + LUADIR=${withval} ) + +LDFLAGS="${LDFLAGS} -L${LUADIR}/lib" +LIBS="${LIBS} -llua -lm -ldl" +CFLAGS="${CFLAGS} -I${LUADIR}/include" +CXXFLAGS="${CXXFLAGS} -I${LUADIR}/include" +CPPFLAGS="${CPPFLAGS} -I${LUADIR}/include" + AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(CPPFLAGS) @@ -144,17 +149,16 @@ 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_MSG_CHECKING([for lua_open in -llua using LUADIR=${LUADIR}]) AC_TRY_RUN([ -#include <lua.h> - -int main(int argc, char *argv[]) -{ - lua_open(); - return 0; -} -],, AC_MSG_ERROR([*** lib lua not found!])) + #include <lua.h> + + int main(int argc, char *argv[]) + { + lua_open(); + return 0; + } +],AC_MSG_RESULT([yes]), AC_MSG_ERROR([*** lib lua not found!]) ) dnl ====================== dnl Check for pthread library |