Blob Blame History Raw
commit cf857a531d34d697a66e356c16b51570a467c9cf
Author: Fabrice Bellet <fabrice@bellet.info>
Date:   Thu Jul 7 22:32:38 2011 +0200

    nuke old bundled copy of expat, use system expat

diff --git a/configure.ac b/configure.ac
index 35c5b0d..fbf7c30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -311,6 +311,16 @@ esac
 opengl_LIBS="$LIBS"
 LIBS="$base_LIBS"
 
+dnl check for expat library
+EXPAT_OK="no"
+expat_LIBS=""
+save_LIBS=$LIBS
+LIBS="$LIBS $thread_LIBS"
+AC_SEARCH_LIBS(XML_GetFeatureList, expat)
+EXPAT_OK="$ac_cv_search_XML_GetFeatureList"
+expat_LIBS="$LIBS"
+LIBS=$save_LIBS
+
 dnl check for OpenAL libraries
 OPENAL_OK="no"
 ALUT_OK="no"
@@ -423,6 +433,7 @@ fi
 LIBS="$base_LIBS"
 
 AC_SUBST(base_LIBS)
+AC_SUBST(expat_LIBS)
 AC_SUBST(openal_LIBS)
 AC_SUBST(opengl_LIBS)
 AC_SUBST(thread_LIBS)
diff --git a/simgear/xml/Makefile.am b/simgear/xml/Makefile.am
index 9d754e9..0fee317 100644
--- a/simgear/xml/Makefile.am
+++ b/simgear/xml/Makefile.am
@@ -5,19 +5,12 @@ lib_LTLIBRARIES = libsgxml.la
 include_HEADERS = \
 	easyxml.hxx
 
-noinst_HEADERS = \
-	xmltok_impl.c xmltok_ns.c
-
 libsgxml_la_SOURCES = \
-	asciitab.h \
-	easyxml.cxx \
-	hashtable.h hashtable.c \
-	iasciitab.h latin1tab.h nametab.h utf8tab.h xmldef.h \
-	xmlparse.h xmlparse.c \
-	xmlrole.h xmlrole.c \
-	xmltok.h xmltok.c \
-	xmltok_impl.h
+	easyxml.cxx
 
 libsgxml_la_LDFLAGS = -release @VERSION@ -module
 
+libsgxml_la_LIBADD = \
+	$(expat_LIBS)
+
 INCLUDES = -I$(top_srcdir)
diff --git a/simgear/xml/easyxml.cxx b/simgear/xml/easyxml.cxx
index 65a3551..0a5b617 100644
--- a/simgear/xml/easyxml.cxx
+++ b/simgear/xml/easyxml.cxx
@@ -9,7 +9,7 @@
 #include <string.h>		// strcmp()
 
 #include "easyxml.hxx"
-#include "xmlparse.h"
+#include <expat.h>
 
 #include <fstream>
 #include <iostream>