[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Build configuration via defines
- From: Daurnimator <quae@...>
- Date: Mon, 9 Jul 2018 13:27:15 +1000
Hi Roberto,
Have you considered allowing (some) things in luaconf.h to be easily
configurable from compiler command line options?
This usually means allowing configuration via `-D` switches.
To make this possible, luaconf.h should only define things if they are
not already defined.
e.g,
Currently there is:
#define LUA_ROOT "/usr/local/"
It would be easier for packaging if this was instead:
#ifndef LUA_ROOT
#define LUA_ROOT "/usr/local/"
#endif
I assume this doesn't occur today as luaconf.h is installed as a
header onto end user systems.
There are some ways around this:
- some of the defines (such as LUA_ROOT) probably don't need to be
available for compiling modules
- for values that do need to exist at runtime, they could be made
available through externs, or some new function
lua_compilation_flags();