]> git.wh0rd.org - dump.git/blobdiff - configure
Fix compilation on AMD64
[dump.git] / configure
index 84dac8b640520873cb610b613742e2d88071b533..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)
@@ -849,6 +850,7 @@ Optional Features:
   --enable-largefile         enable Large File System support (default is YES)
   --enable-qfa               enable Quick File Access support (default is YES)
   --enable-qfadebug          include Quick File Access debugging code (default is NO)
+  --enable-macosx            include Mac OSX restore compatibility (default is NO)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -3319,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"
@@ -3508,6 +3528,27 @@ else
 
 fi;
 
+# Check whether --enable-macosx or --disable-macosx was given.
+if test "${enable_macosx+set}" = set; then
+  enableval="$enable_macosx"
+  if test "$enableval" = "yes"
+then
+
+cat >>confdefs.h <<\_ACEOF
+#define DUMP_MACOSX 1
+_ACEOF
+
+       echo "Including Mac OSX restore compatibility code"
+else
+       echo "Not including Mac OSX restore compatibility code"
+fi
+
+else
+  echo "Not including Mac OSX restore compatibility code by default"
+
+fi;
+
+
 
 # Check whether --with-cc or --without-cc was given.
 if test "${with_cc+set}" = set; then
@@ -4357,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
@@ -4478,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