lua-users home
lua-l archive

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


There seem to be two ways.

1. The Roberto/Luiz way. There is C code and a simple makefile.
It is easy to modify. E.g. back when I needed a Lua 5.2 version
of lpeg, the following is all that I needed to do:

$ diff makefile makefile-5.2
2c2
< LUADIR = /usr/include/lua5.1/
---
> LUADIR = /usr/local/include

2. The Gnu way. Blow-by-blow example:

lcurses-6$ ls
aclocal.m4    config.sub    INSTALL               m4           README
AUTHORS       configure     install-sh            Makefile.am
ChangeLog     configure.ac  lcurses-6-2.rockspec  Makefile.in
config.guess  COPYING       lcurses.c             missing
config.h.in   depcomp       ltmain.sh             NEWS

To get that to work, the instructions say first "./configure".
That chokes here:

checking Lua version is in range 501 <= v < 502... no
configure: error: in `/usr/local/src/luarocks/lcurses-6-2/lcurses-6':
configure: error: Lua version not in desired range.

The script "configure" has 14380 lines. Grepping for "not in desired range",
one finds a 201-line file m4/ax_lua.m4.  There's a place that one can edit,
not that I have any notion of how the scripting in there works. but it seems
obvious how to add an entry for Lua 5.3. Now "automake".

aclocal.m4:16: warning: this file was generated for autoconf 2.67.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.

OK, so I do that.

lcurses-6$ autoreconf
configure.ac:8: error: required file './compile' not found
configure.ac:8:   'automake --add-missing' can install 'compile'
automake: warnings are treated as errors
/usr/share/automake-1.14/am/ltlibrary.am: warning: 'curses.la':
linking libtool libraries using a non-POSIX
/usr/share/automake-1.14/am/ltlibrary.am: archiver requires
'AM_PROG_AR' in 'configure.ac'
Makefile.am:7:   while processing Libtool library 'curses.la'
autoreconf: automake failed with exit status: 1

This is the point at which even my chutzpah runs out.

So I write to the list, asking why can't people who write Lua packages
do it the way Roberto and Luiz do it. Or just for this problem, won't
somebody to whom the Gnu way is a piece of cake make us a Lua 5.3
rock for lcurses please?