summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-04 20:21:07 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-04 20:21:07 -0400
commit0db5c549571eb0098a3f709ffb25c2e4909ca01d (patch)
tree0dbf1fbe9b25ddab292eadca50703f34de4c919e /configure.ac
parentfd994f55c441922d3c5ae19ad5c254a1ae1eccfd (diff)
parentd644c93ae9373f99d95870c7b752b790f8714201 (diff)
downloadtor-0db5c549571eb0098a3f709ffb25c2e4909ca01d.tar.gz
tor-0db5c549571eb0098a3f709ffb25c2e4909ca01d.zip
Merge branch 'nss_squashed' into nss_merge
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 518d105a12..32a0750e74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,8 @@ 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)]))
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])
@@ -64,6 +66,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";
@@ -841,8 +853,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"
@@ -942,6 +967,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.