lua libs might not be -llua, use lua-config
While trying to compile lighttpd-1.4.0 with lua on Debian 3.1 I stumbled over the fact, that Debian has liblua40, and liblua50, but not liblua. lua-config(1) helps to determine how to compile and link programs against lua. I hope, that this works not just with Debian. I will attach a patch to this ticket changing configure.in to use lua-config to define LUA_LIB and LUA_CFLAGS, and src/Makefile.am to make use of these.
Also available in: Atom