* src/vm/suck.c (vm/vm.h): Added.
authortwisti <none@none>
Fri, 20 Oct 2006 13:54:54 +0000 (13:54 +0000)
committertwisti <none@none>
Fri, 20 Oct 2006 13:54:54 +0000 (13:54 +0000)
(bootclasspath, classpath): Removed.
(suck_add_from_property): Prefix bootclasspath with _Jv_.
* src/vm/suck.h (bootclasspath, classpath): Removed.

* src/vm/vm.c (_Jv_bootclasspath, _Jv_classpath)
(_Jv_java_library_path): Added.
(version): Prefix bootclasspath with _Jv_.
(vm_create): Likewise, set _Jv_java_library_path to LD_LIBRARY_PATH
before handling commandline options.
* src/vm/vm.h (_Jv_bootclasspath, _Jv_classpath)
(_Jv_java_library_path): Added.

* src/native/vm/gnu_classpath_VMSystemProperties.c (preInit): Prefix
bootclasspath and classpath with _Jv_, use _Jv_java_library_path for
setting java.library.path.

* src/cacao/cacao.c (main): First let dlopen try to open libjvm at
it's default locations.
* src/native/native.c (native_init): Likewise.

* src/cacaoh/headers.c (_Jv_bootclasspath): Added.

* contrib/setenvinstalled.in: Set LD_LIBRARY_PATH again.
* contrib/setenvsource.in: Likewise.

* tests/regression/native/Makefile.am (JAVAFLAGS): Removed
-Djava.library.path=.
(check): Set LD_LIBRARY_PATH.
* tests/regression/codepatching/Makefile.am (check): Likewise.
* tests/regression/Makefile.am: Likewise.

13 files changed:
contrib/setenvinstalled.in
contrib/setenvsource.in
src/cacao/cacao.c
src/cacaoh/headers.c
src/native/native.c
src/native/vm/gnu_classpath_VMSystemProperties.c
src/vm/suck.c
src/vm/suck.h
src/vm/vm.c
src/vm/vm.h
tests/regression/Makefile.am
tests/regression/codepatching/Makefile.am
tests/regression/native/Makefile.am

index 2af0c76505a0b2512cd224d2e128e8fa4ae320ee..69f10302eb8da9839e1a1acade46d6358a79e866 100644 (file)
@@ -1,5 +1,6 @@
 # sets the environment variables when GNU classpath is installed, but
 # CACAO not
 
-export BOOTCLASSPATH=$PWD/src/lib/vm.zip:@CLASSPATH_GLIBJ_ZIP@
 export PATH=$PWD/src/cacao:$PATH
+export LD_LIBRARY_PATH=$PWD/src/cacao/.libs
+export BOOTCLASSPATH=$PWD/src/lib/vm.zip:@CLASSPATH_GLIBJ_ZIP@
index 72adf6e339a0d8f97507fdfbd4cc0b8a46402694..71cb9eb81cbdc2369739afd754dbf036e30fb640 100644 (file)
@@ -1,7 +1,10 @@
 # sets the environment variables when GNU classpath and CACAO are not
 # installed
 
+export PATH=$PWD/src/cacao:$PATH
+
 export LD_LIBRARY_PATH=\
+$PWD/src/cacao/.libs:\
 @CLASSPATH_PREFIX@/native/jawt/.libs:\
 @CLASSPATH_PREFIX@/native/jni/gtk-peer/.libs:\
 @CLASSPATH_PREFIX@/native/jni/java-io/.libs:\
@@ -12,4 +15,3 @@ export LD_LIBRARY_PATH=\
 $LD_LIBRARY_PATH
 
 export BOOTCLASSPATH=$PWD/src/lib/vm.zip:@CLASSPATH_GLIBJ_ZIP@
-export PATH=$PWD/src/cacao:$PATH
index 15ad63ee982eabdf6aa4fa4a7ac2a8fd3e51ce37..7c9ede157b9fc63337305b4a4433619bff77789a 100644 (file)
@@ -31,7 +31,7 @@
             Philipp Tomsich
             Christian Thalinger
 
-   $Id: cacao.c 5658 2006-10-04 10:10:01Z twisti $
+   $Id: cacao.c 5810 2006-10-20 13:54:54Z twisti $
 
 */
 
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
        
        /* load and initialize a Java VM, return a JNI interface pointer in env */
 
-#if defined(ENABLE_LIBJVM)
+#if !defined(WITH_STATIC_CLASSPATH) && defined(ENABLE_LIBJVM)
 # if defined(WITH_JRE_LAYOUT)
        /* SUN also uses a buffer of 4096-bytes (strace is your friend). */
 
@@ -132,9 +132,14 @@ int main(int argc, char **argv)
                abort();
        }
 
-       if (!(libjvm_handle = lt_dlopenext(path))) {
-               fprintf(stderr, "lt_dlopenext failed: %s\n", lt_dlerror());
-               abort();
+       /* First try to open where dlopen searches, e.g. LD_LIBRARY_PATH.
+          If not found, try the absolute path. */
+
+       if (!(libjvm_handle = lt_dlopenext("libjvm"))) {
+               if (!(libjvm_handle = lt_dlopenext(path))) {
+                       fprintf(stderr, "lt_dlopenext failed: %s\n", lt_dlerror());
+                       abort();
+               }
        }
 
        if (!(libjvm_createvm = lt_dlsym(libjvm_handle, "JNI_CreateJavaVM"))) {
@@ -155,7 +160,7 @@ int main(int argc, char **argv)
        if (jvmti) jvmti_set_phase(JVMTI_PHASE_START);
 #endif
 
-#if defined(ENABLE_LIBJVM)
+#if !defined(WITH_STATIC_CLASSPATH) && defined(ENABLE_LIBJVM)
        if (!(libjvm_vm_run = lt_dlsym(libjvm_handle, "vm_run"))) {
                fprintf(stderr, "lt_dlsym failed: %s\n", lt_dlerror());
                abort();
index 82921be86db42651bb888b1f4d1d1f543a510354..875a57c15974a1eff740d772795be2fcfcc45aac 100644 (file)
@@ -31,7 +31,7 @@
             Christian Thalinger
                        Edwin Steiner
 
-   $Id: headers.c 5805 2006-10-19 09:32:29Z twisti $
+   $Id: headers.c 5810 2006-10-20 13:54:54Z twisti $
 
 */
 
@@ -72,7 +72,7 @@
 /* Invocation API variables ***************************************************/
 
 _Jv_JavaVM *_Jv_jvm;                    /* denotes a Java VM                  */
-
+char       *_Jv_bootclasspath;
 
 #if defined(ENABLE_INTRP)
 /* dummy interpreter stack to keep the compiler happy */
index edaedd1353cd2581267f1169b6ba6bc3bf31936c..e2d21699d7204f656a91940b3b2bb98117a896dd 100644 (file)
@@ -30,7 +30,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: native.c 5658 2006-10-04 10:10:01Z twisti $
+   $Id: native.c 5810 2006-10-20 13:54:54Z twisti $
 
 */
 
@@ -346,8 +346,12 @@ bool native_init(void)
           depends on the configuration. */
 
 # if defined(ENABLE_LIBJVM)
-       if (!(mainhandle = lt_dlopenext(cacao_libjvm)))
-               vm_abort("lt_dlopenext failed: %s\n", lt_dlerror());
+       /* First try to open where dlopen searches, e.g. LD_LIBRARY_PATH.
+          If not found, try the absolute path. */
+
+       if (!(mainhandle = lt_dlopenext("libjvm")))
+               if (!(mainhandle = lt_dlopenext(cacao_libjvm)))
+                       vm_abort("lt_dlopenext failed: %s\n", lt_dlerror());
 # else
        if (!(mainhandle = lt_dlopen(NULL)))
                vm_abort("lt_dlopen failed: %s\n", lt_dlerror());
index 279d88a985fb4dd58b78111b5c938bb5cc40fc49..38859728829b760c4aa72a6a21e0eeb6b0f098fe 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: gnu_classpath_VMSystemProperties.c 5658 2006-10-04 10:10:01Z twisti $
+   $Id: gnu_classpath_VMSystemProperties.c 5810 2006-10-20 13:54:54Z twisti $
 
 */
 
@@ -134,7 +134,7 @@ JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_preInit(JNIEnv *env
        properties_system_add("java.specification.vendor", "Sun Microsystems Inc.");
        properties_system_add("java.specification.name", "Java Platform API Specification");
        properties_system_add("java.class.version", CLASS_VERSION);
-       properties_system_add("java.class.path", classpath);
+       properties_system_add("java.class.path", _Jv_classpath);
 
        properties_system_add("java.runtime.version", VERSION);
        properties_system_add("java.runtime.name", "CACAO");
@@ -143,8 +143,8 @@ JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_preInit(JNIEnv *env
           other for compatibility with Sun (required by most
           applications). */
 
-       properties_system_add("java.boot.class.path", bootclasspath);
-       properties_system_add("sun.boot.class.path", bootclasspath);
+       properties_system_add("java.boot.class.path", _Jv_bootclasspath);
+       properties_system_add("sun.boot.class.path", _Jv_bootclasspath);
 
 #if defined(WITH_STATIC_CLASSPATH)
        properties_system_add("gnu.classpath.boot.library.path", ".");
@@ -154,15 +154,7 @@ JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_preInit(JNIEnv *env
        path */
 
        properties_system_add("gnu.classpath.boot.library.path", classpath_libdir);
-
-       /* now fill java.library.path */
-
-       ld_library_path = getenv("LD_LIBRARY_PATH");
-
-       if (ld_library_path != NULL)
-               properties_system_add("java.library.path", ld_library_path);
-       else
-               properties_system_add("java.library.path", "");
+       properties_system_add("java.library.path", _Jv_java_library_path);
 #endif
 
        properties_system_add("java.io.tmpdir", "/tmp");
index b91f2fa84c6e67116eee0413fb853f38e7f7e371..73bf7c491279fb3c0a4625c9ddc7828bc357d215 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: suck.c 5123 2006-07-12 21:45:34Z twisti $
+   $Id: suck.c 5810 2006-10-20 13:54:54Z twisti $
 
 */
 
 #include "vm/properties.h"
 #include "vm/stringlocal.h"
 #include "vm/suck.h"
+#include "vm/vm.h"
 #include "vm/zip.h"
 
 
 /* global variables ***********************************************************/
 
-char *bootclasspath;                    /* contains the boot classpath        */
-char *classpath;                        /* contains the classpath             */
-
 list *list_classpath_entries;
 
 
@@ -306,7 +304,7 @@ void suck_add_from_property(char *key)
                                        tmpbootclasspath = MNEW(char,
                                                                                        pathlen + strlen("/") + namlen +
                                                                                        strlen(":") +
-                                                                                       strlen(bootclasspath) +
+                                                                                       strlen(_Jv_bootclasspath) +
                                                                                        strlen("0"));
 
                                        /* prepend the file found to bootclasspath */
@@ -316,15 +314,15 @@ void suck_add_from_property(char *key)
                                        strcat(tmpbootclasspath, namelist[i]->d_name);
                                        strcat(tmpbootclasspath, ":");
 
-                                       strcat(tmpbootclasspath, bootclasspath);
+                                       strcat(tmpbootclasspath, _Jv_bootclasspath);
 
                                        /* free old bootclasspath memory */
 
-                                       MFREE(bootclasspath, u1, strlen(bootclasspath));
+                                       MFREE(_Jv_bootclasspath, u1, strlen(_Jv_bootclasspath));
 
                                        /* and set the new bootclasspath */
 
-                                       bootclasspath = tmpbootclasspath;
+                                       _Jv_bootclasspath = tmpbootclasspath;
 
                                        /* free the memory allocated by scandir */
 
index 8981739b7e3171d98240213fe6d061cab24b6d56..f8eca841849dfce6aa8df9a36eff04abf54d8226 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: suck.h 5181 2006-07-26 13:27:54Z twisti $
+   $Id: suck.h 5810 2006-10-20 13:54:54Z twisti $
 
 */
 
@@ -162,9 +162,6 @@ struct list_classpath_entry {
 
 /* export variables ***********************************************************/
 
-extern char *bootclasspath;
-extern char *classpath;
-
 extern list *list_classpath_entries;
 
 
index 1c012c74eaa7bc2ceb9df6aa3046b0909b0de95a..1aa9bcfea479fbaa47110a950d65e84b360f11a3 100644 (file)
@@ -96,6 +96,10 @@ char      *cacao_prefix = NULL;
 char      *cacao_libjvm = NULL;
 char      *classpath_libdir = NULL;
 
+char      *_Jv_bootclasspath;           /* contains the boot classpath        */
+char      *_Jv_classpath;               /* contains the classpath             */
+char      *_Jv_java_library_path;
+
 char      *mainstring = NULL;
 classinfo *mainclass = NULL;
 
@@ -547,7 +551,7 @@ static void version(bool opt_exit)
        printf("  maximum heap size              : %d\n", opt_heapmaxsize);
        printf("  initial heap size              : %d\n", opt_heapstartsize);
        printf("  stack size                     : %d\n", opt_stacksize);
-       printf("  java.boot.class.path           : %s\n", bootclasspath);
+       printf("  java.boot.class.path           : %s\n", _Jv_bootclasspath);
        printf("  gnu.classpath.boot.library.path: %s\n", classpath_libdir);
 
        /* exit normally, if requested */
@@ -683,8 +687,8 @@ bool vm_create(JavaVMInitArgs *vm_args)
        cp = getenv("BOOTCLASSPATH");
 
        if (cp != NULL) {
-               bootclasspath = MNEW(char, strlen(cp) + strlen("0"));
-               strcpy(bootclasspath, cp);
+               _Jv_bootclasspath = MNEW(char, strlen(cp) + strlen("0"));
+               strcpy(_Jv_bootclasspath, cp);
        }
        else {
 #if defined(WITH_JRE_LAYOUT)
@@ -696,22 +700,22 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        strlen("/share/classpath/glibj.zip") +
                        strlen("0");
 
-               bootclasspath = MNEW(char, len);
-               strcat(bootclasspath, cacao_prefix);
-               strcat(bootclasspath, "/share/cacao/vm.zip");
-               strcat(bootclasspath, ":");
-               strcat(bootclasspath, cacao_prefix);
-               strcat(bootclasspath, "/share/classpath/glibj.zip");
+               _Jv_bootclasspath = MNEW(char, len);
+               strcat(_Jv_bootclasspath, cacao_prefix);
+               strcat(_Jv_bootclasspath, "/share/cacao/vm.zip");
+               strcat(_Jv_bootclasspath, ":");
+               strcat(_Jv_bootclasspath, cacao_prefix);
+               strcat(_Jv_bootclasspath, "/share/classpath/glibj.zip");
 #else
                len = strlen(CACAO_VM_ZIP) +
                        strlen(":") +
                        strlen(CLASSPATH_GLIBJ_ZIP) +
                        strlen("0");
 
-               bootclasspath = MNEW(char, len);
-               strcat(bootclasspath, CACAO_VM_ZIP);
-               strcat(bootclasspath, ":");
-               strcat(bootclasspath, CLASSPATH_GLIBJ_ZIP);
+               _Jv_bootclasspath = MNEW(char, len);
+               strcat(_Jv_bootclasspath, CACAO_VM_ZIP);
+               strcat(_Jv_bootclasspath, ":");
+               strcat(_Jv_bootclasspath, CLASSPATH_GLIBJ_ZIP);
 #endif
        }
 
@@ -720,14 +724,20 @@ bool vm_create(JavaVMInitArgs *vm_args)
        cp = getenv("CLASSPATH");
 
        if (cp != NULL) {
-               classpath = MNEW(char, strlen(cp) + strlen("0"));
-               strcat(classpath, cp);
+               _Jv_classpath = MNEW(char, strlen(cp) + strlen("0"));
+               strcat(_Jv_classpath, cp);
        }
        else {
-               classpath = MNEW(char, strlen(".") + strlen("0"));
-               strcpy(classpath, ".");
+               _Jv_classpath = MNEW(char, strlen(".") + strlen("0"));
+               strcpy(_Jv_classpath, ".");
        }
 
+       /* get and set java.library.path */
+
+       _Jv_java_library_path = getenv("LD_LIBRARY_PATH");
+
+       if (_Jv_java_library_path == NULL)
+               _Jv_java_library_path = "";
 
        /* interpret the options **************************************************/
 
@@ -788,10 +798,10 @@ bool vm_create(JavaVMInitArgs *vm_args)
 
                case OPT_CLASSPATH:
                        /* forget old classpath and set the argument as new classpath */
-                       MFREE(classpath, char, strlen(classpath));
+                       MFREE(_Jv_classpath, char, strlen(_Jv_classpath));
 
-                       classpath = MNEW(char, strlen(opt_arg) + strlen("0"));
-                       strcpy(classpath, opt_arg);
+                       _Jv_classpath = MNEW(char, strlen(opt_arg) + strlen("0"));
+                       strcpy(_Jv_classpath, opt_arg);
                        break;
 
                case OPT_D:
@@ -814,39 +824,39 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        /* Forget default bootclasspath and set the argument as
                           new boot classpath. */
 
-                       MFREE(bootclasspath, char, strlen(bootclasspath));
+                       MFREE(_Jv_bootclasspath, char, strlen(_Jv_bootclasspath));
 
-                       bootclasspath = MNEW(char, strlen(opt_arg) + strlen("0"));
-                       strcpy(bootclasspath, opt_arg);
+                       _Jv_bootclasspath = MNEW(char, strlen(opt_arg) + strlen("0"));
+                       strcpy(_Jv_bootclasspath, opt_arg);
                        break;
 
                case OPT_BOOTCLASSPATH_A:
                        /* append to end of bootclasspath */
 
-                       len = strlen(bootclasspath);
+                       len = strlen(_Jv_bootclasspath);
 
-                       bootclasspath = MREALLOC(bootclasspath,
-                                                                        char,
-                                                                        len,
-                                                                        len + strlen(":") +
-                                                                        strlen(opt_arg) + strlen("0"));
+                       _Jv_bootclasspath = MREALLOC(_Jv_bootclasspath,
+                                                                                char,
+                                                                                len,
+                                                                                len + strlen(":") +
+                                                                                strlen(opt_arg) + strlen("0"));
 
-                       strcat(bootclasspath, ":");
-                       strcat(bootclasspath, opt_arg);
+                       strcat(_Jv_bootclasspath, ":");
+                       strcat(_Jv_bootclasspath, opt_arg);
                        break;
 
                case OPT_BOOTCLASSPATH_P:
                        /* prepend in front of bootclasspath */
 
-                       cp = bootclasspath;
+                       cp = _Jv_bootclasspath;
                        len = strlen(cp);
 
-                       bootclasspath = MNEW(char, strlen(opt_arg) + strlen(":") +
-                                                                len + strlen("0"));
+                       _Jv_bootclasspath = MNEW(char, strlen(opt_arg) + strlen(":") +
+                                                                        len + strlen("0"));
 
-                       strcpy(bootclasspath, opt_arg);
-                       strcat(bootclasspath, ":");
-                       strcat(bootclasspath, cp);
+                       strcpy(_Jv_bootclasspath, opt_arg);
+                       strcat(_Jv_bootclasspath, ":");
+                       strcat(_Jv_bootclasspath, cp);
 
                        MFREE(cp, char, len);
                        break;
@@ -854,18 +864,18 @@ bool vm_create(JavaVMInitArgs *vm_args)
                case OPT_GLIBJ:
                        /* use as Java core library, but prepend VM interface classes */
 
-                       MFREE(bootclasspath, char, strlen(bootclasspath));
+                       MFREE(_Jv_bootclasspath, char, strlen(_Jv_bootclasspath));
 
                        len = strlen(CACAO_VM_ZIP) +
                                strlen(":") +
                                strlen(opt_arg) +
                                strlen("0");
 
-                       bootclasspath = MNEW(char, len);
+                       _Jv_bootclasspath = MNEW(char, len);
 
-                       strcpy(bootclasspath, CACAO_VM_ZIP);
-                       strcat(bootclasspath, ":");
-                       strcat(bootclasspath, opt_arg);
+                       strcpy(_Jv_bootclasspath, CACAO_VM_ZIP);
+                       strcat(_Jv_bootclasspath, ":");
+                       strcat(_Jv_bootclasspath, opt_arg);
                        break;
 
 #if defined(ENABLE_JVMTI)
@@ -1250,13 +1260,13 @@ bool vm_create(JavaVMInitArgs *vm_args)
                if (opt_jar == true) {
                        /* free old classpath */
 
-                       MFREE(classpath, char, strlen(classpath));
+                       MFREE(_Jv_classpath, char, strlen(_Jv_classpath));
 
                        /* put jarfile into classpath */
 
-                       classpath = MNEW(char, strlen(mainstring) + strlen("0"));
+                       _Jv_classpath = MNEW(char, strlen(mainstring) + strlen("0"));
 
-                       strcpy(classpath, mainstring);
+                       strcpy(_Jv_classpath, mainstring);
                }
                else {
                        /* replace .'s with /'s in classname */
@@ -1330,7 +1340,7 @@ bool vm_create(JavaVMInitArgs *vm_args)
                throw_main_exception_exit();
 
        suck_add_from_property("java.endorsed.dirs");
-       suck_add(bootclasspath);
+       suck_add(_Jv_bootclasspath);
 
        /* initialize the memory subsystem (must be done _after_
           threads_preinit) */
@@ -1434,9 +1444,9 @@ bool vm_create(JavaVMInitArgs *vm_args)
 # if defined(ENABLE_PROFILING)
        /* start the profile sampling thread */
 
-       if (opt_prof)
-               if (!profile_start_thread())
-                       throw_main_exception_exit();
+/*     if (opt_prof) */
+/*             if (!profile_start_thread()) */
+/*                     throw_main_exception_exit(); */
 # endif
 #endif
 
index 0f8d1e58ca7de5659860064051efc56955c104a8..ddd5e35835d7f7570579d330539e3a374b93e45a 100644 (file)
@@ -55,6 +55,10 @@ extern char      *cacao_prefix;
 extern char      *cacao_libjvm;
 extern char      *classpath_libdir;
 
+extern char      *_Jv_bootclasspath;
+extern char      *_Jv_classpath;
+extern char      *_Jv_java_library_path;
+
 extern char      *mainstring;
 extern classinfo *mainclass;
 
index 3ceb21b0de9a9d5d108946492bc433736b8569b9..65028a3c4eb704a3acc70b5615d766c67a4ec103 100644 (file)
@@ -28,7 +28,7 @@
 ##
 ## Changes:
 ##
-## $Id: Makefile.am 5610 2006-10-01 20:27:54Z edwin $
+## $Id: Makefile.am 5810 2006-10-20 13:54:54Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
@@ -89,12 +89,12 @@ build:
        @$(JAVAC) -d . $(SOURCE_FILES)
 
 $(SIMPLE_JAVA_TESTS):
-       @echo -nowarn -n "$@: "
-       @$(JAVA) $(JAVAFLAGS) $@
+       @echo "$@: "
+       @LD_LIBRARY_PATH=$(top_builddir)/src/cacao/.libs $(JAVA) $(JAVAFLAGS) $@
 
 
 $(OUTPUT_JAVA_TESTS):
-       @$(SHELL) $(srcdir)/Test.sh "$(JAVA) $(JAVAFLAGS)" $@ $(srcdir)
+       @LD_LIBRARY_PATH=$(top_builddir)/src/cacao/.libs $(SHELL) $(srcdir)/Test.sh "$(JAVA) $(JAVAFLAGS)" $@ $(srcdir)
 
 
 ## Local variables:
index 72fe6024750cb55ef97b8547b836d275b95183bf..6c1f6efc94dd9026cec9706c7a093181b0b6ee97 100644 (file)
@@ -28,7 +28,7 @@
 ##
 ## Changes:
 ##
-## $Id: Makefile.am 5610 2006-10-01 20:27:54Z edwin $
+## $Id: Makefile.am 5810 2006-10-20 13:54:54Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
@@ -132,7 +132,7 @@ CLEANFILES = \
        *.class
 
 check: build
-       @$(JAVA) $(JAVAFLAGS) test
+       @LD_LIBRARY_PATH=$(top_builddir)/src/cacao/.libs $(JAVA) $(JAVAFLAGS) test
 
 build:
        @$(JAVAC) -nowarn -d . $(SOURCE_FILES)
index ca2c15278e2dc23073bf5ed6637becdbd0291c91..aef2da714a6c84bb8a793129014def45d3f6e6da 100644 (file)
 ##
 ## Changes:
 ##
-## $Id: Makefile.am 5610 2006-10-01 20:27:54Z edwin $
+## $Id: Makefile.am 5810 2006-10-20 13:54:54Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)
 
 JAVA      = $(top_builddir)/src/cacao/cacao
-JAVAFLAGS = -Xbootclasspath:$(top_builddir)/src/lib/classes/:$(CLASSPATH_GLIBJ_ZIP) -Djava.library.path=.
+JAVAFLAGS = -Xbootclasspath:$(top_builddir)/src/lib/classes/:$(CLASSPATH_GLIBJ_ZIP)
 JAVAH     = $(top_builddir)/src/cacaoh/cacaoh
 
 SOURCE_FILES = \
@@ -70,7 +70,7 @@ $(TESTNAMES) $(NOTESTNAMES):
        @$(JAVAC) -nowarn -d . $(srcdir)/$@.java
        @$(JAVAH) $@
        @$(CC) -shared $(AM_CPPFLAGS) $(CFLAGS) $(srcdir)/$@.c -o lib$@.so -fPIC
-       @$(SHELL) $(srcdir)/../Test.sh "$(JAVA) $(JAVAFLAGS)" $@ $(srcdir)
+       @LD_LIBRARY_PATH=$(top_builddir)/src/cacao/.libs:. $(SHELL) $(srcdir)/../Test.sh "$(JAVA) $(JAVAFLAGS)" $@ $(srcdir)
 
 
 ## Local variables: