libmbim: add udev as optional feature
authorAleksander Morgado <aleksander@aleksander.es>
Wed, 6 Sep 2017 21:28:09 +0000 (23:28 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 6 Sep 2017 21:36:13 +0000 (23:36 +0200)
udev support will be enabled in the build if libgudev is selected.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libmbim/Config.in
package/libmbim/libmbim.mk

index 5db8efbf9cc5ec6288bdbf2b1442e8afeeb310a3..fd7dbb313cc5265dedf792e21f16eb271b230a53 100644 (file)
@@ -3,8 +3,6 @@ config BR2_PACKAGE_LIBMBIM
        depends on BR2_USE_WCHAR # libglib2
        depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
        depends on BR2_USE_MMU # libglib2
-       depends on BR2_PACKAGE_HAS_UDEV
-       select BR2_PACKAGE_LIBGUDEV
        select BR2_PACKAGE_LIBGLIB2
        help
          libmbim is a glib-based library for talking to WWAN modems and
@@ -13,7 +11,6 @@ config BR2_PACKAGE_LIBMBIM
 
          http://www.freedesktop.org/wiki/Software/libmbim/
 
-comment "libmbim needs udev /dev management and a toolchain w/ wchar, threads"
+comment "libmbim needs a toolchain w/ wchar, threads"
        depends on BR2_USE_MMU
-       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-               !BR2_PACKAGE_HAS_UDEV
+       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
index 33e500e536180ee4eaf170d4b45a661e3d21e6c4..b8dfa832d293359297c07ce088b71ee400d5c735 100644 (file)
@@ -11,9 +11,17 @@ LIBMBIM_LICENSE = LGPL-2.0+ (library), GPL-2.0+ (programs)
 LIBMBIM_LICENSE_FILES = COPYING
 LIBMBIM_INSTALL_STAGING = YES
 
-LIBMBIM_DEPENDENCIES = libglib2 udev libgudev
+LIBMBIM_DEPENDENCIES = libglib2
 
 # we don't want -Werror
 LIBMBIM_CONF_OPTS = --enable-more-warnings=no
 
+# if libgudev available, request udev support
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+LIBMBIM_DEPENDENCIES += libgudev
+LIBMBIM_CONF_OPTS += --with-udev
+else
+LIBMBIM_CONF_OPTS += --without-udev
+endif
+
 $(eval $(autotools-package))