Commit f10b5b4e authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Do not compile tunnel files if tunnel is not enabled.

parent a0ee7149
......@@ -191,6 +191,7 @@ if test "$enable_tunnel" = "yes" ; then
AC_DEFINE(HAVE_TUNNEL, 1, [Defined when tunnel is enabled and available])
fi
fi
AM_CONDITIONAL(BUILD_TUNNEL, test "$found_tunnel" = "yes")
PKG_CHECK_MODULES(CUNIT, cunit, [found_cunit=yes],[found_cunit=no])
......
......@@ -60,12 +60,15 @@ libbellesip_la_SOURCES= \
transports/stream_listeningpoint.c \
transports/tls_listeningpoint_polarssl.c \
transports/tls_channel_polarssl.c \
transports/tunnel_listeningpoint.c \
transports/tunnel_channel.c \
transports/tunnel_wrapper.cc \
refresher.c \
dns.c dns.h
if BUILD_TUNNEL
libbellesip_la_SOURCES+= transports/tunnel_listeningpoint.c \
transports/tunnel_channel.c \
transports/tunnel_wrapper.cc
endif
libbellesip_la_CFLAGS=$(STRICT_OPTIONS) $(ANTLR_CFLAGS) $(TLS_CFLAGS) $(TUNNEL_CFLAGS) $(LIBBELLESIP_CFLAGS)
libbellesip_la_CXXFLAGS=$(STRICT_OPTIONS) $(TLS_CFLAGS) $(TUNNEL_CFLAGS) $(LIBBELLESIP_CFLAGS)
......
......@@ -19,8 +19,6 @@
#include "belle_sip_internal.h"
#include "channel.h"
#ifdef HAVE_TUNNEL
#define TUNNEL_POLLING_DURATION 20 /* in ms */
void * tunnel_client_create_socket(void *tunnelclient, int minLocalPort, int maxLocalPort);
......@@ -120,5 +118,3 @@ belle_sip_channel_t * belle_sip_channel_new_tunnel(belle_sip_stack_t *stack, voi
belle_sip_main_loop_add_source(stack->ml, obj->pollingtimer);
return (belle_sip_channel_t*)obj;
}
#endif
......@@ -18,8 +18,6 @@
#include "belle_sip_internal.h"
#ifdef HAVE_TUNNEL
struct belle_sip_tunnel_listening_point{
belle_sip_listening_point_t base;
void *tunnelclient;
......@@ -59,5 +57,3 @@ belle_sip_listening_point_t * belle_sip_tunnel_listening_point_new(belle_sip_sta
belle_sip_tunnel_listening_point_init(lp,s,tunnelclient);
return (belle_sip_listening_point_t*)lp;
}
#endif
......@@ -20,8 +20,6 @@
#include "config.h"
#endif
#ifdef HAVE_TUNNEL
#include <tunnel/client.hh>
using namespace belledonnecomm;
......@@ -51,5 +49,3 @@ extern "C" int tunnel_socket_recvfrom(void *tunnelsocket, void *buffer, size_t b
TunnelSocket *ts = static_cast<TunnelSocket *>(tunnelsocket);
return ts->recvfrom(buffer, bufsize, src, socklen);
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment