]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: add detection for HAVE_CURL_MULTI_WAIT
authorCasey Bodley <cbodley@redhat.com>
Mon, 21 Sep 2015 21:06:17 +0000 (17:06 -0400)
committerAli Maredia <amaredia@redhat.com>
Tue, 5 Jan 2016 20:42:06 +0000 (15:42 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
cmake/modules/Findlibcurl.cmake
src/include/config-h.in.cmake

index 2c4d6211fba0f2505a5417ed08925939aaae5499..301018273c10290b454488549847f3aeab9c30db 100644 (file)
@@ -1,9 +1,10 @@
 # Try to find libcurl
 # Once done, this will define
 #
-# CURL_FOUND - system has Profiler
-# CURL_INCLUDE_DIR - the Profiler include directories
-# CURL_LIBRARIES - link these to use Profiler
+# CURL_FOUND - system has curl
+# CURL_INCLUDE_DIR - the curl include directories
+# CURL_LIBRARIES - link these to use curl
+# HAVE_CURL_MULTI_WAIT - curl provides a curl_multi_wait() function
 
 if(CURL_INCLUDE_DIR AND CURL_LIBRARIES)
        set(CURL_FIND_QUIETLY TRUE)
@@ -25,9 +26,15 @@ find_path(CURL_INCLUDE_DIR curl.h NO_DEFAULT_PATH PATHS
 find_library(LIBCURL NAMES curl)
 set(CURL_LIBRARIES ${LIBCURL})
 
+
+# check curl/multi.h for curl_multi_wait()
+set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIR})
+set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES})
+CHECK_SYMBOL_EXISTS(curl_multi_wait "curl.h" HAVE_CURL_MULTI_WAIT)
+
 # handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
 # all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(libcurl DEFAULT_MSG CURL_LIBRARIES CURL_INCLUDE_DIR)
 
-mark_as_advanced(CURL_LIBRARIES CURL_INCLUDE_DIR)
+mark_as_advanced(CURL_LIBRARIES CURL_INCLUDE_DIR HAVE_CURL_MULTI_WAIT)
index c82e8dcc1d41c13146c1c0773b0e629c85b31fcc..421a729e5e2d9a7f067652fda8515d08e0b1a25b 100644 (file)
 /* Define if HAVE_REENTRANT_STRSIGNAL */
 #cmakedefine HAVE_REENTRANT_STRSIGNAL
 
+/* Defined if curl headers define curl_multi_wait() */
+#cmakedefine HAVE_CURL_MULTI_WAIT 1
+
 #endif /* CONFIG_H */