summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac431
1 files changed, 246 insertions, 185 deletions
diff --git a/configure.ac b/configure.ac
index 14c87cd1bb..d992b8d01b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
dnl Copyright (c) 2001-2004, Roger Dingledine
dnl Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
-dnl Copyright (c) 2007-2017, The Tor Project, Inc.
+dnl Copyright (c) 2007-2018, The Tor Project, Inc.
dnl See LICENSE for licensing information
AC_PREREQ([2.63])
-AC_INIT([tor],[0.3.4.9-dev])
-AC_CONFIG_SRCDIR([src/or/main.c])
+AC_INIT([tor],[0.3.5.6-rc-dev])
+AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
AC_CONFIG_MACRO_DIR([m4])
# "foreign" means we don't follow GNU package layout standards
@@ -21,18 +21,8 @@ AC_CANONICAL_HOST
PKG_PROG_PKG_CONFIG
-if test -f "/etc/redhat-release"; then
- if test -f "/usr/kerberos/include"; then
- CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
- fi
-fi
-
-# Not a no-op; we want to make sure that CPPFLAGS is set before we use
-# the += operator on it in src/or/Makefile.am
-CPPFLAGS="$CPPFLAGS -I\${top_srcdir}/src/common"
-
AC_ARG_ENABLE(openbsd-malloc,
- AS_HELP_STRING(--enable-openbsd-malloc, [use malloc code from OpenBSD. Linux only]))
+ AS_HELP_STRING(--enable-openbsd-malloc, [use malloc code from OpenBSD. Linux only. Deprecated: see --with-malloc]))
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,
@@ -63,6 +53,10 @@ AC_ARG_ENABLE(restart-debugging,
AS_HELP_STRING(--enable-restart-debugging, [Build Tor with support for debugging in-process restart. Developers only.]))
AC_ARG_ENABLE(zstd-advanced-apis,
AS_HELP_STRING(--disable-zstd-advanced-apis, [Build without support for zstd's "static-only" APIs.]))
+AC_ARG_ENABLE(nss,
+ AS_HELP_STRING(--enable-nss, [Use Mozilla's NSS TLS library. (EXPERIMENTAL)]))
+AC_ARG_ENABLE(pic,
+ AS_HELP_STRING(--enable-pic, [Build Tor's binaries as position-independent code, suitable to link as a library.]))
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])
@@ -74,6 +68,16 @@ AM_CONDITIONAL(DISABLE_ASSERTS_IN_UNIT_TESTS, test "x$enable_asserts_in_tests" =
AM_CONDITIONAL(LIBFUZZER_ENABLED, test "x$enable_libfuzzer" = "xyes")
AM_CONDITIONAL(OSS_FUZZ_ENABLED, test "x$enable_oss_fuzz" = "xyes")
AM_CONDITIONAL(USE_RUST, test "x$enable_rust" = "xyes")
+AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
+AM_CONDITIONAL(USE_OPENSSL, test "x$enable_nss" != "xyes")
+
+if test "x$enable_nss" = "xyes"; then
+ AC_DEFINE(ENABLE_NSS, 1,
+ [Defined if we're building with NSS.])
+else
+ AC_DEFINE(ENABLE_OPENSSL, 1,
+ [Defined if we're building with OpenSSL or LibreSSL])
+fi
if test "$enable_static_tor" = "yes"; then
enable_static_libevent="yes";
@@ -92,8 +96,6 @@ if test "$enable_memory_sentinels" = "no"; then
[Defined if we're turning off memory safety code to look for bugs])
fi
-AM_CONDITIONAL(USE_OPENBSD_MALLOC, test "x$enable_openbsd_malloc" = "xyes")
-
AC_ARG_ENABLE(asciidoc,
AS_HELP_STRING(--disable-asciidoc, [don't use asciidoc (disables building of manpages)]),
[case "${enableval}" in
@@ -191,13 +193,6 @@ if test "$enable_local_appdata" = "yes"; then
[Defined if we default to host local appdata paths on Windows])
fi
-# Tor2web mode flag
-AC_ARG_ENABLE(tor2web-mode,
- AS_HELP_STRING(--enable-tor2web-mode, [support tor2web non-anonymous mode]),
-[if test "x$enableval" = "xyes"; then
- CFLAGS="$CFLAGS -D ENABLE_TOR2WEB_MODE=1"
-fi])
-
AC_ARG_ENABLE(tool-name-check,
AS_HELP_STRING(--disable-tool-name-check, [check for sanely named toolchain when cross-compiling]))
@@ -432,7 +427,7 @@ AH_BOTTOM([
#endif
])
-
+AM_CONDITIONAL(WIN32, test "x$bwin32" = "xtrue")
AM_CONDITIONAL(BUILD_NT_SERVICES, test "x$bwin32" = "xtrue")
AM_CONDITIONAL(BUILD_LIBTORRUNNER, test "x$bwin32" != "xtrue")
@@ -584,55 +579,59 @@ AM_CONDITIONAL(THREADS_WIN32, test "$bwin32" = "true")
AM_CONDITIONAL(THREADS_PTHREADS, test "$bwin32" = "false")
AC_CHECK_FUNCS(
- _NSGetEnviron \
+ _NSGetEnviron \
RtlSecureZeroMemory \
SecureZeroMemory \
- accept4 \
- backtrace \
- backtrace_symbols_fd \
+ accept4 \
+ backtrace \
+ backtrace_symbols_fd \
eventfd \
explicit_bzero \
timingsafe_memcmp \
- flock \
- ftime \
- get_current_dir_name \
- getaddrinfo \
- getifaddrs \
- getpass \
- getrlimit \
- gettimeofday \
- gmtime_r \
+ flock \
+ ftime \
+ get_current_dir_name \
+ getaddrinfo \
+ getdelim \
+ getifaddrs \
+ getline \
+ getpass \
+ getrlimit \
+ gettimeofday \
+ gmtime_r \
gnu_get_libc_version \
htonll \
- inet_aton \
- ioctl \
- issetugid \
- llround \
- localtime_r \
- lround \
- memmem \
- memset_s \
- mmap \
+ inet_aton \
+ ioctl \
+ issetugid \
+ llround \
+ localtime_r \
+ lround \
+ memmem \
+ memset_s \
+ mmap \
pipe \
pipe2 \
- prctl \
+ prctl \
readpassphrase \
- rint \
- sigaction \
- socketpair \
+ rint \
+ sigaction \
+ socketpair \
statvfs \
- strlcat \
- strlcpy \
+ strncasecmp \
+ strcasecmp \
+ strlcat \
+ strlcpy \
strnlen \
- strptime \
- strtok_r \
- strtoull \
- sysconf \
+ strptime \
+ strtok_r \
+ strtoull \
+ sysconf \
sysctl \
truncate \
- uname \
+ uname \
usleep \
- vasprintf \
+ vasprintf \
_vscprintf
)
@@ -856,8 +855,21 @@ LIBS="$save_LIBS"
AC_SUBST(TOR_LIB_MATH)
dnl ------------------------------------------------------
+dnl Hello, NSS. You're new around here.
+if test "x$enable_nss" = "xyes"; then
+ PKG_CHECK_MODULES(NSS,
+ [nss],
+ [have_nss=yes],
+ [have_nss=no; AC_MSG_ERROR([You asked for NSS but I can't find it.])])
+ AC_SUBST(NSS_CFLAGS)
+ AC_SUBST(NSS_LIBS)
+fi
+
+dnl ------------------------------------------------------
dnl Where do you live, openssl? And how do we call you?
+if test "x$enable_nss" != "xyes"; then
+
tor_openssl_pkg_redhat="openssl"
tor_openssl_pkg_debian="libssl-dev"
tor_openssl_devpkg_redhat="openssl-devel"
@@ -936,6 +948,7 @@ AC_CHECK_MEMBERS([struct ssl_method_st.get_cipher_by_char], , ,
])
AC_CHECK_FUNCS([ \
+ ERR_load_KDF_strings \
SSL_SESSION_get_master_key \
SSL_get_server_random \
SSL_get_client_ciphers \
@@ -958,6 +971,11 @@ AC_CHECK_SIZEOF(SHA_CTX, , [AC_INCLUDES_DEFAULT()
#include <openssl/sha.h>
])
+fi # enable_nss
+
+dnl ======================================================================
+dnl Can we use KIST?
+
dnl Define the set of checks for KIST scheduler support.
AC_DEFUN([CHECK_KIST_SUPPORT],[
dnl KIST needs struct tcp_info and for certain members to exist.
@@ -1123,6 +1141,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
#error
#endif])], have_clang=yes, have_clang=no)
+if test "x$enable_pic" = "xyes"; then
+ TOR_CHECK_CFLAGS(-fPIC)
+fi
+
if test "x$enable_gcc_hardening" != "xno"; then
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
if test "x$have_clang" = "xyes"; then
@@ -1142,7 +1164,13 @@ m4_ifdef([AS_VAR_IF],[
TOR_CHECK_CFLAGS(-Wstack-protector)
TOR_CHECK_CFLAGS(--param ssp-buffer-size=1)
if test "$bwin32" = "false" && test "$enable_libfuzzer" != "yes" && test "$enable_oss_fuzz" != "yes"; then
- TOR_CHECK_CFLAGS(-fPIE)
+ if test "$enable_pic" != "yes"; then
+ # If we have already enabled -fPIC, then we don't also need to
+ # compile with -fPIE...
+ TOR_CHECK_CFLAGS(-fPIE)
+ fi
+ # ... but we want to link our executables with -pie in any case, since
+ # they're executables, not a library.
TOR_CHECK_LDFLAGS(-pie, "$all_ldflags_for_check", "$all_libs_for_check")
fi
TOR_TRY_COMPILE_WITH_CFLAGS(-fwrapv, also_link, CFLAGS_FWRAPV="-fwrapv", true)
@@ -1183,17 +1211,17 @@ dnl variable.
RUST_LINKER_OPTIONS=""
if test "x$have_clang" = "xyes"; then
if test "x$CFLAGS_ASAN" != "x"; then
- RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS $CFLAGS_ASAN"
+ RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=$CFLAGS_ASAN -Cdefault-linker-libraries"
fi
if test "x$CFLAGS_UBSAN" != "x"; then
- RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS $CFLAGS_UBSAN"
+ RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=$CFLAGS_UBSAN -Cdefault-linker-libraries"
fi
else
if test "x$CFLAGS_ASAN" != "x"; then
- RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -lasan"
+ RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=-fsanitize=address -Cdefault-linker-libraries"
fi
if test "x$CFLAGS_UBSAN" != "x"; then
- RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -lubsan"
+ RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=-fsanitize=undefined -Cdefault-linker-libraries"
fi
fi
AC_SUBST(RUST_LINKER_OPTIONS)
@@ -1402,60 +1430,58 @@ AC_SUBST(CURVE25519_LIBS)
dnl Make sure to enable support for large off_t if available.
AC_SYS_LARGEFILE
-AC_CHECK_HEADERS([assert.h \
- errno.h \
- fcntl.h \
- signal.h \
- string.h \
- sys/capability.h \
- sys/fcntl.h \
- sys/stat.h \
- sys/time.h \
- sys/types.h \
- time.h \
- unistd.h \
- arpa/inet.h \
- crt_externs.h \
- execinfo.h \
- gnu/libc-version.h \
- grp.h \
- ifaddrs.h \
- inttypes.h \
- limits.h \
- linux/types.h \
- machine/limits.h \
- malloc.h \
- malloc/malloc.h \
- malloc_np.h \
- netdb.h \
- netinet/in.h \
- netinet/in6.h \
- pwd.h \
- readpassphrase.h \
- stdint.h \
- stdatomic.h \
- sys/eventfd.h \
- sys/file.h \
- sys/ioctl.h \
- sys/limits.h \
- sys/mman.h \
- sys/param.h \
- sys/prctl.h \
+AC_CHECK_HEADERS([errno.h \
+ fcntl.h \
+ signal.h \
+ string.h \
+ sys/capability.h \
+ sys/fcntl.h \
+ sys/stat.h \
+ sys/time.h \
+ sys/types.h \
+ time.h \
+ unistd.h \
+ arpa/inet.h \
+ crt_externs.h \
+ execinfo.h \
+ gnu/libc-version.h \
+ grp.h \
+ ifaddrs.h \
+ inttypes.h \
+ limits.h \
+ linux/types.h \
+ machine/limits.h \
+ malloc.h \
+ malloc/malloc.h \
+ malloc_np.h \
+ netdb.h \
+ netinet/in.h \
+ netinet/in6.h \
+ pwd.h \
+ readpassphrase.h \
+ stdatomic.h \
+ sys/eventfd.h \
+ sys/file.h \
+ sys/ioctl.h \
+ sys/limits.h \
+ sys/mman.h \
+ sys/param.h \
+ sys/prctl.h \
sys/random.h \
- sys/resource.h \
- sys/select.h \
- sys/socket.h \
- sys/statvfs.h \
- sys/syscall.h \
- sys/sysctl.h \
- sys/syslimits.h \
- sys/time.h \
- sys/types.h \
- sys/un.h \
- sys/utime.h \
- sys/wait.h \
- syslog.h \
- utime.h])
+ sys/resource.h \
+ sys/select.h \
+ sys/socket.h \
+ sys/statvfs.h \
+ sys/syscall.h \
+ sys/sysctl.h \
+ sys/syslimits.h \
+ sys/time.h \
+ sys/types.h \
+ sys/un.h \
+ sys/utime.h \
+ sys/wait.h \
+ syslog.h \
+ utime.h])
AC_CHECK_HEADERS(sys/param.h)
@@ -1556,22 +1582,6 @@ AC_CHECK_MEMBERS([struct timeval.tv_sec], , ,
#include <sys/time.h>
#endif])
-dnl In case we aren't given a working stdint.h, we'll need to grow our own.
-dnl Watch out.
-
-AC_CHECK_SIZEOF(int8_t)
-AC_CHECK_SIZEOF(int16_t)
-AC_CHECK_SIZEOF(int32_t)
-AC_CHECK_SIZEOF(int64_t)
-AC_CHECK_SIZEOF(uint8_t)
-AC_CHECK_SIZEOF(uint16_t)
-AC_CHECK_SIZEOF(uint32_t)
-AC_CHECK_SIZEOF(uint64_t)
-AC_CHECK_SIZEOF(intptr_t)
-AC_CHECK_SIZEOF(uintptr_t)
-
-dnl AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, intptr_t, uintptr_t])
-
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
@@ -1836,43 +1846,75 @@ if test "$tor_cv_uint8_uchar" = "no"; then
AC_MSG_ERROR([We assume that uint8_t is the same type as unsigned char, but your compiler disagrees.])
fi
-# Whether we should use the dmalloc memory allocation debugging library.
-AC_MSG_CHECKING(whether to use dmalloc (debug memory allocation library))
-AC_ARG_WITH(dmalloc,
-AS_HELP_STRING(--with-dmalloc, [use debug memory allocation library]),
-[if [[ "$withval" = "yes" ]]; then
- dmalloc=1
- AC_MSG_RESULT(yes)
-else
- dmalloc=1
- AC_MSG_RESULT(no)
-fi], [ dmalloc=0; AC_MSG_RESULT(no) ]
-)
-
-if [[ $dmalloc -eq 1 ]]; then
- AC_CHECK_HEADERS(dmalloc.h, , AC_MSG_ERROR(dmalloc header file not found. Do you have the development files for dmalloc installed?))
- AC_SEARCH_LIBS(dmalloc_malloc, [dmallocth dmalloc], , AC_MSG_ERROR(Libdmalloc library not found. If you enable it you better have it installed.))
- AC_DEFINE(USE_DMALLOC, 1, [Debug memory allocation library])
- AC_CHECK_FUNCS(dmalloc_strdup dmalloc_strndup)
-fi
-
AC_ARG_WITH(tcmalloc,
-AS_HELP_STRING(--with-tcmalloc, [use tcmalloc memory allocation library]),
+AS_HELP_STRING(--with-tcmalloc, [use tcmalloc memory allocation library. Deprecated; see --with-malloc]),
[ tcmalloc=yes ], [ tcmalloc=no ])
-if test "x$tcmalloc" = "xyes"; then
- LDFLAGS="-ltcmalloc $LDFLAGS"
-fi
+default_malloc=system
-using_custom_malloc=no
-if test "x$enable_openbsd_malloc" = "xyes"; then
- using_custom_malloc=yes
+if test "x$enable_openbsd_malloc" = "xyes" ; then
+ AC_MSG_NOTICE([The --enable-openbsd-malloc argument is deprecated; use --with-malloc=openbsd instead.])
+ default_malloc=openbsd
fi
+
if test "x$tcmalloc" = "xyes"; then
- using_custom_malloc=yes
+ AC_MSG_NOTICE([The --with-tcmalloc argument is deprecated; use --with-malloc=tcmalloc instead.])
+ default_malloc=tcmalloc
fi
-if test "$using_custom_malloc" = "no"; then
- AC_CHECK_FUNCS(mallinfo)
+
+AC_ARG_WITH(malloc,
+ AS_HELP_STRING([--with-malloc=[system,jemalloc,tcmalloc,openbsd]],
+ [select special malloc implementation [system]]),
+ [ malloc="$with_malloc" ], [ malloc="$default_malloc" ])
+
+AS_CASE([$malloc],
+ [tcmalloc], [
+ PKG_CHECK_MODULES([TCMALLOC],
+ [libtcmalloc],
+ have_tcmalloc=yes,
+ have_tcmalloc=no)
+
+ if test "x$have_tcmalloc" = "xno" ; then
+ AC_MSG_ERROR([Unable to find tcmalloc requested by --with-malloc.])
+ fi
+
+ CFLAGS="$CFLAGS $TCMALLOC_CFLAGS"
+ LIBS="$TCMALLOC_LIBS $LIBS"
+ ],
+
+ [jemalloc], [
+ PKG_CHECK_MODULES([JEMALLOC],
+ [jemalloc],
+ have_jemalloc=yes,
+ have_jemalloc=no)
+
+ if test "x$have_tcmalloc" = "xno" ; then
+ AC_MSG_ERROR([Unable to find jemalloc requested by --with-malloc.])
+ fi
+
+ CFLAGS="$CFLAGS $JEMALLOC_CFLAGS"
+ LIBS="$JEMALLOC_LIBS $LIBS"
+ using_custom_malloc=yes
+ ],
+
+ [openbsd], [
+ AC_MSG_WARN([The openbsd malloc port is deprecated in Tor 0.3.5 and will be removed in a future version.])
+ enable_openbsd_malloc=yes
+ ],
+
+ [system], [
+ # handle this later, including the jemalloc fallback
+ AC_CHECK_FUNCS(mallinfo)
+ ],
+
+ [AC_MSG_ERROR([--with-malloc=`$with_malloc' not supported, see --help])
+])
+
+AM_CONDITIONAL(USE_OPENBSD_MALLOC, test "x$enable_openbsd_malloc" = "xyes")
+
+if test "$malloc" != "system"; then
+ # Tell the C compiler not to use the system allocator functions.
+ TOR_CHECK_CFLAGS([-fno-builtin-malloc -fno-builtin-realloc -fno-builtin-calloc -fno-builtin-free])
fi
if test "$using_custom_malloc" = "yes"; then
# Tell the C compiler not to use the system allocator functions.
@@ -2087,6 +2129,8 @@ case "$host_os" in
LDFLAGS="$LDFLAGS -dead_strip" ;;
esac
+TOR_WARNING_FLAGS=""
+
# Add some more warnings which we use in development but not in the
# released versions. (Some relevant gcc versions can't handle these.)
#
@@ -2104,6 +2148,8 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then
CFLAGS="$CFLAGS -Wno-system-headers" ;;
esac
+ CFLAGS_NOWARNINGS="$CFLAGS"
+
# GCC4.3 users once report trouble with -Wstrict-overflow=5. GCC5 users
# have it work better.
# CFLAGS="$CFLAGS -Wstrict-overflow=1"
@@ -2319,7 +2365,9 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then
-Wvisibility
-Wvla-extension
-Wzero-length-array
- ], [ TOR_CHECK_CFLAGS([warning_flag]) ])
+ ], [ TOR_TRY_COMPILE_WITH_CFLAGS(warning_flag, [],
+ [TOR_WARNING_FLAGS="$TOR_WARNING_FLAGS warning_flag" CFLAGS="$CFLAGS warning_flag"], true)
+ ])
dnl We should re-enable this in some later version. Clang doesn't
dnl mind, but it causes trouble with GCC.
@@ -2333,16 +2381,19 @@ dnl -Wthread-safety-attributes
dnl -Wthread-safety-beta
dnl -Wthread-safety-precise
- CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith"
- CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings"
- CFLAGS="$CFLAGS -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2"
- CFLAGS="$CFLAGS -Wwrite-strings"
- CFLAGS="$CFLAGS -Wnested-externs -Wbad-function-cast -Wswitch-enum"
- CFLAGS="$CFLAGS -Waggregate-return -Wpacked -Wunused"
- CFLAGS="$CFLAGS -Wunused-parameter "
+ W_FLAGS="$W_FLAGS -W -Wfloat-equal -Wundef -Wpointer-arith"
+ W_FLAGS="$W_FLAGS -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings"
+ W_FLAGS="$W_FLAGS -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2"
+ W_FLAGS="$W_FLAGS -Wwrite-strings"
+ W_FLAGS="$W_FLAGS -Wnested-externs -Wbad-function-cast -Wswitch-enum"
+ W_FLAGS="$W_FLAGS -Waggregate-return -Wpacked -Wunused"
+ W_FLAGS="$W_FLAGS -Wunused-parameter "
# These interfere with building main() { return 0; }, which autoconf
# likes to use as its default program.
- CFLAGS="$CFLAGS -Wold-style-definition -Wmissing-declarations"
+ W_FLAGS="$W_FLAGS -Wold-style-definition -Wmissing-declarations"
+
+ TOR_WARNING_FLAGS="$TOR_WARNING_FLAGS $W_FLAGS"
+ CFLAGS="$CFLAGS $W_FLAGS"
if test "$tor_cv_cflags__Wnull_dereference" = "yes"; then
AC_DEFINE([HAVE_CFLAG_WNULL_DEREFERENCE], 1, [True if we have -Wnull-dereference])
@@ -2354,6 +2405,8 @@ dnl -Wthread-safety-precise
AC_DEFINE([HAVE_CFLAG_WUNUSED_CONST_VARIABLE], 1, [True if we have -Wunused-const-variable])
fi
+ CFLAGS="$CFLAGS_NOWARNINGS"
+
if test "x$enable_fatal_warnings" = "xyes"; then
# I'd like to use TOR_CHECK_CFLAGS here, but I can't, since the
# default autoconf programs are full of errors.
@@ -2362,6 +2415,14 @@ dnl -Wthread-safety-precise
fi
+AC_SUBST(TOR_WARNING_FLAGS)
+
+echo "$TOR_WARNING_FLAGS">warning_flags
+
+TOR_TRY_COMPILE_WITH_CFLAGS([@warning_flags], [],
+ CFLAGS="$CFLAGS @warning_flags",
+ CFLAGS="$CFLAGS $TOR_WARNING_FLAGS")
+
if test "$enable_coverage" = "yes" && test "$have_clang" = "no"; then
case "$host_os" in
darwin*)
@@ -2372,20 +2433,20 @@ fi
CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib"
AC_CONFIG_FILES([
- Doxyfile
- Makefile
- config.rust
- link_rust.sh
- contrib/dist/suse/tor.sh
- contrib/operator-tools/tor.logrotate
- contrib/dist/tor.sh
- contrib/dist/torctl
- contrib/dist/tor.service
- src/config/torrc.sample
- src/config/torrc.minimal
- src/rust/.cargo/config
- scripts/maint/checkOptionDocs.pl
- scripts/maint/updateVersions.pl
+ Doxyfile
+ Makefile
+ config.rust
+ contrib/dist/suse/tor.sh
+ contrib/operator-tools/tor.logrotate
+ contrib/dist/tor.sh
+ contrib/dist/torctl
+ contrib/dist/tor.service
+ src/config/torrc.sample
+ src/config/torrc.minimal
+ src/rust/.cargo/config
+ scripts/maint/checkOptionDocs.pl
+ scripts/maint/updateVersions.pl
+ warning_flags
])
if test "x$asciidoc" = "xtrue" && test "$ASCIIDOC" = "none"; then