From 0efcec63044cedfb3dd8655feb7128d0b81c3ec6 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 23 Mar 2011 09:43:17 +1100 Subject: [PATCH] Reenable static binary compilation with --enable-static-bin configuration option. --- Makefile.am | 3 +++ README | 2 +- configure.ac | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 85f636e..1cb1772 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,6 +53,9 @@ lrzip_SOURCES = \ sha4.h lrzip_LDADD = lzma/C/liblzma.la +if STATIC + lrzip_LDFLAGS = -all-static +endif dist_doc_DATA = \ AUTHORS \ diff --git a/README b/README index 4fa742e..add9f04 100644 --- a/README +++ b/README @@ -113,7 +113,7 @@ for this encryption mechanism, and there is absolutely no way of retrieving your password should you forget it. Q. How do I make a static build? -A. make static +A. ./configure --enable-static-bin Q. I want the absolute maximum compression I can possibly get, what do I do? A. Try the command line options "-Uzp 1 -L 9". This uses all available ram and diff --git a/configure.ac b/configure.ac index f5548f8..e34b005 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,13 @@ if test x"$ASM" = xyes; then fi fi +static=no +AC_ARG_ENABLE([static-bin], + [AC_HELP_STRING([--enable-static-bin],[Build statically linked binary @<:@default=no@:>@])], + [static=$enableval] + ) +AM_CONDITIONAL([STATIC], [test "x$static" = "xyes"]) + AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/mman.h) AC_CHECK_HEADERS(ctype.h errno.h sys/resource.h) AC_CHECK_HEADERS(endian.h sys/endian.h arpa/inet.h) @@ -142,6 +149,7 @@ echo echo "Configuration Options Summary:" echo echo " ASM................: $ASM" +echo " Static binary......: $static" echo echo "Compilation............: make (or gmake)" echo " CPPFLAGS.............: $CPPFLAGS"