Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf97d4a2

Browse files
committed
Add --with-libxslt configure option
1 parent6041b92 commitf97d4a2

File tree

5 files changed

+302
-5
lines changed

5 files changed

+302
-5
lines changed

‎configure

Lines changed: 271 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ ac_includes_default="\
314314
# include <unistd.h>
315315
#endif"
316316

317-
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'
317+
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'
318318
ac_subst_files=''
319319

320320
# Initialize some variables set by options.
@@ -896,6 +896,7 @@ Optional Packages:
896896
--without-readline do not use GNU Readline nor BSD Libedit for editing
897897
--with-libedit-preferred prefer BSD Libedit over GNU Readline
898898
--with-libxml build with XML support
899+
--with-libxslt build with XSLT support
899900
--without-zlib do not use Zlib
900901
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
901902

@@ -4332,6 +4333,44 @@ fi
43324333

43334334

43344335

4336+
#
4337+
# XSLT
4338+
#
4339+
4340+
pgac_args="$pgac_args with_libxslt"
4341+
4342+
4343+
# Check whether --with-libxslt or --without-libxslt was given.
4344+
if test "${with_libxslt+set}" = set; then
4345+
withval="$with_libxslt"
4346+
4347+
case $withval in
4348+
yes)
4349+
4350+
cat >>confdefs.h <<\_ACEOF
4351+
#define USE_LIBXSLT 1
4352+
_ACEOF
4353+
4354+
;;
4355+
no)
4356+
:
4357+
;;
4358+
*)
4359+
{ { echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
4360+
echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
4361+
{ (exit 1); exit 1; }; }
4362+
;;
4363+
esac
4364+
4365+
else
4366+
with_libxslt=no
4367+
4368+
fi;
4369+
4370+
4371+
4372+
4373+
43354374
#
43364375
# Zlib
43374376
#
@@ -7521,6 +7560,87 @@ fi
75217560

75227561
fi
75237562

7563+
if test "$with_libxslt" = yes ; then
7564+
7565+
echo "$as_me:$LINENO: checking for xsltLibxmlVersion in -lxslt" >&5
7566+
echo $ECHO_N "checking for xsltLibxmlVersion in -lxslt... $ECHO_C" >&6
7567+
if test "${ac_cv_lib_xslt_xsltLibxmlVersion+set}" = set; then
7568+
echo $ECHO_N "(cached) $ECHO_C" >&6
7569+
else
7570+
ac_check_lib_save_LIBS=$LIBS
7571+
LIBS="-lxslt $LIBS"
7572+
cat >conftest.$ac_ext <<_ACEOF
7573+
/* confdefs.h. */
7574+
_ACEOF
7575+
cat confdefs.h >>conftest.$ac_ext
7576+
cat >>conftest.$ac_ext <<_ACEOF
7577+
/* end confdefs.h. */
7578+
7579+
/* Override any gcc2 internal prototype to avoid an error. */
7580+
#ifdef __cplusplus
7581+
extern "C"
7582+
#endif
7583+
/* We use char because int might match the return type of a gcc2
7584+
builtin and then its argument prototype would still apply. */
7585+
char xsltLibxmlVersion ();
7586+
int
7587+
main ()
7588+
{
7589+
xsltLibxmlVersion ();
7590+
;
7591+
return 0;
7592+
}
7593+
_ACEOF
7594+
rm -f conftest.$ac_objext conftest$ac_exeext
7595+
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7596+
(eval $ac_link) 2>conftest.er1
7597+
ac_status=$?
7598+
grep -v '^ *+' conftest.er1 >conftest.err
7599+
rm -f conftest.er1
7600+
cat conftest.err >&5
7601+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7602+
(exit $ac_status); } &&
7603+
{ ac_try='test -z "$ac_c_werror_flag"
7604+
|| test ! -s conftest.err'
7605+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7606+
(eval $ac_try) 2>&5
7607+
ac_status=$?
7608+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7609+
(exit $ac_status); }; } &&
7610+
{ ac_try='test -s conftest$ac_exeext'
7611+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7612+
(eval $ac_try) 2>&5
7613+
ac_status=$?
7614+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7615+
(exit $ac_status); }; }; then
7616+
ac_cv_lib_xslt_xsltLibxmlVersion=yes
7617+
else
7618+
echo "$as_me: failed program was:" >&5
7619+
sed 's/^/| /' conftest.$ac_ext >&5
7620+
7621+
ac_cv_lib_xslt_xsltLibxmlVersion=no
7622+
fi
7623+
rm -f conftest.err conftest.$ac_objext \
7624+
conftest$ac_exeext conftest.$ac_ext
7625+
LIBS=$ac_check_lib_save_LIBS
7626+
fi
7627+
echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltLibxmlVersion" >&5
7628+
echo "${ECHO_T}$ac_cv_lib_xslt_xsltLibxmlVersion" >&6
7629+
if test $ac_cv_lib_xslt_xsltLibxmlVersion = yes; then
7630+
cat >>confdefs.h <<_ACEOF
7631+
#define HAVE_LIBXSLT 1
7632+
_ACEOF
7633+
7634+
LIBS="-lxslt $LIBS"
7635+
7636+
else
7637+
{ { echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
7638+
echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
7639+
{ (exit 1); exit 1; }; }
7640+
fi
7641+
7642+
fi
7643+
75247644

75257645
##
75267646
## Header files
@@ -10760,6 +10880,155 @@ echo "$as_me: error: header file <libxml/parser.h> is required for XML support"
1076010880
fi
1076110881

1076210882

10883+
fi
10884+
10885+
if test "$with_libxslt" = yes ; then
10886+
if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
10887+
echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
10888+
echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6
10889+
if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
10890+
echo $ECHO_N "(cached) $ECHO_C" >&6
10891+
fi
10892+
echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
10893+
echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6
10894+
else
10895+
# Is the header compilable?
10896+
echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
10897+
echo $ECHO_N "checking libxslt/xslt.h usability... $ECHO_C" >&6
10898+
cat >conftest.$ac_ext <<_ACEOF
10899+
/* confdefs.h. */
10900+
_ACEOF
10901+
cat confdefs.h >>conftest.$ac_ext
10902+
cat >>conftest.$ac_ext <<_ACEOF
10903+
/* end confdefs.h. */
10904+
$ac_includes_default
10905+
#include <libxslt/xslt.h>
10906+
_ACEOF
10907+
rm -f conftest.$ac_objext
10908+
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10909+
(eval $ac_compile) 2>conftest.er1
10910+
ac_status=$?
10911+
grep -v '^ *+' conftest.er1 >conftest.err
10912+
rm -f conftest.er1
10913+
cat conftest.err >&5
10914+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
10915+
(exit $ac_status); } &&
10916+
{ ac_try='test -z "$ac_c_werror_flag"
10917+
|| test ! -s conftest.err'
10918+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10919+
(eval $ac_try) 2>&5
10920+
ac_status=$?
10921+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
10922+
(exit $ac_status); }; } &&
10923+
{ ac_try='test -s conftest.$ac_objext'
10924+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10925+
(eval $ac_try) 2>&5
10926+
ac_status=$?
10927+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
10928+
(exit $ac_status); }; }; then
10929+
ac_header_compiler=yes
10930+
else
10931+
echo "$as_me: failed program was:" >&5
10932+
sed 's/^/| /' conftest.$ac_ext >&5
10933+
10934+
ac_header_compiler=no
10935+
fi
10936+
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10937+
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10938+
echo "${ECHO_T}$ac_header_compiler" >&6
10939+
10940+
# Is the header present?
10941+
echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
10942+
echo $ECHO_N "checking libxslt/xslt.h presence... $ECHO_C" >&6
10943+
cat >conftest.$ac_ext <<_ACEOF
10944+
/* confdefs.h. */
10945+
_ACEOF
10946+
cat confdefs.h >>conftest.$ac_ext
10947+
cat >>conftest.$ac_ext <<_ACEOF
10948+
/* end confdefs.h. */
10949+
#include <libxslt/xslt.h>
10950+
_ACEOF
10951+
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10952+
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10953+
ac_status=$?
10954+
grep -v '^ *+' conftest.er1 >conftest.err
10955+
rm -f conftest.er1
10956+
cat conftest.err >&5
10957+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
10958+
(exit $ac_status); } >/dev/null; then
10959+
if test -s conftest.err; then
10960+
ac_cpp_err=$ac_c_preproc_warn_flag
10961+
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10962+
else
10963+
ac_cpp_err=
10964+
fi
10965+
else
10966+
ac_cpp_err=yes
10967+
fi
10968+
if test -z "$ac_cpp_err"; then
10969+
ac_header_preproc=yes
10970+
else
10971+
echo "$as_me: failed program was:" >&5
10972+
sed 's/^/| /' conftest.$ac_ext >&5
10973+
10974+
ac_header_preproc=no
10975+
fi
10976+
rm -f conftest.err conftest.$ac_ext
10977+
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10978+
echo "${ECHO_T}$ac_header_preproc" >&6
10979+
10980+
# So? What about this header?
10981+
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10982+
yes:no: )
10983+
{ echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
10984+
echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10985+
{ echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
10986+
echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
10987+
ac_header_preproc=yes
10988+
;;
10989+
no:yes:* )
10990+
{ echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
10991+
echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
10992+
{ echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: check for missing prerequisite headers?" >&5
10993+
echo "$as_me: WARNING: libxslt/xslt.h: check for missing prerequisite headers?" >&2;}
10994+
{ echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
10995+
echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
10996+
{ echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: section \"Present But Cannot Be Compiled\"" >&5
10997+
echo "$as_me: WARNING: libxslt/xslt.h: section \"Present But Cannot Be Compiled\"" >&2;}
10998+
{ echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
10999+
echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
11000+
{ echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
11001+
echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
11002+
(
11003+
cat <<\_ASBOX
11004+
## ---------------------------------------- ##
11005+
## Report this to pgsql-bugs@postgresql.org ##
11006+
## ---------------------------------------- ##
11007+
_ASBOX
11008+
) |
11009+
sed "s/^/$as_me: WARNING: /" >&2
11010+
;;
11011+
esac
11012+
echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
11013+
echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6
11014+
if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
11015+
echo $ECHO_N "(cached) $ECHO_C" >&6
11016+
else
11017+
ac_cv_header_libxslt_xslt_h=$ac_header_preproc
11018+
fi
11019+
echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
11020+
echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6
11021+
11022+
fi
11023+
if test $ac_cv_header_libxslt_xslt_h = yes; then
11024+
:
11025+
else
11026+
{ { echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
11027+
echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
11028+
{ (exit 1); exit 1; }; }
11029+
fi
11030+
11031+
1076311032
fi
1076411033

1076511034
if test "$with_ldap" = yes ; then
@@ -24322,6 +24591,7 @@ s,@with_bonjour@,$with_bonjour,;t t
2432224591
s,@with_openssl@,$with_openssl,;t t
2432324592
s,@XML2_CONFIG@,$XML2_CONFIG,;t t
2432424593
s,@with_libxml@,$with_libxml,;t t
24594+
s,@with_libxslt@,$with_libxslt,;t t
2432524595
s,@with_zlib@,$with_zlib,;t t
2432624596
s,@EGREP@,$EGREP,;t t
2432724597
s,@ELF_SYS@,$ELF_SYS,;t t

‎configure.in

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.510 2007/04/13 18:50:01 adunstan Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.511 2007/04/15 12:48:23 adunstan Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -579,6 +579,15 @@ fi
579579

580580
AC_SUBST(with_libxml)
581581

582+
#
583+
# XSLT
584+
#
585+
PGAC_ARG_BOOL(with, libxslt, no, [ --with-libxslt build with XSLT support],
586+
[AC_DEFINE([USE_LIBXSLT], 1, [Define to 1 to build with XSLT support. (--with-libxslt)])])
587+
588+
589+
AC_SUBST(with_libxslt)
590+
582591
#
583592
# Zlib
584593
#
@@ -768,6 +777,10 @@ if test "$with_libxml" = yes ; then
768777
AC_CHECK_LIB(xml2, xmlSaveToBuffer, [], [AC_MSG_ERROR([library 'xml2' (version >= 2.6.23) is required for XML support])])
769778
fi
770779

780+
if test "$with_libxslt" = yes ; then
781+
AC_CHECK_LIB(xslt, xsltLibxmlVersion, [], [AC_MSG_ERROR([library 'xslt' is required for XSLT support])])
782+
fi
783+
771784

772785
##
773786
## Header files
@@ -847,6 +860,10 @@ if test "$with_libxml" = yes ; then
847860
AC_CHECK_HEADER(libxml/parser.h, [], [AC_MSG_ERROR([header file <libxml/parser.h> is required for XML support])])
848861
fi
849862

863+
if test "$with_libxslt" = yes ; then
864+
AC_CHECK_HEADER(libxslt/xslt.h, [], [AC_MSG_ERROR([header file <libxslt/xslt.h> is required for XSLT support])])
865+
fi
866+
850867
if test "$with_ldap" = yes ; then
851868
if test "$PORTNAME" != "win32"; then
852869
AC_CHECK_HEADERS(ldap.h, [],

‎contrib/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/Makefile,v 1.73 2007/04/14 12:57:07 adunstan Exp $
1+
# $PostgreSQL: pgsql/contrib/Makefile,v 1.74 2007/04/15 12:48:23 adunstan Exp $
22

33
subdir = contrib
44
top_builddir = ..
@@ -37,9 +37,15 @@ ifeq ($(with_openssl),yes)
3737
WANTED_DIRS += sslinfo
3838
endif
3939

40+
ifeq ($(with_libxml),yes)
41+
ifeq ($(with_libxslt),yes)
42+
WANTED_DIRS += xml2
43+
endif
44+
endif
45+
4046
# Missing:
4147
#start-scripts\ (does not have a makefile)
42-
#xml2\ (requires libxml and libxslt installed)
48+
4349

4450
allinstallinstalldirsuninstalldistprepcleandistcleanmaintainer-clean:
4551
@for dirin$(WANTED_DIRS);do\

‎src/Makefile.global.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.234 2007/04/13 18:50:01 adunstan Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.235 2007/04/15 12:48:23 adunstan Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -153,6 +153,7 @@ with_python= @with_python@
153153
with_tcl= @with_tcl@
154154
with_openssl= @with_openssl@
155155
with_libxml= @with_libxml@
156+
with_libxslt= @with_libxslt@
156157
with_zlib= @with_zlib@
157158
enable_shared= @enable_shared@
158159
enable_rpath= @enable_rpath@

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp