aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMake/CheckTypeSize.c.in3
-rw-r--r--CMake/CheckTypeSize.cmake3
-rw-r--r--CMakeLists.txt11
-rw-r--r--include/curl/curlbuild.h.cmake4
4 files changed, 19 insertions, 2 deletions
diff --git a/CMake/CheckTypeSize.c.in b/CMake/CheckTypeSize.c.in
index 9e48df153..8ff07bfd1 100644
--- a/CMake/CheckTypeSize.c.in
+++ b/CMake/CheckTypeSize.c.in
@@ -6,6 +6,9 @@
# include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#ifdef _WIN32
# include <winsock2.h>
diff --git a/CMake/CheckTypeSize.cmake b/CMake/CheckTypeSize.cmake
index e768254d6..2c2ceab97 100644
--- a/CMake/CheckTypeSize.cmake
+++ b/CMake/CheckTypeSize.cmake
@@ -13,7 +13,8 @@ macro(CHECK_TYPE_SIZE TYPE 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)
+ foreach(def HAVE_SYS_TYPES_H
+ HAVE_STDINT_H HAVE_STDDEF_H HAVE_SYS_SOCKET_H)
if("${def}")
set(MACRO_CHECK_TYPE_SIZE_FLAGS
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 063df4632..023cce3dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -99,7 +99,7 @@ option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DI
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)
+option(CURL_DISABLE_LDAP "disables LDAP" ON)
mark_as_advanced(CURL_DISABLE_LDAP)
option(CURL_DISABLE_TELNET "disables Telnet" OFF)
mark_as_advanced(CURL_DISABLE_TELNET)
@@ -392,6 +392,11 @@ if(CMAKE_USE_OPENSSL)
check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H)
endif(CMAKE_USE_OPENSSL)
+if(NOT HAVE_LDAP_H)
+ message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON")
+ set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
+endif()
+
check_type_size(size_t SIZEOF_SIZE_T)
check_type_size(ssize_t SIZEOF_SSIZE_T)
@@ -782,6 +787,10 @@ endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
if(HAVE_SOCKLEN_T)
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
+ if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
+ message(FATAL_ERROR
+ "Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
+ endif()
else()
set(CURL_TYPEOF_CURL_SOCKLEN_T int)
set(CURL_SIZEOF_CURL_SOCKLEN_T ${SIZEOF_INT})
diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake
index 4f83e3fe1..3aa772fc4 100644
--- a/include/curl/curlbuild.h.cmake
+++ b/include/curl/curlbuild.h.cmake
@@ -143,6 +143,10 @@
# include <ws2tcpip.h>
#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
/* Data type definition of curl_socklen_t. */
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;