summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Neil <suky0001@free.fr>2009-04-02 13:14:53 +0000
committerBenoit Neil <suky0001@free.fr>2009-04-02 13:14:53 +0000
commit4c5307b45655ba75ab066564afdc0c111a8b9291 (patch)
treee18012433e3aa3c55b3853b1de78d16ebcf192f7
parent626f9bd8c2c5a6b4088a0e04cfc25949aded8407 (diff)
downloadcurl-4c5307b45655ba75ab066564afdc0c111a8b9291.tar.gz
Initial CMake scripts (libcurl only), based on the merge of tetest scripts and mine. These are far to be functionnal yet.
PS: Hello world :)
-rw-r--r--CMake/CMakeConfigurableFile.in2
-rw-r--r--CMake/CheckTypeSize.c.in34
-rw-r--r--CMake/CheckTypeSize.cmake56
-rw-r--r--CMake/CurlCheckCSourceCompiles.cmake75
-rw-r--r--CMake/CurlCheckCSourceRuns.cmake83
-rw-r--r--CMake/CurlTests.c690
-rw-r--r--CMake/FindZLIB.cmake8
-rw-r--r--CMake/OtherTests.cmake250
-rw-r--r--CMake/Platforms/WindowsCache.cmake121
-rw-r--r--CMake/Platforms/config-aix.h486
-rw-r--r--CMakeLists.txt738
-rw-r--r--include/curl/curlbuild.h.cmake153
-rw-r--r--lib/CMakeLists.txt231
-rw-r--r--lib/config.h.cmake946
14 files changed, 3873 insertions, 0 deletions
diff --git a/CMake/CMakeConfigurableFile.in b/CMake/CMakeConfigurableFile.in
new file mode 100644
index 000000000..4cf74a12b
--- /dev/null
+++ b/CMake/CMakeConfigurableFile.in
@@ -0,0 +1,2 @@
+@CMAKE_CONFIGURABLE_FILE_CONTENT@
+
diff --git a/CMake/CheckTypeSize.c.in b/CMake/CheckTypeSize.c.in
new file mode 100644
index 000000000..8c9a0163e
--- /dev/null
+++ b/CMake/CheckTypeSize.c.in
@@ -0,0 +1,34 @@
+#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
+#ifdef CHECK_TYPE_SIZE_TYPE
+
+@CHECK_TYPE_SIZE_PREINCLUDE@
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif /* HAVE_STDINT_H */
+
+#ifdef HAVE_STDDEF_H
+# include <stddef.h>
+#endif /* HAVE_STDDEF_H */
+
+@CHECK_TYPE_SIZE_PREMAIN@
+
+#ifdef __CLASSIC_C__
+int main(){
+ int ac;
+ char*av[];
+#else
+int main(int ac, char*av[]){
+#endif
+ if(ac > 1000){return *av[0];}
+ return sizeof(CHECK_TYPE_SIZE_TYPE);
+}
+
+#else /* CHECK_TYPE_SIZE_TYPE */
+
+# error "CHECK_TYPE_SIZE_TYPE has to specify the type"
+
+#endif /* CHECK_TYPE_SIZE_TYPE */
diff --git a/CMake/CheckTypeSize.cmake b/CMake/CheckTypeSize.cmake
new file mode 100644
index 000000000..e16c64dfe
--- /dev/null
+++ b/CMake/CheckTypeSize.cmake
@@ -0,0 +1,56 @@
+# - Check sizeof a type
+# CHECK_TYPE_SIZE(TYPE VARIABLE)
+# Check if the type exists and determine size of type. if the type
+# exists, the size will be stored to the variable.
+#
+# VARIABLE - variable to store size if the type exists.
+# HAVE_${VARIABLE} - does the variable exists or not
+
+MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
+ SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
+ IF(NOT DEFINED ${VARIABLE})
+ IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+ SET(CHECK_TYPE_SIZE_TYPE "${TYPE}")
+ SET(MACRO_CHECK_TYPE_SIZE_FLAGS
+ "${CMAKE_REQUIRED_FLAGS}")
+ FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
+ IF("${def}")
+ SET(MACRO_CHECK_TYPE_SIZE_FLAGS
+ "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
+ ENDIF("${def}")
+ ENDFOREACH(def)
+ SET(CHECK_TYPE_SIZE_PREMAIN)
+ FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
+ SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
+ ENDFOREACH(def)
+ CONFIGURE_FILE(
+ "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
+ IMMEDIATE @ONLY)
+ FILE(READ
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
+ CHECK_TYPE_SIZE_FILE_CONTENT)
+ MESSAGE(STATUS "Check size of ${TYPE}")
+ IF(CMAKE_REQUIRED_LIBRARIES)
+ SET(CHECK_TYPE_SIZE_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ ENDIF(CMAKE_REQUIRED_LIBRARIES)
+ TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
+ ${CMAKE_BINARY_DIR}
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
+ "${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT)
+ IF(HAVE_${VARIABLE})
+ MESSAGE(STATUS "Check size of ${TYPE} - done")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
+ ELSE(HAVE_${VARIABLE})
+ MESSAGE(STATUS "Check size of ${TYPE} - failed")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
+ ENDIF(HAVE_${VARIABLE})
+ ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+ ENDIF(NOT DEFINED ${VARIABLE})
+ SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
+ENDMACRO(CHECK_TYPE_SIZE)
diff --git a/CMake/CurlCheckCSourceCompiles.cmake b/CMake/CurlCheckCSourceCompiles.cmake
new file mode 100644
index 000000000..d025769aa
--- /dev/null
+++ b/CMake/CurlCheckCSourceCompiles.cmake
@@ -0,0 +1,75 @@
+# - Check if the source code provided in the SOURCE argument compiles.
+# CURL_CHECK_C_SOURCE_COMPILES(SOURCE VAR)
+# - macro which checks if the source code compiles
+# SOURCE - source code to try to compile
+# VAR - variable to store whether the source code compiled
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+# CMAKE_REQUIRED_FLAGS = string of compile command line flags
+# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+# CMAKE_REQUIRED_INCLUDES = list of include directories
+# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+
+MACRO(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
+ IF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
+ SET(message "${VAR}")
+ # If the number of arguments is greater than 2 (SOURCE VAR)
+ IF(${ARGC} GREATER 2)
+ # then add the third argument as a message
+ SET(message "${ARGV2} (${VAR})")
+ ENDIF(${ARGC} GREATER 2)
+ SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+ "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
+ IF(CMAKE_REQUIRED_LIBRARIES)
+ SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ ELSE(CMAKE_REQUIRED_LIBRARIES)
+ SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
+ ENDIF(CMAKE_REQUIRED_LIBRARIES)
+ IF(CMAKE_REQUIRED_INCLUDES)
+ SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
+ "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
+ ELSE(CMAKE_REQUIRED_INCLUDES)
+ SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
+ ENDIF(CMAKE_REQUIRED_INCLUDES)
+ SET(src "")
+ FOREACH(def ${EXTRA_DEFINES})
+ SET(src "${src}#define ${def} 1\n")
+ ENDFOREACH(def)
+ FOREACH(inc ${HEADER_INCLUDES})
+ SET(src "${src}#include <${inc}>\n")
+ ENDFOREACH(inc)
+
+ SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
+ SET(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
+ IMMEDIATE)
+ MESSAGE(STATUS "Performing Test ${message}")
+ TRY_COMPILE(${VAR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
+ COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+ "${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
+ "${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
+ OUTPUT_VARIABLE OUTPUT)
+ IF(${VAR})
+ SET(${VAR} 1 CACHE INTERNAL "Test ${message}")
+ MESSAGE(STATUS "Performing Test ${message} - Success")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
+ "${OUTPUT}\n"
+ "Source file was:\n${src}\n")
+ ELSE(${VAR})
+ MESSAGE(STATUS "Performing Test ${message} - Failed")
+ SET(${VAR} "" CACHE INTERNAL "Test ${message}")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Performing C SOURCE FILE Test ${message} failed with the following output:\n"
+ "${OUTPUT}\n"
+ "Source file was:\n${src}\n")
+ ENDIF(${VAR})
+ ENDIF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
+ENDMACRO(CURL_CHECK_C_SOURCE_COMPILES)
diff --git a/CMake/CurlCheckCSourceRuns.cmake b/CMake/CurlCheckCSourceRuns.cmake
new file mode 100644
index 000000000..19681bd85
--- /dev/null
+++ b/CMake/CurlCheckCSourceRuns.cmake
@@ -0,0 +1,83 @@
+# - Check if the source code provided in the SOURCE argument compiles and runs.
+# CURL_CHECK_C_SOURCE_RUNS(SOURCE VAR)
+# - macro which checks if the source code runs
+# SOURCE - source code to try to compile
+# VAR - variable to store size if the type exists.
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+# CMAKE_REQUIRED_FLAGS = string of compile command line flags
+# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+# CMAKE_REQUIRED_INCLUDES = list of include directories
+# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+
+MACRO(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
+ IF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
+ SET(message "${VAR}")
+ # If the number of arguments is greater than 2 (SOURCE VAR)
+ IF(${ARGC} GREATER 2)
+ # then add the third argument as a message
+ SET(message "${ARGV2} (${VAR})")
+ ENDIF(${ARGC} GREATER 2)
+ SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+ "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
+ IF(CMAKE_REQUIRED_LIBRARIES)
+ SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ ELSE(CMAKE_REQUIRED_LIBRARIES)
+ SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
+ ENDIF(CMAKE_REQUIRED_LIBRARIES)
+ IF(CMAKE_REQUIRED_INCLUDES)
+ SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
+ "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
+ ELSE(CMAKE_REQUIRED_INCLUDES)
+ SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
+ ENDIF(CMAKE_REQUIRED_INCLUDES)
+ SET(src "")
+ FOREACH(def ${EXTRA_DEFINES})
+ SET(src "${src}#define ${def} 1\n")
+ ENDFOREACH(def)
+ FOREACH(inc ${HEADER_INCLUDES})
+ SET(src "${src}#include <${inc}>\n")
+ ENDFOREACH(inc)
+
+ SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
+ SET(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
+ IMMEDIATE)
+ MESSAGE(STATUS "Performing Test ${message}")
+ TRY_RUN(${VAR} ${VAR}_COMPILED
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
+ COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+ "${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
+ "${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
+ OUTPUT_VARIABLE OUTPUT)
+ # if it did not compile make the return value fail code of 1
+ IF(NOT ${VAR}_COMPILED)
+ SET(${VAR} 1)
+ ENDIF(NOT ${VAR}_COMPILED)
+ # if the return value was 0 then it worked
+ SET(result_var ${${VAR}})
+ IF("${result_var}" EQUAL 0)
+ SET(${VAR} 1 CACHE INTERNAL "Test ${message}")
+ MESSAGE(STATUS "Performing Test ${message} - Success")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
+ "${OUTPUT}\n"
+ "Return value: ${${VAR}}\n"
+ "Source file was:\n${src}\n")
+ ELSE("${result_var}" EQUAL 0)
+ MESSAGE(STATUS "Performing Test ${message} - Failed")
+ SET(${VAR} "" CACHE INTERNAL "Test ${message}")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Performing C SOURCE FILE Test ${message} failed with the following output:\n"
+ "${OUTPUT}\n"
+ "Return value: ${result_var}\n"
+ "Source file was:\n${src}\n")
+ ENDIF("${result_var}" EQUAL 0)
+ ENDIF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
+ENDMACRO(CURL_CHECK_C_SOURCE_RUNS)
diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c
new file mode 100644
index 000000000..91a754c86
--- /dev/null
+++ b/CMake/CurlTests.c
@@ -0,0 +1,690 @@
+#ifdef TIME_WITH_SYS_TIME
+/* Time with sys/time test */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+
+#endif
+
+#ifdef HAVE_FCNTL_O_NONBLOCK
+
+/* headers for FCNTL_O_NONBLOCK test */
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+/* */
+#if defined(sun) || defined(__sun__) || \
+ defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+# if defined(__SVR4) || defined(__srv4__)
+# define PLATFORM_SOLARIS
+# else
+# define PLATFORM_SUNOS4
+# endif
+#endif
+#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
+# define PLATFORM_AIX_V3
+#endif
+/* */
+#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
+#error "O_NONBLOCK does not work on this platform"
+#endif
+
+int
+main ()
+{
+ /* O_NONBLOCK source test */
+ int flags = 0;
+ if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
+ return 1;
+ return 0;
+}
+#endif
+
+#ifdef HAVE_GETHOSTBYADDR_R_5
+#include <sys/types.h>
+#include <netdb.h>
+int
+main ()
+{
+
+char * address;
+int length;
+int type;
+struct hostent h;
+struct hostent_data hdata;
+int rc;
+#ifndef gethostbyaddr_r
+ (void)gethostbyaddr_r;
+#endif
+rc = gethostbyaddr_r(address, length, type, &h, &hdata);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYADDR_R_5_REENTRANT
+#define _REENTRANT
+#include <sys/types.h>
+#include <netdb.h>
+int
+main ()
+{
+
+char * address;
+int length;q
+int type;
+struct hostent h;
+struct hostent_data hdata;
+int rc;
+#ifndef gethostbyaddr_r
+ (void)gethostbyaddr_r;
+#endif
+rc = gethostbyaddr_r(address, length, type, &h, &hdata);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYADDR_R_7
+#include <sys/types.h>
+#include <netdb.h>
+int
+main ()
+{
+
+char * address;
+int length;
+int type;
+struct hostent h;
+char buffer[8192];
+int h_errnop;
+struct hostent * hp;
+
+#ifndef gethostbyaddr_r
+ (void)gethostbyaddr_r;
+#endif
+hp = gethostbyaddr_r(address, length, type, &h,
+ buffer, 8192, &h_errnop);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYADDR_R_7_REENTRANT
+#define _REENTRANT
+#include <sys/types.h>
+#include <netdb.h>
+int
+main ()
+{
+
+char * address;
+int length;
+int type;
+struct hostent h;
+char buffer[8192];
+int h_errnop;
+struct hostent * hp;
+
+#ifndef gethostbyaddr_r
+ (void)gethostbyaddr_r;
+#endif
+hp = gethostbyaddr_r(address, length, type, &h,
+ buffer, 8192, &h_errnop);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYADDR_R_8
+#include <sys/types.h>
+#include <netdb.h>
+int
+main ()
+{
+
+char * address;
+int length;
+int type;
+struct hostent h;
+char buffer[8192];
+int h_errnop;
+struct hostent * hp;
+int rc;
+
+#ifndef gethostbyaddr_r
+ (void)gethostbyaddr_r;
+#endif
+rc = gethostbyaddr_r(address, length, type, &h,
+ buffer, 8192, &hp, &h_errnop);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYADDR_R_8_REENTRANT
+#define _REENTRANT
+#include <sys/types.h>
+#include <netdb.h>
+int
+main ()
+{
+
+char * address;
+int length;
+int type;
+struct hostent h;
+char buffer[8192];
+int h_errnop;
+struct hostent * hp;
+int rc;
+
+#ifndef gethostbyaddr_r
+ (void)gethostbyaddr_r;
+#endif
+rc = gethostbyaddr_r(address, length, type, &h,
+ buffer, 8192, &hp, &h_errnop);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYNAME_R_3
+#include <string.h>
+#include <sys/types.h>
+#include <netdb.h>
+#undef NULL
+#define NULL (void *)0
+
+int
+main ()
+{
+
+struct hostent_data data;
+#ifndef gethostbyname_r
+ (void)gethostbyname_r;
+#endif
+gethostbyname_r(NULL, NULL, NULL);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYNAME_R_3_REENTRANT
+#define _REENTRANT
+#include <string.h>
+#include <sys/types.h>
+#include <netdb.h>
+#undef NULL
+#define NULL (void *)0
+
+int
+main ()
+{
+
+struct hostent_data data;
+#ifndef gethostbyname_r
+ (void)gethostbyname_r;
+#endif
+gethostbyname_r(NULL, NULL, NULL);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYNAME_R_5
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#undef NULL
+#define NULL (void *)0
+
+int
+main ()
+{
+#ifndef gethostbyname_r
+ (void)gethostbyname_r;
+#endif
+gethostbyname_r(NULL, NULL, NULL, 0, NULL);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYNAME_R_5_REENTRANT
+#define _REENTRANT
+#include <sys/types.h>
+#include <netdb.h>
+#undef NULL
+#define NULL (void *)0
+
+int
+main ()
+{
+
+#ifndef gethostbyname_r
+ (void)gethostbyname_r;
+#endif
+gethostbyname_r(NULL, NULL, NULL, 0, NULL);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYNAME_R_6
+#include <sys/types.h>
+#include <netdb.h>
+#undef NULL
+#define NULL (void *)0
+
+int
+main ()
+{
+
+#ifndef gethostbyname_r
+ (void)gethostbyname_r;
+#endif
+gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GETHOSTBYNAME_R_6_REENTRANT
+#define _REENTRANT
+#include <sys/types.h>
+#include <netdb.h>
+#undef NULL
+#define NULL (void *)0
+
+int
+main ()
+{
+
+#ifndef gethostbyname_r
+ (void)gethostbyname_r;
+#endif
+gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_SOCKLEN_T
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#endif
+int
+main ()
+{
+if ((socklen_t *) 0)
+ return 0;
+if (sizeof (socklen_t))
+ return 0;
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_IN_ADDR_T
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+
+int
+main ()
+{
+if ((in_addr_t *) 0)
+ return 0;
+if (sizeof (in_addr_t))
+ return 0;
+ ;
+ return 0;
+}
+#endif
+
+#ifdef HAVE_BOOL_T
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+int
+main ()
+{
+if (sizeof (bool *) )
+ return 0;
+ ;
+ return 0;
+}
+#endif
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+int main() { return 0; }
+#endif
+#ifdef RETSIGTYPE_TEST
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int
+main ()
+{
+ return 0;
+}
+#endif
+#ifdef HAVE_INET_NTOA_R_DECL
+#include <arpa/inet.h>
+
+typedef void (*func_type)();
+
+int main()
+{
+#ifndef inet_ntoa_r
+ func_type func;
+ func = (func_type)inet_ntoa_r;
+#endif
+ return 0;
+}
+#endif
+#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT
+#define _REENTRANT
+#include <arpa/inet.h>
+
+typedef void (*func_type)();
+
+int main()
+{
+#ifndef inet_ntoa_r
+ func_type func;
+ func = (func_type)&inet_ntoa_r;
+#endif
+ return 0;
+}
+#endif
+#ifdef HAVE_GETADDRINFO
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int main(void) {
+ struct addrinfo hints, *ai;
+ int error;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+#ifndef getaddrinfo
+ (void)getaddrinfo;
+#endif
+ error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
+ if (error) {
+ return 1;
+ }
+ return 0;
+}
+#endif
+#ifdef HAVE_FILE_OFFSET_BITS
+#ifdef _FILE_OFFSET_BITS
+#undef _FILE_OFFSET_BITS
+#endif
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int main () { ; return 0; }
+#endif
+#ifdef HAVE_IOCTLSOCKET
+/* includes start */
+#ifdef HAVE_WINDOWS_H
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+
+/* ioctlsocket source code */
+ int socket;
+ unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
+
+ ;
+ return 0;
+}
+
+#endif
+#ifdef HAVE_IOCTLSOCKET_CAMEL
+/* includes start */
+#ifdef HAVE_WINDOWS_H
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+
+/* IoctlSocket source code */
+ if(0 != IoctlSocket(0, 0, 0))
+ return 1;
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
+/* includes start */
+#ifdef HAVE_WINDOWS_H
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+
+/* IoctlSocket source code */
+ long flags = 0;
+ if(0 != ioctlsocket(0, FIONBIO, &flags))
+ return 1;
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_IOCTLSOCKET_FIONBIO
+/* includes start */
+#ifdef HAVE_WINDOWS_H
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+
+ int flags = 0;
+ if(0 != ioctlsocket(0, FIONBIO, &flags))
+ return 1;
+
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_IOCTL_FIONBIO
+/* headers for FIONBIO test */
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+#ifdef HAVE_STROPTS_H
+# include <stropts.h>
+#endif
+
+int
+main ()
+{
+
+ int flags = 0;
+ if(0 != ioctl(0, FIONBIO, &flags))
+ return 1;
+
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_IOCTL_SIOCGIFADDR
+/* headers for FIONBIO test */
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+#ifdef HAVE_STROPTS_H
+# include <stropts.h>
+#endif
+#include <net/if.h>
+
+int
+main ()
+{
+ struct ifreq ifr;
+ if(0 != ioctl(0, SIOCGIFADDR, &ifr))
+ return 1;
+
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
+/* includes start */
+#ifdef HAVE_WINDOWS_H
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
+# endif
+#endif
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+/* includes end */
+
+int
+main ()
+{
+ if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
+ return 1;
+ ;
+ return 0;
+}
+#endif
+#ifdef HAVE_GLIBC_STRERROR_R
+#include <string.h>
+#include <errno.h>
+int
+main () {
+ char buffer[1024]; /* big enough to play with */
+ char *string =
+ strerror_r(EACCES, buffer, sizeof(buffer));
+ /* this should've returned a string */
+ if(!string || !string[0])
+ return 99;
+ return 0;
+}
+#endif
+#ifdef HAVE_POSIX_STRERROR_R
+#include <string.h>
+#include <errno.h>
+int
+main () {
+ char buffer[1024]; /* big enough to play with */
+ int error =
+ strerror_r(EACCES, buffer, sizeof(buffer));
+ /* This should've returned zero, and written an error string in the
+ buffer.*/
+ if(!buffer[0] || error)
+ return 99;
+ return 0;
+}
+#endif
diff --git a/CMake/FindZLIB.cmake b/CMake/FindZLIB.cmake
new file mode 100644
index 000000000..cf3637bc4
--- /dev/null
+++ b/CMake/FindZLIB.cmake
@@ -0,0 +1,8 @@
+# Locate zlib
+INCLUDE("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
+
+FIND_LIBRARY(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
+
+IF(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
+ SET( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
+ENDIF()
diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake
new file mode 100644
index 000000000..ea1613d37
--- /dev/null
+++ b/CMake/OtherTests.cmake
@@ -0,0 +1,250 @@
+INCLUDE(CurlCheckCSourceCompiles)
+SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
+SET(HEADER_INCLUDES)
+SET(headers_hack)
+
+MACRO(add_header_include check header)
+ IF(${check})
+ SET(headers_hack
+ "${headers_hack}\n#include <${header}>")
+ #SET(HEADER_INCLUDES
+ # ${HEADER_INCLUDES}
+ # "${header}")
+ ENDIF(${check})
+ENDMACRO(add_header_include)
+
+SET(signature_call_conv)
+IF(HAVE_WINDOWS_H)
+ add_header_include(HAVE_WINDOWS_H "windows.h")
+ add_header_include(HAVE_WINSOCK2_H "winsock2.h")
+ add_header_include(HAVE_WINSOCK_H "winsock.h")
+ SET(EXTRA_DEFINES ${EXTRA_DEFINES}
+ "__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
+ SET(signature_call_conv "PASCAL")
+ELSE(HAVE_WINDOWS_H)
+ add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
+ add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
+ENDIF(HAVE_WINDOWS_H)
+
+SET(EXTRA_DEFINES_BACKUP "${EXTRA_DEFINES}")
+SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
+CURL_CHECK_C_SOURCE_COMPILES("recv(0, 0, 0, 0)" curl_cv_recv)
+IF(curl_cv_recv)
+ # AC_CACHE_CHECK([types of arguments and return type for recv],
+ #[curl_cv_func_recv_args], [
+ #SET(curl_cv_func_recv_args "unknown")
+ #for recv_retv in 'int' 'ssize_t'; do
+ IF(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
+ FOREACH(recv_retv "int" "ssize_t" )
+ FOREACH(recv_arg1 "int" "ssize_t" "SOCKET")
+ FOREACH(recv_arg2 "void *" "char *")
+ FOREACH(recv_arg3 "size_t" "int" "socklen_t" "unsigned int")
+ FOREACH(recv_arg4 "int" "unsigned int")
+ IF(NOT curl_cv_func_recv_done)
+ SET(curl_cv_func_recv_test "UNKNOWN")
+ SET(extern_line "extern ${recv_retv} ${signature_call_conv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})\;")
+ SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
+ CURL_CHECK_C_SOURCE_COMPILES("
+ ${recv_arg1} s=0;
+ ${recv_arg2} buf=0;
+ ${recv_arg3} len=0;
+ ${recv_arg4} flags=0;
+ ${recv_retv} res = recv(s, buf, len, flags)"
+ curl_cv_func_recv_test
+ "${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
+ IF(curl_cv_func_recv_test)
+ SET(curl_cv_func_recv_args
+ "${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
+ SET(RECV_TYPE_ARG1 "${recv_arg1}")
+ SET(RECV_TYPE_ARG2 "${recv_arg2}")
+ SET(RECV_TYPE_ARG3 "${recv_arg3}")
+ SET(RECV_TYPE_ARG4 "${recv_arg4}")
+ SET(RECV_TYPE_RETV "${recv_retv}")
+ SET(HAVE_RECV 1)
+ SET(curl_cv_func_recv_done 1)
+ ENDIF(curl_cv_func_recv_test)
+ ENDIF(NOT curl_cv_func_recv_done)
+ ENDFOREACH(recv_arg4)
+ ENDFOREACH(recv_arg3)
+ ENDFOREACH(recv_arg2)
+ ENDFOREACH(recv_arg1)
+ ENDFOREACH(recv_retv)
+ ELSE(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
+ STRING(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}")
+ STRING(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}")
+ STRING(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}")
+ STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}")
+ STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}")
+ #MESSAGE("RECV_TYPE_ARG1 ${RECV_TYPE_ARG1}")
+ #MESSAGE("RECV_TYPE_ARG2 ${RECV_TYPE_ARG2}")
+ #MESSAGE("RECV_TYPE_ARG3 ${RECV_TYPE_ARG3}")
+ #MESSAGE("RECV_TYPE_ARG4 ${RECV_TYPE_ARG4}")
+ #MESSAGE("RECV_TYPE_RETV ${RECV_TYPE_RETV}")
+ ENDIF(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
+
+ IF("${curl_cv_func_recv_args}" STREQUAL "unknown")
+ MESSAGE(FATAL_ERROR "Cannot find proper types to use for recv args")
+ ENDIF("${curl_cv_func_recv_args}" STREQUAL "unknown")
+ELSE(curl_cv_recv)
+ MESSAGE(FATAL_ERROR "Unable to link function recv")
+ENDIF(curl_cv_recv)
+SET(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
+SET(HAVE_RECV 1)
+
+CURL_CHECK_C_SOURCE_COMPILES("send(0, 0, 0, 0)" curl_cv_send)
+IF(curl_cv_send)
+ # AC_CACHE_CHECK([types of arguments and return type for send],
+ #[curl_cv_func_send_args], [
+ #SET(curl_cv_func_send_args "unknown")
+ #for send_retv in 'int' 'ssize_t'; do
+ IF(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
+ FOREACH(send_retv "int" "ssize_t" )
+ FOREACH(send_arg1 "int" "ssize_t" "SOCKET")
+ FOREACH(send_arg2 "const void *" "void *" "char *" "const char *")
+ FOREACH(send_arg3 "size_t" "int" "socklen_t" "unsigned int")
+ FOREACH(send_arg4 "int" "unsigned int")
+ IF(NOT curl_cv_func_send_done)
+ SET(curl_cv_func_send_test "UNKNOWN")
+ SET(extern_line "extern ${send_retv} ${signature_call_conv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})\;")
+ SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
+ CURL_CHECK_C_SOURCE_COMPILES("
+ ${send_arg1} s=0;
+ ${send_arg2} buf=0;
+ ${send_arg3} len=0;
+ ${send_arg4} flags=0;
+ ${send_retv} res = send(s, buf, len, flags)"
+ curl_cv_func_send_test
+ "${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
+ IF(curl_cv_func_send_test)
+ #MESSAGE("Found arguments: ${curl_cv_func_send_test}")
+ STRING(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
+ STRING(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
+ SET(curl_cv_func_send_args
+ "${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}")
+ SET(SEND_TYPE_ARG1 "${send_arg1}")
+ SET(SEND_TYPE_ARG2 "${send_arg2}")
+ SET(SEND_TYPE_ARG3 "${send_arg3}")
+ SET(SEND_TYPE_ARG4 "${send_arg4}")
+ SET(SEND_TYPE_RETV "${send_retv}")
+ SET(HAVE_SEND 1)
+ SET(curl_cv_func_send_done 1)
+ ENDIF(curl_cv_func_send_test)
+ ENDIF(NOT curl_cv_func_send_done)
+ ENDFOREACH(send_arg4)
+ ENDFOREACH(send_arg3)
+ ENDFOREACH(send_arg2)
+ ENDFOREACH(send_arg1)
+ ENDFOREACH(send_retv)
+ ELSE(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
+ STRING(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}")
+ STRING(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}")
+ STRING(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}")
+ STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}")
+ STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}")
+ STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}")
+ #MESSAGE("SEND_TYPE_ARG1 ${SEND_TYPE_ARG1}")
+ #MESSAGE("SEND_TYPE_ARG2 ${SEND_TYPE_ARG2}")
+ #MESSAGE("SEND_TYPE_ARG3 ${SEND_TYPE_ARG3}")
+ #MESSAGE("SEND_TYPE_ARG4 ${SEND_TYPE_ARG4}")
+ #MESSAGE("SEND_TYPE_RETV ${SEND_TYPE_RETV}")
+ #MESSAGE("SEND_QUAL_ARG2 ${SEND_QUAL_ARG2}")
+ ENDIF(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
+
+ IF("${curl_cv_func_send_args}" STREQUAL "unknown")
+ MESSAGE(FATAL_ERROR "Cannot find proper types to use for send args")
+ ENDIF("${curl_cv_func_send_args}" STREQUAL "unknown")
+ SET(SEND_QUAL_ARG2 "const")
+ELSE(curl_cv_send)
+ MESSAGE(FATAL_ERROR "Unable to link function send")
+ENDIF(curl_cv_send)
+SET(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
+SET(HAVE_SEND 1)
+
+SET(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
+CURL_CHECK_C_SOURCE_COMPILES("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL)
+
+SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
+SET(HEADER_INCLUDES)
+SET(headers_hack)
+
+MACRO(add_header_include check header)
+ IF(${check})
+ SET(headers_hack
+ "${headers_hack}\n#include <${header}>")
+ #SET(HEADER_INCLUDES
+ # ${HEADER_INCLUDES}
+ # "${header}")
+ ENDIF(${check})
+ENDMACRO(add_header_include header)
+
+IF(HAVE_WINDOWS_H)
+ SET(EXTRA_DEFINES ${EXTRA_DEFINES}
+ "__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
+ add_header_include(HAVE_WINDOWS_H "windows.h")
+ add_header_include(HAVE_WINSOCK2_H "winsock2.h")
+ add_header_include(HAVE_WINSOCK_H "winsock.h")
+ELSE(HAVE_WINDOWS_H)
+ add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
+ add_header_include(HAVE_SYS_TIME_H "sys/time.h")
+ add_header_include(TIME_WITH_SYS_TIME "time.h")
+ add_header_include(HAVE_TIME_H "time.h")
+ENDIF(HAVE_WINDOWS_H)
+SET(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
+CURL_CHECK_C_SOURCE_COMPILES("struct timeval ts;\nts.tv_sec = 0;\nts.tv_usec = 0" HAVE_STRUCT_TIMEVAL)
+
+
+INCLUDE(CurlCheckCSourceRuns)
+SET(EXTRA_DEFINES)
+SET(HEADER_INCLUDES)
+IF(HAVE_SYS_POLL_H)
+ SET(HEADER_INCLUDES "sys/poll.h")
+ENDIF(HAVE_SYS_POLL_H)
+CURL_CHECK_C_SOURCE_RUNS("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE)
+
+SET(HAVE_SIG_ATOMIC_T 1)
+SET(EXTRA_DEFINES)
+SET(HEADER_INCLUDES)
+IF(HAVE_SIGNAL_H)
+ SET(HEADER_INCLUDES "signal.h")
+ SET(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
+ENDIF(HAVE_SIGNAL_H)
+CHECK_TYPE_SIZE("sig_atomic_t" SIZEOF_SIG_ATOMIC_T)
+IF(HAVE_SIZEOF_SIG_ATOMIC_T)
+ CURL_CHECK_C_SOURCE_COMPILES("static volatile sig_atomic_t dummy = 0" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
+ IF(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
+ SET(HAVE_SIG_ATOMIC_T_VOLATILE 1)
+ ENDIF(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
+ENDIF(HAVE_SIZEOF_SIG_ATOMIC_T)
+
+SET(CHECK_TYPE_SIZE_PREINCLUDE
+ "#undef inline")
+
+IF(HAVE_WINDOWS_H)
+ SET(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>")
+ IF(HAVE_WINSOCK2_H)
+ SET(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}\n#include <winsock2.h>")
+ ENDIF(HAVE_WINSOCK2_H)
+ELSE(HAVE_WINDOWS_H)
+ IF(HAVE_SYS_SOCKET_H)
+ SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
+ "sys/socket.h")
+ ENDIF(HAVE_SYS_SOCKET_H)
+ IF(HAVE_NETINET_IN_H)
+ SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
+ "netinet/in.h")
+ ENDIF(HAVE_NETINET_IN_H)
+ IF(HAVE_ARPA_INET_H)
+ SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
+ "arpa/inet.h")
+ ENDIF(HAVE_ARPA_INET_H)
+ENDIF(HAVE_WINDOWS_H)
+
+CHECK_TYPE_SIZE("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
+IF(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
+ SET(HAVE_STRUCT_SOCKADDR_STORAGE 1)
+ENDIF(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
+
diff --git a/CMake/Platforms/WindowsCache.cmake b/CMake/Platforms/WindowsCache.cmake
new file mode 100644
index 000000000..b4515ce04
--- /dev/null
+++ b/CMake/Platforms/WindowsCache.cmake
@@ -0,0 +1,121 @@
+IF(NOT UNIX)
+ IF(WIN32)
+ SET(HAVE_LIBDL 0)
+ SET(HAVE_LIBUCB 0)
+ SET(HAVE_LIBSOCKET 0)
+ SET(NOT_NEED_LIBNSL 0)
+ SET(HAVE_LIBNSL 0)
+ SET(HAVE_LIBZ 0)
+ SET(HAVE_LIBCRYPTO 0)
+
+ SET(HAVE_DLOPEN 0)
+
+ SET(HAVE_ALLOCA_H 0)
+ SET(HAVE_ARPA_INET_H 0)
+ SET(HAVE_DLFCN_H 0)
+ SET(HAVE_FCNTL_H 1)
+ SET(HAVE_FEATURES_H 0)
+ SET(HAVE_INTTYPES_H 0)
+ SET(HAVE_IO_H 1)
+ SET(HAVE_MALLOC_H 1)
+ SET(HAVE_MEMORY_H 1)
+ SET(HAVE_NETDB_H 0)
+ SET(HAVE_NETINET_IF_ETHER_H 0)
+ SET(HAVE_NETINET_IN_H 0)
+ SET(HAVE_NET_IF_H 0)
+ SET(HAVE_PROCESS_H 1)
+ SET(HAVE_PWD_H 0)
+ SET(HAVE_SETJMP_H 1)
+ SET(HAVE_SGTTY_H 0)
+ SET(HAVE_SIGNAL_H 1)
+ SET(HAVE_SOCKIO_H 0)
+ SET(HAVE_STDINT_H 0)
+ SET(HAVE_STDLIB_H 1)
+ SET(HAVE_STRINGS_H 0)
+ SET(HAVE_STRING_H 1)
+ SET(HAVE_SYS_PARAM_H 0)
+ SET(HAVE_SYS_POLL_H 0)
+ SET(HAVE_SYS_SELECT_H 0)
+ SET(HAVE_SYS_SOCKET_H 0)
+ SET(HAVE_SYS_SOCKIO_H 0)
+ SET(HAVE_SYS_STAT_H 1)
+ SET(HAVE_SYS_TIME_H 0)
+ SET(HAVE_SYS_TYPES_H 1)
+ SET(HAVE_SYS_UTIME_H 1)
+ SET(HAVE_TERMIOS_H 0)
+ SET(HAVE_TERMIO_H 0)
+ SET(HAVE_TIME_H 1)
+ SET(HAVE_UNISTD_H 0)
+ SET(HAVE_UTIME_H 0)
+ SET(HAVE_X509_H 0)
+ SET(HAVE_ZLIB_H 0)
+
+ SET(HAVE_SIZEOF_LONG_DOUBLE 1)
+ SET(SIZEOF_LONG_DOUBLE 8)
+
+ SET(HAVE_SOCKET 1)
+ SET(HAVE_POLL 0)
+ SET(HAVE_SELECT 1)
+ SET(HAVE_STRDUP 1)
+ SET(HAVE_STRSTR 1)
+ SET(HAVE_STRTOK_R 0)
+ SET(HAVE_STRFTIME 1)
+ SET(HAVE_UNAME 0)
+ SET(HAVE_STRCASECMP 0)
+ SET(HAVE_STRICMP 1)
+ SET(HAVE_STRCMPI 1)
+ SET(HAVE_GETHOSTBYADDR 1)
+ SET(HAVE_GETTIMEOFDAY 0)
+ SET(HAVE_INET_ADDR 1)
+ SET(HAVE_INET_NTOA 1)
+ SET(HAVE_INET_NTOA_R 0)
+ SET(HAVE_TCGETATTR 0)
+ SET(HAVE_TCSETATTR 0)
+ SET(HAVE_PERROR 1)
+ SET(HAVE_CLOSESOCKET 1)
+ SET(HAVE_SETVBUF 0)
+ SET(HAVE_SIGSETJMP 0)
+ SET(HAVE_GETPASS_R 0)
+ SET(HAVE_STRLCAT 0)
+ SET(HAVE_GETPWUID 0)
+ SET(HAVE_GETEUID 0)
+ SET(HAVE_UTIME 1)
+ SET(HAVE_RAND_EGD 0)
+ SET(HAVE_RAND_SCREEN 0)
+ SET(HAVE_RAND_STATUS 0)
+ SET(HAVE_GMTIME_R 0)
+ SET(HAVE_LOCALTIME_R 0)
+ SET(HAVE_GETHOSTBYADDR_R 0)
+ SET(HAVE_GETHOSTBYNAME_R 0)
+ SET(HAVE_SIGNAL_FUNC 1)
+ SET(HAVE_SIGNAL_MACRO 0)
+
+ SET(HAVE_GETHOSTBYADDR_R_5 0)
+ SET(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
+ SET(HAVE_GETHOSTBYADDR_R_7 0)
+ SET(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
+ SET(HAVE_GETHOSTBYADDR_R_8 0)
+ SET(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
+ SET(HAVE_GETHOSTBYNAME_R_3 0)
+ SET(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
+ SET(HAVE_GETHOSTBYNAME_R_5 0)
+ SET(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
+ SET(HAVE_GETHOSTBYNAME_R_6 0)
+ SET(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
+
+ SET(TIME_WITH_SYS_TIME 0)
+ SET(HAVE_O_NONBLOCK 0)
+ SET(HAVE_IN_ADDR_T 0)
+ SET(HAVE_INET_NTOA_R_DECL 0)
+ SET(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
+ SET(HAVE_GETADDRINFO 0)
+ SET(STDC_HEADERS 1)
+ SET(RETSIGTYPE_TEST 1)
+
+ SET(HAVE_SIGACTION 0)
+ SET(HAVE_MACRO_SIGSETJMP 0)
+ ELSE(WIN32)
+ MESSAGE("This file should be included on Windows platform only")
+ ENDIF(WIN32)
+ENDIF(NOT UNIX)
+
diff --git a/CMake/Platforms/config-aix.h b/CMake/Platforms/config-aix.h
new file mode 100644
index 000000000..86d10938f
--- /dev/null
+++ b/CMake/Platforms/config-aix.h
@@ -0,0 +1,486 @@
+/* lib/config.h. Generated by configure. */
+/* lib/config.h.in. Generated from configure.in by autoheader. */
+/* Name of this package! */
+#define PACKAGE "curl"
+
+/* Version number of this archive. */
+#define VERSION "7.10.2"
+
+/* Define if you have the getpass function. */
+/* #undef HAVE_GETPASS */
+
+/* Define cpu-machine-OS */
+#define OS "powerpc-ibm-aix5.1.0.0"
+
+/* Define if you have the gethostbyaddr_r() function with 5 arguments */
+#define HAVE_GETHOSTBYADDR_R_5 1
+
+/* Define if you have the gethostbyaddr_r() function with 7 arguments */
+/* #undef HAVE_GETHOSTBYADDR_R_7 */
+
+/* Define if you have the gethostbyaddr_r() function with 8 arguments */
+/* #undef HAVE_GETHOSTBYADDR_R_8 */
+
+/* Define if you have the gethostbyname_r() function with 3 arguments */
+#define HAVE_GETHOSTBYNAME_R_3 1
+
+/* Define if you have the gethostbyname_r() function with 5 arguments */
+/* #undef HAVE_GETHOSTBYNAME_R_5 */
+
+/* Define if you have the gethostbyname_r() function with 6 arguments */
+/* #undef HAVE_GETHOSTBYNAME_R_6 */
+
+/* Define if you have the inet_ntoa_r function declared. */
+/* #undef HAVE_INET_NTOA_R_DECL */
+
+/* Define if you need the _REENTRANT define for some functions */
+/* #undef NEED_REENTRANT */
+
+/* Define if you have the Kerberos4 libraries (including -ldes) */
+/* #undef KRB4 */
+
+/* Define if you want to enable IPv6 support */
+#define ENABLE_IPV6 1
+
+/* Define this to 'int' if ssize_t is not an available typedefed type */
+/* #undef ssize_t */
+
+/* Define this to 'int' if socklen_t is not an available typedefed type */
+/* #undef socklen_t */
+
+/* Define this as a suitable file to read random data from */
+/* #undef RANDOM_FILE */
+
+/* Define this to your Entropy Gathering Daemon socket pathname */
+/* #undef EGD_SOCKET */
+
+/* Define if you have a working OpenSSL installation */
+/* #undef OPENSSL_ENABLED */
+
+/* Define the one correct non-blocking socket method below */
+/* #undef HAVE_FIONBIO */
+/* #undef HAVE_IOCTLSOCKET */
+/* #undef HAVE_IOCTLSOCKET_CASE */
+/* #undef HAVE_O_NONBLOCK */
+#define HAVE_DISABLED_NONBLOCKING 1
+
+/* Define this to 'int' if in_addr_t is not an available typedefed type */
+/* #undef in_addr_t */
+
+/* Define to disable DICT */
+/* #undef CURL_DISABLE_DICT */
+
+/* Define to disable FILE */
+/* #undef CURL_DISABLE_FILE */
+
+/* Define to disable FTP */
+/* #undef CURL_DISABLE_FTP */
+
+/* Define to disable GOPHER */
+/* #undef CURL_DISABLE_GOPHER */
+
+/* Define to disable HTTP */
+/* #undef CURL_DISABLE_HTTP */
+
+/* Define to disable LDAP */
+/* #undef CURL_DISABLE_LDAP */
+
+/* Define to disable TELNET */
+/* #undef CURL_DISABLE_TELNET */
+
+/* Define if you have zlib present */
+#define HAVE_LIBZ 1
+
+/* CA bundle full path name */
+#define CURL_CA_BUNDLE "/usr/local/share/curl/curl-ca-bundle.crt"
+
+/* to disable FILE */
+/* #undef CURL_DISABLE_FILE */
+
+/* to disable FTP */
+/* #undef CURL_DISABLE_FTP */
+
+/* to disable GOPHER */
+/* #undef CURL_DISABLE_GOPHER */
+
+/* to disable HTTP */
+/* #undef CURL_DISABLE_HTTP */
+
+/* to disable LDAP */
+/* #undef CURL_DISABLE_LDAP */
+
+/* to disable TELNET */
+/* #undef CURL_DISABLE_TELNET */
+
+/* Set to explicitly specify we don't want to use thread-safe functions */
+/* #undef DISABLED_THREADSAFE */
+
+/* your Entropy Gathering Daemon socket pathname */
+/* #undef EGD_SOCKET */
+
+/* Define if you want to enable IPv6 support */
+#define ENABLE_IPV6 1
+
+/* Define to 1 if you have the <alloca.h> header file. */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the `closesocket' function. */
+/* #undef HAVE_CLOSESOCKET */
+
+/* Define to 1 if you have the <crypto.h> header file. */
+/* #undef HAVE_CRYPTO_H */
+
+/* Define to 1 if you have the <des.h> header file. */
+/* #undef HAVE_DES_H */
+
+/* to disable NON-BLOCKING connections */
+#define HAVE_DISABLED_NONBLOCKING 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `dlopen' function. */
+#define HAVE_DLOPEN 1
+
+/* Define to 1 if you have the <err.h> header file. */
+/* #undef HAVE_ERR_H */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define if getaddrinfo exists and works */
+#define HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `geteuid' function. */
+#define HAVE_GETEUID 1
+
+/* Define to 1 if you have the `gethostbyaddr' function. */
+#define HAVE_GETHOSTBYADDR 1
+
+/* Define to 1 if you have the `gethostbyaddr_r' function. */
+#define HAVE_GETHOSTBYADDR_R 1
+
+/* Define to 1 if you have the `gethostbyname_r' function. */
+#define HAVE_GETHOSTBYNAME_R 1
+
+/* Define to 1 if you have the `getpass_r' function. */
+/* #undef HAVE_GETPASS_R */
+
+/* Define to 1 if you have the `getpwuid' function. */
+#define HAVE_GETPWUID 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#define HAVE_GMTIME_R 1
+
+/* Define to 1 if you have the `inet_addr' function. */
+#define HAVE_INET_ADDR 1
+
+/* Define to 1 if you have the `inet_ntoa' function. */
+#define HAVE_INET_NTOA 1
+
+/* Define to 1 if you have the `inet_ntoa_r' function. */
+#define HAVE_INET_NTOA_R 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <io.h> header file. */
+/* #undef HAVE_IO_H */
+
+/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
+/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */
+
+/* Define to 1 if you have the <krb.h> header file. */
+/* #undef HAVE_KRB_H */
+
+/* Define to 1 if you have the `crypto' library (-lcrypto). */
+/* #undef HAVE_LIBCRYPTO */
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+/* #undef HAVE_LIBDL */
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+/* #undef HAVE_LIBRESOLV */
+
+/* Define to 1 if you have the `resolve' library (-lresolve). */
+/* #undef HAVE_LIBRESOLVE */
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the `ssl' library (-lssl). */
+/* #undef HAVE_LIBSSL */
+
+/* If zlib is available */
+#define HAVE_LIBZ 1
+
+/* Define to 1 if you have the `localtime_r' function. */
+#define HAVE_LOCALTIME_R 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/if_ether.h> header file. */
+#define HAVE_NETINET_IF_ETHER_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#define HAVE_NET_IF_H 1
+
+/* Define to 1 if you have the <openssl/crypto.h> header file. */
+/* #undef HAVE_OPENSSL_CRYPTO_H */
+
+/* Define to 1 if you have the <openssl/engine.h> header file. */
+/* #undef HAVE_OPENSSL_ENGINE_H */
+
+/* Define to 1 if you have the <openssl/err.h> header file. */
+/* #undef HAVE_OPENSSL_ERR_H */
+
+/* Define to 1 if you have the <openssl/pem.h> header file. */
+/* #undef HAVE_OPENSSL_PEM_H */
+
+/* Define to 1 if you have the <openssl/rsa.h> header file. */
+/* #undef HAVE_OPENSSL_RSA_H */
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+/* #undef HAVE_OPENSSL_SSL_H */
+
+/* Define to 1 if you have the <openssl/x509.h> header file. */
+/* #undef HAVE_OPENSSL_X509_H */
+
+/* Define to 1 if you have the <pem.h> header file. */
+/* #undef HAVE_PEM_H */
+
+/* Define to 1 if you have the `perror' function. */
+#define HAVE_PERROR 1
+
+/* Define to 1 if you have the `poll' function. */
+#define HAVE_POLL 1
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#define HAVE_PWD_H 1
+
+/* Define to 1 if you have the `RAND_egd' function. */
+/* #undef HAVE_RAND_EGD */
+
+/* Define to 1 if you have the `RAND_screen' function. */
+/* #undef HAVE_RAND_SCREEN */
+
+/* Define to 1 if you have the `RAND_status' function. */
+/* #undef HAVE_RAND_STATUS */
+
+/* Define to 1 if you have the <rsa.h> header file. */
+/* #undef HAVE_RSA_H */
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#define HAVE_SETJMP_H 1
+
+/* Define to 1 if you have the `setvbuf' function. */
+#define HAVE_SETVBUF 1
+
+/* Define to 1 if you have the <sgtty.h> header file. */
+#define HAVE_SGTTY_H 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#define HAVE_SIGACTION 1
+
+/* Define to 1 if you have the `signal' function. */
+#define HAVE_SIGNAL 1
+
+/* If you have sigsetjmp */
+#define HAVE_SIGSETJMP 1
+
+/* Define to 1 if you have the `socket' function. */
+#define HAVE_SOCKET 1
+
+/* Define to 1 if you have the <ssl.h> header file. */
+/* #undef HAVE_SSL_H */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+/* #undef HAVE_STDINT_H */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strcmpi' function. */
+/* #undef HAVE_STRCMPI */
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the `stricmp' function. */
+/* #undef HAVE_STRICMP */
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcat' function. */
+/* #undef HAVE_STRLCAT */
+
+/* Define to 1 if you have the `strlcpy' function. */
+/* #undef HAVE_STRLCPY */
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if you have the `strtok_r' function. */
+#define HAVE_STRTOK_R 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#define HAVE_SYS_POLL_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+/* #undef HAVE_SYS_SOCKIO_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/utime.h> header file. */
+/* #undef HAVE_SYS_UTIME_H */
+
+/* Define to 1 if you have the `tcgetattr' function. */
+#define HAVE_TCGETATTR 1
+
+/* Define to 1 if you have the `tcsetattr' function. */
+#define HAVE_TCSETATTR 1
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define to 1 if you have the <termio.h> header file. */
+#define HAVE_TERMIO_H 1
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+/* Define to 1 if you have the `uname' function. */
+#define HAVE_UNAME 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `utime' function. */
+#define HAVE_UTIME 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if you have the <winsock.h> header file. */
+/* #undef HAVE_WINSOCK_H */
+
+/* Define to 1 if you have the <x509.h> header file. */
+/* #undef HAVE_X509_H */
+
+/* if you have the zlib.h header file */
+/* #undef HAVE_ZLIB_H */
+
+/* if you have the Kerberos4 libraries (including -ldes) */
+/* #undef KRB4 */
+
+/* cpu-machine-OS */
+#define OS "powerpc-ibm-aix5.1.0.0"
+
+/* Name of package */
+#define PACKAGE "curl"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* a suitable file to read random data from */
+/* #undef RANDOM_FILE */
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Version number of package */
+#define VERSION "7.10.2"
+
+/* Define to 1 if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+#define _LARGE_FILES 1
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* type to use in place of in_addr_t if not defined */
+/* #undef in_addr_t */
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* type to use in place of socklen_t if not defined */
+/* #undef socklen_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef ssize_t */
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..158215d2a
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,738 @@
+# cURL/libcurl CMake script
+# by [PUT YOUR REAL NAME TETEST!] and Sukender (Benoit Neil)
+
+# TODO:
+# Check on Linux, Mac
+# Add documentation subproject
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2 FATAL_ERROR)
+SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
+
+project( CURL C )
+SET(CURL_MAJOR_VERSION 7)
+SET(CURL_MINOR_VERSION 19)
+SET(CURL_PATCH_VERSION 4)
+
+INCLUDE_REGULAR_EXPRESSION("^.*$") # Sukender: Is it necessary?
+
+# Setup package meta-data
+# SET(PACKAGE "curl")
+SET(CURL_VERSION ${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION})
+# SET(PACKAGE_TARNAME "curl")
+# SET(PACKAGE_NAME "curl")
+# SET(PACKAGE_VERSION "-")
+# SET(PACKAGE_STRING "curl-")
+# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/")
+SET(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
+SET(OS "\"${CMAKE_SYSTEM_NAME}\"")
+
+# Make the base headers visible to everything
+# IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR})
+ # INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include)
+# ENDIF()
+INCLUDE_DIRECTORIES( ${CURL_SOURCE_DIR}/include )
+
+# Save C and CXX STD libs (we may need to modify them)
+IF(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
+ SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT ${CMAKE_CXX_STANDARD_LIBRARIES})
+ SET(CMAKE_C_STANDARD_LIBRARIES_INIT ${CMAKE_C_STANDARD_LIBRARIES})
+ENDIF()
+
+IF(WIN32)
+ SET(NATIVE_WINDOWS ON)
+ENDIF()
+
+OPTION(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
+OPTION(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
+OPTION(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
+IF(MSVC)
+ OPTION(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF)
+ MARK_AS_ADVANCED(BUILD_RELEASE_DEBUG_DIRS)
+ENDIF()
+
+# IF(WIN32)
+ # OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON)
+ # MARK_AS_ADVANCED(CURL_WINDOWS_SSPI)
+# ENDIF()
+
+OPTION(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF)
+MARK_AS_ADVANCED(HTTP_ONLY)
+OPTION(CURL_DISABLE_FTP "disables FTP" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_FTP)
+OPTION(CURL_DISABLE_LDAP "disables LDAP" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_LDAP)
+OPTION(CURL_DISABLE_TELNET "disables Telnet" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_TELNET)
+OPTION(CURL_DISABLE_DICT "disables DICT" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_DICT)
+OPTION(CURL_DISABLE_FILE "disables FILE" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_FILE)
+OPTION(CURL_DISABLE_TFTP "disables TFTP" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_TFTP)
+OPTION(CURL_DISABLE_HTTP "disables HTTP" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_HTTP)
+
+OPTION(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_LDAPS)
+IF(WIN32)
+ SET(CURL_LDAP_HYBRID OFF)
+ OPTION(CURL_LDAP_WIN "Use W$ LDAP implementation" ON)
+ MARK_AS_ADVANCED(CURL_LDAP_WIN)
+ELSE()
+ OPTION(CURL_LDAP_HYBRID "W$ LDAP with non-W$ compiler" OFF)
+ MARK_AS_ADVANCED(CURL_LDAP_HYBRID)
+ SET(CURL_LDAP_WIN OFF)
+ENDIF()
+
+IF(HTTP_ONLY)
+ SET(CURL_DISABLE_FTP ON)
+ SET(CURL_DISABLE_LDAP ON)
+ SET(CURL_DISABLE_TELNET ON)
+ SET(CURL_DISABLE_DICT ON)
+ SET(CURL_DISABLE_FILE ON)
+ SET(CURL_DISABLE_TFTP ON)
+ENDIF()
+
+OPTION(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_COOKIES)
+
+OPTION(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_CRYPTO_AUTH)
+OPTION(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
+MARK_AS_ADVANCED(CURL_DISABLE_VERBOSE_STRINGS)
+OPTION(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use thread-safe functions" OFF)
+MARK_AS_ADVANCED(DISABLED_THREADSAFE)
+OPTION(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
+MARK_AS_ADVANCED(ENABLE_IPV6)
+
+
+IF(WIN32)
+ IF(CURL_DISABLE_LDAP)
+ #SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib" CACHE STRING "" FORCE)
+ SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib" CACHE STRING "" FORCE)
+ ELSE()
+ #SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib wldap32.lib" CACHE STRING "" FORCE)
+ SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib wldap32.lib" CACHE STRING "" FORCE)
+ ENDIF()
+ENDIF()
+
+
+# We need ansi c-flags, especially on HP
+SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
+SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
+
+# Disable warnings on Borland to avoid changing 3rd party code.
+IF(BORLAND)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
+ENDIF(BORLAND)
+
+# If we are on AIX, do the _ALL_SOURCE magic
+IF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
+ SET(_ALL_SOURCE 1)
+ENDIF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
+
+# Include all the necessary files for macros
+INCLUDE (CheckFunctionExists)
+INCLUDE (CheckIncludeFile)
+INCLUDE (CheckIncludeFiles)
+INCLUDE (CheckLibraryExists)
+INCLUDE (CheckSymbolExists)
+# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
+# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
+IF(CMAKE_CROSSCOMPILING)
+ INCLUDE ("${CMAKE_MODULE_PATH}/CheckTypeSize.cmake")
+ELSE(CMAKE_CROSSCOMPILING)
+ INCLUDE (CheckTypeSize)
+ENDIF(CMAKE_CROSSCOMPILING)
+
+# On windows preload settings
+IF(WIN32)
+ INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
+ENDIF(WIN32)
+
+# This macro checks if the symbol exists in the library and if it
+# does, it appends library to the list.
+SET(CURL_LIBS "")
+MACRO(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
+ CHECK_LIBRARY_EXISTS("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
+ ${VARIABLE})
+ IF(${VARIABLE})
+ SET(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
+ ENDIF(${VARIABLE})
+ENDMACRO(CHECK_LIBRARY_EXISTS_CONCAT)
+
+# Check for all needed libraries
+CHECK_LIBRARY_EXISTS_CONCAT("dl" dlopen HAVE_LIBDL)
+#CHECK_LIBRARY_EXISTS_CONCAT("ucb" gethostname HAVE_LIBUCB)
+CHECK_LIBRARY_EXISTS_CONCAT("socket" connect HAVE_LIBSOCKET)
+CHECK_LIBRARY_EXISTS("c" gethostbyname "" NOT_NEED_LIBNSL)
+
+# Yellowtab Zeta needs different libraries than BeOS 5.
+IF(BEOS)
+ SET(NOT_NEED_LIBNSL 1)
+ CHECK_LIBRARY_EXISTS_CONCAT("bind" gethostbyname HAVE_LIBBIND)
+ CHECK_LIBRARY_EXISTS_CONCAT("bnetapi" closesocket HAVE_LIBBNETAPI)
+ENDIF(BEOS)
+
+IF(NOT NOT_NEED_LIBNSL)
+ CHECK_LIBRARY_EXISTS_CONCAT("nsl" gethostbyname HAVE_LIBNSL)
+ENDIF(NOT NOT_NEED_LIBNSL)
+
+CHECK_LIBRARY_EXISTS_CONCAT("ws2_32" getch HAVE_LIBWS2_32)
+CHECK_LIBRARY_EXISTS_CONCAT("winmm" getch HAVE_LIBWINMM)
+# IF(NOT CURL_SPECIAL_LIBZ)
+# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
+# ENDIF(NOT CURL_SPECIAL_LIBZ)
+
+OPTION(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
+MARK_AS_ADVANCED(CMAKE_USE_OPENSSL)
+IF(CMAKE_USE_OPENSSL)
+ CHECK_LIBRARY_EXISTS_CONCAT("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
+ CHECK_LIBRARY_EXISTS_CONCAT("ssl" SSL_connect HAVE_LIBSSL)
+ENDIF(CMAKE_USE_OPENSSL)
+
+# Check for idn
+CHECK_LIBRARY_EXISTS_CONCAT("idn" idna_to_ascii_lz HAVE_LIBIDN)
+
+# Check for LDAP
+CHECK_LIBRARY_EXISTS_CONCAT("ldap" ldap_init HAVE_LIBLDAP)
+# if(NOT HAVE_LIBLDAP)
+ # SET(CURL_DISABLE_LDAP ON)
+# endif(NOT HAVE_LIBLDAP)
+
+# Check for symbol dlopen (same as HAVE_LIBDL)
+CHECK_LIBRARY_EXISTS("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
+
+# For other tests to use the same libraries
+SET(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS})
+
+OPTION(CURL_ZLIB "Set to ON to enable building cURL with zlib support." ON)
+SET(HAVE_LIBZ OFF)
+SET(HAVE_ZLIB_H OFF)
+SET(HAVE_ZLIB OFF)
+IF(CURL_ZLIB) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
+ FIND_PACKAGE(ZLIB)
+ IF(ZLIB_FOUND)
+ SET(HAVE_ZLIB_H ON)
+ SET(HAVE_ZLIB ON)
+ SET(HAVE_LIBZ ON)
+ ENDIF()
+ENDIF()
+
+# If we have features.h, then do the _BSD_SOURCE magic
+CHECK_INCLUDE_FILE("features.h" HAVE_FEATURES_H)
+
+# Check if header file exists and add it to the list.
+MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
+ CHECK_INCLUDE_FILES("${CURL_INCLUDES};${FILE}" ${VARIABLE})
+ IF(${VARIABLE})
+ SET(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
+ SET(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
+ ENDIF(${VARIABLE})
+ENDMACRO(CHECK_INCLUDE_FILE_CONCAT)
+
+
+# Check for header files
+IF(NOT UNIX)
+ CHECK_INCLUDE_FILE_CONCAT("ws2tcpip.h" HAVE_WS2TCPIP_H)
+ CHECK_INCLUDE_FILE_CONCAT("winsock2.h" HAVE_WINSOCK2_H)
+ENDIF(NOT UNIX)
+CHECK_INCLUDE_FILE_CONCAT("stdio.h" HAVE_STDIO_H)
+IF(NOT UNIX)
+ CHECK_INCLUDE_FILE_CONCAT("windows.h" HAVE_WINDOWS_H)
+ CHECK_INCLUDE_FILE_CONCAT("winsock.h" HAVE_WINSOCK_H)
+ENDIF(NOT UNIX)
+
+CHECK_INCLUDE_FILE_CONCAT("inttypes.h" HAVE_INTTYPES_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/filio.h" HAVE_SYS_FILIO_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/ioctl.h" HAVE_SYS_IOCTL_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/param.h" HAVE_SYS_PARAM_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/poll.h" HAVE_SYS_POLL_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/resource.h" HAVE_SYS_RESOURCE_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/select.h" HAVE_SYS_SELECT_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/socket.h" HAVE_SYS_SOCKET_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/sockio.h" HAVE_SYS_SOCKIO_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/stat.h" HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/time.h" HAVE_SYS_TIME_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/types.h" HAVE_SYS_TYPES_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/uio.h" HAVE_SYS_UIO_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/un.h" HAVE_SYS_UN_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/utime.h" HAVE_SYS_UTIME_H)
+CHECK_INCLUDE_FILE_CONCAT("alloca.h" HAVE_ALLOCA_H)
+CHECK_INCLUDE_FILE_CONCAT("arpa/inet.h" HAVE_ARPA_INET_H)
+CHECK_INCLUDE_FILE_CONCAT("arpa/tftp.h" HAVE_ARPA_TFTP_H)
+CHECK_INCLUDE_FILE_CONCAT("assert.h" HAVE_ASSERT_H)
+CHECK_INCLUDE_FILE_CONCAT("crypto.h" HAVE_CRYPTO_H)
+CHECK_INCLUDE_FILE_CONCAT("des.h" HAVE_DES_H)
+CHECK_INCLUDE_FILE_CONCAT("err.h" HAVE_ERR_H)
+CHECK_INCLUDE_FILE_CONCAT("errno.h" HAVE_ERRNO_H)
+CHECK_INCLUDE_FILE_CONCAT("fcntl.h" HAVE_FCNTL_H)
+CHECK_INCLUDE_FILE_CONCAT("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
+CHECK_INCLUDE_FILE_CONCAT("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
+CHECK_INCLUDE_FILE_CONCAT("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
+CHECK_INCLUDE_FILE_CONCAT("idn-free.h" HAVE_IDN_FREE_H)
+CHECK_INCLUDE_FILE_CONCAT("ifaddrs.h" HAVE_IFADDRS_H)
+CHECK_INCLUDE_FILE_CONCAT("io.h" HAVE_IO_H)
+CHECK_INCLUDE_FILE_CONCAT("krb.h" HAVE_KRB_H)
+CHECK_INCLUDE_FILE_CONCAT("libgen.h" HAVE_LIBGEN_H)
+CHECK_INCLUDE_FILE_CONCAT("libssh2.h" HAVE_LIBSSH2_H)
+CHECK_INCLUDE_FILE_CONCAT("limits.h" HAVE_LIMITS_H)
+CHECK_INCLUDE_FILE_CONCAT("locale.h" HAVE_LOCALE_H)
+CHECK_INCLUDE_FILE_CONCAT("net/if.h" HAVE_NET_IF_H)
+CHECK_INCLUDE_FILE_CONCAT("netdb.h" HAVE_NETDB_H)
+CHECK_INCLUDE_FILE_CONCAT("netinet/in.h" HAVE_NETINET_IN_H)
+CHECK_INCLUDE_FILE_CONCAT("netinet/tcp.h" HAVE_NETINET_TCP_H)
+CHECK_INCLUDE_FILE_CONCAT("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
+CHECK_INCLUDE_FILE_CONCAT("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
+CHECK_INCLUDE_FILE_CONCAT("openssl/err.h" HAVE_OPENSSL_ERR_H)
+CHECK_INCLUDE_FILE_CONCAT("openssl/pem.h" HAVE_OPENSSL_PEM_H)
+CHECK_INCLUDE_FILE_CONCAT("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
+CHECK_INCLUDE_FILE_CONCAT("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
+CHECK_INCLUDE_FILE_CONCAT("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
+CHECK_INCLUDE_FILE_CONCAT("openssl/x509.h" HAVE_OPENSSL_X509_H)
+CHECK_INCLUDE_FILE_CONCAT("pem.h" HAVE_PEM_H)
+CHECK_INCLUDE_FILE_CONCAT("poll.h" HAVE_POLL_H)
+CHECK_INCLUDE_FILE_CONCAT("pwd.h" HAVE_PWD_H)
+CHECK_INCLUDE_FILE_CONCAT("rsa.h" HAVE_RSA_H)
+CHECK_INCLUDE_FILE_CONCAT("setjmp.h" HAVE_SETJMP_H)
+CHECK_INCLUDE_FILE_CONCAT("sgtty.h" HAVE_SGTTY_H)
+CHECK_INCLUDE_FILE_CONCAT("signal.h" HAVE_SIGNAL_H)
+CHECK_INCLUDE_FILE_CONCAT("ssl.h" HAVE_SSL_H)
+CHECK_INCLUDE_FILE_CONCAT("stdbool.h" HAVE_STDBOOL_H)
+CHECK_INCLUDE_FILE_CONCAT("stdint.h" HAVE_STDINT_H)
+CHECK_INCLUDE_FILE_CONCAT("stdio.h" HAVE_STDIO_H)
+CHECK_INCLUDE_FILE_CONCAT("stdlib.h" HAVE_STDLIB_H)
+CHECK_INCLUDE_FILE_CONCAT("string.h" HAVE_STRING_H)
+CHECK_INCLUDE_FILE_CONCAT("strings.h" HAVE_STRINGS_H)
+CHECK_INCLUDE_FILE_CONCAT("stropts.h" HAVE_STROPTS_H)
+CHECK_INCLUDE_FILE_CONCAT("termio.h" HAVE_TERMIO_H)
+CHECK_INCLUDE_FILE_CONCAT("termios.h" HAVE_TERMIOS_H)
+CHECK_INCLUDE_FILE_CONCAT("time.h" HAVE_TIME_H)
+CHECK_INCLUDE_FILE_CONCAT("tld.h" HAVE_TLD_H)
+CHECK_INCLUDE_FILE_CONCAT("unistd.h" HAVE_UNISTD_H)
+CHECK_INCLUDE_FILE_CONCAT("utime.h" HAVE_UTIME_H)
+CHECK_INCLUDE_FILE_CONCAT("x509.h" HAVE_X509_H)
+
+CHECK_INCLUDE_FILE_CONCAT("process.h" HAVE_PROCESS_H)
+CHECK_INCLUDE_FILE_CONCAT("stddef.h" HAVE_STDDEF_H)
+CHECK_INCLUDE_FILE_CONCAT("dlfcn.h" HAVE_DLFCN_H)
+CHECK_INCLUDE_FILE_CONCAT("malloc.h" HAVE_MALLOC_H)
+CHECK_INCLUDE_FILE_CONCAT("memory.h" HAVE_MEMORY_H)
+CHECK_INCLUDE_FILE_CONCAT("ldap.h" HAVE_LDAP_H)
+CHECK_INCLUDE_FILE_CONCAT("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
+CHECK_INCLUDE_FILE_CONCAT("stdint.h" HAVE_STDINT_H)
+CHECK_INCLUDE_FILE_CONCAT("sockio.h" HAVE_SOCKIO_H)
+CHECK_INCLUDE_FILE_CONCAT("sys/utsname.h" HAVE_SYS_UTSNAME_H)
+CHECK_INCLUDE_FILE_CONCAT("idna.h" HAVE_IDNA_H)
+
+IF(CMAKE_USE_OPENSSL)
+ CHECK_INCLUDE_FILE_CONCAT("openssl/rand.h" HAVE_OPENSSL_RAND_H)
+ENDIF(CMAKE_USE_OPENSSL)
+
+
+CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T)
+CHECK_TYPE_SIZE(ssize_t SIZEOF_SSIZE_T)
+CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
+CHECK_TYPE_SIZE("long" SIZEOF_LONG)
+CHECK_TYPE_SIZE("__int64" SIZEOF___INT64)
+CHECK_TYPE_SIZE("long double" SIZEOF_LONG_DOUBLE)
+CHECK_TYPE_SIZE("time_t" SIZEOF_TIME_T)
+IF(NOT HAVE_SIZEOF_SSIZE_T)
+ IF(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
+ SET(ssize_t long)
+ ENDIF(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
+ IF(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
+ SET(ssize_t __int64)
+ ENDIF(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
+ENDIF(NOT HAVE_SIZEOF_SSIZE_T)
+
+# Different sizeofs, etc.
+
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+
+set(CURL_SIZEOF_LONG ${SIZEOF_LONG})
+
+if(SIZEOF_LONG EQUAL 8)
+ set(CURL_TYPEOF_CURL_OFF_T long)
+ set(CURL_SIZEOF_CURL_OFF_T 8)
+ set(CURL_FORMAT_CURL_OFF_T "ld")
+ set(CURL_FORMAT_CURL_OFF_TU "lu")
+ set(CURL_FORMAT_OFF_T "%ld")
+ set(CURL_SUFFIX_CURL_OFF_T L)
+ set(CURL_SUFFIX_CURL_OFF_TU LU)
+endif(SIZEOF_LONG EQUAL 8)
+
+if(SIZEOF_LONG_LONG EQUAL 8)
+ set(CURL_TYPEOF_CURL_OFF_T "long long")
+ set(CURL_SIZEOF_CURL_OFF_T 8)
+ set(CURL_FORMAT_CURL_OFF_T "lld")
+ set(CURL_FORMAT_CURL_OFF_TU "llu")
+ set(CURL_FORMAT_OFF_T "%lld")
+ set(CURL_SUFFIX_CURL_OFF_T LL)
+ set(CURL_SUFFIX_CURL_OFF_TU LLU)
+endif(SIZEOF_LONG_LONG EQUAL 8)
+
+if(NOT CURL_TYPEOF_CURL_OFF_T)
+ set(CURL_TYPEOF_CURL_OFF_T ${ssize_t})
+ set(CURL_SIZEOF_CURL_OFF_T ${SIZEOF_SSIZE_T})
+ # TODO: need adjustment here.
+ set(CURL_FORMAT_CURL_OFF_T "ld")
+ set(CURL_FORMAT_CURL_OFF_TU "lu")
+ set(CURL_FORMAT_OFF_T "%ld")
+ set(CURL_SUFFIX_CURL_OFF_T L)
+ set(CURL_SUFFIX_CURL_OFF_TU LU)
+endif(NOT CURL_TYPEOF_CURL_OFF_T)
+
+IF(HAVE_SIZEOF_LONG_LONG)
+ SET(HAVE_LONGLONG 1)
+ SET(HAVE_LL 1)
+ENDIF(HAVE_SIZEOF_LONG_LONG)
+
+FIND_FILE(RANDOM_FILE urandom /dev)
+MARK_AS_ADVANCED(RANDOM_FILE)
+
+# Check for some functions that are used
+CHECK_SYMBOL_EXISTS(basename "${CURL_INCLUDES}" HAVE_BASENAME)
+CHECK_SYMBOL_EXISTS(socket "${CURL_INCLUDES}" HAVE_SOCKET)
+CHECK_SYMBOL_EXISTS(poll "${CURL_INCLUDES}" HAVE_POLL)
+CHECK_SYMBOL_EXISTS(select "${CURL_INCLUDES}" HAVE_SELECT)
+CHECK_SYMBOL_EXISTS(strdup "${CURL_INCLUDES}" HAVE_STRDUP)
+CHECK_SYMBOL_EXISTS(strstr "${CURL_INCLUDES}" HAVE_STRSTR)
+CHECK_SYMBOL_EXISTS(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R)
+CHECK_SYMBOL_EXISTS(strftime "${CURL_INCLUDES}" HAVE_STRFTIME)
+CHECK_SYMBOL_EXISTS(uname "${CURL_INCLUDES}" HAVE_UNAME)
+CHECK_SYMBOL_EXISTS(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP)
+CHECK_SYMBOL_EXISTS(stricmp "${CURL_INCLUDES}" HAVE_STRICMP)
+CHECK_SYMBOL_EXISTS(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI)
+CHECK_SYMBOL_EXISTS(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI)
+CHECK_SYMBOL_EXISTS(alarm "${CURL_INCLUDES}" HAVE_ALARM)
+IF(NOT HAVE_STRNCMPI)
+ SET(HAVE_STRCMPI)
+ENDIF(NOT HAVE_STRNCMPI)
+CHECK_SYMBOL_EXISTS(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
+CHECK_SYMBOL_EXISTS(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
+CHECK_SYMBOL_EXISTS(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
+CHECK_SYMBOL_EXISTS(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR)
+CHECK_SYMBOL_EXISTS(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA)
+CHECK_SYMBOL_EXISTS(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
+CHECK_SYMBOL_EXISTS(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR)
+CHECK_SYMBOL_EXISTS(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR)
+CHECK_SYMBOL_EXISTS(perror "${CURL_INCLUDES}" HAVE_PERROR)
+CHECK_SYMBOL_EXISTS(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
+CHECK_SYMBOL_EXISTS(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF)
+CHECK_SYMBOL_EXISTS(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP)
+CHECK_SYMBOL_EXISTS(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R)
+CHECK_SYMBOL_EXISTS(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT)
+CHECK_SYMBOL_EXISTS(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID)
+CHECK_SYMBOL_EXISTS(geteuid "${CURL_INCLUDES}" HAVE_GETEUID)
+CHECK_SYMBOL_EXISTS(utime "${CURL_INCLUDES}" HAVE_UTIME)
+IF(CMAKE_USE_OPENSSL)
+ CHECK_SYMBOL_EXISTS(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
+ CHECK_SYMBOL_EXISTS(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
+ CHECK_SYMBOL_EXISTS(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
+ CHECK_SYMBOL_EXISTS(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
+ HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
+ IF(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
+ SET(USE_OPENSSL 1)
+ SET(USE_SSLEAY 1)
+ ENDIF(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
+ENDIF(CMAKE_USE_OPENSSL)
+CHECK_SYMBOL_EXISTS(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
+CHECK_SYMBOL_EXISTS(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R)
+
+CHECK_SYMBOL_EXISTS(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME)
+CHECK_SYMBOL_EXISTS(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R)
+
+CHECK_SYMBOL_EXISTS(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC)
+CHECK_SYMBOL_EXISTS(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO)
+IF(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
+ SET(HAVE_SIGNAL 1)
+ENDIF(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
+CHECK_SYMBOL_EXISTS(uname "${CURL_INCLUDES}" HAVE_UNAME)
+CHECK_SYMBOL_EXISTS(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL)
+CHECK_SYMBOL_EXISTS(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64)
+CHECK_SYMBOL_EXISTS(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R)
+CHECK_SYMBOL_EXISTS(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
+CHECK_SYMBOL_EXISTS(perror "${CURL_INCLUDES}" HAVE_PERROR)
+CHECK_SYMBOL_EXISTS(fork "${CURL_INCLUDES}" HAVE_FORK)
+CHECK_SYMBOL_EXISTS(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
+CHECK_SYMBOL_EXISTS(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
+CHECK_SYMBOL_EXISTS(pipe "${CURL_INCLUDES}" HAVE_PIPE)
+CHECK_SYMBOL_EXISTS(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
+CHECK_SYMBOL_EXISTS(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
+CHECK_SYMBOL_EXISTS(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT)
+CHECK_SYMBOL_EXISTS(idn_free "${CURL_INCLUDES}" HAVE_IDN_FREE)
+CHECK_SYMBOL_EXISTS(idna_strerror "${CURL_INCLUDES}" HAVE_IDNA_STRERROR)
+CHECK_SYMBOL_EXISTS(tld_strerror "${CURL_INCLUDES}" HAVE_TLD_STRERROR)
+CHECK_SYMBOL_EXISTS(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE)
+CHECK_SYMBOL_EXISTS(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
+CHECK_SYMBOL_EXISTS(fcntl "${CURL_INCLUDES}" HAVE_FCNTL)
+CHECK_SYMBOL_EXISTS(ioctl "${CURL_INCLUDES}" HAVE_IOCTL)
+CHECK_SYMBOL_EXISTS(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
+
+# symbol exists in win32, but function does not.
+CHECK_FUNCTION_EXISTS(inet_pton HAVE_INET_PTON)
+
+# sigaction and sigsetjmp are special. Use special mechanism for
+# detecting those, but only if previous attempt failed.
+IF(HAVE_SIGNAL_H)
+ CHECK_SYMBOL_EXISTS(sigaction "signal.h" HAVE_SIGACTION)
+ENDIF(HAVE_SIGNAL_H)
+
+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)
+
+# If there is no stricmp(), do not allow LDAP to parse URLs
+if(NOT HAVE_STRICMP)
+ SET(HAVE_LDAP_URL_PARSE 1)
+endif(NOT HAVE_STRICMP)
+
+# For other curl specific tests, use this macro.
+MACRO(CURL_INTERNAL_TEST CURL_TEST)
+ IF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
+ SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+ "-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
+ IF(CMAKE_REQUIRED_LIBRARIES)
+ SET(CURL_TEST_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ ENDIF(CMAKE_REQUIRED_LIBRARIES)
+
+ MESSAGE(STATUS "Performing Curl Test ${CURL_TEST}")
+ TRY_COMPILE(${CURL_TEST}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+ "${CURL_TEST_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT)
+ IF(${CURL_TEST})
+ SET(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
+ MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Success")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Performing Curl Test ${CURL_TEST} passed with the following output:\n"
+ "${OUTPUT}\n")
+ ELSE(${CURL_TEST})
+ MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
+ SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Performing Curl Test ${CURL_TEST} failed with the following output:\n"
+ "${OUTPUT}\n")
+ ENDIF(${CURL_TEST})
+ ENDIF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
+ENDMACRO(CURL_INTERNAL_TEST)
+
+MACRO(CURL_INTERNAL_TEST_RUN CURL_TEST)
+ IF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
+ SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+ "-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
+ IF(CMAKE_REQUIRED_LIBRARIES)
+ SET(CURL_TEST_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ ENDIF(CMAKE_REQUIRED_LIBRARIES)
+
+ MESSAGE(STATUS "Performing Curl Test ${CURL_TEST}")
+ TRY_RUN(${CURL_TEST} ${CURL_TEST}_COMPILE
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+ "${CURL_TEST_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT)
+ IF(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
+ SET(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
+ MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Success")
+ ELSE(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
+ MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
+ SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
+ FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
+ "Performing Curl Test ${CURL_TEST} failed with the following output:\n"
+ "${OUTPUT}")
+ IF(${CURL_TEST}_COMPILE)
+ FILE(APPEND
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
+ "There was a problem running this test\n")
+ ENDIF(${CURL_TEST}_COMPILE)
+ FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
+ "\n\n")
+ ENDIF(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
+ ENDIF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
+ENDMACRO(CURL_INTERNAL_TEST_RUN)
+
+# Do curl specific tests
+FOREACH(CURL_TEST
+ HAVE_FCNTL_O_NONBLOCK
+ HAVE_IOCTLSOCKET
+ HAVE_IOCTLSOCKET_CAMEL
+ HAVE_IOCTLSOCKET_CAMEL_FIONBIO
+ HAVE_IOCTLSOCKET_FIONBIO
+ HAVE_IOCTL_FIONBIO
+ HAVE_IOCTL_SIOCGIFADDR
+ HAVE_SETSOCKOPT_SO_NONBLOCK
+ HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
+ TIME_WITH_SYS_TIME
+ HAVE_O_NONBLOCK
+ HAVE_GETHOSTBYADDR_R_5
+ HAVE_GETHOSTBYADDR_R_7
+ HAVE_GETHOSTBYADDR_R_8
+ HAVE_GETHOSTBYADDR_R_5_REENTRANT
+ HAVE_GETHOSTBYADDR_R_7_REENTRANT
+ HAVE_GETHOSTBYADDR_R_8_REENTRANT
+ HAVE_GETHOSTBYNAME_R_3
+ HAVE_GETHOSTBYNAME_R_5
+ HAVE_GETHOSTBYNAME_R_6
+ HAVE_GETHOSTBYNAME_R_3_REENTRANT
+ HAVE_GETHOSTBYNAME_R_5_REENTRANT
+ HAVE_GETHOSTBYNAME_R_6_REENTRANT
+ HAVE_SOCKLEN_T
+ HAVE_IN_ADDR_T
+ HAVE_BOOL_T
+ STDC_HEADERS
+ RETSIGTYPE_TEST
+ HAVE_INET_NTOA_R_DECL
+ HAVE_INET_NTOA_R_DECL_REENTRANT
+ HAVE_GETADDRINFO
+ HAVE_FILE_OFFSET_BITS
+ )
+ CURL_INTERNAL_TEST(${CURL_TEST})
+ENDFOREACH(CURL_TEST)
+IF(HAVE_FILE_OFFSET_BITS)
+ SET(_FILE_OFFSET_BITS 64)
+ENDIF(HAVE_FILE_OFFSET_BITS)
+
+FOREACH(CURL_TEST
+ HAVE_GLIBC_STRERROR_R
+ HAVE_POSIX_STRERROR_R
+ )
+ CURL_INTERNAL_TEST_RUN(${CURL_TEST})
+ENDFOREACH(CURL_TEST)
+
+# Check for reentrant
+FOREACH(CURL_TEST
+ HAVE_GETHOSTBYADDR_R_5
+ HAVE_GETHOSTBYADDR_R_7
+ HAVE_GETHOSTBYADDR_R_8
+ HAVE_GETHOSTBYNAME_R_3
+ HAVE_GETHOSTBYNAME_R_5
+ HAVE_GETHOSTBYNAME_R_6
+ HAVE_INET_NTOA_R_DECL_REENTRANT)
+ IF(NOT ${CURL_TEST})
+ IF(${CURL_TEST}_REENTRANT)
+ SET(NEED_REENTRANT 1)
+ ENDIF(${CURL_TEST}_REENTRANT)
+ ENDIF(NOT ${CURL_TEST})
+ENDFOREACH(CURL_TEST)
+
+IF(NEED_REENTRANT)
+ FOREACH(CURL_TEST
+ HAVE_GETHOSTBYADDR_R_5
+ HAVE_GETHOSTBYADDR_R_7
+ HAVE_GETHOSTBYADDR_R_8
+ HAVE_GETHOSTBYNAME_R_3
+ HAVE_GETHOSTBYNAME_R_5
+ HAVE_GETHOSTBYNAME_R_6)
+ SET(${CURL_TEST} 0)
+ IF(${CURL_TEST}_REENTRANT)
+ SET(${CURL_TEST} 1)
+ ENDIF(${CURL_TEST}_REENTRANT)
+ ENDFOREACH(CURL_TEST)
+ENDIF(NEED_REENTRANT)
+
+IF(HAVE_INET_NTOA_R_DECL_REENTRANT)
+ SET(HAVE_INET_NTOA_R_DECL 1)
+ SET(NEED_REENTRANT 1)
+ENDIF(HAVE_INET_NTOA_R_DECL_REENTRANT)
+
+# Some other minor tests
+
+IF(NOT HAVE_SOCKLEN_T)
+ SET(socklen_t "int")
+ENDIF(NOT HAVE_SOCKLEN_T)
+
+IF(NOT HAVE_IN_ADDR_T)
+ SET(in_addr_t "unsigned long")
+ENDIF(NOT HAVE_IN_ADDR_T)
+
+# Fix libz / zlib.h
+
+IF(NOT CURL_SPECIAL_LIBZ)
+ IF(NOT HAVE_LIBZ)
+ SET(HAVE_ZLIB_H 0)
+ ENDIF(NOT HAVE_LIBZ)
+
+ IF(NOT HAVE_ZLIB_H)
+ SET(HAVE_LIBZ 0)
+ ENDIF(NOT HAVE_ZLIB_H)
+ENDIF(NOT CURL_SPECIAL_LIBZ)
+
+IF(_FILE_OFFSET_BITS)
+ SET(_FILE_OFFSET_BITS 64)
+ENDIF(_FILE_OFFSET_BITS)
+SET(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64")
+SET(CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/curl/curl.h")
+CHECK_TYPE_SIZE("curl_off_t" SIZEOF_CURL_OFF_T)
+SET(CMAKE_EXTRA_INCLUDE_FILES)
+SET(CMAKE_REQUIRED_FLAGS)
+
+
+# Check for nonblocking
+SET(HAVE_DISABLED_NONBLOCKING 1)
+IF(HAVE_FIONBIO OR
+ HAVE_IOCTLSOCKET OR
+ HAVE_IOCTLSOCKET_CASE OR
+ HAVE_O_NONBLOCK)
+ SET(HAVE_DISABLED_NONBLOCKING)
+ENDIF(HAVE_FIONBIO OR
+ HAVE_IOCTLSOCKET OR
+ HAVE_IOCTLSOCKET_CASE OR
+ HAVE_O_NONBLOCK)
+
+IF(RETSIGTYPE_TEST)
+ SET(RETSIGTYPE void)
+ELSE(RETSIGTYPE_TEST)
+ SET(RETSIGTYPE int)
+ENDIF(RETSIGTYPE_TEST)
+
+IF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
+ INCLUDE(CheckCCompilerFlag)
+ CHECK_C_COMPILER_FLAG(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
+ IF(HAVE_C_FLAG_Wno_long_double)
+ # The Mac version of GCC warns about use of long double. Disable it.
+ GET_SOURCE_FILE_PROPERTY(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
+ IF(MPRINTF_COMPILE_FLAGS)
+ SET(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
+ ELSE(MPRINTF_COMPILE_FLAGS)
+ SET(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
+ ENDIF(MPRINTF_COMPILE_FLAGS)
+ SET_SOURCE_FILES_PROPERTIES(mprintf.c PROPERTIES
+ COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
+ ENDIF(HAVE_C_FLAG_Wno_long_double)
+ENDIF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
+
+INCLUDE(CMake/OtherTests.cmake)
+
+ADD_DEFINITIONS(-DHAVE_CONFIG_H -DCURL_STATICLIB)
+
+# For windows, do not allow the compiler to use default target (Vista).
+IF(WIN32)
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501)
+ENDIF(WIN32)
+
+
+add_subdirectory(lib)
+# add_subdirectory(src)
+
+# This needs to be run very last so other parts of the scripts can take advantage of this.
+IF(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
+ SET(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
+ENDIF()
diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake
new file mode 100644
index 000000000..07fcc1aeb
--- /dev/null
+++ b/include/curl/curlbuild.h.cmake
@@ -0,0 +1,153 @@
+#ifndef __CURL_CURLBUILD_H
+#define __CURL_CURLBUILD_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * $Id$
+ ***************************************************************************/
+
+/* ================================================================ */
+/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
+/* ================================================================ */
+
+/*
+ * NOTE 1:
+ * -------
+ *
+ * Nothing in this file is intended to be modified or adjusted by the
+ * curl library user nor by the curl library builder.
+ *
+ * If you think that something actually needs to be changed, adjusted
+ * or fixed in this file, then, report it on the libcurl development
+ * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/
+ *
+ * This header file shall only export symbols which are 'curl' or 'CURL'
+ * prefixed, otherwise public name space would be polluted.
+ *
+ * NOTE 2:
+ * -------
+ *
+ * Right now you might be staring at file include/curl/curlbuild.h.in or
+ * at file include/curl/curlbuild.h, this is due to the following reason:
+ *
+ * On systems capable of running the configure script, the configure process
+ * will overwrite the distributed include/curl/curlbuild.h file with one that
+ * is suitable and specific to the library being configured and built, which
+ * is generated from the include/curl/curlbuild.h.in template file.
+ *
+ */
+
+/* ================================================================ */
+/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
+/* ================================================================ */
+
+#ifdef CURL_SIZEOF_LONG
+# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
+#endif
+
+#ifdef CURL_TYPEOF_CURL_OFF_T
+# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_FORMAT_CURL_OFF_T
+# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_FORMAT_CURL_OFF_TU
+# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
+#endif
+
+#ifdef CURL_FORMAT_OFF_T
+# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SIZEOF_CURL_OFF_T
+# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SUFFIX_CURL_OFF_T
+# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SUFFIX_CURL_OFF_TU
+# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
+#endif
+
+/* ================================================================ */
+/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
+/* ================================================================ */
+
+/* Configure process defines this to 1 when it finds out that system */
+/* header file sys/types.h must be included by the external interface. */
+#cmakedefine CURL_PULL_SYS_TYPES_H ${CURL_PULL_SYS_TYPES_H}
+#ifdef CURL_PULL_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+/* Configure process defines this to 1 when it finds out that system */
+/* header file stdint.h must be included by the external interface. */
+#cmakedefine CURL_PULL_STDINT_H ${CURL_PULL_STDINT_H}
+#ifdef CURL_PULL_STDINT_H
+# include <stdint.h>
+#endif
+
+/* Configure process defines this to 1 when it finds out that system */
+/* header file inttypes.h must be included by the external interface. */
+#cmakedefine CURL_PULL_INTTYPES_H ${CURL_PULL_INTTYPES_H}
+#ifdef CURL_PULL_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+/* The size of `long', as computed by sizeof. */
+#cmakedefine CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG}
+
+/* Signed integral data type used for curl_off_t. */
+#cmakedefine CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T}
+
+/* Data type definition of curl_off_t. */
+typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
+
+/* curl_off_t formatting string directive without "%" conversion specifier. */
+#cmakedefine CURL_FORMAT_CURL_OFF_T ${CURL_FORMAT_CURL_OFF_T}
+
+/* unsigned curl_off_t formatting string without "%" conversion specifier. */
+#cmakedefine CURL_FORMAT_CURL_OFF_TU ${CURL_FORMAT_CURL_OFF_TU}
+
+/* curl_off_t formatting string directive with "%" conversion specifier. */
+#cmakedefine CURL_FORMAT_OFF_T ${CURL_FORMAT_OFF_T}
+
+/* The size of `curl_off_t', as computed by sizeof. */
+#cmakedefine CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T}
+
+/* curl_off_t constant suffix. */
+#cmakedefine CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T}
+
+/* unsigned curl_off_t constant suffix. */
+#cmakedefine CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU}
+
+#endif /* __CURL_CURLBUILD_H */
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644
index 000000000..655c2ffb2
--- /dev/null
+++ b/lib/CMakeLists.txt
@@ -0,0 +1,231 @@
+SET(LIB_NAME libcurl)
+
+CONFIGURE_FILE(${CURL_SOURCE_DIR}/include/curl/curlbuild.h.cmake
+ ${CURL_BINARY_DIR}/include/curl/curlbuild.h)
+CONFIGURE_FILE(config.h.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
+SET(libCurl_HEADERS
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+ ${CURL_BINARY_DIR}/include/curl/curlbuild.h
+ arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h
+ progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h
+ if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h
+ getinfo.h strequal.h krb4.h memdebug.h http_chunks.h
+ strtok.h connect.h llist.h hash.h content_encoding.h share.h
+ curl_md5.h http_digest.h http_negotiate.h http_ntlm.h inet_pton.h
+ strtoofft.h strerror.h inet_ntop.h curlx.h memory.h setup.h
+ transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h
+ tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h
+ curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h
+)
+
+SET(libCurl_SRCS
+ # amigaos.c - does not build on AmigaOS
+ base64.c
+ connect.c
+ content_encoding.c
+ cookie.c
+ curl_addrinfo.c
+ curl_sspi.c
+ dict.c
+ easy.c
+ escape.c
+ file.c
+ formdata.c
+ ftp.c
+ getenv.c
+ getinfo.c
+ gtls.c
+ hash.c
+ hostares.c
+ hostasyn.c
+ hostip4.c
+ hostip6.c
+ hostip.c
+ hostsyn.c
+ hostthre.c
+ http.c
+ http_chunks.c
+ http_digest.c
+ http_negotiate.c
+ http_ntlm.c
+ if2ip.c
+ inet_ntop.c
+ inet_pton.c
+ krb4.c
+ ldap.c
+ llist.c
+ md5.c
+# memdebug.c -not used
+ mprintf.c
+ multi.c
+ netrc.c
+ # nwlib.c - Not used
+ parsedate.c
+ progress.c
+ rawstr.c
+ security.c
+ select.c
+ sendf.c
+ slist.c
+ share.c
+ socks.c
+ speedcheck.c
+ splay.c
+ ssh.c
+ sslgen.c
+ ssluse.c
+ strdup.c
+ strequal.c
+ strerror.c
+ # strtok.c - specify later
+ # strtoofft.c - specify later
+ telnet.c
+ tftp.c
+ timeval.c
+ transfer.c
+ url.c
+ version.c
+)
+
+IF(MSVC)
+ LIST(APPEND libCurl_SRCS libcurl.rc)
+ENDIF()
+
+# if we have Kerberos 4, right now this is never on
+#OPTION(CURL_KRB4 "Use Kerberos 4" OFF)
+IF(CURL_KRB4)
+ SET(libCurl_SRCS ${libCurl_SRCS}
+ krb4.c
+ security.c
+ )
+ENDIF(CURL_KRB4)
+
+#OPTION(CURL_MALLOC_DEBUG "Debug mallocs in Curl" OFF)
+MARK_AS_ADVANCED(CURL_MALLOC_DEBUG)
+IF(CURL_MALLOC_DEBUG)
+ SET(libCurl_SRCS ${libCurl_SRCS}
+ memdebug.c
+ )
+ENDIF(CURL_MALLOC_DEBUG)
+
+IF(CURL_ZLIB AND ZLIB_FOUND)
+ INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+ENDIF()
+
+IF(HAVE_FEATURES_H)
+ SET_SOURCE_FILES_PROPERTIES(
+ cookie.c
+ easy.c
+ formdata.c
+ getenv.c
+ hash.c
+ http.c
+ if2ip.c
+ mprintf.c
+ multi.c
+ sendf.c
+ telnet.c
+ transfer.c
+ url.c
+ COMPILE_FLAGS -D_BSD_SOURCE)
+ENDIF(HAVE_FEATURES_H)
+
+#strtoll \
+#socket \
+#select \
+#strdup \
+#strstr \
+#strtok_r \
+#uname \
+#strcasecmp \
+#stricmp \
+#strcmpi \
+#gethostbyaddr \
+#gettimeofday \
+#inet_addr \
+#inet_ntoa \
+#inet_pton \
+#perror \
+#closesocket \
+#siginterrupt \
+#sigaction \
+#signal \
+#getpass_r \
+#strlcat \
+#getpwuid \
+#geteuid \
+#dlopen \
+#utime \
+#sigsetjmp \
+#basename \
+#setlocale \
+#ftruncate \
+#pipe \
+#poll \
+#getprotobyname \
+#getrlimit \
+#setrlimit \
+#fork
+
+# only build compat strtok if we need to
+IF (NOT HAVE_STRTOK_R)
+ SET(libCurl_SRCS ${libCurl_SRCS}
+ strtok.c
+ )
+ENDIF (NOT HAVE_STRTOK_R)
+
+# only build compat strtoofft if we need to
+IF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
+ SET(libCurl_SRCS ${libCurl_SRCS}
+ strtoofft.c
+ )
+ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
+
+# The rest of the build
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../include)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../include)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/..)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+
+IF(CURL_STATICLIB)
+ SET(CURL_USER_DEFINED_DYNAMIC_OR_STATIC STATIC)
+ELSE()
+ SET(CURL_USER_DEFINED_DYNAMIC_OR_STATIC SHARED)
+ENDIF()
+
+ADD_LIBRARY(
+ ${LIB_NAME}
+ ${CURL_USER_DEFINED_DYNAMIC_OR_STATIC}
+ ${libCurl_HEADERS} ${libCurl_SRCS}
+)
+
+TARGET_LINK_LIBRARIES(${LIB_NAME} ${CURL_LIBS})
+
+IF(WIN32)
+ ADD_DEFINITIONS( -D_USRDLL )
+ENDIF()
+
+IF(CURL_ZLIB AND ZLIB_FOUND)
+ TARGET_LINK_LIBRARIES(${LIB_NAME} ${ZLIB_LIBRARIES})
+ #ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ )
+ENDIF()
+
+# IF(CURL_SSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
+ # LIST(APPEND DEPENDENCIES_NAMES OpenSSL)
+ # ADD_DEFINITIONS( -DUSE_SSLEAY )
+# ENDIF()
+
+# IF(MSVC)
+ # IF(NOT BUILD_RELEASE_DEBUG_DIRS)
+ # # Ugly workaround to remove the "/debug" or "/release" in each output
+ # SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../")
+ # SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
+ # ENDIF()
+ # # Add "_imp" as a suffix before the extension
+ # SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
+# ENDIF()
diff --git a/lib/config.h.cmake b/lib/config.h.cmake
new file mode 100644
index 000000000..f4ff86740
--- /dev/null
+++ b/lib/config.h.cmake
@@ -0,0 +1,946 @@
+/* lib/config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the $func function. */
+#cmakedefine AS_TR_CPP ${AS_TR_CPP}
+
+/* when building libcurl itself */
+#cmakedefine BUILDING_LIBCURL ${BUILDING_LIBCURL}
+
+/* Location of default ca bundle */
+#cmakedefine CURL_CA_BUNDLE ${CURL_CA_BUNDLE}
+
+/* Location of default ca path */
+#cmakedefine CURL_CA_PATH ${CURL_CA_PATH}
+
+/* to disable cookies support */
+#cmakedefine CURL_DISABLE_COOKIES ${CURL_DISABLE_COOKIES}
+
+/* to disable cryptographic authentication */
+#cmakedefine CURL_DISABLE_CRYPTO_AUTH ${CURL_DISABLE_CRYPTO_AUTH}
+
+/* to disable DICT */
+#cmakedefine CURL_DISABLE_DICT ${CURL_DISABLE_DICT}
+
+/* to disable FILE */
+#cmakedefine CURL_DISABLE_FILE ${CURL_DISABLE_FILE}
+
+/* to disable FTP */
+#cmakedefine CURL_DISABLE_FTP ${CURL_DISABLE_FTP}
+
+/* to disable HTTP */
+#cmakedefine CURL_DISABLE_HTTP ${CURL_DISABLE_HTTP}
+
+/* to disable LDAP */
+#cmakedefine CURL_DISABLE_LDAP ${CURL_DISABLE_LDAP}
+
+/* to disable LDAPS */
+#cmakedefine CURL_DISABLE_LDAPS ${CURL_DISABLE_LDAPS}
+
+/* to disable proxies */
+#cmakedefine CURL_DISABLE_PROXY ${CURL_DISABLE_PROXY}
+
+/* to disable TELNET */
+#cmakedefine CURL_DISABLE_TELNET ${CURL_DISABLE_TELNET}
+
+/* to disable TFTP */
+#cmakedefine CURL_DISABLE_TFTP ${CURL_DISABLE_TFTP}
+
+/* to disable verbose strings */
+#cmakedefine CURL_DISABLE_VERBOSE_STRINGS ${CURL_DISABLE_VERBOSE_STRINGS}
+
+/* to make a symbol visible */
+#cmakedefine CURL_EXTERN_SYMBOL ${CURL_EXTERN_SYMBOL}
+
+/* to enable hidden symbols */
+#cmakedefine CURL_HIDDEN_SYMBOLS ${CURL_HIDDEN_SYMBOLS}
+
+/* W$ LDAP with non-W$ compiler */
+#cmakedefine CURL_LDAP_HYBRID ${CURL_LDAP_HYBRID}
+
+/* Use W$ LDAP implementation */
+#cmakedefine CURL_LDAP_WIN ${CURL_LDAP_WIN}
+
+/* when not building a shared library */
+#cmakedefine CURL_STATICLIB ${CURL_STATICLIB}
+
+/* Set to explicitly specify we don't want to use thread-safe functions */
+#cmakedefine DISABLED_THREADSAFE ${DISABLED_THREADSAFE}
+
+/* your Entropy Gathering Daemon socket pathname */
+#cmakedefine EGD_SOCKET ${EGD_SOCKET}
+
+/* Define if you want to enable IPv6 support */
+#cmakedefine ENABLE_IPV6 ${ENABLE_IPV6}
+
+/* Define to the type qualifier of arg 1 for getnameinfo. */
+#cmakedefine GETNAMEINFO_QUAL_ARG1 ${GETNAMEINFO_QUAL_ARG1}
+
+/* Define to the type of arg 1 for getnameinfo. */
+#cmakedefine GETNAMEINFO_TYPE_ARG1 ${GETNAMEINFO_TYPE_ARG1}
+
+/* Define to the type of arg 2 for getnameinfo. */
+#cmakedefine GETNAMEINFO_TYPE_ARG2 ${GETNAMEINFO_TYPE_ARG2}
+
+/* Define to the type of args 4 and 6 for getnameinfo. */
+#cmakedefine GETNAMEINFO_TYPE_ARG46 ${GETNAMEINFO_TYPE_ARG46}
+
+/* Define to the type of arg 7 for getnameinfo. */
+#cmakedefine GETNAMEINFO_TYPE_ARG7 ${GETNAMEINFO_TYPE_ARG7}
+
+/* Specifies the number of arguments to getservbyport_r */
+#cmakedefine GETSERVBYPORT_R_ARGS ${GETSERVBYPORT_R_ARGS}
+
+/* Specifies the size of the buffer to pass to getservbyport_r */
+#cmakedefine GETSERVBYPORT_R_BUFSIZE ${GETSERVBYPORT_R_BUFSIZE}
+
+/* Define to 1 if you have the alarm function. */
+#cmakedefine HAVE_ALARM ${HAVE_ALARM}
+
+/* Define to 1 if you have the <alloca.h> header file. */
+#cmakedefine HAVE_ALLOCA_H ${HAVE_ALLOCA_H}
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#cmakedefine HAVE_ARPA_INET_H ${HAVE_ARPA_INET_H}
+
+/* Define to 1 if you have the <arpa/tftp.h> header file. */
+#cmakedefine HAVE_ARPA_TFTP_H ${HAVE_ARPA_TFTP_H}
+
+/* Define to 1 if you have the <assert.h> header file. */
+#cmakedefine HAVE_ASSERT_H ${HAVE_ASSERT_H}
+
+/* Define to 1 if you have the `basename' function. */
+#cmakedefine HAVE_BASENAME ${HAVE_BASENAME}
+
+/* Define to 1 if bool is an available type. */
+#cmakedefine HAVE_BOOL_T ${HAVE_BOOL_T}
+
+/* Define to 1 if you have the clock_gettime function and monotonic timer. */
+#cmakedefine HAVE_CLOCK_GETTIME_MONOTONIC ${HAVE_CLOCK_GETTIME_MONOTONIC}
+
+/* Define to 1 if you have the `closesocket' function. */
+#cmakedefine HAVE_CLOSESOCKET ${HAVE_CLOSESOCKET}
+
+/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
+#cmakedefine HAVE_CRYPTO_CLEANUP_ALL_EX_DATA ${HAVE_CRYPTO_CLEANUP_ALL_EX_DATA}
+
+/* Define to 1 if you have the <crypto.h> header file. */
+#cmakedefine HAVE_CRYPTO_H ${HAVE_CRYPTO_H}
+
+/* Define to 1 if you have the <des.h> header file. */
+#cmakedefine HAVE_DES_H ${HAVE_DES_H}
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H}
+
+/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
+#cmakedefine HAVE_ENGINE_LOAD_BUILTIN_ENGINES ${HAVE_ENGINE_LOAD_BUILTIN_ENGINES}
+
+/* Define to 1 if you have the <errno.h> header file. */
+#cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H}
+
+/* Define to 1 if you have the <err.h> header file. */
+#cmakedefine HAVE_ERR_H ${HAVE_ERR_H}
+
+/* Define to 1 if you have the fcntl function. */
+#cmakedefine HAVE_FCNTL ${HAVE_FCNTL}
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#cmakedefine HAVE_FCNTL_H ${HAVE_FCNTL_H}
+
+/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
+#cmakedefine HAVE_FCNTL_O_NONBLOCK ${HAVE_FCNTL_O_NONBLOCK}
+
+/* Define to 1 if you have the fdopen function. */
+#cmakedefine HAVE_FDOPEN ${HAVE_FDOPEN}
+
+/* Define to 1 if you have the `fork' function. */
+#cmakedefine HAVE_FORK ${HAVE_FORK}
+
+/* Define to 1 if you have the freeaddrinfo function. */
+#cmakedefine HAVE_FREEADDRINFO ${HAVE_FREEADDRINFO}
+
+/* Define to 1 if you have the freeifaddrs function. */
+#cmakedefine HAVE_FREEIFADDRS ${HAVE_FREEIFADDRS}
+
+/* Define to 1 if you have the ftruncate function. */
+#cmakedefine HAVE_FTRUNCATE ${HAVE_FTRUNCATE}
+
+/* Define to 1 if you have a working getaddrinfo function. */
+#cmakedefine HAVE_GETADDRINFO ${HAVE_GETADDRINFO}
+
+/* Define to 1 if you have the `geteuid' function. */
+#cmakedefine HAVE_GETEUID ${HAVE_GETEUID}
+
+/* Define to 1 if you have the gethostbyaddr function. */
+#cmakedefine HAVE_GETHOSTBYADDR ${HAVE_GETHOSTBYADDR}
+
+/* Define to 1 if you have the gethostbyaddr_r function. */
+#cmakedefine HAVE_GETHOSTBYADDR_R ${HAVE_GETHOSTBYADDR_R}
+
+/* gethostbyaddr_r() takes 5 args */
+#cmakedefine HAVE_GETHOSTBYADDR_R_5 ${HAVE_GETHOSTBYADDR_R_5}
+
+/* gethostbyaddr_r() takes 7 args */
+#cmakedefine HAVE_GETHOSTBYADDR_R_7 ${HAVE_GETHOSTBYADDR_R_7}
+
+/* gethostbyaddr_r() takes 8 args */
+#cmakedefine HAVE_GETHOSTBYADDR_R_8 ${HAVE_GETHOSTBYADDR_R_8}
+
+/* Define to 1 if you have the gethostbyname function. */
+#cmakedefine HAVE_GETHOSTBYNAME ${HAVE_GETHOSTBYNAME}
+
+/* Define to 1 if you have the gethostbyname_r function. */
+#cmakedefine HAVE_GETHOSTBYNAME_R ${HAVE_GETHOSTBYNAME_R}
+
+/* gethostbyname_r() takes 3 args */
+#cmakedefine HAVE_GETHOSTBYNAME_R_3 ${HAVE_GETHOSTBYNAME_R_3}
+
+/* gethostbyname_r() takes 5 args */
+#cmakedefine HAVE_GETHOSTBYNAME_R_5 ${HAVE_GETHOSTBYNAME_R_5}
+
+/* gethostbyname_r() takes 6 args */
+#cmakedefine HAVE_GETHOSTBYNAME_R_6 ${HAVE_GETHOSTBYNAME_R_6}
+
+/* Define to 1 if you have the gethostname function. */
+#cmakedefine HAVE_GETHOSTNAME ${HAVE_GETHOSTNAME}
+
+/* Define to 1 if you have a working getifaddrs function. */
+#cmakedefine HAVE_GETIFADDRS ${HAVE_GETIFADDRS}
+
+/* Define to 1 if you have the getnameinfo function. */
+#cmakedefine HAVE_GETNAMEINFO ${HAVE_GETNAMEINFO}
+
+/* Define to 1 if you have the `getpass_r' function. */
+#cmakedefine HAVE_GETPASS_R ${HAVE_GETPASS_R}
+
+/* Define to 1 if you have the `getppid' function. */
+#cmakedefine HAVE_GETPPID ${HAVE_GETPPID}
+
+/* Define to 1 if you have the `getprotobyname' function. */
+#cmakedefine HAVE_GETPROTOBYNAME ${HAVE_GETPROTOBYNAME}
+
+/* Define to 1 if you have the `getpwuid' function. */
+#cmakedefine HAVE_GETPWUID ${HAVE_GETPWUID}
+
+/* Define to 1 if you have the `getrlimit' function. */
+#cmakedefine HAVE_GETRLIMIT ${HAVE_GETRLIMIT}
+
+/* Define to 1 if you have the getservbyport_r function. */
+#cmakedefine HAVE_GETSERVBYPORT_R ${HAVE_GETSERVBYPORT_R}
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#cmakedefine HAVE_GETTIMEOFDAY ${HAVE_GETTIMEOFDAY}
+
+/* Define to 1 if you have a working glibc-style strerror_r function. */
+#cmakedefine HAVE_GLIBC_STRERROR_R ${HAVE_GLIBC_STRERROR_R}
+
+/* Define to 1 if you have a working gmtime_r function. */
+#cmakedefine HAVE_GMTIME_R ${HAVE_GMTIME_R}
+
+/* if you have the gssapi libraries */
+#cmakedefine HAVE_GSSAPI ${HAVE_GSSAPI}
+
+/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
+#cmakedefine HAVE_GSSAPI_GSSAPI_GENERIC_H ${HAVE_GSSAPI_GSSAPI_GENERIC_H}
+
+/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
+#cmakedefine HAVE_GSSAPI_GSSAPI_H ${HAVE_GSSAPI_GSSAPI_H}
+
+/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
+#cmakedefine HAVE_GSSAPI_GSSAPI_KRB5_H ${HAVE_GSSAPI_GSSAPI_KRB5_H}
+
+/* if you have the GNU gssapi libraries */
+#cmakedefine HAVE_GSSGNU ${HAVE_GSSGNU}
+
+/* if you have the Heimdal gssapi libraries */
+#cmakedefine HAVE_GSSHEIMDAL ${HAVE_GSSHEIMDAL}
+
+/* if you have the MIT gssapi libraries */
+#cmakedefine HAVE_GSSMIT ${HAVE_GSSMIT}
+
+/* Define to 1 if you have the `idna_strerror' function. */
+#cmakedefine HAVE_IDNA_STRERROR ${HAVE_IDNA_STRERROR}
+
+/* Define to 1 if you have the `idn_free' function. */
+#cmakedefine HAVE_IDN_FREE ${HAVE_IDN_FREE}
+
+/* Define to 1 if you have the <idn-free.h> header file. */
+#cmakedefine HAVE_IDN_FREE_H ${HAVE_IDN_FREE_H}
+
+/* Define to 1 if you have the <ifaddrs.h> header file. */
+#cmakedefine HAVE_IFADDRS_H ${HAVE_IFADDRS_H}
+
+/* Define to 1 if you have the `inet_addr' function. */
+#cmakedefine HAVE_INET_ADDR ${HAVE_INET_ADDR}
+
+/* Define to 1 if you have the inet_ntoa_r function. */
+#cmakedefine HAVE_INET_NTOA_R ${HAVE_INET_NTOA_R}
+
+/* inet_ntoa_r() takes 2 args */
+#cmakedefine HAVE_INET_NTOA_R_2 ${HAVE_INET_NTOA_R_2}
+
+/* inet_ntoa_r() takes 3 args */
+#cmakedefine HAVE_INET_NTOA_R_3 ${HAVE_INET_NTOA_R_3}
+
+/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
+#cmakedefine HAVE_INET_NTOP ${HAVE_INET_NTOP}
+
+/* Define to 1 if you have a IPv6 capable working inet_pton function. */
+#cmakedefine HAVE_INET_PTON ${HAVE_INET_PTON}
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H}
+
+/* Define to 1 if you have the ioctl function. */
+#cmakedefine HAVE_IOCTL ${HAVE_IOCTL}
+
+/* Define to 1 if you have the ioctlsocket function. */
+#cmakedefine HAVE_IOCTLSOCKET ${HAVE_IOCTLSOCKET}
+
+/* Define to 1 if you have the IoctlSocket camel case function. */
+#cmakedefine HAVE_IOCTLSOCKET_CAMEL ${HAVE_IOCTLSOCKET_CAMEL}
+
+/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function.
+ */
+#cmakedefine HAVE_IOCTLSOCKET_CAMEL_FIONBIO ${HAVE_IOCTLSOCKET_CAMEL_FIONBIO}
+
+/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
+#cmakedefine HAVE_IOCTLSOCKET_FIONBIO ${HAVE_IOCTLSOCKET_FIONBIO}
+
+/* Define to 1 if you have a working ioctl FIONBIO function. */
+#cmakedefine HAVE_IOCTL_FIONBIO ${HAVE_IOCTL_FIONBIO}
+
+/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
+#cmakedefine HAVE_IOCTL_SIOCGIFADDR ${HAVE_IOCTL_SIOCGIFADDR}
+
+/* Define to 1 if you have the <io.h> header file. */
+#cmakedefine HAVE_IO_H ${HAVE_IO_H}
+
+/* if you have the Kerberos4 libraries (including -ldes) */
+#cmakedefine HAVE_KRB4 ${HAVE_KRB4}
+
+/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
+#cmakedefine HAVE_KRB_GET_OUR_IP_FOR_REALM ${HAVE_KRB_GET_OUR_IP_FOR_REALM}
+
+/* Define to 1 if you have the <krb.h> header file. */
+#cmakedefine HAVE_KRB_H ${HAVE_KRB_H}
+
+/* Define to 1 if you have the lber.h header file. */
+#cmakedefine HAVE_LBER_H ${HAVE_LBER_H}
+
+/* Define to 1 if you have the ldapssl.h header file. */
+#cmakedefine HAVE_LDAPSSL_H ${HAVE_LDAPSSL_H}
+
+/* Define to 1 if you have the ldap.h header file. */
+#cmakedefine HAVE_LDAP_H ${HAVE_LDAP_H}
+
+/* Use LDAPS implementation */
+#cmakedefine HAVE_LDAP_SSL ${HAVE_LDAP_SSL}
+
+/* Define to 1 if you have the ldap_ssl.h header file. */
+#cmakedefine HAVE_LDAP_SSL_H ${HAVE_LDAP_SSL_H}
+
+/* Define to 1 if you have the `ldap_url_parse' function. */
+#cmakedefine HAVE_LDAP_URL_PARSE ${HAVE_LDAP_URL_PARSE}
+
+/* Define to 1 if you have the <libgen.h> header file. */
+#cmakedefine HAVE_LIBGEN_H ${HAVE_LIBGEN_H}
+
+/* Define to 1 if you have the `idn' library (-lidn). */
+#cmakedefine HAVE_LIBIDN ${HAVE_LIBIDN}
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+#cmakedefine HAVE_LIBRESOLV ${HAVE_LIBRESOLV}
+
+/* Define to 1 if you have the `resolve' library (-lresolve). */
+#cmakedefine HAVE_LIBRESOLVE ${HAVE_LIBRESOLVE}
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+#cmakedefine HAVE_LIBSOCKET ${HAVE_LIBSOCKET}
+
+/* Define to 1 if you have the `ssh2' library (-lssh2). */
+#cmakedefine HAVE_LIBSSH2 ${HAVE_LIBSSH2}
+
+/* Define to 1 if you have the <libssh2.h> header file. */
+#cmakedefine HAVE_LIBSSH2_H ${HAVE_LIBSSH2_H}
+
+/* Define to 1 if you have the `ssl' library (-lssl). */
+#cmakedefine HAVE_LIBSSL ${HAVE_LIBSSL}
+
+/* if zlib is available */
+#cmakedefine HAVE_LIBZ ${HAVE_LIBZ}
+
+/* Define to 1 if you have the <limits.h> header file. */
+#cmakedefine HAVE_LIMITS_H ${HAVE_LIMITS_H}
+
+/* if your compiler supports LL */
+#cmakedefine HAVE_LL ${HAVE_LL}
+
+/* Define to 1 if you have the <locale.h> header file. */
+#cmakedefine HAVE_LOCALE_H ${HAVE_LOCALE_H}
+
+/* Define to 1 if you have a working localtime_r function. */
+#cmakedefine HAVE_LOCALTIME_R ${HAVE_LOCALTIME_R}
+
+/* Define to 1 if the compiler supports the 'long long' data type. */
+#cmakedefine HAVE_LONGLONG ${HAVE_LONGLONG}
+
+/* Define to 1 if you have the malloc.h header file. */
+#cmakedefine HAVE_MALLOC_H ${HAVE_MALLOC_H}
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H ${HAVE_MEMORY_H}
+
+/* Define to 1 if you have the MSG_NOSIGNAL flag. */
+#cmakedefine HAVE_MSG_NOSIGNAL ${HAVE_MSG_NOSIGNAL}
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#cmakedefine HAVE_NETDB_H ${HAVE_NETDB_H}
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#cmakedefine HAVE_NETINET_IN_H ${HAVE_NETINET_IN_H}
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#cmakedefine HAVE_NETINET_TCP_H ${HAVE_NETINET_TCP_H}
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#cmakedefine HAVE_NET_IF_H ${HAVE_NET_IF_H}
+
+/* Define to 1 if NI_WITHSCOPEID exists and works. */
+#cmakedefine HAVE_NI_WITHSCOPEID ${HAVE_NI_WITHSCOPEID}
+
+/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
+ */
+#cmakedefine HAVE_OLD_GSSMIT ${HAVE_OLD_GSSMIT}
+
+/* Define to 1 if you have the <openssl/crypto.h> header file. */
+#cmakedefine HAVE_OPENSSL_CRYPTO_H ${HAVE_OPENSSL_CRYPTO_H}
+
+/* Define to 1 if you have the <openssl/engine.h> header file. */
+#cmakedefine HAVE_OPENSSL_ENGINE_H ${HAVE_OPENSSL_ENGINE_H}
+
+/* Define to 1 if you have the <openssl/err.h> header file. */
+#cmakedefine HAVE_OPENSSL_ERR_H ${HAVE_OPENSSL_ERR_H}
+
+/* Define to 1 if you have the <openssl/pem.h> header file. */
+#cmakedefine HAVE_OPENSSL_PEM_H ${HAVE_OPENSSL_PEM_H}
+
+/* Define to 1 if you have the <openssl/pkcs12.h> header file. */
+#cmakedefine HAVE_OPENSSL_PKCS12_H ${HAVE_OPENSSL_PKCS12_H}
+
+/* Define to 1 if you have the <openssl/rsa.h> header file. */
+#cmakedefine HAVE_OPENSSL_RSA_H ${HAVE_OPENSSL_RSA_H}
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+#cmakedefine HAVE_OPENSSL_SSL_H ${HAVE_OPENSSL_SSL_H}
+
+/* Define to 1 if you have the <openssl/x509.h> header file. */
+#cmakedefine HAVE_OPENSSL_X509_H ${HAVE_OPENSSL_X509_H}
+
+/* Define to 1 if you have the <pem.h> header file. */
+#cmakedefine HAVE_PEM_H ${HAVE_PEM_H}
+
+/* Define to 1 if you have the `perror' function. */
+#cmakedefine HAVE_PERROR ${HAVE_PERROR}
+
+/* Define to 1 if you have the `pipe' function. */
+#cmakedefine HAVE_PIPE ${HAVE_PIPE}
+
+/* if you have the function PK11_CreateGenericObject */
+#cmakedefine HAVE_PK11_CREATEGENERICOBJECT ${HAVE_PK11_CREATEGENERICOBJECT}
+
+/* Define to 1 if you have a working poll function. */
+#cmakedefine HAVE_POLL ${HAVE_POLL}
+
+/* If you have a fine poll */
+#cmakedefine HAVE_POLL_FINE ${HAVE_POLL_FINE}
+
+/* Define to 1 if you have the <poll.h> header file. */
+#cmakedefine HAVE_POLL_H ${HAVE_POLL_H}
+
+/* Define to 1 if you have a working POSIX-style strerror_r function. */
+#cmakedefine HAVE_POSIX_STRERROR_R ${HAVE_POSIX_STRERROR_R}
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#cmakedefine HAVE_PWD_H ${HAVE_PWD_H}
+
+/* Define to 1 if you have the `RAND_egd' function. */
+#cmakedefine HAVE_RAND_EGD ${HAVE_RAND_EGD}
+
+/* Define to 1 if you have the `RAND_screen' function. */
+#cmakedefine HAVE_RAND_SCREEN ${HAVE_RAND_SCREEN}
+
+/* Define to 1 if you have the `RAND_status' function. */
+#cmakedefine HAVE_RAND_STATUS ${HAVE_RAND_STATUS}
+
+/* Define to 1 if you have the recv function. */
+#cmakedefine HAVE_RECV ${HAVE_RECV}
+
+/* Define to 1 if you have the recvfrom function. */
+#cmakedefine HAVE_RECVFROM ${HAVE_RECVFROM}
+
+/* Define to 1 if you have the <rsa.h> header file. */
+#cmakedefine HAVE_RSA_H ${HAVE_RSA_H}
+
+/* Define to 1 if you have the select function. */
+#cmakedefine HAVE_SELECT ${HAVE_SELECT}
+
+/* Define to 1 if you have the send function. */
+#cmakedefine HAVE_SEND ${HAVE_SEND}
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#cmakedefine HAVE_SETJMP_H ${HAVE_SETJMP_H}
+
+/* Define to 1 if you have the `setlocale' function. */
+#cmakedefine HAVE_SETLOCALE ${HAVE_SETLOCALE}
+
+/* Define to 1 if you have the `setmode' function. */
+#cmakedefine HAVE_SETMODE ${HAVE_SETMODE}
+
+/* Define to 1 if you have the `setrlimit' function. */
+#cmakedefine HAVE_SETRLIMIT ${HAVE_SETRLIMIT}
+
+/* Define to 1 if you have the setsockopt function. */
+#cmakedefine HAVE_SETSOCKOPT ${HAVE_SETSOCKOPT}
+
+/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
+#cmakedefine HAVE_SETSOCKOPT_SO_NONBLOCK ${HAVE_SETSOCKOPT_SO_NONBLOCK}
+
+/* Define to 1 if you have the <sgtty.h> header file. */
+#cmakedefine HAVE_SGTTY_H ${HAVE_SGTTY_H}
+
+/* Define to 1 if you have the sigaction function. */
+#cmakedefine HAVE_SIGACTION ${HAVE_SIGACTION}
+
+/* Define to 1 if you have the siginterrupt function. */
+#cmakedefine HAVE_SIGINTERRUPT ${HAVE_SIGINTERRUPT}
+
+/* Define to 1 if you have the signal function. */
+#cmakedefine HAVE_SIGNAL ${HAVE_SIGNAL}
+
+/* Define to 1 if you have the <signal.h> header file. */
+#cmakedefine HAVE_SIGNAL_H ${HAVE_SIGNAL_H}
+
+/* Define to 1 if you have the sigsetjmp function or macro. */
+#cmakedefine HAVE_SIGSETJMP ${HAVE_SIGSETJMP}
+
+/* Define to 1 if sig_atomic_t is an available typedef. */
+#cmakedefine HAVE_SIG_ATOMIC_T ${HAVE_SIG_ATOMIC_T}
+
+/* Define to 1 if sig_atomic_t is already defined as volatile. */
+#cmakedefine HAVE_SIG_ATOMIC_T_VOLATILE ${HAVE_SIG_ATOMIC_T_VOLATILE}
+
+/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */
+#cmakedefine HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID ${HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID}
+
+/* Define to 1 if you have the `socket' function. */
+#cmakedefine HAVE_SOCKET ${HAVE_SOCKET}
+
+/* Define this if you have the SPNEGO library fbopenssl */
+#cmakedefine HAVE_SPNEGO ${HAVE_SPNEGO}
+
+/* Define to 1 if you have the `SSL_get_shutdown' function. */
+#cmakedefine HAVE_SSL_GET_SHUTDOWN ${HAVE_SSL_GET_SHUTDOWN}
+
+/* Define to 1 if you have the <ssl.h> header file. */
+#cmakedefine HAVE_SSL_H ${HAVE_SSL_H}
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#cmakedefine HAVE_STDBOOL_H ${HAVE_STDBOOL_H}
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H}
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#cmakedefine HAVE_STDIO_H ${HAVE_STDIO_H}
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H}
+
+/* Define to 1 if you have the strcasecmp function. */
+#cmakedefine HAVE_STRCASECMP ${HAVE_STRCASECMP}
+
+/* Define to 1 if you have the strcasestr function. */
+#cmakedefine HAVE_STRCASESTR ${HAVE_STRCASESTR}
+
+/* Define to 1 if you have the strcmpi function. */
+#cmakedefine HAVE_STRCMPI ${HAVE_STRCMPI}
+
+/* Define to 1 if you have the strdup function. */
+#cmakedefine HAVE_STRDUP ${HAVE_STRDUP}
+
+/* Define to 1 if you have the strerror_r function. */
+#cmakedefine HAVE_STRERROR_R ${HAVE_STRERROR_R}
+
+/* Define to 1 if you have the stricmp function. */
+#cmakedefine HAVE_STRICMP ${HAVE_STRICMP}
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H}
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
+
+/* Define to 1 if you have the strlcat function. */
+#cmakedefine HAVE_STRLCAT ${HAVE_STRLCAT}
+
+/* Define to 1 if you have the `strlcpy' function. */
+#cmakedefine HAVE_STRLCPY ${HAVE_STRLCPY}
+
+/* Define to 1 if you have the strncasecmp function. */
+#cmakedefine HAVE_STRNCASECMP ${HAVE_STRNCASECMP}
+
+/* Define to 1 if you have the strncmpi function. */
+#cmakedefine HAVE_STRNCMPI ${HAVE_STRNCMPI}
+
+/* Define to 1 if you have the strnicmp function. */
+#cmakedefine HAVE_STRNICMP ${HAVE_STRNICMP}
+
+/* Define to 1 if you have the <stropts.h> header file. */
+#cmakedefine HAVE_STROPTS_H ${HAVE_STROPTS_H}
+
+/* Define to 1 if you have the strstr function. */
+#cmakedefine HAVE_STRSTR ${HAVE_STRSTR}
+
+/* Define to 1 if you have the strtok_r function. */
+#cmakedefine HAVE_STRTOK_R ${HAVE_STRTOK_R}
+
+/* Define to 1 if you have the strtoll function. */
+#cmakedefine HAVE_STRTOLL ${HAVE_STRTOLL}
+
+/* if struct sockaddr_storage is defined */
+#cmakedefine HAVE_STRUCT_SOCKADDR_STORAGE ${HAVE_STRUCT_SOCKADDR_STORAGE}
+
+/* Define to 1 if you have the timeval struct. */
+#cmakedefine HAVE_STRUCT_TIMEVAL ${HAVE_STRUCT_TIMEVAL}
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+#cmakedefine HAVE_SYS_FILIO_H ${HAVE_SYS_FILIO_H}
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#cmakedefine HAVE_SYS_IOCTL_H ${HAVE_SYS_IOCTL_H}
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#cmakedefine HAVE_SYS_PARAM_H ${HAVE_SYS_PARAM_H}
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#cmakedefine HAVE_SYS_POLL_H ${HAVE_SYS_POLL_H}
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#cmakedefine HAVE_SYS_RESOURCE_H ${HAVE_SYS_RESOURCE_H}
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#cmakedefine HAVE_SYS_SELECT_H ${HAVE_SYS_SELECT_H}
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#cmakedefine HAVE_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H}
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+#cmakedefine HAVE_SYS_SOCKIO_H ${HAVE_SYS_SOCKIO_H}
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H ${HAVE_SYS_STAT_H}
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H}
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H}
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#cmakedefine HAVE_SYS_UIO_H ${HAVE_SYS_UIO_H}
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#cmakedefine HAVE_SYS_UN_H ${HAVE_SYS_UN_H}
+
+/* Define to 1 if you have the <sys/utime.h> header file. */
+#cmakedefine HAVE_SYS_UTIME_H ${HAVE_SYS_UTIME_H}
+
+/* Define to 1 if you have the <termios.h> header file. */
+#cmakedefine HAVE_TERMIOS_H ${HAVE_TERMIOS_H}
+
+/* Define to 1 if you have the <termio.h> header file. */
+#cmakedefine HAVE_TERMIO_H ${HAVE_TERMIO_H}
+
+/* Define to 1 if you have the <time.h> header file. */
+#cmakedefine HAVE_TIME_H ${HAVE_TIME_H}
+
+/* Define to 1 if you have the <tld.h> header file. */
+#cmakedefine HAVE_TLD_H ${HAVE_TLD_H}
+
+/* Define to 1 if you have the `tld_strerror' function. */
+#cmakedefine HAVE_TLD_STRERROR ${HAVE_TLD_STRERROR}
+
+/* Define to 1 if you have the `uname' function. */
+#cmakedefine HAVE_UNAME ${HAVE_UNAME}
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
+
+/* Define to 1 if you have the `utime' function. */
+#cmakedefine HAVE_UTIME ${HAVE_UTIME}
+
+/* Define to 1 if you have the <utime.h> header file. */
+#cmakedefine HAVE_UTIME_H ${HAVE_UTIME_H}
+
+/* Define to 1 if compiler supports C99 variadic macro style. */
+#cmakedefine HAVE_VARIADIC_MACROS_C99 ${HAVE_VARIADIC_MACROS_C99}
+
+/* Define to 1 if compiler supports old gcc variadic macro style. */
+#cmakedefine HAVE_VARIADIC_MACROS_GCC ${HAVE_VARIADIC_MACROS_GCC}
+
+/* Define to 1 if you have the winber.h header file. */
+#cmakedefine HAVE_WINBER_H ${HAVE_WINBER_H}
+
+/* Define to 1 if you have the windows.h header file. */
+#cmakedefine HAVE_WINDOWS_H ${HAVE_WINDOWS_H}
+
+/* Define to 1 if you have the winldap.h header file. */
+#cmakedefine HAVE_WINLDAP_H ${HAVE_WINLDAP_H}
+
+/* Define to 1 if you have the winsock2.h header file. */
+#cmakedefine HAVE_WINSOCK2_H ${HAVE_WINSOCK2_H}
+
+/* Define to 1 if you have the winsock.h header file. */
+#cmakedefine HAVE_WINSOCK_H ${HAVE_WINSOCK_H}
+
+/* Define this symbol if your OS supports changing the contents of argv */
+#cmakedefine HAVE_WRITABLE_ARGV ${HAVE_WRITABLE_ARGV}
+
+/* Define to 1 if you have the writev function. */
+#cmakedefine HAVE_WRITEV ${HAVE_WRITEV}
+
+/* Define to 1 if you have the ws2tcpip.h header file. */
+#cmakedefine HAVE_WS2TCPIP_H ${HAVE_WS2TCPIP_H}
+
+/* Define to 1 if you have the <x509.h> header file. */
+#cmakedefine HAVE_X509_H ${HAVE_X509_H}
+
+/* if you have the zlib.h header file */
+#cmakedefine HAVE_ZLIB_H ${HAVE_ZLIB_H}
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#cmakedefine LT_OBJDIR ${LT_OBJDIR}
+
+/* Define to 1 if you are building a native Windows target. */
+#cmakedefine NATIVE_WINDOWS ${NATIVE_WINDOWS}
+
+/* If you lack a fine basename() prototype */
+#cmakedefine NEED_BASENAME_PROTO ${NEED_BASENAME_PROTO}
+
+/* Define to 1 if you need the lber.h header file even with ldap.h */
+#cmakedefine NEED_LBER_H ${NEED_LBER_H}
+
+/* Define to 1 if you need the malloc.h header file even with stdlib.h */
+#cmakedefine NEED_MALLOC_H ${NEED_MALLOC_H}
+
+/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
+#cmakedefine NEED_REENTRANT ${NEED_REENTRANT}
+
+/* cpu-machine-OS */
+#cmakedefine OS ${OS}
+
+/* Name of package */
+#cmakedefine PACKAGE ${PACKAGE}
+
+/* Define to the address where bug reports for this package should be sent. */
+#cmakedefine PACKAGE_BUGREPORT ${PACKAGE_BUGREPORT}
+
+/* Define to the full name of this package. */
+#cmakedefine PACKAGE_NAME ${PACKAGE_NAME}
+
+/* Define to the full name and version of this package. */
+#cmakedefine PACKAGE_STRING ${PACKAGE_STRING}
+
+/* Define to the one symbol short name of this package. */
+#cmakedefine PACKAGE_TARNAME ${PACKAGE_TARNAME}
+
+/* Define to the version of this package. */
+#cmakedefine PACKAGE_VERSION ${PACKAGE_VERSION}
+
+/* a suitable file to read random data from */
+#cmakedefine RANDOM_FILE "${RANDOM_FILE}"
+
+/* Define to the type of arg 1 for recvfrom. */
+#cmakedefine RECVFROM_TYPE_ARG1 ${RECVFROM_TYPE_ARG1}
+
+/* Define to the type pointed by arg 2 for recvfrom. */
+#cmakedefine RECVFROM_TYPE_ARG2 ${RECVFROM_TYPE_ARG2}
+
+/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
+#cmakedefine RECVFROM_TYPE_ARG2_IS_VOID ${RECVFROM_TYPE_ARG2_IS_VOID}
+
+/* Define to the type of arg 3 for recvfrom. */
+#cmakedefine RECVFROM_TYPE_ARG3 ${RECVFROM_TYPE_ARG3}
+
+/* Define to the type of arg 4 for recvfrom. */
+#cmakedefine RECVFROM_TYPE_ARG4 ${RECVFROM_TYPE_ARG4}
+
+/* Define to the type pointed by arg 5 for recvfrom. */
+#cmakedefine RECVFROM_TYPE_ARG5 ${RECVFROM_TYPE_ARG5}
+
+/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
+#cmakedefine RECVFROM_TYPE_ARG5_IS_VOID ${RECVFROM_TYPE_ARG5_IS_VOID}
+
+/* Define to the type pointed by arg 6 for recvfrom. */
+#cmakedefine RECVFROM_TYPE_ARG6 ${RECVFROM_TYPE_ARG6}
+
+/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
+#cmakedefine RECVFROM_TYPE_ARG6_IS_VOID ${RECVFROM_TYPE_ARG6_IS_VOID}
+
+/* Define to the function return type for recvfrom. */
+#cmakedefine RECVFROM_TYPE_RETV ${RECVFROM_TYPE_RETV}
+
+/* Define to the type of arg 1 for recv. */
+#cmakedefine RECV_TYPE_ARG1 ${RECV_TYPE_ARG1}
+
+/* Define to the type of arg 2 for recv. */
+#cmakedefine RECV_TYPE_ARG2 ${RECV_TYPE_ARG2}
+
+/* Define to the type of arg 3 for recv. */
+#cmakedefine RECV_TYPE_ARG3 ${RECV_TYPE_ARG3}
+
+/* Define to the type of arg 4 for recv. */
+#cmakedefine RECV_TYPE_ARG4 ${RECV_TYPE_ARG4}
+
+/* Define to the function return type for recv. */
+#cmakedefine RECV_TYPE_RETV ${RECV_TYPE_RETV}
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#cmakedefine RETSIGTYPE ${RETSIGTYPE}
+
+/* Define to the type qualifier of arg 5 for select. */
+#cmakedefine SELECT_QUAL_ARG5 ${SELECT_QUAL_ARG5}
+
+/* Define to the type of arg 1 for select. */
+#cmakedefine SELECT_TYPE_ARG1 ${SELECT_TYPE_ARG1}
+
+/* Define to the type of args 2, 3 and 4 for select. */
+#cmakedefine SELECT_TYPE_ARG234 ${SELECT_TYPE_ARG234}
+
+/* Define to the type of arg 5 for select. */
+#cmakedefine SELECT_TYPE_ARG5 ${SELECT_TYPE_ARG5}
+
+/* Define to the function return type for select. */
+#cmakedefine SELECT_TYPE_RETV ${SELECT_TYPE_RETV}
+
+/* Define to the type qualifier of arg 2 for send. */
+#cmakedefine SEND_QUAL_ARG2 ${SEND_QUAL_ARG2}
+
+/* Define to the type of arg 1 for send. */
+#cmakedefine SEND_TYPE_ARG1 ${SEND_TYPE_ARG1}
+
+/* Define to the type of arg 2 for send. */
+#cmakedefine SEND_TYPE_ARG2 ${SEND_TYPE_ARG2}
+
+/* Define to the type of arg 3 for send. */
+#cmakedefine SEND_TYPE_ARG3 ${SEND_TYPE_ARG3}
+
+/* Define to the type of arg 4 for send. */
+#cmakedefine SEND_TYPE_ARG4 ${SEND_TYPE_ARG4}
+
+/* Define to the function return type for send. */
+#cmakedefine SEND_TYPE_RETV ${SEND_TYPE_RETV}
+
+/* The size of `int', as computed by sizeof. */
+#cmakedefine SIZEOF_INT ${SIZEOF_INT}
+
+/* The size of `long', as computed by sizeof. */
+#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
+
+/* The size of `off_t', as computed by sizeof. */
+#cmakedefine SIZEOF_OFF_T ${SIZEOF_OFF_T}
+
+/* The size of `size_t', as computed by sizeof. */
+#cmakedefine SIZEOF_SIZE_T ${SIZEOF_SIZE_T}
+
+/* The size of `time_t', as computed by sizeof. */
+#cmakedefine SIZEOF_TIME_T ${SIZEOF_TIME_T}
+
+/* The size of `void*', as computed by sizeof. */
+#cmakedefine SIZEOF_VOIDP ${SIZEOF_VOIDP}
+
+/* Define to 1 if you have the ANSI C header files. */
+#cmakedefine STDC_HEADERS ${STDC_HEADERS}
+
+/* Define to the type of arg 3 for strerror_r. */
+#cmakedefine STRERROR_R_TYPE_ARG3 ${STRERROR_R_TYPE_ARG3}
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#cmakedefine TIME_WITH_SYS_TIME ${TIME_WITH_SYS_TIME}
+
+/* Define if you want to enable c-ares support */
+#cmakedefine USE_ARES ${USE_ARES}
+
+/* Define to disable non-blocking sockets. */
+#cmakedefine USE_BLOCKING_SOCKETS ${USE_BLOCKING_SOCKETS}
+
+/* if GnuTLS is enabled */
+#cmakedefine USE_GNUTLS ${USE_GNUTLS}
+
+/* if libSSH2 is in use */
+#cmakedefine USE_LIBSSH2 ${USE_LIBSSH2}
+
+/* If you want to build curl with the built-in manual */
+#cmakedefine USE_MANUAL ${USE_MANUAL}
+
+/* if NSS is enabled */
+#cmakedefine USE_NSS ${USE_NSS}
+
+/* if OpenSSL is in use */
+#cmakedefine USE_OPENSSL ${USE_OPENSSL}
+
+/* if SSL is enabled */
+#cmakedefine USE_SSLEAY ${USE_SSLEAY}
+
+/* Define to 1 if you are building a Windows target without large file
+ support. */
+#cmakedefine USE_WIN32_LARGE_FILES ${USE_WIN32_LARGE_FILES}
+
+/* to enable SSPI support */
+#cmakedefine USE_WINDOWS_SSPI ${USE_WINDOWS_SSPI}
+
+/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */
+#cmakedefine USE_YASSLEMUL ${USE_YASSLEMUL}
+
+/* Version number of package */
+#cmakedefine VERSION ${VERSION}
+
+/* Define to avoid automatic inclusion of winsock.h */
+#cmakedefine WIN32_LEAN_AND_MEAN ${WIN32_LEAN_AND_MEAN}
+
+/* Define to 1 if OS is AIX. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#cmakedefine _FILE_OFFSET_BITS ${_FILE_OFFSET_BITS}
+
+/* Define for large files, on AIX-style hosts. */
+#cmakedefine _LARGE_FILES ${_LARGE_FILES}
+
+/* define this if you need it to compile thread-safe code */
+#cmakedefine _THREAD_SAFE ${_THREAD_SAFE}
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#cmakedefine const ${const}
+
+/* Type to use in place of in_addr_t when system does not provide it. */
+#cmakedefine in_addr_t ${in_addr_t}
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#cmakedefine size_t ${size_t}
+
+/* Type to use in place of socklen_t when system does not provide it. */
+#cmakedefine socklen_t ${socklen_t}
+
+/* the signed version of size_t */
+#cmakedefine ssize_t ${ssize_t}