aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac65
1 files changed, 47 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index b5cacd06a4..6c6add1876 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2017, The Tor Project, Inc.
dnl See LICENSE for licensing information
AC_PREREQ([2.63])
-AC_INIT([tor],[0.3.2.10-dev])
+AC_INIT([tor],[0.3.3.3-alpha-dev])
AC_CONFIG_SRCDIR([src/or/main.c])
AC_CONFIG_MACRO_DIR([m4])
@@ -59,6 +59,8 @@ AC_ARG_ENABLE(rust,
AS_HELP_STRING(--enable-rust, [enable rust integration]))
AC_ARG_ENABLE(cargo-online-mode,
AS_HELP_STRING(--enable-cargo-online-mode, [Allow cargo to make network requests to fetch crates. For builds with rust only.]))
+AC_ARG_ENABLE(restart-debugging,
+ AS_HELP_STRING(--enable-restart-debugging, [Build Tor with support for debugging in-process restart. Developers only.]))
if test "x$enable_coverage" != "xyes" -a "x$enable_asserts_in_tests" = "xno" ; then
AC_MSG_ERROR([Can't disable assertions outside of coverage build])
@@ -107,6 +109,10 @@ AC_ARG_ENABLE(systemd,
* ) AC_MSG_ERROR(bad value for --enable-systemd) ;;
esac], [systemd=auto])
+if test "$enable_restart_debugging" = "yes"; then
+ AC_DEFINE(ENABLE_RESTART_DEBUGGING, 1,
+ [Defined if we're building with support for in-process restart debugging.])
+fi
# systemd support
@@ -204,6 +210,20 @@ if test x$enable_event_tracing_debug = xyes; then
AC_DEFINE([TOR_EVENT_TRACING_ENABLED], [1], [Compile the event tracing instrumentation])
fi
+dnl Enable Android only features.
+AC_ARG_ENABLE(android,
+ AS_HELP_STRING(--enable-android, [build with Android features enabled]))
+AM_CONDITIONAL([USE_ANDROID], [test "x$enable_android" = "xyes"])
+
+if test "x$enable_android" = "xyes"; then
+ AC_DEFINE([USE_ANDROID], [1], [Compile with Android specific features enabled])
+
+ dnl Check if the Android log library is available.
+ AC_CHECK_HEADERS([android/log.h])
+ AC_SEARCH_LIBS(__android_log_write, [log])
+
+fi
+
dnl check for the correct "ar" when cross-compiling.
dnl (AM_PROG_AR was new in automake 1.11.2, which we do not yet require,
dnl so kludge up a replacement for the case where it isn't there yet.)
@@ -375,6 +395,7 @@ AH_BOTTOM([
AM_CONDITIONAL(BUILD_NT_SERVICES, test "x$bwin32" = "xtrue")
+AM_CONDITIONAL(BUILD_LIBTORRUNNER, test "x$bwin32" != "xtrue")
dnl Enable C99 when compiling with MIPSpro
AC_MSG_CHECKING([for MIPSpro compiler])
@@ -417,22 +438,27 @@ if test "x$enable_rust" = "xyes"; then
dnl When we're not allowed to touch the network, we need crate dependencies
dnl locally available.
AC_MSG_CHECKING([rust crate dependencies])
- AC_ARG_VAR([RUST_DEPENDENCIES], [path to directory with local crate mirror])
- if test "x$RUST_DEPENDENCIES" = "x"; then
- RUST_DEPENDENCIES="$srcdir/src/ext/rust/"
+ AC_ARG_VAR([TOR_RUST_DEPENDENCIES], [path to directory with local crate mirror])
+ if test "x$TOR_RUST_DEPENDENCIES" = "x"; then
+ TOR_RUST_DEPENDENCIES="$srcdir/src/ext/rust/"
NEED_MOD=1
fi
- if test ! -d "$RUST_DEPENDENCIES"; then
- AC_MSG_ERROR([Rust dependency directory $RUST_DEPENDENCIES does not exist. Specify a dependency directory using the RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.])
+ if test ! -d "$TOR_RUST_DEPENDENCIES"; then
+ AC_MSG_ERROR([Rust dependency directory $TOR_RUST_DEPENDENCIES does not exist. Specify a dependency directory using the TOR_RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.])
+ ERRORED=1
fi
for dep in $rust_crates; do
- if test ! -d "$RUST_DEPENDENCIES"/"$dep"; then
- AC_MSG_ERROR([Failure to find rust dependency $RUST_DEPENDENCIES/$dep. Specify a dependency directory using the RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.])
+ if test ! -d "$TOR_RUST_DEPENDENCIES"/"$dep"; then
+ AC_MSG_ERROR([Failure to find rust dependency $TOR_RUST_DEPENDENCIES/$dep. Specify a dependency directory using the TOR_RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.])
+ ERRORED=1
fi
done
if test "x$NEED_MOD" = "x1"; then
dnl When looking for dependencies from cargo, pick right directory
- RUST_DEPENDENCIES="../../src/ext/rust"
+ TOR_RUST_DEPENDENCIES="../../src/ext/rust"
+ fi
+ if test "x$ERRORED" = "x"; then
+ AC_MSG_RESULT([yes])
fi
fi
@@ -448,17 +474,18 @@ if test "x$enable_rust" = "xyes"; then
dnl For now both MSVC and MinGW rust libraries will output static libs with
dnl the MSVC naming convention.
if test "$bwin32" = "true"; then
- TOR_RUST_UTIL_STATIC_NAME=tor_util.lib
+ TOR_RUST_STATIC_NAME=tor_rust.lib
else
- TOR_RUST_UTIL_STATIC_NAME=libtor_util.a
+ TOR_RUST_STATIC_NAME=libtor_rust.a
fi
- AC_SUBST(TOR_RUST_UTIL_STATIC_NAME)
+ AC_SUBST(TOR_RUST_STATIC_NAME)
AC_SUBST(CARGO_ONLINE)
AC_SUBST(RUST_DL)
dnl Let's check the rustc version, too
AC_MSG_CHECKING([rust version])
+ RUSTC_VERSION=`$RUSTC --version`
RUSTC_VERSION_MAJOR=`$RUSTC --version | cut -d ' ' -f 2 | cut -d '.' -f 1`
RUSTC_VERSION_MINOR=`$RUSTC --version | cut -d ' ' -f 2 | cut -d '.' -f 2`
if test "x$RUSTC_VERSION_MAJOR" = "x" -o "x$RUSTC_VERSION_MINOR" = "x"; then
@@ -467,6 +494,7 @@ if test "x$enable_rust" = "xyes"; then
if test "$RUSTC_VERSION_MAJOR" -lt 2 -a "$RUSTC_VERSION_MINOR" -lt 14; then
AC_MSG_ERROR([rustc must be at least version 1.14])
fi
+ AC_MSG_RESULT([$RUSTC_VERSION])
fi
AC_SUBST(TOR_RUST_EXTRA_LIBS)
@@ -516,6 +544,7 @@ AC_CHECK_FUNCS(
llround \
localtime_r \
lround \
+ mach_approximate_time \
memmem \
memset_s \
pipe \
@@ -544,7 +573,7 @@ AC_CHECK_FUNCS(
# Apple messed up when they added two functions functions in Sierra: they
# forgot to decorate them with appropriate AVAILABLE_MAC_OS_VERSION
# checks. So we should only probe for those functions if we are sure that we
-# are not targetting OSX 10.11 or earlier.
+# are not targeting OSX 10.11 or earlier.
AC_MSG_CHECKING([for a pre-Sierra OSX build target])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef __APPLE__
@@ -740,7 +769,7 @@ TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI $TOR_LIB_WS
[#include <openssl/ssl.h>],
[struct ssl_method_st; const struct ssl_method_st *TLSv1_1_method(void);],
[TLSv1_1_method();], [],
- [/usr/local/opt/openssl /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/athena /opt/openssl])
+ [/usr/local/opt/openssl /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /opt/openssl])
dnl XXXX check for OPENSSL_VERSION_NUMBER == SSLeay()
@@ -998,12 +1027,12 @@ if test "$fragile_hardening" = "yes"; then
TOR_TRY_COMPILE_WITH_CFLAGS([-fsanitize=address], also_link, CFLAGS_ASAN="-fsanitize=address", true)
if test "$tor_cv_cflags__fsanitize_address" = "yes" && test "$tor_can_link__fsanitize_address" != "yes"; then
- AC_MSG_ERROR([The compiler supports -fsanitize=address, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libubsan.so, and with Clang you need libclang_rt.ubsan*])
+ AC_MSG_ERROR([The compiler supports -fsanitize=address, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libubsan.*, and with Clang you need libclang_rt.ubsan*])
fi
TOR_TRY_COMPILE_WITH_CFLAGS([-fsanitize=undefined], also_link, CFLAGS_UBSAN="-fsanitize=undefined", true)
if test "$tor_cv_cflags__fsanitize_address" = "yes" && test "$tor_can_link__fsanitize_address" != "yes"; then
- AC_MSG_ERROR([The compiler supports -fsanitize=undefined, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libasan.so, and with Clang you need libclang_rt.ubsan*])
+ AC_MSG_ERROR([The compiler supports -fsanitize=undefined, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libasan.*, and with Clang you need libclang_rt.ubsan*])
fi
TOR_CHECK_CFLAGS([-fno-omit-frame-pointer])
@@ -1244,6 +1273,7 @@ AC_CHECK_HEADERS([assert.h \
pwd.h \
readpassphrase.h \
stdint.h \
+ stdatomic.h \
sys/eventfd.h \
sys/file.h \
sys/ioctl.h \
@@ -2001,7 +2031,6 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then
-Winvalid-source-encoding
-Winvalid-token-paste
-Wknr-promoted-parameter
- -Wlanguage-extension-token
-Wlarge-by-value-copy
-Wliteral-conversion
-Wliteral-range
@@ -2027,7 +2056,7 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then
-Wnon-literal-null-conversion
-Wnon-pod-varargs
-Wnonportable-cfstrings
- -Wnormalized=id
+ -Wnormalized=nfkc
-Wnull-arithmetic
-Wnull-character
-Wnull-conversion