--- a/Makefile
+++ b/Makefile
@@ -145,7 +145,8 @@ endif
 # $(DESTDIR)$(datadir) aren't being expanded.
 #
 EXTENSION_DIR = $(DESTDIR)$(datadir)/extension
-extension_control = $(shell file="$(EXTENSION_DIR)/$1.control"; [ -e "$$file" ] && echo "$$file")
+# Debian: no DESTDIR here as it interferes with testing extensions at build time
+extension_control = $(shell file="$(datadir)/extension/$1.control"; [ -e "$$file" ] && echo "$$file")
 ifeq (,$(call extension_control,citext))
 MISSING_EXTENSIONS += citext
 endif
