Patch to build gnudatalanguage with Debian's antlr instead of the
embedded copy in src/antlr. Patch by Axel Beckert <abe@debian.org>,
15-Feb-2011

Index: gnudatalanguage/configure
===================================================================
--- gnudatalanguage.orig/configure	2011-02-15 22:26:31.000000000 +0100
+++ gnudatalanguage/configure	2011-02-15 22:37:02.635803162 +0100
@@ -17709,7 +17709,7 @@
 
 
 
-ac_config_files="$ac_config_files Makefile src/Makefile src/antlr/Makefile src/pro/Makefile src/pro/dicom/Makefile testsuite/Makefile doc/Makefile"
+ac_config_files="$ac_config_files Makefile src/Makefile src/pro/Makefile src/pro/dicom/Makefile testsuite/Makefile doc/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -18800,7 +18800,6 @@
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-    "src/antlr/Makefile") CONFIG_FILES="$CONFIG_FILES src/antlr/Makefile" ;;
     "src/pro/Makefile") CONFIG_FILES="$CONFIG_FILES src/pro/Makefile" ;;
     "src/pro/dicom/Makefile") CONFIG_FILES="$CONFIG_FILES src/pro/dicom/Makefile" ;;
     "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
Index: gnudatalanguage/src/Makefile.in
===================================================================
--- gnudatalanguage.orig/src/Makefile.in	2010-08-25 15:57:07.000000000 +0200
+++ gnudatalanguage/src/Makefile.in	2011-02-15 22:37:02.635803162 +0100
@@ -71,8 +71,7 @@
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"
 LTLIBRARIES = $(lib_LTLIBRARIES)
-@BUILDASLIBRARY_TRUE@libgdl_la_DEPENDENCIES =  \
-@BUILDASLIBRARY_TRUE@	$(top_builddir)/src/antlr/libantlr.la
+@BUILDASLIBRARY_TRUE@libgdl_la_DEPENDENCIES = /usr/lib/libantlr.la
 am__libgdl_la_SOURCES_DIST = accessdesc.hpp arrayindex.hpp \
 	assocdata.cpp assocdata.hpp basegdl.hpp basic_fun_cl.cpp \
 	basic_fun_cl.hpp basic_fun.cpp basic_fun.hpp basic_fun_jmg.cpp \
@@ -255,8 +254,7 @@
 @BUILDASLIBRARY_FALSE@am_gdl_OBJECTS = $(am__objects_2) \
 @BUILDASLIBRARY_FALSE@	gdl-gdl.$(OBJEXT) gdl-lapack.$(OBJEXT)
 gdl_OBJECTS = $(am_gdl_OBJECTS)
-@BUILDASLIBRARY_FALSE@gdl_DEPENDENCIES =  \
-@BUILDASLIBRARY_FALSE@	$(top_builddir)/src/antlr/libantlr.a
+@BUILDASLIBRARY_FALSE@gdl_DEPENDENCIES = /usr/lib/libantlr.a
 gdl_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CXXLD) $(gdl_CXXFLAGS) $(CXXFLAGS) \
 	$(gdl_LDFLAGS) $(LDFLAGS) -o $@
@@ -454,7 +452,7 @@
 
 # set the include path found by configure
 INCLUDES = $(EXT_INCLUDES) $(all_includes)
-SUBDIRS = antlr pro
+SUBDIRS = pro
 noinst_HEADERS = gdlwidget.hpp prognode.hpp prognodeexpr.hpp
 cpp_hpp_files = accessdesc.hpp arrayindex.hpp assocdata.cpp assocdata.hpp \
 		basegdl.hpp basic_fun_cl.cpp basic_fun_cl.hpp basic_fun.cpp basic_fun.hpp \
@@ -504,7 +502,7 @@
 @BUILDASLIBRARY_FALSE@gdl_CXXFLAGS = $(AM_CXXFLAGS)
 # the library search path.
 @BUILDASLIBRARY_FALSE@gdl_LDFLAGS = $(all_libraries)
-@BUILDASLIBRARY_FALSE@gdl_LDADD = $(top_builddir)/src/antlr/libantlr.a -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+@BUILDASLIBRARY_FALSE@gdl_LDADD = /usr/lib/libantlr.a -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
 
 # build as library (for python module)
 @BUILDASLIBRARY_TRUE@lib_LTLIBRARIES = libgdl.la
@@ -514,7 +512,7 @@
 # netCDF and HDF define some same symbols
 # hence -z muldefs has to be passed to the linker
 @BUILDASLIBRARY_TRUE@@DARWIN_TRUE@libgdl_la_LDFLAGS = $(all_libraries) -Wl,-m
-@BUILDASLIBRARY_TRUE@libgdl_la_LIBADD = $(top_builddir)/src/antlr/libantlr.la -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+@BUILDASLIBRARY_TRUE@libgdl_la_LIBADD = /usr/lib/libantlr.la -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
 all: all-recursive
 
 .SUFFIXES:
--- gnudatalanguage-0.9.orig/src/getfmtast.hpp
+++ gnudatalanguage-0.9/src/getfmtast.hpp
@@ -22,7 +22,7 @@
 
 #include "basegdl.hpp"
 
-#include "antlr/ASTFactory.hpp"
+#include <antlr/ASTFactory.hpp>
 
 extern antlr::ASTFactory FMTNodeFactory;
 
--- gnudatalanguage-0.9.orig/src/getfmtast.cpp
+++ gnudatalanguage-0.9/src/getfmtast.cpp
@@ -27,7 +27,7 @@
 #include "FMTLexer.hpp"
 #include "FMTParser.hpp"
 
-#include "antlr/ASTFactory.hpp"
+#include <antlr/ASTFactory.hpp>
 
 using namespace std;
 
--- gnudatalanguage-0.9.orig/src/gdlc.g
+++ gnudatalanguage-0.9/src/gdlc.g
@@ -34,12 +34,12 @@ header {
 #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"
 
--- gnudatalanguage-0.9.orig/src/dpro.hpp
+++ gnudatalanguage-0.9/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>
 {
--- gnudatalanguage-0.9.orig/src/print_tree.hpp
+++ gnudatalanguage-0.9/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 {
 
--- gnudatalanguage-0.9.orig/src/gdlexception.hpp
+++ gnudatalanguage-0.9/src/gdlexception.hpp
@@ -23,7 +23,7 @@
 
 #include "prognode.hpp"
 
-#include "antlr/ANTLRException.hpp"
+#include <antlr/ANTLRException.hpp>
 
 //using namespace std;
 
--- gnudatalanguage-0.9.orig/src/dnode.hpp
+++ gnudatalanguage-0.9/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)
--- gnudatalanguage-0.9.orig/src/FMTParser.hpp
+++ gnudatalanguage-0.9/src/FMTParser.hpp
@@ -17,7 +17,7 @@
 
 #include "CFMTLexer.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
 //using namespace antlr;
 
--- gnudatalanguage-0.9.orig/src/dnodefactory.hpp
+++ gnudatalanguage-0.9/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)
--- gnudatalanguage-0.9.orig/src/GDLLexer.hpp
+++ gnudatalanguage-0.9/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"
 
--- gnudatalanguage-0.9.orig/src/CFMTLexer.cpp
+++ gnudatalanguage-0.9/src/CFMTLexer.cpp
@@ -1,6 +1,7 @@
 /* $ANTLR 2.7.7 (20091222): "cformat.g" -> "CFMTLexer.cpp"$ */
 
 #include "includefirst.hpp"
+#include <stdlib.h>
 
 #include "CFMTLexer.hpp"
 #include <antlr/CharBuffer.hpp>
--- gnudatalanguage-0.9.orig/src/cformat.g
+++ gnudatalanguage-0.9/src/cformat.g
@@ -17,10 +17,11 @@
 
 header "pre_include_cpp" {
 #include "includefirst.hpp"
+#include <stdlib.h>
 }
 
 header {
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
     
 //    using namespace antlr;
 }
--- gnudatalanguage-0.9.orig/src/FMTLexer.hpp
+++ gnudatalanguage-0.9/src/FMTLexer.hpp
@@ -17,7 +17,7 @@
 
 #include "CFMTLexer.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
 //using namespace antlr;
 
--- gnudatalanguage-0.9.orig/src/CFMTLexer.hpp
+++ gnudatalanguage-0.9/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;
 
--- gnudatalanguage-0.9.orig/src/fmtnode.hpp
+++ gnudatalanguage-0.9/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)
--- gnudatalanguage-0.9.orig/src/Makefile.am
+++ gnudatalanguage-0.9/src/Makefile.am
@@ -1,6 +1,6 @@
 # set the include path found by configure
 INCLUDES = $(EXT_INCLUDES) $(all_includes)
-SUBDIRS = antlr pro
+SUBDIRS = pro
 noinst_HEADERS = gdlwidget.hpp prognode.hpp prognodeexpr.hpp
 
 cpp_hpp_files = accessdesc.hpp arrayindex.hpp assocdata.cpp assocdata.hpp \
@@ -57,7 +57,7 @@ gdl_SOURCES = $(cpp_hpp_files) gdl.cpp l
 gdl_CXXFLAGS = $(AM_CXXFLAGS)
 # the library search path.
 gdl_LDFLAGS = $(all_libraries)
-gdl_LDADD = $(top_builddir)/src/antlr/libantlr.a -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+gdl_LDADD = /usr/lib/libantlr.a -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
 endif
 
 # build as library (for python module)
@@ -73,6 +73,6 @@ else
 libgdl_la_LDFLAGS = $(all_libraries) -Wl,-z,muldefs
 endif 
 
-libgdl_la_LIBADD = $(top_builddir)/src/antlr/libantlr.la -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+libgdl_la_LIBADD = /usr/lib/libantlr.la -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
 endif
 
--- gnudatalanguage-0.9.orig/src/GDLParser.hpp
+++ gnudatalanguage-0.9/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"
 
--- gnudatalanguage-0.9.orig/src/dnode.cpp
+++ gnudatalanguage-0.9/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"
--- gnudatalanguage-0.9.orig/src/format.g
+++ gnudatalanguage-0.9/src/format.g
@@ -28,7 +28,7 @@ header {
 
 #include "CFMTLexer.hpp"
 
-#include "antlr/TokenStreamSelector.hpp"
+#include <antlr/TokenStreamSelector.hpp>
 
 //using namespace antlr;
 }
--- gnudatalanguage-0.9.orig/configure.in
+++ gnudatalanguage-0.9/configure.in
@@ -1074,7 +1074,7 @@ dnl AC_CHECK_FUNCS(strdup strtod strtol
 dnl perform program name transformation
 dnl AC_ARG_PROGRAM
 
-AC_CONFIG_FILES(Makefile src/Makefile src/antlr/Makefile src/pro/Makefile src/pro/dicom/Makefile testsuite/Makefile doc/Makefile)
+AC_CONFIG_FILES(Makefile src/Makefile src/pro/Makefile src/pro/dicom/Makefile testsuite/Makefile doc/Makefile)
 AC_OUTPUT
 
 dnl == summary table =======================================
