* src/widget/Makefile.am, src/maemo/Makefile.am:
[modest] / configure.ac
index 113a12d..d9239a5 100644 (file)
@@ -68,6 +68,14 @@ 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)
 
+modest_save_cflags="$CFLAGS"
+modest_save_libs="$LIBS"
+CFLAGS="$MODEST_GSTUFF_CFLAGS"
+LIBS="$MODEST_GSTUFF_LIBS"
+AC_CHECK_DECLS([gtk_widget_tap_and_hold_setup],[],[], [#include <gtk/gtk.h>])
+CFLAGS="$modest_save_cflags"
+LIBS="$modest_save_libs"
+
 __COPY_LIBS="$LIBS"
 LIBS="$LIBS $MODEST_GSTUFF_LIBS"
 AC_CHECK_FUNCS(gtk_html_get_selection_area)
@@ -76,16 +84,23 @@ AC_SUBST(HAVE_GTK_HTML_GET_SELECTION_AREA)
 
 dnl dnl now, determine what to build
 dnl AC_MSG_NOTICE([Determining what platform to build])
-dnl PKG_CHECK_MODULES(MODEST_MAEMO_LIBS,libosso,[with_platform=maemo],true)
-
-AC_ARG_WITH(platform,
-[--with-platform=gnome         platform to build for [gnome]],
+PKG_CHECK_MODULES(MODEST_MAEMO_LIBS,conic,[detected_platform=maemo],[detected_platform=gnome])
+
+AC_ARG_WITH(platform, [
+Target platform:
+  --with-platform=detect  detect target platform (default)
+  --with-platform=gnome   build for Gnome
+  --with-platform=maemo   build for Maemo
+],
 [case "${with_platform}" in
-       gnome)    MODEST_PLATFORM=gnome;;
-       maemo) MODEST_PLATFORM=maemo;;
-       *)      MODEST_PLATFORM=${with_platform}
-esac], [MODEST_PLATFORM=gnome
-               with_platform=gnome])
+       gnome|maemo|detect)    MODEST_PLATFORM=${with_platform};;
+       *)        AC_MSG_ERROR([Unknown platform selected]);;
+esac], [MODEST_PLATFORM=detect])
+
+if test "$MODEST_PLATFORM" = "detect"; then
+       MODEST_PLATFORM="$detected_platform"
+       with_platform=$detected_platform
+fi
 
 have_easysetup=false
 if test "x$with_platform" == "xgnome"; then
@@ -433,7 +448,7 @@ echo "Build tests      : $build_tests"
 echo "Build docs       : $build_docs"
 echo "Gettext Package  : $GETTEXT_PACKAGE"
 
-if test "x$with_platform" == "xgnome"; then
+if test "x$with_platform" == "xmaemo"; then
    echo "Editor lib       : $wpeditor"
    echo "Addressbook      : $have_abook"
    echo "Help lib         : $helplib"