LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

Index: loki_setup/configure.in
===================================================================
--- loki_setup.orig/configure.in
+++ loki_setup/configure.in
@@ -353,6 +353,13 @@ if test "x$enable_libncurses_static" = "
 	NCURSES_STATIC="$BSTATIC"
 fi
 
+AC_ARG_ENABLE(libz-static,
+[  --enable-libz-static            whether to statically link libz (default=yes)],,
+enable_libz_static=yes)
+if test "x$enable_libz_static" = "xyes"; then
+	LIBZ_STATIC="$BSTATIC"
+fi
+
 AC_CHECK_HEADERS(ncurses/term.h)
 AC_CHECK_HEADERS(ncurses/curses.h)
 AC_CHECK_HEADERS(ncurses.h)
@@ -505,20 +512,20 @@ fi
 LIBS="$LIBS $BZ2_STATIC $BZ2LIB $BDYNAMIC"
 
 if test ! -z "$USE_LIBINTL"; then
-	LIBINTL="$BSTATIC $LIBINTL -lz \$(BDYNAMIC)"
+	LIBINTL="$BSTATIC $LIBINTL \$(BDYNAMIC)"
 	LIBS="$LIBS $LIBINTL"
 	GUI_LIBS="$GUI_LIBS $LIBINTL"
 	CARBON_LIBS="$CARBON_LIBS $LIBINTL"
-else
-	if test "$STATIC" = ""; then
-		LIBS="$LIBS $BSTATIC -lz \$(BDYNAMIC)"
-	else
-		LIBS="$LIBS -lz"
-	fi
-	GUI_LIBS="$GUI_LIBS $BSTATIC -lz \$(BDYNAMIC)"
-	CARBON_LIBS="$CARBON_LIBS $BSTATIC -lz \$(BDYNAMIC)"
 fi
 
+# libz
+if test "$STATIC" = ""; then
+	LIBS="$LIBS $LIBZ_STATIC -lz $BDYNAMIC"
+else
+	LIBS="$LIBS -lz"
+fi
+GUI_LIBS="$GUI_LIBS $LIBZ_STATIC -lz $BDYNAMIC"
+CARBON_LIBS="$CARBON_LIBS $LIBZ_STATIC -lz $BDYNAMIC"
 
 if test ! -z "$USE_NCURSES"; then
 	if test "$STATIC" = ""; then