lua-users home
lua-l archive

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


On 2/17/06, Gavin Kistner <gavin@refinery.com> wrote:
> I've got the latest version of MacOS X with dev tools installed, and
> Lua 5.1 final, and I'd like to get it built with readline support. I
> previously built GNU readline 5.0 (to get Ruby's irb to compile with
> readline).
<snip>
> Help, please :)

open up src/Makefile, and comment out  the the line that looks like this:
$(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
and uncomment 2 lines below it that look like this:
#	$(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE"
MYLIBS="-lreadline"

It's pretty easy :)

For extra points, use this to build a universal binary:
$(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
MYLIBS="-lreadline"
MYLDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc
-arch i386"

-gus