Blob Blame Raw
This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=708185.

When linking against dynamic libraries, we don't need to pass all
required libraries (-lGL, -lpng, -lXinerama etc). Such libraries are only needed
when performing static linking.

diff -up fltk-1.3.0rc5/fltk-config.in.fltk_config fltk-1.3.0rc5/fltk-config.in
--- fltk-1.3.0rc5/fltk-config.in.fltk_config	2011-01-01 01:10:38.000000000 +0100
+++ fltk-1.3.0rc5/fltk-config.in	2011-05-27 13:48:10.203763843 +0200
@@ -240,23 +240,23 @@ fi
 
 # Calculate needed libraries
 LDSTATIC="$libdir/libfltk.a $LDLIBS"
-LDLIBS="-lfltk$SHAREDSUFFIX $LDLIBS"
+LDLIBS="-lfltk$SHAREDSUFFIX"
 
 if test x$use_forms = xyes; then
     LDLIBS="-lfltk_forms$SHAREDSUFFIX $LDLIBS"
     LDSTATIC="$libdir/libfltk_forms.a $LDSTATIC"
 fi
 if test x$use_gl = xyes; then
-    LDLIBS="-lfltk_gl$SHAREDSUFFIX @GLLIB@ $LDLIBS"
+    LDLIBS="-lfltk_gl$SHAREDSUFFIX $LDLIBS"
     LDSTATIC="$libdir/libfltk_gl.a @GLLIB@ $LDSTATIC"
 fi
 if test x$use_images = xyes; then
-    LDLIBS="-lfltk_images$SHAREDSUFFIX $IMAGELIBS $LDLIBS"
+    LDLIBS="-lfltk_images$SHAREDSUFFIX $LDLIBS"
     LDSTATIC="$libdir/libfltk_images.a $STATICIMAGELIBS $LDSTATIC"
 fi
 
 if test x$use_cairo = xyes; then
-    LDLIBS="-lfltk_cairo$SHAREDSUFFIX $CAIROLIBS $LDLIBS"
+    LDLIBS="-lfltk_cairo$SHAREDSUFFIX $LDLIBS"
     LDSTATIC="$libdir/libfltk_cairo.a $CAIROLIBS $LDSTATIC"
 fi