annotate OrthancFramework/Resources/CMake/LibCurlConfiguration.cmake @ 4544:ae63b301d522 Orthanc-1.7.4

close branch
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Mar 2021 16:52:26 +0100
parents 304842a0d152
children d9473bd5ed43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
3 # Department, University Hospital of Liege, Belgium
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
5 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
6 # This program is free software: you can redistribute it and/or
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
7 # modify it under the terms of the GNU Lesser General Public License
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
9 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
10 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
11 # This program is distributed in the hope that it will be useful, but
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
14 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
15 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
16 # You should have received a copy of the GNU Lesser General Public
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
17 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
18 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
19
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
20
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
21 if (STATIC_BUILD OR NOT USE_SYSTEM_CURL)
3290
544905c73c7e upgrade to curl 1.64.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
22 SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-7.64.0)
544905c73c7e upgrade to curl 1.64.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
23 SET(CURL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/curl-7.64.0.tar.gz")
544905c73c7e upgrade to curl 1.64.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
24 SET(CURL_MD5 "a026740d599a32bcbbe6e70679397899")
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1536
diff changeset
25
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
26 if (IS_DIRECTORY "${CURL_SOURCES_DIR}")
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
27 set(FirstRun OFF)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
28 else()
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
29 set(FirstRun ON)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
30 endif()
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
31
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1536
diff changeset
32 DownloadPackage(${CURL_MD5} ${CURL_URL} "${CURL_SOURCES_DIR}")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
33
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
34 if (FirstRun)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
35 execute_process(
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
36 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
37 ${CMAKE_CURRENT_LIST_DIR}/../Patches/curl-7.64.0-cmake.patch
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
38 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
39 RESULT_VARIABLE Failure
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
40 )
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
41
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
42 if (Failure)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
43 message(FATAL_ERROR "Error while patching a file")
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
44 endif()
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
45 endif()
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
46
1527
7b58e0048874 Upgrade to curl 7.44.0 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1415
diff changeset
47 include_directories(
7b58e0048874 Upgrade to curl 7.44.0 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1415
diff changeset
48 ${CURL_SOURCES_DIR}/include
7b58e0048874 Upgrade to curl 7.44.0 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1415
diff changeset
49 )
7b58e0048874 Upgrade to curl 7.44.0 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1415
diff changeset
50
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
51 AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib CURL_SOURCES)
2095
9e8b315625c1 Upgrade to curl 7.50.3 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2092
diff changeset
52 AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vauth CURL_SOURCES)
1527
7b58e0048874 Upgrade to curl 7.44.0 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1415
diff changeset
53 AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vtls CURL_SOURCES)
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
54 source_group(ThirdParty\\LibCurl REGULAR_EXPRESSION ${CURL_SOURCES_DIR}/.*)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
55
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
56 add_definitions(
1536
1b03676d68c2 fix windows build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
57 -DBUILDING_LIBCURL=1
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
58 -DCURL_STATICLIB=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
59 -DCURL_DISABLE_LDAPS=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
60 -DCURL_DISABLE_LDAP=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
61 -DCURL_DISABLE_DICT=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
62 -DCURL_DISABLE_FILE=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
63 -DCURL_DISABLE_FTP=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
64 -DCURL_DISABLE_GOPHER=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
65 -DCURL_DISABLE_LDAP=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
66 -DCURL_DISABLE_LDAPS=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
67 -DCURL_DISABLE_POP3=1
1273
88010d8e12cf Support of HTTP proxy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 930
diff changeset
68 #-DCURL_DISABLE_PROXY=1
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
69 -DCURL_DISABLE_RTSP=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
70 -DCURL_DISABLE_TELNET=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
71 -DCURL_DISABLE_TFTP=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
72 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
73
1415
728c22ade2e2 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1337
diff changeset
74 if (ENABLE_SSL)
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
75 add_definitions(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
76 #-DHAVE_LIBSSL=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
77 -DUSE_OPENSSL=1
2022
fefbe71c2272 Possibility to use PKCS#11 authentication for hardware security modules with Orthanc peers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1560
diff changeset
78 -DHAVE_OPENSSL_ENGINE_H=1
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
79 -DUSE_SSLEAY=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
80 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
81 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
82
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
83 if (NOT EXISTS "${CURL_SOURCES_DIR}/lib/vauth/vauth/vauth.h")
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
84 #file(WRITE ${CURL_SOURCES_DIR}/lib/curl_config.h "")
1533
0011cc99443c improving HTTPS support
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1532
diff changeset
85
2095
9e8b315625c1 Upgrade to curl 7.50.3 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2092
diff changeset
86 file(WRITE ${CURL_SOURCES_DIR}/lib/vauth/vauth/vauth.h "#include \"../vauth.h\"\n")
9e8b315625c1 Upgrade to curl 7.50.3 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2092
diff changeset
87 file(WRITE ${CURL_SOURCES_DIR}/lib/vauth/vauth/digest.h "#include \"../digest.h\"\n")
9e8b315625c1 Upgrade to curl 7.50.3 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2092
diff changeset
88 file(WRITE ${CURL_SOURCES_DIR}/lib/vauth/vauth/ntlm.h "#include \"../ntlm.h\"\n")
9e8b315625c1 Upgrade to curl 7.50.3 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2092
diff changeset
89 file(WRITE ${CURL_SOURCES_DIR}/lib/vauth/vtls/vtls.h "#include \"../../vtls/vtls.h\"\n")
9e8b315625c1 Upgrade to curl 7.50.3 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2092
diff changeset
90
2092
50dd3249732e optimization for cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2022
diff changeset
91 file(GLOB CURL_LIBS_HEADERS ${CURL_SOURCES_DIR}/lib/*.h)
50dd3249732e optimization for cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2022
diff changeset
92 foreach (header IN LISTS CURL_LIBS_HEADERS)
50dd3249732e optimization for cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2022
diff changeset
93 get_filename_component(filename ${header} NAME)
2095
9e8b315625c1 Upgrade to curl 7.50.3 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2092
diff changeset
94 file(WRITE ${CURL_SOURCES_DIR}/lib/vauth/${filename} "#include \"../${filename}\"\n")
2092
50dd3249732e optimization for cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2022
diff changeset
95 file(WRITE ${CURL_SOURCES_DIR}/lib/vtls/${filename} "#include \"../${filename}\"\n")
50dd3249732e optimization for cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2022
diff changeset
96 endforeach()
50dd3249732e optimization for cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2022
diff changeset
97 endif()
1536
1b03676d68c2 fix windows build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
98
1544
4d0e2c38d15b fix msvc build
jodogne
parents: 1537
diff changeset
99 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
930
27d256e0b458 integration mainline -> mac
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 928 890
diff changeset
100 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
1337
afaa55d42ddd FreeBSD support
jodogne
parents: 1273
diff changeset
101 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
2364
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
102 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
ae50eccd41b7 compilation succeeds on OpenBSD
jodogne
parents: 2186
diff changeset
103 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
104 if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
105 SET(TMP_OS "x86_64")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
106 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
107 SET(TMP_OS "x86")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
108 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
109
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
110 set_property(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
111 SOURCE ${CURL_SOURCES}
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
112 PROPERTY COMPILE_DEFINITIONS "HAVE_CONFIG_H=1;OS=\"${TMP_OS}\""
1527
7b58e0048874 Upgrade to curl 7.44.0 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1415
diff changeset
113 )
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
114
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
115 include(${CURL_SOURCES_DIR}/CMake/Macros.cmake)
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
116
2460
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
117 # WARNING: Do *not* reorder the "check_include_file_concat()" below!
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
118 check_include_file_concat("stdio.h" HAVE_STDIO_H)
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
119 check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
120 check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
121 check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
122 check_include_file_concat("sys/param.h" HAVE_SYS_PARAM_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
123 check_include_file_concat("sys/poll.h" HAVE_SYS_POLL_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
124 check_include_file_concat("sys/resource.h" HAVE_SYS_RESOURCE_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
125 check_include_file_concat("sys/select.h" HAVE_SYS_SELECT_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
126 check_include_file_concat("sys/socket.h" HAVE_SYS_SOCKET_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
127 check_include_file_concat("sys/sockio.h" HAVE_SYS_SOCKIO_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
128 check_include_file_concat("sys/stat.h" HAVE_SYS_STAT_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
129 check_include_file_concat("sys/time.h" HAVE_SYS_TIME_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
130 check_include_file_concat("sys/types.h" HAVE_SYS_TYPES_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
131 check_include_file_concat("sys/uio.h" HAVE_SYS_UIO_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
132 check_include_file_concat("sys/un.h" HAVE_SYS_UN_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
133 check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
134 check_include_file_concat("sys/xattr.h" HAVE_SYS_XATTR_H)
2460
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
135 check_include_file_concat("alloca.h" HAVE_ALLOCA_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
136 check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
137 check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
138 check_include_file_concat("assert.h" HAVE_ASSERT_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
139 check_include_file_concat("crypto.h" HAVE_CRYPTO_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
140 check_include_file_concat("des.h" HAVE_DES_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
141 check_include_file_concat("err.h" HAVE_ERR_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
142 check_include_file_concat("errno.h" HAVE_ERRNO_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
143 check_include_file_concat("fcntl.h" HAVE_FCNTL_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
144 check_include_file_concat("idn2.h" HAVE_IDN2_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
145 check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
146 check_include_file_concat("io.h" HAVE_IO_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
147 check_include_file_concat("krb.h" HAVE_KRB_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
148 check_include_file_concat("libgen.h" HAVE_LIBGEN_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
149 check_include_file_concat("limits.h" HAVE_LIMITS_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
150 check_include_file_concat("locale.h" HAVE_LOCALE_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
151 check_include_file_concat("net/if.h" HAVE_NET_IF_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
152 check_include_file_concat("netdb.h" HAVE_NETDB_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
153 check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
154 check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
155
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
156 check_include_file_concat("pem.h" HAVE_PEM_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
157 check_include_file_concat("poll.h" HAVE_POLL_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
158 check_include_file_concat("pwd.h" HAVE_PWD_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
159 check_include_file_concat("rsa.h" HAVE_RSA_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
160 check_include_file_concat("setjmp.h" HAVE_SETJMP_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
161 check_include_file_concat("sgtty.h" HAVE_SGTTY_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
162 check_include_file_concat("signal.h" HAVE_SIGNAL_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
163 check_include_file_concat("ssl.h" HAVE_SSL_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
164 check_include_file_concat("stdbool.h" HAVE_STDBOOL_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
165 check_include_file_concat("stdint.h" HAVE_STDINT_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
166 check_include_file_concat("stdio.h" HAVE_STDIO_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
167 check_include_file_concat("stdlib.h" HAVE_STDLIB_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
168 check_include_file_concat("string.h" HAVE_STRING_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
169 check_include_file_concat("strings.h" HAVE_STRINGS_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
170 check_include_file_concat("stropts.h" HAVE_STROPTS_H)
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
171 check_include_file_concat("termio.h" HAVE_TERMIO_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
172 check_include_file_concat("termios.h" HAVE_TERMIOS_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
173 check_include_file_concat("time.h" HAVE_TIME_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
174 check_include_file_concat("unistd.h" HAVE_UNISTD_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
175 check_include_file_concat("utime.h" HAVE_UTIME_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
176 check_include_file_concat("x509.h" HAVE_X509_H)
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
177
2460
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
178 check_include_file_concat("process.h" HAVE_PROCESS_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
179 check_include_file_concat("stddef.h" HAVE_STDDEF_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
180 check_include_file_concat("dlfcn.h" HAVE_DLFCN_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
181 check_include_file_concat("malloc.h" HAVE_MALLOC_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
182 check_include_file_concat("memory.h" HAVE_MEMORY_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
183 check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
184 check_include_file_concat("stdint.h" HAVE_STDINT_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
185 check_include_file_concat("sockio.h" HAVE_SOCKIO_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
186 check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H)
292bd85d4532 fix openbsd
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
187
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
188 check_type_size("size_t" SIZEOF_SIZE_T)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
189 check_type_size("ssize_t" SIZEOF_SSIZE_T)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
190 check_type_size("long long" SIZEOF_LONG_LONG)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
191 check_type_size("long" SIZEOF_LONG)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
192 check_type_size("short" SIZEOF_SHORT)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
193 check_type_size("int" SIZEOF_INT)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
194 check_type_size("__int64" SIZEOF___INT64)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
195 check_type_size("long double" SIZEOF_LONG_DOUBLE)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
196 check_type_size("time_t" SIZEOF_TIME_T)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
197 check_type_size("off_t" SIZEOF_OFF_T)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
198 check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
199
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
200 check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
201 check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
202 # poll on macOS is unreliable, it first did not exist, then was broken until
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
203 # fixed in 10.9 only to break again in 10.12.
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
204 if(NOT APPLE)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
205 check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
206 endif()
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
207 check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
208 check_symbol_exists(strdup "${CURL_INCLUDES}" HAVE_STRDUP)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
209 check_symbol_exists(strstr "${CURL_INCLUDES}" HAVE_STRSTR)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
210 check_symbol_exists(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
211 check_symbol_exists(strftime "${CURL_INCLUDES}" HAVE_STRFTIME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
212 check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
213 check_symbol_exists(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
214 check_symbol_exists(stricmp "${CURL_INCLUDES}" HAVE_STRICMP)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
215 check_symbol_exists(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
216 check_symbol_exists(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
217 check_symbol_exists(alarm "${CURL_INCLUDES}" HAVE_ALARM)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
218 if(NOT HAVE_STRNCMPI)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
219 set(HAVE_STRCMPI)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
220 endif(NOT HAVE_STRNCMPI)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
221
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
222 check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
223 check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
224 check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
225 check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
226 check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
227 check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
228 check_symbol_exists(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
229 check_symbol_exists(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
230 check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
231 check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
232 check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
233 check_symbol_exists(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
234 check_symbol_exists(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
235 check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
236 check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
237 check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
238 check_symbol_exists(utime "${CURL_INCLUDES}" HAVE_UTIME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
239 check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
240 check_symbol_exists(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
241
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
242 check_symbol_exists(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
243 check_symbol_exists(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
244
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
245 check_symbol_exists(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
246 check_symbol_exists(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
247 if(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
248 set(HAVE_SIGNAL 1)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
249 endif(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
250 check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
251 check_symbol_exists(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
252 check_symbol_exists(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
253 check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
254 check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
255 check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
256 check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
257 check_symbol_exists(getaddrinfo "${CURL_INCLUDES}" HAVE_GETADDRINFO)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
258 check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
259 check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
260 check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
261 check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
262 check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
263 check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
264 check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
265 check_symbol_exists(setmode "${CURL_INCLUDES}" HAVE_SETMODE)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
266 check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
267 check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
268 check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
269 check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
270
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
271 if(HAVE_SIZEOF_LONG_LONG)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
272 set(HAVE_LONGLONG 1)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
273 set(HAVE_LL 1)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
274 endif(HAVE_SIZEOF_LONG_LONG)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
275
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
276 check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
277 check_function_exists(gethostname HAVE_GETHOSTNAME)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
278
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
279 check_include_file_concat("pthread.h" HAVE_PTHREAD_H)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
280 check_symbol_exists(recv "sys/socket.h" HAVE_RECV)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
281 check_symbol_exists(send "sys/socket.h" HAVE_SEND)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
282
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
283 check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h" USE_UNIX_SOCKETS)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
284
3833
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
285 list(APPEND CMAKE_REQUIRED_INCLUDES "${CURL_SOURCES_DIR}/include")
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
286 set(CMAKE_EXTRA_INCLUDE_FILES "curl/system.h")
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
287 check_type_size("curl_off_t" SIZEOF_CURL_OFF_T)
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
288
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
289 add_definitions(-DHAVE_GLIBC_STRERROR_R=1)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
290
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
291 include(${CURL_SOURCES_DIR}/CMake/OtherTests.cmake)
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
292
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
293 foreach(CURL_TEST
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
294 HAVE_FCNTL_O_NONBLOCK
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
295 HAVE_IOCTLSOCKET
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
296 HAVE_IOCTLSOCKET_CAMEL
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
297 HAVE_IOCTLSOCKET_CAMEL_FIONBIO
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
298 HAVE_IOCTLSOCKET_FIONBIO
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
299 HAVE_IOCTL_FIONBIO
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
300 HAVE_IOCTL_SIOCGIFADDR
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
301 HAVE_SETSOCKOPT_SO_NONBLOCK
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
302 HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
303 TIME_WITH_SYS_TIME
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
304 HAVE_O_NONBLOCK
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
305 HAVE_GETHOSTBYADDR_R_5
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
306 HAVE_GETHOSTBYADDR_R_7
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
307 HAVE_GETHOSTBYADDR_R_8
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
308 HAVE_GETHOSTBYADDR_R_5_REENTRANT
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
309 HAVE_GETHOSTBYADDR_R_7_REENTRANT
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
310 HAVE_GETHOSTBYADDR_R_8_REENTRANT
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
311 HAVE_GETHOSTBYNAME_R_3
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
312 HAVE_GETHOSTBYNAME_R_5
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
313 HAVE_GETHOSTBYNAME_R_6
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
314 HAVE_GETHOSTBYNAME_R_3_REENTRANT
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
315 HAVE_GETHOSTBYNAME_R_5_REENTRANT
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
316 HAVE_GETHOSTBYNAME_R_6_REENTRANT
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
317 HAVE_SOCKLEN_T
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
318 HAVE_IN_ADDR_T
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
319 HAVE_BOOL_T
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
320 STDC_HEADERS
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
321 RETSIGTYPE_TEST
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
322 HAVE_INET_NTOA_R_DECL
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
323 HAVE_INET_NTOA_R_DECL_REENTRANT
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
324 HAVE_GETADDRINFO
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
325 HAVE_FILE_OFFSET_BITS
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
326 )
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
327 curl_internal_test(${CURL_TEST})
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2448
diff changeset
328 endforeach(CURL_TEST)
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
329
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
330 configure_file(
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
331 ${CURL_SOURCES_DIR}/lib/curl_config.h.cmake
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
332 ${CURL_SOURCES_DIR}/lib/curl_config.h
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2384
diff changeset
333 )
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
334 endif()
3833
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
335
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
336 elseif (CMAKE_CROSSCOMPILING AND
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
337 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
338
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
339 CHECK_INCLUDE_FILE_CXX(curl/curl.h HAVE_CURL_H)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
340 if (NOT HAVE_CURL_H)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
341 message(FATAL_ERROR "Please install the libcurl-dev package")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
342 endif()
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
343
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
344 CHECK_LIBRARY_EXISTS(curl "curl_easy_init" "" HAVE_CURL_LIB)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
345 if (NOT HAVE_CURL_LIB)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
346 message(FATAL_ERROR "Please install the libcurl package")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
347 endif()
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
348
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
349 link_libraries(curl)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
350
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
351 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
352 include(FindCURL)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
353 include_directories(${CURL_INCLUDE_DIRS})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
354 link_libraries(${CURL_LIBRARIES})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
355
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
356 if (NOT ${CURL_FOUND})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
357 message(FATAL_ERROR "Unable to find LibCurl")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
358 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
359 endif()