9
9
# Starting with the 1.1 release cycle, the rpm-style
10
10
# .99 pseudo-version number is used to mark a pre-release.
11
AC_INIT([syncevolution], [1.1])
11
AC_INIT([syncevolution], [1.1.99.5a])
12
12
# STABLE_VERSION=1.0.1+
13
13
AC_SUBST(STABLE_VERSION)
15
# Default value for --enable/disable-release-mode.
16
# Determined by gen-autotools.sh based on versioning.
17
# Official, stable releases enable it, pre-releases
20
# SyncEvolution >= 1.1.99.5: release mode by default
21
define([STABLE_RELEASE], [yes])
23
# Line above is patched by gen-autotools.sh. Handle
24
# both "yes" and "no".
25
define([STABLE_RELEASE_HELP], ifelse(STABLE_RELEASE,yes,--disable-release-mode,--enable-release-mode))
27
AC_ARG_ENABLE(release-mode,
28
AS_HELP_STRING([STABLE_RELEASE_HELP],
29
[Controls whether resulting binary is for end-users or
30
testers/developers. For example, stable releases automatically
31
migrate on-disk files without asking, whereas other releases
32
ask before making downgrades impossible (or difficult).
33
Default in this source code is
34
"stable release: STABLE_RELEASE"]),
35
enable_release_mode="$enableval", enable_release_mode="STABLE_RELEASE")
36
if test "$enable_release_mode" = "yes"; then
37
AC_DEFINE(SYNCEVOLUTION_STABLE_RELEASE, 1, [binary is meant for end-users])
15
40
AM_INIT_AUTOMAKE([tar-ustar])
41
AM_MAINTAINER_MODE([enable]) # needed for nightly builds where reconfiguration fails under certain chroots
16
42
AC_CONFIG_MACRO_DIR([m4])
17
43
define([SYNTHESISSRC_REPO], [])
18
44
dnl Specify git revisions/branches without prefix, i.e., without 'origin'.
80
111
[enables tests outside of the library (can be used together with normal builds of the library)]),
81
112
enable_integration_tests="$enableval", enable_integration_tests="no")
114
AC_ARG_ENABLE(buteo-tests,
115
AS_HELP_STRING([--enable-buteo-tests],
116
[enables tests for Buteo sync framework. Not enabled when neither '--enable-unit-tests' nor '--enable-integration-tests' is specified]),
117
[ if test "$enable_unit_tests" = "yes" || test "$enable_integration_tests" = "yes" ; then
118
enable_buteo_tests="$enableval"
120
enable_buteo_tests="no"
121
fi], enable_buteo_tests="no")
122
PKG_CHECK_MODULES(BUTEOSYNCPROFILE, [syncprofile], HAVE_SYNCPROFILE=yes, HAVE_SYNCPROFILE=no)
123
PKG_CHECK_MODULES(BUTEOSYNCCOMMON, [synccommon], HAVE_SYNCCOMMON=yes, HAVE_SYNCCOMMON=no)
83
125
AC_ARG_ENABLE(static-cxx,
84
126
AS_HELP_STRING([--enable-static-cxx],
85
127
[build executables which contain libstdc++ instead of requiring suitable libstdc++.so to run]),
122
164
if test "$enable_integration_tests" = "yes"; then
123
165
AC_DEFINE(ENABLE_INTEGRATION_TESTS, 1, [enable integration tests inside the final library])
167
if test "$enable_buteo_tests" = "yes"; then
168
AC_DEFINE(ENABLE_BUTEO_TESTS, 1, [enable buteo tests])
169
need_qt_modules="$need_qt_modules dbus xml"
170
AC_PATH_PROG(SQLITE3, sqlite3)
171
if test -z "$SQLITE3"; then
172
AC_ERROR([sqlite3 not found, is required for buteo testing])
125
175
AM_CONDITIONAL([ENABLE_UNIT_TESTS], [test "$enable_unit_tests" = "yes"])
126
176
AM_CONDITIONAL([ENABLE_TESTING], [test "$enable_unit_tests" = "yes" || test "$enable_integration_tests" = "yes" ])
177
AM_CONDITIONAL([ENABLE_BUTEO_TESTS], [test "$enable_buteo_tests" = "yes"])
128
if test $enable_static_cxx == "yes"; then
179
if test $enable_static_cxx = "yes"; then
130
181
CORE_LDADD_DEP=libstdc++.a
252
303
# The source code checks the signature both by via pointer assignment and calling
253
304
# it (better safe than sorry). One these should fail if the signature is not right.
254
AC_COMPILE_IFELSE([#include <bluetooth/sdp.h>
305
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
306
#include <bluetooth/sdp.h>
255
307
#include <bluetooth/sdp_lib.h>
256
308
sdp_record_t *(*extract_pdu)(const uint8_t *pdata, int bufsize, int *scanned) =
261
313
sdp_extract_pdu(pdata, 100, &scanned);
264
316
AC_DEFINE(HAVE_BLUEZ_BUFSIZE, 1, [base libbluetooth functions accept bufsize parameter]),
265
AC_COMPILE_IFELSE([#include <bluetooth/sdp.h>
317
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
318
#include <bluetooth/sdp.h>
266
319
#include <bluetooth/sdp_lib.h>
267
320
sdp_record_t *(*extract_pdu)(const uint8_t *pdata, int bufsize, int *scanned) =
268
321
sdp_extract_pdu_safe;
356
409
[enables building the dbus service executable and all related features
357
410
(the DBus wrapper library, command line usage of server, etc).]),
358
411
enable_dbus_service="$enableval",
359
[if test $enable_gui == "no"; then
412
[if test $enable_gui = "no"; then
360
413
enable_dbus_service="no"
362
415
enable_dbus_service="yes"
371
424
test "$enable_gnome_keyring" = "yes" || test "$enable_gnome_keyring" = "no" || AC_ERROR([invalid value for --enable-gnome-keyring: $enable_gnome_keyring])
372
425
test "$enable_gnome_keyring" = "no" || test "$HAVE_KEYRING" = "yes" || AC_ERROR([gnome-keyring-1 pkg not found, needed for --enable-gnome-keyring])],
373
426
enable_gnome_keyring="$HAVE_KEYRING")
374
if test $enable_gnome_keyring == "yes"; then
427
if test $enable_gnome_keyring = "yes"; then
375
428
AC_DEFINE(USE_GNOME_KEYRING, 1, [define if gnome keyring should be used in dbus service])
376
429
PKG_CHECK_MODULES([KEYRING_2_20], [gnome-keyring-1 >= 2.20 ], KEYRING220=yes, KEYRING220=no)
377
if test $KEYRING220 == "yes"; then
430
if test $KEYRING220 = "yes"; then
378
431
AC_DEFINE(GNOME_KEYRING_220, 1, [define if gnome keyring version is above 2.20])
382
if test $enable_dbus_service == "yes"; then
436
## Begin KWallet ##############################
438
AC_CHECK_PROGS([QMAKE], [qmake qmake-qt4])
440
if test "$QMAKE"; then
442
if ! test "$KDE_KWALLET_CFLAGS"; then
443
KDE_KWALLET_CFLAGS="-I`kde4-config --path include` -I`kde4-config --path include`/KDE -I`$QMAKE -query QT_INSTALL_HEADERS`"
445
if ! test "$KDE_KWALLET_LIBS"; then
446
KDE_KWALLET_LIBS="-lkdeui -lkdecore `pkg-config --libs QtDBus`"
449
old_CPPFLAGS="$CPPFLAGS"
450
CPPFLAGS="$CPPFLAGS $KDE_KWALLET_CFLAGS"
451
AC_CHECK_HEADERS(kwallet.h, [], [KDEKWALLETFOUND=no])
452
CPPFLAGS="$old_CPPFLAGS"
458
# In contrast to the GNOME KEYRING, the KWallet is
459
# currently considered optional. "configure" will never enable
460
# by default, because that is a change that might not be
461
# expected by traditional users.
462
AC_ARG_ENABLE(kwallet,
463
AS_HELP_STRING([--enable-kwallet], [enable access to KWallet]),
464
[use_kde_kwallet="$enableval"
465
test $KDEKWALLETFOUND = "yes" || test "$use_kde_kwallet" = "no" || AC_MSG_ERROR([kwallet.pc not found. Install it to compile with the KWallet enabled.])],
466
[use_kde_kwallet="no"])
468
if test "$use_kde_kwallet" = "yes"; then
469
# conditional compilation in preprocessor
470
AC_DEFINE(USE_KDE_KWALLET, 1, [KWallet available])
471
# TODO: KWallet needs Qt. Enable the Qt check in
472
# configure-post.in, otherwise it fails to compiler
473
# when none of the backends ask for Qt.
475
# avoid unneeded dependencies on KWallet
479
AC_SUBST(KDE_KWALLET_LIBS)
480
AC_SUBST(KDE_KWALLET_CFLAGS)
482
# conditional compilation in make
483
AM_CONDITIONAL([USE_KDE_KWALLET], [test "$use_kde_kwallet" = "yes"])
485
## End KWallet ################################
488
if test $enable_dbus_service = "yes"; then
383
489
if test -z "$XSLT"; then
384
490
AC_ERROR([xsltproc not found, is required for D-Bus service])
396
502
PKG_CHECK_MODULES(LIBNOTIFY, [libnotify gtk+-2.0], HAVE_LIBNOTIFY=yes, HAVE_LIBNOTIFY=no)
397
503
AC_ARG_ENABLE(notify,
398
504
AS_HELP_STRING([--enable-notify],
399
[send notifications for automatic sync events]),
505
[send notifications for automatic sync events, using libnotify]),
400
506
[ test "$enableval" = "no" || test $HAVE_LIBNOTIFY = "yes" || AC_ERROR([required libnotify package not found]) ],
401
[ test $HAVE_LIBNOTIFY = "yes" || AC_ERROR([required libnotify package not found, use --disable-notify to compile without notifications]) ])
402
if test $HAVE_LIBNOTIFY == "yes"; then
507
[ test $HAVE_LIBNOTIFY = "yes" || AC_ERROR([required libnotify package not found, use --disable-notify to compile without libnotify based notifications]) ])
508
if test $HAVE_LIBNOTIFY = "yes"; then
403
509
AC_DEFINE(HAS_NOTIFY, 1, [define if libnotify could be used in dbus service])
512
# Here we're using QtGui too because mlite fails to depend on it,
513
# despite using QAction.
514
PKG_CHECK_MODULES(MLITE, [mlite QtGui], HAVE_MLITE=yes, HAVE_MLITE=no)
516
AS_HELP_STRING([--enable-mlite],
517
[send notifications for automatic sync events, using mlite (off by default)]),
518
[ enable_mlite="$enableval"
519
test "$enableval" = "no" || test $HAVE_MLITE = "yes" || AC_ERROR([required mlite package not found]) ],
520
[ enable_mlite="no" ])
521
if test $enable_mlite = "yes"; then
522
AC_DEFINE(HAS_MLITE, 1, [define if mlite could be used in dbus service])
524
# don't use mlite, even if found
405
528
AC_DEFINE(DBUS_SERVICE, 1, [define if dbus service is enabled])
407
530
AC_SUBST(DBUS_CFLAGS)
413
536
AC_SUBST(LIBNOTIFY_CFLAGS)
414
537
AC_SUBST(LIBNOTIFY_LIBS)
415
538
AC_SUBST(LIBEXECDIR)
539
AC_SUBST(BUTEOSYNCPROFILE_LIBS)
540
AC_SUBST(BUTEOSYNCPROFILE_CFLAGS)
541
AC_SUBST(BUTEOSYNCCOMMON_LIBS)
542
AC_SUBST(BUTEOSYNCCOMMON_CFLAGS)
417
544
DBUS_SERVICES_DIR="${datadir}/dbus-1/services"
418
545
AC_SUBST(DBUS_SERVICES_DIR)
419
546
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Location of D-Bus services directory])
421
if test $enable_gui != "no" || test $enable_dbus_service == "yes"; then
548
if test $enable_gui != "no" || test $enable_dbus_service = "yes"; then
422
549
IT_PROG_INTLTOOL([0.37.1])
423
550
GETTEXT_PACKAGE=syncevolution
424
551
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package name])
441
568
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
443
570
gui_modules="glib-2.0 dbus-glib-1 >= 0.60 gtk+-2.0 libglade-2.0 gio-2.0"
444
if test $enable_gui == "moblin"; then
571
if test $enable_gui = "moblin"; then
445
572
AC_DEFINE(USE_MOBLIN_UX, 1, [Use Moblin UI widgets])
447
if test $enable_gui == "moblin" -o $enable_gui == "all"; then
574
if test $enable_gui = "moblin" -o $enable_gui = "all"; then
448
575
gui_modules="$guimodules mx-gtk-1.0"
450
577
PKG_CHECK_MODULES(MX_GTK_0_99_1, mx-gtk-1.0 >= 0.99.1,
451
578
have_mx_gtk_0_99_1="yes",
452
579
have_mx_gtk_0_99_1="no")
453
if test $have_mx_gtk_0_99_1 == "yes"; then
580
if test $have_mx_gtk_0_99_1 = "yes"; then
454
581
AC_DEFINE(MX_GTK_0_99_1, 1, [we have Mx-Gtk 0.99.1 or better])
500
627
An explicit --without-rst2man or not having it installed turn off
501
628
building of man pages.]),
502
629
[RST2MAN=$withval
503
if test "$RST2MAN" == "yes"; then
630
if test "$RST2MAN" = "yes"; then
504
631
AC_PATH_PROG(RST2MAN, rst2man, "no")
506
test "$RST2MAN" == "no" || test -x "$RST2MAN" || AC_ERROR([--with-rst2man=$RST2MAN: tool not found])],
633
test "$RST2MAN" = "no" || test -x "$RST2MAN" || AC_ERROR([--with-rst2man=$RST2MAN: tool not found])],
507
634
[AC_PATH_PROG(RST2MAN, rst2man, "no")])
508
635
AM_CONDITIONAL([COND_MAN_PAGES], [test "$RST2MAN" != "no"])
514
641
An explicit --without-rst2html or not having it installed turn off
515
642
building of README in HTML format.]),
516
643
[RST2HTML=$withval
517
if test "$RST2HTML" == "yes"; then
644
if test "$RST2HTML" = "yes"; then
518
645
AC_PATH_PROG(RST2HTML, rst2html, "no")
520
test "$RST2HTML" == "no" || test -x "$RST2HTML" || AC_ERROR([--with-rst2html=$RST2HTML: tool not found])],
647
test "$RST2HTML" = "no" || test -x "$RST2HTML" || AC_ERROR([--with-rst2html=$RST2HTML: tool not found])],
521
648
[AC_PATH_PROG(RST2HTML, rst2html, "no")])
522
649
AM_CONDITIONAL([COND_HTML_README], [test "$RST2HTML" != "no"])
587
714
elif test "$enable_shared" = "no"; then
588
715
# link against engine
589
PKG_CHECK_MODULES(SYNTHESIS, "synthesis")
590
SYNTHESIS_LIBS="$SYNTHESIS_LIBS -lsmltk"
716
PKG_CHECK_MODULES([SYNTHESIS], [synthesis >= 3.4])
591
717
SYNTHESIS_ENGINE="$SYNTHESIS_LIBS -lsynthesis"
593
719
# link against SDK alone, except in client-test