Changeset 14441
- Timestamp:
- Jan 7, 2015, 1:19:00 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CMakeLists.txt
r14437 r14441 30 30 tr_auto_option(USE_SYSTEM_UTP "Use system utp library" AUTO) 31 31 tr_auto_option(USE_SYSTEM_B64 "Use system b64 library" AUTO) 32 tr_list_option(WITH_CRYPTO "Use specified crypto library" AUTO openssl cyassl )32 tr_list_option(WITH_CRYPTO "Use specified crypto library" AUTO openssl cyassl polarssl) 33 33 tr_auto_option(WITH_INOTIFY "Enable inotify support (on systems that support it)" AUTO) 34 34 tr_auto_option(WITH_KQUEUE "Enable kqueue support (on systems that support it)" AUTO) … … 97 97 set(OPENSSL_MINIMUM 0.9.4) 98 98 set(CYASSL_MINIMUM 3.0) 99 set(POLARSSL_MINIMUM 1.3) 99 100 set(ZLIB_MINIMUM 1.2.3) 100 101 set(GTK_MINIMUM 3.4.0) … … 156 157 set(CRYPTO_INCLUDE_DIRS ${CYASSL_INCLUDE_DIRS}) 157 158 set(CRYPTO_LIBRARIES ${CYASSL_LIBRARIES}) 159 endif() 160 endif() 161 if(WITH_CRYPTO STREQUAL "AUTO" OR WITH_CRYPTO STREQUAL "polarssl") 162 tr_get_required_flag(WITH_CRYPTO POLARSSL_IS_REQUIRED) 163 find_package(PolarSSL ${POLARSSL_MINIMUM} ${POLARSSL_IS_REQUIRED}) 164 tr_fixup_list_option(WITH_CRYPTO "polarssl" POLARSSL_FOUND "AUTO" POLARSSL_IS_REQUIRED) 165 if(WITH_CRYPTO STREQUAL "polarssl") 166 set(CRYPTO_PKG "polarssl") 167 set(CRYPTO_INCLUDE_DIRS ${POLARSSL_INCLUDE_DIRS}) 168 set(CRYPTO_LIBRARIES ${POLARSSL_LIBRARIES}) 158 169 endif() 159 170 endif() -
trunk/configure.ac
r14436 r14441 51 51 CYASSL_MINIMUM=3.0 52 52 AC_SUBST(CYASSL_MINIMUM) 53 POLARSSL_MINIMUM=0x01030000 # 1.3 54 AC_SUBST(POLARSSL_MINIMUM) 53 55 54 56 ## … … 124 126 125 127 AC_ARG_WITH([crypto], AS_HELP_STRING([--with-crypto=PKG], 126 [Use specified crypto library: auto (default), openssl, cyassl ]),128 [Use specified crypto library: auto (default), openssl, cyassl, polarssl]), 127 129 [want_crypto=$withval], [want_crypto=auto]) 128 130 … … 140 142 [AS_IF([test "x$want_crypto" = "xcyassl"], 141 143 [AC_MSG_ERROR([CyaSSL support requested, but library not found.])] 144 )] 145 ) 146 ]) 147 AS_IF([test "x$want_crypto" = "xauto" -o "x$want_crypto" = "xpolarssl"], [ 148 AC_CHECK_HEADER([polarssl/version.h], 149 [AC_EGREP_CPP([version_ok], [#include <polarssl/version.h> 150 #if defined (POLARSSL_VERSION_NUMBER) && POLARSSL_VERSION_NUMBER >= $POLARSSL_MINIMUM 151 version_ok 152 #endif], 153 [AC_CHECK_LIB([polarssl], [dhm_init], 154 [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS=""; CRYPTO_LIBS="-lpolarssl"], 155 [AS_IF([test "x$want_crypto" = "xpolarssl"], 156 [AC_MSG_ERROR([PolarSSL support requested, but library not found.])] 157 )] 158 )], 159 [AS_IF([test "x$want_crypto" = "xpolarssl"], 160 [AC_MSG_ERROR([PolarSSL support requested, but version not suitable.])] 161 )] 162 )], 163 [AS_IF([test "x$want_crypto" = "xpolarssl"], 164 [AC_MSG_ERROR([PolarSSL support requested, but headers not found.])] 142 165 )] 143 166 )
Note: See TracChangeset
for help on using the changeset viewer.