]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix recognition of javac.
authorBruno Haible <bruno@clisp.org>
Tue, 25 Sep 2001 14:12:59 +0000 (14:12 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 25 Sep 2001 14:12:59 +0000 (14:12 +0000)
lib/ChangeLog
lib/javacomp.c
m4/ChangeLog
m4/javacomp.m4

index 478fb9144dcb47187cf2b1a623470c383377d4a1..dcb1d614adce600ae253fa989c64246d5963c6f6 100644 (file)
@@ -1,3 +1,7 @@
+2001-09-25  Bruno Haible  <haible@clisp.cons.org>
+
+       * javacomp.c (compile_java_class): Recognize javac exit code 2.
+
 2001-09-16  Bruno Haible  <haible@clisp.cons.org>
 
        * Makefile.am (libnlsut_a_SOURCES): Remove safe-read.c.
index 6ed87146680ae715e04784a93b5f6f7683031b92..1c0449810465bfeda77358eb6d8515e214d10882 100644 (file)
@@ -53,7 +53,7 @@
    $JAVAC   unknown     N  n/a            -O -g  true
    gcj -C   GCC 3.0     Y  --classpath=P  -O -g  gcj --version >/dev/null
    javac    JDK 1.1.8   Y  -classpath P   -O -g  javac 2>/dev/null; test $? = 1
-   javac    JDK 1.3.0   Y  -classpath P   -O -g  javac 2>/dev/null; test $? = 1
+   javac    JDK 1.3.0   Y  -classpath P   -O -g  javac 2>/dev/null; test $? -le 2
    jikes    Jikes 1.14  N  -classpath P   -O -g  jikes 2>/dev/null; test $? = 1
 
    All compilers support the option "-d DIRECTORY" for the base directory
@@ -263,14 +263,14 @@ compile_java_class (java_sources, java_sources_count,
 
     if (!javac_tested)
       {
-       /* Test for presence of javac: "javac 2> /dev/null ; test $? = 1"  */
+       /* Test for presence of javac: "javac 2> /dev/null ; test $? -le 2"  */
        char *argv[2];
        int exitstatus;
 
        argv[0] = "javac";
        argv[1] = NULL;
        exitstatus = execute ("javac", "javac", argv, false, true, true);
-       javac_present = (exitstatus == 0 || exitstatus == 1);
+       javac_present = (exitstatus == 0 || exitstatus == 1 || exitstatus == 2);
        javac_tested = true;
       }
 
index 9d64d78a6627d86bd27941ff4aec2edabdd7c4c0..4639ec26912f83de551ce5fd0339a926ff455e8a 100644 (file)
@@ -1,3 +1,7 @@
+2001-09-25  Bruno Haible  <haible@clisp.cons.org>
+
+       * javacomp.m4: Recognize javac exit code 2.
+
 2001-09-24  Bruno Haible  <haible@clisp.cons.org>
 
        * gettext.m4 (AM_WITH_NLS): Capture not only the value of $LINGUAS,
index 6aef360e50979a6fd28f81efd06b4d57bb777c07..df1d04405c0ac8e02ebac5e0bb420a15c2d4fbed 100644 (file)
@@ -19,7 +19,7 @@ AC_DEFUN([gt_JAVACOMP],
       HAVE_GCJ=1
       ac_result="gcj -C"
     else
-      if (javac -version >/dev/null 2>/dev/null || test $? = 1); then
+      if (javac -version >/dev/null 2>/dev/null || test $? -le 2); then
         HAVE_JAVAC=1
         ac_result="javac"
       else