Description: Fixes linking with unnecessary libraries.
 This patch fixes linking "sdl-instead" with unnecessary libraries
 with the object of avoiding warnings and decreasing dependencies.
Author: Sam Protsenko <joe.skb7@gmail.com>
Reviewed-By: <p.kosyh@gmail.com>
Last-Update: <2012-01-15>

--- instead-1.6.0.orig/configure.sh
+++ instead-1.6.0/configure.sh
@@ -158,7 +158,11 @@ fi
 if [[ ! -z "$gtk_cflags" ]]; then
 	echo "EXTRA_CFLAGS+=-D_USE_GTK -D_USE_BROWSE" >> config.make
 	echo "EXTRA_CFLAGS+=\$(shell $gtk_cflags)" >> config.make
-	echo "EXTRA_LDFLAGS+=\$(shell $gtk_libs)" >> config.make
+	if [ -z "$gtk_libs" ]; then
+		echo "EXTRA_LDFLAGS+=\$(shell $gtk_libs)" >> config.make
+	else
+		echo "EXTRA_LDFLAGS+=-pthread -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0" >> config.make
+	fi
 fi
 if [[ -z "$zlib_cflags" ]]; then
 	echo "SUBDIRS=src/zlib" >> config.make
