This patch enables BlueZ 4 and BlueZ 5 plugins if --enable-bluetooth is
informed. BlueZ 5 will be the default Bluetooth plugin. For BlueZ 4,
there is an additional BlueZ Library package version verification.
---
Makefile.am | 4 +++-
configure.ac | 10 +++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 0d2ba9f..811a3f5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -407,7 +407,7 @@ builtin_sources += plugins/samsung.c
builtin_modules += sim900
builtin_sources += plugins/sim900.c
-if BLUETOOTH
+if BLUEZ4
builtin_modules += bluetooth
builtin_sources += plugins/bluetooth.c plugins/bluetooth.h
@@ -742,6 +742,7 @@ tools_stktest_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
endif
endif
+if BLUEZ4
if DUNDEE
sbin_PROGRAMS += dundee/dundee
@@ -759,6 +760,7 @@ if SYSTEMD
systemdunit_DATA += dundee/dundee.service
endif
endif
+endif
endif
diff --git a/configure.ac b/configure.ac
index 450352b..e55d11d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,12 +176,16 @@ AC_ARG_ENABLE(bluetooth,
AC_HELP_STRING([--disable-bluetooth],
[disable Bluetooth modem support]),
[enable_bluetooth=${enableval}])
if (test "${enable_bluetooth}" != "no"); then
- PKG_CHECK_MODULES(BLUEZ, bluez >= 4.99, dummy=yes,
- AC_MSG_ERROR(Bluetooth library >= 4.99 is required))
+ PKG_CHECK_MODULES(BLUEZ, bluez >= 4.99 bluez < 5,
+ enable_bluez4=yes enable_bluez5=yes
+ AC_MSG_NOTICE(Enabling BLUEZ 4 and BlueZ 5),
+ enable_bluez4=no enable_bluez5=yes
+ AC_MSG_NOTICE(Enabling BLUEZ 5))
fi
AC_SUBST(BLUEZ_CFLAGS)
AC_SUBST(BLUEZ_LIBS)
-AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
+AM_CONDITIONAL(BLUEZ4, test "${enable_bluez4}" != "no")
+AM_CONDITIONAL(BLUEZ5, test "${enable_bluez5}" != "no")
AC_ARG_WITH([provisiondb], AC_HELP_STRING([--with-provisiondb=FILE],
[location of provision database]), [path_provisiondb=${withval}])
--
1.7.11.7
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono