1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Check LIBXML_VERSION instead of testing in configure script.

We had put a test for libxml2's xmlStructuredErrorContext variable in
configure, but of course that doesn't work on Windows builds.  The next
best alternative seems to be to test the LIBXML_VERSION symbol provided
by xmlversion.h.

Per report from Talha Bin Rizwan, though this fixes it in a different way
than his proposed patch.
This commit is contained in:
Tom Lane
2012-08-17 00:05:26 -04:00
parent 305557984d
commit 470d0b9789
4 changed files with 11 additions and 90 deletions

View File

@ -1539,23 +1539,6 @@ AC_SUBST(LDAP_LIBS_FE)
AC_SUBST(LDAP_LIBS_BE)
# Older versions of libxml2 lack the xmlStructuredErrorContext variable
# (which could be a macro referring to a function, if threading is enabled)
if test "$with_libxml" = yes ; then
AC_CACHE_CHECK([for xmlStructuredErrorContext], pgac_cv_libxml_structerrctx,
[AC_TRY_LINK([#include <libxml/globals.h>
void *globptr;],
[globptr = xmlStructuredErrorContext],
[pgac_cv_libxml_structerrctx=yes],
[pgac_cv_libxml_structerrctx=no])])
if test x"$pgac_cv_libxml_structerrctx" = x"yes"; then
AC_DEFINE(HAVE_XMLSTRUCTUREDERRORCONTEXT,
1,
[Define to 1 if your libxml has xmlStructuredErrorContext.])
fi
fi
# This test makes sure that run tests work at all. Sometimes a shared
# library is found by the linker, but the runtime linker can't find it.
# This check should come after all modifications of compiler or linker