summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2008-09-14 23:39:48 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2008-09-14 23:39:48 +0000
commit1e7e1ba4f8868f7569394ad343e5468c9ce315fe (patch)
tree0c9f90b3fdd53e244e274a030e99d273416d3f2f
parent4fd309d2e65690e08695dd1c35f632602ded8fbd (diff)
downloadclasspath-1e7e1ba4f8868f7569394ad343e5468c9ce315fe.tar.gz
2008-09-14 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_antlr.m4: Allow use of runantlr on systems which have it (Debian/Ubuntu).
-rw-r--r--ChangeLog6
-rw-r--r--m4/ac_prog_antlr.m411
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 11d5f9b0b..d4e4107b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-14 Matthias Klose <doko@ubuntu.com>
+
+ * m4/ac_prog_antlr.m4:
+ Allow use of runantlr on systems
+ which have it (Debian/Ubuntu).
+
2008-09-14 Andrew John Hughes <gnu_andrew@member.fsf.org>
* examples/Makefile.am:
diff --git a/m4/ac_prog_antlr.m4 b/m4/ac_prog_antlr.m4
index 9f83aca75..a13fbd582 100644
--- a/m4/ac_prog_antlr.m4
+++ b/m4/ac_prog_antlr.m4
@@ -34,8 +34,15 @@ AC_DEFUN([AC_PROG_ANTLR],[
test -f $ANTLR_JAR || AC_MSG_ERROR([specified ANTLR jar file $ANTLR_JAR not found.]) \
&& AC_MSG_NOTICE([using ANTLR parser generator in $ANTLR_JAR])
fi
- ANTLR="$JAVA -classpath $ANTLR_JAR antlr.Tool"
- test -z $ANTLR_JAR && \
+ AC_CHECK_TOOLS([ANTLR], [runantlr])
+ if test "x$ANTLR" = x; then
+ if test -z "$JAVA"; then
+ AC_MSG_ERROR(Failed to find either runantlr or a suitable Java runtime for ANTLR.)
+ else
+ ANTLR="$JAVA -classpath $ANTLR_JAR antlr.Tool"
+ fi
+ fi
+ test -z "$ANTLR_JAR" && \
AC_MSG_ERROR(no suitable antlr.jar found for version $1.$2.$3)
AC_MSG_RESULT($antlr_use_major.$antlr_use_minor.$antlr_use_micro)
AC_SUBST(ANTLR)