[postgis-tickets] [SCM] PostGIS branch stable-2.5 updated. e1fab358ba85540100ddb22f48df59daaa46da9d
git at osgeo.org
git at osgeo.org
Fri Jan 24 07:43:09 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-2.5 has been updated
via e1fab358ba85540100ddb22f48df59daaa46da9d (commit)
from affe90f899be574db12502164b10a60fc01b40da (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 e1fab358ba85540100ddb22f48df59daaa46da9d
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
Closes #4626
diff --git a/NEWS b/NEWS
index f5b6302..c2e4a2a 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,7 @@ PostGIS 2.5.4
- #4599, ST_AddPoint: Accept -1 as a valid position (Raúl Marín)
- #4605, Fix postgis_upgrade.pl with PostgreSQL 12 (Matti Linnanvuori)
- #4621, Prevent stack overflow when parsing WKB (Raúl Marín)
+ - #4626, Support pkg-config for libxml2 (Bas Couwenberg)
PostGIS 2.5.3
diff --git a/configure.ac b/configure.ac
index fbd5e08..915030a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -300,6 +300,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
@@ -570,13 +580,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
@@ -585,6 +613,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
@@ -592,11 +627,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
@@ -619,10 +649,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"
@@ -924,15 +950,6 @@ AC_SUBST([HAVE_JSON])
fi
-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 if protobuf-c installed
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
configure.ac | 57 +++++++++++++++++++++++++++++++++++++--------------------
2 files changed, 38 insertions(+), 20 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list