LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File loki_setup-gtkstatic.diff of Package loki_setup (Project games:tools)

--- loki_setup/configure.in	2006-05-30 13:36:53.000000000 +0200
+++ loki_setup/configure.in	2006-05-30 13:37:09.000000000 +0200
@@ -190,12 +190,13 @@
         ARCH=`uname -p 2> /dev/null || uname -m` ;;
 esac
 
-GTK_STATIC=$BSTATIC
 case "$target" in
 	*linux*)
-# Newer glibc's require to depend at least on them
+		# Newer glibc's require to depend at least on them
 		STATIC=""
-		GTK_STATIC="\$(BDYNAMIC)" ;;
+		want_gtk_static=no ;;
+	*)
+		want_gtk_static=yes ;;
 esac
 
 CFLAGS="$CFLAGS $REENTRANT"
@@ -246,8 +247,8 @@
 
 CFLAGS="$CFLAGS -I$SETUPDB_INCDIR"
 
-GUI_LIBS=$GTK_STATIC
-GTK_LIBS=$GTK_STATIC
+GUI_LIBS=
+GTK_LIBS=
 #!!!TODO - Add carbon libs as necessary
 CARBON_LIBS=
 
@@ -361,6 +362,13 @@
 	USE_GPM=yes
 fi
 
+AC_ARG_ENABLE(gtk-static,
+[  --enable-gtk-static            whether to statically link gtk and glib (default=$want_gtk_static)],,
+enable_gtk_static=$want_gtk_static)
+if test "x$enable_gtk_static" = "xyes"; then
+	GTK_STATIC="$BSTATIC"
+fi
+
 AC_ARG_ENABLE(libglade-static,
 [  --enable-libglade-static            whether to statically link libglade (default=yes)],,
 enable_libglade_static=yes)
@@ -413,7 +421,7 @@
     GTK_PREFIX=`$HAVEGTK --prefix`
     GLIB_PREFIX=`$HAVEGLIB --prefix`
 
-    GTK_LIBS="$GTK_LIBS -L$GTK_PREFIX/lib$LIBSUFFIX -L$GLIB_PREFIX/lib$LIBSUFFIX -lgtk$GTK12 -lgdk$GTK12 $RDYNAMIC -lgmodule$GTK12 -lglib$GTK12"
+    GTK_LIBS="$GTK_STATIC -L$GTK_PREFIX/lib$LIBSUFFIX -L$GLIB_PREFIX/lib$LIBSUFFIX -lgtk$GTK12 -lgdk$GTK12 $RDYNAMIC -lgmodule$GTK12 -lglib$GTK12 $BDYNAMIC"
 else
     AC_MSG_ERROR([*** gtk-config not found. You need a working GTK+ 1.2 installation.])
 fi