diff options
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | src/transport/Makefile.am | 33 |
2 files changed, 50 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index b1fea6a2e..f703ea5e0 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -362,6 +362,18 @@ AC_RUN_IFELSE( | |||
362 | AC_LANG_POP(C) | 362 | AC_LANG_POP(C) |
363 | fi # $build = $target | 363 | fi # $build = $target |
364 | 364 | ||
365 | # check for bluetooth library | ||
366 | bluetooth=0 | ||
367 | AC_CHECK_LIB(bluetooth, ba2str, bluetooth=1, bluetooth=0) | ||
368 | if test "$bluetooth" = 1 | ||
369 | then | ||
370 | AM_CONDITIONAL(HAVE_LIBBLUETOOTH, true) | ||
371 | AC_DEFINE([HAVE_LIBBLUETOOTH],[1],[Have bluetooth library]) | ||
372 | else | ||
373 | AM_CONDITIONAL(HAVE_LIBBLUETOOTH, false) | ||
374 | fi | ||
375 | |||
376 | |||
365 | # libcurl | 377 | # libcurl |
366 | LIBCURL_CHECK_CONFIG(,7.21.3,curl=1,curl=0) | 378 | LIBCURL_CHECK_CONFIG(,7.21.3,curl=1,curl=0) |
367 | if test "$curl" = 1 | 379 | if test "$curl" = 1 |
@@ -1367,6 +1379,12 @@ then | |||
1367 | AC_MSG_NOTICE([NOTICE: libcurl not found. http client support will not be compiled.]) | 1379 | AC_MSG_NOTICE([NOTICE: libcurl not found. http client support will not be compiled.]) |
1368 | fi | 1380 | fi |
1369 | 1381 | ||
1382 | # bluetooth | ||
1383 | if test "x$bluetooth" = "x0" | ||
1384 | then | ||
1385 | AC_MSG_NOTICE([NOTICE: bluetooth library not found. bluetooth support will not be compiled.]) | ||
1386 | fi | ||
1387 | |||
1370 | #gnutls | 1388 | #gnutls |
1371 | if test x$gnutls != xtrue | 1389 | if test x$gnutls != xtrue |
1372 | then | 1390 | then |
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 4ace2bc1e..feff9d918 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -59,7 +59,6 @@ if LINUX | |||
59 | test_quota_compliance_wlan_asymmetric | 59 | test_quota_compliance_wlan_asymmetric |
60 | endif | 60 | endif |
61 | 61 | ||
62 | |||
63 | if LINUX | 62 | if LINUX |
64 | install-exec-hook: | 63 | install-exec-hook: |
65 | $(top_srcdir)/src/transport/install-wlan-helper.sh $(libexecdir) $(SUDO_BINARY) || true | 64 | $(top_srcdir)/src/transport/install-wlan-helper.sh $(libexecdir) $(SUDO_BINARY) || true |
@@ -67,6 +66,23 @@ else | |||
67 | install-exec-hook: | 66 | install-exec-hook: |
68 | endif | 67 | endif |
69 | 68 | ||
69 | if LINUX | ||
70 | if HAVE_LIBBLUETOOTH | ||
71 | AM_LDFLAGS = -lbluetooth | ||
72 | BT_BIN = gnunet-helper-transport-bluetooth | ||
73 | BT_PLUGIN_LA = libgnunet_plugin_transport_bluetooth.la | ||
74 | endif | ||
75 | endif | ||
76 | |||
77 | if LINUX | ||
78 | if HAVE_LIBBLUETOOTH | ||
79 | install-exec-hook2: | ||
80 | $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(libexecdir) $(SUDO_BINARY) || true | ||
81 | endif | ||
82 | else | ||
83 | install-exec-hook2: | ||
84 | endif | ||
85 | |||
70 | if !MINGW | 86 | if !MINGW |
71 | UNIX_PLUGIN_LA = libgnunet_plugin_transport_unix.la | 87 | UNIX_PLUGIN_LA = libgnunet_plugin_transport_unix.la |
72 | UNIX_PLUGIN_TEST = test_transport_api_unix | 88 | UNIX_PLUGIN_TEST = test_transport_api_unix |
@@ -118,6 +134,7 @@ libgnunettransport_la_LDFLAGS = \ | |||
118 | libexec_PROGRAMS = \ | 134 | libexec_PROGRAMS = \ |
119 | $(WLAN_BIN) \ | 135 | $(WLAN_BIN) \ |
120 | $(WLAN_BIN_DUMMY) \ | 136 | $(WLAN_BIN_DUMMY) \ |
137 | $(BT_BIN) \ | ||
121 | gnunet-service-transport | 138 | gnunet-service-transport |
122 | 139 | ||
123 | bin_PROGRAMS = \ | 140 | bin_PROGRAMS = \ |
@@ -150,6 +167,9 @@ gnunet_transport_wlan_receiver_SOURCES = \ | |||
150 | gnunet_transport_wlan_receiver_LDADD = \ | 167 | gnunet_transport_wlan_receiver_LDADD = \ |
151 | $(top_builddir)/src/util/libgnunetutil.la | 168 | $(top_builddir)/src/util/libgnunetutil.la |
152 | 169 | ||
170 | gnunet_helper_transport_bluetooth_SOURCES = \ | ||
171 | gnunet-helper-transport-bluetooth.c | ||
172 | |||
153 | gnunet_transport_SOURCES = \ | 173 | gnunet_transport_SOURCES = \ |
154 | gnunet-transport.c | 174 | gnunet-transport.c |
155 | gnunet_transport_LDADD = \ | 175 | gnunet_transport_LDADD = \ |
@@ -312,6 +332,17 @@ libgnunet_plugin_transport_https_server_la_LDFLAGS = \ | |||
312 | libgnunet_plugin_transport_https_server_la_CFLAGS = \ | 332 | libgnunet_plugin_transport_https_server_la_CFLAGS = \ |
313 | $(CFLAGS) -DBUILD_HTTPS | 333 | $(CFLAGS) -DBUILD_HTTPS |
314 | 334 | ||
335 | libgnunet_plugin_transport_bluetooth_la_SOURCES = \ | ||
336 | plugin_transport_bluetooth.c plugin_transport_wlan.h | ||
337 | libgnunet_plugin_transport_bluetooth_la_LIBADD = \ | ||
338 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
339 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | ||
340 | $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \ | ||
341 | $(top_builddir)/src/fragmentation/libgnunetfragmentation.la \ | ||
342 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
343 | libgnunet_plugin_transport_bluetooth_la_LDFLAGS = \ | ||
344 | $(GN_PLUGIN_LDFLAGS) | ||
345 | |||
315 | if HAVE_TESTING | 346 | if HAVE_TESTING |
316 | check_PROGRAMS = \ | 347 | check_PROGRAMS = \ |
317 | test_transport_testing_startstop \ | 348 | test_transport_testing_startstop \ |