summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2014-08-25 21:49:04 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2014-08-25 21:49:04 -0700
commitd60c28ca0359efdc382ccc58853f925c97bcd4fd (patch)
tree55feea05c91c9d6144f7315eae269361d7f4e96a
parent5790ec76336955c8dd3ff4e94d36389c562a351b (diff)
downloadrabbitmq-c-github-ask-d60c28ca0359efdc382ccc58853f925c97bcd4fd.tar.gz
Suppress OpenSSL deprecation warnings on OSX
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac4
-rw-r--r--librabbitmq/CMakeLists.txt5
-rw-r--r--librabbitmq/amqp_openssl.c4
4 files changed, 12 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 8cd767a..9df689a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,9 @@ librabbitmq_librabbitmq_la_SOURCES += \
librabbitmq/amqp_hostcheck.c \
librabbitmq/amqp_hostcheck.h \
librabbitmq/amqp_openssl.c
+if OS_APPLE
+librabbitmq_librabbitmq_la_CFLAGS += -Wno-deprecated-declarations
+endif
endif
if SSL_POLARSSL
diff --git a/configure.ac b/configure.ac
index 7692c54..df9338d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,13 +61,17 @@ AC_SUBST([LT_AGE])
# OS setup
os_unix=no
+os_apple=no
os_win32=no
AS_CASE([$host],
[*-*-mingw*],
[os_win32=yes],
+ [*-apple-darwin*],
+ [os_apple=yes; os_unix=yes],
[*],
[os_unix=yes])
AM_CONDITIONAL([OS_UNIX], [test "x$os_unix" = xyes])
+AM_CONDITIONAL([OS_APPLE], [test "x$os_apple" = xyes])
AM_CONDITIONAL([OS_WIN32], [test "x$os_win32" = xyes])
AC_DEFINE([ENABLE_THREAD_SAFETY], [1], [Define to 1 to enable thread safety])
diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt
index d3623b3..2c3032e 100644
--- a/librabbitmq/CMakeLists.txt
+++ b/librabbitmq/CMakeLists.txt
@@ -88,6 +88,11 @@ if (ENABLE_SSL_SUPPORT)
)
include_directories(${OPENSSL_INCLUDE_DIR})
set(AMQP_SSL_LIBS ${OPENSSL_LIBRARIES})
+ if (APPLE)
+ # Apple has deprecated OpenSSL in 10.7+. This disables that warning.
+ set_source_files_properties(${AMQP_SSL_SRCS}
+ PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
+ endif()
elseif (SSL_ENGINE STREQUAL "cyaSSL")
set(AMQP_SSL_SRCS ${AMQP_SSL_SOCKET_H_PATH} amqp_cyassl.c)
diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c
index 43018c9..9066d23 100644
--- a/librabbitmq/amqp_openssl.c
+++ b/librabbitmq/amqp_openssl.c
@@ -25,10 +25,6 @@
#include "config.h"
#endif
-#if defined(__APPLE__) && defined(__MACH__)
-# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
-#endif
-
#include "amqp_ssl_socket.h"
#include "amqp_socket.h"
#include "amqp_hostcheck.h"