Libsigrok can be built without libserialport. Don't select it
in Config.in from both libsigrok and sigrok-cli and add a check
to libsigrok.mk to determine whether libserialport should be
enabled.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
config BR2_PACKAGE_LIBSIGROK
bool "libsigrok"
- select BR2_PACKAGE_LIBSERIALPORT
select BR2_PACKAGE_LIBZIP
select BR2_PACKAGE_LIBGLIB2
# libglib2
LIBSIGROK_PRE_CONFIGURE_HOOKS += LIBSIGROK_ADD_MISSING
+ifeq ($(BR2_PACKAGE_LIBSERIALPORT),y)
+LIBSIGROK_CONF_OPTS += --enable-libserialport
+LIBSIGROK_DEPENDENCIES += libserialport
+else
+LIBSIGROK_CONF_OPTS += --disable-libserialport
+endif
+
ifeq ($(BR2_PACKAGE_LIBFTDI),y)
LIBSIGROK_CONF_OPTS += --enable-libftdi
LIBSIGROK_DEPENDENCIES += libftdi
config BR2_PACKAGE_SIGROK_CLI
bool "sigrok-cli"
- select BR2_PACKAGE_LIBSERIALPORT
select BR2_PACKAGE_LIBSIGROK
# libsigrok->libglib2:
depends on BR2_USE_WCHAR