Use antlr-3.4 directory if already present in CVC4 root directory (#213)
authorMathias Preiner <mathias.preiner@gmail.com>
Mon, 14 Aug 2017 18:27:53 +0000 (11:27 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Aug 2017 18:27:53 +0000 (11:27 -0700)
* Find antlr-3.4 directory if installed via contrib/get-antlr-3.4.

config/antlr.m4

index 955e1bb2a7f940e14cefdef8821697ba93cb3c90..aa161989c7ddb75895a468ac630b9c69bf11607a 100644 (file)
@@ -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