]> git.wh0rd.org - dump.git/commitdiff
Add --enable-staticz configure option.
authorStelian Pop <stelian@popies.net>
Mon, 24 May 2004 12:39:23 +0000 (12:39 +0000)
committerStelian Pop <stelian@popies.net>
Mon, 24 May 2004 12:39:23 +0000 (12:39 +0000)
CHANGES
configure
configure.in

diff --git a/CHANGES b/CHANGES
index 5bdb235724a3f3892f7b2f4155c37571d80059a9..12efb5aa8d8b9a9ac35d5f515860a5b43a33faac 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,16 @@
-$Id: CHANGES,v 1.247 2004/04/21 09:18:49 stelian Exp $
+$Id: CHANGES,v 1.248 2004/05/24 12:39:23 stelian Exp $
+
+Changes between versions 0.4b36 and 0.4b37 (released ??????????????)
+====================================================================
+
+1.     Added the --enable-staticz configure option which enables
+       dump and restore to be linked with static versions of
+       libz and libbz2 (and dynamic versions of all other libraries).
+       This will make Debian users happy, because libz and libbz2
+       were the only needed libraries living in /usr, all the
+       others live in /lib. In case of system emergency, it is 
+       better not to have to rely on an extra filesystem.
+       Thanks to Bdale Garbee <bdale@gag.com> for the suggestion.
 
 Changes between versions 0.4b35 and 0.4b36 (released April 21, 2004)
 ====================================================================
index 5e61ddd1e44e24ddb81d48460a5f4958b10f1105..be83da5d5bb98e6e11f22b52d287eb66d0c6e217 100755 (executable)
--- a/configure
+++ b/configure
@@ -841,6 +841,7 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-debug             include debugging code (default is NO)
   --enable-static            link dump and restore statically (default is NO)
+  --enable-staticz           link libz and libbz2 statically (default is NO)
   --enable-rmt               compile and install rmt (default is YES)
   --enable-ermt              compile ermt, an encrypting version of rmt (default is NO)
   --enable-kerberos          compile kerberos extensions (default is NO)
@@ -3320,6 +3321,24 @@ echo "Linking dump and restore dynamically by default"
 fi;
 
 
+# Check whether --enable-staticz or --disable-staticz was given.
+if test "${enable_staticz+set}" = set; then
+  enableval="$enable_staticz"
+  if test "$enableval" = "no"
+then
+       STATICZ="no"
+       echo "Linking libz and libbz2 dynamically"
+else
+       STATICZ="yes"
+       echo "Linking libz and libbz2 statically"
+fi
+
+else
+  STATICZ="no"
+echo "Linking libz and libbz2 dynamically by default"
+
+fi;
+
 # Check whether --enable-rmt or --disable-rmt was given.
 if test "${enable_rmt+set}" = set; then
   enableval="$enable_rmt"
@@ -4379,7 +4398,11 @@ else
 fi
 
 if test "$zlib_h" = yes -a "$zlib_lib" = yes; then
-       ZLIB="-lz"
+       if test "$STATICZ" = yes; then
+               ZLIB="-Wl,-Bstatic -lz -Wl,-Bdynamic"
+       else
+               ZLIB="-lz"
+       fi
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_ZLIB 1
@@ -4500,7 +4523,11 @@ else
 fi
 
 if test "$bzlib_h" = yes -a "$bzlib_lib" = yes; then
-       BZLIB="-lbz2"
+       if test "$STATICZ" = yes; then
+               BZLIB="-Wl,-Bstatic -lbz2 -Wl,-Bdynamic"
+       else
+               BZLIB="-lbz2"
+       fi
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_BZLIB 1
index 94aedbf50fb9b9a4eae1226a444da4be95976d66..5299ab3ee5490675d3be999ae10cbbe4792e8d18 100644 (file)
@@ -65,6 +65,24 @@ echo "Linking dump and restore dynamically by default"
 )
 AC_SUBST(STATIC)
 
+dnl
+dnl Handle --enable-staticz
+dnl
+AC_ARG_ENABLE([staticz],
+[  --enable-staticz           link libz and libbz2 statically (default is NO)],
+if test "$enableval" = "no"
+then
+       STATICZ="no"
+       echo "Linking libz and libbz2 dynamically"
+else
+       STATICZ="yes"
+       echo "Linking libz and libbz2 statically"
+fi
+,
+STATICZ="no"
+echo "Linking libz and libbz2 dynamically by default"
+)
+
 dnl
 dnl Handle --enable-rmt
 dnl
@@ -456,7 +474,11 @@ dnl
 AC_CHECK_HEADER(zlib.h, [zlib_h=yes], [zlib_h=no], [-])
 AC_CHECK_LIB(z, compress2, [zlib_lib=yes], [zlib_lib=no])
 if test "$zlib_h" = yes -a "$zlib_lib" = yes; then
-       ZLIB="-lz"
+       if test "$STATICZ" = yes; then
+               ZLIB="-Wl,-Bstatic -lz -Wl,-Bdynamic"
+       else
+               ZLIB="-lz"
+       fi
        AC_DEFINE([HAVE_ZLIB],1,[Define this if you have zlib compression library.])
 else
        ZLIB=""
@@ -469,7 +491,11 @@ dnl
 AC_CHECK_HEADER(bzlib.h, [bzlib_h=yes], [bzlib_h=no], [-])
 AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffCompress, [bzlib_lib=yes], [bzlib_lib=no])
 if test "$bzlib_h" = yes -a "$bzlib_lib" = yes; then
-       BZLIB="-lbz2"
+       if test "$STATICZ" = yes; then
+               BZLIB="-Wl,-Bstatic -lbz2 -Wl,-Bdynamic"
+       else
+               BZLIB="-lbz2"
+       fi
        AC_DEFINE([HAVE_BZLIB],1,[Define this if you have bzlib compression library.])
 else
        BZLIB=""