[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 1e1e6f0c1bda1b764df07e22cb2f674d5e68b2ab
git at osgeo.org
git at osgeo.org
Fri Jan 24 07:40:19 PST 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, stable-3.0 has been updated
via 1e1e6f0c1bda1b764df07e22cb2f674d5e68b2ab (commit)
from 54814344ab353f07e47f9d34f5498ca860ba9ab6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1e1e6f0c1bda1b764df07e22cb2f674d5e68b2ab
Author: Raúl Marín <git at rmr.ninja>
Date: Fri Jan 24 16:24:40 2020 +0100
Support pkg-config for libxml2
Patch by Bas Couwenberg
References #4626
diff --git a/NEWS b/NEWS
index cdf854e..4fc1fd1 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ XXXX/XX/XX
a trailing quote (Bill Mill)
- #4608, PG12: Fix several bugs in the index support function (Raúl Marín)
- #4621, Prevent stack overflow when parsing WKB (Raúl Marín)
+ - #4626, Support pkg-config for libxml2 (Bas Couwenberg)
PostGIS 3.0.0
2019/10/20
diff --git a/configure.ac b/configure.ac
index 78ac17e..14ad919 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,6 +308,16 @@ fi
AC_SUBST([MATHML2_DTD])
dnl ===========================================================================
+dnl Detect if pkg-config installed
+dnl ===========================================================================
+# check for pkg-config
+PKG_PROG_PKG_CONFIG
+if test -z "$PKG_CONFIG"; then
+ AC_MSG_WARN([Cannot find pkg-config, make sure it is installed in your PATH])
+fi
+
+
+dnl ===========================================================================
dnl Detect CUnit if it is installed (used for unit testing)
dnl
dnl Note that we pass any specified CPPFLAGS and LDFLAGS into the Makefile
@@ -584,13 +594,31 @@ AC_ARG_WITH([xml2config],
[AS_HELP_STRING([--with-xml2config=FILE], [specify an alternative xml2-config file])],
[XML2CONFIG="$withval"], [XML2CONFIG=""])
+XML2_LDFLAGS=""
+XML2_CPPFLAGS=""
+
if test "x$XML2CONFIG" = "x"; then
dnl XML2CONFIG was not specified, so search within the current path
AC_PATH_PROG([XML2CONFIG], [xml2-config])
- dnl If we couldn't find xml2-config, display a warning
+ dnl If we couldn't find xml2-config, display a warning if pkg-config fails too
if test "x$XML2CONFIG" = "x"; then
- AC_MSG_ERROR([could not find xml2-config from libxml2 within the current path. You may need to try re-running configure with a --with-xml2config parameter.])
+ if test ! -z "$PKG_CONFIG"; then
+ PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [
+ XML2_CPPFLAGS="$LIBXML2_CFLAGS"
+ XML2_LDFLAGS="$LIBXML2_LIBS"
+ POSTGIS_LIBXML2_VERSION=`$PKG_CONFIG libxml-2.0 --modversion`
+ ], [])
+ else
+ AC_MSG_ERROR([could not find xml2-config from libxml2 within the current path. You may need to try re-running configure with a --with-xml2config parameter.])
+ fi
+ else
+ dnl Extract the linker and include flags
+ XML2_LDFLAGS=`$XML2CONFIG --libs`
+ XML2_CPPFLAGS=`$XML2CONFIG --cflags`
+
+ dnl Extract the version
+ POSTGIS_LIBXML2_VERSION=`$XML2CONFIG --version`
fi
else
dnl XML2CONFIG was specified; display a message to the user
@@ -599,6 +627,13 @@ else
else
if test -f $XML2CONFIG; then
AC_MSG_RESULT([Using user-specified xml2-config file: $XML2CONFIG])
+
+ dnl Extract the linker and include flags
+ XML2_LDFLAGS=`$XML2CONFIG --libs`
+ XML2_CPPFLAGS=`$XML2CONFIG --cflags`
+
+ dnl Extract the version
+ POSTGIS_LIBXML2_VERSION=`$XML2CONFIG --version`
else
AC_MSG_ERROR([the user-specified xml2-config file $XML2CONFIG does not exist])
fi
@@ -606,11 +641,6 @@ else
fi
-dnl Extract the linker and include flags
-XML2_LDFLAGS=`$XML2CONFIG --libs`
-XML2_CPPFLAGS=`$XML2CONFIG --cflags`
-
-
dnl
dnl XCode in 10.12 supplies bad flags in xml2config resulting
dnl in compile errors. For that one version, we force the prefix
@@ -633,10 +663,6 @@ case $host_os in
;;
esac
-
-dnl Extract the version
-POSTGIS_LIBXML2_VERSION=`$XML2CONFIG --version`
-
dnl Check headers file
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$XML2_CPPFLAGS"
@@ -825,16 +851,6 @@ CFLAGS="$CFLAGS_SAVE"
dnl ===========================================================================
-dnl Detect if pkg-config installed
-dnl ===========================================================================
-# check for pkg-config
-PKG_PROG_PKG_CONFIG
-if test -z "$PKG_CONFIG"; then
- AC_MSG_WARN([Cannot find pkg-config, make sure it is installed in your PATH])
-fi
-
-
-dnl ===========================================================================
dnl Detect the version of PROJ.4 installed
dnl ===========================================================================
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
configure.ac | 58 +++++++++++++++++++++++++++++++++++++---------------------
2 files changed, 38 insertions(+), 21 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list