lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> On 9 July 2018 at 22:44, Roberto Ierusalimschy <> wrote:
> >> 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();
> >
> > I did not understand your points here.
> Lets ignore my assumption then:
> Is there a reason that lua isn't configurable by command line defines
> instead of editing luaconf.h?

Several configurations affect the API. So, if you compile Lua with
some options and then compile your code with other options, they will
not match. Moreover, there are many configurations, and a .h file is
more portable than a makefile. But I guess we can add '#if !defined'
around several of them (like LUA_ROOT).

-- Roberto