[postgis-tickets] r15230 - Make OSX 10.12 libxml handler invisible to other platforms and less scary for othres
Paul Ramsey
pramsey at cleverelephant.ca
Tue Nov 15 14:53:55 PST 2016
Author: pramsey
Date: 2016-11-15 14:53:54 -0800 (Tue, 15 Nov 2016)
New Revision: 15230
Modified:
trunk/configure.ac
Log:
Make OSX 10.12 libxml handler invisible to other platforms and less scary for othres
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2016-11-13 13:53:31 UTC (rev 15229)
+++ trunk/configure.ac 2016-11-15 22:53:54 UTC (rev 15230)
@@ -570,20 +570,30 @@
XML2_LDFLAGS=`$XML2CONFIG --libs`
XML2_CPPFLAGS=`$XML2CONFIG --cflags`
-AC_PATH_PROG([XCRUN], [xcrun])
-if test "x$XCRUN" = "x"; then
- AC_MSG_RESULT([OSX XCode is OK])
-else
- XCODE_VER=`$XCRUN --show-sdk-version`
- if test $XCODE_VER = "10.12"; then
- AC_MSG_RESULT([OSX XCode 10.12 is Not OK... hacking])
- XML2_LDFLAGS=`$XML2CONFIG --exec-prefix=/usr --libs`
- else
- AC_MSG_RESULT([OSX XCode is OK])
- fi
-fi
+dnl
+dnl XCode in 10.12 supplies bad flags in xml2config resulting
+dnl in compile errors. For that one version, we force the prefix
+dnl to match where we know the libraries reside
+dnl
+case $host_os in
+ darwin*)
+ AC_PATH_PROG([XCRUN], [xcrun])
+ if test "x$XCRUN" = "x"; then
+ AC_MSG_RESULT([using OSX XCode... yes])
+ else
+ XCODE_VER=`$XCRUN --show-sdk-version`
+ if test $XCODE_VER = "10.12"; then
+ AC_MSG_RESULT([applying OSX XCode 10.12 libxml special case... yes])
+ XML2_LDFLAGS=`$XML2CONFIG --exec-prefix=/usr --libs`
+ else
+ AC_MSG_RESULT([using OSX XCode $XCODE_VER... yes])
+ fi
+ fi
+ ;;
+esac
+
dnl Extract the version
POSTGIS_LIBXML2_VERSION=`$XML2CONFIG --version`
More information about the postgis-tickets
mailing list