blob: 84cd5c15791027780098d45b69f7da4330526795 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From d3ee8c8df5808b63e86f40831f2ba62cbb33d291 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 8 Aug 2018 09:18:27 +0800
4Subject: [PATCH] postgresql: Use pkg-config for libxml2 detection.
Brad Bishop316dfdd2018-06-25 12:45:53 -04005
6Upstream-Status: Inappropriate [configuration]
7
8xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS.
9
10Signed-off-by: Philip Balister <philip@balister.org>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011
Brad Bishop2f973922019-11-11 07:58:48 -050012update to version 10.4
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013Signed-off-by: Changqing Li <changqing.li@windriver.com>
Brad Bishop2f973922019-11-11 07:58:48 -050014
15Update for version 12.0
16Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -040017---
Brad Bishop2f973922019-11-11 07:58:48 -050018 configure.in | 16 ++--------------
19 1 file changed, 2 insertions(+), 14 deletions(-)
Brad Bishop316dfdd2018-06-25 12:45:53 -040020
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021diff --git a/configure.in b/configure.in
Brad Bishop2f973922019-11-11 07:58:48 -050022index 6942f81..7fd3e78 100644
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023--- a/configure.in
24+++ b/configure.in
Brad Bishop2f973922019-11-11 07:58:48 -050025@@ -923,20 +923,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
Brad Bishop316dfdd2018-06-25 12:45:53 -040026 [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])])
27
28 if test "$with_libxml" = yes ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029- PGAC_PATH_PROGS(XML2_CONFIG, xml2-config)
Brad Bishop2f973922019-11-11 07:58:48 -050030- AC_ARG_VAR(XML2_CONFIG, [path to xml2-config utility])dnl
Brad Bishop316dfdd2018-06-25 12:45:53 -040031- if test -n "$XML2_CONFIG"; then
32- for pgac_option in `$XML2_CONFIG --cflags`; do
33- case $pgac_option in
34- -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
35- esac
36- done
37- for pgac_option in `$XML2_CONFIG --libs`; do
38- case $pgac_option in
39- -L*) LDFLAGS="$LDFLAGS $pgac_option";;
40- esac
41- done
42- fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043+ CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`"
44+ LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS"
Brad Bishop316dfdd2018-06-25 12:45:53 -040045 fi
46
47 AC_SUBST(with_libxml)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080048--
492.7.4
50