(AC_CHECK_ENABLE_JIT): Likewise.
(AC_CHECK_ENABLE_JNI): Likewise.
* m4/jni.m4: New file.
* m4/java.m4: Likewise.
* m4/jit.m4: Likewise.
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
dnl 02110-1301, USA.
dnl
-dnl $Id: configure.ac 7352 2007-02-13 22:11:37Z ajordan $
+dnl $Id: configure.ac 7375 2007-02-20 00:38:06Z twisti $
dnl Process this file with autoconf to produce a configure script.
dnl Features
-dnl check arguments
-
-dnl check which Java configuration to use
-AC_MSG_CHECKING(which Java configuration to use)
-AC_ARG_ENABLE([java],
- [AS_HELP_STRING(--enable-java,enable specific Java configuration (cldc1.1,javase) [[default=javase]])],
- [case "${enableval}" in
- cldc1.1)
- ENABLE_JAVAME_CLDC1_1=yes
- AC_DEFINE([ENABLE_JAVAME_CLDC1_1], 1, [compile for Java ME CLDC1.1])
- AC_MSG_RESULT(cldc1.1)
- ;;
- javase)
- ENABLE_JAVASE=yes
- AC_DEFINE([ENABLE_JAVASE], 1, [compile for Java SE])
- AC_MSG_RESULT(javase)
- ;;
- *)
- AC_MSG_ERROR(${enableval} is an unknown configuration)
- ;;
- esac],
- [ENABLE_JAVASE=yes
- AC_DEFINE([ENABLE_JAVASE], 1, [compile for Java SE])
- AC_MSG_RESULT(j2se)])
-AM_CONDITIONAL([ENABLE_JAVAME_CLDC1_1], test x"${ENABLE_JAVAME_CLDC1_1}" = "xyes")
-AM_CONDITIONAL([ENABLE_JAVASE], test x"${ENABLE_JAVASE}" = "xyes")
-
-
-dnl check for JIT compiler
-AC_MSG_CHECKING(whether JIT compiler should be compiled)
-AC_ARG_ENABLE([jit],
- [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])],
- [case "${enableval}" in
- no) ENABLE_JIT=no;;
- *) ENABLE_JIT=yes;;
- esac],
- [ENABLE_JIT=yes])
-AC_MSG_RESULT(${ENABLE_JIT})
-AM_CONDITIONAL([ENABLE_JIT], test x"${ENABLE_JIT}" = "xyes")
-
-if test x"${ENABLE_JIT}" = "xyes"; then
- AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
-fi
-
+AC_CHECK_ENABLE_JAVA
+AC_CHECK_ENABLE_JIT
dnl check for stuff that should be done in software
AC_CHECK_SOFTFLOAT
AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
+dnl check for stuff to be built
+AC_CHECK_ENABLE_JNI
+
+
dnl check if a libjvm.so should be built
AC_MSG_CHECKING(whether to build a libjvm.so)
AC_ARG_ENABLE([libjvm],
--- /dev/null
+dnl m4/java.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+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
+dnl $Id: configure.ac 7228 2007-01-19 01:13:48Z edwin $
+
+
+dnl check which Java configuration to use
+
+AC_DEFUN([AC_CHECK_ENABLE_JAVA],[
+AC_MSG_CHECKING(which Java configuration to use)
+AC_ARG_ENABLE([java],
+ [AS_HELP_STRING(--enable-java,enable specific Java configuration (cldc1.1,javase) [[default=javase]])],
+ [case "${enableval}" in
+ cldc1.1)
+ ENABLE_JAVAME_CLDC1_1=yes
+ AC_DEFINE([ENABLE_JAVAME_CLDC1_1], 1, [compile for Java ME CLDC1.1])
+ AC_MSG_RESULT(cldc1.1)
+ ;;
+ javase)
+ ENABLE_JAVASE=yes
+ AC_DEFINE([ENABLE_JAVASE], 1, [compile for Java SE])
+ AC_MSG_RESULT(javase)
+ ;;
+ *)
+ AC_MSG_ERROR(${enableval} is an unknown configuration)
+ ;;
+ esac],
+ [ENABLE_JAVASE=yes
+ AC_DEFINE([ENABLE_JAVASE], 1, [compile for Java SE])
+ AC_MSG_RESULT(j2se)])
+AM_CONDITIONAL([ENABLE_JAVAME_CLDC1_1], test x"${ENABLE_JAVAME_CLDC1_1}" = "xyes")
+AM_CONDITIONAL([ENABLE_JAVASE], test x"${ENABLE_JAVASE}" = "xyes")
+])
--- /dev/null
+dnl m4/jit.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+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
+dnl $Id: configure.ac 7228 2007-01-19 01:13:48Z edwin $
+
+
+dnl check for JIT compiler
+
+AC_DEFUN([AC_CHECK_ENABLE_JIT],[
+AC_MSG_CHECKING(whether JIT compiler should be compiled)
+AC_ARG_ENABLE([jit],
+ [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])],
+ [case "${enableval}" in
+ no)
+ ENABLE_JIT=no
+ ;;
+ *)
+ ENABLE_JIT=yes
+ ;;
+ esac],
+ [ENABLE_JIT=yes])
+AC_MSG_RESULT(${ENABLE_JIT})
+AM_CONDITIONAL([ENABLE_JIT], test x"${ENABLE_JIT}" = "xyes")
+
+if test x"${ENABLE_JIT}" = "xyes"; then
+ AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
+fi
+])
--- /dev/null
+dnl m4/jni.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+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
+dnl $Id: configure.ac 7228 2007-01-19 01:13:48Z edwin $
+
+
+dnl check if JNI should be enabled
+
+AC_DEFUN([AC_CHECK_ENABLE_JNI],[
+AC_MSG_CHECKING(whether JNI should be enabled)
+AC_ARG_ENABLE([jni],
+ [AS_HELP_STRING(--enable-jni,enable JNI [[default=yes]])],
+ [case "${enableval}" in
+ yes)
+ ENABLE_JNI=yes
+ ;;
+ no)
+ ENABLE_JNI=no
+ ;;
+ *)
+ AC_CHECK_ENABLE_JNI_DEFAULT
+ ;;
+ esac],
+ [AC_CHECK_ENABLE_JNI_DEFAULT])
+AC_MSG_RESULT(${ENABLE_JNI})
+
+if test x"${ENABLE_JNI}" = "xyes"; then
+ AC_DEFINE([ENABLE_JNI], 1, [enable JNI])
+fi
+])
+
+
+dnl check for the default value of --enable-jni
+
+AC_DEFUN([AC_CHECK_ENABLE_JNI_DEFAULT],[
+if test x"${ENABLE_JAVAME_CLDC1_1}" = "xyes"; then
+ ENABLE_JNI=no
+else
+ ENABLE_JNI=yes
+fi
+])