msxml3: Fix compiles for systems with libxml2 version 2.6.14 and below.

This commit is contained in:
Lei Zhang 2006-11-29 15:59:03 -08:00 committed by Alexandre Julliard
parent a7481a93c0
commit 6a530aba76
4 changed files with 95 additions and 0 deletions

85
configure vendored
View File

@ -10387,6 +10387,91 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_XMLREADMEMORY 1
_ACEOF
fi
{ echo "$as_me:$LINENO: checking for xmlNewDocPI in -lxml2" >&5
echo $ECHO_N "checking for xmlNewDocPI in -lxml2... $ECHO_C" >&6; }
if test "${ac_cv_lib_xml2_xmlNewDocPI+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $ac_xml_libs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char xmlNewDocPI ();
int
main ()
{
return xmlNewDocPI ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_xml2_xmlNewDocPI=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_xml2_xmlNewDocPI=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlNewDocPI" >&5
echo "${ECHO_T}$ac_cv_lib_xml2_xmlNewDocPI" >&6; }
if test $ac_cv_lib_xml2_xmlNewDocPI = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_XMLNEWDOCPI 1
_ACEOF
fi

View File

@ -486,6 +486,8 @@ then
XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)
AC_CHECK_LIB(xml2, xmlReadMemory,
[AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory function])],,$ac_xml_libs)
AC_CHECK_LIB(xml2, xmlNewDocPI,
[AC_DEFINE(HAVE_XMLNEWDOCPI,1,[Define if libxml2 has the xmlNewDocPI function])],,$ac_xml_libs)
])
CPPFLAGS="$ac_save_CPPFLAGS"
ac_xslt_libs="`$PKG_CONFIG --libs libxslt 2>/dev/null`"

View File

@ -761,6 +761,7 @@ static HRESULT WINAPI domdoc_createProcessingInstruction(
BSTR data,
IXMLDOMProcessingInstruction** pi )
{
#ifdef HAVE_XMLNEWDOCPI
xmlNodePtr xmlnode;
domdoc *This = impl_from_IXMLDOMDocument( iface );
xmlChar *xml_target, *xml_content;
@ -778,6 +779,10 @@ static HRESULT WINAPI domdoc_createProcessingInstruction(
HeapFree(GetProcessHeap(), 0, xml_target);
return S_OK;
#else
FIXME("Libxml 2.6.15 or greater required.");
return E_NOTIMPL;
#endif
}

View File

@ -936,6 +936,9 @@
/* Define if you have the XKB extension */
#undef HAVE_XKB
/* Define if libxml2 has the xmlNewDocPI function */
#undef HAVE_XMLNEWDOCPI
/* Define if libxml2 has the xmlReadMemory function */
#undef HAVE_XMLREADMEMORY