annotate m4/javaexec.m4 @ 17848:ab58d4870664

version-etc: new year * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 01 Jan 2015 01:38:23 +0000
parents 344018b6e5d7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11012
7d60d765a19c Update or remove references to gettext release.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
1 # javaexec.m4 serial 5
17848
ab58d4870664 version-etc: new year
Paul Eggert <eggert@cs.ucla.edu>
parents: 17587
diff changeset
2 dnl Copyright (C) 2001-2003, 2006, 2009-2015 Free Software Foundation, Inc.
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 # Prerequisites of javaexec.sh.
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 # gt_JAVAEXEC or gt_JAVAEXEC(testclass, its-directory)
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 # Sets HAVE_JAVAEXEC to nonempty if javaexec.sh will work.
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 AC_DEFUN([gt_JAVAEXEC],
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 [
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 AC_MSG_CHECKING([for Java virtual machine])
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
14 AC_EGREP_CPP([yes], [
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
15 #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 yes
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 #endif
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 ], CLASSPATH_SEPARATOR=';', CLASSPATH_SEPARATOR=':')
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
19 CONF_JAVA=
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
20 HAVE_JAVA_ENVVAR=
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
21 HAVE_GIJ=
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
22 HAVE_JAVA=
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
23 HAVE_JRE=
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
24 HAVE_JVIEW=
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 HAVE_JAVAEXEC=1
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 if test -n "$JAVA"; then
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
27 HAVE_JAVA_ENVVAR=1
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
28 CONF_JAVA="$JAVA"
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 else
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 pushdef([AC_MSG_CHECKING],[:])dnl
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 pushdef([AC_CHECKING],[:])dnl
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 pushdef([AC_MSG_RESULT],[:])dnl
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
33 AC_CHECK_PROG([HAVE_GIJ_IN_PATH], [gij], [yes])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
34 AC_CHECK_PROG([HAVE_JAVA_IN_PATH], [java], [yes])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
35 AC_CHECK_PROG([HAVE_JRE_IN_PATH], [jre], [yes])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
36 AC_CHECK_PROG([HAVE_JVIEW_IN_PATH], [jview], [yes])
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 popdef([AC_MSG_RESULT])dnl
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 popdef([AC_CHECKING])dnl
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 popdef([AC_MSG_CHECKING])dnl
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 ifelse([$1], , , [
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 save_CLASSPATH="$CLASSPATH"
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 CLASSPATH="$2"${CLASSPATH+"$CLASSPATH_SEPARATOR$CLASSPATH"}
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 ])
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 export CLASSPATH
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 if test -n "$HAVE_GIJ_IN_PATH" \
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 && gij --version >/dev/null 2>/dev/null \
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
47 ifelse([$1], , , [&& {
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
48 echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
49 gij $1 >&AS_MESSAGE_LOG_FD 2>&1
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
50 }]); then
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 HAVE_GIJ=1
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
52 CONF_JAVA="gij"
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 else
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 if test -n "$HAVE_JAVA_IN_PATH" \
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 && java -version >/dev/null 2>/dev/null \
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
56 ifelse([$1], , , [&& {
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
57 echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
58 java $1 >&AS_MESSAGE_LOG_FD 2>&1
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
59 }]); then
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 HAVE_JAVA=1
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
61 CONF_JAVA="java"
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 else
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 if test -n "$HAVE_JRE_IN_PATH" \
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 && (jre >/dev/null 2>/dev/null || test $? = 1) \
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
65 ifelse([$1], , , [&& {
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
66 echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
67 jre $1 >&AS_MESSAGE_LOG_FD 2>&1
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
68 }]); then
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 HAVE_JRE=1
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
70 CONF_JAVA="jre"
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 else
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 if test -n "$HAVE_JVIEW_IN_PATH" \
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 && (jview -? >/dev/null 2>/dev/null || test $? = 1) \
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
74 ifelse([$1], , , [&& {
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
75 echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
76 jview $1 >&AS_MESSAGE_LOG_FD 2>&1
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
77 }]); then
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 HAVE_JVIEW=1
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
79 CONF_JAVA="jview"
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 else
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 HAVE_JAVAEXEC=
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 fi
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 fi
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 fi
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 fi
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 ifelse([$1], , , [
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 CLASSPATH="$save_CLASSPATH"
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 ])
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 fi
7017
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
90 if test -n "$HAVE_JAVAEXEC"; then
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
91 ac_result="$CONF_JAVA"
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
92 else
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
93 ac_result="no"
005fe24b840a Update javaexec module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5624
diff changeset
94 fi
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 AC_MSG_RESULT([$ac_result])
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
96 AC_SUBST([CONF_JAVA])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
97 AC_SUBST([CLASSPATH])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
98 AC_SUBST([CLASSPATH_SEPARATOR])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
99 AC_SUBST([HAVE_JAVA_ENVVAR])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
100 AC_SUBST([HAVE_GIJ])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
101 AC_SUBST([HAVE_JAVA])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
102 AC_SUBST([HAVE_JRE])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7017
diff changeset
103 AC_SUBST([HAVE_JVIEW])
5624
356a0afaf162 New module 'javaexec'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104 ])