summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-11-01 11:15:53 +0000
committerBruno Haible <bruno@clisp.org>2009-06-21 22:48:08 +0200
commitdcc59696f727234d25ba8dff8cd26e1cf8d46bf4 (patch)
tree9d3d06d7bb2736b82978087b5696aa5ba97426e7 /m4
parent4f75cd75a4552cbae16571ebb534ef9ccd5d83f3 (diff)
downloadexternal_gettext-dcc59696f727234d25ba8dff8cd26e1cf8d46bf4.zip
external_gettext-dcc59696f727234d25ba8dff8cd26e1cf8d46bf4.tar.gz
external_gettext-dcc59696f727234d25ba8dff8cd26e1cf8d46bf4.tar.bz2
Work around a problem with SunOS 4 /bin/sh.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog7
-rw-r--r--m4/javacomp.m419
-rw-r--r--m4/javaexec.m422
3 files changed, 41 insertions, 7 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 413a5ed..486c33a 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,10 @@
+2001-11-01 Bruno Haible <haible@clisp.cons.org>
+
+ * javacomp.m4 (gt_JAVACOMP): Test for the existence of gcj, javac,
+ jikes in $PATH. Needed because the call of a program not found in PATH
+ yields return code 1 with SunOS 4 /bin/sh and is thus indistinguishable
+ from a successful call returning 1.
+
2001-10-30 Bruno Haible <haible@clisp.cons.org>
* gettext.m4 (AM_GNU_GETTEXT): Make sure "make dist" works even when
diff --git a/m4/javacomp.m4 b/m4/javacomp.m4
index a7b4f07..511dea1 100644
--- a/m4/javacomp.m4
+++ b/m4/javacomp.m4
@@ -15,15 +15,28 @@ AC_DEFUN([gt_JAVACOMP],
if test -n "$JAVAC"; then
ac_result="$JAVAC"
else
- if gcj --version 2>/dev/null | grep '^[3-9]' >/dev/null; then
+ pushdef([AC_MSG_CHECKING],[:])dnl
+ pushdef([AC_CHECKING],[:])dnl
+ pushdef([AC_MSG_RESULT],[:])dnl
+ AC_CHECK_PROG(HAVE_GCJ_IN_PATH, gcj, yes)
+ AC_CHECK_PROG(HAVE_JAVAC_IN_PATH, javac, yes)
+ AC_CHECK_PROG(HAVE_JIKES_IN_PATH, jikes, yes)
+ popdef([AC_MSG_RESULT])dnl
+ popdef([AC_CHECKING])dnl
+ popdef([AC_MSG_CHECKING])dnl
+ if test -n "$HAVE_GCJ_IN_PATH" \
+ && gcj --version 2>/dev/null | grep '^[3-9]' >/dev/null; then
HAVE_GCJ=1
ac_result="gcj -C"
else
- if (javac -version >/dev/null 2>/dev/null || test $? -le 2); then
+ if test -n "$HAVE_JAVAC_IN_PATH" \
+ && (javac -version >/dev/null 2>/dev/null || test $? -le 2); then
HAVE_JAVAC=1
ac_result="javac"
else
- if (jikes >/dev/null 2>/dev/null || test $? = 1) && (
+ if test -n "$HAVE_JIKES_IN_PATH" \
+ && (jikes >/dev/null 2>/dev/null || test $? = 1) \
+ && (
# See if the existing CLASSPATH is sufficient to make jikes work.
cat > conftest.java <<EOF
public class conftest {
diff --git a/m4/javaexec.m4 b/m4/javaexec.m4
index 99604ae..7a00aea 100644
--- a/m4/javaexec.m4
+++ b/m4/javaexec.m4
@@ -15,19 +15,33 @@ AC_DEFUN([gt_JAVAEXEC],
if test -n "$JAVA"; then
ac_result="$JAVA"
else
- if gij --version >/dev/null 2>/dev/null; then
+ pushdef([AC_MSG_CHECKING],[:])dnl
+ pushdef([AC_CHECKING],[:])dnl
+ pushdef([AC_MSG_RESULT],[:])dnl
+ AC_CHECK_PROG(HAVE_GIJ_IN_PATH, gij, yes)
+ AC_CHECK_PROG(HAVE_JAVA_IN_PATH, java, yes)
+ AC_CHECK_PROG(HAVE_JRE_IN_PATH, jre, yes)
+ AC_CHECK_PROG(HAVE_JVIEW_IN_PATH, jview, yes)
+ popdef([AC_MSG_RESULT])dnl
+ popdef([AC_CHECKING])dnl
+ popdef([AC_MSG_CHECKING])dnl
+ if test -n "$HAVE_GIJ_IN_PATH" \
+ && gij --version >/dev/null 2>/dev/null; then
HAVE_GIJ=1
ac_result="gij"
else
- if java -version >/dev/null 2>/dev/null; then
+ if test -n "$HAVE_JAVA_IN_PATH" \
+ && java -version >/dev/null 2>/dev/null; then
HAVE_JAVA_JVM=1
ac_result="java"
else
- if (jre >/dev/null 2>/dev/null || test $? = 1); then
+ if test -n "$HAVE_JRE_IN_PATH" \
+ && (jre >/dev/null 2>/dev/null || test $? = 1); then
HAVE_JRE=1
ac_result="jre"
else
- if (jview -? >/dev/null 2>/dev/null || test $? = 1); then
+ if test -n "$HAVE_JVIEW_IN_PATH" \
+ && (jview -? >/dev/null 2>/dev/null || test $? = 1); then
HAVE_JVIEW=1
ac_result="jview"
else