From 80bb6a71efc4a34d2d1c1c1f6a07b5ef73652474 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Tue, 28 Feb 2012 18:50:18 +0000 Subject: [PATCH] Make our --prefix policy crystal clear git-svn-id: http://svn.osgeo.org/postgis/trunk@9333 b70326c6-7e19-0410-871a-916f4a2858ee --- configure.ac | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/configure.ac b/configure.ac index b37bf745d..3789b41f3 100644 --- a/configure.ac +++ b/configure.ac @@ -360,6 +360,10 @@ PGSQL_MINOR_VERSION=`$PGCONFIG --version | sed 's/[[A-Za-z ]]*//' | cut -d. -f2 PGSQL_FULL_VERSION=`$PGCONFIG --version` POSTGIS_PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION" +PGSQL_PKGLIBDIR=`$PGCONFIG --pkglibdir` +PGSQL_LIBDIR=`$PGCONFIG --libdir` +PGSQL_SHAREDIR=`$PGCONFIG --sharedir` + AC_MSG_RESULT([checking PostgreSQL version... $PGSQL_FULL_VERSION]) dnl Ensure that we are using PostgreSQL >= 8.3 if test ! "$PGSQL_MAJOR_VERSION" -ge 8; then @@ -442,6 +446,26 @@ AC_DEFINE_UNQUOTED([POSTGIS_PGSQL_VERSION], [$POSTGIS_PGSQL_VERSION], [PostgreSQ AC_SUBST([POSTGIS_PGSQL_VERSION]) +dnl =========================================================================== +dnl Explain our prefix policy if necessary. +dnl =========================================================================== + +if test "$prefix" != "NONE"; then + AC_MSG_RESULT([----------------------------------------------------------------------]) + AC_MSG_RESULT([ You have set the --prefix to '$prefix'. Unfortunately the PostGIS ]) + AC_MSG_RESULT([ build system can only install into the directories used by the ]) + AC_MSG_RESULT([ PostgreSQL build you are compiling against, the one that supplied ]) + AC_MSG_RESULT([ the pg_config we detected: $PGCONFIG ]) + AC_MSG_RESULT([ Based on that script we will be installing: ]) + AC_MSG_RESULT([ * postgis shared library in $PGSQL_LIBDIR ]) + AC_MSG_RESULT([ * postgis SQL files in $PGSQL_SHAREDIR/contrib/postgis-$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION ]) + AC_MSG_RESULT([ * postgis executables in $PGSQL_BINDIR ]) + AC_MSG_RESULT([ Please try again without a --prefix, sorry. ]) + AC_MSG_RESULT([----------------------------------------------------------------------]) + AC_MSG_ERROR([]) +fi + + dnl =========================================================================== dnl Detect libxml2 if it is installed dnl (needed to GeomFromGML and GeomFromKML functions) -- 2.40.0