migrate to a standard build system
The current build system is a mess and confuses users. Something standard (autotools? meson? something else?) would be more familiar and could solve some of these issues "for free":
Also something which can gather some parts of C headers for further use in Lua FFI would be useful.