summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--build-aux/javaexec.sh.in28
-rw-r--r--lib/ChangeLog9
-rw-r--r--lib/javaexec.c6
-rw-r--r--m4/ChangeLog11
-rw-r--r--m4/javaexec.m452
6 files changed, 80 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index 0965dc2e27..6abfea2bee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-03-12 Bruno Haible <bruno@clisp.org>
+
+ * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
+
2005-12-04 Bruno Haible <bruno@clisp.org>
* build-aux/csharpexec.sh.in: Add support for 'clix' launcher
diff --git a/build-aux/javaexec.sh.in b/build-aux/javaexec.sh.in
index db896e42ff..95776816ce 100644
--- a/build-aux/javaexec.sh.in
+++ b/build-aux/javaexec.sh.in
@@ -1,7 +1,7 @@
#!/bin/sh
# Execute a Java program.
-# Copyright (C) 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006 Free Software Foundation, Inc.
# Written by Bruno Haible <haible@clisp.cons.org>, 2001.
#
# This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# This uses the same choices as javaexec.c, but instead of relying on the
# environment settings at run time, it uses the environment variables
@@ -27,9 +27,9 @@
#
# The extra CLASSPATH must have been set prior to calling this script.
-CONF_JAVA='@JAVA@'
+CONF_JAVA='@CONF_JAVA@'
CONF_CLASSPATH='@CLASSPATH@'
-if test -n "$CONF_JAVA"; then
+if test -n "@HAVE_JAVA_ENVVAR@"; then
# Combine given CLASSPATH and configured CLASSPATH.
if test -n "$CLASSPATH"; then
CLASSPATH="$CLASSPATH${CONF_CLASSPATH:+@CLASSPATH_SEPARATOR@$CONF_CLASSPATH}"
@@ -43,20 +43,24 @@ else
unset JAVA_HOME
export CLASSPATH
if test -n "@HAVE_GIJ@"; then
- test -z "$JAVA_VERBOSE" || echo gij "$@"
- exec gij "$@"
+ # In this case, $CONF_JAVA is "gij".
+ test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
+ exec $CONF_JAVA "$@"
else
if test -n "@HAVE_JAVA@"; then
- test -z "$JAVA_VERBOSE" || echo java "$@"
- exec java "$@"
+ # In this case, $CONF_JAVA is "java".
+ test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
+ exec $CONF_JAVA "$@"
else
if test -n "@HAVE_JRE@"; then
- test -z "$JAVA_VERBOSE" || echo jre "$@"
- exec jre "$@"
+ # In this case, $CONF_JAVA is "jre".
+ test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
+ exec $CONF_JAVA "$@"
else
if test -n "@HAVE_JVIEW@"; then
- test -z "$JAVA_VERBOSE" || echo jview "$@"
- exec jview "$@"
+ # In this case, $CONF_JAVA is "jview".
+ test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
+ exec $CONF_JAVA "$@"
else
echo 'Java virtual machine not found, try installing gij or set $JAVA, then reconfigure' 1>&2
exit 1
diff --git a/lib/ChangeLog b/lib/ChangeLog
index dd63881416..ddccf1f4bb 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-17 Bruno Haible <bruno@clisp.org>
+
+ Cygwin portability.
+ * javaexec.c (execute_java_class): Test for jview program also on
+ Cygwin.
+
2006-04-09 Bruno Haible <bruno@clisp.org>
* fatal-signal.c: Don't include string.h.
@@ -18,7 +24,8 @@
2005-07-09 Bruno Haible <bruno@clisp.org>
- * csharpcomp.c (compile_csharp_using_sscli): For -l option, add a .dll suffix.
+ * csharpcomp.c (compile_csharp_using_sscli): For -l option, add a .dll
+ suffix.
Reported by Mark Junker <mjscod@gmx.de>.
2006-06-17 Bruno Haible <bruno@clisp.org>
diff --git a/lib/javaexec.c b/lib/javaexec.c
index a555c96723..c50a30eea3 100644
--- a/lib/javaexec.c
+++ b/lib/javaexec.c
@@ -1,5 +1,5 @@
/* Execute a Java program.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
@@ -360,8 +360,8 @@ execute_java_class (const char *class_name,
}
}
-#if defined _WIN32 || defined __WIN32__
- /* Win32 */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
+ /* Win32, Cygwin */
{
static bool jview_tested;
static bool jview_present;
diff --git a/m4/ChangeLog b/m4/ChangeLog
index b9eb01e45c..0b9319ba4a 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,14 @@
+2006-05-09 Bruno Haible <bruno@clisp.org>
+
+ * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set CLASSPATH_SEPARATOR to a
+ semicolon.
+
+2006-03-12 Bruno Haible <bruno@clisp.org>
+
+ * javaexec.m4 (gt_JAVAEXEC): Make the result of the test available as
+ variable CONF_JAVA, for subsequent autoconf tests. Also log error
+ output in config.log.
+
2006-07-19 Bruno Haible <bruno@clisp.org>
* getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume that
diff --git a/m4/javaexec.m4 b/m4/javaexec.m4
index f15c13bf57..4f3b087e62 100644
--- a/m4/javaexec.m4
+++ b/m4/javaexec.m4
@@ -1,5 +1,5 @@
-# javaexec.m4 serial 2 (gettext-0.13)
-dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+# javaexec.m4 serial 4 (gettext-0.15)
+dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,13 +12,20 @@ AC_DEFUN([gt_JAVAEXEC],
[
AC_MSG_CHECKING([for Java virtual machine])
AC_EGREP_CPP(yes, [
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
yes
#endif
], CLASSPATH_SEPARATOR=';', CLASSPATH_SEPARATOR=':')
+ CONF_JAVA=
+ HAVE_JAVA_ENVVAR=
+ HAVE_GIJ=
+ HAVE_JAVA=
+ HAVE_JRE=
+ HAVE_JVIEW=
HAVE_JAVAEXEC=1
if test -n "$JAVA"; then
- ac_result="$JAVA"
+ HAVE_JAVA_ENVVAR=1
+ CONF_JAVA="$JAVA"
else
pushdef([AC_MSG_CHECKING],[:])dnl
pushdef([AC_CHECKING],[:])dnl
@@ -37,30 +44,41 @@ AC_DEFUN([gt_JAVAEXEC],
export CLASSPATH
if test -n "$HAVE_GIJ_IN_PATH" \
&& gij --version >/dev/null 2>/dev/null \
- ifelse([$1], , , [&& gij $1 >/dev/null 2>/dev/null]); then
+ ifelse([$1], , , [&& {
+ echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
+ gij $1 >&AS_MESSAGE_LOG_FD 2>&1
+ }]); then
HAVE_GIJ=1
- ac_result="gij"
+ CONF_JAVA="gij"
else
if test -n "$HAVE_JAVA_IN_PATH" \
&& java -version >/dev/null 2>/dev/null \
- ifelse([$1], , , [&& java $1 >/dev/null 2>/dev/null]); then
+ ifelse([$1], , , [&& {
+ echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
+ java $1 >&AS_MESSAGE_LOG_FD 2>&1
+ }]); then
HAVE_JAVA=1
- ac_result="java"
+ CONF_JAVA="java"
else
if test -n "$HAVE_JRE_IN_PATH" \
&& (jre >/dev/null 2>/dev/null || test $? = 1) \
- ifelse([$1], , , [&& jre $1 >/dev/null 2>/dev/null]); then
+ ifelse([$1], , , [&& {
+ echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
+ jre $1 >&AS_MESSAGE_LOG_FD 2>&1
+ }]); then
HAVE_JRE=1
- ac_result="jre"
+ CONF_JAVA="jre"
else
if test -n "$HAVE_JVIEW_IN_PATH" \
&& (jview -? >/dev/null 2>/dev/null || test $? = 1) \
- ifelse([$1], , , [&& jview $1 >/dev/null 2>/dev/null]); then
+ ifelse([$1], , , [&& {
+ echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
+ jview $1 >&AS_MESSAGE_LOG_FD 2>&1
+ }]); then
HAVE_JVIEW=1
- ac_result="jview"
+ CONF_JAVA="jview"
else
HAVE_JAVAEXEC=
- ac_result="no"
fi
fi
fi
@@ -69,10 +87,16 @@ AC_DEFUN([gt_JAVAEXEC],
CLASSPATH="$save_CLASSPATH"
])
fi
+ if test -n "$HAVE_JAVAEXEC"; then
+ ac_result="$CONF_JAVA"
+ else
+ ac_result="no"
+ fi
AC_MSG_RESULT([$ac_result])
- AC_SUBST(JAVA)
+ AC_SUBST(CONF_JAVA)
AC_SUBST(CLASSPATH)
AC_SUBST(CLASSPATH_SEPARATOR)
+ AC_SUBST(HAVE_JAVA_ENVVAR)
AC_SUBST(HAVE_GIJ)
AC_SUBST(HAVE_JAVA)
AC_SUBST(HAVE_JRE)