sorry for the late answer (went offline for a few days!).
I’ve given this a few tries, before writing this answer.
On my Ubuntu 20.04, with Lua 5.3, I’ve tried to build Suri passing different configure values for Lua as command-line options:
./configure --enable-unittests --enable-lua --with-liblua-includes=/usr/include/lua5.3/ --with-liblua-libraries="/usr/lib/x86_64-linux-gnu/liblua5.3.so"
When I try to link Lua library like that, it doesn’t work for me either, meaning that I also get lots of undefined references when I try to build Suri.
I did manage to make it work, though, by editing
configure.ac and replacing all mentions to Lua 5.1 (the default dependency, as per Suri documentation) for Lua 5.3, before running
./configure again. After that, I finally managed to compile Suricata without undefined reference errors.
So, my conclusion is that Suri does support newer versions of Lua (in my case, tested with Ubuntu 20.04 and Lua 5.3), but, as it is hardcoded to expect Lua 5.1, just passing a different version via command-line doesn’t suffice. Unless you manually change the file, it probably won’t work!