File: configure.ac

package info (click to toggle)
modest 3.90.4-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,400 kB
  • ctags: 8,562
  • sloc: ansic: 88,775; makefile: 959; xml: 122; sh: 57
file content (125 lines) | stat: -rw-r--r-- 3,960 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Copyright (c) 2006,2007 Nokia Corporation
# All rights reserved.
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 
# * Redistributions of source code must retain the above copyright
#   notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
#   notice, this list of conditions and the following disclaimer in the
#   documentation and/or other materials provided with the distribution.
# * Neither the name of the Nokia Corporation nor the names of its
#   contributors may be used to endorse or promote products derived from
#   this software without specific prior written permission.
# 
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

AC_INIT([libmodestclient],[3.2.1],[http://maemo.org])
AC_CONFIG_HEADERS([config.h])

m4_define([modest_api_major_version], [1])
m4_define([modest_api_minor_version], [99])
m4_define([modest_api_micro_version], [3])
m4_define([modest_api_version], [modest_api_major_version.modest_api_minor_version.modest_api_micro_version])


AM_INIT_AUTOMAKE([dist-bzip2])

MODEST_API_MAJOR_VERSION=modest_api_major_version
MODEST_API_MINOR_VERSION=modest_api_minor_version
MODEST_API_MICRO_VERSION=modest_api_micro_version
MODEST_API_VERSION=modest_api_version
AC_SUBST(MODEST_API_MAJOR_VERSION)
AC_SUBST(MODEST_API_MINOR_VERSION)
AC_SUBST(MODEST_API_MICRO_VERSION)
AC_SUBST(MODEST_API_VERSION)

if test x$prefix = xNONE; then
   prefix=/usr/local
fi
AC_SUBST(prefix)

AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_PROG_LIBTOOL


# Option to enable debugging
AC_ARG_ENABLE(debug,
              [AC_HELP_STRING([--enable-debug],[Debugging (default=no)])],
              [with_debug=yes], [with_debug=no])

if test "x$with_debug" == "xyes" ; then
        CFLAGS="$CFLAGS -ggdb -O0 -DDEBUG -Wall"
else
        CFLAGS="$CFLAGS -O2 -Wall"
fi

# Option to enable debugging
AC_ARG_ENABLE(gcov,
              [AC_HELP_STRING([--enable-gcov],[Coverage reporting (default=no)])],
              [with_gcov=yes], [with_gcov=no])

if test "x$with_gcov" == "xyes" ; then
        CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
	LDFLAGS="$LDFLAGS -lgcov"
fi


PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 libosso dbus-1 dbus-glib-1) 
AC_SUBST(MODEST_GSTUFF_CFLAGS)
AC_SUBST(MODEST_GSTUFF_LIBS)


#
# check for MCE
#
if test "x$have_mce" == "xtrue"; then
   mce="mce"	
   AC_DEFINE_UNQUOTED(MODEST_HAVE_MCE, 1, ["Whether mce is used."])
   AC_SUBST(MODEST_MCE_CFLAGS)
   AC_SUBST(MODEST_MCE_LIBS)
fi


# warnings are errors, but don't check format errors, because
# it breaks with logical ids
CFLAGS="$CFLAGS -Wno-format-extra-args -Werror"

serviceentrydir=`$PKG_CONFIG dbus-glib-1 --variable=prefix`/share/dbus-1/services

dbus_api="dbus_api"
AC_SUBST(dbus_api)

# Define as variables in Makefiles
AC_SUBST(serviceentrydir)


AC_OUTPUT([
Makefile
src/Makefile
src/libmodest-dbus-client-1.0.pc
])


echo
echo "modest configure results"
echo "-----------------------------------"
echo "Prefix           : ${prefix}"
echo "MCE              : $have_mce"
echo "CFLAGS           : $CFLAGS"
echo "Debug version    : $with_debug"