* added account view widget, a listview with the current
[modest] / configure.ac
index be861ad..a6ede9b 100644 (file)
@@ -1,12 +1,13 @@
 dnl configure.ac for modest 
-dnl Time-stamp: <2006-06-02 16:29:39 (djcb)>
+dnl Time-stamp: <2006-07-17 13:28:07 (djcb)>
 dnl written by Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
-AC_INIT([modest],[0.0.9],[http://maemo.org])
-AC_CONFIG_SRCDIR(src/modest-main.c)
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION)
 
+AC_INIT([modest],[0.0.1],[http://maemo.org])
 AC_CONFIG_HEADERS([config.h])
 
+AC_CONFIG_SRCDIR(src/modest-main.c)
+AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION)
+
 if test x$prefix = xNONE; then
    prefix=/usr/local
 fi
@@ -27,52 +28,36 @@ PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 gobject-2.0 gtk+-2.0 >= 2.6 gcon
 AC_SUBST(MODEST_GSTUFF_CFLAGS)
 AC_SUBST(MODEST_GSTUFF_LIBS)
 
-dnl dnl build the Hildon UI?
-PKG_CHECK_MODULES(MODEST_HILDON,hildon-libs,hildon_support=yes,echo "no";hildon_support=no)
-
 dnl now, determine what to build
-AC_MSG_NOTICE([Determining what UI to build])
-modest_ui="none"
-if test "x$hildon_support" = "xyes"; then
-      AC_MSG_NOTICE([Looks like Hildon])
-
-      AC_SUBST(MODEST_UI_DIR,"hildon-libs")
-      AC_DEFINE([MODEST_ENABLE_HILDON_UI],1,[Enable Hildon UI])
-      PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_MAEMO,libtinymail-maemo-1.0 hildon-libs hildon-lgpl libosso)
-      AC_SUBST(MODEST_LIBTINYMAIL_MAEMO_CFLAGS)
-      AC_SUBST(MODEST_LIBTINYMAIL_MAEMO_LIBS) 
-      modest_ui="hildon"
+AC_MSG_NOTICE([Determining what platform to build])
+AC_ARG_WITH(platform,
+[--with-platform=gtk           platform to build for [gtk]],
+[case "${with_platform}" in
+      gtk)    MODEST_PLATFORM_DIR=gtk;;
+      gtk2)   MODEST_PLATFORM_DIR=gtk2;;
+      hildon) MODEST_PLATFORM_DIR=hildon;;
+      *)      MODEST_PLATFORM_DIR=${with_platform}
+esac], [MODEST_PLATFORM_DIR=gtk
+       with_platform=gtk])
+AC_SUBST(MODEST_PLATFORM_DIR)
+       
+if test "x$with_platform" = "xhildon"; then
+   PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_MAEMO,libtinymail-maemo-1.0 hildon-libs hildon-lgpl libosso)
+   AC_SUBST(MODEST_LIBTINYMAIL_MAEMO_CFLAGS)
+   AC_SUBST(MODEST_LIBTINYMAIL_MAEMO_LIBS) 
 else
-      AC_MSG_NOTICE([Looks like Gnome/GTK+])
-
-      AC_SUBST(MODEST_UI_DIR,"gtk-glade")               
-      AC_DEFINE([MODEST_ENABLE_GTK_GLADE_UI],1,[Enable Gtk-Glade UI])
-      PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_GNOME_DESKTOP,libtinymail-gnome-desktop-1.0 libnm_glib glib-2.0 >= 2.8)
-      AC_SUBST(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS)
-      AC_SUBST(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)
-      modest_ui="gtk-glade"                                            
+   PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_GNOME_DESKTOP,libtinymail-gnome-desktop-1.0 libnm_glib glib-2.0 >= 2.8)
+   AC_SUBST(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS)
+   AC_SUBST(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)
 fi
 
-AM_CONDITIONAL(HILDON, test x$hildon_support = xyes)
-
-dnl now, determine what to build
-AC_MSG_NOTICE([Determining what UI to build])
-modest_ui="none"
-if test "x$hildon_support" = "xyes"; then
-      AC_SUBST(MODEST_UI_DIR,"hildon")
-      AC_DEFINE([MODEST_ENABLE_HILDON_UI],1,[Enable Hildon UI])
-      modest_ui="hildon"
-else 
-      AC_SUBST(MODEST_UI_DIR,"gtk-glade")               
-      AC_DEFINE([MODEST_ENABLE_GTK_GLADE_UI],1,[Enable Gtk-Glade UI])
-      modest_ui="gtk-glade"                                            
-fi
+AM_CONDITIONAL(OLD_UI_STUFF, test x$with_platform != xgtk2)
 
 AC_OUTPUT([
 Makefile
 src/Makefile
 src/gtk/Makefile
-src/gtk-glade/Makefile
+src/gtk2/Makefile
 src/hildon/Makefile
 src/hildon/com.nokia.modest.service
 src/hildon/modest.desktop.in
@@ -83,5 +68,5 @@ docs/reference/Makefile
 echo
 echo "modest configure results"
 echo "-----------------------------------"
-echo "User-interface       : $modest_ui"
+echo "Platform       : $with_platform"
 echo ""