Add configure flag to explicitly enable BLE support

This way BLE dive computers that are otherwise conditional on USBHID will be
built on platforms that support them but don't have USBHID (like iOS).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-12-04 11:30:45 -08:00
parent 77f87bebe3
commit 506bcec3cd
2 changed files with 11 additions and 2 deletions

View File

@ -60,6 +60,15 @@ AC_ARG_ENABLE([doc],
[], [enable_doc=yes]) [], [enable_doc=yes])
AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"]) AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"])
# BLE support
AC_ARG_ENABLE([ble],
[AS_HELP_STRING([--enable-ble=@<:@yes/no@:>@],
[Enable BLE dive computers @<:@default=yes@:>@])],
[], [enable_ble=no])
AS_IF([test "x$enable_ble" = "xyes"], [
AC_DEFINE(ENABLE_BLE, [1], [Enable support for BLE dive computers.])
])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
AC_PROG_CC_C99 AC_PROG_CC_C99

View File

@ -98,7 +98,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Suunto", "Zoop Novo", DC_FAMILY_SUUNTO_D9, 0x1E}, // FTDI {"Suunto", "Zoop Novo", DC_FAMILY_SUUNTO_D9, 0x1E}, // FTDI
{"Suunto", "D4f", DC_FAMILY_SUUNTO_D9, 0x20}, // FTDI {"Suunto", "D4f", DC_FAMILY_SUUNTO_D9, 0x20}, // FTDI
/* Suunto EON Steel */ /* Suunto EON Steel */
#ifdef USBHID #if defined(USBHID) || defined(ENABLE_BLE)
{"Suunto", "EON Steel", DC_FAMILY_SUUNTO_EONSTEEL, 0}, // BLE {"Suunto", "EON Steel", DC_FAMILY_SUUNTO_EONSTEEL, 0}, // BLE
{"Suunto", "EON Core", DC_FAMILY_SUUNTO_EONSTEEL, 1}, // BLE {"Suunto", "EON Core", DC_FAMILY_SUUNTO_EONSTEEL, 1}, // BLE
#endif #endif
@ -139,7 +139,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Scubapro", "Chromis", DC_FAMILY_UWATEC_MERIDIAN, 0x24}, {"Scubapro", "Chromis", DC_FAMILY_UWATEC_MERIDIAN, 0x24},
{"Scubapro", "Mantis 2", DC_FAMILY_UWATEC_MERIDIAN, 0x26}, {"Scubapro", "Mantis 2", DC_FAMILY_UWATEC_MERIDIAN, 0x26},
/* Scubapro G2 */ /* Scubapro G2 */
#ifdef USBHID #if defined(USBHID) || defined(ENABLE_BLE)
{"Scubapro", "Aladin Sport Matrix", DC_FAMILY_UWATEC_G2, 0x17}, // BLE {"Scubapro", "Aladin Sport Matrix", DC_FAMILY_UWATEC_G2, 0x17}, // BLE
{"Scubapro", "Aladin Square", DC_FAMILY_UWATEC_G2, 0x22}, {"Scubapro", "Aladin Square", DC_FAMILY_UWATEC_G2, 0x22},
{"Scubapro", "G2", DC_FAMILY_UWATEC_G2, 0x32}, // BLE {"Scubapro", "G2", DC_FAMILY_UWATEC_G2, 0x32}, // BLE