Mercurial > hg > octave-jordi > gnulib-hg
annotate m4/javaexec.m4 @ 11007:f6cba5a556ce
many *.m4 files: improve m4 quoting
99% of this change was performed by running the following commands:
git ls-files | grep '\.m4$' | xargs perl -pi \
-e 's/(AC_\w+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){1})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){3})([^,[()]+?)([,)])/$1\[$2]$3/g'
perl -pi -e 's/\[\.\.\.\]/.../' m4/onceonly.m4
The remainder were to add Copyright dates, increment serial numbers,
undo some changes in comments, exclude m4/intl.m4, and add quotes
around the "1" in ",1" where the unusual spacing prohibited the
above regexps from doing the job. For more details, see
<http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16175>.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Tue, 13 Jan 2009 08:48:48 +0100 |
parents | 005fe24b840a |
children | 7d60d765a19c |
rev | line source |
---|---|
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7017
diff
changeset
|
1 # javaexec.m4 serial 5 (gettext-0.15) |
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7017
diff
changeset
|
2 dnl Copyright (C) 2001-2003, 2006, 2009 Free Software Foundation, Inc. |
5624 | 3 dnl This file is free software; the Free Software Foundation |
4 dnl gives unlimited permission to copy and/or distribute it, | |
5 dnl with or without modifications, as long as this notice is preserved. | |
6 | |
7 # Prerequisites of javaexec.sh. | |
8 # gt_JAVAEXEC or gt_JAVAEXEC(testclass, its-directory) | |
9 # Sets HAVE_JAVAEXEC to nonempty if javaexec.sh will work. | |
10 | |
11 AC_DEFUN([gt_JAVAEXEC], | |
12 [ | |
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 | 16 yes |
17 #endif | |
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 | 25 HAVE_JAVAEXEC=1 |
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 | 29 else |
30 pushdef([AC_MSG_CHECKING],[:])dnl | |
31 pushdef([AC_CHECKING],[:])dnl | |
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 | 37 popdef([AC_MSG_RESULT])dnl |
38 popdef([AC_CHECKING])dnl | |
39 popdef([AC_MSG_CHECKING])dnl | |
40 ifelse([$1], , , [ | |
41 save_CLASSPATH="$CLASSPATH" | |
42 CLASSPATH="$2"${CLASSPATH+"$CLASSPATH_SEPARATOR$CLASSPATH"} | |
43 ]) | |
44 export CLASSPATH | |
45 if test -n "$HAVE_GIJ_IN_PATH" \ | |
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 | 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 | 53 else |
54 if test -n "$HAVE_JAVA_IN_PATH" \ | |
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 | 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 | 62 else |
63 if test -n "$HAVE_JRE_IN_PATH" \ | |
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 | 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 | 71 else |
72 if test -n "$HAVE_JVIEW_IN_PATH" \ | |
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 | 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 | 80 else |
81 HAVE_JAVAEXEC= | |
82 fi | |
83 fi | |
84 fi | |
85 fi | |
86 ifelse([$1], , , [ | |
87 CLASSPATH="$save_CLASSPATH" | |
88 ]) | |
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 | 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 | 104 ]) |