> > BTW, Is Lua-5.1 meant to call the shared library
> liblua.so as indicated
> > in configure.in or liblua5.1.so as it really is
> called in Ubuntu?
> I brought this up a month or so ago, and it seems the "5.1" is added
> the Debian/Ubuntu packaging to allow parallel installation of different
> Lua versions.
There seems to be variation on the lua library naming. My FC5 box has liblua.a liblua.so and liblua-5.1.so
To top it off, the mingw build luake to just build lua51.dll and no lib files.
I have managed to get some of the code working to spot all the various files.
AC_MSG_CHECKING(for Lua library)
if test -z "$LUALIB"; then
dirs="/usr/local/lib /usr/lib /opt/local/lib"
for i in $dirs ; do
if test -r $i/liblua*.a -o -r $i/liblua*.so -o -r $i/lua*.dll; then
Can someone advise me on a readonable method to get the configure script looking for liblua.a liblua.so liblua5.1.a and so on.
On 2007-12-10, mark gossage <mark@...> wrote:
> dirs="/usr/local/lib /usr/lib /opt/local/lib"
> for i in $dirs ; do
> if test -r $i/liblua*.a -o -r $i/liblua*.so -o -r $i/lua*.dll; then
This fails if any of the globs expand to multiple filenames - e.g. I
have /usr/lib/liblua50.so and /usr/lib/liblua51.so.
Also, it's bad to hard code the list of directories to be searched
like this. Unix-like OSes generally have a way for the admin to specify
that, for example on Linux, that's specified by /etc/ld.so.conf.
And not all Unix-like OSes use ".so" for shared libraries (e.g OS X and
> Can someone advise me on a readonable method to get the configure
> script looking for liblua.a liblua.so liblua5.1.a and so on.
I'd suggest using AC_TRY_LINK() against some preferred version ordering
- e.g. lua51 lua50 lua.
I'm happy to write a test for this, but it may take me a few weeks to
get around to it.