summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/saxparser.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 8f2c71a..9124295 100644
--- a/configure.ac
+++ b/configure.ac
@@ -517,8 +517,8 @@ CPPFLAGS=""
CFLAGS="$EXPAT_CFLAGS"
LDFLAGS="$EXPAT_LDFLAGS"
LIBS=""
-AC_CHECK_HEADER(expat.h, , AC_MSG_ERROR([*** eXpat header file not found!]))
-AC_CHECK_LIB(expat, XML_ParserCreate, , AC_MSG_ERROR([*** eXpat library not found!]))
+AC_CHECK_HEADER(expat.h,, AC_CHECK_HEADER(bsdxml.h, , AC_MSG_ERROR([*** eXpat header file not found!])))
+AC_CHECK_LIB(expat, XML_ParserCreate,, AC_CHECK_LIB(bsdxml, XML_ParserCreate, , AC_MSG_ERROR([*** eXpat library not found!])))
EXPAT_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
EXPAT_LIBS="$LDFLAGS $LIBS"
CXXFLAGS="$tmp_CXXFLAGS"
diff --git a/src/saxparser.h b/src/saxparser.h
index 4b1a273..85906f9 100644
--- a/src/saxparser.h
+++ b/src/saxparser.h
@@ -26,9 +26,15 @@
*/
#pragma once
+#include <config.h>
+
#include <string>
#include <unordered_map>
+#ifdef HAVE_LIBEXPAT
#include <expat.h>
+#elif HAVE_LIBBSDXML
+#include <bsdxml.h>
+#endif
#include <fstream>
class SAXParser