# colons in drive letters will break PATH.
PGSQL_BINDIR=$(shell pushd "@PGSQL_BINDIR@" > /dev/null && pwd && popd > /dev/null)
+
+# Hack to support the change in .so name from PgSQL 8.3 to 8.4
+# and allow in-place regression testing still. (#219)
+LIBNAME = postgis
+ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) "<" 84),1)
+ LIBNAME = libpostgis
+endif
+
srcdir=$(shell pwd)
#
all: test
test check: ../postgis/postgis.sql ../loader/pgsql2shp ../loader/shp2pgsql
- sed 's,$$libdir/postgis,$(srcdir)/../postgis/libpostgis,g' ../postgis/postgis.sql > postgis.sql
+ sed 's,$$libdir/postgis,$(srcdir)/../postgis/$(LIBNAME),g' ../postgis/postgis.sql > postgis.sql
@USE_VERSION=$(POSTGIS_PGSQL_VERSION) ./run_test $(TESTS)