diff options
author | Tom Lane | 2008-05-08 16:49:48 +0000 |
---|---|---|
committer | Tom Lane | 2008-05-08 16:49:48 +0000 |
commit | 5d6795f33ac17dfc3ca2e812268ddb8d8fd89b33 (patch) | |
tree | 0b0a2629f34a83a4dc273f016bf45782286b2766 | |
parent | 139ceb78b6d5952ab2089d9373d80738cdbc5051 (diff) |
Fix contrib/xml2 makefile to not override CFLAGS, and in passing make it
auto-configure properly for libxslt present or not.
-rw-r--r-- | contrib/Makefile | 2 | ||||
-rw-r--r-- | contrib/xml2/Makefile | 8 | ||||
-rw-r--r-- | contrib/xml2/xslt_proc.c | 2 | ||||
-rw-r--r-- | doc/src/sgml/xml2.sgml | 4 |
4 files changed, 4 insertions, 12 deletions
diff --git a/contrib/Makefile b/contrib/Makefile index be72cecb12..cccdd5d237 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -46,10 +46,8 @@ WANTED_DIRS += uuid-ossp endif ifeq ($(with_libxml),yes) -ifeq ($(with_libxslt),yes) WANTED_DIRS += xml2 endif -endif # Missing: # start-scripts \ (does not have a makefile) diff --git a/contrib/xml2/Makefile b/contrib/xml2/Makefile index 3c7eef8b20..ea8636ad4c 100644 --- a/contrib/xml2/Makefile +++ b/contrib/xml2/Makefile @@ -2,17 +2,13 @@ MODULE_big = pgxml -# Remove xslt_proc.o from the following line if you don't have libxslt -OBJS = xpath.o xslt_proc.o +OBJS = $(if $(filter -lxslt, $(LIBS)), xpath.o xslt_proc.o, xpath.o) -# Remove -lxslt from the following line if you don't have libxslt. -SHLIB_LINK = -lxslt -lxml2 +SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS)) DATA_built = pgxml.sql DATA = uninstall_pgxml.sql -override CFLAGS += $(shell xml2-config --cflags) - ifdef USE_PGXS PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c index f498192426..b2349aaace 100644 --- a/contrib/xml2/xslt_proc.c +++ b/contrib/xml2/xslt_proc.c @@ -119,7 +119,7 @@ xslt_process(PG_FUNCTION_ARGS) if (resstat < 0) PG_RETURN_NULL(); - PG_RETURN_TEXT_P(cstring_to_text_with_len(resstr, reslen)); + PG_RETURN_TEXT_P(cstring_to_text_with_len((char *) resstr, reslen)); } diff --git a/doc/src/sgml/xml2.sgml b/doc/src/sgml/xml2.sgml index 3f200802c7..e1641e8815 100644 --- a/doc/src/sgml/xml2.sgml +++ b/doc/src/sgml/xml2.sgml @@ -374,9 +374,7 @@ WHERE t.author_id = p.person_id; <title>XSLT functions</title> <para> - The following functions are available if libxslt is installed (this is - not currently detected automatically, so you will have to amend the - Makefile): + The following functions are available if libxslt is installed: </para> <sect3> |