]> git.saurik.com Git - wxWidgets.git/commitdiff
-ldl only added if it exists
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Oct 1999 12:56:01 +0000 (12:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Oct 1999 12:56:01 +0000 (12:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure.in

index d028abf6495f075f5e632c9da9d9960349b9b5ad..50f0a62a2175c1a4dbd3c8bc53d306570db77db7 100644 (file)
@@ -1447,7 +1447,7 @@ if test "$wxUSE_GTK" = 1; then
     fi
 
     TOOLKIT_INCLUDE="$GTK_CFLAGS"
-    GUI_TK_LIBRARY="$GTK_LIBS -ldl"
+    GUI_TK_LIBRARY="$GTK_LIBS"
     TOOLKIT=GTK
 
     GUIHEADERS=GTK_HEADERS
@@ -1496,7 +1496,7 @@ if test "$wxUSE_WINE" = 1; then
         AC_MSG_ERROR(no)
     fi
 
-    GUI_TK_LINK="-lwine $MESA_LINK $XPM_LINK -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses -ldl -lm"
+    GUI_TK_LINK="-lwine $MESA_LINK $XPM_LINK -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses -lm"
     GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK"
     WXWINE=1
     TOOLKIT=MSW
@@ -1572,7 +1572,7 @@ if test "$wxUSE_MOTIF" = 1; then
         AC_MSG_WARN(library will be compiled without support for images in XPM format)
     fi
 
-    GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXt -lX11 -ldl -lm"
+    GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXt -lX11 -lm"
     GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK"
     TOOLKIT=MOTIF
 
@@ -1587,6 +1587,13 @@ if test "$wxUSE_MOTIF" = 1; then
     GUIDIST=MOTIF_DIST
 fi
 
+dnl someone explicitly added -ldl to the list of libraries for these targets -
+dnl I don't know why has this been done, but let's respect this - with the
+dnl exception of the systems which don't have libdl at all (VZ)
+if test "$wxUSE_GTK" = 1 || test "$wxUSE_MOTIF" = 1 || test "$wxUSE_WINE" = 1; then
+    AC_CHECK_LIB(dl, main, GUI_TK_LIBRARY="$GUI_TK_LIBRARY -ldl")
+fi
+
 dnl the name of the directory where the files for this toolkit live
 TOOLKIT_DIR=`echo ${TOOLKIT} | tr "A-Z" "a-z"`