~ubuntu-branches/ubuntu/trusty/syncevolution/trusty-proposed

« back to all changes in this revision

Viewing changes to configure-pre.in

  • Committer: Bazaar Package Importer
  • Author(s): Tino Keitel
  • Date: 2011-07-20 16:02:02 UTC
  • mfrom: (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110720160202-e8uf7ogw4vh0q0f3
Tags: 1.1.99.5a-1
* New upstream version 1.1.99.5a, first release candiate for 1.2
* Added python-openssl dependency, the HTTP server needs it for HTTPS support
* Added versioned dependency on libsynthesis0 to get required features
* Fixed .orig.tar.gz generation in get-orig-source target
* Added myself to Uploaders:, thanks to David for sponsoring
* Use updated upstream tag for source package generation
* Removed 0001-Replace-with-in-call-to-PKG_CHECK_MODULES.patch, fixed upstream
* Renamed NEWS.Debian to NEWS so that it is actually used
* Updated NEWS for 1.1.99.5a

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#
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)
14
14
 
 
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
 
18
# disable it.
 
19
#
 
20
# SyncEvolution >= 1.1.99.5: release mode by default
 
21
define([STABLE_RELEASE], [yes])
 
22
 
 
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))
 
26
 
 
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])
 
38
fi
 
39
 
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'.
21
47
AM_CONFIG_HEADER(config.h)
22
48
AC_LIBTOOL_DLOPEN
23
49
 
 
50
dnl check for programs.
 
51
AC_PROG_CXX
 
52
AC_PROG_LIBTOOL
 
53
AC_PROG_MAKE_SET
 
54
 
24
55
dnl default device type (see AC_DEFINE below)
25
56
DEVICE_TYPE=workstation
26
57
 
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")
82
113
 
 
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"
 
119
                else
 
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)
 
124
 
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]),
109
151
AC_CHECK_HEADERS(signal.h dlfcn.h)
110
152
 
111
153
# cppunit needed?
112
 
if test $enable_unit_tests == "yes" || test $enable_integration_tests == yes; then
 
154
if test $enable_unit_tests = "yes" || test $enable_integration_tests = yes; then
113
155
        CPPUNIT_CXXFLAGS=`cppunit-config --cflags` || AC_MSG_ERROR("cppunit-config --cflags failed - is it installed?")
114
156
        CPPUNIT_LDFLAGS=`cppunit-config --libs` || AC_MSG_ERROR("cppunit-config --libs failed - is it installed?")
115
157
fi
122
164
if test "$enable_integration_tests" = "yes"; then
123
165
        AC_DEFINE(ENABLE_INTEGRATION_TESTS, 1, [enable integration tests inside the final library])
124
166
fi
 
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])
 
173
        fi
 
174
fi
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"])
127
178
 
128
 
if test $enable_static_cxx == "yes"; then
 
179
if test $enable_static_cxx = "yes"; then
129
180
        LIBS="$LIBS -L."
130
181
        CORE_LDADD_DEP=libstdc++.a
131
182
fi
251
302
   #
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) =
257
309
                           sdp_extract_pdu;
260
312
                          int scanned;
261
313
                          sdp_extract_pdu(pdata, 100, &scanned);
262
314
                      }
263
 
                     ],
 
315
                     ])],
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;
271
324
                                            int scanned;        
272
325
                                            sdp_extract_pdu_safe(pdata, 100, &scanned);
273
326
                                        }
274
 
                                       ],
 
327
                                       ])],
275
328
                                       AC_DEFINE(HAVE_BLUEZ_SAFE, 1, [libbluetooth has _safe variants])))
276
329
   CFLAGS="$CFLAGS_old"
277
330
 
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"
361
414
               else
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])
379
432
    fi
380
433
fi
381
434
 
382
 
if test $enable_dbus_service == "yes"; then
 
435
 
 
436
## Begin KWallet ##############################
 
437
 
 
438
AC_CHECK_PROGS([QMAKE], [qmake qmake-qt4])
 
439
 
 
440
if test "$QMAKE"; then
 
441
   KDEKWALLETFOUND=yes
 
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`"
 
444
   fi
 
445
   if ! test "$KDE_KWALLET_LIBS"; then
 
446
      KDE_KWALLET_LIBS="-lkdeui -lkdecore `pkg-config --libs QtDBus`"
 
447
   fi
 
448
   AC_LANG_PUSH(C++)
 
449
   old_CPPFLAGS="$CPPFLAGS"
 
450
   CPPFLAGS="$CPPFLAGS $KDE_KWALLET_CFLAGS"
 
451
   AC_CHECK_HEADERS(kwallet.h, [], [KDEKWALLETFOUND=no])
 
452
   CPPFLAGS="$old_CPPFLAGS"
 
453
   AC_LANG_POP(C++)
 
454
else
 
455
   KDEKWALLETFOUND=no
 
456
fi
 
457
 
 
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"])
 
467
 
 
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.
 
474
else
 
475
    # avoid unneeded dependencies on KWallet
 
476
    KDE_KWALLET_CFLAGS=
 
477
    KDE_KWALLET_LIBS=
 
478
fi
 
479
AC_SUBST(KDE_KWALLET_LIBS)
 
480
AC_SUBST(KDE_KWALLET_CFLAGS)
 
481
 
 
482
# conditional compilation in make
 
483
AM_CONDITIONAL([USE_KDE_KWALLET], [test "$use_kde_kwallet" = "yes"])
 
484
 
 
485
## End KWallet ################################
 
486
 
 
487
 
 
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])
385
491
    fi
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])
404
510
    fi
 
511
 
 
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)
 
515
    AC_ARG_ENABLE(mlite,
 
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])
 
523
    else
 
524
        # don't use mlite, even if found
 
525
        MLITE_CFLAGS=
 
526
        MLITE_LIBS=
 
527
    fi
405
528
    AC_DEFINE(DBUS_SERVICE, 1, [define if dbus service is enabled])
406
529
fi
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)
416
543
 
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])
420
547
 
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)
442
569
 
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])
446
573
    fi
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"
449
576
 
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])
455
582
        fi
456
583
    fi
458
585
    PKG_CHECK_MODULES(UNIQUE, unique-1.0,
459
586
                      have_unique="yes",
460
587
                      have_unique="no")
461
 
    if test $have_unique == "yes"; then
 
588
    if test $have_unique = "yes"; then
462
589
        gui_modules="$gui_modules unique-1.0" 
463
590
        AC_DEFINE(ENABLE_UNIQUE, 1, [enable single-app-instance functionality])
464
591
    fi
466
593
    PKG_CHECK_MODULES(GTK_2_18, gtk+-2.0 >= 2.18,
467
594
                      have_gtk_2_18="yes",
468
595
                      have_gtk_2_18="no")
469
 
    if test $have_gtk_2_18 == "yes"; then
 
596
    if test $have_gtk_2_18 = "yes"; then
470
597
        AC_DEFINE(GTK_2_18, 1, [we have GTK+ 2.18 or better])
471
598
    fi
472
599
 
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")
505
632
             fi
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"])
509
636
 
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")
519
646
             fi
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"])
523
650
 
586
713
    esac
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"
592
718
else
593
719
    # link against SDK alone, except in client-test
595
721
    #SYNTHESIS_ENGINE="`echo $SYNTHESIS_LIBS | sed -e 's/-lsynthesisstubs/-lsynthesis/'`"
596
722
 
597
723
    # can't use the SDK alone because of sysync::SySyncDebugPuts()
598
 
    PKG_CHECK_MODULES(SYNTHESIS, "synthesis")
 
724
    PKG_CHECK_MODULES([SYNTHESIS], [synthesis >= 3.4])
599
725
    SYNTHESIS_ENGINE="$SYNTHESIS_LIBS"
600
726
fi
601
727