Skip to content

Commit eb915ca

Browse files
committed
Fix contrib/xml2 makefile to not override CFLAGS, and in passing make it
auto-configure properly for libxslt present or not.
1 parent abb78b1 commit eb915ca

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

contrib/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/Makefile,v 1.82 2007/11/13 21:04:45 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/Makefile,v 1.83 2008/05/08 16:49:36 tgl Exp $
22

33
subdir = contrib
44
top_builddir = ..
@@ -46,10 +46,8 @@ WANTED_DIRS += uuid-ossp
4646
endif
4747

4848
ifeq ($(with_libxml),yes)
49-
ifeq ($(with_libxslt),yes)
5049
WANTED_DIRS += xml2
5150
endif
52-
endif
5351

5452
# Missing:
5553
# start-scripts \ (does not have a makefile)

contrib/xml2/Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.11 2007/11/10 23:59:52 momjian Exp $
1+
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.12 2008/05/08 16:49:37 tgl Exp $
22

33
MODULE_big = pgxml
44

5-
# Remove xslt_proc.o from the following line if you don't have libxslt
6-
OBJS = xpath.o xslt_proc.o
5+
OBJS = $(if $(filter -lxslt, $(LIBS)), xpath.o xslt_proc.o, xpath.o)
76

8-
# Remove -lxslt from the following line if you don't have libxslt.
9-
SHLIB_LINK = -lxslt -lxml2
7+
SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS))
108

119
DATA_built = pgxml.sql
1210
DATA = uninstall_pgxml.sql
1311

14-
override CFLAGS += $(shell xml2-config --cflags)
15-
1612
ifdef USE_PGXS
1713
PG_CONFIG = pg_config
1814
PGXS := $(shell $(PG_CONFIG) --pgxs)

contrib/xml2/xslt_proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ xslt_process(PG_FUNCTION_ARGS)
119119
if (resstat < 0)
120120
PG_RETURN_NULL();
121121

122-
PG_RETURN_TEXT_P(cstring_to_text_with_len(resstr, reslen));
122+
PG_RETURN_TEXT_P(cstring_to_text_with_len((char *) resstr, reslen));
123123
}
124124

125125

doc/src/sgml/xml2.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/xml2.sgml,v 1.4 2007/12/06 04:12:10 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/xml2.sgml,v 1.5 2008/05/08 16:49:37 tgl Exp $ -->
22

33
<sect1 id="xml2">
44
<title>xml2</title>
@@ -374,9 +374,7 @@ WHERE t.author_id = p.person_id;
374374
<title>XSLT functions</title>
375375

376376
<para>
377-
The following functions are available if libxslt is installed (this is
378-
not currently detected automatically, so you will have to amend the
379-
Makefile):
377+
The following functions are available if libxslt is installed:
380378
</para>
381379

382380
<sect3>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy