Substantial changes to configure script for detecting lua.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10208 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ae42706190
commit
a60c3ca8ca
5 changed files with 37 additions and 55 deletions
|
|
@ -1,6 +1,11 @@
|
||||||
Version 1.3.34 (in progress)
|
Version 1.3.34 (in progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
01/14/2008: mgossage
|
||||||
|
Substantial changes to configure script for detecting lua.
|
||||||
|
Code can now link to liblua.a, liblua50.a or liblua51.a
|
||||||
|
Its also a lot neater now.
|
||||||
|
|
||||||
12/16/2007: wsfulton
|
12/16/2007: wsfulton
|
||||||
[Perl] Backed out #1798728 - numbers can be passed to functions taking char *
|
[Perl] Backed out #1798728 - numbers can be passed to functions taking char *
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -901,8 +901,8 @@ csharp_clean:
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
# lua flags
|
# lua flags
|
||||||
LUA_INCLUDE= @LUAINCLUDE@
|
LUA_INCLUDE= @LUAFLAGS@
|
||||||
LUA_LIB = @LUALIB@ @LUALIBRARY@
|
LUA_LIB = @LUALINK@
|
||||||
|
|
||||||
# Extra specific dynamic linking options
|
# Extra specific dynamic linking options
|
||||||
LUA_DLNK = @LUADYNAMICLINKING@
|
LUA_DLNK = @LUADYNAMICLINKING@
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ a few things of note:
|
||||||
so for the above mentioned return_array_5() would look like
|
so for the above mentioned return_array_5() would look like
|
||||||
arr=return_array_5() -- no parameters passed in
|
arr=return_array_5() -- no parameters passed in
|
||||||
* for INOUT arrays, a table must be passed in, and a new table will be returned
|
* for INOUT arrays, a table must be passed in, and a new table will be returned
|
||||||
(this is consistant with the way that numbers are processed
|
(this is consistant with the way that numbers are processed)
|
||||||
if you want just use
|
if you want just use
|
||||||
arr={...}
|
arr={...}
|
||||||
arr=process_var_array_inout(arr) -- arr is replaced by the new version
|
arr=process_var_array_inout(arr) -- arr is replaced by the new version
|
||||||
|
|
|
||||||
|
|
@ -1024,6 +1024,8 @@ NEW LANGUAGE NOTE:END ************************************************/
|
||||||
* ------------------------------------------------------------ */
|
* ------------------------------------------------------------ */
|
||||||
|
|
||||||
virtual int destructorHandler(Node *n) {
|
virtual int destructorHandler(Node *n) {
|
||||||
|
//have_destructor = 1;
|
||||||
|
//return SWIG_NOWRAP;
|
||||||
current = DESTRUCTOR;
|
current = DESTRUCTOR;
|
||||||
Language::destructorHandler(n);
|
Language::destructorHandler(n);
|
||||||
current = NO_CPP;
|
current = NO_CPP;
|
||||||
|
|
|
||||||
79
configure.in
79
configure.in
|
|
@ -1587,13 +1587,17 @@ LUABIN=
|
||||||
LUAINCLUDE=
|
LUAINCLUDE=
|
||||||
LUALIB=
|
LUALIB=
|
||||||
LUADYNAMICLOADLIB=
|
LUADYNAMICLOADLIB=
|
||||||
|
LUAFLAGS=
|
||||||
|
LUALINK=
|
||||||
|
# note: if LUABIN is empty then lua tests will not be done
|
||||||
|
# LUABIN will be cleared if certain dependencies cannot be found
|
||||||
|
|
||||||
AC_ARG_WITH(lua, AS_HELP_STRING([--without-lua], [Disable Lua])
|
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=yes])
|
AS_HELP_STRING([--with-lua=path], [Set location of Lua executable]),[ LUABIN="$withval"], [LUABIN=yes])
|
||||||
AC_ARG_WITH(luaincl,[ --with-luaincl=path Set location of Lua include directory],[
|
AC_ARG_WITH(luaincl,[ --with-luaincl=path Set location of Lua include directory],[
|
||||||
LUAINCLUDE="$ISYSTEM$withval"], [LUAINCLUDE=])
|
LUAINCLUDE="$withval"], [LUAINCLUDE=])
|
||||||
AC_ARG_WITH(lualib,[ --with-lualib=path Set location of Lua library directory],[
|
AC_ARG_WITH(lualib,[ --with-lualib=path Set location of Lua library directory],[
|
||||||
LUALIB="-L$withval"], [LUALIB=])
|
LUALIB="$withval"], [LUALIB=])
|
||||||
|
|
||||||
# First, check for "--without-lua" or "--with-lua=no".
|
# First, check for "--without-lua" or "--with-lua=no".
|
||||||
if test x"${LUABIN}" = xno -o x"${with_alllang}" = xno ; then
|
if test x"${LUABIN}" = xno -o x"${with_alllang}" = xno ; then
|
||||||
|
|
@ -1618,12 +1622,8 @@ if test "$LUABIN"; then
|
||||||
LUABIN=""
|
LUABIN=""
|
||||||
elif test -z "$LUAV51"; then
|
elif test -z "$LUAV51"; then
|
||||||
AC_MSG_RESULT(Lua 5.0.x)
|
AC_MSG_RESULT(Lua 5.0.x)
|
||||||
# note: different versions of lua use different libs
|
|
||||||
LUALIBRARY="-llua -llualib"
|
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(Lua 5.1 or later)
|
AC_MSG_RESULT(Lua 5.1 or later)
|
||||||
# note: different versions of lua use different libs
|
|
||||||
LUALIBRARY="-llua"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1644,61 +1644,36 @@ if test "$LUABIN"; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# look for the header files
|
# look for the header files & set LUAFLAGS accordingly
|
||||||
AC_MSG_CHECKING(for Lua header files)
|
# will clear LUABIN if not present
|
||||||
if test -z "$LUAINCLUDE"; then
|
if test -n "$LUAINCLUDE"; then
|
||||||
#AC_TRY_CPP([#include <lua.h>], , LUAINCLUDE="")
|
AC_CHECK_FILE($LUAINCLUDE/lua.h,[LUAFLAGS="$ISYSTEM$LUAINCLUDE"],[LUABIN=])
|
||||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <lua.h>]])], , LUAINCLUDE="")
|
|
||||||
if test -z "$LUAINCLUDE"; then
|
|
||||||
dirs="/usr/local/include /usr/include /usr/include/lua* /opt/local/include"
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/lua.h; then
|
|
||||||
AC_MSG_RESULT($i)
|
|
||||||
LUAINCLUDE="$ISYSTEM$i"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test -z "$LUAINCLUDE"; then
|
|
||||||
AC_MSG_RESULT(not found)
|
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT($LUAINCLUDE)
|
AC_CHECK_HEADER(lua.h,[LUAFLAGS=""],[LUABIN=])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# look for the library files
|
# look for the library files & set LUALINK accordingly
|
||||||
AC_MSG_CHECKING(for Lua library)
|
# will clear LUABIN if not present
|
||||||
|
lua_save_LIBS=$LIBS # the code seems to disrupt LIBS, so saving
|
||||||
|
|
||||||
if test -z "$LUALIB"; then
|
if test -z "$LUALIB"; then
|
||||||
dirs="/usr/local/lib /usr/lib /opt/local/lib"
|
AC_SEARCH_LIBS(lua_close, [lua lua51 lua50], [LUALINK="-l$ac_lib"],[LUABIN=])
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/liblua*.a; then
|
|
||||||
AC_MSG_RESULT($i)
|
|
||||||
LUALIB="-L$i"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
if test -z "$LUALIB"; then
|
|
||||||
AC_MSG_RESULT(not found)
|
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT($LUALIB)
|
AC_CHECK_FILE($LUALIB/liblua.a,[LUALINK="-L$LUALIB -llua"],[LUABIN=])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copied from PYTHON code, but I think this is not needed for lua...
|
# adding lualib for lua 5.0
|
||||||
# Cygwin (Windows) needs the library for dynamic linking
|
if test -z "$LUAV51"; then # extra for lua 5.0
|
||||||
#case $host in
|
LUALINK="$LUALINK -llualib"
|
||||||
#*-*-cygwin* | *-*-mingw*) LUADYNAMICLINKING="-L$LUALIB $PYLINK"
|
fi
|
||||||
# PYINCLUDE="-DUSE_DL_IMPORT $PYINCLUDE"
|
|
||||||
# ;;
|
LIBS=$lua_save_LIBS # restore LIBS
|
||||||
#*)LUADYNAMICLINKING="";;
|
|
||||||
#esac
|
|
||||||
|
|
||||||
fi # if not disabled
|
fi # if not disabled
|
||||||
|
|
||||||
AC_SUBST(LUADYNAMICLINKING)
|
AC_SUBST(LUADYNAMICLINKING)
|
||||||
AC_SUBST(LUAINCLUDE)
|
AC_SUBST(LUAFLAGS)
|
||||||
AC_SUBST(LUALIB)
|
AC_SUBST(LUALINK)
|
||||||
AC_SUBST(LUALIBRARY)
|
|
||||||
AC_SUBST(LUABIN)
|
AC_SUBST(LUABIN)
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
|
|
@ -1871,8 +1846,8 @@ SKIP_MODULA3="1" # Always skipped!
|
||||||
AC_SUBST(SKIP_MODULA3)
|
AC_SUBST(SKIP_MODULA3)
|
||||||
|
|
||||||
SKIP_LUA=
|
SKIP_LUA=
|
||||||
# do we really need the LUABIN?
|
# we need LUABIN & dynamic loading
|
||||||
if test -z "$LUABIN" || test -z "$LUAINCLUDE" || test -z "$LUALIB" || test -z "$LUADYNAMICLOADLIB"; then
|
if test -z "$LUABIN" || test -z "$LUADYNAMICLOADLIB"; then
|
||||||
SKIP_LUA="1"
|
SKIP_LUA="1"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(SKIP_LUA)
|
AC_SUBST(SKIP_LUA)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue