File fltk-1.1.10-link_gl.patch of Package fltk

--- fltk-config.in
+++ fltk-config.in
@@ -231,7 +231,7 @@
     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
--- src/Makefile
+++ src/Makefile
@@ -281,8 +281,8 @@
 	$(RANLIB) $@
 
 libfltk_gl.so.1.1: $(GLOBJECTS) libfltk.so.1.1
-	echo $(DSOCOMMAND) $@ ...
-	$(DSOCOMMAND) $@ $(GLOBJECTS) $(LDLIBS) -L. -lfltk
+	echo $(DSOCOMMAND) $@ $(shell pkg-config --cflags gl) $(GLOBJECTS) $(LDLIBS) -L. -lfltk $(shell pkg-config --libs gl) ...
+	$(DSOCOMMAND) $@ $(shell pkg-config --cflags gl) $(GLOBJECTS) $(LDLIBS) -L. -lfltk $(shell pkg-config --libs gl)
 	$(RM) libfltk_gl.so
 	$(LN) libfltk_gl.so.1.1 libfltk_gl.so
openSUSE Build Service is sponsored by