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/cformat.g
+++ b/src/cformat.g
@@ -21,7 +21,7 @@
 }
 
 header {
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
     
 //    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;
 }
@@ -453,4 +453,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/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,10 +176,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
