1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Fix contrib/xml2 makefile to not override CFLAGS, and in passing make it

auto-configure properly for libxslt present or not.
This commit is contained in:
Tom Lane
2008-05-08 16:49:37 +00:00
parent abb78b1b5f
commit eb915caf92
4 changed files with 7 additions and 15 deletions

View File

@ -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)

View File

@ -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));
}