From c3ec1f4d4d7880f17adab5b9f27dbf01e3b83e22 Mon Sep 17 00:00:00 2001 From: Kevin James Date: Thu, 19 Feb 2009 18:21:53 +0000 Subject: [PATCH] Fixed configure to check for libxml, libxslt and libexpat Added patch to wraplibxml.cpp to compile on openSuSE 11.0 --- configure | 45 +++++++++++++++++++++++++++++++++++++++++++++ configure.in | 37 +++++++++++++++++++++++++++++++++++++ src/wraplibxml.cpp | 5 +++++ 3 files changed, 87 insertions(+) diff --git a/configure b/configure index 68e1159..1be2f62 100755 --- a/configure +++ b/configure @@ -14973,6 +14973,9 @@ CPPFLAGS="$CPPFLAGS -Wall -g -fexceptions" CXXFLAGS="$CPPFLAGS -Wall -g -fexceptions" WXCONFIG=wx-config +LIBXMLCONFIG=xml2-config +LIBXSLTCONFIG=xslt-config + # Check whether --with-wx-config was given. if test "${with_wx_config+set}" = set; then @@ -15016,6 +15019,48 @@ echo "$as_me: error: wxWidgets 2.8.0 or newer is required" >&2;} { (exit 1); exit 1; }; } fi +# Check for libxml2 +libxmlversion=0 + + + +# Call XML2 TEST func + + + { echo "$as_me:$LINENO: checking libxml2" >&5 +echo $ECHO_N "checking libxml2... $ECHO_C" >&6; } + if libxmlversion=`$LIBXMLCONFIG --version`; then + { echo "$as_me:$LINENO: result: $libxmlversion" >&5 +echo "${ECHO_T}$libxmlversion" >&6; } + else + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } + { { echo "$as_me:$LINENO: error: libxml2." >&5 +echo "$as_me: error: libxml2." >&2;} + { (exit 1); exit 1; }; } + fi + +# Check for libxslt +libxsltversion=0 + + + +# Call XSLT TEST func + + + { echo "$as_me:$LINENO: checking libxslt" >&5 +echo $ECHO_N "checking libxslt... $ECHO_C" >&6; } + if libxsltversion=`$LIBXSLTCONFIG --version`; then + { echo "$as_me:$LINENO: result: $libxsltversion" >&5 +echo "${ECHO_T}$libxsltversion" >&6; } + else + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } + { { echo "$as_me:$LINENO: error: libxslt" >&5 +echo "$as_me: error: libxslt" >&2;} + { (exit 1); exit 1; }; } + fi + CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" CXXFLAGS="$CXXFLAGS $WX_CPPFLAGS" diff --git a/configure.in b/configure.in index b45a699..c0b195f 100755 --- a/configure.in +++ b/configure.in @@ -10,6 +10,9 @@ CPPFLAGS="$CPPFLAGS -Wall -g -fexceptions" CXXFLAGS="$CPPFLAGS -Wall -g -fexceptions" WXCONFIG=wx-config +LIBXMLCONFIG=xml2-config +LIBXSLTCONFIG=xslt-config + AC_ARG_WITH(wx-config, [[ --with-wx-config=FILE Use the given path to wx-config when determining wxWidgets configuration; defaults to "wx-config"]], @@ -45,6 +48,40 @@ else AC_MSG_ERROR([wxWidgets 2.8.0 or newer is required]) fi +# Check for libxml2 +libxmlversion=0 + +AC_DEFUN([LIBXML2TEST], +[ + AC_REQUIRE([AC_PROG_AWK]) + AC_MSG_CHECKING([libxml2]) + if libxmlversion=`$LIBXMLCONFIG --version`; then + AC_MSG_RESULT([$libxmlversion]) + else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([libxml2.]) + fi]) + +# Call XML2 TEST func +LIBXML2TEST + +# Check for libxslt +libxsltversion=0 + +AC_DEFUN([LIBXSLTTEST], +[ + AC_REQUIRE([AC_PROG_AWK]) + AC_MSG_CHECKING([libxslt]) + if libxsltversion=`$LIBXSLTCONFIG --version`; then + AC_MSG_RESULT([$libxsltversion]) + else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([libxslt]) + fi]) + +# Call XSLT TEST func +LIBXSLTTEST + CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" CXXFLAGS="$CXXFLAGS $WX_CPPFLAGS" diff --git a/src/wraplibxml.cpp b/src/wraplibxml.cpp index 232c3ea..0b409d0 100755 --- a/src/wraplibxml.cpp +++ b/src/wraplibxml.cpp @@ -20,6 +20,11 @@ #include "wraplibxml.h" #include #include + +#ifdef ATTRIBUTE_PRINTF +#undef ATTRIBUTE_PRINTF +#endif + #include WrapLibxml::WrapLibxml ( bool netAccessParameter, const std::string& catalogPathParameter )