You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2018/10/04 13:47:39 UTC

[mesos] 07/08: Moved libevent_openssl validation into libevent.m4.

This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit a54a7989b668f6d244eb333acb4a2b2dfb9d1161
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:41:29 2018 +0200

    Moved libevent_openssl validation into libevent.m4.
    
    Combines all libevent related header and library checks into
    libevent.m4.
    
    Review: https://reviews.apache.org/r/68916/
---
 3rdparty/libprocess/configure.ac   | 15 +--------------
 3rdparty/libprocess/m4/libevent.m4 | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/3rdparty/libprocess/configure.ac b/3rdparty/libprocess/configure.ac
index 4c58032..177cbf6 100644
--- a/3rdparty/libprocess/configure.ac
+++ b/3rdparty/libprocess/configure.ac
@@ -999,20 +999,7 @@ libcrypto is required for an SSL-enabled build.
 
   if test "x$enable_libevent" = "xyes"; then
     if test "x$with_bundled_libevent" != "xyes"; then
-      AC_CHECK_HEADERS([event2/bufferevent_ssl.h],
-                       [AC_CHECK_LIB([event_openssl],
-                                     [bufferevent_openssl_get_ssl],
-                                     [],
-                                     [AC_MSG_ERROR([cannot find libevent_openssl
--------------------------------------------------------------------
-libevent_openssl version 2+ is required for an SSL-enabled build.
--------------------------------------------------------------------
-                                     ])])],
-                       [AC_MSG_ERROR([cannot find libevent_openssl headers
--------------------------------------------------------------------
-libevent_openssl version 2+ headers are required for an SSL-enabled build.
--------------------------------------------------------------------
-      ])])
+      MESOS_HAVE_LIBEVENT_SSL()
     fi
   else
     AC_MSG_ERROR([SSL is currently only supported with libevent])
diff --git a/3rdparty/libprocess/m4/libevent.m4 b/3rdparty/libprocess/m4/libevent.m4
index 35242a1..0caa16d 100644
--- a/3rdparty/libprocess/m4/libevent.m4
+++ b/3rdparty/libprocess/m4/libevent.m4
@@ -25,6 +25,16 @@
 #   Validates if we have a usable libevent.
 #
 
+#
+# SYNOPSIS
+#
+#   MESOS_HAVE_LIBEVENT_SSL()
+#
+# DESCRIPTION
+#
+#   Validates if we have a usable libevent_openssl.
+#
+
 AC_DEFUN([MESOS_HAVE_LIBEVENT],[
   AC_CHECK_HEADERS([event2/event.h], [], [
     AC_MSG_ERROR([cannot find libevent headers
@@ -54,3 +64,20 @@ libevent_pthreads version 2+ is required for libprocess to build.
 -------------------------------------------------------------------
   ])])
 ])
+
+AC_DEFUN([MESOS_HAVE_LIBEVENT_SSL],[
+  AC_CHECK_HEADERS([event2/bufferevent_ssl.h],
+                   [AC_CHECK_LIB([event_openssl],
+                                 [bufferevent_openssl_get_ssl],
+                                 [],
+                                 [AC_MSG_ERROR([cannot find libevent_openssl
+-------------------------------------------------------------------
+libevent_openssl version 2+ is required for an SSL-enabled build.
+-------------------------------------------------------------------
+                                 ])])],
+                   [AC_MSG_ERROR([cannot find libevent_openssl headers
+-------------------------------------------------------------------
+libevent_openssl version 2+ headers are required for an SSL-enabled build.
+-------------------------------------------------------------------
+  ])])
+])