diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2012-10-20 01:28:03 -0400 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2012-10-20 02:45:49 -0400 |
commit | 545558dd78dc2470465e67beca8e9517090898a2 (patch) | |
tree | 5e860d2cf957b9616766712754c84c9506027d32 /CMakeLists.txt | |
parent | 3b5fe03234feace45ad15af1a90889755c6ce7f5 (diff) | |
download | rabbitmq-c-github-ask-545558dd78dc2470465e67beca8e9517090898a2.tar.gz |
Provide replacement for htonll where not available
Detect presence of htonll in autoconf/CMake, then
provide a replacement inside amqp_private.h
Use predefined macros to determine endianness based
on processor type. This will help in case of cross compiling
and a test program cannot be run.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 065f5db..9e93517 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,8 +137,10 @@ mark_as_advanced(AMQP_CODEGEN_DIR) include(CheckFunctionExists) include(CheckLibraryExists) +include(CMakePushCheckState) # Detect if we need to link against a socket library: +cmake_push_check_state() if (WIN32) # Always use WinSock2 on Windows set(SOCKET_LIBRARIES ws2_32) @@ -175,6 +177,12 @@ else () endif () endif () endif () +cmake_pop_check_state() + +cmake_push_check_state() +set(CMAKE_REQUIRED_LIBRARIES ${SOCKET_LIBRARIES}) +check_function_exists(htonll HAVE_HTONLL) +cmake_pop_check_state() find_package(POPT) find_package(XmlTo) |