Hi,
I can't seem to get Lua compiled into GnuGk on a Debian unless I do something like this:
--- configure.in 2020-01-30 15:41:44.045768411 +0200
+++ ../configure.in 2020-01-30 15:41:40.045902713 +0200
@@ -1235,9 +1235,10 @@
old_LIBS="$LIBS"
for try in /usr/lib /usr/local/lib $lua_lib_dir; do
+ for libname in lua lua5.2; do
if test -d $try; then
CFLAGS="$old_CFLAGS $LUA_INCLUDE"
- LIBS="$old_LIBS -llua -lm"
+ LIBS="$old_LIBS -l$libname -lm"
LDFLAGS="$old_LDFLAGS -L$try"
AC_TRY_LINK([
#include "lua.h"
@@ -1248,7 +1249,7 @@
lua_State * m_lua = luaL_newstate();
luaL_newlib(m_lua, mylib);
],
- [ LUA_LIBS="-llua -lm"
+ [ LUA_LIBS="-l$libname -lm"
LUA_LDFLAGS="-L$try"
],
LUA_LDFLAGS=
@@ -1257,6 +1258,7 @@
break;
fi
fi
+ done
done
CFLAGS="$old_CFLAGS"
LIBS="$old_LIBS"
+++ ../configure.in 2020-01-30 15:41:40.045902713 +0200
@@ -1235,9 +1235,10 @@
old_LIBS="$LIBS"
for try in /usr/lib /usr/local/lib $lua_lib_dir; do
+ for libname in lua lua5.2; do
if test -d $try; then
CFLAGS="$old_CFLAGS $LUA_INCLUDE"
- LIBS="$old_LIBS -llua -lm"
+ LIBS="$old_LIBS -l$libname -lm"
LDFLAGS="$old_LDFLAGS -L$try"
AC_TRY_LINK([
#include "lua.h"
@@ -1248,7 +1249,7 @@
lua_State * m_lua = luaL_newstate();
luaL_newlib(m_lua, mylib);
],
- [ LUA_LIBS="-llua -lm"
+ [ LUA_LIBS="-l$libname -lm"
LUA_LDFLAGS="-L$try"
],
LUA_LDFLAGS=
@@ -1257,6 +1258,7 @@
break;
fi
fi
+ done
done
CFLAGS="$old_CFLAGS"
LIBS="$old_LIBS"
This seems to apply to Debian 9 and 10 at least.
Regards,
Esa
_______________________________________________________ Posting: mailto:gnugk-users@xxxxxxxxxxxxxxx Archive: https://lists.gnugk.org/pipermail/gnugk-users/ Unsubscribe: https://lists.gnugk.org/lists/listinfo/gnugk-users Homepage: https://www.gnugk.org/