Author: Axel Beckert <abe@debian.org>
Last-Update: 2016-01-08
Description: Build with Debian's antlr instead of the embedded copy in src/antlr
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -266,9 +266,7 @@
 widget.hpp
 )
 
-add_subdirectory(antlr)
-
-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/antlr ${CMAKE_BINARY_DIR})
+include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
 link_directories(${LINK_DIRECTORIES})
 
 SET(CMAKE_SKIP_RPATH TRUE)
@@ -290,8 +288,7 @@
 	target_link_libraries(gdl readline)
 endif (READLINE)
 
-add_dependencies(gnudatalanguage antlr) # be sure that antlr is built before gdl
-target_link_libraries(gnudatalanguage antlr) # link antlr against gdl
+target_link_libraries(gnudatalanguage antlr-pic)
 if (MINGW)
 target_link_libraries(gnudatalanguage ws2_32)
 endif (MINGW)
--- a/src/CFMTLexer.hpp
+++ b/src/CFMTLexer.hpp
@@ -9,7 +9,7 @@
 #include "CFMTTokenTypes.hpp"
 #include <antlr/CharScanner.hpp>
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
     
 //    using namespace antlr;
 
--- a/src/FMTLexer.hpp
+++ b/src/FMTLexer.hpp
@@ -17,7 +17,7 @@
 
 #include "CFMTLexer.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
 //using namespace antlr;
 
--- a/src/FMTParser.hpp
+++ b/src/FMTParser.hpp
@@ -17,7 +17,7 @@
 
 #include "CFMTLexer.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
 //using namespace antlr;
 
--- a/src/GDLLexer.hpp
+++ b/src/GDLLexer.hpp
@@ -18,12 +18,12 @@
 #include "objects.hpp"
 #include "initsysvar.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
-#include "antlr/SemanticException.hpp"
-#include "antlr/NoViableAltForCharException.hpp"
-#include "antlr/TokenStreamIOException.hpp"
-#include "antlr/CharInputBuffer.hpp"
+#include <antlr/SemanticException.hpp>
+#include <antlr/NoViableAltForCharException.hpp>
+#include <antlr/TokenStreamIOException.hpp>
+#include <antlr/CharInputBuffer.hpp>
 
 //#include "dinterpreter.hpp"
 
--- a/src/GDLParser.hpp
+++ b/src/GDLParser.hpp
@@ -18,12 +18,12 @@
 #include "objects.hpp"
 #include "initsysvar.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
-#include "antlr/SemanticException.hpp"
-#include "antlr/NoViableAltForCharException.hpp"
-#include "antlr/TokenStreamIOException.hpp"
-#include "antlr/CharInputBuffer.hpp"
+#include <antlr/SemanticException.hpp>
+#include <antlr/NoViableAltForCharException.hpp>
+#include <antlr/TokenStreamIOException.hpp>
+#include <antlr/CharInputBuffer.hpp>
 
 //#include "dinterpreter.hpp"
 
--- a/src/cformat.g
+++ b/src/cformat.g
@@ -21,7 +21,7 @@
 }
 
 header {
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
     
 //    using namespace antlr;
 }
--- a/src/dnode.cpp
+++ b/src/dnode.cpp
@@ -20,8 +20,8 @@
 #include <string>
 #include <limits>
 
-#include "antlr/TreeParser.hpp"
-#include "antlr/Token.hpp"
+#include <antlr/TreeParser.hpp>
+#include <antlr/Token.hpp>
 
 #include "dnode.hpp"
 #include "datatypes.hpp"
--- a/src/dnode.hpp
+++ b/src/dnode.hpp
@@ -26,7 +26,7 @@
 
 #include "GDLTokenTypes.hpp"
 
-#include "antlr/CommonAST.hpp"
+#include <antlr/CommonAST.hpp>
 
 //ANTLR_USING_NAMESPACE(std)
 //ANTLR_USING_NAMESPACE(antlr)
--- a/src/dnodefactory.hpp
+++ b/src/dnodefactory.hpp
@@ -21,7 +21,7 @@
 
 #include "dnode.hpp"
 
-#include "antlr/ASTFactory.hpp"
+#include <antlr/ASTFactory.hpp>
 
 //ANTLR_USING_NAMESPACE(std)
 //ANTLR_USING_NAMESPACE(antlr)
--- a/src/dpro.hpp
+++ b/src/dpro.hpp
@@ -30,7 +30,7 @@
 #include "prognode.hpp"
 #include "str.hpp"
 
-#include "antlr/Token.hpp"
+#include <antlr/Token.hpp>
 
 template<typename T>  class Is_eq: public std::unary_function<T,bool>
 {
--- a/src/fmtnode.hpp
+++ b/src/fmtnode.hpp
@@ -22,7 +22,7 @@
 
 #include "FMTTokenTypes.hpp"
 
-#include "antlr/CommonAST.hpp"
+#include <antlr/CommonAST.hpp>
 
 //ANTLR_USING_NAMESPACE(std)
 //ANTLR_USING_NAMESPACE(antlr)
--- a/src/format.g
+++ b/src/format.g
@@ -28,7 +28,7 @@
 
 #include "CFMTLexer.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
 //using namespace antlr;
 }
@@ -436,4 +436,4 @@
                 CHAR
             )+
         )?
-    ;
\ No newline at end of file
+    ;
--- a/src/gdlc.g
+++ b/src/gdlc.g
@@ -34,12 +34,12 @@
 #include "objects.hpp"
 #include "initsysvar.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
-#include "antlr/SemanticException.hpp"
-#include "antlr/NoViableAltForCharException.hpp"
-#include "antlr/TokenStreamIOException.hpp"
-#include "antlr/CharInputBuffer.hpp"
+#include <antlr/SemanticException.hpp>
+#include <antlr/NoViableAltForCharException.hpp>
+#include <antlr/TokenStreamIOException.hpp>
+#include <antlr/CharInputBuffer.hpp>
 
 //#include "dinterpreter.hpp"
 
--- a/src/gdlexception.hpp
+++ b/src/gdlexception.hpp
@@ -23,7 +23,7 @@
 
 #include "prognode.hpp"
 
-#include "antlr/ANTLRException.hpp"
+#include <antlr/ANTLRException.hpp>
 
 //using namespace std;
 
--- a/src/getfmtast.cpp
+++ b/src/getfmtast.cpp
@@ -27,7 +27,7 @@
 #include "FMTLexer.hpp"
 #include "FMTParser.hpp"
 
-#include "antlr/ASTFactory.hpp"
+#include <antlr/ASTFactory.hpp>
 
 using namespace std;
 
--- a/src/getfmtast.hpp
+++ b/src/getfmtast.hpp
@@ -22,7 +22,7 @@
 
 #include "basegdl.hpp"
 
-#include "antlr/ASTFactory.hpp"
+#include <antlr/ASTFactory.hpp>
 
 extern antlr::ASTFactory FMTNodeFactory;
 
--- a/src/print_tree.hpp
+++ b/src/print_tree.hpp
@@ -15,8 +15,8 @@
 #include "typedefs.hpp"
 #include "prognode.hpp"
 
-#include "antlr/ASTRefCount.hpp"
-#include "antlr/AST.hpp"
+#include <antlr/ASTRefCount.hpp>
+#include <antlr/AST.hpp>
 
 namespace antlr {
 
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -174,10 +174,6 @@
 # mpi
 check_include_file(mpi.h HAVE_MPI_H)
 
-# SA: whithout it compilation of antlr fails if there's a conflicting 
-#     version of antlr in system-wide directories
-include_directories(src)
-
 if (NOT WIN32)
 	# Ncurses MANDATORY for readline on POSIX
 	# -DNCURSESDIR=DIR
