~allanlesage/evolution-indicator/TDD

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
AC_PREREQ(2.53)
AC_INIT(evolution-indicator, 0.2.20, [])
AM_INIT_AUTOMAKE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR(src/evolution-indicator.c)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_PROG_LIBTOOL

PKG_PROG_PKG_CONFIG

AC_ARG_ENABLE([deprecations],
  [AS_HELP_STRING([--enable-deprecations],
    [allow deprecated API usage @<:@default=yes@:>@])],
     [],
     [enable_deprecations=yes])
AS_IF([test "x$enable_deprecations" = xno],
  [CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGTK_DISABLE_SINGLE_INCLUDES"])

dnl ******************************
dnl Install in correct location
dnl ******************************

with_localinstall="no"

PKG_CHECK_EXISTS(evolution-plugin-3.0,
	EVOLUTION_PLUGIN=evolution-plugin-3.0
	GTKHTML_EDITOR=gtkhtml-editor-4.0,
	PKG_CHECK_EXISTS(evolution-plugin,
		EVOLUTION_PLUGIN=evolution-plugin
		GTKHTML_EDITOR=gtkhtml-editor-3.14,
		AC_MSG_ERROR(You need evolution-plugin to compile evolution-indicator))
	)

AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install in the local build directory instead of the system one (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
if test "x$with_localinstall" = "xyes"; then
	EVO_PLUGIN_DIR="${libdir}/evolution/2.26/plugins"
else
	EVO_PLUGIN_DIR=`pkg-config --variable=plugindir $EVOLUTION_PLUGIN `
fi
AC_SUBST(EVO_PLUGIN_DIR)

dnl ******************************
dnl gcov coverage reporting
dnl ******************************

m4_include([m4/gcov.m4])
AC_TDD_GCOV
AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes])
AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes])
AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes])
AC_SUBST(COVERAGE_CFLAGS)
AC_SUBST(COVERAGE_CXXFLAGS)
AC_SUBST(COVERAGE_LDFLAGS)

dnl ******************************
dnl i18n
dnl ******************************

GETTEXT_PACKAGE=evolution-indicator
AC_SUBST(GETTEXT_PACKAGE)
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name])
ALL_LINGUAS="`cat "$srcdir/po/LINGUAS" | grep -v '^#'`"

IT_PROG_INTLTOOL([0.34])

AM_GLIB_GNU_GETTEXT

dnl GConf
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2

dnl We be tough with our -Werror
if test "x$GCC" = "xyes"; then
        GCC_FLAGS="-g -Wall -Werror"
fi
AC_SUBST(GCC_FLAGS)

PKG_CHECK_MODULES(DEPS,
                  indicate-0.7 >= 0.6.90
                  $EVOLUTION_PLUGIN
                  dbus-1
                  dbus-glib-1
                  libnotify
                  libcanberra
                  $GTKHTML_EDITOR
                  unity
                  libebackend-1.2
                  libsoup-2.4
                  gconf-2.0
                  )
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_LIBS)

EVO_I18N_DOMAIN=`pkg-config --modversion $EVOLUTION_PLUGIN | sed -e 's/\(.*\)\..\+$/\1/'`
AC_DEFINE_UNQUOTED(EVO_I18N_DOMAIN,
                   "evolution-$EVO_I18N_DOMAIN",
                   [Define to the translation domain for Evolution])

AC_OUTPUT([
Makefile
data/Makefile
src/Makefile
po/Makefile.in
])