This is probably not the best way. Also, I have not looked at Lua yet; it may need to be built differently than with -DLUA_USE_LINUX.