Set better modal windows in hildon2 window manager to avoid keyboard focus
[modest] / libmodest-dbus-client / 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([libmodestclient],[3.2.5],[http://maemo.org])
30 AC_CONFIG_HEADERS([config.h])
31
32 m4_define([modest_api_major_version], [1])
33 m4_define([modest_api_minor_version], [99])
34 m4_define([modest_api_micro_version], [6])
35 m4_define([modest_api_version], [modest_api_major_version.modest_api_minor_version.modest_api_micro_version])
36
37
38 AM_INIT_AUTOMAKE([dist-bzip2])
39
40 MODEST_API_MAJOR_VERSION=modest_api_major_version
41 MODEST_API_MINOR_VERSION=modest_api_minor_version
42 MODEST_API_MICRO_VERSION=modest_api_micro_version
43 MODEST_API_VERSION=modest_api_version
44 AC_SUBST(MODEST_API_MAJOR_VERSION)
45 AC_SUBST(MODEST_API_MINOR_VERSION)
46 AC_SUBST(MODEST_API_MICRO_VERSION)
47 AC_SUBST(MODEST_API_VERSION)
48
49 if test x$prefix = xNONE; then
50    prefix=/usr/local
51 fi
52 AC_SUBST(prefix)
53
54 AC_PROG_CC
55 AC_PROG_CXX
56 AM_PROG_CC_STDC
57 AC_HEADER_STDC
58 AC_PROG_LIBTOOL
59
60
61 # Option to enable debugging
62 AC_ARG_ENABLE(debug,
63               [AC_HELP_STRING([--enable-debug],[Debugging (default=no)])],
64               [with_debug=yes], [with_debug=no])
65
66 if test "x$with_debug" == "xyes" ; then
67         CFLAGS="$CFLAGS -ggdb -O0 -DDEBUG -Wall"
68 else
69         CFLAGS="$CFLAGS -O2 -Wall"
70 fi
71
72 # Option to enable debugging
73 AC_ARG_ENABLE(gcov,
74               [AC_HELP_STRING([--enable-gcov],[Coverage reporting (default=no)])],
75               [with_gcov=yes], [with_gcov=no])
76
77 if test "x$with_gcov" == "xyes" ; then
78         CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
79         LDFLAGS="$LDFLAGS -lgcov"
80 fi
81
82
83 PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 libosso dbus-1 dbus-glib-1) 
84 AC_SUBST(MODEST_GSTUFF_CFLAGS)
85 AC_SUBST(MODEST_GSTUFF_LIBS)
86
87
88 #
89 # check for MCE
90 #
91 if test "x$have_mce" == "xtrue"; then
92    mce="mce"    
93    AC_DEFINE_UNQUOTED(MODEST_HAVE_MCE, 1, ["Whether mce is used."])
94    AC_SUBST(MODEST_MCE_CFLAGS)
95    AC_SUBST(MODEST_MCE_LIBS)
96 fi
97
98
99 # warnings are errors, but don't check format errors, because
100 # it breaks with logical ids
101 CFLAGS="$CFLAGS -Wno-format-extra-args -Werror"
102
103 serviceentrydir=`$PKG_CONFIG dbus-glib-1 --variable=prefix`/share/dbus-1/services
104
105 dbus_api="dbus_api"
106 AC_SUBST(dbus_api)
107
108 # Define as variables in Makefiles
109 AC_SUBST(serviceentrydir)
110
111
112 AC_OUTPUT([
113 Makefile
114 src/Makefile
115 src/libmodest-dbus-client-1.0.pc
116 ])
117
118
119 echo
120 echo "modest configure results"
121 echo "-----------------------------------"
122 echo "Prefix           : ${prefix}"
123 echo "MCE              : $have_mce"
124 echo "CFLAGS           : $CFLAGS"
125 echo "Debug version    : $with_debug"