lua-users home
lua-l archive

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

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

How _is_ a good way to do this?

Any suggestions,
Mark Gossage