--- /dev/null
+#---------------------------------------------------------------
+# Configuration Directives
+#---------------------------------------------------------------
+
+#
+# We recommend that you install the Proj4 and GEOS libraries
+# referenced below to get the most use out of your PostGIS
+# database.
+
+#
+# Set USE_PROJ to 1 for Proj4 reprojection support (recommended)
+#
+# Reprojection allows you to transform coordinate systems
+# in the database with the Transform() function.
+#
+# Download from: http://www.remotesensing.org/proj
+#
+USE_PROJ ?= @USE_PROJ@
+PROJ_DIR ?= @PROJ_DIR@
+
+#
+# Set USE_GEOS to 1 for GEOS spatial predicate and operator
+# support (recommended).
+# GEOS installation directory defaults to /usr/local,
+# set GEOS_DIR environment variable to change it.
+#
+# GEOS allows you to do exact topological tests, such as
+# Intersects() and Touches(), as well as geometry operations,
+# such as Buffer(), GeomUnion() and Difference().
+#
+# Download from: http://geos.refractions.net
+#
+USE_GEOS ?= @USE_GEOS@
+GEOS_DIR ?= @GEOS_DIR@
+
+#
+# Set USE_STATS to 1 for new GiST statistics collection support
+# Note that this support requires additional columns in
+# GEOMETRY_COLUMNS, so see the list archives for info or
+# install a fresh database using postgis.sql.
+# This option is useless for builds against PGSQL>=80 (stats
+# are always gathered in that case, and you don't need additional
+# columns in geometry_columns).
+#
+USE_STATS=1
+
+#
+# Set AUTOCACHE_BBOX to 0 if you want finer control over
+# bounding box computation and caching for your geometries.
+# If you do, bbox computattion strategies are listed in
+# the file lwgeom/BBOXCACHE_BEHAVIOURS, but don't expect
+# them to be easy nor consistent.
+#
+AUTOCACHE_BBOX ?= 1
+
+#
+# Root of the PostgreSQL source tree
+# If you are not building from within postgresql 'contrib' directory
+# set the PGSQL_SRC either below or in the environment (an absolute path).
+#
+# PGSQL_SRC=/usr/src/postgresql
+PGSQL_SRC ?= @PGSQL_SRC@
+
+#
+# Set USE_ICONV to 1 if you want the loader (shp2pgsql)
+# to support UTF-8 output.
+#
+USE_ICONV ?= 0
+
+#
+# Path to library (to be specified in CREATE FUNCTION queries)
+# Defaults to $libdir.
+# Set LPATH below or in the environment to change it.
+#
+# LPATH=/usr/src/postgis
+LPATH ?= \$$libdir
+
+#---------------------------------------------------------------
+# END OF CONFIGURATION
+#---------------------------------------------------------------
+
+subdir=contrib/postgis
+top_builddir = ${PGSQL_SRC}
+include $(top_builddir)/src/Makefile.global
+
+#---------------------------------------------------------------
+# Test the version string and set the USE_VERSION macro
+# appropriately.
+#
+ifneq ($(findstring 7.1,$(VERSION)),)
+ USE_VERSION=71
+else
+ ifneq ($(findstring 7.2,$(VERSION)),)
+ USE_VERSION=72
+ else
+ ifneq ($(findstring 7.3,$(VERSION)),)
+ USE_VERSION=73
+ else
+ ifneq ($(findstring 7.4,$(VERSION)),)
+ USE_VERSION=74
+ else
+ USE_VERSION=80
+ endif
+ endif
+ endif
+endif
+
--- /dev/null
+AC_INIT(README.postgis)
+
+AC_SUBST(USE_GEOS)
+AC_SUBST(GEOS_DIR)
+USE_GEOS=0
+GEOS_DIR=/usr/local
+AC_ARG_WITH(geos,
+[ --with-geos=DIR Enable spatial predicate and operator support],
+ if test "$with_geos" != "no"; then
+ USE_GEOS=1
+ if test "$with_geos" != "yes"; then
+ GEOS_DIR=$with_geos
+ fi
+ fi
+)
+
+AC_SUBST(USE_PROJ)
+AC_SUBST(PROJ_DIR)
+USE_PROJ=0
+PROJ_DIR=/usr/local
+AC_ARG_WITH(proj,
+[ --with-proj=DIR Enable reprojection support],
+ if test "$with_proj" != "no"; then
+ USE_PROJ=1
+ if test "$with_proj" != "yes"; then
+ PROJ_DIR=$with_proj
+ fi
+ fi
+)
+
+AC_SUBST(PGSQL_SRC)
+PGSQL_SRC=${PWD}/../..
+AC_ARG_WITH(pgsql-src,
+[ --with-pgsql-src=DIR Where to find pgsql sources],
+ if test -d "$with_pgsql_src"; then
+ PGSQL_SRC=$with_pgsql_src
+ else
+ AC_MSG_RESULT(*--> $with_pgsql_src is not a directory)
+ fi
+)
+
+dnl Some final checks
+
+if test $USE_GEOS -gt 0 -a ! -e $GEOS_DIR/bin/geos-config; then
+ AC_MSG_ERROR(Can't find \$GEOS_DIR/bin/geos-config);
+fi
+
+if test $USE_PROJ -gt 0 -a ! -e $PROJ_DIR/include/projects.h; then
+ AC_MSG_ERROR(Can't find \$PROJ_DIR/include/projects.h);
+fi
+
+if ! test -e $PGSQL_SRC/src/Makefile.global; then
+ AC_MSG_ERROR(Can't find \$PGSQL_SRC/src/Makefile.global);
+fi
+
+AC_MSG_RESULT([ USE_GEOS=$USE_GEOS])
+if test $USE_GEOS -gt 0; then
+ AC_MSG_RESULT([ GEOS_DIR=$GEOS_DIR])
+fi
+AC_MSG_RESULT([ USE_PROJ=$USE_PROJ])
+if test $USE_PROJ -gt 0; then
+ AC_MSG_RESULT([ PROJ_DIR=$PROJ_DIR])
+fi
+AC_MSG_RESULT([ PGSQL_SRC=$PGSQL_SRC])
+
+AC_OUTPUT(Makefile.config)