This avoids breakage if pg_config is not found
and PGVER stays empty.
# PostgreSQL version
PGVER = $(shell $(PG_CONFIG) --version | sed 's/PostgreSQL //')
-SQLMED = $(shell test $(PGVER) "<" "8.4" && echo "false" || echo "true")
-PG91 = $(shell test $(PGVER) "<" "9.1" && echo "false" || echo "true")
+SQLMED = $(shell test "$(PGVER)" "<" "8.4" && echo "false" || echo "true")
+PG91 = $(shell test "$(PGVER)" "<" "9.1" && echo "false" || echo "true")
# SQL/MED available, add foreign data wrapper and regression tests
ifeq ($(SQLMED), true)