* src/threads/threadlist.cpp: Use full version in user-visible strings.
* src/vm/properties.cpp: Likewise.
* src/vm/vm.cpp: Likewise.
* m4/hgrev.m4: Define AC_CHECK_WITH_HGREV.
* m4/version.m4: Append hg revision to VERSION_EXTRA.
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(cacao, 1.1.0pre1, cacao@cacaojvm.org)
+AC_INIT(cacao, 1.1.0pre2, cacao@cacaojvm.org)
AC_CONFIG_SRCDIR(src/cacao/cacao.cpp)
AC_CONFIG_AUX_DIR([.])
AC_CANONICAL_HOST
dnl This one depends on AC_CHECK_ENABLE_ZLIB.
AC_CHECK_WITH_VM_ZIP
+AC_CHECK_WITH_HGREV
AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY
--- /dev/null
+dnl m4/hgrev.m4
+dnl
+dnl Copyright (C) 2010
+dnl CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+dnl
+dnl This file is part of CACAO.
+dnl
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl Mercurial revision
+
+AC_DEFUN([AC_CHECK_WITH_HGREV],[
+AC_MSG_CHECKING(for the Mercurial revision)
+AC_ARG_WITH([hg-revision],
+ [AS_HELP_STRING(--with-hg-revision=<hash>, the Mercurial revision used for this CACAO build)],
+ [CACAO_HGREV=${withval}])
+AC_MSG_RESULT(${CACAO_HGREV-not specified})
+AC_DEFINE_UNQUOTED([CACAO_HGREV], "${CACAO_HGREV}", [CACAO's Mercurial revision])
+AC_SUBST(CACAO_HGREV)
+])
micro=0
extra=`echo "$version" | $SED -e 's/^[[0-9]]*\.[[0-9]]*//'`
fi
+if test ! "x$CACAO_HGREV" = "x";
+then
+ extra="$extra.hg$CACAO_HGREV"
+fi
AC_DEFINE_UNQUOTED(VERSION_MAJOR, $major, [major version number])
AC_DEFINE_UNQUOTED(VERSION_MINOR, $minor, [minor version number])
AC_DEFINE_UNQUOTED(VERSION_MICRO, $micro, [micro version number])
AC_DEFINE_UNQUOTED(VERSION_EXTRA, "$extra", [extra version info])
+AC_DEFINE_UNQUOTED(VERSION_FULL, "$major.$minor.$micro$extra", [full version info])
])
// Lock the thread lists.
lock();
- printf("Full thread dump CACAO "VERSION":\n");
+ printf("Full thread dump CACAO "VERSION_FULL":\n");
// Iterate over all started threads.
threadobject* self = THREADOBJECT;
put("java.vm.specification.version", "1.0");
put("java.vm.specification.vendor", "Sun Microsystems Inc.");
put("java.vm.specification.name", "Java Virtual Machine Specification");
- put("java.vm.version", VERSION);
+ put("java.vm.version", VERSION_FULL);
put("java.vm.vendor", "CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO");
put("java.vm.name", "CACAO");
uname(utsnamebuf);
- put("java.runtime.version", VERSION);
+ put("java.runtime.version", VERSION_FULL);
put("java.runtime.name", "CACAO");
put("java.specification.version", "1.5");
static void version(bool opt_exit)
{
puts("java version \""JAVA_VERSION"\"");
- puts("CACAO version "VERSION"\n");
+ puts("CACAO version "VERSION_FULL"\n");
- puts("Copyright (C) 1996-2005, 2006, 2007, 2008, 2009");
+ puts("Copyright (C) 1996-2005, 2006, 2007, 2008, 2009, 2010");
puts("CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO");
puts("This is free software; see the source for copying conditions. There is NO");
puts("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
*/
void VM::print_build_time_config(void)
{
- puts("CACAO "VERSION" configure/build options:");
+ puts("CACAO "VERSION_FULL" configure/build options:");
puts("");
puts(" ./configure: "VERSION_CONFIGURE_ARGS"");
#if defined(__VERSION__)