From de9aa5a7b4d9696b1daceba01d155cbd783bc883 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 7 Jan 2007 21:10:41 +0000 Subject: [PATCH] Check and document minimum required version of libxml. --- configure | 24 ++++++++++++------------ configure.in | 4 ++-- doc/src/sgml/installation.sgml | 5 +++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configure b/configure index ef43d820a1..557d1fac9d 100755 --- a/configure +++ b/configure @@ -7307,9 +7307,9 @@ fi if test "$with_libxml" = yes ; then -echo "$as_me:$LINENO: checking for xmlInitParser in -lxml2" >&5 -echo $ECHO_N "checking for xmlInitParser in -lxml2... $ECHO_C" >&6 -if test "${ac_cv_lib_xml2_xmlInitParser+set}" = set; then +echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5 +echo $ECHO_N "checking for xmlSaveToBuffer in -lxml2... $ECHO_C" >&6 +if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7327,11 +7327,11 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char xmlInitParser (); +char xmlSaveToBuffer (); int main () { -xmlInitParser (); +xmlSaveToBuffer (); ; return 0; } @@ -7358,20 +7358,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_xml2_xmlInitParser=yes + ac_cv_lib_xml2_xmlSaveToBuffer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_xml2_xmlInitParser=no +ac_cv_lib_xml2_xmlSaveToBuffer=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlInitParser" >&5 -echo "${ECHO_T}$ac_cv_lib_xml2_xmlInitParser" >&6 -if test $ac_cv_lib_xml2_xmlInitParser = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5 +echo "${ECHO_T}$ac_cv_lib_xml2_xmlSaveToBuffer" >&6 +if test $ac_cv_lib_xml2_xmlSaveToBuffer = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXML2 1 _ACEOF @@ -7379,8 +7379,8 @@ _ACEOF LIBS="-lxml2 $LIBS" else - { { echo "$as_me:$LINENO: error: library 'xml2' is required for XML support" >&5 -echo "$as_me: error: library 'xml2' is required for XML support" >&2;} + { { echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5 +echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;} { (exit 1); exit 1; }; } fi diff --git a/configure.in b/configure.in index f50976aaf4..893722fbf6 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.495 2007/01/05 22:19:17 momjian Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.496 2007/01/07 21:10:40 petere Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -724,7 +724,7 @@ if test "$with_pam" = yes ; then fi if test "$with_libxml" = yes ; then - AC_CHECK_LIB(xml2, xmlInitParser, [], [AC_MSG_ERROR([library 'xml2' is required for XML support])]) + AC_CHECK_LIB(xml2, xmlSaveToBuffer, [], [AC_MSG_ERROR([library 'xml2' (version >= 2.6.23) is required for XML support])]) fi diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 3119671fc4..68644fd4aa 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1,4 +1,4 @@ - + <![%standalone-include[<productname>PostgreSQL</>]]> @@ -909,7 +909,8 @@ su - postgres <term><option>--with-libxml</option></term> <listitem> <para> - Build with libxml (enables SQL/XML support). + Build with libxml (enables SQL/XML support). Libxml version 2.6.23 or + later is required for this feature. </para> </listitem> </varlistentry> -- 2.40.0