lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I'll try to add LUA support to the next release of ACR ( an autoconf like utility.

to determine the version.. just `lua -v | awk '{ print $2 }'`.

2) determine if support dinamic loading:

if [ -n "`strings /usr/pkg/bin/lua|grep dlopen`" ]; then
  echo "supported"
  echo "not supported"

hope to help

On Thu, 15 Sep 2005 17:47:42 +0000
<> wrote:

> Hello Everyone,
> I am working on (well finished actually), Lua interface for SWIG (Simplified Swapper Interface Generator).
> However I am having problems with the configure file.
> What I need to do:
> 1. Determine which version of Lua is it use (Lua 4.X, Lua 5.0.X, Lua 5.1), so I can set the linker flags correctly.
> 2. Determine if this copy of Lua supports dynamic loading.
> And I need to do all of this within configure (which is a bash script).
> Currently I have some code looking a bit like this, but this doesn't seem to determine the dynamic loading very well.
>    # 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
> How _is_ a good way to do this?
> Any suggestions,
> Mark Gossage