From 9c37aa291f6111390f0a5761f7317002fbddadb1 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 28 Apr 2008 22:47:03 +0000
Subject: [PATCH] Fix broken configure test for libxslt: it was probing for
 xsltLibxmlVersion, which is a global variable not a function, and so the
 probe failed on machines where the linker makes a distinction (cf. Red Hat
 bug #444317).  Probe for an actual function instead.

---
 configure    | 20 ++++++++++----------
 configure.in |  4 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index d4d20f0eca8..43525616ca1 100755
--- a/configure
+++ b/configure
@@ -8003,9 +8003,9 @@ fi
 
 if test "$with_libxslt" = yes ; then
 
-{ echo "$as_me:$LINENO: checking for xsltLibxmlVersion in -lxslt" >&5
-echo $ECHO_N "checking for xsltLibxmlVersion in -lxslt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_xslt_xsltLibxmlVersion+set}" = set; then
+{ echo "$as_me:$LINENO: checking for xsltCleanupGlobals in -lxslt" >&5
+echo $ECHO_N "checking for xsltCleanupGlobals in -lxslt... $ECHO_C" >&6; }
+if test "${ac_cv_lib_xslt_xsltCleanupGlobals+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -8023,11 +8023,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char xsltLibxmlVersion ();
+char xsltCleanupGlobals ();
 int
 main ()
 {
-return xsltLibxmlVersion ();
+return xsltCleanupGlobals ();
   ;
   return 0;
 }
@@ -8050,21 +8050,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_xslt_xsltLibxmlVersion=yes
+  ac_cv_lib_xslt_xsltCleanupGlobals=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_xslt_xsltLibxmlVersion=no
+	ac_cv_lib_xslt_xsltCleanupGlobals=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_xslt_xsltLibxmlVersion" >&5
-echo "${ECHO_T}$ac_cv_lib_xslt_xsltLibxmlVersion" >&6; }
-if test $ac_cv_lib_xslt_xsltLibxmlVersion = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
+echo "${ECHO_T}$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
+if test $ac_cv_lib_xslt_xsltCleanupGlobals = yes; then
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXSLT 1
 _ACEOF
diff --git a/configure.in b/configure.in
index dd832477d98..361cd4badba 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.556 2008/04/21 00:26:44 tgl Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.557 2008/04/28 22:47:03 tgl Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -789,7 +789,7 @@ if test "$with_libxml" = yes ; then
 fi
 
 if test "$with_libxslt" = yes ; then
-  AC_CHECK_LIB(xslt, xsltLibxmlVersion, [], [AC_MSG_ERROR([library 'xslt' is required for XSLT support])])
+  AC_CHECK_LIB(xslt, xsltCleanupGlobals, [], [AC_MSG_ERROR([library 'xslt' is required for XSLT support])])
 fi
 
 # for contrib/uuid-ossp
-- 
GitLab