Index: kaffe/configure
diff -u kaffe/configure:1.1.1.10.2.1 kaffe/configure:1.13.2.9
--- kaffe/configure:1.1.1.10.2.1	Sun Aug  9 08:37:57 1998
+++ kaffe/configure	Wed Nov 11 02:40:38 1998
@@ -526,13 +526,12 @@
 fi
 
 
+GVER=1.5.1; KVER=0.100
 
-KVER=0.100
-
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:536: checking for $ac_word" >&5
+echo "configure:535: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -561,7 +560,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:565: checking for $ac_word" >&5
+echo "configure:564: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -609,7 +608,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:613: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:612: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -619,11 +618,11 @@
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 623 "configure"
+#line 622 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -643,12 +642,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:647: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:646: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:652: checking whether we are using GNU C" >&5
+echo "configure:651: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -657,7 +656,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -672,7 +671,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:676: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:675: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -726,7 +725,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:730: checking host system type" >&5
+echo "configure:729: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -866,14 +865,14 @@
 	{ echo "configure: error: Configuration $host_cpu-$host_os does not support $want_engine mode" 1>&2; exit 1; }
 fi
 echo $ac_n "checking execution engine""... $ac_c" 1>&6
-echo "configure:870: checking execution engine" >&5
+echo "configure:869: checking execution engine" >&5
 echo "$ac_t""$with_engine" 1>&6
 
 engine_frag=$srcdir/kaffe/kaffevm/$with_engine/Makefile.frag
 
 
 echo $ac_n "checking library type""... $ac_c" 1>&6
-echo "configure:877: checking library type" >&5
+echo "configure:876: checking library type" >&5
 if test "$dynamic_libraries" = "no" ; then
 	echo "$ac_t""static" 1>&6
 else
@@ -888,7 +887,7 @@
 fi
 
 echo $ac_n "checking thread system""... $ac_c" 1>&6
-echo "configure:892: checking thread system" >&5
+echo "configure:891: checking thread system" >&5
 if test "$with_threads" = "" ; then
 	with_threads=unix-internal
 fi
@@ -901,7 +900,7 @@
 
 if test "$with_engine" != "intrp" ; then
 	echo $ac_n "checking for trampolines""... $ac_c" 1>&6
-echo "configure:905: checking for trampolines" >&5
+echo "configure:904: checking for trampolines" >&5
 	if test -f $srcdir/config/$host_cpu/trampolines.c ; then
 		link_from="$link_from config/$host_cpu/trampolines.c"
 		link_to="$link_to kaffe/kaffevm/trampolines.c"
@@ -914,7 +913,7 @@
 
 
 echo $ac_n "checking how to generate depend files""... $ac_c" 1>&6
-echo "configure:918: checking how to generate depend files" >&5
+echo "configure:917: checking how to generate depend files" >&5
 if test "$DEPTOOL" = ""; then
 			DEPTOOL="true"
 	INC_DEPEND="# automatic dependency generation not enabled in configure"
@@ -985,7 +984,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:989: checking for a BSD compatible install" >&5
+echo "configure:988: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1035,7 +1034,7 @@
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1039: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1038: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1064,7 +1063,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1068: checking for $ac_word" >&5
+echo "configure:1067: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1093,7 +1092,7 @@
 # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1097: checking for $ac_word" >&5
+echo "configure:1096: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1123,7 +1122,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1127: checking for $ac_word" >&5
+echo "configure:1126: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MKDIR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1155,7 +1154,7 @@
 # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1159: checking for $ac_word" >&5
+echo "configure:1158: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1185,7 +1184,7 @@
 
 if test "$LN_S" = "" ; then
 	echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1189: checking whether ln -s works" >&5
+echo "configure:1188: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1217,7 +1216,7 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1221: checking size of short" >&5
+echo "configure:1220: checking size of short" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1225,7 +1224,7 @@
   ac_cv_sizeof_short=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1229 "configure"
+#line 1228 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1236,7 +1235,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -1256,7 +1255,7 @@
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1260: checking size of int" >&5
+echo "configure:1259: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1264,7 +1263,7 @@
   ac_cv_sizeof_int=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1268 "configure"
+#line 1267 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1275,7 +1274,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -1295,7 +1294,7 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1299: checking size of long" >&5
+echo "configure:1298: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1303,7 +1302,7 @@
   ac_cv_sizeof_long=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1307 "configure"
+#line 1306 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1314,7 +1313,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -1334,7 +1333,7 @@
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:1338: checking size of long long" >&5
+echo "configure:1337: checking size of long long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1342,7 +1341,7 @@
   ac_cv_sizeof_long_long=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1346 "configure"
+#line 1345 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1353,7 +1352,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -1373,7 +1372,7 @@
 
 
 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
-echo "configure:1377: checking size of __int64" >&5
+echo "configure:1376: checking size of __int64" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1381,7 +1380,7 @@
   ac_cv_sizeof___int64=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1385 "configure"
+#line 1384 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1392,7 +1391,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof___int64=`cat conftestval`
 else
@@ -1412,7 +1411,7 @@
 
 
 echo $ac_n "checking size of void*""... $ac_c" 1>&6
-echo "configure:1416: checking size of void*" >&5
+echo "configure:1415: checking size of void*" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1420,7 +1419,7 @@
   ac_cv_sizeof_voidp=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1424 "configure"
+#line 1423 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1431,7 +1430,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_voidp=`cat conftestval`
 else
@@ -1453,7 +1452,7 @@
 
 
 echo $ac_n "checking alignment of void*""... $ac_c" 1>&6
-echo "configure:1457: checking alignment of void*" >&5
+echo "configure:1456: checking alignment of void*" >&5
 if eval "test \"`echo '$''{'ac_cv_alignmentof_voidp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1461,7 +1460,7 @@
   ac_cv_alignmentof_voidp=1
 else
   cat > conftest.$ac_ext <<EOF
-#line 1465 "configure"
+#line 1464 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main() { struct { char c; void *p; } t; FILE *f;
@@ -1471,7 +1470,7 @@
   fprintf (f, "%d", ((char*) &t.p)-((char*) &t));
   fclose(f); exit (0); }
 EOF
-if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_alignmentof_voidp=`cat conftestdata`
 else
@@ -1493,12 +1492,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1497: checking return type of signal handlers" >&5
+echo "configure:1496: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1502 "configure"
+#line 1501 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1515,7 +1514,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1534,7 +1533,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1538: checking how to run the C preprocessor" >&5
+echo "configure:1537: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1549,13 +1548,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1553 "configure"
+#line 1552 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1566,13 +1565,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1570 "configure"
+#line 1569 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1595,12 +1594,12 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1599: checking for ANSI C header files" >&5
+echo "configure:1598: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1604 "configure"
+#line 1603 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1608,7 +1607,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1625,7 +1624,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1629 "configure"
+#line 1628 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1643,7 +1642,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1647 "configure"
+#line 1646 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1664,7 +1663,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1668 "configure"
+#line 1667 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1675,7 +1674,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1699,12 +1698,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1703: checking for size_t" >&5
+echo "configure:1702: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1708 "configure"
+#line 1707 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1732,12 +1731,12 @@
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:1736: checking for ssize_t" >&5
+echo "configure:1735: checking for ssize_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1741 "configure"
+#line 1740 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1771,7 +1770,7 @@
 
 
 echo $ac_n "checking for printf in -lc""... $ac_c" 1>&6
-echo "configure:1775: checking for printf in -lc" >&5
+echo "configure:1774: checking for printf in -lc" >&5
 ac_lib_var=`echo c'_'printf | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1779,7 +1778,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1783 "configure"
+#line 1782 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1790,7 +1789,7 @@
 printf()
 ; return 0; }
 EOF
-if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1818,7 +1817,7 @@
 fi
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:1822: checking for sin in -lm" >&5
+echo "configure:1821: checking for sin in -lm" >&5
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1826,7 +1825,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1830 "configure"
+#line 1829 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1837,7 +1836,7 @@
 sin()
 ; return 0; }
 EOF
-if { (eval echo configure:1841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1865,7 +1864,7 @@
 fi
 
 echo $ac_n "checking for mpz_abs in -lgmp""... $ac_c" 1>&6
-echo "configure:1869: checking for mpz_abs in -lgmp" >&5
+echo "configure:1868: checking for mpz_abs in -lgmp" >&5
 ac_lib_var=`echo gmp'_'mpz_abs | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1873,7 +1872,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1877 "configure"
+#line 1876 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1884,7 +1883,7 @@
 mpz_abs()
 ; return 0; }
 EOF
-if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1916,7 +1915,7 @@
 
 if test "$dynamic_libraries" = "yes" ; then
 		echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1920: checking for dlopen in -ldl" >&5
+echo "configure:1919: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1924,7 +1923,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1928 "configure"
+#line 1927 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1935,7 +1934,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1964,7 +1963,7 @@
 
 	if test "$ac_cv_lib_dl_dlopen" = "no" ; then
 		echo $ac_n "checking for _dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1968: checking for _dlopen in -ldl" >&5
+echo "configure:1967: checking for _dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'_dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1972,7 +1971,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1976 "configure"
+#line 1975 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1983,7 +1982,7 @@
 _dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2012,7 +2011,7 @@
 
 		if test "$ac_cv_lib_dl__dlopen" = "no" ; then
 			echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
-echo "configure:2016: checking for dld_init in -ldld" >&5
+echo "configure:2015: checking for dld_init in -ldld" >&5
 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2020,7 +2019,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2024 "configure"
+#line 2023 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2031,7 +2030,7 @@
 dld_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2065,7 +2064,7 @@
 
 
 echo $ac_n "checking for dial in -lnsl""... $ac_c" 1>&6
-echo "configure:2069: checking for dial in -lnsl" >&5
+echo "configure:2068: checking for dial in -lnsl" >&5
 ac_lib_var=`echo nsl'_'dial | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2073,7 +2072,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2077 "configure"
+#line 2076 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2084,7 +2083,7 @@
 dial()
 ; return 0; }
 EOF
-if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2112,7 +2111,7 @@
 fi
 
 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:2116: checking for socket in -lsocket" >&5
+echo "configure:2115: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2120,7 +2119,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2124 "configure"
+#line 2123 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2131,7 +2130,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:2135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2161,7 +2160,7 @@
 
 
 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
-echo "configure:2165: checking for deflate in -lz" >&5
+echo "configure:2164: checking for deflate in -lz" >&5
 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2169,7 +2168,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2173 "configure"
+#line 2172 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2180,7 +2179,7 @@
 deflate()
 ; return 0; }
 EOF
-if { (eval echo configure:2184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2210,7 +2209,7 @@
 
 
 echo $ac_n "checking for mpz_add in -lgmp""... $ac_c" 1>&6
-echo "configure:2214: checking for mpz_add in -lgmp" >&5
+echo "configure:2213: checking for mpz_add in -lgmp" >&5
 ac_lib_var=`echo gmp'_'mpz_add | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2218,7 +2217,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2222 "configure"
+#line 2221 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2229,7 +2228,7 @@
 mpz_add()
 ; return 0; }
 EOF
-if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2263,7 +2262,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:2267: checking for X" >&5
+echo "configure:2266: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -2325,12 +2324,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 2329 "configure"
+#line 2328 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2399,14 +2398,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2402 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -2508,7 +2507,7 @@
 
 
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2512: checking for shmat in -lipc" >&5
+echo "configure:2511: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2516,7 +2515,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2520 "configure"
+#line 2519 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2527,7 +2526,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:2531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2558,12 +2557,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2562: checking for ANSI C header files" >&5
+echo "configure:2561: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2567 "configure"
+#line 2566 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2571,7 +2570,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2588,7 +2587,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2592 "configure"
+#line 2591 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2606,7 +2605,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2610 "configure"
+#line 2609 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2627,7 +2626,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2631 "configure"
+#line 2630 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2638,7 +2637,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -2665,17 +2664,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2669: checking for $ac_hdr" >&5
+echo "configure:2668: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2674 "configure"
+#line 2673 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2706,12 +2705,12 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:2710: checking for $ac_hdr that defines DIR" >&5
+echo "configure:2709: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2715 "configure"
+#line 2714 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -2719,7 +2718,7 @@
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -2744,7 +2743,7 @@
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2748: checking for opendir in -ldir" >&5
+echo "configure:2747: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2752,7 +2751,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2756 "configure"
+#line 2755 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2763,7 +2762,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2785,7 +2784,7 @@
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2789: checking for opendir in -lx" >&5
+echo "configure:2788: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2793,7 +2792,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2797 "configure"
+#line 2796 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2804,7 +2803,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2830,12 +2829,12 @@
 
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2834: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2833: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2839 "configure"
+#line 2838 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2844,7 +2843,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2865,12 +2864,12 @@
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2869: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:2868: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
+#line 2873 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -2878,7 +2877,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:2882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -2899,12 +2898,12 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:2903: checking for tm_zone in struct tm" >&5
+echo "configure:2902: checking for tm_zone in struct tm" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2908 "configure"
+#line 2907 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -2912,7 +2911,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -2932,12 +2931,12 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:2936: checking for tzname" >&5
+echo "configure:2935: checking for tzname" >&5
 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2941 "configure"
+#line 2940 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -2947,7 +2946,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -2969,14 +2968,14 @@
 fi
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2973: checking whether byte ordering is bigendian" >&5
+echo "configure:2972: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 2980 "configure"
+#line 2979 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2987,11 +2986,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 2995 "configure"
+#line 2994 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3002,7 +3001,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3022,7 +3021,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3026 "configure"
+#line 3025 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3035,7 +3034,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3059,14 +3058,14 @@
 fi
 
 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3063: checking whether char is unsigned" >&5
+echo "configure:3062: checking whether char is unsigned" >&5
 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$GCC" = yes; then
   # GCC predefines this symbol on systems where it applies.
 cat > conftest.$ac_ext <<EOF
-#line 3070 "configure"
+#line 3069 "configure"
 #include "confdefs.h"
 #ifdef __CHAR_UNSIGNED__
   yes
@@ -3088,7 +3087,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3092 "configure"
+#line 3091 "configure"
 #include "confdefs.h"
 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
 #if !defined(__STDC__) || __STDC__ != 1
@@ -3098,7 +3097,7 @@
   volatile char c = 255; exit(c < 0);
 }
 EOF
-if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_char_unsigned=yes
 else
@@ -3122,21 +3121,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3126: checking for inline" >&5
+echo "configure:3125: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 3133 "configure"
+#line 3132 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -3164,12 +3163,12 @@
 
 
 echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
-echo "configure:3168: checking for struct sigcontext" >&5
+echo "configure:3167: checking for struct sigcontext" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_sigcontext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3173 "configure"
+#line 3172 "configure"
 #include "confdefs.h"
 #include <asm/signal.h>
 #include <asm/sigcontext.h>
@@ -3177,7 +3176,7 @@
 struct sigcontext t;
 ; return 0; }
 EOF
-if { (eval echo configure:3181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_sigcontext=yes
 else
@@ -3199,19 +3198,19 @@
 
 
 echo $ac_n "checking for struct sigcontext_struct (without asm/sigcontext.h)""... $ac_c" 1>&6
-echo "configure:3203: checking for struct sigcontext_struct (without asm/sigcontext.h)" >&5
+echo "configure:3202: checking for struct sigcontext_struct (without asm/sigcontext.h)" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_sigcontext_struct'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3208 "configure"
+#line 3207 "configure"
 #include "confdefs.h"
 #include <asm/signal.h>
 int main() {
 struct sigcontext_struct t;
 ; return 0; }
 EOF
-if { (eval echo configure:3215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_sigcontext_struct=yes
 else
@@ -3226,12 +3225,12 @@
 echo "$ac_t""$ac_cv_struct_sigcontext_struct" 1>&6
 
 echo $ac_n "checking for struct sigcontext_struct (with asm/sigcontext.h)""... $ac_c" 1>&6
-echo "configure:3230: checking for struct sigcontext_struct (with asm/sigcontext.h)" >&5
+echo "configure:3229: checking for struct sigcontext_struct (with asm/sigcontext.h)" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_sigcontext_struct_with'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3235 "configure"
+#line 3234 "configure"
 #include "confdefs.h"
 #include <asm/signal.h>
 #include <asm/sigcontext.h>
@@ -3239,7 +3238,7 @@
 struct sigcontext_struct t;
 ; return 0; }
 EOF
-if { (eval echo configure:3243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_sigcontext_struct_with=yes
 else
@@ -3263,12 +3262,12 @@
 
 
 echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:3267: checking for strftime" >&5
+echo "configure:3266: checking for strftime" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3272 "configure"
+#line 3271 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strftime(); below.  */
@@ -3291,7 +3290,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_strftime=yes"
 else
@@ -3313,7 +3312,7 @@
   echo "$ac_t""no" 1>&6
 # strftime is in -lintl on SCO UNIX.
 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:3317: checking for strftime in -lintl" >&5
+echo "configure:3316: checking for strftime in -lintl" >&5
 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3321,7 +3320,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3325 "configure"
+#line 3324 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3332,7 +3331,7 @@
 strftime()
 ; return 0; }
 EOF
-if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3362,17 +3361,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3366: checking for $ac_hdr" >&5
+echo "configure:3365: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3371 "configure"
+#line 3370 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3401,12 +3400,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3405: checking for $ac_func" >&5
+echo "configure:3404: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3410 "configure"
+#line 3409 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3429,7 +3428,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3454,7 +3453,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3458: checking for working mmap" >&5
+echo "configure:3457: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3462,7 +3461,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3466 "configure"
+#line 3465 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3602,7 +3601,7 @@
 }
 
 EOF
-if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -3627,12 +3626,12 @@
 for ac_func in select socket getsockname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3631: checking for $ac_func" >&5
+echo "configure:3630: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3636 "configure"
+#line 3635 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3655,7 +3654,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3682,12 +3681,12 @@
 for ac_func in memcpy memmove
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3686: checking for $ac_func" >&5
+echo "configure:3685: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3691 "configure"
+#line 3690 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3710,7 +3709,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3737,12 +3736,12 @@
 for ac_func in mkdir
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3741: checking for $ac_func" >&5
+echo "configure:3740: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3746 "configure"
+#line 3745 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3765,7 +3764,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3792,12 +3791,12 @@
 for ac_func in getcwd getwd gettimeofday ftime time uname getuid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3796: checking for $ac_func" >&5
+echo "configure:3795: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3801 "configure"
+#line 3800 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3820,7 +3819,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3847,12 +3846,12 @@
 for ac_func in remainder remainderf fmod drem rint floor ceil finite isinf isnan strtod strdup
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3851: checking for $ac_func" >&5
+echo "configure:3850: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3856 "configure"
+#line 3855 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3875,7 +3874,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3902,12 +3901,12 @@
 for ac_func in strerror hstrerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3906: checking for $ac_func" >&5
+echo "configure:3905: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3911 "configure"
+#line 3910 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3930,7 +3929,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3957,12 +3956,12 @@
 for ac_func in fcntl ioctl
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3961: checking for $ac_func" >&5
+echo "configure:3960: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3966 "configure"
+#line 3965 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3985,7 +3984,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4012,12 +4011,12 @@
 for ac_func in alarm setitimer
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4016: checking for $ac_func" >&5
+echo "configure:4015: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4021 "configure"
+#line 4020 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4040,7 +4039,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4067,12 +4066,12 @@
 for ac_func in sigprocmask sigsetmask sigemptyset sigaddset signal sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4071: checking for $ac_func" >&5
+echo "configure:4070: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4076 "configure"
+#line 4075 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4095,7 +4094,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4122,12 +4121,12 @@
 for ac_func in sbrk valloc memalign mallopt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4126: checking for $ac_func" >&5
+echo "configure:4125: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4131 "configure"
+#line 4130 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4150,7 +4149,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4177,12 +4176,12 @@
 for ac_func in waitpid kill fork execve
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4181: checking for $ac_func" >&5
+echo "configure:4180: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4186 "configure"
+#line 4185 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4205,7 +4204,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4232,12 +4231,12 @@
 for ac_func in rld_load shl_load LoadLibrary dld_link
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4236: checking for $ac_func" >&5
+echo "configure:4235: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4241 "configure"
+#line 4240 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4260,7 +4259,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4287,12 +4286,12 @@
 for ac_func in sync fsync
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4291: checking for $ac_func" >&5
+echo "configure:4290: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4296 "configure"
+#line 4295 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4315,7 +4314,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4342,12 +4341,12 @@
 for ac_func in atexit on_exit vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4346: checking for $ac_func" >&5
+echo "configure:4345: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4351 "configure"
+#line 4350 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4370,7 +4369,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4396,12 +4395,12 @@
 
 
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4400: checking for dlopen" >&5
+echo "configure:4399: checking for dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4405 "configure"
+#line 4404 "configure"
 #include "confdefs.h"
 #ifdef HAVE_DLFCN_H
 #include <dlfcn.h>
@@ -4412,7 +4411,7 @@
 dlopen(0, 0)
 ; return 0; }
 EOF
-if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_dlopen=yes
 else
@@ -4434,12 +4433,12 @@
 fi
 
 echo $ac_n "checking for dlerror""... $ac_c" 1>&6
-echo "configure:4438: checking for dlerror" >&5
+echo "configure:4437: checking for dlerror" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4443 "configure"
+#line 4442 "configure"
 #include "confdefs.h"
 #ifdef HAVE_DLFCN_H
 #include <dlfcn.h>
@@ -4450,7 +4449,7 @@
 dlerror()
 ; return 0; }
 EOF
-if { (eval echo configure:4454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_dlerror=yes
 else
@@ -4474,19 +4473,19 @@
 
 if test "$host_cpu" = "alpha" ; then
   echo $ac_n "checking for alpha support of amask instruction""... $ac_c" 1>&6
-echo "configure:4478: checking for alpha support of amask instruction" >&5
+echo "configure:4477: checking for alpha support of amask instruction" >&5
 if eval "test \"`echo '$''{'ac_cv_alpha_asm_amask'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4483 "configure"
+#line 4482 "configure"
 #include "confdefs.h"
 
 int main() {
  long r; __asm__("amask 1,%0" : "=r"(r)); return !r; 
 ; return 0; }
 EOF
-if { (eval echo configure:4490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_alpha_asm_amask=yes
 else
@@ -4511,12 +4510,12 @@
 
 
 echo $ac_n "checking for declaration of select""... $ac_c" 1>&6
-echo "configure:4515: checking for declaration of select" >&5
+echo "configure:4514: checking for declaration of select" >&5
 if eval "test \"`echo '$''{'ac_cv_declared_select'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4520 "configure"
+#line 4519 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -4533,7 +4532,7 @@
  void *foo = select; 
 ; return 0; }
 EOF
-if { (eval echo configure:4537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_declared_select=yes; cat >> confdefs.h <<\EOF
 #define HAVE_DECLARED_SELECT 1
@@ -4554,7 +4553,7 @@
 
 
 echo $ac_n "checking for underscore in dlsym""... $ac_c" 1>&6
-echo "configure:4558: checking for underscore in dlsym" >&5
+echo "configure:4557: checking for underscore in dlsym" >&5
 if eval "test \"`echo '$''{'ac_cv_underscore'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4563,13 +4562,13 @@
   ac_cv_underscore=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 4567 "configure"
+#line 4566 "configure"
 #include "confdefs.h"
 main()
 {void* lib = (void*)dlopen(_LIBC_);
   if (dlsym(lib, "_printf") != 0) { exit(0); } else { exit(1); } }
 EOF
-if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_underscore=yes
 else
@@ -4592,7 +4591,7 @@
 fi
 
 echo $ac_n "checking for underscore in C assembly names""... $ac_c" 1>&6
-echo "configure:4596: checking for underscore in C assembly names" >&5
+echo "configure:4595: checking for underscore in C assembly names" >&5
 if eval "test \"`echo '$''{'ac_cv_underscore_c_names'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4600,11 +4599,11 @@
   ac_cv_underscore_c_names=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 4604 "configure"
+#line 4603 "configure"
 #include "confdefs.h"
 extern int main_symbol();void* x;asm("\n_main_symbol:");main(){ x = &main_symbol; exit(0); }
 EOF
-if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_underscore_c_names=yes
 else
@@ -4652,12 +4651,29 @@
 "
 
 
+
+if test x"$enable_guarana" != xno &&
+   test -d $srcdir/kaffe/kaffevm/guarana ; then
+	cat >> confdefs.h <<\EOF
+#define GUARANA 1
+EOF
+
+	COMMENT_GUARANA=
+	GUARANALIB="../kaffevm/libguarana$LIBEXT"
+else
+	COMMENT_GUARANA="#"
+	GUARANALIB=
+fi
+
+
 if test "$dynamic_libraries" = "yes" ; then
 	NOSHAREDLIBS="-L../kaffevm -lkaffevm $VM_LIBRARIES $STD_LIBRARIES"
 	KAFFE_LIBDEP=""
 else
-	NOSHAREDLIBS="../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES $STD_LIBRARIES $ZIP_LIBRARIES $NET_LIBRARIES $X_LIBRARIES"
+	NOSHAREDLIBS="$GUARANALIB ../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES $STD_LIBRARIES $ZIP_LIBRARIES $NET_LIBRARIES $X_LIBRARIES"
 	KAFFE_LIBDEP="$KAFFE_LIBDEP ../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES"
+	NOSHAREDLIBS="$NOSHAREDLIBS $GUARANALIB"
+	KAFFE_LIBDEP="$KAFFE_LIBDEP $GUARANALIB"
 	PIC=""
 	PICVM=""
 	LIBSHARE=""
@@ -4681,6 +4697,24 @@
 
 
 
+output="$make_output \
+kaffe/scripts/install-jar \
+kaffe/scripts/kaffe \
+kaffe/scripts/javac \
+kaffe/scripts/javakey \
+kaffe/scripts/jar \
+kaffe/scripts/javap \
+kaffe/scripts/jdb \
+kaffe/scripts/pizza \
+kaffe/scripts/javadoc \
+kaffe/scripts/pizzadoc \
+kaffe/scripts/appletviewer \
+kaffe/scripts/rmic \
+kaffe/scripts/rmiregistry \
+kaffe/scripts/serialver \
+kaffe/scripts/native2ascii \
+kaffe/scripts/compat/java \
+"
 
 
 trap '' 1 2 15
@@ -4784,7 +4818,7 @@
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "$make_output config/config.h include/jtypes.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "$output config/config.h include/jtypes.h include/guarana.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -4870,6 +4904,8 @@
 s%@MATH_LIBRARIES@%$MATH_LIBRARIES%g
 s%@X_INCLUDES@%$X_INCLUDES%g
 s%@X_LIBRARIES@%$X_LIBRARIES%g
+s%@GVER@%$GVER%g
+s%@COMMENT_GUARANA@%$COMMENT_GUARANA%g
 s%@subdirs@%$subdirs%g
 s%@packages@%$packages%g
 s%@KAFFE_LIBDEP@%$KAFFE_LIBDEP%g
@@ -4914,7 +4950,7 @@
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"$make_output"}
+CONFIG_FILES=\${CONFIG_FILES-"$output"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -4995,7 +5031,7 @@
 if test "${CONFIG_HEADERS+set}" != set; then
 EOF
 cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config/config.h include/jtypes.h"
+  CONFIG_HEADERS="config/config.h include/jtypes.h include/guarana.h"
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 fi
Index: kaffe/configure.in
diff -u kaffe/configure.in:1.1.1.9.2.1 kaffe/configure.in:1.13.2.9
--- kaffe/configure.in:1.1.1.9.2.1	Sun Aug  9 08:38:01 1998
+++ kaffe/configure.in	Wed Nov 11 02:40:47 1998
@@ -1,6 +1,6 @@
 AC_INIT(kaffe)
-
 dnl Setup version number.
+GVER=1.5.1; dnl Guarana reflective kernel
 KVER=0.100
 
 dnl Find the compiler early on in case we need to override.
@@ -602,14 +602,29 @@
 
 changequote([, ])dnl
 
+dnl Configure in the Guarana stuff.
+AC_SUBST(GVER)
+if test x"$enable_guarana" != xno &&
+   test -d $srcdir/kaffe/kaffevm/guarana ; then
+	AC_DEFINE(GUARANA)
+	COMMENT_GUARANA=
+	GUARANALIB="../kaffevm/libguarana$LIBEXT"
+else
+	COMMENT_GUARANA="#"
+	GUARANALIB=
+fi
+AC_SUBST(COMMENT_GUARANA)
+
 dnl If we have share libraries, cancel all the non-shared ones.
 dnl  Otherwise, add on the machine again to help linking.
 if test "$dynamic_libraries" = "yes" ; then
 	NOSHAREDLIBS="-L../kaffevm -lkaffevm $VM_LIBRARIES $STD_LIBRARIES"
 	KAFFE_LIBDEP=""
 else
-	NOSHAREDLIBS="../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES $STD_LIBRARIES $ZIP_LIBRARIES $NET_LIBRARIES $X_LIBRARIES"
+	NOSHAREDLIBS="$GUARANALIB ../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES $STD_LIBRARIES $ZIP_LIBRARIES $NET_LIBRARIES $X_LIBRARIES"
 	KAFFE_LIBDEP="$KAFFE_LIBDEP ../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES"
+	NOSHAREDLIBS="$NOSHAREDLIBS $GUARANALIB"
+	KAFFE_LIBDEP="$KAFFE_LIBDEP $GUARANALIB"
 	PIC=""
 	PICVM=""
 	LIBSHARE=""
@@ -636,9 +651,28 @@
 AC_SUBST(subdirs)
 AC_SUBST(packages)
 AC_SUBST(KAFFE_LIBDEP)
+dnl A few extra files to process.
+output="$make_output \
+kaffe/scripts/install-jar \
+kaffe/scripts/kaffe \
+kaffe/scripts/javac \
+kaffe/scripts/javakey \
+kaffe/scripts/jar \
+kaffe/scripts/javap \
+kaffe/scripts/jdb \
+kaffe/scripts/pizza \
+kaffe/scripts/javadoc \
+kaffe/scripts/pizzadoc \
+kaffe/scripts/appletviewer \
+kaffe/scripts/rmic \
+kaffe/scripts/rmiregistry \
+kaffe/scripts/serialver \
+kaffe/scripts/native2ascii \
+kaffe/scripts/compat/java \
+"
 
-AC_CONFIG_HEADER(config/config.h include/jtypes.h)
-AC_OUTPUT($make_output)
+AC_CONFIG_HEADER(config/config.h include/jtypes.h include/guarana.h)
+AC_OUTPUT($output)
 
 dnl =========================================================================
 dnl Create empty .depend files to ensure that make works even 
Index: kaffe/config/config.h.in
diff -u kaffe/config/config.h.in:1.1.1.7 kaffe/config/config.h.in:1.8.2.1
--- kaffe/config/config.h.in:1.1.1.7	Tue Jun 30 03:26:03 1998
+++ kaffe/config/config.h.in	Fri Sep 11 22:09:57 1998
@@ -358,6 +358,9 @@
 /* Kaffe version number */
 #undef	KAFFEVERSION
 
+/* Enable Guarana reflective kernel */
+#undef  GUARANA
+
 /* Provide default types which might be missing */
 #undef	size_t
 #undef	ssize_t
Index: kaffe/include/Makefile.in
diff -u kaffe/include/Makefile.in:1.1.1.7 kaffe/include/Makefile.in:1.8
--- kaffe/include/Makefile.in:1.1.1.7	Tue Jun 30 03:27:48 1998
+++ kaffe/include/Makefile.in	Tue Jun 30 03:53:35 1998
@@ -16,6 +16,7 @@
 SHELL=		/bin/sh
 
 BUILT_INCLUDEFILES= \
+		guarana.h \
 		jtypes.h
 
 INCLUDEFILES= \
Index: kaffe/include/guarana.h.in
diff -u /dev/null kaffe/include/guarana.h.in:1.1
--- /dev/null	Mon Nov 16 07:59:06 1998
+++ kaffe/include/guarana.h.in	Fri May 16 19:21:19 1997
@@ -0,0 +1,18 @@
+/* guarana.h
+ * Enable or disable Guarana's Reflective Kernel and MetaObject support
+ *
+ * Written by Alexandre Oliva <oliva@dcc.unicamp.br>
+ */
+
+#ifndef __guarana_h
+#define __guarana_h
+
+#ifndef GUARANA
+#undef GUARANA
+#endif
+
+#ifdef GUARANA
+struct HBR_unicamp_Guarana_MetaObject;
+#endif
+
+#endif
Index: kaffe/include/java_lang_Object.h
diff -u kaffe/include/java_lang_Object.h:1.1.1.2 kaffe/include/java_lang_Object.h:1.3
--- kaffe/include/java_lang_Object.h:1.1.1.2	Mon Mar 30 20:11:46 1998
+++ kaffe/include/java_lang_Object.h	Sun Apr 19 13:12:10 1998
@@ -11,6 +11,8 @@
 #ifndef __java_lang_object_h
 #define __java_lang_object_h
 
+#include <guarana.h>
+
 struct _dispatchTable;
 struct _iLock;
 
@@ -18,6 +20,9 @@
 	struct _dispatchTable*  dtable;
 #if defined(USE_LOCK_CACHE)
 	struct _iLock*		lock;
+#endif
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject* meta_object;
 #endif
 	/* Data follows on immediately */
 } Hjava_lang_Object;
Index: kaffe/kaffe/kaffe/Makefile.in
diff -u kaffe/kaffe/kaffe/Makefile.in:1.1.1.4 kaffe/kaffe/kaffe/Makefile.in:1.2.2.1
--- kaffe/kaffe/kaffe/Makefile.in:1.1.1.4	Sat Jun 13 14:33:08 1998
+++ kaffe/kaffe/kaffe/Makefile.in	Fri Aug  7 13:32:11 1998
@@ -19,7 +19,7 @@
 DEPTOOL=	@DEPTOOL@
 INCLUDES=	-I. -I$(srcdir)/../kaffevm -I../../config -I$(srcdir)/../../config -I../../include -I$(srcdir)/../../include
 CFLAGS=		@CFLAGS@
-LDFLAGS=	@KAFFELINK@
+LDFLAGS=	@KAFFELINK@ @LDFLAGS@
 ALL_CFLAGS=	$(CFLAGS) @KAFFEFLAGS@ $(INCLUDES) $(EXTRA_CFLAGS)
 LIBS=		@NOSHAREDLIBS@
 OBJEXT=		@OBJEXT@
@@ -28,16 +28,16 @@
 OBJECT=		main$(OBJEXT)
 DEPENDS=	$(OBJECT:@OBJEXT@=.d)
 
-all:		kaffe$(EXEEXT)
+all:		Kaffe$(EXEEXT)
 
-kaffe$(EXEEXT):	$(OBJECT) @KAFFE_LIBDEP@
-		$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o kaffe$(EXEEXT) $(OBJECT) $(LIBS)
+Kaffe$(EXEEXT):	$(OBJECT) @KAFFE_LIBDEP@
+		$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o Kaffe$(EXEEXT) $(OBJECT) $(LIBS)
 
 .c$(OBJEXT):
 		$(CC) $(ALL_CFLAGS) -c $<
 
 clean:
-		rm -f $(LIB) kaffe$(EXEEXT) kaffe.core $(OBJECT)
+		rm -f $(LIB) Kaffe$(EXEEXT) Kaffe.core $(OBJECT)
 
 distclean:	clean
 		rm -f $(DEPENDS)
@@ -46,7 +46,7 @@
 
 install:
 		test -d $(bindir) || $(MKDIR) $(bindir)
-		$(INSTALL_PROGRAM) kaffe$(EXEEXT) $(bindir)/kaffe$(EXEEXT)
+		$(INSTALL_PROGRAM) Kaffe$(EXEEXT) $(bindir)/Kaffe$(EXEEXT)
 
 .SUFFIXES:	.d
 
Index: kaffe/kaffe/kaffe/main.c
diff -u kaffe/kaffe/kaffe/main.c:1.1.1.7.2.1 kaffe/kaffe/kaffe/main.c:1.1.1.7.4.2
--- kaffe/kaffe/kaffe/main.c:1.1.1.7.2.1	Sun Aug  9 08:38:07 1998
+++ kaffe/kaffe/kaffe/main.c	Fri Aug  7 13:02:54 1998
@@ -27,6 +27,9 @@
 
 extern char* engine_name;
 extern char* engine_version;
+#ifdef GUARANA
+extern char* guarana_version;
+#endif
 static char* java_version;
 
 #include "jni.h"
@@ -198,6 +201,9 @@
 			fprintf(stderr, "Kaffe Virtual Machine\n");
 			fprintf(stderr, "Copyright (c) 1996, 1997, 1998\nTransvirtual Technologies, Inc.  All rights reserved\n");
 			fprintf(stderr, "Engine: %s   Version: %s   Java Version: %s\n", engine_name, engine_version, java_version);
+#ifdef GUARANA
+			fprintf(stderr, "\nInstrumented with Guarana %s\nCopyright (c) 1997, 1998  Alexandre Oliva\n", guarana_version);
+#endif
 			exit(0);
 		}
 		else if (strcmp(argv[i], "-classpath") == 0) {
Index: kaffe/kaffe/kaffevm/Makefile.in
diff -u kaffe/kaffe/kaffevm/Makefile.in:1.1.1.9 kaffe/kaffe/kaffevm/Makefile.in:1.12.2.3
--- kaffe/kaffe/kaffevm/Makefile.in:1.1.1.9	Sat Jun 13 14:33:22 1998
+++ kaffe/kaffe/kaffevm/Makefile.in	Wed Sep  9 04:59:28 1998
@@ -11,6 +11,7 @@
 prefix=		@prefix@
 exec_prefix=	@exec_prefix@
 libdir=		@libdir@
+classdir=	@datadir@/kaffe
 INSTALL=	@INSTALL@
 INSTALL_DATA=	@INSTALL_DATA@
 MKDIR=		@MKDIR@
@@ -22,16 +23,18 @@
 DLLTOOL=	@DLLTOOL@
 DEPTOOL=	@DEPTOOL@
 PIC=		@PICVM@
-LDFLAGS=	@LIBSHARE@
+LDFLAGS=	@LIBSHARE@ @LDFLAGS@
 LIBS=		@LIBS@
 LDTAIL=		@LDTAIL@ @NET_LIBRARIES@ @STD_LIBRARIES@ @VM_LIBRARIES@
 KVER=		@KVER@
+GVER=		@GVER@
 OBJEXT=		@OBJEXT@
 LIBEXT=		@LIBVMEXT@
 
 INCLUDES=	-I. -I$(srcdir) -I$(srcdir)/../../config -I../../config -I../../include -I$(srcdir)/../../include
+CPPFLAGS=	@CPPFLAGS@
 CFLAGS=		@CFLAGS@
-ALL_CFLAGS=	$(CFLAGS) @KAFFEVMFLAGS@ $(INCLUDES) $(ENGINE_CFLAGS) -DKVER=\"$(KVER)\" $(EXTRA_CFLAGS)
+ALL_CFLAGS=	$(CPPFLAGS) $(CFLAGS) @KAFFEVMFLAGS@ $(INCLUDES) $(ENGINE_CFLAGS) -DKVER=\"$(KVER)\" -DGVER=\"$(GVER)\" $(EXTRA_CFLAGS)
 
 LIBNAME=	libkaffevm
 LIB=		$(LIBNAME)$(LIBEXT).$(KVER)
@@ -72,8 +75,45 @@
 @cpu_os_frag@
 @threads_frag@
 
-OBJECT=		$(COMMON) $(THREAD) $(ENGINE_OBJECTS) $(CPU_OBJECTS) $(CPUOS_OBJECTS)
+GUARANA_OBJECTS = \
+		guarana/GuaraNative$(OBJEXT)
 
+OBJECT=		$(COMMON) $(THREAD) $(ENGINE_OBJECTS) $(CPU_OBJECTS) $(CPUOS_OBJECTS) @COMMENT_GUARANA@ $(GUARANA_OBJECTS)
+
+LIBGUARANA_OBJECTS = \
+		guarana/Guarana$(OBJEXT) \
+		guarana/Operation$(OBJEXT) \
+		guarana/OperationFactoryInternal$(OBJEXT) \
+		guarana/Result$(OBJEXT)
+
+$(LIBGUARANA_OBJECTS) $(GUARANA_OBJECTS) : guarana/Makefile.build
+
+LIBGEXT=	@LIBEXT@
+LIBGUARANAME=	libguarana
+LIBGUARANA=	$(LIBGUARANAME)$(LIBGEXT).$(GVER)
+LLIBGUARANA=	$(LIBGUARANAME)$(LIBGEXT)
+
+guarana/Makefile.build:
+		test -d guarana || mkdir guarana
+		cp $(srcdir)/guarana/Makefile $@
+
+@COMMENT_GUARANA@ all: $(LLIBGUARANA)
+
+$(LLIBGUARANA): $(LIBGUARANA)
+		rm -f $(LLIBGUARANA)
+		$(LN) $(LIBGUARANA) $(LLIBGUARANA)
+
+$(LIBGUARANA): $(LIBGUARANA_OBJECTS) libguarana.exp
+		$(MAKE) LIB="$(LIBGUARANA)" OBJECT="$(LIBGUARANA_OBJECTS)" mkguarana
+
+.PHONY: mkguarana
+mkguarana:
+		@LINKLIB@
+
+libguarana.exp:
+		$(DLLTOOL) --def $(srcdir)/$(LIBGUARANAME).def --output-exp libguarana.exp --output-lib $(LIBGUARANAME).a --dllname $(LLIBGUARANA)
+		touch libguarana.exp
+
 DEPENDS=       $(OBJECT:@OBJEXT@=.d)
 
 mkkaffevm:	$(LLIB)
@@ -95,6 +135,7 @@
 
 clean:
 		rm -f $(LIB) $(LLIB) $(OBJECT) lib.exp
+@COMMENT_GUARANA@	rm -f $(LIBGUARANA) $(LLIBGUARANA) $(LIBGUARANA_OBJECTS) libguarana.exp
 		rm -f $(DEPENDS)
 		rm -f .depend
 		touch .depend
@@ -109,8 +150,14 @@
 		$(INSTALL_DATA) $(LIB) $(libdir)/$(LIB)
 		rm -f $(libdir)/$(LLIB)
 		$(LN) $(LIB) $(libdir)/$(LLIB)
+@COMMENT_GUARANA@	$(INSTALL_DATA) $(LIBGUARANA) $(libdir)/$(LIBGUARANA)
+@COMMENT_GUARANA@	rm -f $(libdir)/$(LLIBGUARANA)
+@COMMENT_GUARANA@	$(LN) $(LIBGUARANA) $(libdir)/$(LLIBGUARANA)
+@COMMENT_GUARANA@	test -d $(classdir) || $(MKDIR) $(classdir)
+@COMMENT_GUARANA@	$(INSTALL_DATA) $(srcdir)/guarana/guarana.jar $(classdir)/guarana.jar
 
 depend:         $(DEPENDS)
+@COMMENT_GUARANA@	test -d guarana || mkdir guarana
 		rm -f .depend
 		cat $(DEPENDS) > .depend
 
Index: kaffe/kaffe/kaffevm/baseClasses.c
diff -u kaffe/kaffe/kaffevm/baseClasses.c:1.1.1.7.2.1 kaffe/kaffe/kaffevm/baseClasses.c:1.3.2.2
--- kaffe/kaffe/kaffevm/baseClasses.c:1.1.1.7.2.1	Sun Aug  9 08:38:11 1998
+++ kaffe/kaffe/kaffevm/baseClasses.c	Wed Sep  9 05:01:44 1998
@@ -28,6 +28,9 @@
 #include "exception.h"
 #include "itypes.h"
 #include "md.h"
+#ifdef GUARANA
+#include "external.h"
+#endif
 
 Utf8Const* init_name;
 Utf8Const* void_signature;
@@ -104,6 +107,18 @@
 	/* Init native support */
 	initNative();
 
+#ifdef GUARANA
+#ifdef NO_SHARED_LIBRARIES
+	java_lang_Class_init_function_pointers();
+#else
+	{
+	  void (*init_func_ptrs)(void) =
+	    loadNativeLibrarySym("java_lang_Class_init_function_pointers");
+	  init_func_ptrs();
+	}
+#endif
+#endif
+	
 	/* Create the initialise and finalize names and signatures. */
 	init_name = makeUtf8ConstFixed(INIT, -1);
 	void_signature = makeUtf8ConstFixed(VOIDSIG, -1);
Index: kaffe/kaffe/kaffevm/classMethod.c
diff -u kaffe/kaffe/kaffevm/classMethod.c:1.1.1.8.2.1 kaffe/kaffe/kaffevm/classMethod.c:1.11.2.1
--- kaffe/kaffe/kaffevm/classMethod.c:1.1.1.8.2.1	Sun Aug  9 08:38:12 1998
+++ kaffe/kaffe/kaffevm/classMethod.c	Fri Aug  7 03:44:41 1998
@@ -300,7 +300,7 @@
 void
 registerClass(classEntry* entry)
 {
-	lockMutex(entry);
+	lockCEntryMutex(entry);
 
 	/*
 	 * It is necessary to add the entry->class to the GC in some
@@ -308,7 +308,7 @@
 	 * however, this isn't possible right now.
 	 */
 
-	unlockMutex(entry);
+	unlockCEntryMutex(entry);
 }
 
 static
@@ -526,7 +526,7 @@
 	} 
 
 	/* Lock centry before setting centry->class */
-	lockMutex(centry);
+	lockCEntryMutex(centry);
 
 	/* Check again in case someone else did it */
 	if (centry->class == NULL) {
@@ -548,7 +548,7 @@
 	}
 
 	/* Release lock now class has been entered and processed */
-	unlockMutex(centry);
+	unlockCEntryMutex(centry);
 
 	if (clazz == NULL) {
 		throwException(ClassNotFoundException(name->data));
@@ -573,12 +573,12 @@
 	(*class) = newClass();
 
         centry = lookupClassEntry(makeUtf8Const(name, -1), 0);
-	lockMutex(centry);
+	lockCEntryMutex(centry);
 	if (centry->class == 0) {
 		centry->class = *class;
 		findClass(centry);
 	}
-	unlockMutex(centry);
+	unlockCEntryMutex(centry);
 
 	processClass(centry->class, CSTATE_LINKED);
 }
@@ -612,13 +612,13 @@
 	 * else may update it while we're doing this.  Once we've got the
 	 * name we don't really care.
 	 */
-	lockMutex(this->centry);
+	lockCEntryMutex(this->centry);
 	if (FIELD_RESOLVED(fld)) {
-		unlockMutex(this->centry);
+		unlockCEntryMutex(this->centry);
 		return (FIELD_TYPE(fld));
 	}
 	name = ((Utf8Const*)fld->type)->data;
-	unlockMutex(this->centry);
+	unlockCEntryMutex(this->centry);
 
 	clas = getClassFromSignature(name, this->loader);
 
@@ -742,7 +742,7 @@
 	int idx;
 	int n;
 
-	lockMutex(class->centry);
+	lockCEntryMutex(class->centry);
 
 	pool = CLASS_CONSTANTS(class);
 	fld = CLASS_SFIELDS(class);
@@ -794,7 +794,7 @@
 		}
 	}
 
-	unlockMutex(class->centry);
+	unlockCEntryMutex(class->centry);
 }
 
 static
@@ -802,7 +802,11 @@
 buildDispatchTable(Hjava_lang_Class* class)
 {
 	Method* meth;
+#ifdef GUARANA
+	dispatchMethod* mtab;
+#else
 	void** mtab;
+#endif
 	int i;
 #if defined(TRANSLATOR)
 	int ntramps = 0;
@@ -855,10 +859,10 @@
 	   one block of memory.  This is primarily done for GC reasons in
 	   that I didn't want to add another slot on class just for holding
 	   the trampolines, but it also works out for space reasons.  */
-	class->dtable = (dispatchTable*)gc_malloc(sizeof(dispatchTable) + class->msize * sizeof(void*) + ntramps * sizeof(methodTrampoline), GC_ALLOC_DISPATCHTABLE);
+	class->dtable = (dispatchTable*)gc_malloc(sizeof(dispatchTable) + class->msize * DTABLE_METHODSIZE + ntramps * sizeof(methodTrampoline), GC_ALLOC_DISPATCHTABLE);
 	tramp = (methodTrampoline*) &class->dtable->method[class->msize];
 #else
-	class->dtable = (dispatchTable*)gc_malloc(sizeof(dispatchTable) + (class->msize * sizeof(void*)), GC_ALLOC_DISPATCHTABLE);
+	class->dtable = (dispatchTable*)gc_malloc(sizeof(dispatchTable) + (class->msize * DTABLE_METHODSIZE), GC_ALLOC_DISPATCHTABLE);
 #endif
 
 	class->dtable->class = class;
@@ -866,9 +870,18 @@
 
 	/* Install inherited methods into dispatch table. */
 	if (class->superclass != NULL) {
+#ifdef GUARANA
+		dispatchMethod* super_mtab = class->superclass->dtable->method;
+#else
 		Method** super_mtab = (Method**)class->superclass->dtable->method;
+#endif
 		for (i = 0; i < class->superclass->msize; i++) {
+#ifdef GUARANA
+			DMETHOD_ADDR(mtab[i]) = DMETHOD_ADDR(super_mtab[i]);
+			DMETHOD_DESC(mtab[i]) = DMETHOD_DESC(super_mtab[i]);
+#else
 			mtab[i] = super_mtab[i];
+#endif
 		}
 	}
 
@@ -888,7 +901,12 @@
 			tramp++;
 		}
 		if (meth->idx >= 0) {
+#ifdef GUARANA
+		        DMETHOD_DESC(mtab[meth->idx]) = meth;
+		        DMETHOD_ADDR(mtab[meth->idx]) = METHOD_NATIVECODE(meth);
+#else
 			mtab[meth->idx] = METHOD_NATIVECODE(meth);
+#endif
 		}
 	}
 	FLUSH_DCACHE(class->dtable, tramp);
@@ -904,7 +922,11 @@
 	 * See "Java Language Specification" (1996) section 12.3.2. */
 	if ((class->accflags & ACC_ABSTRACT) == 0) {
 		for (i = class->msize - 1; i >= 0; i--) {
+#ifdef GUARANA
+			if (DMETHOD_ADDR(mtab[i]) == NULL) {
+#else
 			if (mtab[i] == NULL) {
+#endif
 				throwException(AbstractMethodError);
 			}
 		}
@@ -953,7 +975,7 @@
 	int idx;
 	constants* pool;
 
-	lockMutex(class->centry);
+	lockCEntryMutex(class->centry);
 
 	/* Scan constant pool and convert any constant strings into true
 	 * java strings.
@@ -972,7 +994,7 @@
 		}
 	}
 
-	unlockMutex(class->centry);
+	unlockCEntryMutex(class->centry);
 }
 
 classEntry*
@@ -1182,11 +1204,11 @@
 	}
 
 	/* Lock class entry */
-	lockMutex(centry);
+	lockCEntryMutex(centry);
 
 	/* Incase someone else did it */
 	if (centry->class != 0) {
-		unlockMutex(centry);
+		unlockCEntryMutex(centry);
 #if !INTERN_UTF8CONSTS
 		gc_free(arr_name);
 #endif
@@ -1212,7 +1234,7 @@
 	arr_class->state = CSTATE_OK;
 	arr_class->centry = centry;
 
-	unlockMutex(centry);
+	unlockCEntryMutex(centry);
 
 	found:;
 	if (CLASS_IS_PRIMITIVE(c)) {
Index: kaffe/kaffe/kaffevm/classMethod.h
diff -u kaffe/kaffe/kaffevm/classMethod.h:1.1.1.9.2.1 kaffe/kaffe/kaffevm/classMethod.h:1.15.2.1
--- kaffe/kaffe/kaffevm/classMethod.h:1.1.1.9.2.1	Sun Aug  9 08:38:14 1998
+++ kaffe/kaffe/kaffevm/classMethod.h	Fri Aug  7 03:44:42 1998
@@ -138,16 +138,49 @@
 	constIndex*		declared_exceptions;
 } methods;
 
+#ifdef GUARANA
+
+#if defined(TRANSLATOR)
+
+#define METHOD_NATIVEOFFSET	((int)&(((methods*)0)->ncode))
+
+typedef struct _dispatchMethod {
+	void *addr;
+	Method *desc;
+} dispatchMethod;
+
+#define DMETHOD_ADDR(dm)	((dm).addr)
+#define DMETHOD_DESC(dm)	((dm).desc)
+#define DMETHOD_DESCOFFSET	((int)&(((dispatchMethod*)0)->desc))
+
+#else
+typedef void *dispatchMethod;
+
+#define DMETHOD_ADDR(dm)	(dm)
+#define DMETHOD_DESC(dm)	(dm)
+#define DMETHOD_DESCOFFSET	0
+#endif
+#endif
+
 typedef struct _dispatchTable {
 	Hjava_lang_Class*	class;
-	void*			method[1];
+#ifdef GUARANA
+        dispatchMethod		method[1];
+#else
+        void*			method[1];
+#endif
 } dispatchTable;
 
 #define	CLASS_STATE		((int)&(((Hjava_lang_Class*)0)->state))
 
 #define	DTABLE_CLASS		0
+#ifdef GUARANA
+#define	DTABLE_METHODOFFSET	((int)&(((dispatchTable*)0)->method[0]))
+#define	DTABLE_METHODSIZE	(sizeof(((dispatchTable*)0)->method[0]))
+#else
 #define	DTABLE_METHODOFFSET	(sizeof(void*))
 #define	DTABLE_METHODSIZE	(sizeof(void*))
+#endif
 
 typedef struct _fields {
 	Utf8Const*		name;
Index: kaffe/kaffe/kaffevm/exception.c
diff -u kaffe/kaffe/kaffevm/exception.c:1.1.1.9.2.1 kaffe/kaffe/kaffevm/exception.c:1.4.2.1
--- kaffe/kaffe/kaffevm/exception.c:1.1.1.9.2.1	Sun Aug  9 08:38:21 1998
+++ kaffe/kaffe/kaffevm/exception.c	Fri Aug  7 03:44:49 1998
@@ -167,7 +167,7 @@
 			/* If not here, exit monitor if synchronised. */
 			lk = getLock(obj);
 			if (lk != 0 && lk->holder == (*Kaffe_ThreadInterface.currentNative)()) {
-				unlockMutex(obj);
+				unlockObjMutex(obj);
 			}
 		}
 	}
@@ -209,7 +209,7 @@
 			/* If method found and synchronised, unlock the lock */
 			lk = getLock(obj);
 			if (lk != 0 && lk->holder == (*Kaffe_ThreadInterface.currentNative)()) {
-				unlockMutex(obj);
+				unlockObjMutex(obj);
 			}
 		}
 	}
Index: kaffe/kaffe/kaffevm/external.c
diff -u kaffe/kaffe/kaffevm/external.c:1.1.1.7 kaffe/kaffe/kaffevm/external.c:1.4.2.2
--- kaffe/kaffe/kaffevm/external.c:1.1.1.7	Sat Jun 13 14:33:38 1998
+++ kaffe/kaffe/kaffevm/external.c	Fri Sep 11 22:14:36 1998
@@ -10,7 +10,7 @@
  */
 
 #define	DBG(s)
-#define	LDBG(s)
+#define	LDBG(s) s
 
 #include "config.h"
 #include "config-std.h"
Index: kaffe/kaffe/kaffevm/findInJar.c
diff -u kaffe/kaffe/kaffevm/findInJar.c:1.1.1.9 kaffe/kaffe/kaffevm/findInJar.c:1.7
--- kaffe/kaffe/kaffevm/findInJar.c:1.1.1.9	Tue Jun 30 03:28:17 1998
+++ kaffe/kaffe/kaffevm/findInJar.c	Tue Jun 30 03:53:38 1998
@@ -96,7 +96,7 @@
 			class = newClass();
 		}
 
-		lockMutex(centry);
+		lockCEntryMutex(centry);
 
 		class->name = centry->name;
 		class->centry = centry;
@@ -104,7 +104,7 @@
 		readClass(class, &hand, NULL);
 		class->state = CSTATE_LOADED;
 
-		unlockMutex(centry);
+		unlockCEntryMutex(centry);
 
 		if (hand.base != 0) {
 			gc_free_fixed(hand.base);
Index: kaffe/kaffe/kaffevm/jni.c
diff -u kaffe/kaffe/kaffevm/jni.c:1.1.1.2 kaffe/kaffe/kaffevm/jni.c:1.3.2.2
--- kaffe/kaffe/kaffevm/jni.c:1.1.1.2	Tue Jun 30 03:28:23 1998
+++ kaffe/kaffe/kaffevm/jni.c	Tue Sep 29 17:05:56 1998
@@ -14,6 +14,9 @@
 #endif
 
 #include "config.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 #include "config-std.h"
 #include "jni.h"
 #include "jnirefs.h"
@@ -386,7 +389,18 @@
 	}
 	obj = newObject(clazz);
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(obj);
 	END_EXCEPTION_HANDLING();
@@ -426,7 +440,18 @@
 	}
 	obj = newObject(clazz);
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(obj);
 	END_EXCEPTION_HANDLING();
@@ -493,7 +518,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -529,7 +565,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.l);
@@ -548,7 +595,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -583,7 +641,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -602,7 +671,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -637,7 +717,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -656,7 +747,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -691,7 +793,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -710,7 +823,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -745,7 +869,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -764,7 +899,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -799,7 +945,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -818,7 +975,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -853,7 +1021,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -872,7 +1051,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -907,7 +1097,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -926,7 +1127,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -961,7 +1173,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -979,7 +1202,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, 0);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, 0);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, 0);
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -1010,7 +1244,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, 0);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, 0);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, 0);
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -1027,7 +1272,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -1062,7 +1318,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -1081,7 +1348,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -1115,7 +1393,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -1133,7 +1422,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -1167,7 +1467,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -1185,7 +1496,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -1219,7 +1541,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -1237,7 +1570,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -1271,7 +1615,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -1289,7 +1644,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -1323,7 +1689,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -1341,7 +1718,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -1375,7 +1763,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -1393,7 +1792,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -1427,7 +1837,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -1445,7 +1866,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -1479,7 +1911,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -1496,7 +1939,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, 0);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, 0);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -1526,7 +1980,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, 0);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, 0);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -1776,7 +2241,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -1811,7 +2287,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -1830,7 +2317,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -1864,7 +2362,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -1882,7 +2391,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -1916,7 +2436,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -1934,7 +2465,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -1968,7 +2510,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -1986,7 +2539,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -2020,7 +2584,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -2038,7 +2613,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -2072,7 +2658,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -2090,7 +2687,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -2124,7 +2732,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -2142,7 +2761,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -2176,7 +2806,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -2194,7 +2835,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -2228,7 +2880,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -2246,7 +2909,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -2276,7 +2950,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, 0);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, 0);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -3366,7 +4051,7 @@
 {
 	BEGIN_EXCEPTION_HANDLING(0);
 
-	lockMutex(obj);
+	lockObjMutex(obj);
 
 	END_EXCEPTION_HANDLING();
 	return (0);
@@ -3377,7 +4062,7 @@
 {
 	BEGIN_EXCEPTION_HANDLING(0);
 
-	unlockMutex(obj);
+	unlockObjMutex(obj);
 
 	END_EXCEPTION_HANDLING();
 	return (0);
@@ -3673,9 +4358,9 @@
 		maxTemp = tmpslot;
 	}
 	finishInsnSequence(&ncode);
+
+	installMethodCode(xmeth, &ncode);
 
-	/* Install it */
-	SET_METHOD_NATIVECODE(xmeth, ncode.code);
 	xmeth->accflags |= ACC_JNI;
 }
 #endif
Index: kaffe/kaffe/kaffevm/kaffe.def
diff -u kaffe/kaffe/kaffevm/kaffe.def:1.1.1.9 kaffe/kaffe/kaffevm/kaffe.def:1.17
--- kaffe/kaffe/kaffevm/kaffe.def:1.1.1.9	Wed May 13 05:39:31 1998
+++ kaffe/kaffe/kaffevm/kaffe.def	Wed Jul  8 06:04:37 1998
@@ -1,4 +1,4 @@
-/*
+/* -*- C -*-
  * kaffe.def
  * Kaffe instruction definitions.
  *
@@ -9,6 +9,10 @@
  * of this file. 
  */
 
+#ifdef GUARANA
+# define guarana_spill_and_clean_registers() end_sub_block()
+#endif
+
 define_insn(NOP)
 {
         /*
@@ -315,10 +319,36 @@
 
 	CHECK_NULL (IALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(IALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_int(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(IALOAD, 33));
+
+	set_label(IALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), int, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(IALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -332,10 +362,35 @@
 
 	CHECK_NULL (LALOAD, stack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(LALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_long(stack_long(0), stack(1), stack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(LALOAD, 33));
+
+	set_label(LALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), long, stack_long(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(LALOAD, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(FALOAD)
@@ -348,11 +403,36 @@
 
 	CHECK_NULL (FALOAD, stack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(FALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_float(stack(1), stack(1), stack(0), object_array_offset);
 
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(FALOAD, 33));
+
+	set_label(FALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), float, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(FALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -366,10 +446,35 @@
 
 	CHECK_NULL (DALOAD, stack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(DALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_double(stack_double(0), stack(1), stack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(DALOAD, 33));
+
+	set_label(DALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), double, stack_double(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(DALOAD, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(AALOAD)
@@ -382,10 +487,36 @@
 
 	CHECK_NULL(AALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(AALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_ref(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(AALOAD, 33));
+
+	set_label(AALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), ref, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(AALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -399,10 +530,36 @@
 
 	CHECK_NULL(BALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(BALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_byte(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(BALOAD, 33));
+
+	set_label(BALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), byte, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(BALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -416,10 +573,36 @@
 
 	CHECK_NULL(CALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(CALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_char(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(CALOAD, 33));
+
+	set_label(CALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), char, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(CALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -433,10 +616,36 @@
 
 	CHECK_NULL(SALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(SALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_short(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(SALOAD, 33));
+
+	set_label(SALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), short, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(SALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -591,10 +800,36 @@
 
 	CHECK_NULL(IASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(IASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_int(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(IASTORE, 33));
+
+	set_label(IASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), int, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(IASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -609,10 +844,36 @@
 
 	CHECK_NULL(LASTORE, stack(3), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(3), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(LASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(3), rstack(2));
 
 	store_offset_scaled_long(stack(3), stack(2), object_array_offset, stack_long(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(LASTORE, 33));
+
+	set_label(LASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(3), rstack(2), long, stack_long(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(LASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(4);
 }
 
@@ -627,10 +888,36 @@
 
 	CHECK_NULL(FASTORE, stack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(FASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_float(stack(2), stack(1), object_array_offset, stack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(FASTORE, 33));
+
+	set_label(FASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), float, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(FASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -645,11 +932,36 @@
 
 	CHECK_NULL(DASTORE, stack(3), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(3), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(DASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(3), rstack(2));
 
 	store_offset_scaled_long(stack(3), stack(2), object_array_offset, stack_double(0));
 
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(DASTORE, 33));
+
+	set_label(DASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(3), rstack(2), double, stack_double(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(DASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(4);
 }
 
@@ -664,6 +976,16 @@
 
 	CHECK_NULL(AASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(AASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
@@ -672,6 +994,22 @@
 	SOFT_ADDREFERENCE(rstack(2), rstack(0));
 
 	store_offset_scaled_ref(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(AASTORE, 33));
+
+	set_label(AASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), ref, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(AASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -686,10 +1024,36 @@
 
 	CHECK_NULL(BASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(BASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_byte(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(BASTORE, 33));
+
+	set_label(BASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), byte, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(BASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -704,10 +1068,36 @@
 
 	CHECK_NULL(CASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(CASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_char(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(CASTORE, 33));
+
+	set_label(CASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), char, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(CASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -722,10 +1112,36 @@
 
 	CHECK_NULL(SASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(SASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_short(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(SASTORE, 33));
+
+	set_label(SASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), short, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(SASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -1884,6 +2300,17 @@
 	get_static_field_info(idx);
 	INIT_STATIC_CLASS(field_class());
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	move_ref_const(tmp2, finfo.class);
+	load_offset_ref(tmp2, tmp2, META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(GETSTATIC, 32));
+#endif
+
 	/* Use the proper load to increase the chances of the translator
 	   getting data in the right type of register.  */
 
@@ -1924,6 +2351,39 @@
 	default:
 		ABORT();
 	}
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(GETSTATIC, 33));
+
+	if (FIELD_ISREF(finfo.field)) {
+		pop(1);
+	}
+	else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	default:
+		pop(1);
+		break;
+	case 'J':
+	case 'D':
+		pop(2);
+		break;
+	}
+
+	set_label(GETSTATIC, 32);
+
+	start_sub_block();
+	slot_alloctmp(tmp);
+	move_ref_const(tmp, finfo.class);
+	push(1);
+	softcall_reify_field_load(tmp2, tmp);
+	slot_nowriteback(tmp);
+	slot_nowriteback(tmp2);
+	end_sub_block();
+
+	set_label(GETSTATIC, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(PUTSTATIC)
@@ -1938,6 +2398,17 @@
 	get_static_field_info(idx);
 	INIT_STATIC_CLASS(field_class());
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	move_ref_const(tmp2, finfo.class);
+	load_offset_ref(tmp2, tmp2, META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(PUTSTATIC, 32));
+#endif
+
 	if (FIELD_ISREF(finfo.field)) {
 		SOFT_ADDREFERENCE_STATIC(field_statics(), stack(0));
 		store_addr_ref(FIELD_ADDRESS(finfo.field), stack(0));
@@ -1976,6 +2447,40 @@
 	default:
 		ABORT();
 	}
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(PUTSTATIC, 33));
+
+	if (FIELD_ISREF(finfo.field)) {
+		push(1);
+	}
+	else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	default:
+		push(1);
+		break;
+	case 'J':
+	case 'D':
+		push(2);
+		break;
+	}
+
+	set_label(PUTSTATIC, 32);
+	
+	start_sub_block();
+
+	slot_alloctmp(tmp);
+	move_ref_const(tmp, finfo.class);
+	softcall_reify_field_store(tmp2, tmp);
+
+	slot_nowriteback(tmp);
+	slot_nowriteback(tmp2);
+
+	end_sub_block();
+
+	set_label(PUTSTATIC, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(GETFIELD)
@@ -1995,6 +2500,17 @@
 	/* Use the proper load to increase the chances of the translator
 	   getting data in the right type of register.  */
 
+#ifdef GUARANA
+	slot_alloctmp(tmp);
+	move_ref(tmp, rstack(0));
+	slot_alloctmp(tmp2);
+	load_offset_ref(tmp2, tmp, META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(GETFIELD, 32));
+#endif
+
 	if (FIELD_ISREF(finfo.field)) {
 		load_offset_ref(stack(0), rstack(0), FIELD_OFFSET(finfo.field));
 	}
@@ -2027,6 +2543,32 @@
 	default:
 		ABORT();
 	}
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(GETFIELD, 33));
+
+	if (!FIELD_ISREF(finfo.field))
+	  switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	  case 'J':
+	  case 'D':
+	    pop(1);
+	    break;
+	}
+
+	set_label(GETFIELD, 32);
+	
+	start_sub_block();
+	softcall_reify_field_load(tmp2, tmp);
+	slot_nowriteback(tmp2);
+	slot_nowriteback(tmp);
+
+	end_sub_block();
+
+	set_label(GETFIELD, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(PUTFIELD)
@@ -2040,6 +2582,43 @@
 
 	get_field_info(idx);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp);
+	slot_alloctmp(tmp2);
+
+	/* since we have moved the check_stack_ref and CHECK_NULL
+	   tests here, they might have been commented out from the
+	   non-intercepted branch, but then, they usually expand to
+	   nothing... */
+
+	if (FIELD_ISREF(finfo.field)) {
+	  check_stack_ref(1);
+	  move_ref(tmp, rstack(1));
+	  CHECK_NULL(PUTFIELD, tmp, 42);
+	} else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	default:
+	  check_stack_ref(1);
+	  move_ref(tmp, rstack(1));
+	  CHECK_NULL(PUTFIELD, tmp, 43);
+	  break;
+	case 'J':
+	  check_stack_ref(2);
+	  move_ref(tmp, rstack(2));
+	  CHECK_NULL(PUTFIELD, tmp, 44);
+	  break;
+	case 'D':
+	  check_stack_ref(2);
+	  move_ref(tmp, rstack(2));
+	  CHECK_NULL(PUTFIELD, tmp, 44);
+	  break;
+	}
+	load_offset_ref(tmp2, tmp, META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(PUTFIELD, 32));
+#endif
+
 	/* Use the proper store to increase the chances of the translator
 	   having the data in the right type of register already.  */
 
@@ -2097,6 +2676,38 @@
 	default:
 		ABORT();
 	}
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(PUTFIELD, 33));
+
+	if (FIELD_ISREF(finfo.field)) {
+	  push(2);
+	} else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	default:
+	  push(2);
+	  break;
+	case 'J':
+	case 'D':
+	  push(3);
+	  break;
+	}
+
+	set_label(PUTFIELD, 32);
+	
+	start_sub_block();
+	softcall_reify_field_store(tmp2, tmp);
+	pop(1);
+
+	slot_nowriteback(tmp2);
+	slot_nowriteback(tmp);
+
+	end_sub_block();
+
+	set_label(PUTFIELD, 33);
+	start_sub_block();
+#endif
 }
 
 #define	METHOD_RETURN_VALUE()					\
@@ -2163,6 +2774,14 @@
 
 		check_stack_ref(idx);
 
+#ifdef GUARANA
+		guarana_spill_and_clean_registers();
+
+		load_offset_ref(tmp, rstack(idx), META_OBJECT_OFFSET);
+
+		cbranch_ref_const_ne(tmp, 0, reference_label(INVOKEVIRTUAL, 26));
+#endif
+
 		/* Find dispatch table in object */
 		load_offset_ref(mtable, stack(idx), method_dtable_offset);
 
@@ -2185,6 +2804,38 @@
 		/* Pop args */
 		popargs();
 
+#ifdef GUARANA
+		branch_a(reference_label(INVOKEVIRTUAL, 27));
+
+		push(idx);
+		--idx;
+
+		set_label(INVOKEVIRTUAL, 26);
+		/* Otherwise call through MetaObject */
+
+		start_sub_block();
+
+		/* Find dispatch table in object */
+		load_offset_ref(mtable, stack(idx), method_dtable_offset);
+
+		load_offset_ref(tmp, mtable,
+				DTABLE_METHODOFFSET + DMETHOD_DESCOFFSET +
+				method_idx() * DTABLE_METHODSIZE);
+ 			
+		slot_nowriteback(tmp);
+
+		/* Call it */
+		low = method_returntype();
+		softcall_reify_method_invocation(tmp);
+
+		idx++;
+		pop(idx);
+
+		end_sub_block();
+
+		set_label(INVOKEVIRTUAL, 27);
+#endif
+
 		start_sub_block();
 		METHOD_RETURN_VALUE();
 	}
@@ -2217,6 +2868,18 @@
 
 		check_stack_ref(idx);
 
+#ifdef GUARANA
+		slot_alloctmp(tmp2);
+
+		load_offset_ref(tmp2, rstack(idx), META_OBJECT_OFFSET);
+
+		slot_nowriteback(tmp2);
+
+		guarana_spill_and_clean_registers();
+
+		cbranch_ref_const_ne(tmp2, 0, reference_label(INVOKESPECIAL, 28));
+#endif
+
 		/* Push arguments & object */
 		build_call_frame(method_sig(), stack(idx), idx);
 		idx++;
@@ -2232,6 +2895,31 @@
 		/* Pop args */
 		popargs();
 
+#ifdef GUARANA
+		branch_a(reference_label(INVOKESPECIAL, 29));
+
+		push(idx);
+		--idx;
+
+		set_label(INVOKESPECIAL, 28);
+		/* Otherwise call through MetaObject */
+
+		start_sub_block();
+
+		move_ref_const(tmp2, method_method());
+
+		/* Call it */
+		low = method_returntype();
+		softcall_reify_method_invocation(tmp2);
+
+		++idx;
+		pop(idx);
+
+		end_sub_block();
+
+		set_label(INVOKESPECIAL, 29);
+#endif
+
 		start_sub_block();
 		METHOD_RETURN_VALUE();
 	}
@@ -2258,6 +2946,19 @@
 	else {
 		idx = method_nargs();
 
+#ifdef GUARANA
+		slot_alloctmp(tmp2);
+
+		move_ref_const(tmp2, method_class ());
+		load_offset_ref(tmp2, tmp2, META_OBJECT_OFFSET);
+
+		slot_nowriteback(tmp2);
+
+		guarana_spill_and_clean_registers();
+		
+		cbranch_ref_const_ne(tmp2, 0, reference_label(INVOKESTATIC, 30));
+#endif
+
 		/* Push arguments */
 		build_call_frame(method_sig(), 0, idx);
 
@@ -2272,7 +2973,30 @@
 		/* Pop args */
 		popargs();
 
+#ifdef GUARANA
+		branch_a(reference_label(INVOKESTATIC, 31));
+
+		push(idx);
+
+		set_label(INVOKESTATIC, 30);
+		/* Otherwise call through MetaObject */
+
 		start_sub_block();
+
+		move_ref_const(tmp2, method_method());
+
+		/* Call it */
+		low = method_returntype();
+		softcall_reify_method_invocation(tmp2);
+
+		pop(idx);
+
+		end_sub_block();
+
+		set_label(INVOKESTATIC, 31);
+#endif
+
+		start_sub_block();
 		METHOD_RETURN_VALUE();
 	}
 }
@@ -2307,6 +3031,23 @@
 
 		softcall_lookupmethod(tmp, method_method(), stack(idx));
 
+#ifdef GUARANA
+		slot_alloctmp(tmp2);
+
+		load_offset_ref(tmp2, rstack(idx), META_OBJECT_OFFSET);
+
+		slot_nowriteback(tmp2);
+
+		guarana_spill_and_clean_registers();
+
+		cbranch_ref_const_ne(tmp2, 0, reference_label(INVOKEINTERFACE, 32));
+
+#ifdef TRANSLATOR
+		load_offset_ref(tmp, tmp, METHOD_NATIVEOFFSET);
+#endif
+
+#endif
+
 		/* Push arguments & object */
 		build_call_frame(method_sig(), stack(idx), idx);
 		idx++;
@@ -2322,7 +3063,31 @@
 		/* Pop args */
 		popargs();
 
+#ifdef GUARANA
+		branch_a(reference_label(INVOKEINTERFACE, 33));
+
+		push(idx);
+		--idx;
+
+		set_label(INVOKEINTERFACE, 32);
+		/* Otherwise call through MetaObject */
+
 		start_sub_block();
+
+		low = method_returntype();
+
+		/* Call it */
+		softcall_reify_method_invocation(tmp);
+
+		idx++;
+		pop(idx);
+
+		end_sub_block();
+
+		set_label(INVOKEINTERFACE, 33);
+#endif
+
+		start_sub_block();
 		METHOD_RETURN_VALUE();
 	}
 }
@@ -2376,7 +3141,38 @@
 
 	check_stack_array(0);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp);
+	slot_alloctmp(tmp2);
+
+	move_ref(tmp, rstack(0));
+	load_offset_ref(tmp2, tmp, META_OBJECT_OFFSET);
+
+	slot_nowriteback(tmp2);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(ARRAYLENGTH, 35));
+#endif
+
 	load_offset_int(stack(0), rstack(0), object_array_length);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(ARRAYLENGTH, 36));
+
+	set_label(ARRAYLENGTH, 35);
+
+	start_sub_block();
+
+	softcall_reify_arraylength(stack(0), rstack(0));
+
+	end_sub_block();
+
+	set_label(ARRAYLENGTH, 36);
+	start_sub_block();
+#endif
 }
 
 define_insn(ATHROW)
Index: kaffe/kaffe/kaffevm/locks.h
diff -u kaffe/kaffe/kaffevm/locks.h:1.1.1.7 kaffe/kaffe/kaffevm/locks.h:1.5.2.1
--- kaffe/kaffe/kaffevm/locks.h:1.1.1.7	Sat Jun 13 14:33:54 1998
+++ kaffe/kaffe/kaffevm/locks.h	Wed Sep  9 05:08:47 1998
@@ -13,9 +13,33 @@
 #define __locks_h
 
 #include "md.h"
+#include "guarana.h"
 
-#define	lockMutex			_lockMutex
-#define	unlockMutex			_unlockMutex
+#ifdef GUARANA
+
+struct Hjava_lang_Object;
+extern void guarana_reify_monitorEnter(struct Hjava_lang_Object *o);
+extern void guarana_reify_monitorExit(struct Hjava_lang_Object *o);
+
+# define lockObjMutex			guarana_reify_monitorEnter
+# define unlockObjMutex			guarana_reify_monitorExit
+
+# define lockCEntryMutex		_lockMutex
+# define unlockCEntryMutex		_unlockMutex
+
+#else
+
+# define lockObjMutex			_lockMutex
+# define unlockObjMutex			_unlockMutex
+
+# define lockCEntryMutex		_lockMutex
+# define unlockCEntryMutex		_unlockMutex
+
+#endif
+
+#define lockObjMutexDirect		_lockMutex
+#define unlockObjMutexDirect		_unlockMutex
+
 #define	waitCond			_waitCond
 #define	signalCond			_signalCond
 #define	broadcastCond			_broadcastCond
Index: kaffe/kaffe/kaffevm/lookup.c
diff -u kaffe/kaffe/kaffevm/lookup.c:1.1.1.8 kaffe/kaffe/kaffevm/lookup.c:1.7
--- kaffe/kaffe/kaffevm/lookup.c:1.1.1.8	Tue Jun 30 03:28:29 1998
+++ kaffe/kaffe/kaffevm/lookup.c	Tue Jun 30 03:53:42 1998
@@ -109,10 +109,10 @@
 		 * lock and get the tag & name again just in case.  If we
 		 * have been resolved then we just return the answer.
 		 */
-		lockMutex(this->centry);
+		lockCEntryMutex(this->centry);
 		tag = pool->tags[idx];
 		name = WORD2UTF(pool->data[idx]);
-		unlockMutex(this->centry);
+		unlockCEntryMutex(this->centry);
 
 		if (tag == CONSTANT_ResolvedClass) {
 			return (CLASS_CLASS(idx, pool));
@@ -140,10 +140,10 @@
 	/* Lock the class while we update the constant pool.  Someone
 	 * may have done this already but we don't care.
 	 */
-	lockMutex(this->centry);
+	lockCEntryMutex(this->centry);
 	pool->data[idx] = (ConstSlot)class;
 	pool->tags[idx] = CONSTANT_ResolvedClass;
-	unlockMutex(this->centry);
+	unlockCEntryMutex(this->centry);
 
 	return (class);
 }
Index: kaffe/kaffe/kaffevm/object.c
diff -u kaffe/kaffe/kaffevm/object.c:1.1.1.5 kaffe/kaffe/kaffevm/object.c:1.6
--- kaffe/kaffe/kaffevm/object.c:1.1.1.5	Mon Mar 30 20:13:31 1998
+++ kaffe/kaffe/kaffevm/object.c	Sun Apr 19 13:12:31 1998
@@ -30,6 +30,10 @@
 #include "external.h"
 #include "gc.h"
 
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
+
 extern Hjava_lang_Class* ThreadClass;
 
 extern gcFuncs gcFinalizeObject;
@@ -44,7 +48,11 @@
  * it with the object for it's later use.  Otherwise the object is normal.
  */
 Hjava_lang_Object*
+#ifdef GUARANA
+newObjectNoMessage(Hjava_lang_Class* class)
+#else
 newObject(Hjava_lang_Class* class)
+#endif
 {
 	Hjava_lang_Object* obj;
 	int type;
@@ -63,6 +71,10 @@
         /* Fill in object information */
         obj->dtable = class->dtable;
 
+#ifdef GUARANA
+	obj->meta_object = 0;
+#endif
+
 ADBG(	printf("newObject %x class %s\n", obj,
 		(class ? class->name->data : "<none>"));
 		fflush(stdout);						)
@@ -95,7 +107,11 @@
  * Allocate a new array, of whatever types.
  */
 Hjava_lang_Object*
+#ifdef GUARANA
+newArrayNoMessage(Hjava_lang_Class* elclass, int count)
+#else
 newArray(Hjava_lang_Class* elclass, int count)
+#endif
 {
 	Hjava_lang_Class* class;
 	Hjava_lang_Object* obj;
@@ -108,6 +124,9 @@
 	}
 	class = lookupArray(elclass);
 	obj->dtable = class->dtable;
+#ifdef GUARANA
+	obj->meta_object = 0;
+#endif
 	ARRAY_SIZE(obj) = count;
 	return (obj);
 }
@@ -116,17 +135,30 @@
  * Allocate a new multi-dimensional array.
  */
 Hjava_lang_Object*
+#ifdef GUARANA
+guarana_newMultiArray(Hjava_lang_Class *clazz, Hjava_lang_Object *creator, int *dims)
+#else
 newMultiArray(Hjava_lang_Class* clazz, int* dims)
+#endif
 {
 	Hjava_lang_Object* obj;
 	Hjava_lang_Object** array;
 	int i;
 	
+#ifdef GUARANA
+	obj = guarana_newArray(CLASS_ELEMENT_TYPE(clazz), dims[0], creator);
+#else
 	obj = newArray(CLASS_ELEMENT_TYPE(clazz), dims[0]);
+#endif
 	if (dims[1] > 0) {
 		array = OBJARRAY_DATA(obj);
 		for (i = 0; i < dims[0]; i++) {
+#ifdef GUARANA
+		        /* FIXME: reify assignment? */
+			array[i] = guarana_newMultiArray(CLASS_ELEMENT_TYPE(clazz), obj, &dims[1]);
+#else
 			array[i] = newMultiArray(CLASS_ELEMENT_TYPE(clazz), &dims[1]);
+#endif
 		}
 	}
 
Index: kaffe/kaffe/kaffevm/object.h
diff -u kaffe/kaffe/kaffevm/object.h:1.1.1.4 kaffe/kaffe/kaffevm/object.h:1.4
--- kaffe/kaffe/kaffevm/object.h:1.1.1.4	Mon Mar 30 20:13:33 1998
+++ kaffe/kaffe/kaffevm/object.h	Sun Apr 19 13:12:33 1998
@@ -33,6 +33,10 @@
 #define	ARRAY_SIZE_OFFSET	((int)&ARRAY_SIZE(0))
 #define	ARRAY_DATA_OFFSET	((int)(((Array*)0)+1))
 
+#ifdef GUARANA
+#define META_OBJECT_OFFSET      ((int)&(*(Hjava_lang_Object*)0).meta_object)
+#endif
+
 struct Hjava_lang_Class;
 
 Hjava_lang_Object*	newObject(struct Hjava_lang_Class*);
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.1.1.7 kaffe/kaffe/kaffevm/soft.c:1.13
--- kaffe/kaffe/kaffevm/soft.c:1.1.1.7	Sat Jun 13 14:34:00 1998
+++ kaffe/kaffe/kaffevm/soft.c	Sat Jun 13 15:02:09 1998
@@ -35,16 +35,28 @@
 #include "baseClasses.h"
 #include "itypes.h"
 
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
+
 /*
  * soft_new
  */
 void*
+#ifdef GUARANA
+soft_new(Hjava_lang_Class* c, Hjava_lang_Object *creator)
+#else
 soft_new(Hjava_lang_Class* c)
+#endif
 {
 	Hjava_lang_Object* obj;
 
 	processClass(c, CSTATE_OK);
+#ifdef GUARANA
+	obj = guarana_newObject(c, creator);
+#else
 	obj = newObject(c);
+#endif
 
 DBG(NEWINSTR,	
 	dprintf("New object of type %s (%d,%x)\n", 
@@ -57,7 +69,11 @@
  * soft_newarray
  */
 void*
+#ifdef GUARANA
+soft_newarray(jint type, jint size, struct Hjava_lang_Object *creator)
+#else
 soft_newarray(jint type, jint size)
+#endif
 {
 	Hjava_lang_Object* obj;
 
@@ -65,7 +81,12 @@
 		throwException(NegativeArraySizeException);
 	}
 
+
+#ifdef GUARANA
+	obj = guarana_newArray(TYPE_CLASS(type), size, creator);
+#else
 	obj = newArray(TYPE_CLASS(type), size);
+#endif
 
 DBG(NEWINSTR,	
 	dprintf("New array of %s [%d] (%x)\n", 
@@ -78,7 +99,11 @@
  * soft_anewarray
  */
 void*
+#ifdef GUARANA
+soft_anewarray(Hjava_lang_Class* elclass, jint size, struct Hjava_lang_Object *creator)
+#else
 soft_anewarray(Hjava_lang_Class* elclass, jint size)
+#endif
 {
 	Hjava_lang_Object* obj;
 
@@ -86,7 +111,11 @@
 		throwException(NegativeArraySizeException);
 	}
 
+#ifdef GUARANA
+	obj = guarana_newArray(elclass, size, creator);
+#else
 	obj = newArray(elclass, size);
+#endif
 
 DBG(NEWINSTR,	
 	dprintf("New array object [%d] of %s (%x)\n", size,
@@ -101,7 +130,11 @@
 
 #if defined(INTERPRETER)
 void*
+#ifdef GUARANA
+soft_multianewarray(Hjava_lang_Class* class, struct Hjava_lang_Object *creator, jint dims, slots* args)
+#else
 soft_multianewarray(Hjava_lang_Class* class, jint dims, slots* args)
+#endif
 {
         int array[MAXDIMS];
         Hjava_lang_Object* obj;
@@ -130,7 +163,11 @@
         arraydims[i] = 0;
 
         /* Mmm, okay now build the array using the wonders of recursion */
+#ifdef GUARANA
+	obj = guarana_newMultiArray(class, creator, arraydims);
+#else
         obj = newMultiArray(class, arraydims);
+#endif
 
 
 	if (arraydims != array) {
@@ -144,7 +181,11 @@
 
 #if defined(TRANSLATOR)
 void*
+#ifdef GUARANA
+soft_multianewarray(Hjava_lang_Class* class, struct Hjava_lang_Object *creator, jint dims, ...)
+#else
 soft_multianewarray(Hjava_lang_Class* class, jint dims, ...)
+#endif
 {
 	va_list ap;
 	int array[MAXDIMS];
@@ -173,7 +214,11 @@
 	va_end(ap);
 
 	/* Mmm, okay now build the array using the wonders of recursion */
+#ifdef GUARANA
+	obj = guarana_newMultiArray(class, creator, arraydims);
+#else
         obj = newMultiArray(class, arraydims);
+#endif
 
 	if (arraydims != array) {
 		gc_free_fixed(arraydims);
@@ -199,7 +244,7 @@
 		throwException(NoSuchMethodError(name->data));
 	}
 
-#if defined(TRANSLATOR)
+#if defined(TRANSLATOR) && !defined(GUARANA)
 	return (METHOD_NATIVECODE(meth));
 #else
 	return (meth);
@@ -432,7 +477,11 @@
 
 	/* Update dispatch table */
 	if (meth->idx >= 0) {
+#ifdef GUARANA
+		DMETHOD_ADDR(meth->class->dtable->method[meth->idx]) = METHOD_NATIVECODE(meth);
+#else
 		meth->class->dtable->method[meth->idx] = METHOD_NATIVECODE(meth);
+#endif
 	}
 
 #if 0
Index: kaffe/kaffe/kaffevm/soft.h
diff -u kaffe/kaffe/kaffevm/soft.h:1.1.1.5 kaffe/kaffe/kaffevm/soft.h:1.8
--- kaffe/kaffe/kaffevm/soft.h:1.1.1.5	Mon Mar 30 20:13:46 1998
+++ kaffe/kaffe/kaffevm/soft.h	Sun Apr 19 13:12:36 1998
@@ -16,9 +16,15 @@
 struct Hjava_lang_Class;
 struct Hjava_lang_Object;
 
+#ifdef GUARANA
+void*	soft_new(struct Hjava_lang_Class*, struct Hjava_lang_Object* creator);
+void*	soft_newarray(jint, jint, struct Hjava_lang_Object* creator);
+void*	soft_anewarray(struct Hjava_lang_Class*, jint, struct Hjava_lang_Object* creator);
+#else
 void*	soft_new(struct Hjava_lang_Class*);
 void*	soft_newarray(jint, jint);
 void*	soft_anewarray(struct Hjava_lang_Class*, jint);
+#endif
 void	soft_initialise_class(struct Hjava_lang_Class*);
 nativecode* soft_get_method_code (Method*);
 
@@ -43,8 +49,12 @@
 jint	soft_rem(jint, jint);
 
 #if defined(INTERPRETER)
+#ifdef GUARANA
+void*	soft_multianewarray(struct Hjava_lang_Class*, struct Hjava_lang_Object *creator, jint, slots*);
+#else
 void*	soft_multianewarray(struct Hjava_lang_Class*, jint, slots*);
 #endif
+#endif
 
 #if defined(TRANSLATOR)
 jlong	soft_lmul(jlong, jlong);
@@ -58,7 +68,11 @@
 jlong	soft_ashrl(jlong, jint);
 jlong	soft_lshrl(jlong, jint);
 jint	soft_lcmp(jlong, jlong);
+#ifdef GUARANA
+void*	soft_multianewarray(struct Hjava_lang_Class*, struct Hjava_lang_Object *creator, jint, ...);
+#else
 void*	soft_multianewarray(struct Hjava_lang_Class*, jint, ...);
+#endif
 #endif
 
 jlong	soft_cvtil(jint);
Index: kaffe/kaffe/kaffevm/support.c
diff -u kaffe/kaffe/kaffevm/support.c:1.1.1.14 kaffe/kaffe/kaffevm/support.c:1.16
--- kaffe/kaffe/kaffevm/support.c:1.1.1.14	Tue Jun 30 03:28:35 1998
+++ kaffe/kaffe/kaffevm/support.c	Tue Jun 30 03:53:46 1998
@@ -32,6 +32,10 @@
 #include "thread.h"
 #include "locks.h"
 
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
+
 #if !defined(HAVE_GETTIMEOFDAY)
 #include <sys/timeb.h>
 #endif
@@ -60,6 +64,9 @@
 	char* sig;
 	int args;
 	jvalue retval;
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo;
+#endif
 
 	if (mb == 0) {
 		if (isStaticCall) {
@@ -80,7 +87,20 @@
 		throwException(NoSuchMethodError(method_name));
 	}
 
+#ifdef GUARANA
+	if (isStaticCall) {
+	  mo = mb->class->head.meta_object;
+	} else {
+	  mo = ((struct Hjava_lang_Object *)obj)->meta_object;
+	}
+	if (mo) {
+	  guarana_va_list_reify_method_invocation(mo, obj, mb, argptr, (slots*)&retval);
+	} else {
+#endif
 	callMethodV(mb, METHOD_INDIRECTMETHOD(mb), obj, argptr, &retval);
+#ifdef GUARANA
+	}
+#endif
 
 	return (retval);
 }
@@ -109,6 +129,9 @@
 	Method* mb;
 	jvalue retval;
 	char cnname[CLASSMAXSIG];	/* Unchecked buffer - FIXME! */
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo;
+#endif
 
 	/* Convert "." to "/" */
 	classname2pathname(cname, cnname);
@@ -121,7 +144,17 @@
 	}
 
 	/* Make the call */
+#ifdef GUARANA
+	mo = mb->class->head.meta_object;
+
+	if (mo) {
+	  guarana_va_list_reify_method_invocation(mo, 0, mb, argptr, (slots*)&retval);
+	} else {
+#endif
 	callMethodV(mb, METHOD_INDIRECTMETHOD(mb), 0, argptr, &retval);
+#ifdef GUARANA
+	}
+#endif
 
 	return (retval);
 }
@@ -151,6 +184,9 @@
 	Method* mb;
 	char buf[MAXEXCEPTIONLEN];
 	jvalue retval;
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo;
+#endif
 
 	if (cc == 0) {
 		/* Convert "." to "/" */
@@ -178,7 +214,16 @@
 	assert(obj != 0);
 
 	/* Make the call */
+#ifdef GUARANA
+	mo = ((struct Hjava_lang_Object *)obj)->meta_object;
+	if (mo) {
+	  guarana_va_list_reify_method_invocation(mo, obj, mb, argptr, (slots*)&retval);
+	} else {
+#endif
 	callMethodV(mb, METHOD_INDIRECTMETHOD(mb), obj, argptr, &retval);
+#ifdef GUARANA
+	}
+#endif
 
 	return (obj);
 }
@@ -354,7 +399,7 @@
 			else {
 				sync = (Hjava_lang_Object*)call.args[0].l;
 			}
-			lockMutex(sync);
+			lockObjMutex(sync);
 		}
 		else {
 			sync = 0;
@@ -364,7 +409,7 @@
 		sysdepCallMethod(&call);
 
 		if (sync != 0) {
-			unlockMutex(sync);
+			unlockObjMutex(sync);
 		}
 	}
 #endif
@@ -529,7 +574,7 @@
 			else {
 				sync = (Hjava_lang_Object*)call.args[0].l;
 			}
-			lockMutex(sync);
+			lockObjMutex(sync);
 		}
 		else {
 			sync = 0;
@@ -539,7 +584,7 @@
 		sysdepCallMethod(&call);
 
 		if (sync != 0) {
-			unlockMutex(sync);
+			unlockObjMutex(sync);
 		}
 	}
 #endif
Index: kaffe/kaffe/kaffevm/thread.c
diff -u kaffe/kaffe/kaffevm/thread.c:1.1.1.10.2.1 kaffe/kaffe/kaffevm/thread.c:1.5.2.1
--- kaffe/kaffe/kaffevm/thread.c:1.1.1.10.2.1	Sun Aug  9 08:38:28 1998
+++ kaffe/kaffe/kaffevm/thread.c	Fri Aug  7 03:44:57 1998
@@ -117,10 +117,10 @@
 	else {
 #ifdef LET_TIM_DECIDE_IF_HE_REALLY_WANTS_THAT
 		/* Stop the thread - and wait for it to terminate */
-		lockMutex(tid);
+		lockObjMutex(tid);
 		(*Kaffe_ThreadInterface.stop)(tid);
 		waitCond(tid, 0);
-		unlockMutex(tid);
+		unlockObjMutex(tid);
 #else
 		/* 
 		 * Waiting for the thread to exit could cause a deadlock,
Index: kaffe/kaffe/kaffevm/intrp/icode.h
diff -u kaffe/kaffe/kaffevm/intrp/icode.h:1.1.1.6 kaffe/kaffe/kaffevm/intrp/icode.h:1.10
--- kaffe/kaffe/kaffevm/intrp/icode.h:1.1.1.6	Wed May 13 05:40:23 1998
+++ kaffe/kaffe/kaffevm/intrp/icode.h	Wed May 13 08:21:01 1998
@@ -142,6 +142,10 @@
 #define	return_float(s)				(s)[0].v.tfloat = retval[0].v.tfloat
 #define	return_double(s)			(s)[0].v.tdouble = retval[0].v.tdouble
 #define	return_ref(s)				(s)[0].v.taddr = retval[0].v.taddr
+#define return_boolean return_int
+#define return_byte return_int
+#define return_short return_int
+#define return_char return_int
 
 #define	monitor_enter()				/* Not needed for interpreter */
 #define	monitor_exit()				/* Not needed for interpreter */
@@ -268,18 +272,29 @@
 #define	cvt_double_float(t, f)			(t)[0].v.tfloat = (f)[0].v.tdouble
 
 #define	softcall_lookupmethod(r, n, t)		(r)[0].v.taddr = soft_lookupmethod((t)[0].v.taddr, (n)->name, (n)->signature)
+#ifdef GUARANA
+#define CREATOR ((methaccflags & ACC_STATIC) ? &meth->class->head : (Hjava_lang_Object*)local(0)->v.taddr)
+#define	softcall_new(r, t)			(r)->v.taddr = soft_new(t, CREATOR)
+#define	softcall_newarray(r, s, t)		(r)->v.taddr = soft_newarray(t, (s)->v.tint, CREATOR)
+#define	softcall_anewarray(r, s, t)		(r)->v.taddr = soft_anewarray(t, (s)->v.tint, CREATOR)
+#else
 #define	softcall_new(r, t)			(r)->v.taddr = soft_new(t)
 #define	softcall_newarray(r, s, t)		(r)->v.taddr = soft_newarray(t, (s)->v.tint)
 #define	softcall_anewarray(r, s, t)		(r)->v.taddr = soft_anewarray(t, (s)->v.tint)
+#endif
 #define	softcall_athrow(s)			soft_athrow((s)[0].v.taddr)
 #define	softcall_checkcast(n, o, t)		soft_checkcast(t, (o)->v.taddr)
 #define softcall_initialise_class(cl)		soft_initialise_class(cl)
 #define	softcall_instanceof(r, o, t)		(r)->v.tint = soft_instanceof(t, (o)->v.taddr)
 
-#define	softcall_monitorenter(o)		lockMutex((o)[0].v.taddr)
-#define	softcall_monitorexit(o)			unlockMutex((o)[0].v.taddr)
+#define	softcall_monitorenter(o)		lockObjMutex((o)[0].v.taddr)
+#define	softcall_monitorexit(o)			unlockObjMutex((o)[0].v.taddr)
 
+#ifdef GUARANA
+#define	softcall_multianewarray(r, z, s, t)	(r)->v.taddr = soft_multianewarray(t, CREATOR, z, s)
+#else
 #define	softcall_multianewarray(r, z, s, t)	(r)->v.taddr = soft_multianewarray(t, z, s)
+#endif
 
 #define	softcall_badarrayindex()		soft_badarrayindex()
 #define	softcall_nullpointer()			soft_nullpointer()
@@ -296,5 +311,66 @@
 						}
 #define	build_call_frame(SIG, OBJ, NRARGS)	/* Not needed for interpreter */
 
+
+#ifdef GUARANA
+#define softcall_reify_method_invocation(method) \
+  guarana_slots_reify_method_invocation((((Method*)((method)->v.taddr))->accflags & ACC_STATIC) ? 0 : (rstack(idx))->v.taddr, \
+					(method)->v.taddr, \
+					rstack(idx-1), retval)
+
+#define softcall_reify_field_load(mo, obj) do { \
+  jvalue *res; \
+  if (FIELD_ISREF(finfo.field)) \
+    res = (jvalue *)wstack(0); \
+  else \
+    switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) { \
+    case 'J': \
+      res = (jvalue *)stack_long(-1); \
+      push(1); \
+      break; \
+    case 'D': \
+      res = (jvalue *)stack_double(-1); \
+      push(1); \
+      break; \
+    default: \
+      res = (jvalue *)wstack(0); \
+      break; \
+    } \
+  guarana_reify_field_load((mo)->v.taddr, (obj)->v.taddr, finfo.class, finfo.field, res); \
+} while (0)
+
+#define softcall_reify_field_store(mo, obj) do { \
+  jvalue *res; \
+  if (FIELD_ISREF(finfo.field)) { \
+    res = (jvalue *)rstack(0); \
+    pop(1); \
+  } else \
+    switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) { \
+    case 'J': \
+      res = (jvalue *)stack_long(0); \
+      pop(2); \
+      break; \
+    case 'D': \
+      res = (jvalue *)stack_double(0); \
+      pop(2); \
+      break; \
+    default: \
+      res = (jvalue *)rstack(0); \
+      pop(1); \
+      break; \
+    } \
+  guarana_reify_field_store((mo)->v.taddr, (obj)->v.taddr, finfo.class, finfo.field, res); \
+} while (0)
+
+#define softcall_reify_arraylength(to, from) \
+  (to)->v.tint = guarana_reify_arraylength((from)->v.taddr)
+
+#define softcall_reify_array_load(mo, obj, index, type, retto) \
+  guarana_reify_array_load((mo)->v.taddr, (obj)->v.taddr, (index)->v.tint, (jvalue*)&(retto)->v)
+
+#define softcall_reify_array_store(mo, obj, index, type, value) \
+  guarana_reify_array_store((mo)->v.taddr, (obj)->v.taddr, (index)->v.tint, (jvalue*)&(value)->v)
+
+#endif
 
 #endif
Index: kaffe/kaffe/kaffevm/intrp/machine.c
diff -u kaffe/kaffe/kaffevm/intrp/machine.c:1.1.1.9 kaffe/kaffe/kaffevm/intrp/machine.c:1.5
--- kaffe/kaffe/kaffevm/intrp/machine.c:1.1.1.9	Tue Jun 30 03:28:51 1998
+++ kaffe/kaffe/kaffevm/intrp/machine.c	Tue Jun 30 03:53:53 1998
@@ -41,6 +41,9 @@
 #include "checks.h"
 #include "errors.h"
 #include "md.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 
 /*
  * Define information about this engine.
@@ -171,7 +174,7 @@
 		else {
 			mobj = (Hjava_lang_Object*)lcl[0].v.taddr;
 		}
-		lockMutex(mobj);
+		lockObjMutex(mobj);
 	}       
 
 	sp = &lcl[meth->localsz - 1];
@@ -198,7 +201,7 @@
 
 	/* Unsync. if required */
 	if (mobj != 0) {
-		unlockMutex(mobj);
+		unlockObjMutex(mobj);
 	}       
 	if (tid != NULL && unhand(tid)->PrivateInfo != 0) {
 		unhand(tid)->exceptPtr = (struct Hkaffe_util_Ptr*)mjbuf.prev;
Index: kaffe/kaffe/kaffevm/jit/codeproto.h
diff -u kaffe/kaffe/kaffevm/jit/codeproto.h:1.1.1.5 kaffe/kaffe/kaffevm/jit/codeproto.h:1.3
--- kaffe/kaffe/kaffevm/jit/codeproto.h:1.1.1.5	Mon Mar 30 20:14:30 1998
+++ kaffe/kaffe/kaffevm/jit/codeproto.h	Sun Apr 19 13:13:08 1998
@@ -110,6 +110,10 @@
 void return_long(SlotInfo*);
 void return_float(SlotInfo*);
 void return_double(SlotInfo*);
+#define return_boolean return_int
+#define return_byte return_int
+#define return_short return_int
+#define return_char return_int
 
 void returnarg_int(SlotInfo*);
 void returnarg_ref(SlotInfo*);
@@ -227,11 +231,19 @@
 
 void softcall_lookupmethod(SlotInfo*, Method*, SlotInfo*);
 void softcall_nullpointer(void);
+#ifdef GUARANA
+void softcall_new_(SlotInfo*, struct Hjava_lang_Class*, Method *);
+void softcall_newarray_(SlotInfo*, SlotInfo*, int, Method *);
+void softcall_anewarray_(SlotInfo*, SlotInfo*, struct Hjava_lang_Class*, Method *);
+void softcall_multianewarray_(SlotInfo*, int, SlotInfo*,
+			      struct Hjava_lang_Class*, Method *);
+#else
 void softcall_new(SlotInfo*, struct Hjava_lang_Class*);
 void softcall_newarray(SlotInfo*, SlotInfo*, int);
 void softcall_anewarray(SlotInfo*, SlotInfo*, struct Hjava_lang_Class*);
 void softcall_multianewarray(SlotInfo*, int, SlotInfo*,
 			     struct Hjava_lang_Class*);
+#endif
 void softcall_athrow(SlotInfo*);
 void softcall_checkcast(SlotInfo*, SlotInfo*, struct Hjava_lang_Class*);
 void softcall_get_method_code(SlotInfo*, SlotInfo*);
Index: kaffe/kaffe/kaffevm/jit/icode.c
diff -u kaffe/kaffe/kaffevm/jit/icode.c:1.1.1.8 kaffe/kaffe/kaffevm/jit/icode.c:1.9
--- kaffe/kaffe/kaffevm/jit/icode.c:1.1.1.8	Sat Jun 13 14:34:19 1998
+++ kaffe/kaffe/kaffevm/jit/icode.c	Sat Jun 13 15:02:19 1998
@@ -30,6 +30,9 @@
 #include "locks.h"
 #include "machine.h"
 #include "codeproto.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 
 #if defined(WORDS_BIGENDIAN)
 #define	LSLOT(_s)	((_s)+1)
@@ -251,7 +254,7 @@
 	else {
 		pusharg_ref(obj, 0);
 	}
-	call_soft(lockMutex);
+	call_soft(lockObjMutex);
 	popargs();
 	start_sub_block();
 }
@@ -266,7 +269,7 @@
 	else {
 		pusharg_ref(obj, 0);
 	}
-	call_soft(unlockMutex);
+	call_soft(unlockObjMutex);
 	popargs();
 	start_sub_block();
 }
@@ -3165,7 +3168,11 @@
 /*									   */
 
 void
+#ifdef GUARANA
+build_call_frame_guarana(Utf8Const* sig, SlotInfo* obj, int sp_idx, int minidx)
+#else
 build_call_frame(Utf8Const* sig, SlotInfo* obj, int sp_idx)
+#endif
 {
 	struct pusharg_info {
 		char type;
@@ -3175,17 +3182,19 @@
 	static struct pusharg_info* args;
 	static int sz_args = 0;
 	int arg_idx;
-	int idx;
+#ifndef GUARANA
+	int minidx = 0;
+#endif
+	int idx = minidx;
 	char* sigptr;
 
 	/* Make sure we have enough argument space */
-	if (sp_idx + 1 > sz_args) {
-		sz_args = sp_idx + 1;
+	if (sp_idx + minidx + 1 > sz_args) {
+		sz_args = sp_idx + minidx + 1;
 		args = gc_realloc_fixed(args, sizeof(struct pusharg_info) * sz_args);
 	}
 
 	/* If we've got an object ... */
-	idx = 0;
 	if (obj != 0) {
 		args[idx].type = 'O';
 		args[idx].arg_idx = idx;
@@ -3241,7 +3250,7 @@
 		idx++;
 	}
 
-	for (idx--; idx >= 0; idx--) {
+	for (idx--; idx >= minidx; idx--) {
 		sp_idx = args[idx].sp_idx;
 		arg_idx = args[idx].arg_idx;
 		switch (args[idx].type) {
@@ -3375,10 +3384,25 @@
 	fixup_function_call();
 }
 
-void
+void 
+#ifdef GUARANA
+softcall_new_(SlotInfo* dst, Hjava_lang_Class* classobj, Method *meth)
+#else
 softcall_new(SlotInfo* dst, Hjava_lang_Class* classobj)
+#endif
 {
 	prepare_function_call();
+#ifdef GUARANA
+	if (meth->accflags & ACC_STATIC) {
+		SlotInfo* tmp;
+		slot_alloctmp(tmp);
+		move_ref_const(tmp, meth->class);
+		pusharg_ref(tmp, 1);
+		slot_nowriteback(tmp);
+	} else {
+		pusharg_ref(local(0), 1);
+	}
+#endif
 	pusharg_class_const(classobj, 0);
 	call_soft(soft_new);
 	popargs();
@@ -3387,12 +3411,23 @@
 }
 
 void
+#ifdef GUARANA
+softcall_newarray_(SlotInfo* dst, SlotInfo* size, int type, Method *meth)
+#else
 softcall_newarray(SlotInfo* dst, SlotInfo* size, int type)
+#endif
 {
 	if (size == dst) {
 		slot_nowriteback(size);
 	}
 	prepare_function_call();
+#ifdef GUARANA
+	if (meth->accflags & ACC_STATIC) {
+		pusharg_ref_const(meth->class, 2);
+	} else {
+		pusharg_ref(local(0), 2);
+	}
+#endif
 	pusharg_int(size, 1);
 	pusharg_int_const(type, 0);
 	call_soft(soft_newarray);
@@ -3402,12 +3437,23 @@
 }
 
 void
+#ifdef GUARANA
+softcall_anewarray_(SlotInfo* dst, SlotInfo* size, Hjava_lang_Class* type, Method *meth)
+#else
 softcall_anewarray(SlotInfo* dst, SlotInfo* size, Hjava_lang_Class* type)
+#endif
 {
 	if (dst == size) {
 		slot_nowriteback(size);
 	}
 	prepare_function_call();
+#ifdef GUARANA
+	if (meth->accflags & ACC_STATIC) {
+		pusharg_ref_const(meth->class, 2);
+	} else {
+		pusharg_ref(local(0), 2);
+	}
+#endif
 	pusharg_int(size, 1);
 	pusharg_class_const(type, 0);
 	call_soft(soft_anewarray);
@@ -3418,15 +3464,31 @@
 
 
 void
+#ifdef GUARANA
+softcall_multianewarray_(SlotInfo* dst, int size, SlotInfo* stktop, Hjava_lang_Class* classobj, Method *meth)
+#else
 softcall_multianewarray(SlotInfo* dst, int size, SlotInfo* stktop, Hjava_lang_Class* classobj)
+#endif
 {
 	int i;
 
 	prepare_function_call();
+#ifdef GUARANA
+	for (i = 0; i < size; i++) {
+		pusharg_int(&stktop[i], 2+size-i);
+	}
+	pusharg_int_const(size, 2);
+	if (meth->accflags & ACC_STATIC) {
+		pusharg_ref_const(meth->class, 1);
+	} else {
+		pusharg_ref(local(0), 1);
+	}
+#else
 	for (i = 0; i < size; i++) {
 		pusharg_int(&stktop[i], 1+size-i);
 	}
 	pusharg_int_const(size, 1);
+#endif
 	pusharg_class_const(classobj, 0);
 	call_soft(soft_multianewarray);
 	popargs();
@@ -3479,7 +3541,7 @@
 	slot_nowriteback(mon);
 	prepare_function_call();
 	pusharg_ref(mon, 0);
-	call_soft(lockMutex);
+	call_soft(lockObjMutex);
 	popargs();
 	fixup_function_call();
 }
@@ -3490,7 +3552,7 @@
 	slot_nowriteback(mon);
 	prepare_function_call();
 	pusharg_ref(mon, 0);
-	call_soft(unlockMutex);
+	call_soft(unlockObjMutex);
 	popargs();
 	fixup_function_call();
 }
Index: kaffe/kaffe/kaffevm/jit/machine.c
diff -u kaffe/kaffe/kaffevm/jit/machine.c:1.1.1.9.2.1 kaffe/kaffe/kaffevm/jit/machine.c:1.6.2.2
--- kaffe/kaffe/kaffevm/jit/machine.c:1.1.1.9.2.1	Sun Aug  9 08:38:32 1998
+++ kaffe/kaffe/kaffevm/jit/machine.c	Tue Sep 29 17:05:59 1998
@@ -41,6 +41,9 @@
 #include "external.h"
 #include "soft.h"
 #include "jni.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 
 /*
  * Define information about this engine.
@@ -109,7 +112,7 @@
 void	initInsnSequence(int, int, int);
 void	finishInsnSequence(nativeCodeInfo*);
 static void generateInsnSequence(void);
-static void installMethodCode(Method*, nativeCodeInfo*);
+void	installMethodCode(Method*, nativeCodeInfo*);
 static void checkCaughtExceptions(Method* meth, int pc);
 
 void	endBlock(sequence*);
@@ -165,7 +168,7 @@
 		return;
 	}
 
-	lockMutex(meth->class);
+	lockObjMutexDirect(&meth->class->head);
 
 	if (Kaffe_JavaVMArgs[0].enableVerboseJIT) {
 		tms = currentTime();
@@ -181,7 +184,7 @@
 		KAFFEJIT_TO_NATIVE(meth);
 		/* Note that this is a real function not a trampoline.  */
 		meth->c.ncode.ncode_end = METHOD_NATIVECODE(meth);
-		unlockMutex(meth->class);
+		unlockObjMutexDirect(&meth->class->head);
 		unlockStaticMutex(&translatorlock);
 		return;
 	}
@@ -289,7 +292,7 @@
 		       METHOD_NATIVECODE(meth));
 	}
 
-	unlockMutex(meth->class);
+	unlockObjMutexDirect(&meth->class->head);
 	unlockStaticMutex(&translatorlock);
 }
 
@@ -329,7 +332,6 @@
 /*
  * Install the compiled code in the method.
  */
-static
 void
 installMethodCode(Method* meth, nativeCodeInfo* code)
 {
Index: kaffe/kaffe/kaffevm/jit/machine.h
diff -u kaffe/kaffe/kaffevm/jit/machine.h:1.1.1.5.2.1 kaffe/kaffe/kaffevm/jit/machine.h:1.13.2.2
--- kaffe/kaffe/kaffevm/jit/machine.h:1.1.1.5.2.1	Sun Aug  9 08:38:33 1998
+++ kaffe/kaffe/kaffevm/jit/machine.h	Wed Sep  9 05:15:32 1998
@@ -89,6 +89,195 @@
 struct _methods;
 void translate(struct _methods*);
 
+#ifdef GUARANA
+#define	softcall_new(r, t)			softcall_new_((r), (t), meth)
+#define	softcall_newarray(r, s, t)		softcall_newarray_((r), (s), (t), meth)
+#define	softcall_anewarray(r, s, t)		softcall_anewarray_((r), (s), (t), meth)
+#define	softcall_multianewarray(r, z, s, t)	softcall_multianewarray_((r), (z), (s), (t), meth)
+
+#define build_call_frame(sig, obj, sp) build_call_frame_guarana((sig), (obj), (sp), 0)
+
+#define softcall_reify_method_invocation(method) do { \
+  end_sub_block(); \
+  prepare_function_call() ; \
+  if (method_method()->accflags & ACC_STATIC) {\
+    build_call_frame_guarana(method_sig(), 0, idx, 2); \
+    pusharg_ref_const(0, 1); \
+  } else { \
+    build_call_frame_guarana(method_sig(), stack(idx), idx, 1); \
+  } \
+  pusharg_ref((method), 0); \
+  switch (low) { \
+  case 'V': \
+    call_soft(jvoid_reify_method_invocation); \
+    break; \
+  case 'L': \
+  case '[': \
+    call_soft(jref_reify_method_invocation); \
+    break; \
+  case 'Z': \
+    call_soft(jboolean_reify_method_invocation); \
+    break; \
+  case 'C': \
+    call_soft(jchar_reify_method_invocation); \
+    break; \
+  case 'B': \
+    call_soft(jbyte_reify_method_invocation); \
+    break; \
+  case 'S': \
+    call_soft(jshort_reify_method_invocation); \
+    break; \
+  case 'I': \
+    call_soft(jint_reify_method_invocation); \
+    break; \
+  case 'J': \
+    call_soft(jlong_reify_method_invocation); \
+    break; \
+  case 'F': \
+    call_soft(jfloat_reify_method_invocation); \
+    break; \
+  case 'D': \
+    call_soft(jdouble_reify_method_invocation); \
+    break; \
+  default: \
+    ABORT(); \
+  } \
+  popargs(); \
+  fixup_function_call(); \
+  start_sub_block(); \
+} while (0)
+
+#define softcall_reify_field_load(mo, obj) do { \
+  void *func = 0; SlotInfo *slot = 0; void (*retfunc)(SlotInfo *) = 0; \
+  prepare_function_call(); \
+  pusharg_ref_const(finfo.field, 3); \
+  pusharg_ref_const(finfo.class, 2); \
+  pusharg_ref((obj), 1); \
+  pusharg_ref((mo), 0); \
+  if (FIELD_ISREF(finfo.field)) { \
+    func = jref_reify_field_load; slot = wstack(0); retfunc = return_ref; \
+  } else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) { \
+  case 'Z': \
+    func = jboolean_reify_field_load; slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'C': \
+    func = jchar_reify_field_load; slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'B': \
+    func = jbyte_reify_field_load; slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'S': \
+    func = jshort_reify_field_load;  slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'I': \
+    func = jint_reify_field_load; slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'J': \
+    func = jlong_reify_field_load; push(1); slot = stack_long(0); retfunc = return_long; \
+    break; \
+  case 'F': \
+    func = jfloat_reify_field_load; slot = wstack(0); retfunc = return_float; \
+    break; \
+  case 'D': \
+    func = jdouble_reify_field_load; push(1); slot = stack_double(0); retfunc = return_double; \
+    break; \
+  default: \
+    ABORT(); \
+  } \
+  call_soft(func); \
+  popargs(); \
+  fixup_function_call(); \
+  retfunc(slot); \
+} while (0)
+
+#ifndef pusharg_char
+#define pusharg_char pusharg_int
+#endif
+#ifndef pusharg_bool
+#define pusharg_bool pusharg_int
+#endif
+#ifndef pusharg_byte
+#define pusharg_byte pusharg_int
+#endif
+#ifndef pusharg_short
+#define pusharg_short pusharg_int
+#endif
+
+#define softcall_reify_field_store(mo, obj) do { \
+  void *func = 0; \
+  prepare_function_call(); \
+  if (FIELD_ISREF(finfo.field)) { \
+    pusharg_ref(rstack(0), 4); pop(1); func = jref_reify_field_store; \
+  } else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) { \
+  case 'Z': \
+    pusharg_bool(rstack(0), 4); pop(1); func = jboolean_reify_field_store; \
+    break; \
+  case 'C': \
+    pusharg_char(rstack(0), 4); pop(1); func = jchar_reify_field_store; \
+    break; \
+  case 'B': \
+    pusharg_byte(rstack(0), 4); pop(1); func = jbyte_reify_field_store; \
+    break; \
+  case 'S': \
+    pusharg_short(rstack(0), 4); pop(1); func = jshort_reify_field_store; \
+    break; \
+  case 'I': \
+    pusharg_int(rstack(0), 4); pop(1); func = jint_reify_field_store; \
+    break; \
+  case 'J': \
+    pusharg_long(stack_long(0), 4); pop(2); func = jlong_reify_field_store; \
+    break; \
+  case 'F': \
+    pusharg_float(rstack(0), 4); pop(1); func = jfloat_reify_field_store; \
+    break; \
+  case 'D': \
+    pusharg_double(stack_double(0), 4); pop(2); func = jdouble_reify_field_store; \
+    break; \
+  default: \
+    ABORT(); \
+  } \
+  pusharg_ref_const(finfo.field, 3); \
+  pusharg_ref_const(finfo.class, 2); \
+  pusharg_ref((obj), 1); \
+  pusharg_ref((mo), 0); \
+  call_soft(func); \
+  popargs(); \
+  fixup_function_call(); \
+} while (0)
+
+#define softcall_reify_array_load(mo, obj, index, type, retto) do { \
+  prepare_function_call(); \
+  pusharg_int((index), 2); \
+  pusharg_ref((obj), 1); \
+  pusharg_ref((mo), 0); \
+  call_soft(j##type##_reify_array_load); \
+  popargs(); \
+  fixup_function_call(); \
+  return_##type(retto); \
+} while (0)
+
+#define softcall_reify_array_store(mo, obj, index, type, value) do { \
+  prepare_function_call(); \
+  pusharg_##type((value), 3); \
+  pusharg_int((index), 2); \
+  pusharg_ref((obj), 1); \
+  pusharg_ref((mo), 0); \
+  call_soft(j##type##_reify_array_store); \
+  popargs(); \
+  fixup_function_call(); \
+} while(0)
+
+#define softcall_reify_arraylength(to, from) do { \
+  prepare_function_call(); \
+  pusharg_ref((from), 0); \
+  call_soft(guarana_reify_arraylength); \
+  popargs(); \
+  fixup_function_call(); \
+  return_int((to)); \
+} while (0)
+
+#endif /* GUARANA */
+
 typedef struct _nativeCodeInfo {
 	void*	mem;
 	int	memlen;
Index: kaffe/kaffe/kaffevm/mem/gc-incremental.c
diff -u kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.1.1.3 kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.4
--- kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.1.1.3	Sat Jun 13 14:34:27 1998
+++ kaffe/kaffe/kaffevm/mem/gc-incremental.c	Sat Jun 13 18:25:45 1998
@@ -122,6 +122,9 @@
 static void walkClass(void*, uint32);
 static void walkObject(void*, uint32);
 static void walkRefArray(void*, uint32);
+#ifdef GUARANA
+static void walkPrimArray(void*, uint32);
+#endif
 
 /* Standard GC function sets */
 static gcFuncs gcFunctions[] = {
@@ -129,7 +132,11 @@
 	{ walkNull,	    GC_OBJECT_NORMAL },	/* GC_ALLOC_NOWALK */
 	{ walkNull,	    GC_OBJECT_FIXED  },	/* GC_ALLOC_FIXED */
 	{ walkObject,	    GC_OBJECT_NORMAL },	/* GC_ALLOC_NORMALOBJECT */
+#ifdef GUARANA
+	{ walkPrimArray,    GC_OBJECT_NORMAL },	/* GC_ALLOC_PRIMARRAY */
+#else
 	{ walkNull,	    GC_OBJECT_NORMAL },	/* GC_ALLOC_PRIMARRAY */
+#endif
 	{ walkRefArray,     GC_OBJECT_NORMAL },	/* GC_ALLOC_REFARRAY */
 	{ walkClass,        GC_OBJECT_NORMAL },	/* GC_ALLOC_CLASSOBJECT */
 	{ walkObject,       finalizeObject   },	/* GC_ALLOC_FINALIZEOBJECT */
@@ -329,6 +336,9 @@
 	gcStats.markedmem += size;
 
 	class = (Hjava_lang_Class*)base;
+#ifdef GUARANA
+	markObject(class->head.meta_object);
+#endif
 
 	markObject(class->name);
 	if (class->state >= CSTATE_PREPARED) {
@@ -356,7 +366,7 @@
 }
 
 /*
- * Walk an array object objects.
+ * Walk an array of objects.
  */
 static
 void
@@ -372,6 +382,9 @@
 	gcStats.markedmem += size;
 
 	arr = (Hjava_lang_Object*)base;
+#ifdef GUARANA
+	markObject(arr->meta_object);
+#endif
 	ptr = OBJARRAY_DATA(arr);
 	for (i = ARRAY_SIZE(arr); --i>= 0; ) {
 		Hjava_lang_Object* el = *ptr++;
@@ -380,6 +393,24 @@
 		}
 	}
 }
+
+#ifdef GUARANA
+/*
+ * Walk an array of primitive type.
+ */
+static
+void
+walkPrimArray(void* base, uint32 size)
+{
+	Hjava_lang_Object* arr;
+
+	gcStats.markedobj += 1;
+	gcStats.markedmem += size;
+
+	arr = (Hjava_lang_Object*)base;
+	markObject(arr->meta_object);
+}
+#endif
 
 /*
  * The Garbage Collector sits in a loop starting a collection, waiting
Index: kaffe/kaffe/kaffevm/systems/unix-internal/internal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-internal/internal.c:1.1.1.5.2.1 kaffe/kaffe/kaffevm/systems/unix-internal/internal.c:1.4.2.1
--- kaffe/kaffe/kaffevm/systems/unix-internal/internal.c:1.1.1.5.2.1	Sun Aug  9 08:38:35 1998
+++ kaffe/kaffe/kaffevm/systems/unix-internal/internal.c	Fri Aug  7 03:45:03 1998
@@ -213,9 +213,9 @@
 	Tspinon(0);
 
 	/* Notify on the object just in case anyone is waiting */
-	lockMutex(&tid->base);
+	lockObjMutex(&tid->base);
 	broadcastCond(&tid->base);
-	unlockMutex(&tid->base);
+	unlockObjMutex(&tid->base);
 
 DBG(	printf("killThread %x\n", tid);			)
 
Index: kaffe/kaffe/scripts/Makefile.in
diff -u kaffe/kaffe/scripts/Makefile.in:1.1.1.4 kaffe/kaffe/scripts/Makefile.in:1.1.1.4.4.3
--- kaffe/kaffe/scripts/Makefile.in:1.1.1.4	Sat Jun 13 14:34:47 1998
+++ kaffe/kaffe/scripts/Makefile.in	Tue Oct  6 06:56:45 1998
@@ -16,22 +16,59 @@
 SCREXT=		@SCREXT@
 KPREFIX=	@KPREFIX@
 
-SCRIPTFILES=	appletviewer jar javac javadoc javakey javap jdb \
-		native2ascii report-kaffe-bug rmic rmiregistry serialver
+SCRIPTFILES_PIZZA=\
+		pizza pizzadoc
 
+SCRIPTFILES_SUN=\
+		appletviewer jar javac javadoc javakey javap jdb \
+		native2ascii rmic rmiregistry serialver
+
+SCRIPTFILES_COMPAT=\
+		java
+
+PSCRIPTFILES=	install-jar kaffe
+
 all:
 
 clean:
 
 distclean:
-		rm -f Makefile .depend
+		rm -f Makefile .depend $(PSCRIPTFILES) $(SCRIPTFILES_SUN) $(SCRIPTFILES_PIZZA)
+		(cd compat ; rm -f $(SCRIPTFILES_COMPAT))
+		-rmdir compat
+
+install:	install-pizza install-sun install-jars install-compat
 
-install:
+install-sun:
 		test -d $(bindir) || $(MKDIR) $(bindir)
-		for i in $(SCRIPTFILES) ;\
+		for i in $(SCRIPTFILES_SUN) ;\
+		do \
+			$(INSTALL_SCRIPT) ./$(SCREXT)/$$i $(bindir)/$(KPREFIX)$$i$(SCREXT)  ;\
+		done
+		$(INSTALL_SCRIPT) $(srcdir)/$(SCREXT)/report-kaffe-bug $(bindir)/$(KPREFIX)report-kaffe-bug$(SCREXT)  ;\
+
+install-pizza:
+		for i in $(SCRIPTFILES_PIZZA) ;\
 		do \
-			$(INSTALL_SCRIPT) $(srcdir)/$$i$(SCREXT) $(bindir)/$(KPREFIX)$$i$(SCREXT)  ;\
+			$(INSTALL_SCRIPT) ./$(SCREXT)/$$i $(bindir)/$(KPREFIX)$$i$(SCREXT)  ;\
 		done
+
+install-compat:
+		for i in $(SCRIPTFILES_COMPAT) ;\
+		do \
+			$(INSTALL_SCRIPT) compat/$$i $(bindir)/$(KPREFIX)$$i$(SCREXT)  ;\
+		done
+
+install-jars:
+		for i in $(PSCRIPTFILES) ;\
+		do \
+			$(INSTALL_SCRIPT) $$i $(bindir)/$(KPREFIX)$$i ;\
+		done
+
+@COMMENT_GUARANA@install: install-guarana
+@COMMENT_GUARANA@install-guarana: install-sun install-compat
+@COMMENT_GUARANA@	$(INSTALL_SCRIPT) $(bindir)/$(KPREFIX)kaffe$(SCREXT) $(bindir)/$(KPREFIX)guarana$(SCREXT)
+@COMMENT_GUARANA@	$(INSTALL_SCRIPT) $(bindir)/$(KPREFIX)javac$(SCREXT) $(bindir)/$(KPREFIX)guaranac$(SCREXT)
 
 depend:
 
Index: kaffe/kaffe/scripts/appletviewer
diff -u kaffe/kaffe/scripts/appletviewer:1.1.1.2 kaffe/kaffe/scripts/appletviewer:removed
--- kaffe/kaffe/scripts/appletviewer:1.1.1.2	Wed Jun 25 17:35:36 1997
+++ kaffe/kaffe/scripts/appletviewer	Mon Nov 16 07:59:31 1998
@@ -1,3 +0,0 @@
-#! /bin/sh
-# Script to run Sun's appletviewer using Kaffe.
-kaffe sun.applet.AppletViewer $@
Index: kaffe/kaffe/scripts/appletviewer.bat
diff -u kaffe/kaffe/scripts/appletviewer.bat:1.1.1.1 kaffe/kaffe/scripts/appletviewer.bat:removed
--- kaffe/kaffe/scripts/appletviewer.bat:1.1.1.1	Mon May  5 21:21:07 1997
+++ kaffe/kaffe/scripts/appletviewer.bat	Mon Nov 16 07:59:31 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.applet.AppletViewer %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/appletviewer.in
diff -u /dev/null kaffe/kaffe/scripts/appletviewer.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:31 1998
+++ kaffe/kaffe/scripts/appletviewer.in	Wed Nov 11 02:40:53 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+# Script to run Appletviewer
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.applet.AppletViewer ${1+"$@"}
Index: kaffe/kaffe/scripts/install-jar.in
diff -u /dev/null kaffe/kaffe/scripts/install-jar.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:31 1998
+++ kaffe/kaffe/scripts/install-jar.in	Wed Nov 11 02:40:53 1998
@@ -0,0 +1,20 @@
+#! /bin/sh
+#  Copy the given jar file into the standard kaffe installation.  This is
+#  here to help install useful JAR's and cut down on installation bugs.
+
+prefix=@prefix@
+classdir=@datadir@/kaffe
+
+if test x"${1+set}" != x"set" ; then
+	echo "usage: install-jar <jarfile> ..."
+	exit 1
+fi
+
+for i in "$@"
+do
+	echo -n "Installing $i in $classdir ... "
+	cp "$i" "$classdir/$i" &&
+	echo "done"
+done
+
+exit 0
Index: kaffe/kaffe/scripts/jar
diff -u kaffe/kaffe/scripts/jar:1.1.1.1 kaffe/kaffe/scripts/jar:removed
--- kaffe/kaffe/scripts/jar:1.1.1.1	Wed Jun 25 17:35:35 1997
+++ kaffe/kaffe/scripts/jar	Mon Nov 16 07:59:31 1998
@@ -1,2 +0,0 @@
-#! /bin/sh
-kaffe sun.tools.jar.Main $@
Index: kaffe/kaffe/scripts/jar.bat
diff -u kaffe/kaffe/scripts/jar.bat:1.1.1.1 kaffe/kaffe/scripts/jar.bat:removed
--- kaffe/kaffe/scripts/jar.bat:1.1.1.1	Wed Jun 25 17:35:43 1997
+++ kaffe/kaffe/scripts/jar.bat	Mon Nov 16 07:59:31 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.tools.jar.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/jar.in
diff -u /dev/null kaffe/kaffe/scripts/jar.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:31 1998
+++ kaffe/kaffe/scripts/jar.in	Wed Nov 11 02:40:53 1998
@@ -0,0 +1,4 @@
+#! /bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.tools.jar.Main ${1+"$@"}
Index: kaffe/kaffe/scripts/javac
diff -u kaffe/kaffe/scripts/javac:1.1.1.2 kaffe/kaffe/scripts/javac:removed
--- kaffe/kaffe/scripts/javac:1.1.1.2	Wed Jun 25 17:35:37 1997
+++ kaffe/kaffe/scripts/javac	Mon Nov 16 07:59:31 1998
@@ -1,3 +0,0 @@
-#! /bin/sh
-# Script to run Sun's compiler using Kaffe.
-kaffe sun.tools.javac.Main $@
Index: kaffe/kaffe/scripts/javac.bat
diff -u kaffe/kaffe/scripts/javac.bat:1.1.1.1 kaffe/kaffe/scripts/javac.bat:removed
--- kaffe/kaffe/scripts/javac.bat:1.1.1.1	Mon May  5 21:21:07 1997
+++ kaffe/kaffe/scripts/javac.bat	Mon Nov 16 07:59:31 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.tools.javac.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/javac.in
diff -u /dev/null kaffe/kaffe/scripts/javac.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:31 1998
+++ kaffe/kaffe/scripts/javac.in	Wed Nov 11 02:40:53 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+# Script to run Sun's compiler
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.tools.javac.Main ${1+"$@"}
Index: kaffe/kaffe/scripts/javadoc
diff -u kaffe/kaffe/scripts/javadoc:1.1.1.2 kaffe/kaffe/scripts/javadoc:removed
--- kaffe/kaffe/scripts/javadoc:1.1.1.2	Wed Jun 25 17:35:39 1997
+++ kaffe/kaffe/scripts/javadoc	Mon Nov 16 07:59:31 1998
@@ -1,3 +0,0 @@
-#! /bin/sh
-# Script to run Sun's document using Kaffe.
-kaffe sun.tools.javadoc.Main $@
Index: kaffe/kaffe/scripts/javadoc.bat
diff -u kaffe/kaffe/scripts/javadoc.bat:1.1.1.1 kaffe/kaffe/scripts/javadoc.bat:removed
--- kaffe/kaffe/scripts/javadoc.bat:1.1.1.1	Mon May  5 21:21:07 1997
+++ kaffe/kaffe/scripts/javadoc.bat	Mon Nov 16 07:59:31 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.tools.javadoc.Main %1 %2 %3 %4
Index: kaffe/kaffe/scripts/javadoc.in
diff -u /dev/null kaffe/kaffe/scripts/javadoc.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:31 1998
+++ kaffe/kaffe/scripts/javadoc.in	Wed Nov 11 02:40:53 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+# Script to run Sun's documenter
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.tools.javadoc.Main ${1+"$@"}
Index: kaffe/kaffe/scripts/javakey
diff -u kaffe/kaffe/scripts/javakey:1.1.1.1 kaffe/kaffe/scripts/javakey:removed
--- kaffe/kaffe/scripts/javakey:1.1.1.1	Wed Jun 25 17:35:42 1997
+++ kaffe/kaffe/scripts/javakey	Mon Nov 16 07:59:32 1998
@@ -1,2 +0,0 @@
-#! /bin/sh
-kaffe sun.security.provider.Main $@
Index: kaffe/kaffe/scripts/javakey.bat
diff -u kaffe/kaffe/scripts/javakey.bat:1.1.1.1 kaffe/kaffe/scripts/javakey.bat:removed
--- kaffe/kaffe/scripts/javakey.bat:1.1.1.1	Wed Jun 25 17:35:44 1997
+++ kaffe/kaffe/scripts/javakey.bat	Mon Nov 16 07:59:32 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.security.provider.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/javakey.in
diff -u /dev/null kaffe/kaffe/scripts/javakey.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:32 1998
+++ kaffe/kaffe/scripts/javakey.in	Wed Nov 11 02:40:54 1998
@@ -0,0 +1,4 @@
+#! /bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.security.provider.Main ${1+"$@"}
Index: kaffe/kaffe/scripts/javap
diff -u kaffe/kaffe/scripts/javap:1.1.1.1 kaffe/kaffe/scripts/javap:removed
--- kaffe/kaffe/scripts/javap:1.1.1.1	Wed Jun 25 17:35:41 1997
+++ kaffe/kaffe/scripts/javap	Mon Nov 16 07:59:32 1998
@@ -1,2 +0,0 @@
-#! /bin/sh
-kaffe sun.tools.javap.JavaP $@
Index: kaffe/kaffe/scripts/javap.bat
diff -u kaffe/kaffe/scripts/javap.bat:1.1.1.1 kaffe/kaffe/scripts/javap.bat:removed
--- kaffe/kaffe/scripts/javap.bat:1.1.1.1	Wed Jun 25 17:35:43 1997
+++ kaffe/kaffe/scripts/javap.bat	Mon Nov 16 07:59:32 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.tools.javap.JavaP %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/javap.in
diff -u /dev/null kaffe/kaffe/scripts/javap.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:32 1998
+++ kaffe/kaffe/scripts/javap.in	Wed Nov 11 02:40:54 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.tools.javap.JavaP ${1+"$@"}
+
Index: kaffe/kaffe/scripts/jdb
diff -u kaffe/kaffe/scripts/jdb:1.1.1.1 kaffe/kaffe/scripts/jdb:removed
--- kaffe/kaffe/scripts/jdb:1.1.1.1	Wed Jun 25 17:35:42 1997
+++ kaffe/kaffe/scripts/jdb	Mon Nov 16 07:59:32 1998
@@ -1,2 +0,0 @@
-#! /bin/sh
-kaffe sun.tools.ttydebug.TTY $@
Index: kaffe/kaffe/scripts/jdb.bat
diff -u kaffe/kaffe/scripts/jdb.bat:1.1.1.1 kaffe/kaffe/scripts/jdb.bat:removed
--- kaffe/kaffe/scripts/jdb.bat:1.1.1.1	Wed Jun 25 17:35:43 1997
+++ kaffe/kaffe/scripts/jdb.bat	Mon Nov 16 07:59:32 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.tools.ttydebug.TTY %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/jdb.in
diff -u /dev/null kaffe/kaffe/scripts/jdb.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:32 1998
+++ kaffe/kaffe/scripts/jdb.in	Wed Nov 11 02:40:54 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.tools.ttydebug.TTY ${1+"$@"}
+
Index: kaffe/kaffe/scripts/kaffe.in
diff -u /dev/null kaffe/kaffe/scripts/kaffe.in:1.2.2.4
--- /dev/null	Mon Nov 16 07:59:32 1998
+++ kaffe/kaffe/scripts/kaffe.in	Wed Nov 11 02:40:54 1998
@@ -0,0 +1,68 @@
+#! /bin/sh
+
+#
+# Driver script for Kaffe.
+# This script invokes the "Kaffe" executable after modifying
+# CLASSPATH and LD_LIBRARY_PATH as needed.
+#
+# We prepend kaffe's lib directory to LD_LIBRARY_PATH.
+#
+# KAFFELIBRARYPATH is defined to kaffe's native lib directory
+# (lib/kaffe) if not set.
+#
+# The effective CLASSPATH is made up of four parts, which 
+# are composed in the following order:
+#
+#	1. a user-specified CLASSPATH or .
+#	2. klasses.zip in $datadir/kaffe
+#	3. pizza.jar in $datadir/kaffe
+#	4. classes.zip in $datadir/kaffe iff it exists.
+#	5. guarana.jar in $datadir/kaffe iff it exists.
+#
+
+# If KAFFE_DEBUG is set to either gdb or emacs, a debugging session
+# will be started.  gdb will be started so that the current working
+# directory and the argument list are correct.
+
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+: ${KAFFE_BINDIR="@bindir@"}
+: ${KAFFE_CLASSDIR="@datadir@/kaffe"}
+: ${KAFFE_LIB="@libdir@"}
+CLASSPATH="${CLASSPATH-.}:$KAFFE_CLASSDIR/Klasses.jar:$KAFFE_CLASSDIR/pizza.jar"
+if test -f "$KAFFE_CLASSDIR/classes.zip"; then
+  CLASSPATH="$CLASSPATH:$KAFFE_CLASSDIR/classes.zip"
+fi
+if test -f $KAFFE_CLASSDIR/guarana.jar; then
+  CLASSPATH="$CLASSPATH:$KAFFE_CLASSDIR/guarana.jar"
+fi
+export CLASSPATH
+LD_LIBRARY_PATH="$KAFFE_LIB"${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
+export LD_LIBRARY_PATH
+
+if test x"${KAFFE_DEBUG+set}"x != x"set"x; then
+    exec $KAFFE_BINDIR/Kaffe ${1+"$@"}
+else
+    case `"$KAFFE_DEBUG" --version </dev/null 2>/dev/null` in
+    "GDB"*|"GNU gdb"*)
+	# start command-line gdb within the correct working directory,
+	# and set up the specified argument list
+	{
+	    echo "shell rm -f /tmp/.gdbinit.$$"
+	    echo "cd `pwd`"
+	    echo "set args $*"
+	} >/tmp/.gdbinit.$$
+	exec "$KAFFE_DEBUG" -command /tmp/.gdbinit.$$ $KAFFE_BINDIR/Kaffe
+	rm -f /tmp/.gdbinit.$$;;
+    "GNU Emacs"*)
+	# start gdb within GNU Emacs, move into the current working
+	# directory and set up the specified argument list
+	exec "$KAFFE_DEBUG" -eval "(progn (gdb \"gdb $KAFFE_BINDIR/Kaffe\") (gud-call \"cd `pwd`\") (gud-call \"set args $*\"))";;
+    XEmacs*)
+	# start gdb within XEmacs, move into the current working
+	# directory and set up the specified argument list
+	exec "$KAFFE_DEBUG" -eval "(progn (gdb \"$KAFFE_BINDIR/Kaffe\") (gdb-call \"cd `pwd`\") (gdb-call \"set args $*\"))";;
+    *) echo you must set KAFFE_DEBUG to either emacs or gdb >&2;;
+    esac
+fi
+exit 1
Index: kaffe/kaffe/scripts/native2ascii
diff -u kaffe/kaffe/scripts/native2ascii:1.1.1.1 kaffe/kaffe/scripts/native2ascii:removed
--- kaffe/kaffe/scripts/native2ascii:1.1.1.1	Wed Jun 25 17:35:42 1997
+++ kaffe/kaffe/scripts/native2ascii	Mon Nov 16 07:59:32 1998
@@ -1,2 +0,0 @@
-#! /bin/sh
-kaffe sun.tools.native2ascii.Main $@
Index: kaffe/kaffe/scripts/native2ascii.bat
diff -u kaffe/kaffe/scripts/native2ascii.bat:1.1.1.1 kaffe/kaffe/scripts/native2ascii.bat:removed
--- kaffe/kaffe/scripts/native2ascii.bat:1.1.1.1	Wed Jun 25 17:35:43 1997
+++ kaffe/kaffe/scripts/native2ascii.bat	Mon Nov 16 07:59:32 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.tools.native2ascii.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/native2ascii.in
diff -u /dev/null kaffe/kaffe/scripts/native2ascii.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:32 1998
+++ kaffe/kaffe/scripts/native2ascii.in	Wed Nov 11 02:40:55 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.tools.native2ascii.Main ${1+"$@"}
+
Index: kaffe/kaffe/scripts/pizza.in
diff -u /dev/null kaffe/kaffe/scripts/pizza.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:33 1998
+++ kaffe/kaffe/scripts/pizza.in	Wed Nov 11 02:40:55 1998
@@ -0,0 +1,6 @@
+#! /bin/sh
+# Script to run Pizza Java compiler
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/kaffe pizza.compiler.Main ${1+"$@"}
+
Index: kaffe/kaffe/scripts/pizzadoc.in
diff -u /dev/null kaffe/kaffe/scripts/pizzadoc.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:33 1998
+++ kaffe/kaffe/scripts/pizzadoc.in	Wed Nov 11 02:40:55 1998
@@ -0,0 +1,6 @@
+#! /bin/sh
+# Script to run PizzaDoc
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/kaffe pizza.compiler.Main -pizzadoc ${1+"$@"}
+
Index: kaffe/kaffe/scripts/report-kaffe-bug
diff -u kaffe/kaffe/scripts/report-kaffe-bug:1.1.1.2 kaffe/kaffe/scripts/report-kaffe-bug:1.1.1.2.4.1
--- kaffe/kaffe/scripts/report-kaffe-bug:1.1.1.2	Mon Mar 30 20:15:33 1998
+++ kaffe/kaffe/scripts/report-kaffe-bug	Mon Sep  7 16:37:32 1998
@@ -27,7 +27,7 @@
 SUBMITTER=kaffe-user
 
 # The default mail address for PR submissions. 
-GNATS_ADDR=kaffe-bugs@transvirtual.com
+GNATS_ADDR=bugs@kaffe.org
 
 # Where the gnats category tree lives.
 #DATADIR=/usr/local/gnats/lib
Index: kaffe/kaffe/scripts/report-kaffe-bug.bat
diff -u kaffe/kaffe/scripts/report-kaffe-bug.bat:1.1.1.1 kaffe/kaffe/scripts/report-kaffe-bug.bat:removed
--- kaffe/kaffe/scripts/report-kaffe-bug.bat:1.1.1.1	Mon May  5 21:21:08 1997
+++ kaffe/kaffe/scripts/report-kaffe-bug.bat	Mon Nov 16 07:59:33 1998
@@ -1,2 +0,0 @@
-@echo off
-echo No automatic bug reporting under Windows
Index: kaffe/kaffe/scripts/rmic
diff -u kaffe/kaffe/scripts/rmic:1.1.1.1 kaffe/kaffe/scripts/rmic:removed
--- kaffe/kaffe/scripts/rmic:1.1.1.1	Wed Jun 25 17:35:42 1997
+++ kaffe/kaffe/scripts/rmic	Mon Nov 16 07:59:33 1998
@@ -1,2 +0,0 @@
-#! /bin/sh
-kaffe sun.rmi.rmic.Main $@
Index: kaffe/kaffe/scripts/rmic.bat
diff -u kaffe/kaffe/scripts/rmic.bat:1.1.1.1 kaffe/kaffe/scripts/rmic.bat:removed
--- kaffe/kaffe/scripts/rmic.bat:1.1.1.1	Wed Jun 25 17:35:44 1997
+++ kaffe/kaffe/scripts/rmic.bat	Mon Nov 16 07:59:33 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.rmi.rmic.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/rmic.in
diff -u /dev/null kaffe/kaffe/scripts/rmic.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:33 1998
+++ kaffe/kaffe/scripts/rmic.in	Wed Nov 11 02:40:55 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.rmi.rmic.Main ${1+"$@"}
+
Index: kaffe/kaffe/scripts/rmiregistry
diff -u kaffe/kaffe/scripts/rmiregistry:1.1.1.1 kaffe/kaffe/scripts/rmiregistry:removed
--- kaffe/kaffe/scripts/rmiregistry:1.1.1.1	Wed Jun 25 17:35:43 1997
+++ kaffe/kaffe/scripts/rmiregistry	Mon Nov 16 07:59:33 1998
@@ -1,2 +0,0 @@
-#! /bin/sh
-kaffe sun.rmi.registry.RegistryImpl $@
Index: kaffe/kaffe/scripts/rmiregistry.bat
diff -u kaffe/kaffe/scripts/rmiregistry.bat:1.1.1.1 kaffe/kaffe/scripts/rmiregistry.bat:removed
--- kaffe/kaffe/scripts/rmiregistry.bat:1.1.1.1	Wed Jun 25 17:35:44 1997
+++ kaffe/kaffe/scripts/rmiregistry.bat	Mon Nov 16 07:59:33 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.rmi.registry.RegistryImpl %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/rmiregistry.in
diff -u /dev/null kaffe/kaffe/scripts/rmiregistry.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:33 1998
+++ kaffe/kaffe/scripts/rmiregistry.in	Wed Nov 11 02:40:55 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.rmi.registry.RegistryImpl ${1+"$@"}
+
Index: kaffe/kaffe/scripts/serialver
diff -u kaffe/kaffe/scripts/serialver:1.1.1.1 kaffe/kaffe/scripts/serialver:removed
--- kaffe/kaffe/scripts/serialver:1.1.1.1	Wed Jun 25 17:35:42 1997
+++ kaffe/kaffe/scripts/serialver	Mon Nov 16 07:59:33 1998
@@ -1,2 +0,0 @@
-#! /bin/sh
-kaffe sun.tools.serialver.SerialVer $@
Index: kaffe/kaffe/scripts/serialver.bat
diff -u kaffe/kaffe/scripts/serialver.bat:1.1.1.1 kaffe/kaffe/scripts/serialver.bat:removed
--- kaffe/kaffe/scripts/serialver.bat:1.1.1.1	Wed Jun 25 17:35:43 1997
+++ kaffe/kaffe/scripts/serialver.bat	Mon Nov 16 07:59:34 1998
@@ -1,2 +0,0 @@
-@echo off
-kaffe sun.tools.serialver.SerialVer %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/serialver.in
diff -u /dev/null kaffe/kaffe/scripts/serialver.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/serialver.in	Wed Nov 11 02:40:56 1998
@@ -0,0 +1,5 @@
+#! /bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/java sun.tools.serialver.SerialVer ${1+"$@"}
+
Index: kaffe/kaffe/scripts/bat/appletviewer
diff -u /dev/null kaffe/kaffe/scripts/bat/appletviewer:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/appletviewer	Fri Aug  7 13:32:52 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe kaffe.awt.AppletViewer %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/jar
diff -u /dev/null kaffe/kaffe/scripts/bat/jar:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/jar	Fri Aug  7 13:32:53 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.tools.jar.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/javac
diff -u /dev/null kaffe/kaffe/scripts/bat/javac:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/javac	Fri Aug  7 13:32:55 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.tools.javac.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/javadoc
diff -u /dev/null kaffe/kaffe/scripts/bat/javadoc:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/javadoc	Fri Aug  7 13:32:56 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.tools.javadoc.Main %1 %2 %3 %4
Index: kaffe/kaffe/scripts/bat/javakey
diff -u /dev/null kaffe/kaffe/scripts/bat/javakey:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/javakey	Fri Aug  7 13:32:57 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.security.provider.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/javap
diff -u /dev/null kaffe/kaffe/scripts/bat/javap:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/javap	Fri Aug  7 13:32:59 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.tools.javap.JavaP %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/jdb
diff -u /dev/null kaffe/kaffe/scripts/bat/jdb:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/jdb	Fri Aug  7 13:33:00 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.tools.ttydebug.TTY %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/native2ascii
diff -u /dev/null kaffe/kaffe/scripts/bat/native2ascii:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/native2ascii	Fri Aug  7 13:33:02 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.tools.native2ascii.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/report-kaffe-bug
diff -u /dev/null kaffe/kaffe/scripts/bat/report-kaffe-bug:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/report-kaffe-bug	Fri Aug  7 13:33:03 1998
@@ -0,0 +1,2 @@
+@echo off
+echo No automatic bug reporting under Windows
Index: kaffe/kaffe/scripts/bat/rmic
diff -u /dev/null kaffe/kaffe/scripts/bat/rmic:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/rmic	Fri Aug  7 13:33:05 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.rmi.rmic.Main %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/rmiregistry
diff -u /dev/null kaffe/kaffe/scripts/bat/rmiregistry:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/rmiregistry	Fri Aug  7 13:33:06 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.rmi.registry.RegistryImpl %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/bat/serialver
diff -u /dev/null kaffe/kaffe/scripts/bat/serialver:1.1.2.1
--- /dev/null	Mon Nov 16 07:59:34 1998
+++ kaffe/kaffe/scripts/bat/serialver	Fri Aug  7 13:33:07 1998
@@ -0,0 +1,2 @@
+@echo off
+kaffe sun.tools.serialver.SerialVer %1 %2 %3 %4 %5
Index: kaffe/kaffe/scripts/compat/java.in
diff -u /dev/null kaffe/kaffe/scripts/compat/java.in:1.1.2.2
--- /dev/null	Mon Nov 16 07:59:35 1998
+++ kaffe/kaffe/scripts/compat/java.in	Wed Nov 11 02:40:56 1998
@@ -0,0 +1,6 @@
+#! /bin/sh
+# Pretend Kaffe is Java
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/kaffe ${1+"$@"}
+
Index: kaffe/libraries/clib/external_wrappers.h
diff -u kaffe/libraries/clib/external_wrappers.h:1.1.1.1 kaffe/libraries/clib/external_wrappers.h:1.1.1.1.4.1
--- kaffe/libraries/clib/external_wrappers.h:1.1.1.1	Mon Mar 30 20:15:38 1998
+++ kaffe/libraries/clib/external_wrappers.h	Wed Sep  9 05:04:42 1998
@@ -15,3 +15,6 @@
 #include "math/external_wrappers.h"
 #include "net/external_wrappers.h"
 #include "zip/external_wrappers.h"
+#ifdef GUARANA
+#include "../../kaffe/kaffevm/guarana/external_wrappers.h"
+#endif
Index: kaffe/libraries/clib/math/Makefile.in
diff -u kaffe/libraries/clib/math/Makefile.in:1.1.1.2 kaffe/libraries/clib/math/Makefile.in:1.3
--- kaffe/libraries/clib/math/Makefile.in:1.1.1.2	Sat Jun 13 14:35:04 1998
+++ kaffe/libraries/clib/math/Makefile.in	Sat Jun 13 15:02:27 1998
@@ -16,8 +16,9 @@
 AR=		@AR@
 RANLIB=		@RANLIB@
 INCLUDES=	-I$(srcdir) -I../../../include -I$(srcdir)/../../../include -I../../../config -I$(srcdir)/../../../config
+CPPFLAGS=	@CPPFLAGS@
 CFLAGS=		@CFLAGS@
-ALL_CFLAGS=	$(CFLAGS) $(INCLUDES) $(EXTRA_CFLAGS)
+ALL_CFLAGS=	$(CPPFLAGS) $(CFLAGS) $(INCLUDES) $(EXTRA_CFLAGS)
 INSTALL=	@INSTALL@
 INSTALL_DATA=	@INSTALL_DATA@
 MKDIR=		@MKDIR@
@@ -25,7 +26,7 @@
 DLLTOOL=	@DLLTOOL@
 DEPTOOL=	@DEPTOOL@
 PIC=		@PIC@
-LDFLAGS=	@LIBSHARE@
+LDFLAGS=	@LIBSHARE@ @LDFLAGS@
 LIBS=		@LIBS@
 LDTAIL=		@LDTAIL@ @STD_LIBRARIES@ @MATH_LIBRARIES@
 KVER=		@KVER@
Index: kaffe/libraries/clib/native/Array.c
diff -u kaffe/libraries/clib/native/Array.c:1.1.1.4 kaffe/libraries/clib/native/Array.c:1.3.2.1
--- kaffe/libraries/clib/native/Array.c:1.1.1.4	Sat Jun 13 14:35:15 1998
+++ kaffe/libraries/clib/native/Array.c	Wed Sep  9 05:20:28 1998
@@ -27,18 +27,31 @@
 #include <native.h>
 #include "defs.h"
 
+#ifdef GUARANA
+extern void guarana_reify_array_load(struct HBR_unicamp_Guarana_MetaObject *mo, struct Hjava_lang_Object *o, int index, jvalue *res);
+extern void guarana_reify_array_store(struct HBR_unicamp_Guarana_MetaObject *mo, struct Hjava_lang_Object *o, int index, jvalue *val);
+extern int guarana_reify_arraylength(struct Hjava_lang_Object *o);
+#endif
+
 jint
 java_lang_reflect_Array_getLength(struct Hjava_lang_Object* obj)
 {
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
 		SignalError("java.lang.IllegalArgumentException", "");
 
+#ifdef GUARANA
+	return guarana_reify_arraylength(obj);
+#else
 	return (obj_length((HArrayOfObject*)obj));
+#endif
 }
 
 struct Hjava_lang_Object*
 java_lang_reflect_Array_get(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -48,6 +61,16 @@
 	
 	if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangIntegerClass,"(I)V",
+							res.i);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -56,6 +79,16 @@
 	}
 	else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangShortClass,"(I)V",
+							res.i);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -64,6 +97,16 @@
 	}
 	else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangLongClass,"(J)V",
+							res.j);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -72,6 +115,16 @@
 	}
 	else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangByteClass,"(B)V",
+							res.i);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -88,6 +141,16 @@
 	}
 	else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangCharacterClass,"(C)V",
+							res.i);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -96,6 +159,16 @@
 	}
 	else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangFloatClass,"(F)V",
+							res.f);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -104,6 +177,16 @@
 	}
 	else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangDoubleClass,"(D)V",
+							res.d);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -116,6 +199,15 @@
 		 */
 
 		HArrayOfObject *arr = (HArrayOfObject *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.l;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -126,6 +218,9 @@
 jbool
 java_lang_reflect_Array_getBoolean(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -135,6 +230,15 @@
 	
 	if ( clazz == booleanClass ) {
 		HArrayOfBoolean *arr = (HArrayOfBoolean *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -147,6 +251,9 @@
 jbyte
 java_lang_reflect_Array_getByte(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -156,6 +263,15 @@
 	
 	if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+	}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -168,6 +284,9 @@
 jchar
 java_lang_reflect_Array_getChar(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -177,12 +296,30 @@
 	
 	if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -195,6 +332,9 @@
 jshort
 java_lang_reflect_Array_getShort(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -204,12 +344,30 @@
 	
 	if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -222,6 +380,9 @@
 jint
 java_lang_reflect_Array_getInt(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -231,24 +392,60 @@
 	
 	if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -261,6 +458,9 @@
 jlong
 java_lang_reflect_Array_getLong(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -270,30 +470,75 @@
 	
 	if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.j;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -306,6 +551,9 @@
 jfloat
 java_lang_reflect_Array_getFloat(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -315,36 +563,90 @@
 	
 	if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.f;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.j;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -357,6 +659,9 @@
 jdouble
 java_lang_reflect_Array_getDouble(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -366,42 +671,105 @@
 	
 	if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.d;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.f;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.j;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -414,6 +782,9 @@
 void
 java_lang_reflect_Array_set(struct Hjava_lang_Object* obj, jint elem, struct Hjava_lang_Object* val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -421,6 +792,15 @@
 
 	if (!CLASS_IS_PRIMITIVE(CLASS_ELEMENT_TYPE(OBJECT_CLASS(obj)))) {
 		HArrayOfObject *arr = (HArrayOfObject *)obj;
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.l = val;
+			guarana_reify_array_store(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -465,6 +845,9 @@
 void
 java_lang_reflect_Array_setBoolean(struct Hjava_lang_Object* obj, jint elem, jbool val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -474,6 +857,16 @@
 	
 	if ( clazz == booleanClass ) {
 		HArrayOfBoolean *arr = (HArrayOfBoolean *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -486,6 +879,9 @@
 void
 java_lang_reflect_Array_setByte(struct Hjava_lang_Object* obj, jint elem, jbyte val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -495,42 +891,112 @@
 	
 	if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -543,6 +1009,9 @@
 void
 java_lang_reflect_Array_setChar(struct Hjava_lang_Object* obj, jint elem, jchar val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -552,30 +1021,80 @@
 	
 	if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -588,6 +1107,9 @@
 void
 java_lang_reflect_Array_setShort(struct Hjava_lang_Object* obj, jint elem, jshort val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -597,30 +1119,80 @@
 	
 	if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -633,6 +1205,9 @@
 void
 java_lang_reflect_Array_setInt(struct Hjava_lang_Object* obj, jint elem, jint val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -642,24 +1217,64 @@
 	
 	if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -672,6 +1287,9 @@
 void
 java_lang_reflect_Array_setLong(struct Hjava_lang_Object* obj, jint elem, jlong val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -681,18 +1299,48 @@
 	
 	if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -705,6 +1353,9 @@
 void
 java_lang_reflect_Array_setFloat(struct Hjava_lang_Object* obj, jint elem, jfloat val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -714,12 +1365,32 @@
 	
 	if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -732,6 +1403,9 @@
 void
 java_lang_reflect_Array_setDouble(struct Hjava_lang_Object* obj, jint elem, jdouble val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -741,6 +1415,16 @@
 	
 	if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
Index: kaffe/libraries/clib/native/Class.c
diff -u kaffe/libraries/clib/native/Class.c:1.1.1.4.2.1 kaffe/libraries/clib/native/Class.c:1.7.2.2
--- kaffe/libraries/clib/native/Class.c:1.1.1.4.2.1	Sun Aug  9 08:38:41 1998
+++ kaffe/libraries/clib/native/Class.c	Wed Sep  9 05:16:56 1998
@@ -443,7 +443,7 @@
 	field = (Hjava_lang_reflect_Field*)AllocObject("java/lang/reflect/Field");
 	unhand(field)->clazz = clazz;
 	unhand(field)->slot = slot;
-	unhand(field)->type = (struct Hjava_lang_Class*)fld->type;
+	unhand(field)->type = resolveFieldType(fld, clazz);
 	unhand(field)->name = makeReplaceJavaStringFromUtf8(
 		fld->name->data, fld->name->length, 0, 0);
 	return (field);
@@ -529,6 +529,30 @@
 
 	return (array);
 }
+
+#ifdef GUARANA
+extern HArrayOfObject* (*p_makeParameters)(Method *meth);
+
+extern Hjava_lang_Class* (*p_makeReturn)(Method *meth);
+
+extern Hjava_lang_reflect_Constructor* (*p_makeConstructor)(struct Hjava_lang_Class* clazz, int slot);
+
+extern Hjava_lang_reflect_Method* (*p_makeMethod)(struct Hjava_lang_Class* clazz, int slot);
+
+extern Hjava_lang_reflect_Field* (*p_makeField)(struct Hjava_lang_Class* clazz, int slot);
+
+extern Hjava_lang_String* (*p_getClassName)(struct Hjava_lang_Class *clazz);
+
+void
+java_lang_Class_init_function_pointers(void) {
+	p_makeParameters = makeParameters;
+	p_makeReturn = makeReturn;
+	p_makeConstructor = makeConstructor;
+	p_makeMethod = makeMethod;
+	p_makeField = makeField;
+	p_getClassName = java_lang_Class_getName;
+}
+#endif
 
 HArrayOfObject*
 java_lang_Class_getMethods0(struct Hjava_lang_Class* this, jint declared)
Index: kaffe/libraries/clib/native/ClassLoader.c
diff -u kaffe/libraries/clib/native/ClassLoader.c:1.1.1.4 kaffe/libraries/clib/native/ClassLoader.c:1.3
--- kaffe/libraries/clib/native/ClassLoader.c:1.1.1.4	Wed May 13 05:40:54 1998
+++ kaffe/libraries/clib/native/ClassLoader.c	Sat May 23 17:00:09 1998
@@ -83,16 +83,16 @@
 	/*
 	 * see if somebody loaded that class already
 	 */
-	lockMutex(centry);
+	lockCEntryMutex(centry);
 	if (centry->class != NULL) {
-		unlockMutex(centry);
+		unlockCEntryMutex(centry);
 		SignalError("java.lang.ClassFormatError", "Duplicate name");
 	}
 
 	/* enter the class we loaded and return */
 	centry->class = clazz;
 	clazz->centry = centry;
-	unlockMutex(centry);
+	unlockCEntryMutex(centry);
 
 	/*
 	 * While it is not necessary that one be able to actually *use*
Index: kaffe/libraries/clib/native/Field.c
diff -u kaffe/libraries/clib/native/Field.c:1.1.1.2 kaffe/libraries/clib/native/Field.c:1.2.2.2
--- kaffe/libraries/clib/native/Field.c:1.1.1.2	Sun May 10 17:37:56 1998
+++ kaffe/libraries/clib/native/Field.c	Sat Sep 12 00:43:39 1998
@@ -36,6 +36,11 @@
 #include <native.h>
 #include "defs.h"
 
+#ifdef GUARANA
+extern void guarana_reify_field_load(struct HBR_unicamp_Guarana_MetaObject *mo, struct Hjava_lang_Object *o, struct Hjava_lang_Class *declass, Field *field, jvalue *res);
+extern void guarana_reify_field_store(struct HBR_unicamp_Guarana_MetaObject *mo, struct Hjava_lang_Object *o, struct Hjava_lang_Class *declass, Field *field, jvalue *val);
+#endif
+
 static
 char*
 getFieldAddress(Hjava_lang_reflect_Field* this, struct Hjava_lang_Object* obj)
@@ -82,9 +87,41 @@
         Hjava_lang_Class* clas;
         Field* fld;
         char* base;
+#ifdef GUARANA
+	jvalue result;
+	struct HBR_unicamp_Guarana_MetaObject *mo;
+#endif
 
         clas = (Hjava_lang_Class*) unhand(this)->clazz;
         fld = CLASS_FIELDS(clas) + unhand(this)->slot;
+#ifdef GUARANA
+	if (fld->accflags & ACC_STATIC)
+	  mo = clas->head.meta_object;
+	else
+	  mo = obj->meta_object;
+
+	if (mo) {
+	  base = (char*)&result;
+	  guarana_reify_field_load(mo, obj, clas, fld, &result);
+
+	  if (FIELD_ISREF(fld))
+	    switch (CLASS_PRIM_SIG(FIELD_TYPE(fld))) {
+	    case 'Z':
+	      result.z = result.i;
+	      break;
+	    case 'B':
+	      result.b = result.i;
+	      break;
+	    case 'S':
+	      result.s = result.i;
+	      break;
+	    case 'C':
+	      result.c = result.i;
+	      break;
+	    }
+
+        } else
+#endif
         base = getFieldAddress(this, obj);
 
 	if ( fld->type == intClass ) {
@@ -132,6 +169,20 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == booleanClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jbool*)base;
 	}
         else {
@@ -152,6 +203,20 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jbyte*)base;
 	}
         else {
@@ -171,6 +236,20 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jchar*)base;
 	}
         else {
@@ -191,9 +270,37 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jshort*)base;
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jshort)(*(jbyte*)base);
 	}
         else {
@@ -213,15 +320,71 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jint*)base;
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jint)(*(jshort*)base);
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jint)(*(jbyte*)base);
 	}
         else if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jint)(*(jchar*)base);
 	}
         else {
@@ -241,18 +404,88 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.j;
+		} else
+#endif
                 return *(jlong*)base;
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jlong)(*(jint*)base);
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jlong)(*(jshort*)base);
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jlong)(*(jbyte*)base);
 	}
         else if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jlong)(*(jchar*)base);
 	}
         else {
@@ -272,21 +505,105 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.f;
+		} else
+#endif
                 return *(jfloat*)base;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.j;
+		} else
+#endif
                 return (jfloat)(*(jlong*)base);
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jfloat)(*(jint*)base);
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jfloat)(*(jshort*)base);
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jfloat)(*(jbyte*)base);
 	}
         else if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jfloat)(*(jchar*)base);
 	}
         else {
@@ -306,24 +623,122 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.d;
+		} else
+#endif
                 return *(jdouble*)base;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.f;
+		} else
+#endif
                 return (jdouble)(*(jfloat*)base);
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.j;
+		} else
+#endif
                 return (jdouble)(*(jlong*)base);
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jdouble)(*(jint*)base);
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jdouble)(*(jshort*)base);
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jdouble)(*(jbyte*)base);
 	}
         else if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jdouble)(*(jchar*)base);
 	}
         else {
@@ -348,6 +763,20 @@
         }
 
         if ( fld->type == booleanClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jbool*)base = val;
 	}
         else {
@@ -371,21 +800,105 @@
         }
 
         if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jbyte*)base = val;
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jshort*)base = (jshort)val;
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jint*)base = (jint)val;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base == (jlong)val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -409,18 +922,88 @@
         }
 
         if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jchar*)base = val;
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jint*)base = (jint)val;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base == (jlong)val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -444,18 +1027,88 @@
         }
 
         if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jshort*)base = val;
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jint*)base = (jint)val;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base == (jlong)val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -479,15 +1132,71 @@
         }
 
         if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jint*)base = val;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base == (jlong)val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -511,12 +1220,54 @@
         }
 
         if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base == val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -540,9 +1291,37 @@
         }
 
         if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -566,6 +1345,20 @@
         }
 
         if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base = val;
 	}
         else {
@@ -588,6 +1381,22 @@
         }
 	
 	if (FIELD_ISREF(fld) && (val == NULL || soft_instanceof(resolveFieldType(fld, clas), val))) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.l = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		  return;
+		}
+
+#endif
 		base = getFieldAddress(this, obj);
 		*(struct Hjava_lang_Object**)base = val;
 		return;
Index: kaffe/libraries/clib/native/FileInputStream.c
diff -u kaffe/libraries/clib/native/FileInputStream.c:1.1.1.1 kaffe/libraries/clib/native/FileInputStream.c:1.1.1.1.4.1
--- kaffe/libraries/clib/native/FileInputStream.c:1.1.1.1	Mon Mar 30 20:15:39 1998
+++ kaffe/libraries/clib/native/FileInputStream.c	Mon Sep  7 16:42:13 1998
@@ -122,33 +122,42 @@
 jint
 java_io_FileInputStream_available(struct Hjava_io_FileInputStream* fh)
 {
-	int nr;
-	int r;
+	int r, nr;
+	int fd = unhand(unhand(fh)->fd)->fd;
+	off_t cur = 0;
 
-#if defined(HAVE_IOCTL) && defined(FIONREAD)
-	r = ioctl(unhand(unhand(fh)->fd)->fd, FIONREAD, &nr);
-	if (r < 0) {
-		nr = 0;
+	cur = lseek(fd, cur, SEEK_CUR);
+	if (cur != (off_t)-1) {
+		struct stat statbuf;
+		if (fstat(fd, &statbuf) != -1) {
+			return statbuf.st_size - cur;
+		}
 	}
-#else
-	/* This uses select() to work out if we can read - but what
-	 * happens at the end of file?
-	 */
-	static struct timeval tm = { 0, 0 };
-	int fd;
-	fd_set rd;
 
-	fd = unhand(unhand(fh)->fd)->fd;
-	FD_ZERO(&rd);
-	FD_SET(fd, &rd);
-	r = select(fd+1, &rd, NULL, NULL, &tm);
-	if (r == 1) {
-		nr = 1;
-	}
-	else {
-		nr = 0;
-	}
+	/* If lseek or fstat fail, try another mechanism... */
+
+#if defined(HAVE_IOCTL) && defined(FIONREAD)
+	r = ioctl(fd, FIONREAD, &nr);
+	if (r < 0 || nr == 0)
+		/* FIONREAD may report 0 for files for which data is
+                   available; maybe select will do... */
 #endif
+	{
+		/* This uses select() to work out if we can read - but
+		 * what happens at the end of file?  */
+		static struct timeval tm = { 0, 0 };
+		fd_set rd;
+
+		FD_ZERO(&rd);
+		FD_SET(fd, &rd);
+		r = select(fd+1, &rd, NULL, NULL, &tm);
+		if (r == 1) {
+			nr = 1;
+		}
+		else {
+			nr = 0;
+		}
 
-	return (nr);
+		return (nr);
+	}
 }
Index: kaffe/libraries/clib/native/Makefile.in
diff -u kaffe/libraries/clib/native/Makefile.in:1.1.1.2 kaffe/libraries/clib/native/Makefile.in:1.3
--- kaffe/libraries/clib/native/Makefile.in:1.1.1.2	Sat Jun 13 14:35:28 1998
+++ kaffe/libraries/clib/native/Makefile.in	Sat Jun 13 15:02:32 1998
@@ -16,8 +16,9 @@
 AR=		@AR@
 RANLIB=		@RANLIB@
 INCLUDES=	-I$(srcdir) -I../../../include -I$(srcdir)/../../../include -I../../../config -I$(srcdir)/../../../config
+CPPFLAGS=	@CPPFLAGS@
 CFLAGS=		@CFLAGS@
-ALL_CFLAGS=	$(CFLAGS) $(INCLUDES) $(EXTRA_CFLAGS)
+ALL_CFLAGS=	$(CPPFLAGS) $(CFLAGS) $(INCLUDES) $(EXTRA_CFLAGS)
 INSTALL=	@INSTALL@
 INSTALL_DATA=	@INSTALL_DATA@
 MKDIR=		@MKDIR@
@@ -25,7 +26,7 @@
 DLLTOOL=	@DLLTOOL@
 DEPTOOL=	@DEPTOOL@
 PIC=		@PIC@
-LDFLAGS=	@LIBSHARE@
+LDFLAGS=	@LIBSHARE@ @LDFLAGS@
 LIBS=		@LIBS@
 LDTAIL=		@LDTAIL@ @STD_LIBRARIES@
 KVER=		@KVER@
Index: kaffe/libraries/clib/native/Thread.c
diff -u kaffe/libraries/clib/native/Thread.c:1.1.1.3 kaffe/libraries/clib/native/Thread.c:1.2.2.1
--- kaffe/libraries/clib/native/Thread.c:1.1.1.3	Wed May 13 05:41:14 1998
+++ kaffe/libraries/clib/native/Thread.c	Wed Sep  9 05:23:12 1998
@@ -92,17 +92,17 @@
 void
 java_lang_Thread_suspend0(struct Hjava_lang_Thread* this)
 {
-	lockMutex(this);
+	lockObjMutex((Hjava_lang_Object*)this);
 	waitCond(this, 0);
-	unlockMutex(this);
+	unlockObjMutex((Hjava_lang_Object*)this);
 }
 
 void
 java_lang_Thread_resume0(struct Hjava_lang_Thread* this)
 {
-	lockMutex(this);
+	lockObjMutex((Hjava_lang_Object*)this);
 	signalCond(this);
-	unlockMutex(this);
+	unlockObjMutex((Hjava_lang_Object*)this);
 }
 
 jbool
Index: kaffe/libraries/clib/zip/Deflater.c
diff -u kaffe/libraries/clib/zip/Deflater.c:1.1.1.1 kaffe/libraries/clib/zip/Deflater.c:1.1.1.1.4.1
--- kaffe/libraries/clib/zip/Deflater.c:1.1.1.1	Mon Mar 30 20:15:46 1998
+++ kaffe/libraries/clib/zip/Deflater.c	Mon Sep 14 07:46:47 1998
@@ -111,20 +111,34 @@
 	z_stream* dstream;
 
 	dstream = GET_STREAM(this);
+	GET_STREAM(this) = 0;
+
 	deflateEnd(dstream);
 	free(dstream);
 }
 
+static voidpf
+kaffe_zalloc(voidpf opaque, uInt items, uInt size) {
+  /* allocate through the garbage collector interface */
+  return malloc(items*size);
+}
+
+static void
+kaffe_zfree(voidpf opaque, voidpf address) {
+  /* dispose through the garbage collector interface */
+  free(address);
+}
+
 void
 java_util_zip_Deflater_init(struct Hjava_util_zip_Deflater* this, jbool val)
 {
 	int r;
         z_stream* dstream;
 
-	dstream = malloc(sizeof(dstream));
+	dstream = malloc(sizeof(*dstream));
 	dstream->next_in = 0;
-	dstream->zalloc = 0;
-	dstream->zfree = 0;
+	dstream->zalloc = kaffe_zalloc;
+	dstream->zfree = kaffe_zfree;
 	dstream->opaque = 0;
 
 	r = deflateInit2(dstream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -WSIZEBITS, 9, Z_DEFAULT_STRATEGY);
Index: kaffe/libraries/clib/zip/Makefile.in
diff -u kaffe/libraries/clib/zip/Makefile.in:1.1.1.2 kaffe/libraries/clib/zip/Makefile.in:1.3
--- kaffe/libraries/clib/zip/Makefile.in:1.1.1.2	Sat Jun 13 14:35:44 1998
+++ kaffe/libraries/clib/zip/Makefile.in	Sat Jun 13 15:02:36 1998
@@ -16,8 +16,9 @@
 AR=		@AR@
 RANLIB=		@RANLIB@
 INCLUDES=	-I$(srcdir) -I../../../include -I$(srcdir)/../../../include -I../../../config -I$(srcdir)/../../../config
+CPPFLAGS=	@CPPFLAGS@
 CFLAGS=		@CFLAGS@
-ALL_CFLAGS=	$(CFLAGS) $(INCLUDES) $(EXTRA_CFLAGS)
+ALL_CFLAGS=	$(CPPFLAGS) $(CFLAGS) $(INCLUDES) $(EXTRA_CFLAGS)
 INSTALL=	@INSTALL@
 INSTALL_DATA=	@INSTALL_DATA@
 MKDIR=		@MKDIR@
@@ -25,7 +26,7 @@
 DLLTOOL=	@DLLTOOL@
 DEPTOOL=	@DEPTOOL@
 PIC=		@PIC@
-LDFLAGS=	@LIBSHARE@
+LDFLAGS=	@LIBSHARE@ @LDFLAGS@
 LIBS=		@LIBS@
 LDTAIL=		@LDTAIL@ @STD_LIBRARIES@ @ZIP_LIBRARIES@
 KVER=		@KVER@
