summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Makefile4
-rw-r--r--contrib/xml2/Makefile10
-rw-r--r--contrib/xml2/xslt_proc.c2
3 files changed, 5 insertions, 11 deletions
diff --git a/contrib/Makefile b/contrib/Makefile
index c55c95ccf0..b9453dad7e 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/contrib/Makefile,v 1.82 2007/11/13 21:04:45 tgl Exp $
+# $PostgreSQL: pgsql/contrib/Makefile,v 1.83 2008/05/08 16:49:36 tgl Exp $
subdir = contrib
top_builddir = ..
@@ -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 0f9c51b116..b96defa5d6 100644
--- a/contrib/xml2/Makefile
+++ b/contrib/xml2/Makefile
@@ -1,18 +1,14 @@
-# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.11 2007/11/10 23:59:52 momjian Exp $
+# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.12 2008/05/08 16:49:37 tgl Exp $
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));
}