configure.ac 78 KB
Newer Older
1 2 3 4
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# This file is part of Tracker.

5
AC_PREREQ([2.64])
6 7 8 9 10 11 12 13 14

# Making releases:
#   TRACKER_MICRO_VERSION += 1;
#   TRACKER_INTERFACE_AGE += 1;
#   TRACKER_BINARY_AGE += 1;
# if any functions have been added, set TRACKER_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set TRACKER_BINARY_AGE and TRACKER_INTERFACE_AGE to 0.
m4_define([tracker_major_version], [0])
Martyn Russell's avatar
Martyn Russell committed
15
m4_define([tracker_minor_version], [10])
Martyn Russell's avatar
Martyn Russell committed
16
m4_define([tracker_micro_version], [35])
Martyn Russell's avatar
Martyn Russell committed
17
m4_define([tracker_interface_age], [0])
18 19 20 21 22
m4_define([tracker_binary_age],
          [m4_eval(100 * tracker_minor_version + tracker_micro_version)])
m4_define([tracker_version],
          [tracker_major_version.tracker_minor_version.tracker_micro_version])
# This is the X.Y used in -llibtracker-FOO-X.Y
23
m4_define([tracker_api_version], [0.10])
24

25 26 27 28 29 30 31 32 33
# libtool version related macros
m4_define([tracker_lt_release], [tracker_major_version.tracker_minor_version])
m4_define([tracker_lt_current],
          [m4_eval(100 * tracker_minor_version + tracker_micro_version - tracker_interface_age)])
m4_define([tracker_lt_revision], [tracker_interface_age])
m4_define([tracker_lt_age], [m4_eval(tracker_binary_age - tracker_interface_age)])
m4_define([tracker_lt_current_minus_age],
          [m4_eval(tracker_lt_current - tracker_lt_age)])

34 35 36 37 38 39 40
# Define a string for the earliest version that this release has
# backwards binary compatibility with for all interfaces a module
# might. Unless we add module-only API with lower stability
# guarantees, this should be unchanged until we break binary compat
# for Tracker.
#
# TRACKER_BINARY_VERSION=$TRACKER_MAJOR_VERSION.$TRACKER_MINOR_VERSION.$LT_CURRENT
Martyn Russell's avatar
Martyn Russell committed
41
m4_define([tracker_binary_version], [0.10.26])
42

43 44
AC_INIT([tracker],
        [tracker_version],
45
        [http://bugzilla.gnome.org/],
46 47
        [tracker],
        [http://www.tracker-project.org])
48

49
AC_CONFIG_SRCDIR([src/tracker-store/tracker-main.vala])
50 51
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
52

53
AM_INIT_AUTOMAKE([1.11 no-define tar-ustar -Wno-portability])
54

55
AM_SILENT_RULES([yes])
56

57 58
IDT_COMPILE_WARNINGS

59 60 61 62 63 64 65 66
TRACKER_MAJOR_VERSION=tracker_major_version
TRACKER_MINOR_VERSION=tracker_minor_version
TRACKER_MICRO_VERSION=tracker_micro_version
TRACKER_INTERFACE_AGE=tracker_interface_age
TRACKER_BINARY_AGE=tracker_binary_age
TRACKER_VERSION=tracker_version
TRACKER_API_VERSION=tracker_api_version
TRACKER_BINARY_VERSION=tracker_binary_version
67

68 69 70 71 72 73 74 75
AC_SUBST(TRACKER_MAJOR_VERSION)
AC_SUBST(TRACKER_MINOR_VERSION)
AC_SUBST(TRACKER_MICRO_VERSION)
AC_SUBST(TRACKER_INTERFACE_AGE)
AC_SUBST(TRACKER_BINARY_AGE)
AC_SUBST(TRACKER_API_VERSION)
AC_SUBST(TRACKER_VERSION)
AC_SUBST(TRACKER_BINARY_VERSION)
76

77 78 79 80 81 82 83 84 85 86
AC_DEFINE(TRACKER_MAJOR_VERSION, [tracker_major_version],
          [Define to the Tracker major version])
AC_DEFINE(TRACKER_MINOR_VERSION, [tracker_minor_version],
          [Define to the Tracker minor version])
AC_DEFINE(TRACKER_MICRO_VERSION, [tracker_micro_version],
          [Define to the Tracker micro version])
AC_DEFINE(TRACKER_INTERFACE_AGE, [tracker_interface_age],
          [Define to the Tracker interface age])
AC_DEFINE(TRACKER_BINARY_AGE, [tracker_binary_age],
          [Define to the Tracker binary age])
87

88 89 90 91 92 93 94 95 96 97 98 99
# libtool versioning
LT_RELEASE=tracker_lt_release
LT_CURRENT=tracker_lt_current
LT_REVISION=tracker_lt_revision
LT_AGE=tracker_lt_age
LT_CURRENT_MINUS_AGE=tracker_lt_current_minus_age
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
AC_SUBST(LT_CURRENT_MINUS_AGE)

100 101
# Checks for programs.
AC_PROG_CC
102
AM_PROG_CC_C_O()
103
AC_PROG_CXX
104 105 106 107
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_MAKE_SET

108 109 110
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT([disable-static])
111 112 113

# Checks for header files.
AC_HEADER_STDC
114
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h linux/unistd.h sys/statvfs.h])
115

116
AC_CHECK_HEADER([zlib.h],
117 118
                [],
                [AC_MSG_ERROR([You must have zlib.h and zlib installed])])
119 120 121 122 123 124 125 126 127 128

# Can posix_fadvise be used
AC_CHECK_DECLS(posix_fadvise, [], [], [
#define _XOPEN_SOURCE 600
#include <fcntl.h>])

# Checks for functions
AC_CHECK_FUNCS([posix_fadvise])
AC_CHECK_FUNCS([getline])

129 130
CFLAGS="$CFLAGS"

131 132 133 134 135 136
# if statvfs64() is available, enable the 64-bit API extensions
AC_CHECK_FUNCS([statvfs64], [have_statvfs64=yes], [have_statvfs64=no])
if test "x$have_statvfs" = "xyes" ; then
   CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
fi

137
# Check for defines we expect
138
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
139 140
#include "stdio.h"
printf ("%s", __FUNCTION__);
141 142 143
   ]])],
   [have_function=yes],
   [have_function=no])
144 145

if test "x$have_function" = "xno" ; then
146 147 148
   AC_DEFINE(__FUNCTION__,
             __func__,
            [Defined for compilers not supporting __FUNCTION__])
149 150
fi

151 152 153
# Binary required versions
PYTHON_REQUIRED=2.6

154
# Library required versions
155
DBUS_REQUIRED=1.3.1
156
DBUS_GLIB_REQUIRED=0.82
157
GLIB_REQUIRED=2.28.0
158
PANGO_REQUIRED=1.0.0
159
GTK_REQUIRED=2.18.0
160
LIBXML2_REQUIRED=2.6
161
LIBNOTIFY_REQUIRED=0.4.3
162
HAL_REQUIRED=0.5
163
UPOWER_REQUIRED=0.9.0
164
GDKPIXBUF_REQUIRED=2.12.0
165
QT_REQUIRED=4.7.1
166
MEEGOTOUCH_REQUIRED=0.20
167
POPPLER_REQUIRED=0.16.0
168 169
CAIRO_REQUIRED=1.0
GDK_REQUIRED=1.0
170
LIBVORBIS_REQUIRED=0.22
171
LIBFLAC_REQUIRED=1.2.1
172
LIBEXIF_REQUIRED=0.6
173
LIBGSF_REQUIRED=1.13
174
EXEMPI_REQUIRED=2.1.0
175 176 177 178
EVO_REQUIRED=2.32.0
EVO_SHELL_REQUIRED=2.32.0
EDS_REQUIRED=2.32.0
CAMEL_REQUIRED=2.32.0
179
# Unlikely version for now, Nepomuk integration isn't finished in streamanalyzer atm
180
LIBSTREAMANALYZER_REQUIRED=0.7.0
Martyn Russell's avatar
Martyn Russell committed
181
GEE_REQUIRED=0.3
182
TAGLIB_REQUIRED=1.6
183
GNOME_KEYRING_REQUIRED=2.26
184
LIBGRSS_REQUIRED=0.3
Adrien Bustany's avatar
Adrien Bustany committed
185
REST_REQUIRED=0.6
186
NETWORK_MANAGER_REQUIRED=0.8
187 188
GSTREAMER_REQUIRED=0.10.31
GUPNP_DLNA_REQUIRED=0.5
189

190 191 192 193 194 195
# 3.6.11 for sqlite_backup API
# 3.6.16 to fix test failures
# 3.6.17 for shared cache mode with virtual tables
# 3.7.0 for WAL
SQLITE_REQUIRED=3.7.0

196 197
# Needed to generate .gir files,
# see http://live.gnome.org/GnomeGoals/AddGObjectIntrospectionSupport
198
GOBJECT_INTROSPECTION_CHECK([0.9.5])
199

200 201 202 203 204 205
# NOTE: dbus and dbus-glib-1 are only used now for libtracker-client
# which is deprecated and tracker-writeback which will be refactored
# shortly to use gdbus. The other place which requires dbus-glib-1 is
# for HAL used in tracker-miner-fs if the alternative libraries are
# not available.

206 207 208 209 210
# Check for libpng 1.2 or higher
PKG_CHECK_MODULES(LIBPNG, [libpng >= 1.2])
AC_SUBST(LIBPNG_CFLAGS)
AC_SUBST(LIBPNG_LIBS)

Jürg Billeter's avatar
Jürg Billeter committed
211 212 213 214
# Check requirements for gvdb
GVDB_REQUIRED="glib-2.0 >= $GLIB_REQUIRED"
PKG_CHECK_MODULES(GVDB, [$GVDB_REQUIRED])

215 216
# Check requirements for libtracker-bus
LIBTRACKER_BUS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
217
                         gio-unix-2.0 >= $GLIB_REQUIRED"
218

219 220
PKG_CHECK_MODULES(LIBTRACKER_BUS, [$LIBTRACKER_BUS_REQUIRED])

221 222 223 224 225 226
# Check requirements for libtracker-client
LIBTRACKER_CLIENT_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                            gobject-2.0  >= $GLIB_REQUIRED
                            gio-unix-2.0 >= $GLIB_REQUIRED
                            dbus-1       >= $DBUS_REQUIRED
                            dbus-glib-1  >= $DBUS_GLIB_REQUIRED"
227

228 229
PKG_CHECK_MODULES(LIBTRACKER_CLIENT, [$LIBTRACKER_CLIENT_REQUIRED])

230 231
LIBTRACKER_CLIENT_CFLAGS="$LIBTRACKER_CLIENT_CFLAGS -Wno-deprecated-declarations"

232 233
# Check requirements for libtracker-common
LIBTRACKER_COMMON_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
234
                            gio-unix-2.0 >= $GLIB_REQUIRED"
235

236 237
PKG_CHECK_MODULES(LIBTRACKER_COMMON, [$LIBTRACKER_COMMON_REQUIRED])

238 239 240 241 242 243 244 245 246
# Check requirements for libtracker-data
LIBTRACKER_DATA_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                          gio-unix-2.0 >= $GLIB_REQUIRED
                          sqlite3      >= $SQLITE_REQUIRED
                          uuid"
PKG_CHECK_MODULES(LIBTRACKER_DATA, [$LIBTRACKER_DATA_REQUIRED])

LIBTRACKER_DATA_LIBS="$LIBTRACKER_DATA_LIBS -lz -lm"

247 248
# Check requirements for libtracker-direct
LIBTRACKER_DIRECT_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
249
                            gio-unix-2.0 >= $GLIB_REQUIRED"
250 251 252

PKG_CHECK_MODULES(LIBTRACKER_DIRECT, [$LIBTRACKER_DIRECT_REQUIRED])

253 254
# Check requirements for libtracker-extract
LIBTRACKER_EXTRACT_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
255
                             gio-unix-2.0 >= $GLIB_REQUIRED"
256 257 258

PKG_CHECK_MODULES(LIBTRACKER_EXTRACT, [$LIBTRACKER_EXTRACT_REQUIRED])

259 260 261 262 263 264 265 266
# Check requirements for libtracker-fts
LIBTRACKER_FTS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                         gio-unix-2.0 >= $GLIB_REQUIRED
                         gthread-2.0  >= $GLIB_REQUIRED
                         sqlite3      >= $SQLITE_REQUIRED"

PKG_CHECK_MODULES(LIBTRACKER_FTS, [$LIBTRACKER_FTS_REQUIRED])

267 268
# Check requirements for libtracker-miner
LIBTRACKER_MINER_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
269
                           gio-unix-2.0 >= $GLIB_REQUIRED"
270 271 272

PKG_CHECK_MODULES(LIBTRACKER_MINER, [$LIBTRACKER_MINER_REQUIRED])

273 274
# Check requirements for libtracker-sparql
LIBTRACKER_SPARQL_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
275 276
                            gio-unix-2.0 >= $GLIB_REQUIRED
                            uuid"
277 278 279

PKG_CHECK_MODULES(LIBTRACKER_SPARQL, [$LIBTRACKER_SPARQL_REQUIRED])

280 281 282 283 284 285 286 287
# Check requirements for tracker-control
TRACKER_CONTROL_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                          gio-unix-2.0 >= $GLIB_REQUIRED
                          gthread-2.0  >= $GLIB_REQUIRED
                          uuid"

PKG_CHECK_MODULES(TRACKER_CONTROL, [$TRACKER_CONTROL_REQUIRED])

288 289 290 291 292 293 294 295 296 297 298 299
# Check requirements for tracker-explorer
TRACKER_EXPLORER_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                           gio-unix-2.0 >= $GLIB_REQUIRED
                           gthread-2.0  >= $GLIB_REQUIRED
                           gmodule-2.0  >= $GLIB_REQUIRED
                           gtk+-2.0     >= $GTK_REQUIRED
			   gee-1.0      >= $GEE_REQUIRED"

PKG_CHECK_MODULES(TRACKER_EXPLORER, [$TRACKER_EXPLORER_REQUIRED],
                  [have_tracker_explorer=yes],
                  [have_tracker_explorer=no])

300 301 302 303 304 305 306
TRACKER_RESDUMP_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                          gee-1.0      >= $GEE_REQUIRED"

PKG_CHECK_MODULES(TRACKER_RESDUMP, [$TRACKER_RESDUMP_REQUIRED],
                  [have_tracker_resdump=yes],
                  [have_tracker_resdump=no])

307 308 309 310 311 312 313 314 315 316 317
# Check requirements for tracker-store
TRACKER_STORE_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                        gio-unix-2.0 >= $GLIB_REQUIRED
                        gthread-2.0  >= $GLIB_REQUIRED
                        gmodule-2.0  >= $GLIB_REQUIRED
                        sqlite3      >= $SQLITE_REQUIRED"

PKG_CHECK_MODULES(TRACKER_STORE, [$TRACKER_STORE_REQUIRED])

TRACKER_STORE_LIBS="$TRACKER_STORE_LIBS -lz -lm"

318 319 320 321
# Check requirements for tracker-extract
TRACKER_EXTRACT_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                          gio-unix-2.0 >= $GLIB_REQUIRED
                          gthread-2.0  >= $GLIB_REQUIRED
322
                          gmodule-2.0  >= $GLIB_REQUIRED"
323 324 325

PKG_CHECK_MODULES(TRACKER_EXTRACT, [$TRACKER_EXTRACT_REQUIRED])

326 327 328 329 330
# Check requirements for tracker-extract modules
TRACKER_EXTRACT_MODULES_REQUIRED="glib-2.0     >= $GLIB_REQUIRED"

PKG_CHECK_MODULES(TRACKER_EXTRACT_MODULES, [$TRACKER_EXTRACT_MODULES_REQUIRED])

331 332 333 334 335 336 337 338 339 340
# Check requirements for tracker-writeback
TRACKER_WRITEBACK_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                            gio-unix-2.0 >= $GLIB_REQUIRED
                            gthread-2.0  >= $GLIB_REQUIRED
                            gmodule-2.0  >= $GLIB_REQUIRED
                            dbus-1       >= $DBUS_REQUIRED
                            dbus-glib-1  >= $DBUS_GLIB_REQUIRED"

PKG_CHECK_MODULES(TRACKER_WRITEBACK, [$TRACKER_WRITEBACK_REQUIRED])

341 342 343 344
# Check requirements for tracker-miner-fs
TRACKER_MINER_FS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                           gio-unix-2.0 >= $GLIB_REQUIRED
                           gthread-2.0  >= $GLIB_REQUIRED
345
                           gmodule-2.0  >= $GLIB_REQUIRED"
346 347 348 349 350

PKG_CHECK_MODULES(TRACKER_MINER_FS, [$TRACKER_MINER_FS_REQUIRED])

TRACKER_MINER_FS_LIBS="$TRACKER_MINER_FS_LIBS -lz -lm"

351 352
# Check requirements for tracker-miner-evolution
TRACKER_MINER_EVOLUTION_REQUIRED="glib-2.0                  >= $GLIB_REQUIRED
353
                                  evolution-shell-3.0       >= 3.1
354
                                  evolution-plugin-3.0
355 356
                                  evolution-data-server-1.2 >= $EDS_REQUIRED
                                  camel-1.2                 >= $CAMEL_REQUIRED"
357 358 359 360 361

PKG_CHECK_MODULES(TRACKER_MINER_EVOLUTION, [$TRACKER_MINER_EVOLUTION_REQUIRED],
                  [have_tracker_miner_evolution=yes],
                  [have_tracker_miner_evolution=no])

362 363 364
if test "x$have_tracker_miner_evolution" = "xyes"; then
   evolution_plugin_name="evolution-plugin-3.0"

365
   AC_DEFINE(EVOLUTION_SHELL_3_2, 1, [Use new evolution-shell API])
366 367 368
   AC_DEFINE(EVOLUTION_SHELL_2_91, 1, [Use new evolution-shell API])
else
   TRACKER_MINER_EVOLUTION_REQUIRED="glib-2.0                  >= $GLIB_REQUIRED
369 370
                                     evolution-shell-3.0
                                     evolution-plugin-3.0
371 372 373 374 375 376 377
                                     evolution-data-server-1.2 >= $EDS_REQUIRED
                                     camel-1.2                 >= $CAMEL_REQUIRED"

   PKG_CHECK_MODULES(TRACKER_MINER_EVOLUTION, [$TRACKER_MINER_EVOLUTION_REQUIRED],
                     [have_tracker_miner_evolution=yes],
                     [have_tracker_miner_evolution=no])

378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396
   if test "x$have_tracker_miner_evolution" = "xyes"; then
      evolution_plugin_name="evolution-plugin-3.0"

      AC_DEFINE(EVOLUTION_SHELL_2_91, 1, [Use new evolution-shell API])
   else
      evolution_plugin_name="evolution-plugin"


      TRACKER_MINER_EVOLUTION_REQUIRED="glib-2.0                  >= $GLIB_REQUIRED
                                        evolution-shell           >= $EVO_SHELL_REQUIRED
                                        evolution-plugin          >= $EVO_REQUIRED
                                        evolution-data-server-1.2 >= $EDS_REQUIRED
                                        camel-1.2                 >= $CAMEL_REQUIRED"

      PKG_CHECK_MODULES(TRACKER_MINER_EVOLUTION, [$TRACKER_MINER_EVOLUTION_REQUIRED],
                        [have_tracker_miner_evolution=yes],
                        [have_tracker_miner_evolution=no])

   fi
397 398
fi

399 400 401 402 403 404 405 406
# Check requirements for tracker-miner-rss
TRACKER_MINER_RSS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                            libgrss-0    >= $LIBGRSS_REQUIRED"

PKG_CHECK_MODULES(TRACKER_MINER_RSS, [$TRACKER_MINER_RSS_REQUIRED],
                  [have_tracker_miner_rss=yes],
                  [have_tracker_miner_rss=no])

407 408
# Check requirements for tracker-miner-flickr
TRACKER_MINER_FLICKR_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
409
                               rest-0.7     >= $REST_REQUIRED"
410 411 412 413 414 415 416

PKG_CHECK_MODULES(TRACKER_MINER_FLICKR, [$TRACKER_MINER_FLICKR_REQUIRED],
                  [have_tracker_miner_flickr=yes],
                  [have_tracker_miner_flickr=no])

TRACKER_MINER_FLICKR_LIBS="$TRACKER_MINER_FLICKR_LIBS -lz -lm"

417 418 419
# Check requirements for tracker-utils
TRACKER_UTILS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                        gio-unix-2.0 >= $GLIB_REQUIRED
420
                        gthread-2.0  >= $GLIB_REQUIRED"
421 422 423

PKG_CHECK_MODULES(TRACKER_UTILS, [$TRACKER_UTILS_REQUIRED])

424 425 426 427 428
# Check requirements for tracker-needle
TRACKER_NEEDLE_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                         gio-unix-2.0 >= $GLIB_REQUIRED
                         gthread-2.0  >= $GLIB_REQUIRED
                         gmodule-2.0  >= $GLIB_REQUIRED
429
                         gtk+-2.0     >= $GTK_REQUIRED"
430 431 432 433 434

PKG_CHECK_MODULES(TRACKER_NEEDLE, [$TRACKER_NEEDLE_REQUIRED],
                  [have_tracker_needle=yes],
                  [have_tracker_needle=no])

435 436 437 438 439
# Check requirements for tracker-preferences
TRACKER_PREFERENCES_REQUIRED="glib-2.0       >= $GLIB_REQUIRED
                              gio-unix-2.0   >= $GLIB_REQUIRED
                              gthread-2.0    >= $GLIB_REQUIRED
                              gmodule-2.0    >= $GLIB_REQUIRED
440
                              gtk+-2.0       >= $GTK_REQUIRED"
441 442 443 444 445

PKG_CHECK_MODULES(TRACKER_PREFERENCES, [$TRACKER_PREFERENCES_REQUIRED],
                  [have_tracker_preferences=yes],
                  [have_tracker_preferences=no])

446 447 448 449 450
# Check requirements for tracker-search-bar
TRACKER_SEARCH_BAR_REQUIRED="glib-2.0       >= $GLIB_REQUIRED
                             gio-unix-2.0   >= $GLIB_REQUIRED
                             gthread-2.0    >= $GLIB_REQUIRED
                             gmodule-2.0    >= $GLIB_REQUIRED
451
                             gtk+-3.0       >= $GTK_REQUIRED
452 453 454
                             gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED
                             pango          >= $PANGO_REQUIRED
			     gee-1.0        >= $GEE_REQUIRED
455
                             libpanelapplet-4.0"
456 457 458 459 460

PKG_CHECK_MODULES(TRACKER_SEARCH_BAR, [$TRACKER_SEARCH_BAR_REQUIRED],
                  [have_tracker_search_bar=yes],
                  [have_tracker_search_bar=no])

461
# Check requirements for Nautilus extension
462
TRACKER_NAUTILUS_EXTENSION_REQUIRED="libnautilus-extension"
463 464 465 466 467

PKG_CHECK_MODULES(TRACKER_NAUTILUS_EXTENSION, [$TRACKER_NAUTILUS_EXTENSION_REQUIRED],
                  [have_tracker_nautilus_extension=yes],
                  [have_tracker_nautilus_extension=no])

468 469 470 471 472
# Check we have Vala valac command we need
AC_PATH_PROG(VALAC, valac, valac)
if test -z $VALAC; then
   AC_MSG_ERROR([Could not find 'valac'])
fi
473

474
AC_SUBST(VALAC)
475

476 477 478
####################################################################
# Check gettext/intltool support
####################################################################
479 480 481 482
IT_PROG_INTLTOOL([0.40.0])

AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
483

484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext translation domain])

####################################################################
# Check if we should enable GCOV coverage reporting support
####################################################################

AC_ARG_ENABLE(gcov,
              AS_HELP_STRING([--enable-gcov],
                             [enable coverage reporting support [[default=no]]]),,
              [enable_gcov=no])
AM_CONDITIONAL(ENABLE_GCOV, test "x$enable_gcov" != "xno")

if test "x$enable_gcov" != "xno" ; then
  GCOV_VALAFLAGS="-g"
  GCOV_CFLAGS="-ftest-coverage -fprofile-arcs"
  GCOV_LIBS="-lgcov"
502
else
503 504 505
  GCOV_VALAFLAGS=
  GCOV_CFLAGS=
  GCOV_LIBS=
506 507
fi

508 509 510
AC_SUBST(GCOV_VALAFLAGS)
AC_SUBST(GCOV_CFLAGS)
AC_SUBST(GCOV_LIBS)
511

512 513 514 515 516 517 518 519 520 521 522 523
####################################################################
# General VALAFLAGS/CFLAGS/LIBS
####################################################################
BUILD_VALAFLAGS="-g --target-glib=2.26"
BUILD_CFLAGS="${WARN_CFLAGS} ${GCOV_CFLAGS} -DG_LOG_DOMAIN=\\\"Tracker\\\" -DTRACKER_COMPILATION"
BUILD_LIBS="${GCOV_LIBS}"

AC_SUBST(BUILD_VALAFLAGS)
AC_SUBST(BUILD_CFLAGS)
AC_SUBST(BUILD_LIBS)


524 525 526 527 528
####################################################################
# Check for functional-test include/exclude
####################################################################
AC_ARG_ENABLE([functional-tests],
              AS_HELP_STRING([--enable-functional-tests],
529 530
                             [enable functional tests [[default=no]]]),,
              [enable_functional_tests=no])
Jürg Billeter's avatar
Jürg Billeter committed
531

532
if test x$enable_functional_tests != "xno"; then
533 534 535 536 537 538 539 540 541 542
   # Python check, require >= 2.6
   AC_PATH_PROG([PYTHON],[python],[:])
   AS_IF([test "$PYTHON" != ":"],
         [AM_PYTHON_CHECK_VERSION([$PYTHON],[$PYTHON_REQUIRED],[:],[PYTHON=":"])])

   if test "$PYTHON" = ":"; then
      AC_MSG_ERROR([Couldn't find Python >= $PYTHON_REQUIRED (for functional-tests, try --disable-functional-tests).])
   fi

   AC_DEFINE(DIST_FUNCTIONAL_TESTS, 1, [Include functional tests in the installation])
543 544
fi

545
AM_CONDITIONAL(DIST_FUNCTIONAL_TESTS, test "x$enable_functional_tests" != "xno")
546

547
####################################################################
548
# Check for gtk-doc and docbook-tools
549 550
####################################################################

551 552 553
# Check for GTK_DOC_CHECK availability. The GTK_DOC_CHECK invocation
# must be on its own line, gtkdocize relies on it
m4_ifdef([GTK_DOC_CHECK], [
554
GTK_DOC_CHECK([1.8])
555

556 557 558 559 560 561 562
# NOTE: We need to use a separate automake conditional for this
#       to make this work with the tarballs.
AM_CONDITIONAL([ENABLE_GTK_DOC], test "x$enable_gtk_doc" = xyes)
],
[
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
563

564
if test "x$enable_gtk_doc" != xno; then
565 566 567 568 569 570 571 572
   # Check for dia if we are building gtk_doc
   AC_PATH_PROG(DIA, dia)
   AC_SUBST(DIA)

   if test -z "$DIA"; then
      AC_MSG_ERROR([Could not find Dia tool required to build documentation.])
   fi

573 574 575 576 577 578 579
   # Check for graphviz if we are building gtk_doc
   AC_PATH_PROG(GRAPHVIZ_FDP, fdp)
   AC_SUBST(GRAPHVIZ_FDP)

   if test -z "$GRAPHVIZ_FDP"; then
      AC_MSG_ERROR([Couldn't find Graphviz's fdp tool (graphviz).])
   fi
580 581
fi

582
AM_CONDITIONAL(HAVE_GRAPHVIZ_FDP, test -n "$GRAPHVIZ_FDP")
583

584
####################################################################
585
# Check if we should install Windows specific binaries
586 587
####################################################################

588
AC_MSG_CHECKING(for WIN32)
589
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
590 591 592
   #ifndef WIN32
   #error
   #endif
593 594 595
   ]])],
   [native_win32=yes; AC_MSG_RESULT(yes)],
   [native_win32=no; AC_MSG_RESULT(no)])
596

597
AM_CONDITIONAL(OS_WIN32, test "$native_win32" = "yes")
598

599 600 601
if test "$native_win32" = "yes" ; then
   AC_DEFINE(OS_WIN32, 1, [Define if we are on win32])
fi
602

603 604 605 606 607 608 609 610 611 612 613 614
####################################################################
# Check if we should install Maemo/MeeGo specific ontologies
####################################################################

AC_ARG_ENABLE(maemo,
              AS_HELP_STRING([--enable-maemo],
                             [enable maemo ontology [[default=no]]]),
             [enable_maemo="$enableval"],
             [enable_maemo=no])

AM_CONDITIONAL(HAVE_MAEMO, test "x$enable_maemo" = "xyes")

615 616 617 618
if test "x$enable_maemo" = "xyes" ; then
   AC_DEFINE(HAVE_MAEMO, 1, [Define if we enable Maemo specific features])
fi

619 620 621 622 623 624 625 626 627 628
####################################################################
# Check if we should disable the journal
####################################################################

AC_ARG_ENABLE(journal,
              AS_HELP_STRING([--enable-journal],
                             [enable journal [[default=yes]]]),
             [enable_journal="$enableval"],
             [enable_journal=yes])

629 630 631 632 633 634
if test "x$enable_journal" != "xno" ; then
   have_tracker_journal="yes"
else
   have_tracker_journal="no  (disabled)"
fi

635 636
AM_CONDITIONAL(DISABLE_JOURNAL, test "x$enable_journal" = "xno")

637 638 639 640
if test "x$enable_journal" = "xno" ; then
   AC_DEFINE(DISABLE_JOURNAL, 1, [Define if we disable the journal])
fi

641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665
####################################################################
# Check for SQLite
####################################################################

PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= $SQLITE_REQUIRED])
AC_SUBST(SQLITE3_CFLAGS)
AC_SUBST(SQLITE3_LIBS)

# Make sure SQLite is compiled thread-safe
AX_SQLITE_THREADSAFE
if test "x$ax_cv_sqlite_threadsafe" != "xyes"; then
  AC_MSG_ERROR([sqlite3 is not compiled thread-safe])
fi

##################################################################
# Check for tracker-fts, allow disabling FTS support
##################################################################

AC_ARG_ENABLE([tracker-fts],
              AS_HELP_STRING([--enable-tracker-fts],
                             [enable the tracker FTS [[default=auto]]]),,
              [enable_tracker_fts=auto])

if test "x$enable_tracker_fts" != "xno" ; then
   have_tracker_fts="yes"
666
else
667
   have_tracker_fts="no  (disabled)"
668 669
fi

670 671 672 673
if test "x$have_tracker_fts" = "xyes"; then
   AC_DEFINE(HAVE_TRACKER_FTS, [1], [Define to 1 if tracker FTS is compiled])
else
   AC_DEFINE(HAVE_TRACKER_FTS, [0], [Define to 0 if tracker FTS is not compiled])
674 675
fi

676
AM_CONDITIONAL(HAVE_TRACKER_FTS, test "$have_tracker_fts" = "yes")
677

678
####################################################################
679
# Check for D-Bus requirements
680 681
####################################################################

682
# Check we are not using a different D-Bus services dir
683
AC_ARG_WITH([session_bus_services_dir],
684
            AS_HELP_STRING([--with-session-bus-services-dir],
685
                           [path to DBus services directory]))
686 687

if test "x$with_session_bus_services_dir" = "x" ; then
688
   services_dir="$datadir/dbus-1/services"
689 690 691 692 693 694 695
else
   services_dir="$with_session_bus_services_dir"
fi

DBUS_SERVICES_DIR="$services_dir"
AC_SUBST(DBUS_SERVICES_DIR)

696 697 698 699
# Check we have the D-Bus binding tool we need
AC_PATH_PROG(DBUSBINDINGTOOL, dbus-binding-tool)
if test -z $DBUSBINDINGTOOL; then
   AC_MSG_ERROR([Could not find 'dbus-binding-tool'])
700 701
fi

702 703
GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
AC_SUBST(GLIB_GENMARSHAL)
704

705
####################################################################
706
# Should we build GLib based unit tests
707 708 709
####################################################################

AC_ARG_ENABLE(unit_tests,
710 711 712
              AS_HELP_STRING([--enable-unit-tests],
                             [enable unit tests [[default=yes]]]), ,
              [enable_unit_tests=yes])
713 714

if test "x$enable_unit_tests" != "xno" ; then
715 716 717 718 719 720 721
   have_unit_tests=yes

   AC_DEFINE(HAVE_UNIT_TEST, 1, [Define if we have GLib unit test framework])

   AC_PATH_PROG(gtester, gtester)
   if test -z $gtester; then
      AC_MSG_ERROR([Could not find 'gtester'])
722
   fi
723 724
else
   have_unit_tests=no
725 726 727 728
fi

AM_CONDITIONAL(HAVE_UNIT_TESTS, test "x$have_unit_tests" = "xyes")

729 730 731
##################################################################
# Check for libtracker-common: upower for battery/power support
##################################################################
732

733 734 735 736
AC_ARG_ENABLE(upower,
              AS_HELP_STRING([--disable-upower],
                             [disable UPower support for AC power detection [[default=auto]]]),,
              [enable_upower=auto])
737

738 739 740 741 742
if test "x$enable_upower" != "xno"; then
   PKG_CHECK_MODULES(UPOWER,
                     [upower-glib >= $UPOWER_REQUIRED],
                     [have_upower=yes],
                     [have_upower=no])
743

744 745
   TRACKER_MINER_FS_CFLAGS="$TRACKER_MINER_FS_CFLAGS $UPOWER_CFLAGS"
   TRACKER_MINER_FS_LIBS="$TRACKER_MINER_FS_LIBS $UPOWER_LIBS"
746

747 748
   if test "x$have_upower" = "xyes"; then
      AC_DEFINE(HAVE_UPOWER, [], [Define if we have UPOWER])
749 750
   fi
else
751
   have_upower="no  (disabled)"
752 753
fi

754 755 756
if test "x$enable_upower" = "xyes"; then
   if test "x$have_upower" != "xyes"; then
      AC_MSG_ERROR([Couldn't find upower >= $UPOWER_REQUIRED.])
757 758 759
   fi
fi

760
AM_CONDITIONAL(HAVE_UPOWER, test "x$have_upower" = "xyes")
761

762
##################################################################
763
# Check for libtracker-common: hal for battery/power support (old)
764 765 766
##################################################################

AC_ARG_ENABLE(hal,
767 768 769
              AS_HELP_STRING([--disable-hal],
                             [disable HAL support for AC power detection [[default=auto]]]),,
              [enable_hal=auto])
770

771
if test "x$have_upower" != "xyes" && test "x$enable_hal" != "xno"; then
772
   PKG_CHECK_MODULES(HAL,
773 774 775
                     [dbus-1      >= $DBUS_REQUIRED
                      dbus-glib-1 >= $DBUS_GLIB_REQUIRED
                      hal         >= $HAL_REQUIRED],
776 777
                     [have_hal=yes] ,
                     [have_hal=no])
778

779 780
   TRACKER_MINER_FS_CFLAGS="$TRACKER_MINER_FS_CFLAGS $HAL_CFLAGS"
   TRACKER_MINER_FS_LIBS="$TRACKER_MINER_FS_LIBS $HAL_LIBS"
781 782 783 784 785 786 787 788 789

   if test "x$have_hal" = "xyes"; then
      AC_DEFINE(HAVE_HAL, [], [Define if we have HAL])
   fi
else
   have_hal="no  (disabled)"
fi

if test "x$enable_hal" = "xyes"; then
790 791
   if test "x$have_upower" = "xyes"; then
      AC_MSG_ERROR([Only one of UPower and HAL can be used.])
792 793 794 795 796 797 798
   elif test "x$have_hal" != "xyes"; then
      AC_MSG_ERROR([Couldn't find hal >= $HAL_REQUIRED.])
   fi
fi

AM_CONDITIONAL(HAVE_HAL, test "x$have_hal" = "xyes")

799
##################################################################
800 801 802 803 804 805 806
# Check for libtracker-data and libtracker-fts: Unicode support
#
# By default, AUTO with this order of preference:
#  1)  libunistring
#  2)  libicu
#
# Note that glib can only be used if explicitly requested for it.
807 808
##################################################################

809 810
# Check for libunistring...
AC_CHECK_HEADER(uniwbrk.h,
811 812 813 814
                AC_CHECK_LIB([unistring],
                             [u8_wordbreaks],
                             [have_libunistring=yes],
                             [have_libunistring=no]))
815 816
LIBUNISTRING_CFLAGS=""
LIBUNISTRING_LIBS="-lunistring"
817

818 819 820 821 822 823 824 825
# Check for libicu... Note that AC_CHECK_LIB cannot be used as
#  symbol name includes libicu library version... don't want to
#  look for ubrk_next_4_2
AC_CHECK_HEADER(unicode/ubrk.h,
                [have_libicu=yes],
                [have_libicu=no])
LIBICU_CFLAGS=""
LIBICU_LIBS="-licuuc -licui18n"
826

827 828 829 830 831
# Check for Pango...
PKG_CHECK_MODULES(PANGO,
                  [pango >= $PANGO_REQUIRED],
                  [have_pango=yes],
                  [have_pango=no])
832

833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851
# Configure option
AC_ARG_WITH([unicode-support],
            AS_HELP_STRING([--with-unicode-support],
                           [Unicode support library? (libunistring|libicu|glib) [[default=auto (!glib)]]]),,
            [with_unicode_support=auto])

# If auto, decide ourselves
if test "x$with_unicode_support" = "xauto"; then
   if test "x$have_libunistring" = "xyes"; then
      with_unicode_support=libunistring
   else
      if test "x$have_libicu" = "xyes"; then
         with_unicode_support=libicu
      else
         AC_MSG_ERROR([Couldn't find neither libunistring nor libicu. You can still compile tracker
                       without any of these two, using glib instead, but be warned that the FTS parsing
                       performance will be much worse. If you still want to use glib as Unicode support
                       library, enable it with an explicit --with-unicode-support=glib])
      fi
852 853 854
   fi
fi

855 856
UNICODE_SUPPORT_CFLAGS=
UNICODE_SUPPORT_LIBS=
857

858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889
case "x$with_unicode_support" in
     # Use libunistring
     "xlibunistring")
        UNICODE_SUPPORT_CFLAGS=$LIBUNISTRING_CFLAGS
        UNICODE_SUPPORT_LIBS=$LIBUNISTRING_LIBS
        if test "x$have_libunistring" = "xyes"; then
           AC_DEFINE(HAVE_LIBUNISTRING, [1], [libunistring Unicode support library])
        else
           AC_MSG_ERROR([Couldn't find libunistring])
        fi
     ;;
     # Use libicu
     "xlibicu")
        UNICODE_SUPPORT_CFLAGS=$LIBICU_CFLAGS
        UNICODE_SUPPORT_LIBS=$LIBICU_LIBS
        if test "x$have_libicu" = "xyes"; then
          AC_DEFINE(HAVE_LIBICU, [1], [libicu Unicode support library])
        else
          AC_MSG_ERROR([Couldn't find libicu])
        fi
     ;;
     # Use glib/pango
     "xglib")
        UNICODE_SUPPORT_CFLAGS=$PANGO_CFLAGS
        UNICODE_SUPPORT_LIBS=$PANGO_LIBS
        if test "x$have_pango" != "xyes"; then
          AC_MSG_ERROR([Couldn't find pango])
        fi
     ;;
     # Invalid option value
     *) AC_MSG_ERROR([Wrong value for --with-unicode-support: $with_unicode_support]) ;;
esac
890

891 892 893
# Add to libtracker-fts
LIBTRACKER_FTS_CFLAGS="$LIBTRACKER_FTS_CFLAGS $UNICODE_SUPPORT_CFLAGS"
LIBTRACKER_FTS_LIBS="$LIBTRACKER_FTS_LIBS $UNICODE_SUPPORT_LIBS"
894

895 896 897
# Add to libtracker-data
LIBTRACKER_DATA_CFLAGS="$LIBTRACKER_DATA_CFLAGS $UNICODE_SUPPORT_CFLAGS"
LIBTRACKER_DATA_LIBS="$LIBTRACKER_DATA_LIBS $UNICODE_SUPPORT_LIBS"
898

899 900
AM_CONDITIONAL(BUILD_LIBUNISTRING_PARSER, test "x$with_unicode_support" = "xlibunistring")
AM_CONDITIONAL(BUILD_LIBICU_PARSER, test "x$with_unicode_support" = "xlibicu")
901 902

##################################################################
903
# Check for libtracker-miner: gnome-keyring for web miner details
904 905
##################################################################

906 907 908 909
AC_ARG_ENABLE(gnome_keyring,
              AS_HELP_STRING([--enable-gnome-keyring],
                             [enable Gnome Keyring support to store credentials [[default=auto]]]),,
              [enable_gnome_keyring=auto])
910

911 912 913 914 915
if test "x$enable_gnome_keyring" != "xno"; then
   PKG_CHECK_MODULES(GNOME_KEYRING,
                     [gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED],
                     [have_gnome_keyring=yes],
                     [have_gnome_keyring=no])
916

917 918 919 920 921
   LIBTRACKER_MINER_CFLAGS="$LIBTRACKER_MINER_CFLAGS $GNOME_KEYRING_CFLAGS"
   LIBTRACKER_MINER_LIBS="$LIBTRACKER_MINER_LIBS $GNOME_KEYRING_LIBS"

   if test "x$have_gnome_keyring" = "xyes"; then
      AC_DEFINE(HAVE_GNOME_KEYRING, [], [Define if we have Gnome Keyring for password storage])
922 923 924
   fi
fi

925 926 927
if test "x$enable_gnome_keyring" = "xyes"; then
   if test "x$have_gnome_keyring" != "xyes"; then
      AC_MSG_ERROR([Couldn't find Gnome Keyring >= $GNOME_KEYRING_REQUIRED.])
928 929 930
   fi
fi

931
AM_CONDITIONAL(HAVE_GNOME_KEYRING, test "x$have_gnome_keyring" = "xyes")
932 933

##################################################################
934
# Check for libtracker-miner: network-manager for web miners
935 936
##################################################################

937 938 939 940
AC_ARG_ENABLE(network_manager,
              AS_HELP_STRING([--enable-network-manager],
                             [enable NetworkManager support to detect network status [[default=auto]]]),,
              [enable_network_manager=auto])
941

942 943 944 945 946
if test "x$enable_network_manager" != "xno"; then
   PKG_CHECK_MODULES(NETWORK_MANAGER,
                     [libnm-glib >= $NETWORK_MANAGER_REQUIRED],
                     [have_network_manager=yes],
                     [have_network_manager=no])
947

948 949 950 951 952
   LIBTRACKER_MINER_CFLAGS="$LIBTRACKER_MINER_CFLAGS $NETWORK_MANAGER_CFLAGS"
   LIBTRACKER_MINER_LIBS="$LIBTRACKER_MINER_LIBS $NETWORK_MANAGER_LIBS"

   if test "x$have_network_manager" = "xyes"; then
      AC_DEFINE(HAVE_NETWORK_MANAGER, [], [Define if we have NetworkManager for network status detection])
953
   fi
954 955
fi

956 957 958
if test "x$enable_network_manager" = "xyes"; then
   if test "x$have_network_manager" != "xyes"; then
      AC_MSG_ERROR([Couldn't find libnm-glib >= $NETWORK_MANAGER_REQUIRED.])
959
   fi
960 961
fi

962
AM_CONDITIONAL(HAVE_NETWORK_MANAGER, test "x$have_network_manager" = "xyes")
963

964 965 966
##################################################################
# Check for libtracker-extract: libexif
##################################################################
967

968 969 970 971
AC_ARG_ENABLE(libexif,
              AS_HELP_STRING([--enable-libexif],
                             [enable extractor for exif data [[default=auto]]]),,
              [enable_libexif=auto])
972

973 974 975 976 977
if test "x$enable_libexif" != "xno" ; then
   PKG_CHECK_MODULES(LIBEXIF,
                     [libexif >= $LIBEXIF_REQUIRED],
                     [have_libexif=yes],
                     [have_libexif=no])
978

979 980
   LIBTRACKER_EXTRACT_CFLAGS="$LIBTRACKER_EXTRACT_CFLAGS $LIBEXIF_CFLAGS"
   LIBTRACKER_EXTRACT_LIBS="$LIBTRACKER_EXTRACT_LIBS $LIBEXIF_LIBS"
981

982 983
   if test "x$have_libexif" = "xyes"; then
      AC_DEFINE(HAVE_LIBEXIF, [], [Define if we have libexif])
984 985
   fi
else
986
   have_libexif="no  (disabled)"
987 988
fi

989 990 991
if test "x$enable_libexif" = "xyes"; then
   if test "x$have_libexif" != "xyes"; then
      AC_MSG_ERROR([Couldn't find libexif >= $LIBEXIF_REQUIRED.])
992 993 994
   fi
fi

995
AM_CONDITIONAL(HAVE_EXIF, test "x$have_libexif" = "xyes")
996

997
##################################################################
998
# Check for libtracker-extract: libiptcdata
999 1000
##################################################################

1001 1002 1003 1004
AC_ARG_ENABLE(libiptcdata,
              AS_HELP_STRING([--enable-libiptcdata],
                             [enable extractor for iptc data [[default=auto]]]),,
              [enable_libiptcdata=auto])
1005

1006 1007 1008 1009 1010
if test "x$enable_libiptcdata" != "xno" ; then
   PKG_CHECK_MODULES(LIBIPTCDATA,
                     [libiptcdata],
                     [have_libiptcdata=yes],
                     [have_libiptcdata=no])
1011

1012 1013
   LIBTRACKER_EXTRACT_CFLAGS="$LIBTRACKER_EXTRACT_CFLAGS $LIBIPTCDATA_CFLAGS"
   LIBTRACKER_EXTRACT_LIBS="$LIBTRACKER_EXTRACT_LIBS $LIBIPTCDATA_LIBS"
1014

1015 1016
   if test "x$have_libiptcdata" = "xyes"; then
      AC_DEFINE(HAVE_LIBIPTCDATA, [], [Define if we have libiptcdata])
1017
   fi
1018 1019
else
   have_libiptcdata="no  (disabled)"
1020 1021
fi

1022 1023 1024 1025 1026
if test "x$enable_libiptcdata" = "xyes"; then
   if test "x$have_libiptcdata" != "xyes"; then
      AC_MSG_ERROR([Couldn't find libiptcdata.])
   fi
fi
1027

1028
AM_CONDITIONAL(HAVE_IPTC, test "x$have_libiptcdata" = "xyes")
1029

1030
##################################################################
1031
# Check for libtracker-extract, tracker-writeback: exempi
1032 1033
##################################################################

1034 1035 1036 1037
AC_ARG_ENABLE(exempi,
              AS_HELP_STRING([--enable-exempi],
                             [enable extractor for XMP data [[default=auto]]]),,
              [enable_exempi=auto])
1038

1039 1040 1041 1042 1043 1044 1045 1046
if test "x$enable_exempi" != "xno" ; then
   PKG_CHECK_MODULES(EXEMPI,
                     [exempi-2.0 >= $EXEMPI_REQUIRED],
                     [have_exempi=yes],
                     [have_exempi=no])

   TRACKER_WRITEBACK_CFLAGS="$TRACKER_WRITEBACK_CFLAGS $EXEMPI_CFLAGS"
   TRACKER_WRITEBACK_LIBS="$TRACKER_WRITEBACK_LIBS $EXEMPI_LIBS"
1047

1048 1049
   LIBTRACKER_EXTRACT_CFLAGS="$LIBTRACKER_EXTRACT_CFLAGS $EXEMPI_CFLAGS"
   LIBTRACKER_EXTRACT_LIBS="$LIBTRACKER_EXTRACT_LIBS $EXEMPI_LIBS"
1050

1051 1052
   if test "x$have_exempi" = "xyes"; then
      AC_DEFINE(HAVE_EXEMPI, [], [Define if we have exempi])
1053
   fi
1054 1055
else
   have_exempi="no  (disabled)"
1056 1057
fi

1058 1059 1060
if test "x$enable_exempi" = "xyes"; then
   if test "x$have_exempi" != "xyes"; then
      AC_MSG_ERROR([Couldn't find exempi >= $EXEMPI_REQUIRED.])
1061 1062 1063
   fi
fi

1064
AM_CONDITIONAL(HAVE_EXEMPI, test "x$have_exempi" = "xyes")
1065

1066 1067 1068
####################################################################
# Check for tracker-miner-fs: meegotouch, for MeeGo desktop files
####################################################################
1069

1070 1071 1072 1073 1074 1075 1076
AC_ARG_ENABLE(meegotouch,
              AS_HELP_STRING([--enable-meegotouch],
                             [enable libmeegotouch application extraction [[default=no]]]),
             [enable_meegotouch="$enableval"],
             [enable_meegotouch=no])

if test "x$enable_meegotouch" != "xno"; then
1077 1078 1079 1080
   PKG_CHECK_MODULES(MEEGOTOUCH,
                     [meegotouch >= $MEEGOTOUCH_REQUIRED],
                     [have_meegotouch=yes],
                     [have_meegotouch=no])
1081

1082 1083
   LIBTRACKER_EXTRACT_CFLAGS="$LIBTRACKER_EXTRACT_CFLAGS $MEEGOTOUCH_CFLAGS"
   LIBTRACKER_EXTRACT_LIBS="$LIBTRACKER_EXTRACT_LIBS $MEEGOTOUCH_LIBS"
1084

1085 1086
   TRACKER_MINER_FS_CFLAGS="$TRACKER_MINER_FS_CFLAGS $MEEGOTOUCH_CFLAGS"
   TRACKER_MINER_FS_LIBS="$TRACKER_MINER_FS_LIBS $MEEGOTOUCH_LIBS"
1087

1088 1089
   if test "x$have_meegotouch" = "xyes"; then
      AC_DEFINE(HAVE_MEEGOTOUCH, [], [Define if we have meegotouch])
1090
   fi
1091 1092
else
   have_meegotouch="no  (disabled)"
1093 1094
fi

1095
AM_CONDITIONAL(HAVE_MEEGOTOUCH, test "x$have_meegotouch" = "xyes")
1096 1097

##################################################################
1098
# Check for tracker-miner-flickr
1099 1100 1101 1102 1103 1104 1105
##################################################################

AC_ARG_ENABLE(miner_flickr,
              AS_HELP_STRING([--enable-miner-flickr],
                             [enable Flickr miner [[default=auto]]]),,
                             [enable_tracker_miner_flickr=auto])

1106 1107
enable_tracker_miner_flickr=$enable_miner_flickr

1108 1109 1110 1111 1112 1113
if test "x$enable_tracker_miner_flickr" = "xyes"; then
   if test "x$have_tracker_miner_flickr" != "xyes"; then
      AC_MSG_ERROR([Couldn't find tracker-miner-flickr dependencies ($TRACKER_MINER_FLICKR_REQUIRED).])
   fi
else
   if test "x$enable_tracker_miner_flickr" = "xno"; then
1114
      have_tracker_miner_flickr="no  (disabled)"
1115 1116 1117 1118
   fi
fi

AM_CONDITIONAL(HAVE_TRACKER_MINER_FLICKR, test "x$have_tracker_miner_flickr" = "xyes")
1119

1120 1121 1122 1123 1124 1125 1126 1127 1128
##################################################################
# Check for tracker-miner-rss
##################################################################

AC_ARG_ENABLE([miner_rss],
              AS_HELP_STRING([--enable-miner-rss],
                             [enable RSS data miner [[default=auto]]]),,
              [enable_tracker_miner_rss=auto])

1129 1130
enable_tracker_miner_rss=$enable_miner_rss

1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142
if test "x$enable_tracker_miner_rss" = "xyes" ; then
   if test "x$have_tracker_miner_rss" != "xyes"; then
      AC_MSG_ERROR([Couldn't find tracker-miner-rss dependencies ($TRACKER_MINER_RSS_REQUIRED).])
   fi
else
   if test "x$enable_tracker_miner_rss" = "xno" ; then
      have_tracker_miner_rss="no  (disabled)"
   fi
fi

AM_CONDITIONAL(HAVE_TRACKER_MINER_RSS, test "x$have_tracker_miner_rss" = "xyes")

1143
####################################################################
1144
# Check for tracker-miner-evolution
1145 1146
####################################################################

1147
tracker_miner_evolution_install_dir="/dev/null"
1148

1149 1150 1151
AC_ARG_ENABLE([miner_evolution],
              AS_HELP_STRING([--enable-miner-evolution],
                             [enable Evolution email data miner [[default=auto]]]),,
1152 1153 1154
              [enable_miner_evolution=auto])

enable_tracker_miner_evolution=$enable_miner_evolution
1155 1156 1157

if test "x$enable_tracker_miner_evolution" = "xyes"; then
   if test "x$have_tracker_miner_evolution" != "xyes"; then
1158
      AC_MSG_ERROR([Couldn't find Tracker Evolution plugin ($TRACKER_MINER_EVOLUTION_REQUIRED).])
1159 1160 1161 1162
   fi
else
   if test "x$enable_tracker_miner_evolution" = "xno"; then
      have_tracker_miner_evolution="no  (disabled)"
1163
   fi
1164
fi
1165

1166
if test "x$have_tracker_miner_evolution" = "xyes"; then
1167

1168 1169 1170 1171 1172 1173 1174
   AC_ARG_WITH([evolution_plugin_dir],
               AS_HELP_STRING([--with-evolution-plugin-dir],
                              [path to Evolution plugin directory]))
   if test "x$with_evolution_plugin_dir" = "x" ; then
      tracker_miner_evolution_install_dir=`$PKG_CONFIG $evolution_plugin_name --variable=plugindir`
   else
      tracker_miner_evolution_install_dir="$with_tracker_miner_evolution_install_dir"
1175
   fi
1176

1177 1178
   if test -z $tracker_miner_evolution_install_dir; then
      AC_MSG_ERROR([Couldn't find evolution plugin dir, consider using --with-evolution-plugin-dir.])
1179
   fi
1180
fi
1181

1182 1183
TRACKER_MINER_EVOLUTION_INSTALL_DIR=$tracker_miner_evolution_install_dir
AC_SUBST(TRACKER_MINER_EVOLUTION_INSTALL_DIR)
1184

1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195
AM_CONDITIONAL(HAVE_TRACKER_MINER_EVOLUTION, test "x$have_tracker_miner_evolution" = "xyes")

####################################################################
# Check for nautilus extension
####################################################################

AC_ARG_ENABLE([nautilus-extension],
              AS_HELP_STRING([--enable-nautilus-extension],
                             [enable the nautilus extension [[default=auto]]]),,
              [enable_tracker_nautilus=auto])

1196 1197
enable_tracker_nautilus_extension=$enable_nautilus_extension

1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271
if test "x$enable_tracker_nautilus_extension" = "xyes"; then
   if test "x$have_tracker_nautilus_extension" != "xyes"; then
      AC_MSG_ERROR([Couldn't find Tracker Nautilus extension dependencies ($TRACKER_NAUTILUS_EXTENSION_REQUIRED).])
   fi
else
   if test "x$enable_tracker_nautilus_extension" = "xno"; then
     have_tracker_nautilus_extension="no  (disabled)"
   fi
fi

if test "x$have_tracker_nautilus_extension" = "xyes"; then
   AC_ARG_WITH([nautilus-extensions-dir],
                  AS_HELP_STRING([--with-nautilus-extensions-dir],
                                 [path to Nautilus extensions directory]))

   if test "x$with_nautilus_extensions_dir" = "x"; then
      tracker_nautilus_extension_install_dir=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
   else
      tracker_nautilus_extension_install_dir="$with_nautilus_extension_install_dir"
   fi

   TRACKER_NAUTILUS_EXTENSION_INSTALL_DIR="$tracker_nautilus_extension_install_dir"
else
   TRACKER_NAUTILUS_EXTENSION_INSTALL_DIR="/dev/null"
fi

AC_SUBST([TRACKER_NAUTILUS_EXTENSION_INSTALL_DIR])

AM_CONDITIONAL(HAVE_TRACKER_NAUTILUS_EXTENSION, test "$have_tracker_nautilus_extension" = "yes")

####################################################################
# Check for tracker-writeback: Taglib for audio writeback support
####################################################################

AC_ARG_ENABLE(taglib,
              AS_HELP_STRING([--enable-taglib],
                             [enable writeback for audio files [[default=auto]]]),,
              [enable_taglib=auto])

if test "x$enable_taglib" != "xno" ; then
   PKG_CHECK_MODULES(TAGLIB,
                     [taglib_c >= $TAGLIB_REQUIRED],
                     [have_taglib=yes],
                     [have_taglib=no])

   TRACKER_WRITEBACK_CFLAGS="$TRACKER_WRITEBACK_CFLAGS $TAGLIB_CFLAGS"
   TRACKER_WRITEBACK_LIBS="$TRACKER_WRITEBACK_LIBS $TAGLIB_LIBS"
else
   have_taglib="no  (disabled)"
fi

AM_CONDITIONAL(HAVE_TAGLIB, test "x$have_taglib" = "xyes")

#################################################################
# Check for tracker-search-bar
##################################################################

AC_ARG_ENABLE([tracker-search-bar],
              AS_HELP_STRING([--enable-tracker-search-bar],
                             [enable tracker-search-bar[[default=auto]]]),,
              [enable_tracker_search_bar=auto])

if test "x$enable_tracker_search_bar" = "xyes" ; then
   if test "x$have_tracker_search_bar" != "xyes"; then
      AC_MSG_ERROR([Couldn't find tracker-search-bar dependencies ($TRACKER_SEARCH_BAR_REQUIRED).])
   fi
else
   if test "x$enable_tracker_search_bar" = "xno"; then
      have_tracker_search_bar="no  (disabled)"
   fi
fi

AM_CONDITIONAL(HAVE_TRACKER_SEARCH_BAR, test "$have_tracker_search_bar" = "yes")

1272 1273 1274 1275 1276 1277
##################################################################
# Check for tracker-needle
##################################################################

AC_ARG_ENABLE([tracker-needle],
              AS_HELP_STRING([--enable-tracker-needle],
1278
                             [enable tracker-needle [[default=auto]]]),,
1279 1280
              [enable_tracker_needle=auto])

1281
if test "x$enable_tracker_needle" = "xyes" ; then
1282 1283 1284 1285
   if test "x$have_tracker_needle" != "xyes"; then
      AC_MSG_ERROR([Couldn't find tracker-needle dependencies ($TRACKER_NEEDLE_REQUIRED).])
   fi
else
1286 1287 1288
   if test "x$enable_tracker_needle" = "xno"; then
      have_tracker_needle="no  (disabled)"
   fi
1289 1290
fi

1291 1292
if test "x$have_tracker_needle" = "xyes"; then
   AC_DEFINE(HAVE_TRACKER_NEEDLE, [1], [Define to 1 if tracker-needle is compiled])
1293
else
1294
   AC_DEFINE(HAVE_TRACKER_NEEDLE, [0], [Define to 0 if tracker-needle is not compiled])
1295 1296
fi

1297
AM_CONDITIONAL(HAVE_TRACKER_NEEDLE, test "$have_tracker_needle" = "yes")
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312

##################################################################
# Check for tracker-preferences
##################################################################

AC_ARG_ENABLE([tracker-preferences],
              AS_HELP_STRING([--enable-tracker-preferences],
                             [enable the tracker preferences dialog [[default=auto]]]),,
              [enable_tracker_preferences=auto])

if test "x$enable_tracker_preferences" = "xyes" ; then
   if test "x$have_tracker_preferences" != "xyes"; then
      AC_MSG_ERROR([Couldn't find tracker-preferences dependencies ($TRACKER_PREFERENCES_REQUIRED).])
   fi
else
1313
   if test "x$enable_tracker_preferences" = "xno"; then
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328
      have_tracker_preferences="no  (disabled)"
   fi
fi

AM_CONDITIONAL(HAVE_TRACKER_PREFERENCES, test "$have_tracker_preferences" = "yes")

##################################################################
# Check for tracker-explorer
##################################################################

AC_ARG_ENABLE([tracker-explorer],
              AS_HELP_STRING([--enable-tracker-explorer],
                             [enable tracker-explorer[[default=auto]]]),,
              [enable_tracker_explorer=auto])

1329
if test "x$enable_tracker_explorer" = "xyes" ; then
1330 1331 1332 1333
   if test "x$have_tracker_explorer" != "xyes"; then
      AC_MSG_ERROR([Couldn't find tracker-explorer dependencies ($TRACKER_EXPLORER_REQUIRED).])
   fi
else
1334 1335 1336
   if test "x$enable_tracker_explorer" = "xno"; then
      have_tracker_explorer="no  (disabled)"
   fi
1337 1338 1339 1340
fi

AM_CONDITIONAL(HAVE_TRACKER_EXPLORER, test "$have_tracker_explorer" = "yes")

1341 1342 1343 1344 1345 1346
##################################################################
# Check for tracker-resdump
##################################################################

AM_CONDITIONAL(HAVE_TRACKER_RESDUMP, test "$have_tracker_resdump" = "yes")

1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362
####################################################################
####################################################################
####################################################################
# This section is for tracker-extract dependencies
####################################################################
####################################################################
####################################################################

####################################################################
# Check for tracker-extract: enca for defect Russian/Cyrillic in MP3s
####################################################################

AC_ARG_WITH(enca,
            AS_HELP_STRING([--with-enca],
                           [enable libenca for Cyrillic language detection in MP3s [[default=auto]]]),,
            [enable_enca=auto])
1363

1364 1365
if test "x$enable_enca" != "xno" ; then
   PKG_CHECK_MODULES(ENCA, [enca >= 1.9], have_enca=yes, have_enca=no)
1366

1367 1368
   LIBTRACKER_EXTRACT_CFLAGS="$LIBTRACKER_EXTRACT_CFLAGS $ENCA_CFLAGS"
   LIBTRACKER_EXTRACT_LIBS="$LIBTRACKER_EXTRACT_LIBS $ENCA_LIBS"
1369

1370 1371
   if test "x$have_enca" = "xyes"; then
     AC_DEFINE(HAVE_ENCA, [], [Enca language detection aid])
1372
   fi
1373
else
1374
   have_enca="no  (disabled)"
1375 1376
fi

1377
AM_CONDITIONAL(HAVE_ENCA, test "$have_enca" = "yes")
1378

1379
####################################################################
1380
# Check for tracker-extract: libstreamanalyzer
1381 1382
####################################################################

1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
AC_ARG_ENABLE(libstreamanalyzer,
              AS_HELP_STRING([--enable-libstreamanalyzer],
                             [enable libstreamananalyzer [[default=no]]]),,
              [enable_libstreamanalyzer=no])

if test "x$enable_libstreamanalyzer" != "xno"; then
   PKG_CHECK_MODULES(LIBSTREAMANALYZER,
                     [libstreamanalyzer >= $LIBSTREAMANALYZER_REQUIRED],
                     [have_libstreamanalyzer=yes],
                     [have_libstreamanalyzer=no])
1393

1394 1395
   TRACKER_EXTRACT_CFLAGS="$TRACKER_EXTRACT_CFLAGS $LIBSTREAMANALYZER_CFLAGS"
   TRACKER_EXTRACT_LIBS="$TRACKER_EXTRACT_LIBS $LIBSTREAMANALYZER_LIBS"
1396

1397 1398 1399 1400 1401 1402
   if test "x$have_libstreamanalyzer" = "xyes"; then
      AC_DEFINE(HAVE_LIBSTREAMANALYZER, [], [Define if we have libstreamanalyzer])
   fi
else
   have_libstreamanalyzer="no  (disabled)"
fi
1403

1404 1405 1406 1407 1408
if test "x$enable_libstreamanalyzer" = "xyes"; then
   if test "x$have_libstreamanalyzer" != "xyes"; then
      AC_MSG_ERROR([Couldn't find libstreamanalyzer >= $LIBSTREAMANALYZER_REQUIRED and libstreamanalyzer.])
   fi
fi
1409

1410
AM_CONDITIONAL(HAVE_LIBSTREAMANALYZER, test "$have_libstreamanalyzer" = "yes")
1411

1412
##################################################################
1413
# Check for tracker-extract: libxml2 for XML/HTML extractor
1414 1415
##################################################################

1416 1417 1418 1419
AC_ARG_ENABLE(libxml2,
              AS_HELP_STRING([--disable-libxml2],
                             [disable HTML/XML extractors [[default=yes]]]),,
              [enable_libxml2=yes])
1420

1421 1422 1423 1424 1425 1426 1427
# Force libxml requirement for HAVE_MAEMO,
# given the miner-fs needs it for the userguide extraction.
if test "x$enable_maemo" = "xyes" ; then
  enable_libxml2="yes"
fi


1428 1429 1430 1431 1432 1433 1434 1435 1436 1437
if test "x$enable_libxml2" != "xno"; then
   PKG_CHECK_MODULES(LIBXML2,
                     [libxml-2.0 >= $LIBXML2_REQUIRED],
                     [have_libxml2=yes],
                     [have_libxml2=no])
   AC_SUBST(LIBXML2_CFLAGS)
   AC_SUBST(LIBXML2_LIBS)

   if test "x$have_libxml2" = "xyes"; then
      AC_DEFINE(HAVE_LIBXML2, [], [Define if we have libxml2])
1438
   fi
1439
else
1440
   have_libxml2="no  (disabled)"
1441 1442
fi

1443 1444 1445 1446
if test "x$enable_libxml2" = "xyes"; then
   if test "x$have_libxml2" != "xyes"; then
      AC_MSG_ERROR([Couldn't find libxml2 >= $LIBXML2_REQUIRED.])
   fi
1447 1448
fi

1449
AM_CONDITIONAL(HAVE_LIBXML2, test "x$have_libxml2" = "xyes")
1450

1451
##################################################################
1452
# Check for tracker-extract: GdkPixbuf for MP3 album art
1453
##################################################################
1454

1455 1456 1457 1458
AC_ARG_ENABLE(gdkpixbuf,
              AS_HELP_STRING([--enable-gdkpixbuf],
                             [enable GdkPixbuf support, (MP3 album art) [[default=auto]]]),,
              [enable_gdkpixbuf=auto])
1459

1460 1461 1462
##################################################################
# Check for tracker-extract: Qt for MP3 album art
##################################################################
1463

1464 1465 1466 1467 1468 1469
AC_ARG_ENABLE(qt,
              AS_HELP_STRING([--enable-qt],
                             [enable Qt support, (MP3 album art) [[default=auto]]]),,
              [enable_qt=auto])

selected_for_albumart="no  (disabled)"
1470

1471
##################################################################
1472
# Check for tracker-extract: Choose between GdkPixbuf/Qt
1473
##################################################################
1474

1475 1476 1477 1478 1479
if test "x$enable_qt" != "xno" && test "x$enable_gdkpixbuf" != "xyes"; then
   PKG_CHECK_MODULES(QT,
                     [QtGui >= $QT_REQUIRED],
                     [have_qt=yes],
                     [have_qt=no])
1480

1481 1482 1483 1484 1485 1486
   TRACKER_EXTRACT_CFLAGS="$TRACKER_EXTRACT_CFLAGS $QT_CFLAGS"
   TRACKER_EXTRACT_LIBS="$TRACKER_EXTRACT_LIBS $QT_LIBS"

   if test "x$have_qt" = "xyes"; then
      AC_DEFINE(HAVE_QT, [], [Define if we have Qt])
      selected_for_albumart="yes (qt)"
1487
   fi
1488
else
1489 1490 1491 1492 1493 1494
   have_qt="no  (disabled)"
fi

if test "x$enable_qt" = "xyes"; then
   if test "x$have_qt" != "xyes"; then
      AC_MSG_ERROR([Couldn't find Qt >= $QT_REQUIRED.])
1495
   fi
1496 1497
fi

1498
AM_CONDITIONAL(HAVE_QT, test "x$have_qt" = "xyes")
1499

1500 1501 1502 1503 1504
if test "x$enable_gdkpixbuf" != "xno" && test "x$enable_quill" != "xyes"; then
   PKG_CHECK_MODULES(GDKPIXBUF,
                     [gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED],
                     [have_gdkpixbuf=yes],
                     [have_gdkpixbuf=no])
1505

1506 1507
   TRACKER_EXTRACT_CFLAGS="$TRACKER_EXTRACT_CFLAGS $GDKPIXBUF_CFLAGS"
   TRACKER_EXTRACT_LIBS="$TRACKER_EXTRACT_LIBS $GDKPIXBUF_LIBS"
1508

1509 1510 1511
   if test "x$have_gdkpixbuf" = "xyes"; then
      AC_DEFINE(HAVE_GDKPIXBUF, [], [Define if we have GdkPixbuf])
      selected_for_albumart="yes (GdkPixbuf)"
1512 1513
   fi
else
1514
   have_gdkpixbuf="no  (disabled)"
1515 1516
fi

1517 1518 1519 1520
if test "x$enable_gdkpixbuf" = "xyes"; then
   if test "x$have_gdkpixbuf" != "xyes"; then
      AC_MSG_ERROR([Couldn't find GdkPixbuf >= $GDKPIXBUF_REQUIRED.])
   fi
1521 1522
fi

1523
AM_CONDITIONAL(HAVE_GDKPIXBUF, test "x$have_gdkpixbuf" = "xyes")
1524

1525 1526 1527
####################################################################
# Check for tracker-extract: gstreamer/xine/totem/mplayer/etc
####################################################################
1528

1529 1530
AC_ARG_ENABLE(generic-media-extractor,
              AS_HELP_STRING([--enable-generic-media-extractor=ARG],
1531
                             [enables one of the (gstreamer, xine, external, auto) generic media extractor backends [[default=auto]]]),,
1532
              [enable_generic_media_extractor=auto])
1533

1534
PKG_CHECK_MODULES(GSTREAMER,
1535 1536
                  [gstreamer-0.10 >= $GSTREAMER_REQUIRED
                   gstreamer-tag-0.10 >= $GSTREAMER_REQUIRED],
1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550
                  [have_libgstreamer=yes],
                  [have_libgstreamer=no])

AC_SUBST(GSTREAMER_CFLAGS)
AC_SUBST(GSTREAMER_LIBS)

PKG_CHECK_MODULES(XINE,
                  [libxine >= 1.0],
                  [have_libxine=yes],
                  [have_libxine=no])

AC_SUBST(XINE_CFLAGS)
AC_SUBST(XINE_LIBS)

1551
if test "x$enable_generic_media_extractor" = "xauto"; then
1552
   if test "$have_libgstreamer" = "yes"; then
1553
      have_generic_media_handler="yes"
1554
      have_generic_media_handler_app="GStreamer"
1555
   elif test "$have_libxine" = "yes"; then
1556 1557
      have_generic_media_handler_app="Xine"
      have_generic_media_handler="yes"
1558
   else
1559 1560
      have_generic_media_handler="?"
      have_generic_media_handler_app="An external generic_media player will be called"
1561
   fi
1562
elif test "x$enable_generic_media_extractor" = "xgstreamer"; then
1563
   if test "$have_libgstreamer" = "yes"; then
1564 1565
      have_generic_media_handler_app="GStreamer"
      have_generic_media_handler="yes"
1566
   else
1567
      AC_MSG_ERROR([Couldn't find GStreamer >= $GSTREAMER_REQUIRED])
1568
   fi
1569
elif test "x$enable_generic_media_extractor" = "xxine"; then
1570
   if test "$have_libxine" = "yes"; then