Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | From d3ee8c8df5808b63e86f40831f2ba62cbb33d291 Mon Sep 17 00:00:00 2001 |
| 2 | From: Changqing Li <changqing.li@windriver.com> |
| 3 | Date: Wed, 8 Aug 2018 09:18:27 +0800 |
| 4 | Subject: [PATCH] postgresql: Use pkg-config for libxml2 detection. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 5 | |
| 6 | Upstream-Status: Inappropriate [configuration] |
| 7 | |
| 8 | xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS. |
| 9 | |
| 10 | Signed-off-by: Philip Balister <philip@balister.org> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 11 | |
| 12 | upate to version 10.4 |
| 13 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | --- |
| 15 | configure.in | 15 ++------------- |
| 16 | 1 file changed, 2 insertions(+), 13 deletions(-) |
| 17 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 18 | diff --git a/configure.in b/configure.in |
| 19 | index 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 23 | [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])]) |
| 24 | |
| 25 | if test "$with_libxml" = yes ; then |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 26 | - PGAC_PATH_PROGS(XML2_CONFIG, xml2-config) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 27 | - 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 39 | + 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 41 | fi |
| 42 | |
| 43 | AC_SUBST(with_libxml) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 44 | -- |
| 45 | 2.7.4 |
| 46 | |