Newer
Older
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 "
# These interfere with building main() { return 0; }, which autoconf
# likes to use as its default program.
CFLAGS="$CFLAGS -Wold-style-definition -Wmissing-declarations"
if test "$tor_cv_cflags__Wnull_dereference" = "yes"; then
AC_DEFINE([HAVE_CFLAG_WNULL_DEREFERENCE], 1, [True if we have -Wnull-dereference])
if test "$tor_cv_cflags__Woverlength_strings" = "yes"; then
AC_DEFINE([HAVE_CFLAG_WOVERLENGTH_STRINGS], 1, [True if we have -Woverlength-strings])
fi
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.
CFLAGS="$CFLAGS -Werror"
fi
if test "$enable_coverage" = "yes" && test "$have_clang" = "no"; then
case "$host_os" in
darwin*)
AC_MSG_WARN([Tried to enable coverage on OSX without using the clang compiler. This might not work! If coverage fails, use CC=clang when configuring with --enable-coverage.])
esac
fi
CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib"
AC_CONFIG_FILES([
Doxyfile
Makefile
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
scripts/maint/checkOptionDocs.pl
scripts/maint/updateVersions.pl
if test "x$asciidoc" = "xtrue" && test "$ASCIIDOC" = "none"; then
regular_mans="doc/tor doc/tor-gencert doc/tor-resolve doc/torify"
for file in $regular_mans ; do
if ! [[ -f "$srcdir/$file.1.in" ]] || ! [[ -f "$srcdir/$file.html.in" ]] ; then
echo "==================================";
echo;
echo "Building Tor has failed since manpages cannot be built.";
echo;
echo "You need asciidoc installed to be able to build the manpages.";
echo "To build without manpages, use the --disable-asciidoc argument";
echo "when calling configure.";
echo;
echo "==================================";
exit 1;
fi
done
fi
if test "$fragile_hardening" = "yes"; then
AC_MSG_WARN([
============
Warning! Building Tor with --enable-fragile-hardening (also known as
--enable-expensive-hardening) makes some kinds of attacks harder, but makes
other kinds of attacks easier. A Tor instance build with this option will be
somewhat less vulnerable to remote code execution, arithmetic overflow, or
out-of-bounds read/writes... but at the cost of becoming more vulnerable to
denial of service attacks. For more information, see
https://trac.torproject.org/projects/tor/wiki/doc/TorFragileHardening
============
])
fi