You can compile your Scheme program to native code using GCJ, as long as you have built Kawa using GCJ.
First, you need to compile the Scheme code to a set of .class
files;
see Compiling to a set of .class files.
kawa --main -C myprog.scm
Then to create an executable myprog
do:
gckawa --main=myprog myprog*.class -o myprog
The gckawa
is a simple shell script that calls gcj
.
The reason for the wildcard in myprog*.class
is that sometimes
Kawa will generate some helper classes in addition to myprog.class
.
The --main
option tell gcj
which class contains
the main
method it should use. The -o
option names
the resulting executable program. The -lkawa
option tells
the linker it should link with the kawa shared library, and
the -L$PREFIX/bin
option tells the linker where it can
find that library.