]> git.0d.be Git - empathy.git/commitdiff
configure: enable connectivity building with nm, connman, auto or none
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Wed, 19 Aug 2009 12:31:21 +0000 (13:31 +0100)
committerJonny Lamb <jonny.lamb@collabora.co.uk>
Wed, 19 Aug 2009 16:17:03 +0000 (17:17 +0100)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
configure.ac
libempathy/Makefile.am

index 3484e3cd39a9cb5e1df0cda172ac47ef21f235f0..00c6b4da58d697d81a89edfa8482cef7565b673e 100644 (file)
@@ -157,30 +157,57 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
 AM_GLIB_GNU_GETTEXT
 
 # -----------------------------------------------------------
-# NM integration
+# Connectivity integration
 # -----------------------------------------------------------
-AC_ARG_ENABLE(network-manager,
-              AS_HELP_STRING([--enable-network-manager=@<:@no/yes/auto@:>@],
-                             [build with network-manager support]), ,
-                             enable_network_manager=auto)
+AC_ARG_WITH(connectivity,
+              AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
+                             [build with connectivity support]), ,
+                             with_connectivity=auto)
 
-if test "x$enable_network_manager" != "xno"; then
-   PKG_CHECK_MODULES(NETWORK_MANAGER,
-   [
-      libnm_glib >= $NETWORK_MANAGER_REQUIRED
-   ], have_nm="yes", have_nm="no")
+PKG_CHECK_MODULES(NETWORK_MANAGER,
+[
+   libnm_glib >= $NETWORK_MANAGER_REQUIRED
+], have_nm="yes", have_nm="no")
+
+PKG_CHECK_MODULES(CONNMAN,
+[
+   dbus-glib-1
+], have_connman="yes", have_connman="no")
 
+if test "x$with_connectivity" = "xno"; then
+   have_nm=no
+   have_connman=no
+
+elif test "x$with_connectivity" = "xnm"; then
    if test "x$have_nm" = "xyes"; then
       AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
+      have_connman=no
    fi
+
+elif test "x$with_connectivity" = "xconnman"; then
+   if test "x$have_connman" = "xyes"; then
+      AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
+      have_nm=no
+   fi
+
 else
-   have_nm=no
+   if test "x$have_nm" = "xyes"; then
+      AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
+      have_connman=no
+   fi
+
 fi
 
-if test "x$enable_network_manager" = "xyes" -a "x$have_nm" != "xyes"; then
+if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
+   AC_MSG_ERROR([Couldn't find connman dependencies.])
+fi
+
+if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
    AC_MSG_ERROR([Couldn't find libnm-glib dependencies.])
 fi
-AM_CONDITIONAL(HAVE_NM, test "x$have_NM" = "xyes")
+
+AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
+AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
 
 # -----------------------------------------------------------
 # Webkit
@@ -479,7 +506,10 @@ Configure summary:
        Display maps (libchamplain).:  ${have_libchamplain}
        Location awareness (Geoclue):  ${have_geoclue}
        Adium themes (Webkit).......:  ${have_webkit}
+
+    Connectivity:
        NetworkManager integration..:  ${have_nm}
+       ConnMan integration.........:  ${have_connman}
 
     Extras:
        Documentation...............:  ${enable_gtk_doc}
index 7600ee5d4ab9671092dff659622b583364151807..0250a63d884168a91a6d03baa33c0d4a6db438fc 100644 (file)
@@ -10,7 +10,8 @@ AM_CPPFLAGS =                                           \
        -DG_LOG_DOMAIN=\"empathy\"                      \
        $(LIBEMPATHY_CFLAGS)                            \
        $(GEOCLUE_CFLAGS)                               \
-       $(NETWORK_MANAGER_CFLAGS) \
+       $(NETWORK_MANAGER_CFLAGS)                       \
+       $(CONNMAN_CFLAGS)                               \
        $(WARN_CFLAGS)                                  \
        $(DISABLE_DEPRECATED)
 
@@ -70,7 +71,8 @@ libempathy_la_LIBADD =                \
        $(top_builddir)/extensions/libemp-extensions.la \
        $(LIBEMPATHY_LIBS) \
        $(GEOCLUE_LIBS) \
-       $(NETWORK_MANAGER_LIBS)
+       $(NETWORK_MANAGER_LIBS) \
+       $(CONNMAN_LIBS)
 
 libempathy_la_LDFLAGS =                \
        -version-info ${LIBEMPATHY_CURRENT}:${LIBEMPATHY_REVISION}:${LIBEMPATHY_AGE} \