diff options
author | Jacob Appelbaum <jacob@appelbaum.net> | 2011-03-10 01:22:32 -0800 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-04-02 11:09:38 +0200 |
commit | fe051a43c1fc5d8528ed46deaa818031b16a79eb (patch) | |
tree | 7d3f7f12420ec70e5bd52410f089573576e4cbba /configure.in | |
parent | ee871e7a0e9ce9b1df8b8f4add06e8c193b9544a (diff) | |
download | tor-fe051a43c1fc5d8528ed46deaa818031b16a79eb.tar.gz tor-fe051a43c1fc5d8528ed46deaa818031b16a79eb.zip |
add --enable-static-tor to our configure script
This implements the feature request in bug #2702
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 83fd0449b9..f7875df71e 100644 --- a/configure.in +++ b/configure.in @@ -32,6 +32,17 @@ 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)) +AC_ARG_ENABLE(static-tor, + AS_HELP_STRING(--enable-static-tor, Create an entirely static Tor binary. Requires --static-openssl + --static-libevent and --static-zlib)) + +if test "$enable_static_tor" = "yes"; then + enable_static_libevent="yes"; + enable_static_openssl="yes"; + enable_static_zlib="yes"; + AC_MSG_NOTICE("We're attempting to build a static Tor.") + CFLAGS="$CFLAGS -static" +fi if test x$enable_buf_freelists != xno; then AC_DEFINE(ENABLE_BUF_FREELISTS, 1, @@ -516,6 +527,20 @@ else fi AC_SUBST(TOR_ZLIB_LIBS) +if test "$enable_static_tor" = "yes"; then + if test "$enable_static_libevent" = "no"; then + AC_MSG_ERROR("You must configure with --enable-static-libevent") + fi + if test "$enable_static_openssl" = "no"; then + AC_MSG_ERROR("You must configure with --enable-static-openssl") + fi + if test "$enable_static_zlib" = "no"; then + AC_MSG_ERROR("You must configure with --enable-static-zlib") + fi + AC_MSG_NOTICE("We're attempting to build a static Tor.") + CFLAGS="$CFLAGS -static" +fi + dnl Make sure to enable support for large off_t if available. |