From: Mathias Preiner Date: Mon, 14 Aug 2017 18:27:53 +0000 (-0700) Subject: Use antlr-3.4 directory if already present in CVC4 root directory (#213) X-Git-Tag: cvc5-1.0.0~5680 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2addacac33a9f0d28462121dfac5a1392470d60d;p=cvc5.git Use antlr-3.4 directory if already present in CVC4 root directory (#213) * Find antlr-3.4 directory if installed via contrib/get-antlr-3.4. --- diff --git a/config/antlr.m4 b/config/antlr.m4 index 955e1bb2a..aa161989c 100644 --- a/config/antlr.m4 +++ b/config/antlr.m4 @@ -20,6 +20,10 @@ AC_DEFUN([AC_PROG_ANTLR], [ AC_MSG_RESULT([OK]) fi fi + # Check if antlr-3.4 was installed via contrib/get-antlr3.4 + if test -e "$ac_abs_confdir/antlr-3.4/bin/antlr3"; then + ANTLR="$ac_abs_confdir/antlr-3.4/bin/antlr3" + fi if test "x$ANTLR" = "x"; then AC_MSG_WARN( [No usable antlr3 script found. Make sure that the parser code has @@ -55,6 +59,11 @@ AC_DEFUN([AC_LIB_ANTLR],[ ANTLR_PREFIXES="$ANTLR_HOME /usr/local /usr /opt/local /opt" ) + # Check if antlr-3.4 was installed via contrib/get-antlr3.4 + if test -e "$ac_abs_confdir/antlr-3.4"; then + ANTLR_PREFIXES="$ac_abs_confdir/antlr-3.4" + fi + AC_MSG_CHECKING(for ANTLR3 C runtime library) # Use C and remember the variables we are changing