build/install xml2 when configured with libxml

Started by Andrew Dunstanalmost 19 years ago23 messages
#1Andrew Dunstan
andrew@dunslane.net
1 attachment(s)

Since contrib/xml2 seems to be staying with us at least for now, this
small patch enables it to be built and installed from the contrib
Makefile when --with-libxml is given to configure.

If there's no objection I'll apply in a day or two.

cheers

andrew

Attachments:

xml2build.patchtext/x-patch; name=xml2build.patchDownload
Index: configure
===================================================================
RCS file: /cvsroot/pgsql/configure,v
retrieving revision 1.540
diff -c -r1.540 configure
*** configure	29 Mar 2007 15:30:51 -0000	1.540
--- configure	4 Apr 2007 19:05:01 -0000
***************
*** 314,320 ****
  # include <unistd.h>
  #endif"
  
! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
  ac_subst_files=''
  
  # Initialize some variables set by options.
--- 314,320 ----
  # include <unistd.h>
  #endif"
  
! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG with_libxml with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
  ac_subst_files=''
  
  # Initialize some variables set by options.
***************
*** 4331,4336 ****
--- 4331,4337 ----
  fi
  
  
+ 
  #
  # Zlib
  #
***************
*** 24091,24096 ****
--- 24092,24098 ----
  s,@with_bonjour@,$with_bonjour,;t t
  s,@with_openssl@,$with_openssl,;t t
  s,@XML2_CONFIG@,$XML2_CONFIG,;t t
+ s,@with_libxml@,$with_libxml,;t t
  s,@with_zlib@,$with_zlib,;t t
  s,@EGREP@,$EGREP,;t t
  s,@ELF_SYS@,$ELF_SYS,;t t
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql/configure.in,v
retrieving revision 1.507
diff -c -r1.507 configure.in
*** configure.in	29 Mar 2007 15:30:51 -0000	1.507
--- configure.in	4 Apr 2007 19:05:05 -0000
***************
*** 577,582 ****
--- 577,583 ----
    fi
  fi
  
+ AC_SUBST(with_libxml)
  
  #
  # Zlib
Index: contrib/Makefile
===================================================================
RCS file: /cvsroot/pgsql/contrib/Makefile,v
retrieving revision 1.71
diff -c -r1.71 Makefile
*** contrib/Makefile	8 Feb 2007 15:09:47 -0000	1.71
--- contrib/Makefile	4 Apr 2007 19:05:05 -0000
***************
*** 37,45 ****
  WANTED_DIRS += sslinfo
  endif
  
  # Missing:
  #		start-scripts	\ (does not have a makefile)
- #		xml2		\ (requires libxml installed)
  
  
  all install installdirs uninstall distprep clean distclean maintainer-clean:
--- 37,48 ----
  WANTED_DIRS += sslinfo
  endif
  
+ ifeq ($(with_libxml),yes)
+ WANTED_DIRS += xml2
+ endif
+ 
  # Missing:
  #		start-scripts	\ (does not have a makefile)
  
  
  all install installdirs uninstall distprep clean distclean maintainer-clean:
Index: src/Makefile.global.in
===================================================================
RCS file: /cvsroot/pgsql/src/Makefile.global.in,v
retrieving revision 1.233
diff -c -r1.233 Makefile.global.in
*** src/Makefile.global.in	9 Feb 2007 15:55:57 -0000	1.233
--- src/Makefile.global.in	4 Apr 2007 19:05:07 -0000
***************
*** 152,157 ****
--- 152,158 ----
  with_python	= @with_python@
  with_tcl	= @with_tcl@
  with_openssl	= @with_openssl@
+ with_libxml	= @with_libxml@
  with_zlib	= @with_zlib@
  enable_shared	= @enable_shared@
  enable_rpath	= @enable_rpath@
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#1)
Re: build/install xml2 when configured with libxml

Andrew Dunstan wrote:

Since contrib/xml2 seems to be staying with us at least for now, this
small patch enables it to be built and installed from the contrib
Makefile when --with-libxml is given to configure.

contrib/xml2 also requires libxslt.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#2)
Re: build/install xml2 when configured with libxml

Peter Eisentraut wrote:

Andrew Dunstan wrote:

Since contrib/xml2 seems to be staying with us at least for now, this
small patch enables it to be built and installed from the contrib
Makefile when --with-libxml is given to configure.

contrib/xml2 also requires libxslt.

Well, how often is libxslt missing when libxml is present, in practice?
And if it is, then you have several options:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the
individual module Makefiles instead), or
. change the xml2 Makefile

My main purpose is to complete buildfarm build coverage.

cheers

andrew

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#3)
Re: build/install xml2 when configured with libxml

Andrew Dunstan wrote:

Well, how often is libxslt missing when libxml is present, in
practice?

A local sample shows a probability of 100%.

And if it is, then you have several options:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the
individual module Makefiles instead), or
. change the xml2 Makefile

Any of these could be worth considering, but it needs to be thought
through first.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#5Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#4)
Re: build/install xml2 when configured with libxml

Peter Eisentraut wrote:

And if it is, then you have several options:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the
individual module Makefiles instead), or
. change the xml2 Makefile

Any of these could be worth considering, but it needs to be thought
through first.

Well, I'm happy to receive suggestions.

cheers

andrew

#6Bruce Momjian
bruce@momjian.us
In reply to: Andrew Dunstan (#5)
Re: build/install xml2 when configured with libxml

Andrew Dunstan wrote:

Peter Eisentraut wrote:

And if it is, then you have several options:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the
individual module Makefiles instead), or
. change the xml2 Makefile

Any of these could be worth considering, but it needs to be thought
through first.

Well, I'm happy to receive suggestions.

Andrew has enabled /contrib/xml2 builds.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#7Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#6)
Re: build/install xml2 when configured with libxml

Bruce Momjian wrote:

Andrew Dunstan wrote:

Peter Eisentraut wrote:

And if it is, then you have several options:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the
individual module Makefiles instead), or
. change the xml2 Makefile

Any of these could be worth considering, but it needs to be thought
through first.

Well, I'm happy to receive suggestions.

Andrew has enabled /contrib/xml2 builds.

And in turn we have found some warnings we should look at cleaning up, e.g.:

ccache gcc -no-cpp-precomp -I/opt/libxml2-2.6.27_20070107/include/libxml2 -I. -I../../src/include -I/opt/libxml2-2.6.27_20070107/include/libxml2 -c -o xpath.o xpath.c -MMD -MP -MF .deps/xpath.Po
xpath.c: In function 'xml_encode_special_chars':
xpath.c:212: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
xpath.c: In function 'pgxmlNodeSetToText':
xpath.c:268: warning: pointer targets in passing argument 2 of 'xmlBufferWriteChar' differ in signedness
xpath.c: In function 'pgxml_result_to_text':
xpath.c:607: warning: pointer targets in passing argument 1 of 'xmlStrdup' differ in signedness
xpath.c:612: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
xpath.c: In function 'xpath_table':
xpath.c:663: warning: pointer targets in initialization differ in signedness
xpath.c:738: warning: pointer targets in assignment differ in signedness
xpath.c:742: warning: pointer targets in passing argument 1 of 'strstr' differ in signedness
xpath.c:742: warning: pointer targets in passing argument 2 of 'strstr' differ in signedness
xpath.c:742: warning: pointer targets in assignment differ in signedness
xpath.c:896: warning: pointer targets in passing argument 1 of 'xmlStrdup' differ in signedness
xpath.c:904: warning: pointer targets in assignment differ in signedness
ccache gcc -no-cpp-precomp -I/opt/libxml2-2.6.27_20070107/include/libxml2 -I. -I../../src/include -I/opt/libxml2-2.6.27_20070107/include/libxml2 -c -o xslt_proc.o xslt_proc.c -MMD -MP -MF .deps/xslt_proc.Po
xslt_proc.c: In function 'xslt_process':
xslt_proc.c:105: warning: pointer targets in passing argument 1 of 'xsltParseStylesheetFile' differ in signedness

cheers

andrew

#8Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#6)
1 attachment(s)
Re: build/install xml2 when configured with libxml

Bruce Momjian wrote:

Andrew Dunstan wrote:

Peter Eisentraut wrote:

And if it is, then you have several options:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the
individual module Makefiles instead), or
. change the xml2 Makefile

Any of these could be worth considering, but it needs to be thought
through first.

Well, I'm happy to receive suggestions.

Andrew has enabled /contrib/xml2 builds.

The attached patch adds a test for libxslt/xslt.h and only builds
contrib/xml2 if it's found, which I think should handle Peter's
objection, as well as unbreak the buildfarm. (The patch is large because
cvs diff seems to have behaved a bit oddly with the configure script -
but otherwise it's fairly minimal).

cheers

andrew

Attachments:

xml2.patchtext/x-patch; name=xml2.patchDownload
Index: configure
===================================================================
RCS file: /cvsroot/pgsql/configure,v
retrieving revision 1.543
diff -c -r1.543 configure
*** configure	13 Apr 2007 18:50:01 -0000	1.543
--- configure	14 Apr 2007 03:44:24 -0000
***************
*** 314,320 ****
  # include <unistd.h>
  #endif"
  
! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG with_libxml with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
  ac_subst_files=''
  
  # Initialize some variables set by options.
--- 314,320 ----
  # include <unistd.h>
  #endif"
  
! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG EGREP with_libxml have_libxslt with_zlib ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
  ac_subst_files=''
  
  # Initialize some variables set by options.
***************
*** 4275,4280 ****
--- 4275,4281 ----
  fi;
  
  
+ have_libxslt=no
  if test "$with_libxml" = yes ; then
    for ac_prog in xml2-config
  do
***************
*** 4328,4334 ****
--- 4329,4740 ----
        esac
      done
    fi
+ 
+ echo "$as_me:$LINENO: checking for egrep" >&5
+ echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+ if test "${ac_cv_prog_egrep+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+     then ac_cv_prog_egrep='grep -E'
+     else ac_cv_prog_egrep='egrep'
+     fi
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+ echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+  EGREP=$ac_cv_prog_egrep
+ 
+ 
+ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+ echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+ if test "${ac_cv_header_stdc+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include <float.h>
+ 
+ int
+ main ()
+ {
+ 
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 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'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; } &&
+ 	 { ac_try='test -s conftest.$ac_objext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_header_stdc=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ ac_cv_header_stdc=no
+ fi
+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+ if test $ac_cv_header_stdc = yes; then
+   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <string.h>
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "memchr" >/dev/null 2>&1; then
+   :
+ else
+   ac_cv_header_stdc=no
+ fi
+ rm -f conftest*
+ 
+ fi
+ 
+ if test $ac_cv_header_stdc = yes; then
+   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <stdlib.h>
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "free" >/dev/null 2>&1; then
+   :
+ else
+   ac_cv_header_stdc=no
  fi
+ rm -f conftest*
+ 
+ fi
+ 
+ if test $ac_cv_header_stdc = yes; then
+   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+   if test "$cross_compiling" = yes; then
+   :
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <ctype.h>
+ #if ((' ' & 0x0FF) == 0x020)
+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+ #else
+ # define ISLOWER(c) \
+ 		   (('a' <= (c) && (c) <= 'i') \
+ 		     || ('j' <= (c) && (c) <= 'r') \
+ 		     || ('s' <= (c) && (c) <= 'z'))
+ # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+ #endif
+ 
+ #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+ int
+ main ()
+ {
+   int i;
+   for (i = 0; i < 256; i++)
+     if (XOR (islower (i), ISLOWER (i))
+ 	|| toupper (i) != TOUPPER (i))
+       exit(2);
+   exit (0);
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   :
+ else
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ ( exit $ac_status )
+ ac_cv_header_stdc=no
+ fi
+ rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+ echo "${ECHO_T}$ac_cv_header_stdc" >&6
+ if test $ac_cv_header_stdc = yes; then
+ 
+ cat >>confdefs.h <<\_ACEOF
+ #define STDC_HEADERS 1
+ _ACEOF
+ 
+ fi
+ 
+ # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ 		  inttypes.h stdint.h unistd.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ $ac_includes_default
+ 
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 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'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; } &&
+ 	 { ac_try='test -s conftest.$ac_objext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   eval "$as_ac_Header=yes"
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ eval "$as_ac_Header=no"
+ fi
+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
+ fi
+ 
+ done
+ 
+ 
+ 
+ for ac_header in libxslt/xslt.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+   echo "$as_me:$LINENO: checking for $ac_header" >&5
+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+   # Is the header compilable?
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ $ac_includes_default
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 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'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; } &&
+ 	 { ac_try='test -s conftest.$ac_objext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ ac_header_compiler=no
+ fi
+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+ 
+ # Is the header present?
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$ac_header>
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+   (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+   else
+     ac_cpp_err=
+   fi
+ else
+   ac_cpp_err=yes
+ fi
+ if test -z "$ac_cpp_err"; then
+   ac_header_preproc=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+   ac_header_preproc=no
+ fi
+ rm -f conftest.err conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6
+ 
+ # So?  What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+   yes:no: )
+     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+     ac_header_preproc=yes
+     ;;
+   no:yes:* )
+     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+ echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+ echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+     (
+       cat <<\_ASBOX
+ ## ---------------------------------------- ##
+ ## Report this to pgsql-bugs@postgresql.org ##
+ ## ---------------------------------------- ##
+ _ASBOX
+     ) |
+       sed "s/^/$as_me: WARNING:     /" >&2
+     ;;
+ esac
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ 
+ fi
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+  have_libxslt=yes
+ fi
+ 
+ done
+ 
+ fi
+ 
  
  
  
***************
*** 4375,4396 ****
      freebsd3*|freebsd4*) elf=yes;;
  esac
  
- 
- echo "$as_me:$LINENO: checking for egrep" >&5
- echo $ECHO_N "checking for egrep... $ECHO_C" >&6
- if test "${ac_cv_prog_egrep+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-     then ac_cv_prog_egrep='grep -E'
-     else ac_cv_prog_egrep='egrep'
-     fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
- echo "${ECHO_T}$ac_cv_prog_egrep" >&6
-  EGREP=$ac_cv_prog_egrep
- 
- 
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
--- 4781,4786 ----
***************
*** 7526,7769 ****
  ## Header files
  ##
  
- echo "$as_me:$LINENO: checking for ANSI C header files" >&5
- echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
- if test "${ac_cv_header_stdc+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <stdlib.h>
- #include <stdarg.h>
- #include <string.h>
- #include <float.h>
- 
- int
- main ()
- {
- 
-   ;
-   return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 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'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; } &&
- 	 { ac_try='test -s conftest.$ac_objext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_header_stdc=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- 
- ac_cv_header_stdc=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- 
- if test $ac_cv_header_stdc = yes; then
-   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <string.h>
- 
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "memchr" >/dev/null 2>&1; then
-   :
- else
-   ac_cv_header_stdc=no
- fi
- rm -f conftest*
- 
- fi
- 
- if test $ac_cv_header_stdc = yes; then
-   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <stdlib.h>
- 
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "free" >/dev/null 2>&1; then
-   :
- else
-   ac_cv_header_stdc=no
- fi
- rm -f conftest*
- 
- fi
- 
- if test $ac_cv_header_stdc = yes; then
-   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-   if test "$cross_compiling" = yes; then
-   :
- else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <ctype.h>
- #if ((' ' & 0x0FF) == 0x020)
- # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #else
- # define ISLOWER(c) \
- 		   (('a' <= (c) && (c) <= 'i') \
- 		     || ('j' <= (c) && (c) <= 'r') \
- 		     || ('s' <= (c) && (c) <= 'z'))
- # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
- #endif
- 
- #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
- int
- main ()
- {
-   int i;
-   for (i = 0; i < 256; i++)
-     if (XOR (islower (i), ISLOWER (i))
- 	|| toupper (i) != TOUPPER (i))
-       exit(2);
-   exit (0);
- }
- _ACEOF
- rm -f conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-   echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- 
- ( exit $ac_status )
- ac_cv_header_stdc=no
- fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
- echo "${ECHO_T}$ac_cv_header_stdc" >&6
- if test $ac_cv_header_stdc = yes; then
- 
- cat >>confdefs.h <<\_ACEOF
- #define STDC_HEADERS 1
- _ACEOF
- 
- fi
- 
- # On IRIX 5.3, sys/types and inttypes.h are conflicting.
- 
- 
- 
- 
- 
- 
- 
- 
- 
- for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- 		  inttypes.h stdint.h unistd.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- $ac_includes_default
- 
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 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'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; } &&
- 	 { ac_try='test -s conftest.$ac_objext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   eval "$as_ac_Header=yes"
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- 
- eval "$as_ac_Header=no"
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
- fi
- 
- done
- 
- 
  
  
  
--- 7916,7921 ----
***************
*** 24321,24329 ****
  s,@with_bonjour@,$with_bonjour,;t t
  s,@with_openssl@,$with_openssl,;t t
  s,@XML2_CONFIG@,$XML2_CONFIG,;t t
  s,@with_libxml@,$with_libxml,;t t
  s,@with_zlib@,$with_zlib,;t t
- s,@EGREP@,$EGREP,;t t
  s,@ELF_SYS@,$ELF_SYS,;t t
  s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
  s,@AWK@,$AWK,;t t
--- 24473,24482 ----
  s,@with_bonjour@,$with_bonjour,;t t
  s,@with_openssl@,$with_openssl,;t t
  s,@XML2_CONFIG@,$XML2_CONFIG,;t t
+ s,@EGREP@,$EGREP,;t t
  s,@with_libxml@,$with_libxml,;t t
+ s,@have_libxslt@,$have_libxslt,;t t
  s,@with_zlib@,$with_zlib,;t t
  s,@ELF_SYS@,$ELF_SYS,;t t
  s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
  s,@AWK@,$AWK,;t t
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql/configure.in,v
retrieving revision 1.510
diff -c -r1.510 configure.in
*** configure.in	13 Apr 2007 18:50:01 -0000	1.510
--- configure.in	14 Apr 2007 03:44:25 -0000
***************
*** 561,566 ****
--- 561,567 ----
  PGAC_ARG_BOOL(with, libxml, no, [  --with-libxml           build with XML support],
                [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])])
  
+ have_libxslt=no
  if test "$with_libxml" = yes ; then
    AC_CHECK_PROGS(XML2_CONFIG, xml2-config)
    if test -n "$XML2_CONFIG"; then
***************
*** 575,583 ****
--- 576,586 ----
        esac
      done
    fi
+   AC_CHECK_HEADERS(libxslt/xslt.h, [have_libxslt=yes],,)
  fi
  
  AC_SUBST(with_libxml)
+ AC_SUBST(have_libxslt)
  
  #
  # Zlib
Index: contrib/Makefile
===================================================================
RCS file: /cvsroot/pgsql/contrib/Makefile,v
retrieving revision 1.72
diff -c -r1.72 Makefile
*** contrib/Makefile	13 Apr 2007 18:50:01 -0000	1.72
--- contrib/Makefile	14 Apr 2007 03:44:25 -0000
***************
*** 38,45 ****
--- 38,47 ----
  endif
  
  ifeq ($(with_libxml),yes)
+ ifeq ($(have_libxslt),yes)
  WANTED_DIRS += xml2
  endif
+ endif
  
  # Missing:
  #		start-scripts	\ (does not have a makefile)
Index: src/Makefile.global.in
===================================================================
RCS file: /cvsroot/pgsql/src/Makefile.global.in,v
retrieving revision 1.234
diff -c -r1.234 Makefile.global.in
*** src/Makefile.global.in	13 Apr 2007 18:50:01 -0000	1.234
--- src/Makefile.global.in	14 Apr 2007 03:44:26 -0000
***************
*** 153,158 ****
--- 153,159 ----
  with_tcl	= @with_tcl@
  with_openssl	= @with_openssl@
  with_libxml	= @with_libxml@
+ have_libxslt	= @have_libxslt@
  with_zlib	= @with_zlib@
  enable_shared	= @enable_shared@
  enable_rpath	= @enable_rpath@
#9Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#8)
Re: build/install xml2 when configured with libxml

Andrew Dunstan <andrew@dunslane.net> writes:

The attached patch adds a test for libxslt/xslt.h and only builds
contrib/xml2 if it's found, which I think should handle Peter's
objection, as well as unbreak the buildfarm. (The patch is large because
cvs diff seems to have behaved a bit oddly with the configure script -
but otherwise it's fairly minimal).

[squint...] Are you using the same autoconf version as the rest of us?

regards, tom lane

#10Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#8)
Re: build/install xml2 when configured with libxml

Andrew Dunstan wrote:

The attached patch adds a test for libxslt/xslt.h and only builds
contrib/xml2 if it's found,

But the policy is that the presence of features in the final build
should not depend on the incidental presence of features in the build
environment. Either you select a feature, then it's built, or you
don't, then it's not. So the only options we really have are adding
another switch for libxslt, or including it with libxml. I'm not sure
which is better.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#11Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#9)
Re: build/install xml2 when configured with libxml

Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

The attached patch adds a test for libxslt/xslt.h and only builds
contrib/xml2 if it's found, which I think should handle Peter's
objection, as well as unbreak the buildfarm. (The patch is large because
cvs diff seems to have behaved a bit oddly with the configure script -
but otherwise it's fairly minimal).

[squint...] Are you using the same autoconf version as the rest of us?

Yes. Anyway, it looks like we need to do something else.

cheers

andrew

#12Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#10)
Re: build/install xml2 when configured with libxml

Peter Eisentraut wrote:

Andrew Dunstan wrote:

The attached patch adds a test for libxslt/xslt.h and only builds
contrib/xml2 if it's found,

But the policy is that the presence of features in the final build
should not depend on the incidental presence of features in the build
environment. Either you select a feature, then it's built, or you
don't, then it's not. So the only options we really have are adding
another switch for libxslt, or including it with libxml. I'm not sure
which is better.

Then let's add a switch for libxslt. I have a strong suspicion we'll
want it before long anyway, and it will mean we can do this in a less
kludgy way.

cheers

andrew

#13Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#6)
Re: build/install xml2 when configured with libxml

Bruce Momjian wrote:

Andrew Dunstan wrote:

Peter Eisentraut wrote:

And if it is, then you have several options:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the
individual module Makefiles instead), or
. change the xml2 Makefile

Any of these could be worth considering, but it needs to be thought
through first.

Well, I'm happy to receive suggestions.

Andrew has enabled /contrib/xml2 builds.

I reverted the contrib/Makefile portion of this until we find a better way.

cheers

andrew

#14Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#12)
Re: build/install xml2 when configured with libxml

Andrew Dunstan <andrew@dunslane.net> writes:

Peter Eisentraut wrote:

But the policy is that the presence of features in the final build
should not depend on the incidental presence of features in the build
environment. Either you select a feature, then it's built, or you
don't, then it's not. So the only options we really have are adding
another switch for libxslt, or including it with libxml. I'm not sure
which is better.

Then let's add a switch for libxslt.

+1 --- the fact that so many buildfarm members only have one of the two
libraries is pretty suggestive that that's common. We shouldn't require
both libraries to build the core xml features, if only because
contrib/xml2 is expected to go away eventually, no?

regards, tom lane

#15Stefan Kaltenbrunner
stefan@kaltenbrunner.cc
In reply to: Tom Lane (#14)
Re: build/install xml2 when configured with libxml

Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

Peter Eisentraut wrote:

But the policy is that the presence of features in the final build
should not depend on the incidental presence of features in the build
environment. Either you select a feature, then it's built, or you
don't, then it's not. So the only options we really have are adding
another switch for libxslt, or including it with libxml. I'm not sure
which is better.

Then let's add a switch for libxslt.

+1 --- the fact that so many buildfarm members only have one of the two
libraries is pretty suggestive that that's common. We shouldn't require
both libraries to build the core xml features, if only because
contrib/xml2 is expected to go away eventually, no?

well from a buildfarm maintainer perspective - I only have (or had on
some boxes) only libxml(or rather libxm-dev) installed because that's
what was required when we got the initial XML support.
Most of those boxes would have neither of those two - it's the buildfarm
itself that resulted in that library getting installed (and only that
one because it was sufficient at the time).

Stefan

#16Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#14)
1 attachment(s)
Re: build/install xml2 when configured with libxml

Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

Peter Eisentraut wrote:

But the policy is that the presence of features in the final build
should not depend on the incidental presence of features in the build
environment. Either you select a feature, then it's built, or you
don't, then it's not. So the only options we really have are adding
another switch for libxslt, or including it with libxml. I'm not sure
which is better.

Then let's add a switch for libxslt.

+1 --- the fact that so many buildfarm members only have one of the two
libraries is pretty suggestive that that's common. We shouldn't require
both libraries to build the core xml features, if only because
contrib/xml2 is expected to go away eventually, no?

I don't think it should go away until we provide for equivalents in
core, at least optionally.

Anyway, here's the patch.

cheers

andrew

Attachments:

xml2.patchtext/x-patch; name=xml2.patchDownload
Index: configure
===================================================================
RCS file: /cvsroot/pgsql/configure,v
retrieving revision 1.543
diff -c -r1.543 configure
*** configure	13 Apr 2007 18:50:01 -0000	1.543
--- configure	14 Apr 2007 19:23:54 -0000
***************
*** 314,320 ****
  # include <unistd.h>
  #endif"
  
! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG with_libxml with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
  ac_subst_files=''
  
  # Initialize some variables set by options.
--- 314,320 ----
  # include <unistd.h>
  #endif"
  
! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG with_libxml with_libxslt with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
  ac_subst_files=''
  
  # Initialize some variables set by options.
***************
*** 896,901 ****
--- 896,902 ----
    --without-readline      do not use GNU Readline nor BSD Libedit for editing
    --with-libedit-preferred  prefer BSD Libedit over GNU Readline
    --with-libxml           build with XML support
+   --with-libxslt           build with XSLT support
    --without-zlib          do not use Zlib
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  
***************
*** 4333,4338 ****
--- 4334,4377 ----
  
  
  #
+ # XSLT
+ #
+ 
+ pgac_args="$pgac_args with_libxslt"
+ 
+ 
+ # Check whether --with-libxslt or --without-libxslt was given.
+ if test "${with_libxslt+set}" = set; then
+   withval="$with_libxslt"
+ 
+   case $withval in
+     yes)
+ 
+ cat >>confdefs.h <<\_ACEOF
+ #define USE_LIBXSLT 1
+ _ACEOF
+ 
+       ;;
+     no)
+       :
+       ;;
+     *)
+       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
+ echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
+    { (exit 1); exit 1; }; }
+       ;;
+   esac
+ 
+ else
+   with_libxslt=no
+ 
+ fi;
+ 
+ 
+ 
+ 
+ 
+ #
  # Zlib
  #
  
***************
*** 7521,7526 ****
--- 7560,7646 ----
  
  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 $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lxslt  $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 gcc2 internal prototype to avoid an error.  */
+ #ifdef __cplusplus
+ 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 xsltLibxmlVersion ();
+ int
+ main ()
+ {
+ xsltLibxmlVersion ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_xslt_xsltLibxmlVersion=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ ac_cv_lib_xslt_xsltLibxmlVersion=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_xslt_xsltLibxmlVersion" >&5
+ echo "${ECHO_T}$ac_cv_lib_xslt_xsltLibxmlVersion" >&6
+ if test $ac_cv_lib_xslt_xsltLibxmlVersion = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBXSLT 1
+ _ACEOF
+ 
+   LIBS="-lxslt $LIBS"
+ 
+ else
+   { { echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
+ echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ 
+ fi
+ 
  
  ##
  ## Header files
***************
*** 10762,10767 ****
--- 10882,11036 ----
  
  fi
  
+ if test "$with_libxslt" = yes ; then
+   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
+   echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
+ echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6
+ if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
+ echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6
+ else
+   # Is the header compilable?
+ echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
+ echo $ECHO_N "checking libxslt/xslt.h usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ $ac_includes_default
+ #include <libxslt/xslt.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 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'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; } &&
+ 	 { ac_try='test -s conftest.$ac_objext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ ac_header_compiler=no
+ fi
+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+ 
+ # Is the header present?
+ echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
+ echo $ECHO_N "checking libxslt/xslt.h presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <libxslt/xslt.h>
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+   (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+   else
+     ac_cpp_err=
+   fi
+ else
+   ac_cpp_err=yes
+ fi
+ if test -z "$ac_cpp_err"; then
+   ac_header_preproc=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+   ac_header_preproc=no
+ fi
+ rm -f conftest.err conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6
+ 
+ # So?  What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+   yes:no: )
+     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
+ echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
+     ac_header_preproc=yes
+     ;;
+   no:yes:* )
+     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
+     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
+ echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
+     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
+ echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
+     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
+ echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
+     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
+     (
+       cat <<\_ASBOX
+ ## ---------------------------------------- ##
+ ## Report this to pgsql-bugs@postgresql.org ##
+ ## ---------------------------------------- ##
+ _ASBOX
+     ) |
+       sed "s/^/$as_me: WARNING:     /" >&2
+     ;;
+ esac
+ echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
+ echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6
+ if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
+ echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6
+ 
+ fi
+ if test $ac_cv_header_libxslt_xslt_h = yes; then
+   :
+ else
+   { { echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
+ echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ 
+ 
+ fi
+ 
  if test "$with_ldap" = yes ; then
    if test "$PORTNAME" != "win32"; then
  
***************
*** 24322,24327 ****
--- 24591,24597 ----
  s,@with_openssl@,$with_openssl,;t t
  s,@XML2_CONFIG@,$XML2_CONFIG,;t t
  s,@with_libxml@,$with_libxml,;t t
+ s,@with_libxslt@,$with_libxslt,;t t
  s,@with_zlib@,$with_zlib,;t t
  s,@EGREP@,$EGREP,;t t
  s,@ELF_SYS@,$ELF_SYS,;t t
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql/configure.in,v
retrieving revision 1.510
diff -c -r1.510 configure.in
*** configure.in	13 Apr 2007 18:50:01 -0000	1.510
--- configure.in	14 Apr 2007 19:23:55 -0000
***************
*** 580,585 ****
--- 580,594 ----
  AC_SUBST(with_libxml)
  
  #
+ # XSLT
+ #
+ PGAC_ARG_BOOL(with, libxslt, no, [  --with-libxslt           build with XSLT support],
+               [AC_DEFINE([USE_LIBXSLT], 1, [Define to 1 to build with XSLT support. (--with-libxslt)])])
+ 
+ 
+ AC_SUBST(with_libxslt)
+ 
+ #
  # Zlib
  #
  PGAC_ARG_BOOL(with, zlib, yes,
***************
*** 768,773 ****
--- 777,786 ----
    AC_CHECK_LIB(xml2, xmlSaveToBuffer, [], [AC_MSG_ERROR([library 'xml2' (version >= 2.6.23) is required for XML support])])
  fi
  
+ if test "$with_libxslt" = yes ; then
+   AC_CHECK_LIB(xslt, xsltLibxmlVersion, [], [AC_MSG_ERROR([library 'xslt' is required for XSLT support])])
+ fi
+ 
  
  ##
  ## Header files
***************
*** 847,852 ****
--- 860,869 ----
    AC_CHECK_HEADER(libxml/parser.h, [], [AC_MSG_ERROR([header file <libxml/parser.h> is required for XML support])])
  fi
  
+ if test "$with_libxslt" = yes ; then
+   AC_CHECK_HEADER(libxslt/xslt.h, [], [AC_MSG_ERROR([header file <libxslt/xslt.h> is required for XSLT support])])
+ fi
+ 
  if test "$with_ldap" = yes ; then
    if test "$PORTNAME" != "win32"; then
       AC_CHECK_HEADERS(ldap.h, [],
Index: contrib/Makefile
===================================================================
RCS file: /cvsroot/pgsql/contrib/Makefile,v
retrieving revision 1.73
diff -c -r1.73 Makefile
*** contrib/Makefile	14 Apr 2007 12:57:07 -0000	1.73
--- contrib/Makefile	14 Apr 2007 19:23:55 -0000
***************
*** 37,45 ****
  WANTED_DIRS += sslinfo
  endif
  
  # Missing:
  #		start-scripts	\ (does not have a makefile)
! #		xml2		\ (requires libxml and libxslt installed)
  
  all install installdirs uninstall distprep clean distclean maintainer-clean:
  	@for dir in $(WANTED_DIRS); do \
--- 37,51 ----
  WANTED_DIRS += sslinfo
  endif
  
+ ifeq ($(with_libxml),yes)
+ ifeq ($(with_libxslt),yes)
+ WANTED_DIRS += xml2
+ endif
+ endif
+ 
  # Missing:
  #		start-scripts	\ (does not have a makefile)
! 
  
  all install installdirs uninstall distprep clean distclean maintainer-clean:
  	@for dir in $(WANTED_DIRS); do \
Index: src/Makefile.global.in
===================================================================
RCS file: /cvsroot/pgsql/src/Makefile.global.in,v
retrieving revision 1.234
diff -c -r1.234 Makefile.global.in
*** src/Makefile.global.in	13 Apr 2007 18:50:01 -0000	1.234
--- src/Makefile.global.in	14 Apr 2007 19:23:57 -0000
***************
*** 153,158 ****
--- 153,159 ----
  with_tcl	= @with_tcl@
  with_openssl	= @with_openssl@
  with_libxml	= @with_libxml@
+ with_libxslt	= @with_libxslt@
  with_zlib	= @with_zlib@
  enable_shared	= @enable_shared@
  enable_rpath	= @enable_rpath@
Index: src/include/pg_config.h.in
===================================================================
RCS file: /cvsroot/pgsql/src/include/pg_config.h.in,v
retrieving revision 1.115
diff -c -r1.115 pg_config.h.in
*** src/include/pg_config.h.in	6 Apr 2007 05:36:50 -0000	1.115
--- src/include/pg_config.h.in	14 Apr 2007 19:23:59 -0000
***************
*** 256,261 ****
--- 256,264 ----
  /* Define to 1 if you have the `xml2' library (-lxml2). */
  #undef HAVE_LIBXML2
  
+ /* Define to 1 if you have the `xslt' library (-lxslt). */
+ #undef HAVE_LIBXSLT
+ 
  /* Define to 1 if you have the `z' library (-lz). */
  #undef HAVE_LIBZ
  
#17Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#16)
Re: build/install xml2 when configured with libxml

Andrew Dunstan wrote:

I don't think it should go away until we provide for equivalents in
core, at least optionally.

Well, if we're going to make libxslt an explicit thing, then it'd be
trivial to add an xslt transformation function into the core, and then
I think we can claim equivalent support. But we'll have to check the
details, of course.

I have been thinking, however, that I don't want to add more and more
library dependencies into the server. libxml2 was necessary to some
extent. But xslt functionality could easily be provided as a module.
This would be easy to do and might be useful even for 8.3. But I don't
really know how to label that. Having a contrib/xslt alongside
contrib/xml2 would probably be confusing. Ideas?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#18Nikolay Samokhvalov
samokhvalov@gmail.com
In reply to: Peter Eisentraut (#17)
Re: [PATCHES] build/install xml2 when configured with libxml

On 4/15/07, Peter Eisentraut <peter_e@gmx.net> wrote:

Well, if we're going to make libxslt an explicit thing, then it'd be
trivial to add an xslt transformation function into the core, and then
I think we can claim equivalent support. But we'll have to check the
details, of course.

I have been thinking, however, that I don't want to add more and more
library dependencies into the server. libxml2 was necessary to some
extent. But xslt functionality could easily be provided as a module.
This would be easy to do and might be useful even for 8.3. But I don't
really know how to label that. Having a contrib/xslt alongside
contrib/xml2 would probably be confusing. Ideas?

The current CVS' configure is really confusing: it has "--with-xslt"
option, while there is no XSLT support in the core. At least let's
change the option's comment to smth like "build with XSLT support (now
it is used for contrib/xml2 only)"...

--
Best regards,
Nikolay

#19Andrew Dunstan
andrew@dunslane.net
In reply to: Nikolay Samokhvalov (#18)
Re: [PATCHES] build/install xml2 when configured with libxml

Nikolay Samokhvalov wrote:

The current CVS' configure is really confusing: it has "--with-xslt"
option, while there is no XSLT support in the core. At least let's
change the option's comment to smth like "build with XSLT support (now
it is used for contrib/xml2 only)"...

contrib is a misnomer at best. When 8.3 branches I intend to propose
that we abandon it altogether, in line with some previous discussions.

We can change the configure help text if people think it matters that
much - which seems to me much more potentially useful than changing
comments.

cheers

andrew

#20Nikolay Samokhvalov
nikolay@samokhvalov.com
In reply to: Andrew Dunstan (#19)
Re: [PATCHES] build/install xml2 when configured with libxml

On 5/20/07, Andrew Dunstan <andrew@dunslane.net> wrote:

contrib is a misnomer at best. When 8.3 branches I intend to propose
that we abandon it altogether, in line with some previous discussions.

We can change the configure help text if people think it matters that
much - which seems to me much more potentially useful than changing
comments.

Actually, I meant configure help text, not any comment in the code :-)

--
Best regards,
Nikolay

#21Andrew Dunstan
andrew@dunslane.net
In reply to: Andrew Dunstan (#19)
Re: [PATCHES] build/install xml2 when configured with libxml

Andrew Dunstan wrote:

Nikolay Samokhvalov wrote:

The current CVS' configure is really confusing: it has "--with-xslt"
option, while there is no XSLT support in the core. At least let's
change the option's comment to smth like "build with XSLT support (now
it is used for contrib/xml2 only)"...

contrib is a misnomer at best. When 8.3 branches I intend to propose
that we abandon it altogether, in line with some previous discussions.

We can change the configure help text if people think it matters that
much - which seems to me much more potentially useful than changing
comments.

On further consideration I don't see the necessity for this. We don't
say this about lib-ossp-uuid although it too is only used for a contrib
module.

cheers

andrew

#22Nikolay Samokhvalov
nikolay@samokhvalov.com
In reply to: Andrew Dunstan (#21)
Re: [PATCHES] build/install xml2 when configured with libxml

On 6/2/07, Andrew Dunstan <andrew@dunslane.net> wrote:

On further consideration I don't see the necessity for this. We don't
say this about lib-ossp-uuid although it too is only used for a contrib
module.

And is it good? For that functionality I would also add comment
describing that this "--with..." relates to contib only. What we have
now is not absolutely correct situation when user could wrongly think
that (s)he will have capabilities, just adding "--with-...", but (s)he
won't.

--
Best regards,
Nikolay

#23Andrew Dunstan
andrew@dunslane.net
In reply to: Nikolay Samokhvalov (#22)
Re: [PATCHES] build/install xml2 when configured with libxml

Nikolay Samokhvalov wrote:

On 6/2/07, Andrew Dunstan <andrew@dunslane.net> wrote:

On further consideration I don't see the necessity for this. We don't
say this about lib-ossp-uuid although it too is only used for a contrib
module.

And is it good? For that functionality I would also add comment
describing that this "--with..." relates to contib only. What we have
now is not absolutely correct situation when user could wrongly think
that (s)he will have capabilities, just adding "--with-...", but (s)he
won't.

Sure she will, in contrib. You keep on wanting to treat contrib as not
part of Postgres. That's a mistake.

cheers

andrew