diff options
Diffstat (limited to 'Source/CTest/Curl/CMakeLists.txt')
-rw-r--r-- | Source/CTest/Curl/CMakeLists.txt | 68 |
1 files changed, 46 insertions, 22 deletions
diff --git a/Source/CTest/Curl/CMakeLists.txt b/Source/CTest/Curl/CMakeLists.txt index 06d5d91..9464e0d 100644 --- a/Source/CTest/Curl/CMakeLists.txt +++ b/Source/CTest/Curl/CMakeLists.txt @@ -12,12 +12,12 @@ SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS}) IF(${CMAKE_SYSTEM_NAME} MATCHES AIX) SET(_ALL_SOURCE 1) ENDIF(${CMAKE_SYSTEM_NAME} MATCHES AIX) - -INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) -INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) SET(libCurl_SRCS file.c @@ -73,7 +73,6 @@ ENDIF(HAVE_LIBNSL) CHECK_LIBRARY_EXISTS("dl;${CURL_LIBS}" dlopen "" HAVE_LIBDL) IF(HAVE_LIBDL) - SET(HAVE_DLOPEN 1) SET(CURL_LIBS ${CURL_LIBS} dl) ENDIF(HAVE_LIBDL) @@ -102,21 +101,39 @@ IF(HAVE_LIBZ) SET(CURL_LIBS ${CURL_LIBS} z) ENDIF(HAVE_LIBZ) -SET(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS}) +CHECK_LIBRARY_EXISTS("crypto;${CURL_LIBS}" CRYPTO_lock "" HAVE_LIBCRYPTO) +IF(HAVE_LIBCRYPTO) + SET(CURL_LIBS ${CURL_LIBS} crypto) +ENDIF(HAVE_LIBCRYPTO) -CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) -CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) -CHECK_INCLUDE_FILE("alloca.h" HAVE_ALLOCA_H) -CHECK_INCLUDE_FILE("arpa/inet.h" HAVE_ARPA_INET_H) -CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H) -CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H) -CHECK_INCLUDE_FILE("malloc.h" HAVE_MALLOC_H) -CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H) -CHECK_INCLUDE_FILE("netdb.h" HAVE_NETDB_H) -CHECK_INCLUDE_FILE("zlib.h" HAVE_ZLIB_H) -CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H) -CHECK_INCLUDE_FILE("netinet/in.h" HAVE_NETINET_IN_H) -CHECK_INCLUDE_FILE("sys/socket.h" HAVE_SYS_SOCKET_H) +CHECK_LIBRARY_EXISTS("ssl;${CURL_LIBS}" SSL_connect "" HAVE_LIBSSL) +IF(HAVE_LIBSSL) + SET(CURL_LIBS ${CURL_LIBS} ssl) +ENDIF(HAVE_LIBSSL) + +CHECK_LIBRARY_EXISTS("${CURL_LIBS}" dlopen "" HAVE_DLOPEN) + +SET(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS}) +CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) +CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) +CHECK_INCLUDE_FILE("alloca.h" HAVE_ALLOCA_H) +CHECK_INCLUDE_FILE("arpa/inet.h" HAVE_ARPA_INET_H) +CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H) +CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H) +CHECK_INCLUDE_FILE("malloc.h" HAVE_MALLOC_H) +CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H) +CHECK_INCLUDE_FILE("netdb.h" HAVE_NETDB_H) +CHECK_INCLUDE_FILE("zlib.h" HAVE_ZLIB_H) +CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H) +CHECK_INCLUDE_FILE("netinet/in.h" HAVE_NETINET_IN_H) +CHECK_INCLUDE_FILE("sys/socket.h" HAVE_SYS_SOCKET_H) +CHECK_INCLUDE_FILE("openssl/x509.h" HAVE_OPENSSL_X509_H) +CHECK_INCLUDE_FILE("openssl/engine.h" HAVE_OPENSSL_ENGINE_H) +CHECK_INCLUDE_FILE("openssl/rsa.h" HAVE_OPENSSL_RSA_H) +CHECK_INCLUDE_FILE("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H) +CHECK_INCLUDE_FILE("openssl/pem.h" HAVE_OPENSSL_PEM_H) +CHECK_INCLUDE_FILE("openssl/ssl.h" HAVE_OPENSSL_SSL_H) +CHECK_INCLUDE_FILE("openssl/err.h" HAVE_OPENSSL_ERR_H) IF(HAVE_SYS_TYPES_H) SET(TEST_NETWORK_INCLUDES ${TEST_NETWORK_INCLUDES} "sys/types.h") @@ -159,7 +176,6 @@ CHECK_INCLUDE_FILE("sockio.h" HAVE_SOCKIO_H) CHECK_INCLUDE_FILE("sys/sockio.h" HAVE_SYS_SOCKIO_H) CHECK_INCLUDE_FILE("x509.h" HAVE_X509_H) CHECK_INCLUDE_FILE("setjmp.h" HAVE_SETJMP_H) - CHECK_TYPE_SIZE(ssize_t SIZEOF_SSIZE_T) CHECK_TYPE_SIZE("long double" SIZEOF_LONG_DOUBLE) IF(NOT HAVE_SIZEOF_SSIZE_T) @@ -170,7 +186,6 @@ FIND_FILE(RANDOM_FILE urandom /dev) CHECK_FUNCTION_EXISTS(_doprnt HAVE_DOPRNT) CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) - CHECK_FUNCTION_EXISTS(socket HAVE_SOCKET) CHECK_FUNCTION_EXISTS(poll HAVE_POLL) CHECK_FUNCTION_EXISTS(select HAVE_SELECT) @@ -201,6 +216,15 @@ IF(HAVE___SIGSETJMP) SET(HAVE_SIGSETJMP 1) ENDIF(HAVE___SIGSETJMP) +IF(NOT HAVE_SIGSETJMP) + IF(HAVE_SETJMP_H) + CHECK_SYMBOL_EXISTS(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP) + IF(HAVE_MACRO_SIGSETJMP) + SET(HAVE_SIGSETJMP 1) + ENDIF(HAVE_MACRO_SIGSETJMP) + ENDIF(HAVE_SETJMP_H) +ENDIF(NOT HAVE_SIGSETJMP) + CHECK_FUNCTION_EXISTS(getpass_r HAVE_GETPASS_R) CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT) CHECK_FUNCTION_EXISTS(getpwuid HAVE_GETPWUID) @@ -210,8 +234,8 @@ CHECK_FUNCTION_EXISTS(RAND_status HAVE_RAND_STATUS) CHECK_FUNCTION_EXISTS(RAND_screen HAVE_RAND_SCREEN) CHECK_FUNCTION_EXISTS(RAND_egd HAVE_RAND_EGD) -CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME_R) -CHECK_FUNCTION_EXISTS(gethostbyaddr HAVE_GETHOSTBYADDR_R) +CHECK_FUNCTION_EXISTS(gethostbyname_r HAVE_GETHOSTBYNAME_R) +CHECK_FUNCTION_EXISTS(gethostbyaddr_r HAVE_GETHOSTBYADDR_R) CHECK_FUNCTION_EXISTS(gmtime HAVE_GMTIME_R) CHECK_FUNCTION_EXISTS(localtime HAVE_LOCALTIME_R) |