~ubuntu-branches/ubuntu/precise/telepathy-mission-control-5/precise

« back to all changes in this revision

Viewing changes to configure.ac

Tags: upstream-5.5.0
ImportĀ upstreamĀ versionĀ 5.5.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl Set the version number to e.g. 5.0.beta42 immediately before a release.
2
2
dnl Set the version number to e.g. 5.0.beta42+ immediately after (this will
3
3
dnl enable -Werror).
4
 
AC_INIT([telepathy-mission-control], [5.4.0])
 
4
AC_INIT([telepathy-mission-control], [5.5.0])
5
5
 
6
6
AC_CONFIG_MACRO_DIR([m4])
7
7
AC_CONFIG_SRCDIR(Makefile.am)
8
8
AM_INIT_AUTOMAKE([1.9 tar-ustar -Wno-portability])
 
9
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
9
10
AM_CONFIG_HEADER(config.h)
10
11
 
11
12
AC_CANONICAL_HOST
30
31
    ;;
31
32
esac
32
33
 
 
34
# If API has been removed or changed since last release, change MCP_API (which
 
35
# is part of the directory name under /usr/include) to the version that
 
36
# changed it
 
37
MCP_API_VERSION=5.5
 
38
AC_SUBST([MCP_API_VERSION])
 
39
 
 
40
# If ABI has been removed or changed since last release
 
41
#     increment current
 
42
#     set age and revision to 0
 
43
# else if ABI has been added since last release
 
44
#     increment age and current
 
45
#     set revision to 0
 
46
# else if library source has changed since last release
 
47
#     increment revision
 
48
MCP_LT_CURRENT=0
 
49
MCP_LT_REVISION=0
 
50
MCP_LT_AGE=0
 
51
AC_SUBST([MCP_LT_CURRENT])
 
52
AC_SUBST([MCP_LT_REVISION])
 
53
AC_SUBST([MCP_LT_AGE])
 
54
# The ABI version appears in the name of the plugin directory
 
55
MCP_ABI_VERSION=`expr ${MCP_LT_CURRENT} - ${MCP_LT_AGE}`
 
56
AC_SUBST([MCP_ABI_VERSION])
 
57
 
33
58
# Recommended CFLAGS for pedantic checking, from telepathy-glib
34
59
 
35
60
TP_COMPILER_WARNINGS([ERROR_CFLAGS],
51
76
   unused-parameter])
52
77
AC_SUBST([ERROR_CFLAGS])
53
78
 
54
 
AM_CFLAGS="$CFLAGS -fno-strict-aliasing -ansi -DDMALLOC $ERROR_CFLAGS"
55
 
AC_SUBST([AM_CFLAGS])
56
 
 
57
 
define([EXPAND_VARIABLE],
58
 
[$2=[$]$1
59
 
while true; do
60
 
    case "[$]$2" in
61
 
    *\[$]* ) eval "$2=[$]$2" ;;
62
 
    *) break ;;
63
 
    esac
64
 
done])
65
 
 
66
 
EXPAND_VARIABLE(datadir,datadir_expanded)
67
 
 
68
79
XSLTPROC=
69
80
AC_CHECK_PROGS([XSLTPROC], [xsltproc])
70
81
if test -z "$XSLTPROC"; then
155
166
AC_SUBST(CHANDLERS_DIR)
156
167
AC_DEFINE_UNQUOTED(CHANDLERS_DIR,"$CHANDLERS_DIR", [Directory for channel handlers])
157
168
 
158
 
test_enabled="yes"
159
 
AC_MSG_CHECKING(whether to build tests)
160
 
AC_ARG_ENABLE(tests,
161
 
        [  --disable-tests           don't build tests. default: enable them],
162
 
        [
163
 
                AC_MSG_RESULT(${enableval})
164
 
                test_enabled="${enableval}"
165
 
        ],
166
 
        [
167
 
                AC_MSG_RESULT([yes (default)])
168
 
                test_enabled="yes"
169
 
        ]
170
 
)
171
 
AM_CONDITIONAL(HAVE_TESTS, [test x$test_enabled = xyes])
172
 
 
173
 
examples_enabled="yes"
174
 
AC_MSG_CHECKING(whether to build examples)
175
 
AC_ARG_ENABLE(examples,
176
 
        [  --disable-examples        don't build examples. default: build them],
177
 
        [
178
 
                AC_MSG_RESULT(${enableval})
179
 
                examples_enabled="${enableval}"
180
 
        ],
181
 
        [
182
 
                AC_MSG_RESULT([yes (default)])
183
 
                examples_enabled="yes"
184
 
        ]
185
 
)
186
 
AM_CONDITIONAL(HAVE_EXAMPLES, [test x$examples_enabled = xyes])
187
 
 
188
169
server_enabled="yes"
189
170
AC_MSG_CHECKING(whether to build the daemon)
190
171
AC_ARG_ENABLE(server,
230
211
)
231
212
AM_CONDITIONAL(ENABLE_MC_SERVER_SO6, [test "x$ENABLE_MC_SERVER_SO6" = xyes])
232
213
 
233
 
plugins_enabled="no"
234
214
AC_MSG_CHECKING(whether to support plugins)
235
 
AC_ARG_ENABLE(plugins,
236
 
        [  --enable-plugins          support plugins. default=no],
 
215
AC_ARG_ENABLE(mcd-plugins,
 
216
        [  --enable-mcd-plugins       support plugins that use internal APIs. default=no],
237
217
        [
238
218
                AC_MSG_RESULT(${enableval})
239
 
                plugins_enabled="${enableval}"
 
219
                mcd_plugins_enabled="${enableval}"
240
220
        ],
241
221
        [
242
222
                AC_MSG_RESULT(no)
243
 
                plugins_enabled="no"
 
223
                mcd_plugins_enabled="no"
244
224
        ]
245
225
)
246
 
AM_CONDITIONAL(ENABLE_PLUGINS, [test x$plugins_enabled = xyes])
247
 
if test "x$plugins_enabled" = xyes
 
226
AM_CONDITIONAL(ENABLE_MCD_PLUGINS, [test x$mcd_plugins_enabled = xyes])
 
227
if test "x$mcd_plugins_enabled" = xyes
248
228
then
249
 
  AC_DEFINE([ENABLE_PLUGINS], [1], [Define if plugins should be enabled])
 
229
  AC_DEFINE([ENABLE_MCD_PLUGINS], [1], [Define if MCD plugins should be enabled])
250
230
fi
251
231
 
252
232
keyring_enabled="no"
283
263
  AC_DEFINE([ENABLE_GNOME_KEYRING], [0], [Define whether gnome-keyring support is enabled])
284
264
fi
285
265
 
286
 
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.51, dbus-glib-1 >= 0.51], have_dbus=yes, have_dbus=no)
 
266
dnl libaccounts-glib SSO
 
267
libaccounts_sso_enabled="no"
 
268
AC_MSG_CHECKING(whether to build with libaccounts-glib SSO suport)
 
269
 
 
270
AC_ARG_ENABLE([libaccounts-sso],
 
271
              AC_HELP_STRING([--enable-libaccounts-sso],
 
272
                             [build with SSO suport. default=no]),
 
273
              [ AC_MSG_RESULT(${enableval})
 
274
                libaccounts_sso_enabled="${enableval}" ],
 
275
              [ AC_MSG_RESULT(no) ] )
 
276
 
 
277
AS_IF([ test "x$libaccounts_sso_enabled" = xauto ],
 
278
      [ PKG_CHECK_EXISTS([libaccounts-glib],
 
279
                         [libaccounts_sso_enabled=yes],
 
280
                         [libaccounts_sso_enabled=no]) ])
 
281
 
 
282
dnl set up the shell/make variable, the #define and check the package version
 
283
AS_IF([ test "x$libaccounts_sso_enabled" = xyes ],
 
284
      [ ENABLE_LIBACCOUNTS_SSO=yes
 
285
        AC_DEFINE(ENABLE_LIBACCOUNTS_SSO, [1],
 
286
                  [Define if libaccounts SSO support is required])
 
287
        PKG_CHECK_MODULES([LIBACCOUNTS_SSO], [libaccounts-glib >= 0.26]) ],
 
288
      [ AC_DEFINE(ENABLE_LIBACCOUNTS_SSO, [0]) ])
 
289
 
 
290
dnl export the CFLAGS and LDFLAGS equivalents determined by PKG_CHECK_MODULES
 
291
AC_SUBST(LIBACCOUNTS_SSO_CFLAGS)
 
292
AC_SUBST(LIBACCOUNTS_SSO_LIBS)
 
293
 
 
294
dnl the automake conditional
 
295
AM_CONDITIONAL(ENABLE_LIBACCOUNTS_SSO, [test x$libaccounts_sso_enabled = xyes])
 
296
dnl /libaccounts-glib SSO
 
297
 
 
298
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.95, dbus-glib-1 >= 0.82])
287
299
AC_SUBST(DBUS_CFLAGS)
288
300
AC_SUBST(DBUS_LIBS)
289
301
 
290
 
PKG_CHECK_MODULES(TELEPATHY, telepathy-glib >= 0.7.37)
 
302
PKG_CHECK_MODULES([TELEPATHY], [telepathy-glib >= 0.11.6])
291
303
AC_SUBST(TELEPATHY_LIBS)
292
304
AC_SUBST(TELEPATHY_CFLAGS)
293
305
 
294
 
GCONF_REQUIRED_VERSION=2.0.0
295
 
PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED_VERSION,
296
 
                  [HAVE_GCONF=yes], [HAVE_GCONF=no])
297
 
AM_CONDITIONAL(HAVE_GCONF, [test x$HAVE_GCONF = xyes])
298
 
AC_SUBST(GCONF_CFLAGS)
299
 
AC_SUBST(GCONF_LIBS)
300
 
 
301
 
PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0)
 
306
PKG_CHECK_MODULES([GLIB],
 
307
        [glib-2.0 >= 2.24, gobject-2.0, gmodule-no-export-2.0])
302
308
AC_SUBST(GLIB_LIBS)
303
309
AC_SUBST(GLIB_CFLAGS)
304
310
 
305
 
if test "x$plugins_enabled" = xyes
306
 
then
307
 
  PKG_CHECK_MODULES(GMODULE, gmodule-no-export-2.0)
308
 
  AC_SUBST(GMODULE_LIBS)
309
 
  AC_SUBST(GMODULE_CFLAGS)
310
 
fi
311
 
 
312
311
dnl docs/Makefile.am needs to know whether it's an out of tree build
313
312
dnl (srcdir != builddir)
314
313
AM_CONDITIONAL([OUT_OF_TREE_BUILD], [test "z$ac_srcdir" != z.])
332
331
doc/reference/Makefile \
333
332
doc/reference/libmcclient/Makefile \
334
333
doc/reference/libmissioncontrol-server/Makefile \
 
334
doc/reference/mission-control-plugins/Makefile \
335
335
examples/Makefile \
336
336
libmcclient.pc \
337
337
libmcclient/Makefile \
338
338
m4/Makefile \
339
339
mission-control.pc \
 
340
mission-control-plugins.pc \
 
341
mission-control-plugins/Makefile \
340
342
server/Makefile \
341
343
src/Makefile \
342
344
test/Makefile \