summaryrefslogtreecommitdiff
blob: 60542e4b4464337aa419fc5ecb57682cde545b79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From 43213fecfad863e2c9e47accde9b76496ff6d1e5 Mon Sep 17 00:00:00 2001
From: rakshasa <sundell.software@gmail.com>
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)