diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-06-03 16:47:05 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-06-03 16:47:05 +0000 |
commit | a120ebfd29062a8681f8a1e03c598bc9c7c2a790 (patch) | |
tree | a26fb991e35fb8b39029a8c724c89ac9f96fcead /config | |
parent | 25a999fdfd2e38098d0c8dc6b788c9debe4401d5 (diff) |
Changing ANTLR3 detection in configure (Fixes #147)
Diffstat (limited to 'config')
-rw-r--r-- | config/antlr.m4 | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/config/antlr.m4 b/config/antlr.m4 index 8f2e26b51..2f0898b80 100644 --- a/config/antlr.m4 +++ b/config/antlr.m4 @@ -6,22 +6,25 @@ AC_DEFUN([AC_PROG_ANTLR], [ AC_ARG_VAR([ANTLR],[location of the antlr3 script]) # Check the existence of the runantlr script - if test -z "$ANTLR"; then - AC_CHECK_PROGS(ANTLR, [antlr3]) + if test "x$ANTLR" = "x"; then + AC_PATH_PROG(ANTLR, [antlr3]) else - AC_CHECK_PROG(ANTLR, "$ANTLR", "$ANTLR", []) + AC_MSG_CHECKING([antlr3 script ($ANTLR)]) + if test ! -e "$ANTLR"; then + AC_MSG_RESULT([not found]) + unset ANTLR + elif test ! -x "$ANTLR"; then + AC_MSG_RESULT([not executable]) + unset ANTLR + else + AC_MSG_RESULT([OK]) + fi fi - if test no$ANTLR = "no"; - then + if test "x$ANTLR" = "x"; then AC_MSG_WARN( - [Couldn't find the antlr3 script, make sure that the parser code has - been generated already. To obtain ANTLR see <http://www.antlr.org/>.] +[No usable antlr3 script found. Make sure that the parser code has +been generated already. To obtain ANTLR see <http://www.antlr.org/>.] ) - AC_MSG_RESULT(no) - fi - if test ! -x "$ANTLR"; - then - AC_MSG_ERROR([antlr3 script is not executable]) fi ]) |