From 047106c92f32cc21377f6e6aa3cd2440d3dc2a01 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Mon, 29 May 2006 19:19:46 +0000
Subject: [PATCH] Link with libdl.so on platforms which don't include it in
 libc (Solaris, OSX, Linux) when using SDL as non-static.

---
 src/xpdev/Common.gmake | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/xpdev/Common.gmake b/src/xpdev/Common.gmake
index b91b70ea9f..94945513ee 100644
--- a/src/xpdev/Common.gmake
+++ b/src/xpdev/Common.gmake
@@ -111,6 +111,19 @@ ifdef WITH_SDL
     XPDEV-MT_CFLAGS	+=	-DSTATIC_SDL
     XPDEV-LIBS	+=	$(shell $(SDL_CONFIG) --static-libs)
     XPDEV-CFLAGS	+=	-DSTATIC_SDL
+   else
+    ifeq ($(os),darwin)
+     XPDEV-MT_LIBS		+=  $(UL_PRE)dl$(UL_SUF)
+     XPDEV_LIBS		+=  $(UL_PRE)dl$(UL_SUF)
+    endif
+    ifeq ($(os),linux)
+     XPDEV-MT_LIBS		+=  $(UL_PRE)dl$(UL_SUF)
+     XPDEV_LIBS		+=  $(UL_PRE)dl$(UL_SUF)
+    endif
+    ifeq ($(os),sunos)
+     XPDEV-MT_LIBS		+=  $(UL_PRE)dl$(UL_SUF)
+     XPDEV_LIBS		+=  $(UL_PRE)dl$(UL_SUF)
+    endif
    endif
   endif
  else
-- 
GitLab