From 5e64d60e49db9176c310f15cb206e3fda3e31973 Mon Sep 17 00:00:00 2001 From: Tim King Date: Tue, 23 Oct 2012 19:41:12 +0000 Subject: The contrib/get-antlr-3.4 script: - Has no outdated reference to /usr/share/java/stringtemplate.jar (as discussed on the mailing list). - Attempts to determine if the computer is 64 or 32 bit and configure antlr appropriately. - Warns the user about it's guess. - Tells the user how to correct an incorrect guess. --- contrib/get-antlr-3.4 | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/contrib/get-antlr-3.4 b/contrib/get-antlr-3.4 index e9bc26b32..c56bac701 100755 --- a/contrib/get-antlr-3.4 +++ b/contrib/get-antlr-3.4 @@ -25,6 +25,10 @@ function webget { fi } +if [[ -z "${MACHINE_TYPE}" ]]; then + MACHINE_TYPE=`uname -m` +fi + set -x mkdir -p antlr-3.4/share/java mkdir -p antlr-3.4/bin @@ -33,15 +37,24 @@ cd antlr-3.4 webget http://antlr.org/download/antlr-3.4-complete.jar share/java/antlr-3.4-complete.jar webget http://antlr.org/download/C/libantlr3c-3.4.tar.gz src/libantlr3c-3.4.tar.gz tee bin/antlr3 < Makefile make @@ -53,6 +66,23 @@ echo echo Invalidating generated parsers.. touch src/parser/*/*.g +if [ ${MACHINE_TYPE} == 'x86_64' ]; then + # 64-bit stuff here + echo ============== WARNING ==================== + echo The script guessed that this machine is 64 bit. + echo If antlr should be built as 32 bit \(i.e. -m32\), + echo please rerun the script as + echo MACHINE_TYPE=\"x86\" ./get-antlr3.4 + +else + # 32-bit stuff here + echo ============== WARNING ==================== + echo The script guessed that this machine is 32 bit. + echo If antlr should be built as 64 bit \(i.e. -m64\), + echo please rerun the script as + echo MACHINE_TYPE=\"x86_64\" ./get-antlr3.4 +fi + echo echo ===================== Now configure CVC4 with ===================== echo ./configure --with-antlr-dir=`pwd`/antlr-3.4 ANTLR=`pwd`/antlr-3.4/bin/antlr3 -- cgit v1.2.3