rds :: graphikos

[ home | photos | gallery | scheme | notes | blog | facebook | twitter | youtube | last.fm | myspace | del.icio.us | EverythingHerePlus ]

Kawa Scheme System on Macintosh OS X 10.1

Also on This Site
Kawa and Kawa-Mac Resources
Kawa Scheme System on Macintosh OS X Current
Kawa Scheme System on Macintosh OS X 10.1
Kawa Scheme System on Macintosh OS Classic
Kawa Notes, Downloads, Caveats
Running Kawa in Emacs

Enough of this information changed that it wasn't worth keeping a single page delineating the new and old information. For Kawa usage with current Mac OS X releases see Kawa Scheme System on Macintosh OS X Current. This page remains for historical purposes and may contain broken links.

Mac OS X Instructions

Per Bothner's Kawa Scheme: a Scheme interpreter written in the Java with bindings to the Java language. The system allows compilation of Scheme code directly to Java Bytecodes. Although initial releases of MacOSX could sometimes build and run earlier version of Kawa, the compiler support and especially the JDK and JVM prior to version 10.1 were terribly buggy and to all intents and purposes, unusable. With the release of MacOSX 10.1 and the accompanying developer tools package, MacOSX is now a great Kawa platform. Since MacOSX is essentially another Unix-like system, this document will not duplicate the instructions in the Kawa Manual. However, if you are entirely new to Unix development you can contact me with questions.

Contents
Software Requirements
Building, Installation and Runtime
MRJAppBuilder
Emacs
References

Software Requirements

All versions listed are current of this sections's last revision on 11/02/2001.

Apple Java software
MacOSX 10.1 with the BSD Subsystem installed.
MacOSX 10.1 Developer Tools from CDROM or join the free ADC Online program to download the package.
Kawa Java software
See Getting Kawa page for instructions on getting Kawa, and the various distribution methods.

Building, Installation and Runtime

Configure

Beginning 2002-02-20, Per's inclusion of newer config.sub, config.guess files eliminates the need to specify --host=powerpc-apple-macos at configure. The instruction remains for those working with older versions of Kawa or working back in CVS. However, for current versions do not use the 'host' flag at configure as autoconf will get more information correct without it. To see a listing of all the flags available at configure, type ./configure --help | less at the prompt.

If you are using the binary distribution see the instructions Installing and using the binary distribution.

The Kawa Manual sections Building and installing Kawa contains full instructions. The only difference in configuration for versions prior to 2002-02-20 is that autoconf provides powerpc-apple-darwin1.4 as the host system type causing configure to fail. For Kawa versions prior to 2002-02-20 this is easily fixed and any of the following flags will work. Versions after 2002-02-20 do not require the 'host' flag.

./configure --host=powerpc-apple-macos
	# base kawa
./configure --host=powerpc-apple-macos --with-swing
	# base kawa with swing, recommended and needed for MRJAppBuilder or Marco Vezzoli's window examples
./configure --host=powerpc-apple-macos --with-swing --with-java-collections
	# another example, type ./configure --help to see a full list of configure options

Installation

If you are using the binary distribution see the instructions Installing and using the binary distribution.

After make finishes, it is strongly recommended that you run the testsuite (cd testsuite; make check). Current versions of Kawa use an elegant installation scheme in the /usr/local/ path. You must be root or a 'sudoer' to evoke make install, if this is not feasible (ie. user account), then use the Installing and using the binary distribution instructions, substituting the appropriate kawa-x.x.xx.jar file name from the kawa build directory into the CLASSPATH.

Runtime

See the instructions How to start up and run Kawa.

Kawa can take a wide variety of command line flags. Here are two quick examples (with kawa default installation in /usr/local/):

rds% kawa -e "(display (scheme-implementation-version))(newline)"
1.6.97
	# print kawa version on the terminal
 rds% kawa -w and
	# Running a Command Interpreter in a new Window
	# currently broke see GUI Windows with Mac OS X Running Java 1.3.1

MRJAppBuilder

The MRJAppBuilder that comes with the MacOSX 10.1 Developer Tools is currently undocumented. The O'Reilly article Running Java Applications on Mac OS X may be of help.

Emacs

Emacs provides another way to interact with Kawa under Unix-like systems. This is documented on Running Kawa Scheme under Emacs.

References

Kawa, the Java-based Scheme system