1 From de5dc5fd94a5fe321791d44e88d209a4972264ba Mon Sep 17 00:00:00 2001
2 From: Hubert Figuiere <hub@figuiere.net>
3 Date: Sun, 5 Feb 2017 02:52:37 +0000
4 Subject: [PATCH] Bug 13839 - Detect boost::asio
6 Patch by Adam Majer <amajer@suse.de>
8 git-svn-id: svn+ssh://svn.abisource.com/svnroot/abiword/trunk@35397 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
10 .../collab/backends/service/xp/AsyncWorker.h | 7 ++++++-
11 .../backends/service/xp/RealmConnection.h | 6 +++++-
12 .../collab/backends/service/xp/RealmProtocol.h | 6 +++++-
13 .../collab/backends/service/xp/tls_tunnel.h | 6 +++++-
14 .../collab/backends/tcp/xp/IOServerHandler.h | 6 +++++-
15 plugins/collab/plugin.m4 | 18 +++++++++++-------
16 6 files changed, 37 insertions(+), 12 deletions(-)
18 diff --git a/plugins/collab/backends/service/xp/AsyncWorker.h b/plugins/collab/backends/service/xp/AsyncWorker.h
19 index ab0437c29f..2e527f9254 100644
20 --- a/plugins/collab/backends/service/xp/AsyncWorker.h
21 +++ b/plugins/collab/backends/service/xp/AsyncWorker.h
23 #ifndef __ASYNC_WORKER__
24 #define __ASYNC_WORKER__
27 +#if defined(HAVE_BOOST_ASIO_HPP)
28 +# include <boost/asio.hpp>
33 #include <boost/bind.hpp>
34 #include <boost/function.hpp>
35 #include <boost/noncopyable.hpp>
36 diff --git a/plugins/collab/backends/service/xp/RealmConnection.h b/plugins/collab/backends/service/xp/RealmConnection.h
37 index 7dc715548c..214b12316b 100644
38 --- a/plugins/collab/backends/service/xp/RealmConnection.h
39 +++ b/plugins/collab/backends/service/xp/RealmConnection.h
42 #include <boost/shared_ptr.hpp>
43 #include <boost/enable_shared_from_this.hpp>
45 +#if defined(HAVE_BOOST_ASIO_HPP)
46 +# include <boost/asio.hpp>
53 diff --git a/plugins/collab/backends/service/xp/RealmProtocol.h b/plugins/collab/backends/service/xp/RealmProtocol.h
54 index 772ad891dd..03fa536dea 100644
55 --- a/plugins/collab/backends/service/xp/RealmProtocol.h
56 +++ b/plugins/collab/backends/service/xp/RealmProtocol.h
60 #include <boost/shared_ptr.hpp>
62 +#if defined(HAVE_BOOST_ASIO_HPP)
63 +# include <boost/asio.hpp>
70 diff --git a/plugins/collab/backends/service/xp/tls_tunnel.h b/plugins/collab/backends/service/xp/tls_tunnel.h
71 index ea07151c70..a78f7815c3 100644
72 --- a/plugins/collab/backends/service/xp/tls_tunnel.h
73 +++ b/plugins/collab/backends/service/xp/tls_tunnel.h
75 #include <boost/function.hpp>
76 #include <boost/lexical_cast.hpp>
77 #include <boost/enable_shared_from_this.hpp>
79 +#if defined(HAVE_BOOST_ASIO_HPP)
80 +# include <boost/asio.hpp>
87 diff --git a/plugins/collab/backends/tcp/xp/IOServerHandler.h b/plugins/collab/backends/tcp/xp/IOServerHandler.h
88 index 7a561f4a1c..8a2b931319 100644
89 --- a/plugins/collab/backends/tcp/xp/IOServerHandler.h
90 +++ b/plugins/collab/backends/tcp/xp/IOServerHandler.h
93 #include <boost/bind.hpp>
94 #include <boost/function.hpp>
96 +#if defined(HAVE_BOOST_ASIO_HPP)
97 +# include <boost/asio.hpp>
102 #include <sync/xp/Synchronizer.h>
104 diff --git a/plugins/collab/plugin.m4 b/plugins/collab/plugin.m4
105 index 98028b99ff..7cfe3a1388 100644
106 --- a/plugins/collab/plugin.m4
107 +++ b/plugins/collab/plugin.m4
108 @@ -70,20 +70,22 @@ AC_ARG_ENABLE([collab-backend-tcp],
109 enable_collab_backend_tcp=$enableval
110 if test "$enable_collab_backend_tcp" != "no"; then
112 - AC_CHECK_HEADERS([asio.hpp], [],
113 + AC_CHECK_HEADERS([asio.hpp], [],
114 + [AC_CHECK_HEADERS([boost/asio.hpp], [AC_DEFINE([HAVE_BOOST_ASIO_HPP])],
116 AC_MSG_ERROR([collab plugin: asio is required for the collab plugin TCP backend, see http://think-async.com/])
124 - AC_CHECK_HEADERS([asio.hpp],
125 + AC_CHECK_HEADERS([asio.hpp],
126 + [AC_CHECK_HEADERS([boost/asio.hpp], [AC_DEFINE([HAVE_BOOST_ASIO_HPP])],
128 enable_collab_backend_tcp="yes"
134 AC_MSG_CHECKING([for collab tcp backend])
135 @@ -112,10 +114,11 @@ AC_ARG_ENABLE([collab-backend-service],
136 enable_collab_backend_service=$enableval
137 if test "$enable_collab_backend_service" != "no"; then
139 - AC_CHECK_HEADERS([asio.hpp], [],
140 + AC_CHECK_HEADERS([asio.hpp], [],
141 + [AC_CHECK_HEADERS([boost/asio.hpp], [AC_DEFINE([HAVE_BOOST_ASIO_HPP])],
143 AC_MSG_ERROR([collab plugin: asio is required for the the abicollab.net backend, see http://think-async.com/])
147 PKG_CHECK_EXISTS([ $collab_service_req ], [], [
148 AC_MSG_ERROR([collab plugin: missing dependencies])
149 @@ -125,13 +128,14 @@ AC_ARG_ENABLE([collab-backend-service],
152 AC_CHECK_HEADERS([asio.hpp],
153 + [AC_CHECK_HEADERS([boost/asio.hpp], [AC_DEFINE([HAVE_BOOST_ASIO_HPP])],
155 PKG_CHECK_EXISTS([ $collab_service_req ], [
156 enable_collab_backend_service="yes"
159 enable_collab_backend_service="no"
163 enable_collab_backend_service="no"