Lua universal binary

Add this post, this one and this comment and you get a Lua universal build for your mac in Leopard - which works for Tiger too! Assuming you uncompressed the source code onto a folder called lua...

In lua/Makefile, add a new target, macosx_ub, to the PLATS definition. It should look like this:


# Convenience platforms targets.
PLATS= aix ansi bsd freebsd generic linux macosx macosx_ub mingw posix solaris

and in lua/src/Makefile add this


macosx_ub:
    $(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch ppc -arch i386" "MYLDFLAGS=-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4"

Then instead of typing make macosx, type make macosx_ub et voilà! You have a universal Lua! :-)