From 43213fecfad863e2c9e47accde9b76496ff6d1e5 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Sun, 25 Dec 2016 11:58:04 +0900 Subject: [PATCH] Cleaned up openssl automake script. --- configure.ac | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/configure.ac b/configure.ac index 27e33570..33f755c9 100644 --- a/configure.ac +++ b/configure.ac @@ -65,41 +65,8 @@ CFLAGS="$PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CFLAGS" CXXFLAGS="$PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CXXFLAGS" LIBS="$PTHREAD_LIBS $CPPUNIT_LIBS $LIBS" -AC_ARG_ENABLE(openssl, - [ --disable-openssl Don't use OpenSSL's SHA1 implementation.], - [ - if test "$enableval" = "yes"; then -dnl move to scripts. - PKG_CHECK_MODULES(OPENSSL, libcrypto, - CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS"; - LIBS="$LIBS $OPENSSL_LIBS") - - AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.) - AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.) - AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)]) - - else - AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.) - fi - ],[ - PKG_CHECK_MODULES(OPENSSL, libcrypto, - CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS"; - LIBS="$LIBS $OPENSSL_LIBS") - - AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.) - AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.) - AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)]) - ] -) - -AC_ARG_ENABLE(cyrus-rc4, - [ --enable-cyrus-rc4=PFX Use Cyrus RC4 implementation.], - [ - CXXFLAGS="$CXXFLAGS -I${enableval}/include"; - LIBS="$LIBS -lrc4 -L${enableval}/lib" - AC_DEFINE(USE_CYRUS_RC4, 1, Using Cyrus RC4 implementation.) - ] -) +TORRENT_ARG_OPENSSL +TORRENT_ARG_CYRUS_RC4 AC_CHECK_FUNCS(posix_memalign)