From be0ceeaeb5e90be371c64eaf0c70c3339cd565d9 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 12 Sep 2005 22:48:14 +0000 Subject: [PATCH] Attempt to detect if Lua is configured for dynamic library loading. Not quite working yet though. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7434 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- configure.in | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 36873c2da..678f46d05 100644 --- a/configure.in +++ b/configure.in @@ -1503,6 +1503,7 @@ AC_SUBST(CSHARPSO) LUABIN= LUAINCLUDE= LUALIB= +LUADYNAMICLOADLIB= AC_ARG_WITH(lua, AS_HELP_STRING([--without-lua], [Disable Lua]) AS_HELP_STRING([--with-lua=path], [Set location of Lua executable]),[ LUABIN="$withval"], [LUABIN=]) @@ -1521,6 +1522,18 @@ if test -z "$LUABIN"; then AC_PATH_PROG(LUABIN, lua) fi +if test "$LUABIN"; then + AC_MSG_CHECKING(whether Lua dynamic loading is enabled) + # check if dynamic library loading is configured + # detection is not currently working currently + LUADYNAMICLOADLIB=`($LUABIN -e 'assert(loadlib) print ("1")') 2>/dev/null` + if test -z "$LUADYNAMICLOADLIB"; then + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi +fi + # look for the header files AC_MSG_CHECKING(for Lua header files) if test -z "$LUAINCLUDE"; then @@ -1679,7 +1692,7 @@ AC_SUBST(SKIP_MODULA3) SKIP_LUA= # do we really need the LUABIN? -if test -z "$LUABIN" || test -z "$LUAINCLUDE" || test -z "$LUALIB" ; then +if test -z "$LUABIN" || test -z "$LUAINCLUDE" || test -z "$LUALIB" || test -z "$LUADYNAMICLOADLIB"; then SKIP_LUA="1" fi AC_SUBST(SKIP_LUA)