This script modifies the Haserl 0.9.29 distribution so it works with LuaJIT 2.0 as well as Lua 5.1. The script takes a single argument that is the path to a LuaJIT / Lua distribution directory in which library and executable files have been built. A typical usage is
./build-haserl-luajit.sh /usr/local/src/LuaJIT-2.0.0/
The script patches configure.ac, builds Haserl, and executes a CGI script to verify that LuaJIT / Lua is working within Haserl.
The LuaJIT distribution builds both .so and .a libraries; this script always uses the .a library so the Haserl executable contains an embedded copy of LuaJIT. If you prefer to link dynamically to LuaJIT, modify the script to change
[ LIBS="-Wl,-Bstatic -l$LUALIB -Wl,-Bdynamic $LIBS" ]