Subject: bug#54378: Subject: 29.0 Build failed

From: Robert Pluim <[email-masked]>
Date: Wed, 16 Mar 2022 11:02:25 +0100

So we donʼt do any autodetection of -ldl, so actually the following
should be enough:

diff --git a/configure.ac b/configure.ac
index a315eeb6bd..bc17935eb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3940,6 +3940,16 @@ AC_DEFUN
   darwin) MODULES_SECONDARY_SUFFIX='.so' ;;
   *) MODULES_SECONDARY_SUFFIX='' ;;
 esac
+
+# pgtkterm.c uses dlsym
+if test $window_system = pgtk; then
+  case $opsys in
+    gnu|gnu-linux)
+    LIBMODULES="-ldl"
+    ;;
+  esac
+fi
+
 if test "${with_modules}" != "no"; then
   case $opsys in
     gnu|gnu-linux)