[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Detecting Lua version & capabilities within configure
- From: <mark@...>
- Date: Thu, 15 Sep 2005 17:47:42 +0000
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?