[lokisetup] [PATCH] more control over static/dynamic linking

Ludwig Nussel ludwig.nussel at gmx.de
Thu Dec 16 17:46:40 EST 2004


Stephane Peter wrote:
> OK, well since we did have code making use of GPM, I just fixed the 
> detection so that it may be used. After all it is quite a useful 
> feature of the dialog code that is there, and I see no compelling 
> reason to remove it.

It adds a dependency on libgpm. I suppose the ncurses version is
more often used over ssh rather than native linux console so there
probably isn't any benefit.

And while we are at it here is another patch for non-static libz.
Would probably cause unexpected effects if it's linked statically
and drawn in dynamically at the same time.

cu
Ludwig

-- 
(o_  Ludwig.Nussel at gmx.de
//\
V_/_ PGP Key ID: FF8135CE
-------------- next part --------------
Index: loki_setup/configure.in
===================================================================
--- loki_setup.orig/configure.in
+++ loki_setup/configure.in
@@ -351,6 +351,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)
@@ -503,20 +510,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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://icculus.org/pipermail/lokisetup/attachments/20041216/320da444/attachment.pgp>


More information about the Lokisetup mailing list