blob: f14da06d9166a300a670cd3202e17a19107bd208 [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
12upate to version 10.4
13Signed-off-by: Changqing Li <changqing.li@windriver.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -040014---
15 configure.in | 15 ++-------------
16 1 file changed, 2 insertions(+), 13 deletions(-)
17
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018diff --git a/configure.in b/configure.in
19index d9fe56e..3e2cd3a 100644
20--- a/configure.in
21+++ b/configure.in
22@@ -816,19 +816,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
Brad Bishop316dfdd2018-06-25 12:45:53 -040023 [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])])
24
25 if test "$with_libxml" = yes ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026- PGAC_PATH_PROGS(XML2_CONFIG, xml2-config)
Brad Bishop316dfdd2018-06-25 12:45:53 -040027- if test -n "$XML2_CONFIG"; then
28- for pgac_option in `$XML2_CONFIG --cflags`; do
29- case $pgac_option in
30- -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
31- esac
32- done
33- for pgac_option in `$XML2_CONFIG --libs`; do
34- case $pgac_option in
35- -L*) LDFLAGS="$LDFLAGS $pgac_option";;
36- esac
37- done
38- fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080039+ CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`"
40+ LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS"
Brad Bishop316dfdd2018-06-25 12:45:53 -040041 fi
42
43 AC_SUBST(with_libxml)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044--
452.7.4
46