# 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
+# 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
# PGSQL_SRC=/usr/src/postgresql
PGSQL_SRC ?= ${PWD}/../..
+#
+# 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.
#---------------------------------------------------------------
+ifeq ($(USE_ICONV),1)
+ override CFLAGS += -DUSE_ICONV
+endif
+
override CFLAGS := -g -I.. -I$(srcdir) -I$(top_builddir)/src/interfaces/libpq $(CFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"' -DUSE_VERSION=$(USE_VERSION)
all: shp2pgsql$(EXE) pgsql2shp$(EXE)