lua-users home
lua-l archive

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

> The only thing I (still) have against it, is that the lua_conf.h file
> should imho be located elsewhere, separate from the source files.

An important reason for making the configuration a header file included by
lua.h is to ensure consistency. (Another reason is that it's easier to
edit and is more flexible than an include file for a Makefile. Yet another
is to separate core configuration from build configuration.)

Consistency means that when you compile and link your application against
a Lua installation you'll get consistent settings, such as the type of Lua
number and such. Up to now, it's pretty easy to install Lua say with floats
but fail to compile your application with the same settings, thus shooting
yourself in the foot.

luaconf.h is supposed to be edited or replaced before building Lua. No
big deal. If you have special needs for Lua, you should rebuild Lua with
your own luaconf.h, not rely on an existing Lua installation. On the other
hand, if you want to use an existing Lua installation, then the installed
luaconf.h will give all the information you need. Finally, if you only
need to add things *and* know what you're doing, you can simply define
LUA_USER_H to your own header file. (You don't want to redefine LUA_NUMBER
for instance.)