lua-users home
lua-l archive

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

I use Lua in my project.  Currently I treat it more or less like any
other external library (e.g. use autoconf to detect it).

However, since Lua source is so small, I'm thinking it might be nice to
just include the Lua sources as a subdirectory in my source tree, where
the configure script could locate it and compile it for use in cases
where Lua is not installed otherwise.  [In particular, I'm thinking
about windows / cygwin, since generally they seem much less standardized
with regard to user-installed libraries and the like.]

Does anyone have any pointers or hints about "best practice" with regard
to this, or to projects which are already distributed with Lua in this

For instance:

  1) Is it a good idea to include the entire Lua source distribution
     (e.g. "lua-5.1.2/") as a subdirectory, or just include the actual
     Lua source (the "src/" subdir of the Lua distribution).

  2) What's a good way to invoke the Lua Makefile from a
     autoconf/automake built project?  In particular, one conventionally
     specifies a machine-specific target to invoke the Lua Makefile;
     maybe in the case of a hardwired distribution, it's better to just
     use the "posix" target, and always link statically?

  3) If a Lua library is found on the system where the project is being
     built, should I use that, or just always use the Lua version
     included with my project.  [I guess the latter is probably safer,
     but using the system's Lua library might offer some advantages such
     as dynamic linking or more recent/bugfixed versions...]


I don't want to modify the Lua distribution if I can avoid it -- I just
want to drop in the Lua distribution tree (or some subdirectory of it)
verbatim; I imagine I can do this automatically in my "make dist" rule.



Saa, shall we dance?  (from a dance-class advertisement)