1 # Copyright (c) 2006,2007 Nokia Corporation
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
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.
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.
29 AC_INIT([libmodestclient],[3.2.0],[http://maemo.org])
30 AC_CONFIG_HEADERS([config.h])
32 m4_define([modest_api_major_version], [1])
33 m4_define([modest_api_minor_version], [99])
34 m4_define([modest_api_micro_version], [2])
35 m4_define([modest_api_version], [modest_api_major_version.modest_api_minor_version.modest_api_micro_version])
38 AM_INIT_AUTOMAKE([dist-bzip2])
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)
49 if test x$prefix = xNONE; then
61 # Option to enable debugging
63 [AC_HELP_STRING([--enable-debug],[Debugging (default=no)])],
64 [with_debug=yes], [with_debug=no])
66 if test "x$with_debug" == "xyes" ; then
67 CFLAGS="$CFLAGS -ggdb -O0 -DDEBUG -Wall"
69 CFLAGS="$CFLAGS -O2 -Wall"
72 # Option to enable debugging
74 [AC_HELP_STRING([--enable-gcov],[Coverage reporting (default=no)])],
75 [with_gcov=yes], [with_gcov=no])
77 if test "x$with_gcov" == "xyes" ; then
78 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
79 LDFLAGS="$LDFLAGS -lgcov"
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)
91 if test "x$have_mce" == "xtrue"; then
93 AC_DEFINE_UNQUOTED(MODEST_HAVE_MCE, 1, ["Whether mce is used."])
94 AC_SUBST(MODEST_MCE_CFLAGS)
95 AC_SUBST(MODEST_MCE_LIBS)
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"
103 serviceentrydir=`$PKG_CONFIG dbus-glib-1 --variable=prefix`/share/dbus-1/services
108 # Define as variables in Makefiles
109 AC_SUBST(serviceentrydir)
115 src/libmodest-dbus-client-1.0.pc
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"