summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-01-24 15:03:45 -0500
committerNick Mathewson <nickm@torproject.org>2010-01-24 15:03:45 -0500
commit0552deb613ab9872462f10b07f490df60f8e1c22 (patch)
treed25aeb97068eac095c5d67505addae2762a46fa4
parent3b4b6009a0020fb55fcb6464cc448e244680f9c8 (diff)
parentb6038f4ac646b52f0819724b344adcf04bc2a440 (diff)
downloadtor-0552deb613ab9872462f10b07f490df60f8e1c22.tar.gz
tor-0552deb613ab9872462f10b07f490df60f8e1c22.zip
Merge commit 'origin/maint-0.2.1'
Resolved conflicts in: configure.in src/or/Makefile.am src/tools/Makefile.am
-rw-r--r--acinclude.m42
-rw-r--r--configure.in40
-rw-r--r--src/or/Makefile.am2
-rw-r--r--src/test/Makefile.am2
-rw-r--r--src/tools/Makefile.am6
5 files changed, 45 insertions, 7 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 766ca1e62e..3db25aa59a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -26,8 +26,10 @@ AC_DEFUN([TOR_DEFINE_CODEPATH],
else
if test -d "$1/lib"; then
TOR_LDFLAGS_$2="-L$1/lib"
+ TOR_LIBDIR_$2="$1/lib"
else
TOR_LDFLAGS_$2="-L$1"
+ TOR_LIBDIR_$2="$1"
fi
if test -d "$1/include"; then
TOR_CPPFLAGS_$2="-I$1/include"
diff --git a/configure.in b/configure.in
index a8890ff049..80cdfc417a 100644
--- a/configure.in
+++ b/configure.in
@@ -41,6 +41,10 @@ AC_ARG_ENABLE(openbsd-malloc,
AS_HELP_STRING(--enable-openbsd-malloc, Use malloc code from openbsd. Linux only))
AC_ARG_ENABLE(instrument-downloads,
AS_HELP_STRING(--enable-instrument-downloads, Instrument downloads of directory resources etc.))
+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))
if test x$enable_buf_freelists != xno; then
AC_DEFINE(ENABLE_BUF_FREELISTS, 1,
@@ -87,6 +91,8 @@ esac
AC_ARG_ENABLE(gcc-warnings,
AS_HELP_STRING(--enable-gcc-warnings, enable verbose warnings))
+AC_ARG_ENABLE(gcc-warnings-advisory,
+ AS_HELP_STRING(--enable-gcc-warnings-advisory, [enable verbose warnings, excluding -Werror]))
AC_ARG_ENABLE(local-appdata,
AS_HELP_STRING(--enable-local-appdata, default to host local application data paths on Windows))
@@ -279,8 +285,21 @@ LIBS="$save_LIBS"
LDFLAGS="$save_LDFLAGS"
CPPFLAGS="$save_CPPFLAGS"
+
AM_CONDITIONAL(USE_EXTERNAL_EVDNS, test x$ac_cv_header_event2_dns_h = xyes)
+if test "$enable_static_libevent" = "yes"; then
+ if test "$tor_cv_library_libevent_dir" = "(system)"; then
+ AC_MSG_ERROR("You must specify an explicit --with-libevent-dir=x option when using --enable-static-libevent")
+ else
+ TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent.a"
+ fi
+else
+ TOR_LIBEVENT_LIBS="-levent"
+fi
+AC_SUBST(TOR_LIBEVENT_LIBS)
+
+
dnl ------------------------------------------------------
dnl Where do you live, openssl? And how do we call you?
@@ -306,6 +325,19 @@ TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI],
dnl XXXX check for OPENSSL_VERSION_NUMBER == SSLeay()
+echo "tor_cv_library_openssl_dir is $tor_cv_library_openssl_dir"
+if test "$enable_static_openssl" = "yes"; then
+ if test "$tor_cv_library_openssl_dir" = "(system)"; then
+ AC_MSG_ERROR("You must specify an explicit --with-openssl-dir=x option when using --enable-static-openssl")
+ else
+ TOR_OPENSSL_LIBS="$TOR_LIBDIR_openssl/libcrypto.a $TOR_LIBDIR_openssl/libssl.a"
+ fi
+else
+ TOR_OPENSSL_LIBS="-lcrypto -lssl"
+fi
+echo "TOR_OPENSSL_LIBS=$TOR_OPENSSL_LIBS"
+AC_SUBST(TOR_OPENSSL_LIBS)
+
dnl ------------------------------------------------------
dnl Where do you live, zlib? And how do we call you?
@@ -774,11 +806,12 @@ if test "$GCC" = yes; then
else
CFLAGS="$CFLAGS -g -O"
enable_gcc_warnings=no
+ enable_gcc_warnings_advisory=no
fi
# Add some more warnings which we use in development but not in the
# released versions. (Some relevant gcc versions can't handle these.)
-if test x$enable_gcc_warnings = xyes; then
+if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xyes; then
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [
#if !defined(__GNUC__) || (__GNUC__ < 4)
@@ -801,7 +834,10 @@ if test x$enable_gcc_warnings = xyes; then
have_shorten64_flag=no)
CFLAGS="$save_CFLAGS"
- CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror"
+ CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum"
+ if test x$enable_gcc_warnings = xyes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
# Disabled, so we can use mallinfo(): -Waggregate-return
diff --git a/src/or/Makefile.am b/src/or/Makefile.am
index 3dc1889a90..cfa8a035ad 100644
--- a/src/or/Makefile.am
+++ b/src/or/Makefile.am
@@ -43,7 +43,7 @@ AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
tor_LDADD = ./libtor.a ../common/libor.a ../common/libor-crypto.a \
../common/libor-event.a \
- -lz -lm -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
+ -lz -lm @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@
noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index cdb5d85c28..7df13da51e 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -25,6 +25,6 @@ test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
@TOR_LDFLAGS_libevent@
test_LDADD = ../or/libtor.a ../common/libor.a ../common/libor-crypto.a \
../common/libor-event.a \
- -lz -lm -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
+ -lz -lm @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@
noinst_HEADERS = tinytest.h tinytest_macros.h test.h
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
index 39c8277ccd..be03f8d892 100644
--- a/src/tools/Makefile.am
+++ b/src/tools/Makefile.am
@@ -3,16 +3,16 @@ noinst_PROGRAMS = tor-checkkey
tor_resolve_SOURCES = tor-resolve.c
tor_resolve_LDFLAGS = @TOR_LDFLAGS_libevent@
-tor_resolve_LDADD = ../common/libor.a -lm @TOR_LIB_WS32@
+tor_resolve_LDADD = ../common/libor.a -lm @TOR_LIBEVENT_LIBS@ @TOR_LIB_WS32@
tor_gencert_SOURCES = tor-gencert.c
tor_gencert_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
@TOR_LDFLAGS_libevent@
tor_gencert_LDADD = ../common/libor.a ../common/libor-crypto.a \
- -lm -lz -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
+ -lm -lz @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@
tor_checkkey_SOURCES = tor-checkkey.c
tor_checkkey_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
@TOR_LDFLAGS_libevent@
tor_checkkey_LDADD = ../common/libor.a ../common/libor-crypto.a \
- -lm -lz -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
+ -lm -lz @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@