diff -urN postgis-3.2.1/postgis/Makefile.in.orig postgis-3.2.1/postgis/Makefile.in
--- postgis-3.2.1/postgis/Makefile.in.orig	2022-02-13 01:55:42.000000000 +0100
+++ postgis-3.2.1/postgis/Makefile.in	2022-06-14 21:57:44.114299000 +0200
@@ -178,6 +178,7 @@
 # may be confusing and out-of-control for the builder of
 # PostGIS
 LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
 
 # If REGRESS=1 passed as a parameter, change the default install paths
 # so that no prefix is included. This allows us to relocate to a temporary
