diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-04-14 16:48:05 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-04-14 19:28:21 +0200 |
commit | 71fb687ddd2d9c11dbacbc9e115b1c95620ae5bd (patch) | |
tree | 91c03a0ed432f8cf409f893ae0a810d416161242 /configure.in | |
parent | fe57aab2832160d1c256aa9d6e70cd5e1cd29aa4 (diff) | |
download | tor-71fb687ddd2d9c11dbacbc9e115b1c95620ae5bd.tar.gz tor-71fb687ddd2d9c11dbacbc9e115b1c95620ae5bd.zip |
Add --enable-static-zlib option
Works like the --enable-static-openssl/libevent options. Requires
--with-zlib-dir to be set. Note that other dependencies might still
pull in a dynamicly linked zlib, if you don't link them in statically
too.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in index d2868a28b5..91010ab725 100644 --- a/configure.in +++ b/configure.in @@ -30,6 +30,8 @@ AC_ARG_ENABLE(static-openssl, AS_HELP_STRING(--enable-static-openssl, Link against a static openssl library. Requires --with-openssl-dir)) AC_ARG_ENABLE(static-libevent, AS_HELP_STRING(--enable-static-libevent, Link against a static libevent library. Requires --with-libevent-dir)) +AC_ARG_ENABLE(static-zlib, + AS_HELP_STRING(--enable-static-zlib, Link against a static zlib library. Requires --with-zlib-dir)) if test x$enable_buf_freelists != xno; then AC_DEFINE(ENABLE_BUF_FREELISTS, 1, @@ -351,6 +353,19 @@ TOR_SEARCH_LIBRARY(zlib, $tryzlibdir, [-lz], [zlibVersion(); exit(0);], [--with-zlib-dir], [/opt/zlib]) +if test "$enable_static_zlib" = "yes"; then + if test "$tor_cv_library_zlib_dir" = "(system)"; then + AC_MSG_ERROR("You must specify an explicit --with-zlib-dir=x option when + using --enable-static-zlib") + else + TOR_ZLIB_LIBS="$TOR_LIBDIR_zlib/libz.a" + echo "$TOR_LIBDIR_zlib/libz.a" + fi +else + TOR_ZLIB_LIBS="-lz" +fi +AC_SUBST(TOR_ZLIB_LIBS) + dnl Make sure to enable support for large off_t if available. AC_SYS_LARGEFILE |