diff --git a/contrib/contrib-global.mk b/contrib/contrib-global.mk
index 6ac8e9b13d0a5d3d4d858da16d868b0a827d0688..ba49610b115e85bf35b569578abe8e488884b4b1 100644
--- a/contrib/contrib-global.mk
+++ b/contrib/contrib-global.mk
@@ -1,4 +1,9 @@
 # contrib/contrib-global.mk
 
+# file with extra config for temp build
+ifdef TEMP_CONFIG
+REGRESS_OPTS += --temp-config=$(TEMP_CONFIG)
+endif
+
 NO_PGXS = 1
 include $(top_srcdir)/src/makefiles/pgxs.mk