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:38 UTC

[mesos] 06/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 9c0d41e5576fc52eb7df58d0e071cedbad696621
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:41:23 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/68915/
---
 configure.ac   | 15 +--------------
 m4/libevent.m4 | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index cee59ba..1caab4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1971,20 +1971,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/m4/libevent.m4 b/m4/libevent.m4
index 35242a1..0caa16d 100644
--- a/m4/libevent.m4
+++ b/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.
+-------------------------------------------------------------------
+  ])])
+])