-AC_ARG_ENABLE(network-manager,
- AS_HELP_STRING([--enable-network-manager=@<:@no/yes/auto@:>@],
- [build with network-manager support]), ,
- enable_webkit=auto)
+AC_ARG_WITH(connectivity,
+ AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
+ [build with connectivity support]), ,
+ with_connectivity=auto)
+
+if test "x$with_connectivity" = "xno"; then
+ have_nm=no
+ have_connman=no
+
+elif test "x$with_connectivity" = "xconnman"; then
+
+ PKG_CHECK_MODULES(CONNMAN,
+ [
+ dbus-glib-1
+ ], have_connman="yes", have_connman="no")
+
+ if test "x$have_connman" = "xyes"; then
+ AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
+ have_nm=no
+ fi
+
+else