aboutsummaryrefslogtreecommitdiff
path: root/CMake
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 /CMake
parent626f9bd8c2c5a6b4088a0e04cfc25949aded8407 (diff)
Initial CMake scripts (libcurl only), based on the merge of tetest scripts and mine. These are far to be functionnal yet.
PS: Hello world :)
Diffstat (limited to 'CMake')
-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
10 files changed, 1805 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 */