* modest-outside-scratchbox patch 3:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Mon, 26 Nov 2007 19:23:08 +0000 (19:23 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Mon, 26 Nov 2007 19:23:08 +0000 (19:23 +0000)
- make conic optional, even when building the maemo frontend

pmo-trunk-r3821

configure.ac
libmodest-dbus-client/Makefile.am
src/maemo/modest-connection-specific-smtp-window.c
src/maemo/modest-maemo-global-settings-dialog.c
src/modest-tny-account-store.c
src/widgets/Makefile.am

index 4461b12..7530d50 100644 (file)
@@ -96,7 +96,7 @@ dnl     AC_MSG_ERROR([The GNOME Build is currently broken; please try the Maemo
 else
     have_easysetup=true
     have_dbusapi=true
 else
     have_easysetup=true
     have_dbusapi=true
-    PKG_CHECK_MODULES(MODEST_PLATFORM,libosso conic libtinymail-maemo-1.0 libebook-1.2 microb-engine-nss)
+    PKG_CHECK_MODULES(MODEST_PLATFORM,libosso dbus-1 libtinymail-maemo-1.0 libebook-1.2 )
     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the MAEMO platform."])
     AC_DEFINE_UNQUOTED(MODEST_HAVE_EASYSETUP, 1, ["Whether we have the easysetup feature"])
 fi                 
     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the MAEMO platform."])
     AC_DEFINE_UNQUOTED(MODEST_HAVE_EASYSETUP, 1, ["Whether we have the easysetup feature"])
 fi                 
@@ -144,6 +144,20 @@ fi
 fi
 
 
 fi
 
 
+
+#
+# check for libconic; this is a trick to check whether we run
+# on a 'real' maemo platform, or on, say, ubuntu embedded
+# this determines whether we build with the non-hildon GTK+
+#
+if test "x$with_platform" == "xmaemo"; then  
+PKG_CHECK_MODULES(MODEST_LIBCONIC,conic,have_libconic=true,have_libconic=false)
+if test "x$have_libconic" == "xtrue"; then
+   AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_GTK,1,["Whether modest is being built with Hildon/Gtk"])
+   AC_DEFINE_UNQUOTED(MODEST_HAVE_CONIC,1,["Whether modest has conic available"])
+fi
+fi
+
 #
 # check hildon-help (only for maemo)
 #
 #
 # check hildon-help (only for maemo)
 #
index 13b7ffb..5e85cd6 100644 (file)
@@ -30,6 +30,7 @@ INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS)\
        $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
        $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
        $(MODEST_GSTUFF_CFLAGS)\
        $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
        $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
+       $(MODEST_PLATFORM_CFLAGS) \
        -I$(MODEST_PLATFORM) \
        -I$(top_srcdir)/src \
        -DPREFIX=\"@prefix@\" \
        -I$(MODEST_PLATFORM) \
        -I$(top_srcdir)/src \
        -DPREFIX=\"@prefix@\" \
index 45ce533..0529b3a 100644 (file)
@@ -154,8 +154,10 @@ modest_connection_specific_smtp_window_class_init (ModestConnectionSpecificSmtpW
 /* #define DEBUG_WITHOUT_LIBCONIC 1 */
 
 void
 /* #define DEBUG_WITHOUT_LIBCONIC 1 */
 
 void
-modest_connection_specific_smtp_window_fill_with_connections (ModestConnectionSpecificSmtpWindow *self, ModestAccountMgr *account_manager)
+modest_connection_specific_smtp_window_fill_with_connections (ModestConnectionSpecificSmtpWindow *self,
+                                                             ModestAccountMgr *account_manager)
 {
 {
+#ifdef MODEST_HAVE_CONIC
        ModestConnectionSpecificSmtpWindowPrivate *priv = 
                CONNECTION_SPECIFIC_SMTP_WINDOW_GET_PRIVATE (self);
        priv->account_manager = account_manager;
        ModestConnectionSpecificSmtpWindowPrivate *priv = 
                CONNECTION_SPECIFIC_SMTP_WINDOW_GET_PRIVATE (self);
        priv->account_manager = account_manager;
@@ -215,6 +217,7 @@ modest_connection_specific_smtp_window_fill_with_connections (ModestConnectionSp
        #endif
                
        update_model_server_names (self);
        #endif
                
        update_model_server_names (self);
+#endif /*MODEST_HAVE_CONIC */
 }
        
 static void
 }
        
 static void
index 2c71d02..8499fb9 100644 (file)
@@ -508,6 +508,7 @@ current_connection (void)
        if (!tny_device_is_online (device))
                return MODEST_CONNECTED_VIA_ANY;
 
        if (!tny_device_is_online (device))
                return MODEST_CONNECTED_VIA_ANY;
 
+#ifdef MODEST_HAVE_CONIC
        /* Get iap id */
        const gchar *iap_id = tny_maemo_conic_device_get_current_iap_id (TNY_MAEMO_CONIC_DEVICE (device));
        if (iap_id) {
        /* Get iap id */
        const gchar *iap_id = tny_maemo_conic_device_get_current_iap_id (TNY_MAEMO_CONIC_DEVICE (device));
        if (iap_id) {
@@ -524,6 +525,9 @@ current_connection (void)
        
                g_object_unref (iap);
        }
        
                g_object_unref (iap);
        }
+#else
+       retval = MODEST_CONNECTED_VIA_WLAN; /* assume WLAN (fast) internet */  
+#endif /* MODEST_HAVE_CONIC */
        
        g_object_unref (device);
 
        
        g_object_unref (device);
 
index 4539336..b9061d0 100644 (file)
@@ -1371,7 +1371,7 @@ modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection
        g_return_val_if_fail (self, NULL);
        
        
        g_return_val_if_fail (self, NULL);
        
        
-#ifdef MODEST_PLATFORM_MAEMO
+#ifdef MODEST_HAVE_CONIC
        g_assert (TNY_IS_MAEMO_CONIC_DEVICE (device));
        TnyMaemoConicDevice *maemo_device = TNY_MAEMO_CONIC_DEVICE (device);    
        const gchar* iap_id = tny_maemo_conic_device_get_current_iap_id (maemo_device);
        g_assert (TNY_IS_MAEMO_CONIC_DEVICE (device));
        TnyMaemoConicDevice *maemo_device = TNY_MAEMO_CONIC_DEVICE (device);    
        const gchar* iap_id = tny_maemo_conic_device_get_current_iap_id (maemo_device);
@@ -1417,7 +1417,7 @@ modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection
        return account;
 #else
        return NULL; /* TODO: Implement this for GNOME, instead of just Maemo? */
        return account;
 #else
        return NULL; /* TODO: Implement this for GNOME, instead of just Maemo? */
-#endif /* MODEST_PLATFORM_MAEMO */
+#endif /* MODEST_HAVE_CONIC */
 }
 
                                                                 
 }
 
                                                                 
index 7470870..6c8370b 100644 (file)
@@ -1,11 +1,12 @@
 #
 # Makefile.am
 #
 # Makefile.am
-# Time-stamp: <2007-06-23 15:40:04 (djcb)>
+# Time-stamp: <2007-11-24 13:34:06 (djcb)>
 
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
        $(MODEST_HILDON_WIDGETS_CFLAGS) \
 
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
        $(MODEST_HILDON_WIDGETS_CFLAGS) \
+       $(MODEST_HILDON_HELP_CFLAGS)    \
        $(MODEST_MOZEMBED_CFLAGS) \
        -I ${top_srcdir}/src/$(MODEST_PLATFORM) \
        -I ${top_srcdir}/src \
        $(MODEST_MOZEMBED_CFLAGS) \
        -I ${top_srcdir}/src/$(MODEST_PLATFORM) \
        -I ${top_srcdir}/src \