Use plain text body quote in html too
[modest] / configure.ac
1 # Copyright (c) 2006,2007 Nokia Corporation
2 # All rights reserved.
3
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
7
8 # * Redistributions of source code must retain the above copyright
9 #   notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above copyright
11 #   notice, this list of conditions and the following disclaimer in the
12 #   documentation and/or other materials provided with the distribution.
13 # * Neither the name of the Nokia Corporation nor the names of its
14 #   contributors may be used to endorse or promote products derived from
15 #   this software without specific prior written permission.
16
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
18 # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20 # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
21 # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 AC_INIT([modest],[1.0],[http://maemo.org])
30 AC_CONFIG_HEADERS([config.h])
31
32 AC_CONFIG_SRCDIR(src/modest-main.c)
33 AM_INIT_AUTOMAKE([dist-bzip2])
34
35 ALL_LINGUAS="en_GB"
36
37 MODEST_LOCALE_DIR='$prefix/${DATADIRNAME}/locale'
38 AM_GLIB_DEFINE_LOCALEDIR([MODEST_LOCALE_DIR])
39 AM_GLIB_GNU_GETTEXT
40
41 if test x$prefix = xNONE; then
42    prefix=/usr/local
43 fi
44 AC_SUBST(prefix)
45
46 AC_PROG_CC
47 AC_PROG_CXX
48 AM_PROG_CC_STDC
49 AC_HEADER_STDC
50 AC_PROG_LIBTOOL
51
52
53 # Option to enable debugging
54 AC_ARG_ENABLE(debug,
55               [AC_HELP_STRING([--enable-debug],[Debugging (default=no)])],
56               [with_debug=yes], [with_debug=no])
57
58 if test "x$with_debug" == "xyes" ; then
59         CFLAGS="$CFLAGS -ggdb -O0 -DDEBUG -Wall"
60 else
61         CFLAGS="$CFLAGS -O2 -Wall"
62 fi
63
64
65
66 dnl -------
67 dnl GtkHTML
68 dnl -------
69
70 AC_MSG_CHECKING(for installed version of libgtkhtml3)
71 pkg-config --exists libgtkhtml-3.14
72 retval=$?
73 gtk_html_found=false
74 if test $retval -eq 0 ; then
75     gtk_html_found=true
76     gtk_html_version=3.14
77 else
78     pkg-config --exists libgtkhtml-3.8
79     retval=$?
80     if test $retval -eq 0 ; then
81       gtk_html_found=true
82       gtk_html_version=3.8
83     else
84           if [ $gui = "true" ]; then
85             AC_MSG_RESULT(libgtkhtml 3.4 or higher is not found!)
86           fi
87     fi
88 fi
89
90 if [ $gtk_html_found = "true" ]; then
91    version=`pkg-config --modversion libgtkhtml-${gtk_html_version}`
92    AC_MSG_RESULT(found version $version)
93 else
94    AC_MSG_ERROR([install gtkhtml 3.8 or newer])
95 fi
96
97
98 dnl # GLib/Gobject/Gtk/Gconf => mandatory
99
100 PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 gobject-2.0 gtk+-2.0 >= 2.6 gconf-2.0 gnome-vfs-2.0 libgtkhtml-${gtk_html_version} libtinymail-1.0 libtinymail-camel-1.0 libtinymail-gnomevfs-1.0 libtinymailui-1.0 libtinymailui-gtk-1.0) 
101 AC_SUBST(MODEST_GSTUFF_CFLAGS)
102 AC_SUBST(MODEST_GSTUFF_LIBS)
103
104 modest_save_cflags="$CFLAGS"
105 modest_save_libs="$LIBS"
106 CFLAGS="$MODEST_GSTUFF_CFLAGS"
107 LIBS="$MODEST_GSTUFF_LIBS"
108 AC_CHECK_DECLS([gtk_widget_tap_and_hold_setup],[],[], [#include <gtk/gtk.h>])
109 CFLAGS="$modest_save_cflags"
110 LIBS="$modest_save_libs"
111
112 __COPY_LIBS="$LIBS"
113 LIBS="$LIBS $MODEST_GSTUFF_LIBS"
114 AC_CHECK_FUNCS(gtk_html_get_selection_area)
115 AC_SUBST(HAVE_GTK_HTML_GET_SELECTION_AREA)
116 AC_CHECK_FUNCS(gtk_tree_view_column_get_cell_data_hint)
117 AC_SUBST(HAVE_GTK_TREE_VIEW_COLUMN_GET_CELL_DATA_HINT)
118 LIBS="$__COPY_LIBS"
119
120 dnl dnl now, determine what to build
121 dnl AC_MSG_NOTICE([Determining what platform to build])
122 PKG_CHECK_MODULES(MODEST_MAEMO_LIBS,conic,[detected_platform=maemo],[detected_platform=gnome])
123
124 AC_ARG_WITH(platform, [
125 Target platform:
126   --with-platform=detect  detect target platform (default)
127   --with-platform=gnome   build for Gnome
128   --with-platform=maemo   build for Maemo
129 ],
130 [case "${with_platform}" in
131        gnome|maemo|detect)    MODEST_PLATFORM=${with_platform};;
132        *)        AC_MSG_ERROR([Unknown platform selected]);;
133 esac], [MODEST_PLATFORM=detect])
134
135 if test "$MODEST_PLATFORM" = "detect"; then
136         MODEST_PLATFORM="$detected_platform"
137         with_platform=$detected_platform
138 fi
139
140 if test "$with_platform" = "maemo"; then
141         MODEST_PLUGIN_DEFINES=" -DMODEST_PLATFORM_MAEMO"
142 elif test "$with_platform" = "gnome"; then
143         MODEST_PLUGIN_DEFINES=" -DMODEST_PLATFORM_GNOME"
144 fi
145 AC_SUBST(MODEST_PLUGIN_DEFINES)
146
147 #
148 # check the widgets library
149 #
150 have_hildon2=false
151 have_hildon1=false
152 have_hildon0=false
153 have_gtk=false
154 PKG_CHECK_EXISTS(hildon-1, have_hildon1=true,have_hildon1=false)
155 if test "$have_hildon1" = "true"; then
156    PKG_CHECK_EXISTS(hildon-1 >= 2.1.0, have_hildon2=true, have_hildon2=false)
157    PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS,hildon-1 hildon-fm-2)
158    hildonpkgs="hildon-1 hildon-fm-2"
159    detected_toolkit=hildon1
160    echo "DETECTED HILDON 1 $have_hildon2."
161 else
162    hildonpkgs="hildon-libs hildon-fm"
163    detected_toolkit=hildon1
164    PKG_CHECK_EXISTS(hildon-libs >= 0.12.0, have_hildon1=true, have_hildon1=false)
165    if test "$have_hildon1" = "false"; then
166       PKG_CHECK_EXISTS(hildon-libs, have_hildon0=true, have_hildon0=false)
167       if test "$have_hildon0" = "false"; then
168          have_gtk=true
169          detected_toolkit=gtk
170          hildonpkgs=
171       fi
172    fi
173    if test "$have_gtk" = "false"; then
174       PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS,hildon-libs hildon-fm)
175    fi
176 fi
177
178 dnl --------------- HILDON & PLUGIN PKGS -----------
179 pluginpkgs=$hildonpkgs
180 echo "Plugin Packages $pluginpkgs"
181 AC_SUBST(pluginpkgs)
182
183 # Plugin packages must not include libcanberra and libprofile
184 if test "$have_hildon2" = "true"; then
185    echo "DETECTED HILDON 2 $have_hildon2."
186    detected_toolkit=hildon2
187    hildonpkgs="$hildonpkgs libcanberra profile"
188    echo "HILDON 2 PACKAGES $hildonpkgs"
189    AC_CHECK_HEADER([profiled/keys_nokia.h], [], AC_MSG_ERROR([You have to install package profile-data-dev]))
190 fi
191 AC_SUBST(hildonpkgs)
192
193 dnl --------------- HILDON API ------------
194 hildon_api=
195 if test "$have_hildon0" = "true"; then
196    hildon_api=0
197 elif test "$have_hildon1" = "true"; then
198    hildon_api=1
199 elif test "$have_gtk" = "false"; then
200    hildon_api=`$PKG_CONFIG --modversion hildon-1 | cut -d. -f1`
201 fi
202
203 AC_DEFINE_UNQUOTED(MODEST_HILDON_API, $hildon_api, ["the API version of hildon"])
204 MODEST_PLUGIN_DEFINES="$MODEST_PLUGIN_DEFINES -DMODEST_HILDON_API=$hildon_api"
205
206 AC_ARG_WITH(toolkit, [
207 Target toolkit:
208   --with-toolkit=detect  detect target toolkit (default)
209   --with-toolkit=gtk   build for Gnome
210   --with-toolkit=hildon1   build for Hildon 1.x
211   --with-toolkit=hildon2   build for Hildon 2.x
212 ],
213 [case "${with_toolkit}" in
214        gtk|hildon1|hildon2|detect)    MODEST_TOOLKIT=${with_toolkit};;
215        *)        AC_MSG_ERROR([Unknown platform selected]);;
216 esac], [MODEST_TOOLKIT=detect])
217
218 if test "$MODEST_TOOLKIT" = "detect"; then
219         MODEST_TOOLKIT="$detected_toolkit"
220         with_toolkit=$detected_toolkit
221 fi
222
223 if test "$with_toolkit" = "hildon1"; then
224         MODEST_PLUGIN_DEFINES="$MODEST_PLUGIN_DEFINES -DMODEST_TOOLKIT_HILDON1"
225 elif test "$with_toolkit" = "hildon2"; then
226         MODEST_PLUGIN_DEFINES="$MODEST_PLUGIN_DEFINES -DMODEST_TOOLKIT_HILDON2"
227 elif test "$with_toolkit" = "gtk"; then
228         MODEST_PLUGIN_DEFINES="$MODEST_PLUGIN_DEFINES -DMODEST_TOOLKIT_GNOME"
229 fi
230
231 dnl Whether to use maemo-launcher or not
232 AC_ARG_ENABLE([maemo-launcher],
233               [AS_HELP_STRING([--enable-maemo-launcher],
234                               [build with maemo-launcher support])],
235                               [case "${enableval}" in
236                                yes) maemo_launcher=true ;;
237                                no)  maemo_launcher=false ;;
238                                *) AC_MSG_ERROR([bad value ${enableval} for --enable-maemo-launcher]) ;;
239                                esac], [maemo_launcher=false])
240 if test x$maemo_launcher = xtrue
241 then
242         PKG_CHECK_MODULES(MAEMO_LAUNCHER, [maemo-launcher-app])
243         AC_SUBST(MAEMO_LAUNCHER_CFLAGS)
244         AC_SUBST(MAEMO_LAUNCHER_LIBS)
245 fi
246
247 have_easysetup=false
248 if test "x$with_toolkit" == "xgtk"; then
249    PKG_CHECK_MODULES(MODEST_TOOLKIT,glib-2.0 >= 2.8 gtk+-2.0 >= 2.10 libnotify)
250    AC_DEFINE_UNQUOTED(MODEST_TOOLKIT_GTK, 1, ["Whether modest is being build for the gtk toolkit."])
251    MODEST_TOOLKIT_DIR=gnome
252 else
253    have_easysetup=true
254    PKG_CHECK_MODULES(MODEST_TOOLKIT,$hildonpkgs)
255    if test "$with_toolkit" = "hildon2"; then
256       AC_DEFINE_UNQUOTED(MODEST_TOOLKIT_HILDON2, 1, ["Whether modest is being build for the hildon2 toolkit."])
257       MODEST_TOOLKIT_DIR=hildon2
258    else
259       AC_DEFINE_UNQUOTED(MODEST_TOOLKIT_HILDON1, 1, ["Whether modest is being build for the hildon2 toolkit."])
260       MODEST_TOOLKIT_DIR=maemo
261    fi
262     AC_DEFINE_UNQUOTED(MODEST_HAVE_EASYSETUP, 1, ["Whether we have the easysetup feature"])
263 fi
264 AM_CONDITIONAL(MODEST_HAVE_EASYSETUP,test "x$have_easysetup" == "xtrue")
265 AC_SUBST(MODEST_TOOLKIT)
266 AC_SUBST(MODEST_TOOLKIT_DIR)
267
268 if test "x$with_platform" == "xgnome"; then
269       PKG_CHECK_MODULES(MODEST_PLATFORM,libtinymail-gnome-desktop-1.0 libnm_glib glib-2.0 >= 2.8 libnotify)
270     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_GNOME, 1, ["Whether modest is being built for the GNOME platform."])
271 dnl     AC_MSG_ERROR([The GNOME Build is currently broken; please try the Maemo build instead])
272 else
273     have_dbusapi=true
274     PKG_CHECK_MODULES(MODEST_PLATFORM,libosso dbus-1 libtinymail-maemo-1.0 libebook-1.2 )
275     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the MAEMO platform."])
276 fi
277 AM_CONDITIONAL(MODEST_HAVE_DBUS_API,test "x$have_dbusapi" == "xtrue")
278 AC_SUBST(MODEST_PLATFORM)
279
280
281
282 #
283 # check for wpeditor or libwpeditor-plus (on maemo)
284 #
285 if test "x$with_toolkit" != "xgtk"; then  
286 PKG_CHECK_MODULES(MODEST_WPEDITOR,wpeditor,have_wpeditor=true,have_wpeditor=false)
287 if test "x$have_wpeditor" == "xfalse"; then
288    PKG_CHECK_MODULES(MODEST_WPEDITOR,libwpeditor-plus,have_libwpeditorplus=true,have_libwpeditorplus=false)     
289    if test "x$have_libwpeditorplus" == "xtrue"; then
290         wpeditor="libwpeditor-plus"
291         AC_DEFINE_UNQUOTED(MODEST_HAVE_LIBWPEDITOR_PLUS, 1, ["Whether libwpeditor-plus is used."])              
292    else
293         AC_MSG_ERROR([you need to have either wpeditor or libwpeditor-plus installed])
294    fi
295 else
296    wpeditor="wpeditor"  
297    AC_DEFINE_UNQUOTED(MODEST_HAVE_WPEDITOR, 1, ["Whether wpeditor is used."])           
298 fi
299 fi
300
301
302 #
303 # check libalarm
304 #
305 if test "x$with_platform" == "xmaemo"; then  
306    PKG_CHECK_MODULES(MODEST_LIBALARM,libalarm,have_libalarm=true,have_libalarm=false)
307    if test "x$have_libalarm" == "xfalse"; then
308       PKG_CHECK_MODULES(MODEST_LIBALARM, alarm, have_libalarm=true,have_libalarm=false)
309    fi
310    if test "x$have_libalarm" == "xtrue"; then
311       AC_DEFINE_UNQUOTED(MODEST_HAVE_LIBALARM, 1, ["Whether libalarm is used."])                
312       AC_SUBST(MODEST_LIBALARM_CFLAGS)
313       AC_SUBST(MODEST_LIBALARM_LIBS)
314    fi
315 fi
316
317 #
318 # check for MCE
319 #
320 if test "x$with_platform" == "xmaemo"; then  
321 PKG_CHECK_MODULES(MODEST_MCE,mce,have_mce=true,have_mce=false)
322 if test "x$have_mce" == "xtrue"; then
323    mce="mce"    
324    AC_DEFINE_UNQUOTED(MODEST_HAVE_MCE, 1, ["Whether mce is used."])
325    AC_SUBST(MODEST_MCE_CFLAGS)
326    AC_SUBST(MODEST_MCE_LIBS)
327 else
328    mce=""
329 fi
330 fi
331
332 #
333 # check for libconic; this is a trick to check whether we run
334 # on a 'real' maemo platform, or on, say, ubuntu embedded
335 # this determines whether we build with the non-hildon GTK+
336 #
337 if test "x$with_platform" == "xmaemo"; then  
338 PKG_CHECK_MODULES(MODEST_LIBCONIC,conic,have_libconic=true,have_libconic=false)
339 if test "x$have_libconic" == "xtrue"; then
340    AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_GTK,1,["Whether modest is being built with Hildon/Gtk"])
341    AC_DEFINE_UNQUOTED(MODEST_HAVE_CONIC,1,["Whether modest has conic available"])
342    AC_SUBST(MODEST_LIBCONIC_CLAGS)
343    AC_SUBST(MODEST_LIBCONIC_LIBS)
344 else
345 # if we define this, tinymail will not try to #include conic headers
346    CFLAGS="$CFLAGS -DLIBTINYMAIL_MAEMO_WITHOUT_CONIC"
347 fi
348 fi
349
350 #
351 # check hildon-help (only for maemo)
352 #
353 if test "x$with_toolkit" != "xgtk"; then  
354    PKG_CHECK_MODULES(MODEST_HILDON_HELP,hildon-help,have_hildon_help=true,have_hildon_help=false)
355    if test "x$have_hildon_help" == "xfalse"; then
356       PKG_CHECK_MODULES(MODEST_HILDON_HELP,libossohelp,have_osso_help=true,have_osso_help=false)        
357       if test "x$have_osso_help" == "xtrue"; then
358         helplib="osso-help"
359         AC_DEFINE_UNQUOTED(MODEST_HAVE_OSSO_HELP, 1, ["Whether osso-help is used."])            
360       else
361         AC_MSG_ERROR([you need to have either osso-help or hildon-help installed])
362       fi
363    else
364      helplib="hildon-help"      
365      AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_HELP, 1, ["Whether hildon-help is used."])           
366    fi
367 fi
368
369
370
371 #
372 # check for the notification stuff (only maemo)
373 #
374 if test "x$with_toolkit" != "xgtk"; then  
375    PKG_CHECK_MODULES(MODEST_HILDON_NOTIFY,hildon-notify libnotify,have_hildon_notify=true,have_hildon_notify=false)
376    if test "x$have_hildon_notify" == "xtrue"; then
377       AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_NOTIFY, 1, ["Whether hildon-notify is available"])      
378    fi
379 fi
380
381
382 #
383 # check for the uri/mime stuff
384 #
385 if test "x$with_toolkit" != "xgtk"; then  
386    PKG_CHECK_MODULES(MODEST_HILDON_MIME,libhildonmime,have_hildonmime=true,have_hildonmime=false)
387    if test "x$have_hildonmime" == "xfalse"; then
388       PKG_CHECK_MODULES(MODEST_HILDON_MIME,libossomime,have_ossomime=true,have_ossomime=false)  
389       if test "x$have_ossomime" == "xtrue"; then
390         mimelib="osso-mime"
391         AC_DEFINE_UNQUOTED(MODEST_HAVE_OSSO_MIME, 1, ["Whether osso-mime is used."])            
392       else
393         AC_MSG_ERROR([you need to have either osso-mime or hildon-mime installed])
394       fi
395    else
396      mimelib="hildon-mime"      
397      AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_MIME, 1, ["Whether hildon-mime is used."])           
398    fi
399 fi
400
401 PKG_CHECK_MODULES(MODEST_MOZEMBED, libtinymailui-mozembed-1.0, have_mozembed=true, have_mozembed=false)
402 AC_ARG_ENABLE(mozembed,
403 AC_HELP_STRING([--enable-mozembed],
404         [Build with GtkMozEmbed (yes, no)]),
405 [case "${enableval}" in
406       yes)
407         if test x$have_mozembed = xfalse; then
408            AC_MSG_ERROR([building of GtkMozEmbed support requested and gtkmozembed not found])
409         fi
410         use_mozembed=true
411         ;;
412       *)
413         use_mozembed=false
414         ;;
415 esac],[use_mozembed=false])
416
417 AM_CONDITIONAL(BUILD_MOZEMBED, test x$use_mozembed = xtrue)
418
419 if test x$use_mozembed = xtrue; then
420         AC_DEFINE_UNQUOTED(MODEST_USE_MOZEMBED, 1, ["Whether we use GtkMozEmbed."])
421 fi
422
423 #dnl wether we can and should build the 
424 #dnl search plugin (on maemo)
425 if test "x$with_platform" == "xmaemo"; then  
426 PKG_CHECK_MODULES(MODEST_OGS, libosso >= 0.8.5 libogs-1.2, have_ogs=true, have_ogs=false)
427 have_ogs_support=false
428 AC_ARG_ENABLE(ogs_support,
429 AC_HELP_STRING([--enable-ogs-support],
430         [Build with osso global search support (yes, no)]),
431 [case "${enableval}" in
432       yes)
433         if test x$have_ogs = xfalse; then
434            AC_MSG_ERROR([building of ogs support requested and libogs-1.2 not found])
435         fi
436         ;;
437       *) 
438         have_ogs_support=false
439         ;;
440 esac],[have_ogs_support=$have_ogs])
441
442 if test x$have_ogs_support = xtrue; then
443         AC_DEFINE_UNQUOTED(MODEST_HAVE_OGS, 1, ["Whether ogs is available."])
444 fi
445 fi
446
447
448
449
450 #
451 # check the version of the addressbook on maemo
452 #
453 if test "x$with_platform" == "xmaemo"; then  
454    PKG_CHECK_MODULES(MODEST_ABOOK,osso-addressbook-1.0,have_abook=true,have_abook=false)
455    abook_api=`$PKG_CONFIG --modversion osso-addressbook-1.0 | cut -d. -f1`
456    AC_SUBST(MODEST_ABOOK_CFLAGS)
457    AC_SUBST(MODEST_ABOOK_LIBS)
458
459    if test "x$have_abook" == "xfalse"; then
460      PKG_CHECK_MODULES(MODEST_ABOOK, libosso-abook-1.0,have_abook=true,have_abook=false)
461      abook_api=`$PKG_CONFIG --modversion libosso-abook-1.0 | cut -d. -f1`
462      AC_SUBST(MODEST_ABOOK_CFLAGS)
463      AC_SUBST(MODEST_ABOOK_LIBE)
464    fi
465
466    if test "x$have_abook" == "xtrue"; then
467       AC_DEFINE_UNQUOTED(OSSO_ABOOK_ENABLE_DEPRECATED, 1, ["use deprecated addressbook API"])
468       AC_DEFINE_UNQUOTED(MODEST_ABOOK_API, $abook_api, ["the API version of osso-addressbook"])
469       AC_DEFINE_UNQUOTED(MODEST_HAVE_ABOOK, 1, ["whether we have osso-addressbook"])
470       addressbook="osso-addressbook"
471    fi
472 fi
473
474
475 #
476 # if we don't have an addressbook, use the dummy one
477 #
478 AM_CONDITIONAL(MODEST_USE_DUMMY_ADDRESS_BOOK,test "x$have_abook" != "xtrue")
479
480
481 AM_GLIB_GNU_GETTEXT
482 IT_PROG_INTLTOOL([0.35.0])
483
484 # gettext support
485 GETTEXT_PACKAGE=modest  
486 AC_SUBST(GETTEXT_PACKAGE)
487 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", ["gettext package"])
488
489
490 #
491 # settings for maemo platform
492 #
493 if test "x$with_platform" == "xmaemo"; then  
494
495   # warnings are errors, but don't check format errors, because
496   # it breaks with logical ids
497   CFLAGS="$CFLAGS -Wno-format-extra-args -Werror"
498
499    desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
500    serviceentrydir=`$PKG_CONFIG dbus-glib-1 --variable=prefix`/share/dbus-1/services
501    localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
502    backupsettingsdir=/etc/osso-backup/applications
503    ossocudscriptsdir=/etc/osso-cud-scripts
504    pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`
505    icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
506    icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
507    icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
508    icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
509    icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
510    pluginlibdir=`$PKG_CONFIG hildon-control-panel --variable=plugindir`
511    plugindesktopentrydir=`$PKG_CONFIG hildon-control-panel --variable=plugindesktopentrydir`
512
513    dbus_api="dbus_api"
514    AC_SUBST(dbus_api)
515
516    # Define as variables in Makefiles
517    AC_SUBST(desktopentrydir)
518    AC_SUBST(serviceentrydir)
519    AC_SUBST(backupsettingsdir)
520    AC_SUBST(ossocudscriptsdir)
521    AC_SUBST(localedir)
522    AC_SUBST(pixmapdir)
523    AC_SUBST(icon_26x26dir)
524    AC_SUBST(icon_34x34dir)
525    AC_SUBST(icon_40x40dir)
526    AC_SUBST(icon_50x50dir)
527    AC_SUBST(icon_scalabledir)
528    AC_SUBST(pluginlibdir)
529    AC_SUBST(plugindesktopentrydir)
530
531 fi
532
533 dnl ## setup the testing framework (ie., make check)
534 build_tests=false
535 AC_ARG_ENABLE(tests,
536 AC_HELP_STRING([--enable-tests],
537         [Build tests (no, yes)]),
538 [case "${enableval}" in
539       yes)
540         build_tests=true ;;
541       *) build_tests=false ;;
542 esac],[build_tests=false])
543 AM_CONDITIONAL(BUILD_TESTS, test x$build_tests = xtrue)
544
545
546
547 dnl ## is the check package installed?
548 if test x$build_tests = xtrue; then
549    PKG_CHECK_MODULES(CHECK, check >= 0.9.4 glib-2.0)
550 fi
551
552
553
554 dnl ## do we want documentation (gtk-doc)
555 build_docs=false
556 AC_ARG_ENABLE(docs,
557 AC_HELP_STRING([--enable-docs],
558         [Build documentation (yes, no)]),
559 [case "${enableval}" in
560       yes)
561         build_docs=true ;;
562       *) build_docs=false ;;
563 esac],[build_docs=false])
564 AM_CONDITIONAL(BUILD_DOCS, test x$build_docs = xtrue)
565
566 dnl ## gtk-doc
567 GTK_DOC_CHECK([1.0])
568
569 AC_OUTPUT([
570 po/Makefile.in
571 Makefile
572 man/Makefile
573 src/Makefile
574 src/modest-plugin-1.0.pc
575 src/dbus_api/Makefile
576 src/gnome/Makefile
577 src/maemo/Makefile
578 src/maemo/easysetup/Makefile
579 src/hildon2/Makefile
580 src/widgets/Makefile
581 docs/Makefile
582 docs/reference/Makefile
583 tests/Makefile
584 tests/dbus_api/Makefile
585 src/maemo/modest.desktop
586 src/maemo/com.nokia.modest.service
587 src/hildon2/modest.desktop
588 src/hildon2/com.nokia.modest.service
589 libmodest-dbus-client/Makefile
590 libmodest-dbus-client/libmodest-dbus-client-1.0.pc
591 ])
592
593
594 echo
595 echo "modest configure results"
596 echo "-----------------------------------"
597 echo "Platform         : $with_platform"
598 echo "Toolkit          : $with_toolkit"
599 echo "Prefix           : ${prefix}"
600 echo "Build tests      : $build_tests"
601 echo "Build docs       : $build_docs"
602 echo "Gettext Package  : $GETTEXT_PACKAGE"
603
604 if test "x$with_platform" == "xmaemo"; then
605    echo "Maemo Launcher   : $maemo_launcher"
606    echo "Editor lib       : $wpeditor"
607    echo "Addressbook      : $have_abook"
608    echo "Help lib         : $helplib"
609    echo "libconic support : $have_libconic"
610    echo "Alarm            : $have_libalarm"
611    echo "MCE              : $have_mce"
612    echo "Hildon-Notify    : $have_hildon_notify"    
613    echo "LibOGS support   : $have_ogs_support"
614    echo "MozEmbed support : $use_mozembed"
615 fi 
616
617 echo "CFLAGS           : $CFLAGS"
618 echo "Debug version    : $with_debug"
619 echo ""
620 echo "NOTE: you should do a 'make clean' after changing architecture or platform (--with-platform=)"
621 echo ""