From eb8567692872e14ff865b7bb060250f955a2dd03 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 17 Jul 2008 15:19:17 -0400 Subject: ENH: Avoid cmcurl CMake macro name conflicts Utilities/cmcurl/CMake provides macros with the same file names and macro names as others in Modules, but with different interfaces. We rename the curl ones to avoid conflict. --- Utilities/cmcurl/CMake/CheckCSourceCompiles.cmake | 75 ------------------- Utilities/cmcurl/CMake/CheckCSourceRuns.cmake | 83 ---------------------- .../cmcurl/CMake/CurlCheckCSourceCompiles.cmake | 75 +++++++++++++++++++ Utilities/cmcurl/CMake/CurlCheckCSourceRuns.cmake | 83 ++++++++++++++++++++++ Utilities/cmcurl/CMake/OtherTests.cmake | 20 +++--- 5 files changed, 168 insertions(+), 168 deletions(-) delete mode 100644 Utilities/cmcurl/CMake/CheckCSourceCompiles.cmake delete mode 100644 Utilities/cmcurl/CMake/CheckCSourceRuns.cmake create mode 100644 Utilities/cmcurl/CMake/CurlCheckCSourceCompiles.cmake create mode 100644 Utilities/cmcurl/CMake/CurlCheckCSourceRuns.cmake diff --git a/Utilities/cmcurl/CMake/CheckCSourceCompiles.cmake b/Utilities/cmcurl/CMake/CheckCSourceCompiles.cmake deleted file mode 100644 index 2967b0f..0000000 --- a/Utilities/cmcurl/CMake/CheckCSourceCompiles.cmake +++ /dev/null @@ -1,75 +0,0 @@ -# - Check if the source code provided in the SOURCE argument compiles. -# 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(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(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - ELSE(CMAKE_REQUIRED_LIBRARIES) - SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) - ENDIF(CMAKE_REQUIRED_LIBRARIES) - IF(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES - "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") - ELSE(CMAKE_REQUIRED_INCLUDES) - SET(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} - "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" - "${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(CHECK_C_SOURCE_COMPILES) diff --git a/Utilities/cmcurl/CMake/CheckCSourceRuns.cmake b/Utilities/cmcurl/CMake/CheckCSourceRuns.cmake deleted file mode 100644 index e78a71c..0000000 --- a/Utilities/cmcurl/CMake/CheckCSourceRuns.cmake +++ /dev/null @@ -1,83 +0,0 @@ -# - Check if the source code provided in the SOURCE argument compiles and runs. -# 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(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(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - ELSE(CMAKE_REQUIRED_LIBRARIES) - SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) - ENDIF(CMAKE_REQUIRED_LIBRARIES) - IF(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES - "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") - ELSE(CMAKE_REQUIRED_INCLUDES) - SET(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} - "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" - "${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(CHECK_C_SOURCE_RUNS) diff --git a/Utilities/cmcurl/CMake/CurlCheckCSourceCompiles.cmake b/Utilities/cmcurl/CMake/CurlCheckCSourceCompiles.cmake new file mode 100644 index 0000000..d025769 --- /dev/null +++ b/Utilities/cmcurl/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/Utilities/cmcurl/CMake/CurlCheckCSourceRuns.cmake b/Utilities/cmcurl/CMake/CurlCheckCSourceRuns.cmake new file mode 100644 index 0000000..19681bd --- /dev/null +++ b/Utilities/cmcurl/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/Utilities/cmcurl/CMake/OtherTests.cmake b/Utilities/cmcurl/CMake/OtherTests.cmake index 953337c..ea1613d 100644 --- a/Utilities/cmcurl/CMake/OtherTests.cmake +++ b/Utilities/cmcurl/CMake/OtherTests.cmake @@ -1,4 +1,4 @@ -INCLUDE(CheckCSourceCompiles) +INCLUDE(CurlCheckCSourceCompiles) SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2") SET(HEADER_INCLUDES) SET(headers_hack) @@ -28,7 +28,7 @@ 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") -CHECK_C_SOURCE_COMPILES("recv(0, 0, 0, 0)" curl_cv_recv) +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], [ @@ -44,7 +44,7 @@ IF(curl_cv_recv) 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") - CHECK_C_SOURCE_COMPILES(" + CURL_CHECK_C_SOURCE_COMPILES(" ${recv_arg1} s=0; ${recv_arg2} buf=0; ${recv_arg3} len=0; @@ -91,7 +91,7 @@ ENDIF(curl_cv_recv) SET(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv") SET(HAVE_RECV 1) -CHECK_C_SOURCE_COMPILES("send(0, 0, 0, 0)" curl_cv_send) +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], [ @@ -107,7 +107,7 @@ IF(curl_cv_send) 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") - CHECK_C_SOURCE_COMPILES(" + CURL_CHECK_C_SOURCE_COMPILES(" ${send_arg1} s=0; ${send_arg2} buf=0; ${send_arg3} len=0; @@ -161,7 +161,7 @@ SET(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments SET(HAVE_SEND 1) SET(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5") -CHECK_C_SOURCE_COMPILES("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL) +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) @@ -190,16 +190,16 @@ ELSE(HAVE_WINDOWS_H) add_header_include(HAVE_TIME_H "time.h") ENDIF(HAVE_WINDOWS_H) SET(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5") -CHECK_C_SOURCE_COMPILES("struct timeval ts;\nts.tv_sec = 0;\nts.tv_usec = 0" HAVE_STRUCT_TIMEVAL) +CURL_CHECK_C_SOURCE_COMPILES("struct timeval ts;\nts.tv_sec = 0;\nts.tv_usec = 0" HAVE_STRUCT_TIMEVAL) -INCLUDE(CheckCSourceRuns) +INCLUDE(CurlCheckCSourceRuns) SET(EXTRA_DEFINES) SET(HEADER_INCLUDES) IF(HAVE_SYS_POLL_H) SET(HEADER_INCLUDES "sys/poll.h") ENDIF(HAVE_SYS_POLL_H) -CHECK_C_SOURCE_RUNS("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE) +CURL_CHECK_C_SOURCE_RUNS("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE) SET(HAVE_SIG_ATOMIC_T 1) SET(EXTRA_DEFINES) @@ -210,7 +210,7 @@ IF(HAVE_SIGNAL_H) ENDIF(HAVE_SIGNAL_H) CHECK_TYPE_SIZE("sig_atomic_t" SIZEOF_SIG_ATOMIC_T) IF(HAVE_SIZEOF_SIG_ATOMIC_T) - CHECK_C_SOURCE_COMPILES("static volatile sig_atomic_t dummy = 0" HAVE_SIG_ATOMIC_T_NOT_VOLATILE) + 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) -- cgit v0.12