From 9d5ab162815d064a4e6bba7ab64ba86d6e25eff2 Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Mon, 28 Apr 2008 21:49:31 +0200 Subject: [PATCH] * m4/jre-layout.m4 (AC_CHECK_WITH_JRE_LAYOUT): Renamed to AC_CHECK_ENABLE_JRE_LAYOUT. * configure.ac: Likewise. * src/cacao/cacao.c: Renamed WITH_JRE_LAYOUT to ENABLE_JRE_LAYOUT. * src/native/vm/gnu/gnu_classpath_VMSystemProperties.c: Likewise. * src/vm/properties.c: Likewise. * src/vm/vm.c: Likewise. * src/vmcore/system.h: Likewise. --- configure.ac | 4 +-- m4/jre-layout.m4 | 28 +++++++++---------- src/cacao/cacao.c | 10 +++---- .../vm/gnu/gnu_classpath_VMSystemProperties.c | 10 +++---- src/vm/properties.c | 4 +-- src/vm/vm.c | 2 +- src/vmcore/system.h | 4 +-- 7 files changed, 29 insertions(+), 33 deletions(-) diff --git a/configure.ac b/configure.ac index cda10971d..9f2c1251c 100644 --- a/configure.ac +++ b/configure.ac @@ -768,12 +768,12 @@ AC_CHECK_WITH_CLASSPATH dnl Now we check for jre-layout so we can skip some checks that are dnl not required. -AC_CHECK_WITH_JRE_LAYOUT +AC_CHECK_ENABLE_JRE_LAYOUT AC_CHECK_WITH_CLASSPATH_PREFIX AC_CHECK_WITH_CLASSPATH_CLASSES -if test x"${WITH_JRE_LAYOUT}" = "xno"; then +if test x"${ENABLE_JRE_LAYOUT}" = "xno"; then AC_CHECK_WITH_CLASSPATH_LIBDIR fi diff --git a/m4/jre-layout.m4 b/m4/jre-layout.m4 index 25c08b5b7..29184d561 100644 --- a/m4/jre-layout.m4 +++ b/m4/jre-layout.m4 @@ -23,19 +23,19 @@ dnl 02110-1301, USA. dnl if we compile for a JRE-style directory layout -AC_DEFUN([AC_CHECK_WITH_JRE_LAYOUT],[ +AC_DEFUN([AC_CHECK_ENABLE_JRE_LAYOUT],[ AC_MSG_CHECKING(if we compile for a JRE-style directory layout) -AC_ARG_WITH([jre-layout], - [AS_HELP_STRING(--with-jre-layout,compile for JRE-style directory layout [[default=no]])], - [case "${withval}" in - yes) - WITH_JRE_LAYOUT=yes - AC_DEFINE([WITH_JRE_LAYOUT], 1, [with JRE layout]) - ;; - *) - WITH_JRE_LAYOUT=no - ;; - esac], - [WITH_JRE_LAYOUT=no]) -AC_MSG_RESULT(${WITH_JRE_LAYOUT}) +AC_ARG_ENABLE([jre-layout], + [AS_HELP_STRING(--enable-jre-layout,compile for JRE-style directory layout [[default=disabled]])], + [case "${enableval}" in + yes) + ENABLE_JRE_LAYOUT=yes + AC_DEFINE([ENABLE_JRE_LAYOUT], 1, [enable JRE layout]) + ;; + *) + ENABLE_JRE_LAYOUT=no + ;; + esac], + [ENABLE_JRE_LAYOUT=no]) +AC_MSG_RESULT(${ENABLE_JRE_LAYOUT}) ]) diff --git a/src/cacao/cacao.c b/src/cacao/cacao.c index 2e0de4641..1f1936258 100644 --- a/src/cacao/cacao.c +++ b/src/cacao/cacao.c @@ -1,9 +1,7 @@ /* src/cacao/cacao.c - contains main() of cacao - Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel, - C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, - E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, - J. Wenninger, J. Wenninger, Institut f. Computersprachen - TU Wien + Copyright (C) 1996-2005, 2006, 2007, 2008 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -33,7 +31,7 @@ # include #endif -#if defined(WITH_JRE_LAYOUT) +#if defined(ENABLE_JRE_LAYOUT) # include # include # include @@ -94,7 +92,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_JRE_LAYOUT) +# if defined(ENABLE_JRE_LAYOUT) /* SUN also uses a buffer of 4096-bytes (strace is your friend). */ path = malloc(sizeof(char) * 4096); diff --git a/src/native/vm/gnu/gnu_classpath_VMSystemProperties.c b/src/native/vm/gnu/gnu_classpath_VMSystemProperties.c index 2763e9e43..5517c6c1a 100644 --- a/src/native/vm/gnu/gnu_classpath_VMSystemProperties.c +++ b/src/native/vm/gnu/gnu_classpath_VMSystemProperties.c @@ -1,9 +1,7 @@ /* src/native/vm/gnu/gnu_classpath_VMSystemProperties.c - Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel, - C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, - E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, - J. Wenninger, Institut f. Computersprachen - TU Wien + Copyright (C) 1996-2005, 2006, 2007, 2008 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -100,7 +98,7 @@ JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_preInit(JNIEnv *env JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_postInit(JNIEnv *env, jclass clazz, java_util_Properties *properties) { java_handle_t *p; -#if defined(WITH_JRE_LAYOUT) +#if defined(ENABLE_JRE_LAYOUT) char *java_home; char *path; s4 len; @@ -115,7 +113,7 @@ JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_postInit(JNIEnv *en /* post-set some properties */ -#if defined(WITH_JRE_LAYOUT) +#if defined(ENABLE_JRE_LAYOUT) /* XXX when we do it that way, we can't set these properties on commandline */ diff --git a/src/vm/properties.c b/src/vm/properties.c index f50460d9b..9f763f6f3 100644 --- a/src/vm/properties.c +++ b/src/vm/properties.c @@ -121,7 +121,7 @@ void properties_set(void) # endif #endif -#if defined(WITH_JRE_LAYOUT) +#if defined(ENABLE_JRE_LAYOUT) /* SUN also uses a buffer of 4096-bytes (strace is your friend). */ p = MNEW(char, 4096); @@ -237,7 +237,7 @@ void properties_set(void) strcpy(boot_class_path, p); } else { -#if defined(WITH_JRE_LAYOUT) +#if defined(ENABLE_JRE_LAYOUT) # if defined(WITH_CLASSPATH_GNU) len = diff --git a/src/vm/vm.c b/src/vm/vm.c index 30134fcb1..ea79bcc71 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -635,7 +635,7 @@ static void vm_printconfig(void) printf(" initial heap size : %d\n", HEAP_STARTSIZE); printf(" stack size : %d\n", STACK_SIZE); -#if defined(WITH_JRE_LAYOUT) +#if defined(ENABLE_JRE_LAYOUT) /* When we're building with JRE-layout, the default paths are the same as the runtime paths. */ #else diff --git a/src/vmcore/system.h b/src/vmcore/system.h index b41e1c910..2f416d162 100644 --- a/src/vmcore/system.h +++ b/src/vmcore/system.h @@ -39,7 +39,7 @@ # include #endif -#if defined(WITH_JRE_LAYOUT) +#if defined(ENABLE_JRE_LAYOUT) # if defined(HAVE_LIBGEN_H) # include # endif @@ -147,7 +147,7 @@ inline static int system_connect(int sockfd, const struct sockaddr *serv_addr, s #endif } -#if defined(WITH_JRE_LAYOUT) +#if defined(ENABLE_JRE_LAYOUT) inline static char *system_dirname(char *path) { #if defined(HAVE_DIRNAME) -- 2.25.1