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.

Edited by Petr Špaček
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information