summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2010-03-24 14:07:18 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2010-03-24 14:07:18 -0400
commit5709a0dca248e9e7237c1849072454c1dcb6a890 (patch)
tree5d2f3530052bd1e4dfdce43436d45249269de246 /CMake
parentd42f9329dc52200e3964d1060f373368f401b828 (diff)
downloadcurl-5709a0dca248e9e7237c1849072454c1dcb6a890.tar.gz
CMake fixes for Linux.
Make sure <sys/socket.h> is included if around when testing/using socklen_t. Also, disable LDAP if LDAP_H is not found on the system.
Diffstat (limited to 'CMake')
-rw-r--r--CMake/CheckTypeSize.c.in3
-rw-r--r--CMake/CheckTypeSize.cmake3
2 files changed, 5 insertions, 1 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}")