summaryrefslogtreecommitdiff
path: root/meson.build
blob: da221d8808d4b3ff3563d82073814450614ab79d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
project('tracker', 'c', 'vala', 'cpp', version: '1.13.0')

gnome = import('gnome')
i18n = import('i18n')
cc = meson.get_compiler('c')

# This is the X.Y used in -llibtracker-FOO-X.Y
tracker_api_version = '1.0'

glib_required = '2.40.0'

# 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
# 3.7.9 for FTS4 content= support
sqlite_required = '3.7.9'

avcodec = dependency('libavcodec', version: '>= 0.8.4', required: false)
avformat = dependency('libavformat', version: '>= 0.8.4', required: false)
avutil = dependency('libavutil', version: '>= 0.8.4', required: false)
cairo = dependency('cairo', version: '> 1.0')
camel = dependency('camel-1.2', version: '> 2.32.0', required: false)
dbus = dependency('dbus-1', version: '> 1.3.1')
eds = dependency('evolution-data-server-1.2', version: '> 2.32.0', required: false)
evo_plugin = dependency('evolution-plugin-3.0', required: false)
evo_shell = dependency('evolution-shell-3.0', version: '> 3.1', required: false)
exempi = dependency('exempi-2.0', version: '> 2.1.0', required: false)
flac = dependency('flac', version: '> 1.2.1', required: false)
gio = dependency('gio-2.0', version: '>' + glib_required)
gio_unix = dependency('gio-unix-2.0', version: '>' + glib_required)
glib = dependency('glib-2.0', version: '>' + glib_required)
gmodule = dependency('gmodule-2.0', version: '>' + glib_required)
gobject = dependency('gobject-2.0', version: '>' + glib_required)
gstreamer = dependency('gstreamer-1.0', required: false)
gstreamer_pbutils = dependency('gstreamer-pbutils-1.0', required: false)
gstreamer_tag = dependency('gstreamer-tag-1.0', required: false)
gtk3 = dependency('gtk+-3.0', version: '> 3.0.0', required: false)
gupnp_dlna = dependency('gupnp-dlna-2.0', version: '> 0.9.4', required: false)
gupnp_dlna_gst = dependency('gupnp-dlna-gst-2.0', version: '> 0.9.4', required: false)
icu_i18n = dependency('icu-i18n', version: '> 4.8.1.1', required: false)
icu_uc = dependency('icu-uc', version: '> 4.8.1.1', required: false)
json_glib = dependency('json-glib-1.0', version: '>= 1.0', required: true)
libcue = dependency('libcue', required: false)
libemail_utils = dependency('libemail-utils', required: false)
libemail_engine = dependency('libemail-engine', required: false)
libexif = dependency('libexif', version: '> 0.6', required: false)
libgrss = dependency('libgrss', version: '> 0.7', required: false)
libgsf = dependency('libgsf-1', version: '> 1.14.24', required: false)
libgxps = dependency('libgxps', required: false)
libiptcdata = dependency('libiptcdata', required: false)
libmediaart = dependency('libmediaart', version: '> 1.9.0', required: false)
libosinfo = dependency('libosinfo', version: '> 0.2.9', required: false)
libpng = dependency('libpng', version: '> 0.89', required: false)
libsoup = dependency('libsoup-2.4', version: '> 2.40', required: true)
libtiff = dependency('libtiff-4', required: false)
libxml2 = dependency('libxml-2.0', version: '> 2.6')
libvorbis = dependency('vorbisfile', version: '> 0.22')
nautilus_extension = dependency('libnautilus-extension', required: false)
network_manager = dependency('libnm-glib', version: '> 0.8', required: false)
poppler = dependency('poppler-glib', version: '> 0.16.0', required: false)
sqlite = dependency('sqlite3', version: '>' + sqlite_required)
taglib = dependency('taglib_c', version: '> 1.6', required: false)
totem_plparser = dependency('totem-plparser', required: false)
upower = dependency('libupower-glib', version: '> 0.9.0', required: false)
zlib = dependency('zlib')

libgif = cc.find_library('libgif', required: false)
libjpeg = cc.find_library('libjpeg', required: false)
libmath = cc.find_library('m')

# FIXME: here we work around a quirk todo with Meson and Vala: the 'uuid'
# pkg-config component corresponds to 'libuuid.vapi', but Meson assumes that
# .vapi name always matches pkg-config name, and will add `--pkg uuid` to the
# Vala commandline. By finding 'uuid' using find_library() instead, we get
# a dependency object back that won't cause any `--pkg` arguments to be added
# to the Vala commandline, but still works as expected for C code.
uuid = cc.find_library('uuid')

# There are various gchar vs. unsigned char warnings that occur in extract
# modules, it's not worth adding casts everywhere so we disable the warning.
add_project_arguments('-Wno-pointer-sign', language: 'c')

enable_fts = get_option('fts')
enable_extract = get_option('extract')
enable_writeback = get_option('writeback')

##################################################################
# Check for libtracker-common, make sure libstemmer exists
##################################################################

have_libstemmer = false
if get_option('stemmer') != 'no'
    stemmer = cc.find_library('stemmer')
    if stemmer.found()
        have_libstemmer = true
    elif get_option('stemmer') == 'yes'
        error('stemmer support explicitly requested, but stemmer library couldn\'t be found')
    endif
endif

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

if enable_fts
  sqlite3_builtin_fts5_test = '''
    #include <sqlite3.h>
    sqlite3 *db;
    int rc;
    rc = sqlite3_open(":memory:", &db);
    if (rc!=SQLITE_OK) return -1;
    rc = sqlite3_exec(db, "create table a(text)", 0, 0, 0);
    if (rc!=SQLITE_OK) return -1;
    rc = sqlite3_exec(db, "create virtual table t using fts5(content='a',text)", 0, 0, 0);
    if (rc!=SQLITE_OK) return -1;
  '''

  sqlite3_has_builtin_fts5 = cc.compiles(sqlite3_builtin_fts5_test,
    name: 'sqlite3 has builtin FTS5 module')
endif

##################################################################
# Check for libtracker-common: battery/mains power detection
#
# By default, AUTO with this order of preference:
#  1)  upower
#  2)  hal
##################################################################

have_hal = false
battery_detection_library_name = ''

if upower.found()
  if get_option('battery_detection') == 'auto' or get_option('battery_detection') == 'upower'
    battery_detection_library = upower
    battery_detection_library_name = 'upower'
  endif
elif get_option('battery_detection') == 'upower'
  error('upower explicitly requested, but upower library was not found')
endif

if battery_detection_library_name == ''
  hal = dependency('hal', version: '> 0.5', required: false)

  if hal.found()
    battery_detection_library = hal
    battery_detection_library_name = 'hal'
  elif get_option('battery_detection') == 'hal'
    error('HAL explicitly requested, but not found')
  else
    battery_detection_library_name = '(none)'
  endif
endif

##################################################################
# Check for libtracker-data and libtracker-fts: Unicode support
#
# By default, AUTO with this order of preference:
#  1)  libunistring
#  2)  libicu
##################################################################

have_libicu = false
unicode_library_name = ''

if icu_i18n.found() and icu_uc.found()
  have_libicu = true
endif

if have_libicu
  if get_option('unicode_support') == 'auto' or get_option('unicode_support') == 'icu'
    unicode_library = declare_dependency(
        dependencies: [icu_uc, icu_i18n]
    )
    unicode_library_name = 'icu'
  endif
elif get_option('unicode_support') == 'icu'
  error('libicu explicitly requested, but icu-i18n and icu-uc libraries were not found')
endif

if unicode_library_name == ''
  libunistring = cc.find_library('libunistring', required: false)

  if libunistring.found()
    unicode_library = libunistring
    unicode_library_name = 'unistring'
  elif get_option('unicode_support') == 'unistring'
    error('libunistring explicitly requested, but not found')
  else
    error('Neither libicu or libunistring were found for Unicode support.')
  endif
endif

####################################################################
# Check for tracker-miner-evolution
####################################################################

if camel.found() and eds.found() and evo_plugin.found() and evo_shell.found() and libemail_utils.found() and libemail_engine.found()
  have_tracker_miner_evolution = true
  tracker_miner_evolution_install_dir = evo_plugin.get_variable('plugindir')
else
  have_tracker_miner_evolution = false
  tracker_miner_evolution_install_dir = ''
endif

####################################################################
# Check for tracker-miner-thunderbird
####################################################################

thunderbird = find_program('thunderbird', required: false)
if thunderbird.found()
  thunderbird_version = run_command(thunderbird, '--version').stdout().strip().split()[1]

  message('Found Mozilla Thunderbird email client version ' + thunderbird_version)

  have_tracker_miner_thunderbird = true
  tracker_miner_thunderbird_install_dir = join_paths(get_option('prefix'), 'lib', 'thunderbird-' + thunderbird_version, 'extensions')
else
  have_tracker_miner_thunderbird = false
  tracker_miner_thunderbird_install_dir = ''
endif

####################################################################
# Check for tracker-miner-firefox
####################################################################

firefox = find_program('firefox', required: false)
if firefox.found()
  firefox_version = run_command(firefox, '--version').stdout().strip().split()[2]

  message('Found Mozilla Firefox web browser version ' + firefox_version)

  have_tracker_miner_firefox = true
  tracker_miner_firefox_install_dir = join_paths(get_option('prefix'), 'lib', 'firefox-' + firefox_version, 'extensions')
else
  have_tracker_miner_firefox = false
  tracker_miner_firefox_install_dir = ''
endif

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

if nautilus_extension.found()
  nautilus_extension = dependency('libnautilus-extension', required: true)
  tracker_nautilus_extension_install_dir = nautilus_extension.get_pkgconfig_variable('extensiondir')
else
  tracker_nautilus_extension_install_dir = ''
endif

####################################################################
# This section is for tracker-extract dependencies
####################################################################

##########################################################################
# Check for tracker-extract: icu or enca for detecting Cyrillic in MP3s
#
# By default, AUTO with this order of preference:
#  1)  icu
#  2)  enca
##########################################################################

charset_library_name = 'none'

if have_libicu
  if get_option('charset_detection') == 'auto' or get_option('charset_detection') == 'icu'
    charset_library = declare_dependency(
       dependencies: [icu_uc, icu_i18n]
    )
    charset_library_name = 'icu'
  endif
else
  if get_option('charset_detection') == 'icu'
    error('libicu requested for character set detection, but it was not found')
  endif
endif

if charset_library_name == 'none' and get_option('charset_library') != 'none'
  enca = dependency('enca', version: '>= 1.9', required: false)

  if enca.found()
    charset_library = enca
    charset_library_name = 'enca'
  elif get_option('enca') == 'yes'
    error('enca support explicitly requested, but enca couldn\'t be found')
  endif
endif

####################################################################
# Check for tracker-extract: gstreamer/etc
####################################################################

generic_media_handler = []
generic_media_handler_name = 'none'

if get_option('generic_media_extractor') == 'auto'
  if gstreamer.found() and gstreamer_tag.found()
    generic_media_handler = [gstreamer, gstreamer_tag]
    generic_media_handler_name = 'gstreamer'
  elif avcodec.found() and avformat.found() and avutil.found()
    generic_media_handler = [avcodec, avformat, avutil]
    generic_media_handler_name = 'libav'
  else
    generic_media_handler_name = 'none'
    generic_media_handler = []
  endif
elif get_option('generic_media_extractor') == 'gstreamer'
  if gstreamer.found() and gstreamer_tag.found()
    generic_media_handler = [gstreamer, gstreamer_tag]
    generic_media_handler_name = 'gstreamer'
  else
    error('GStreamer media handler was enabled but required GStreamer libraries were not found')
  endif
elif get_option('generic_media_extractor') == 'libav'
  if avcodec.found() and avformat.found() and avutil.found()
    generic_media_handler = [avcodec, avformat, avutil]
    generic_media_handler_name = 'libav'
  else
    error('libav media handler was enabled but required libav libraries were not found')
  endif
endif

###########################################################################
# Check for gstreamer backend: tagreadbin/decodebin2/discoverer/gupnp-dlna
###########################################################################

gstreamer_backend_name = ''

if generic_media_handler_name == 'gstreamer'
  if get_option('gstreamer_backend') == 'discoverer'
    if gstreamer_pbutils.found()
      gstreamer_backend_name = 'Discoverer'
    else
      error('GStreamer Discoverer backend requires GStreamer pbutils library')
    endif
  elif get_option('gstreamer_backend') == 'gupnp'
    if gupnp_dlna.found() and gupnp_dlna_gst.found()
      gstreamer_backend_name = 'GUPnP-DNLA'
    else
      error('GStreamer GUPnP-DNLA backend requires the gupNp and gupnp-gst libraries')
    endif
  endif
endif

####################################################################
# D-Bus service files
####################################################################

if get_option('dbus_services') == ''
  dbus_services_dir = dbus.get_pkgconfig_variable('session_bus_services_dir')
else
  dbus_services_dir = get_option('dbus_services')
endif

####################################################################
# systemd user services
####################################################################

install_systemd_user_services = false
if get_option('systemd_user_services') == 'yes' or get_option('systemd_user_services') == 'auto'
  systemd = dependency('systemd', required: false)
  if systemd.found()
    systemd_user_services_dir = systemd.get_pkgconfig_variable('systemduserunitdir')
  else
    systemd_user_services_dir = join_paths(get_option('libdir'), 'systemd', 'user')
  endif
  install_systemd_user_services = true
elif get_option('systemd_user_services') == 'no' or get_option('systemd_user_services') == ''
  install_systemd_user_services = false
  systemd_user_services_dir = '(disabled)'
else
  install_systemd_user_services = true
  systemd_user_services_dir = get_option('systemd_user_services')
endif

####################################################################
# bash-completion
####################################################################

install_bash_completion = false
if get_option('bash_completion') == 'yes' or get_option('bash_completion') == 'auto'
  bash_completion_package = dependency('bash-completion', required: false)
  if bash_completion_package.found()
    bash_completion_dir = bash_completion_package.get_variable('completionsdir')
  else
    bash_completion_dir = join_paths(get_option('prefix'), get_option('datadir'), 'bash-completion', 'completions')
  endif
  install_bash_completion = true
elif get_option('bash_completion') == 'no' or get_option('bash_completion') == ''
  install_bash_completion = false
  bash_completion_dir = '(disabled)'
else
  install_bash_completion = true
  bash_completion_dir = get_option('bash_completion')
endif

tracker_major_version = meson.project_version().split('.')[0].to_int()
tracker_minor_version = meson.project_version().split('.')[1].to_int()
tracker_micro_version = meson.project_version().split('.')[2].to_int()

conf = configuration_data()

# Config that goes in config.h
conf.set('DISABLE_JOURNAL', get_option('journal') == false)
conf.set('USING_UNZIPPSFILES', get_option('unzip_ps_gz_files') == false)

conf.set('HAVE_TRACKER_EXTRACT', enable_extract)
conf.set10('HAVE_TRACKER_FTS', enable_fts)
conf.set('HAVE_TRACKER_WRITEBACK', enable_writeback)

conf.set('HAVE_BUILTIN_FTS', sqlite3_has_builtin_fts5)
conf.set('HAVE_ENCA', charset_library_name == 'enca')
conf.set('HAVE_EXEMPI', exempi.found())
conf.set('HAVE_GSTREAMER', generic_media_handler_name == 'gstreamer')
conf.set('GSTREAMER_BACKEND_DISCOVERER', gstreamer_backend_name == 'Discoverer')
conf.set('GSTREAMER_BACKEND_GUPNP_DLNA', gstreamer_backend_name == 'GUPnP-DNLA')
conf.set('HAVE_HAL', battery_detection_library_name == 'hal')
conf.set('HAVE_LIBCUE', libcue.found())
conf.set('HAVE_LIBCUE2', libcue.version() >= '2.0.0')
conf.set10('HAVE_LIBICU', unicode_library_name == 'icu')
conf.set('HAVE_LIBICU_CHARSET_DETECTION', charset_library_name == 'icu')
conf.set('HAVE_LIBEXIF', libexif.found())
conf.set('HAVE_LIBIPTCDATA', libiptcdata.found())
conf.set('HAVE_LIBMEDIAART', libmediaart.found())
conf.set('HAVE_LIBSTEMMER', have_libstemmer)
conf.set('HAVE_LIBUNISTRING', unicode_library_name == 'unistring')
conf.set('HAVE_NETWORK_MANAGER', network_manager.found())
conf.set('HAVE_UPOWER', battery_detection_library_name == 'upower')

conf.set('HAVE_GETLINE', cc.has_function('getline', prefix : '#include <stdio.h>'))
conf.set('HAVE_POSIX_FADVISE', cc.has_function('posix_fadvise', prefix : '#include <fcntl.h>'))
conf.set('HAVE_STATVFS64', cc.has_header_symbol('sys/statvfs.h', 'statvfs64', args: '-D_LARGEFILE64_SOURCE'))
conf.set('HAVE_STRNLEN', cc.has_function('strnlen', prefix : '#include <string.h>'))

conf.set('LOCALEDIR', '"@0@/@1@"'.format(get_option('prefix'), get_option('localedir')))
conf.set('SHAREDIR', '"@0@/@1@"'.format(get_option('prefix'), get_option('datadir')))
conf.set('TRACKER_MINERS_DIR', '"@0@/@1@/tracker/miners"'.format(get_option('prefix'), get_option('datadir')))
conf.set('TRACKER_UI_DIR', '"@0@/@1@/tracker/"'.format(get_option('prefix'), get_option('datadir')))

conf.set('GETTEXT_PACKAGE', '"tracker"')
conf.set('PACKAGE_VERSION', '"@0@"'.format(meson.project_version()))
conf.set('TRACKER_VERSION', '"@0@"'.format(meson.project_version()))
conf.set('TRACKER_MAJOR_VERSION', tracker_major_version)
conf.set('TRACKER_MINOR_VERSION', tracker_minor_version)
conf.set('TRACKER_MICRO_VERSION', tracker_micro_version)
conf.set('TRACKER_INTERFACE_AGE', 0)
conf.set('TRACKER_BINARY_AGE', 100 * tracker_minor_version + tracker_micro_version)

# Config that goes in some other generated files (.desktop, .pc, etc)
conf.set('exec_prefix', get_option('prefix'))
conf.set('includedir', join_paths(get_option('prefix'), get_option('includedir')))
conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir')))
conf.set('libexecdir', join_paths(get_option('prefix'), get_option('libexecdir')))
conf.set('prefix', get_option('prefix'))
conf.set('LIBTRACKER_MINER_PC_REQUIRES', 'libmediaart-2.0')
conf.set('TRACKER_API_VERSION', '1.0')
conf.set('VERSION', meson.project_version())

configure_file(input: 'config.h.meson.in',
               output: 'config.h',
               configuration: conf)

# Needed for O_NOATIME, and probably other stuff.
add_global_arguments('-D_GNU_SOURCE', language: 'c')
# Needed for statvfs64, and probably other stuff
add_global_arguments('-D_LARGEFILE64_SOURCE', language: 'c')

have_tracker_miner_fs = true
have_tracker_miner_apps = true
have_tracker_miner_rss = true
have_tracker_miner_firefox = true
have_tracker_extract = true
have_tracker_writeback = true
have_tracker_needle = true
have_tracker_preferences = true

configinc = include_directories('./')
srcinc = include_directories('src/')

tracker_internal_libs_dir = join_paths(get_option('prefix'), get_option('libdir'), 'tracker-' + tracker_api_version)

tracker_extract_modules_dir = join_paths(get_option('prefix'), get_option('libdir'), 'tracker-@0@/extract-modules'.format(tracker_api_version))
# NOTE: We don't use ${TRACKER_API_VERSION} because other content like
# the ontology is installed to the same location.
tracker_extract_rules_dir = join_paths(get_option('prefix'), get_option('datadir'), 'tracker/extract-rules')
tracker_miner_services_dir = join_paths(get_option('prefix'), get_option('datadir'), 'tracker/miners')
tracker_writeback_modules_dir = join_paths(get_option('prefix'), get_option('libdir'), 'tracker-@0@/writeback-modules'.format(tracker_api_version))

vapi_dir = join_paths(get_option('prefix'), get_option('datadir'), 'vala', 'vapi')

subdir('src')

if get_option('docs')
  subdir('docs')
endif

subdir('examples')
subdir('utils')

subdir('tests')

subdir('po')

# Make sure we're not using versions of SQLite which cause problems.
#
# Avoid versions:
sqlite_safe = true
if sqlite.version().version_compare('>= 3.7.10') and sqlite.version().version_compare('<= 3.7.13')
  # See https://mail.gnome.org/archives/tracker-list/2012-October/msg00028.html
  sqlite_safe = false
elif sqlite.version().version_compare('3.8.1')
  # See https://mail.gnome.org/archives/tracker-list/2013-November/msg00021.html
  sqlite_safe = false
elif sqlite.version().version_compare('3.8.4.2')
  # See https://mail.gnome.org/archives/tracker-list/2014-April/msg00001.html
  sqlite_safe = false
endif

summary = [
  '\nBuild Configuration:',
  '    Prefix:                                 ' + get_option('prefix'),
  '    Source code location:                   ' + meson.source_root(),
  '    Compiler:                               ' + cc.get_id(),
  '\nFeature Support:',
  '    Battery/mains power detection:          ' + battery_detection_library_name,
  '    Support for network status detection:   ' + network_manager.found().to_string(),
  '    Unicode support library:                ' + unicode_library_name,
  '    Build with Journal support:             ' + get_option('journal').to_string(),
  '    Build with SQLite FTS support:          @0@ (built-in FTS: @1@)'.format(
     get_option('fts'), sqlite3_has_builtin_fts5),
  '    Build with Stemming support:            ' + have_libstemmer.to_string(),
  '    Cache media art                         ' + libmediaart.found().to_string(),
  '    Bash completion support:                ' + bash_completion_dir,
  '\nData Miners / Writebacks:',
  '    FS (File System):                       ' + have_tracker_miner_fs.to_string(),
  '    Applications:                           ' + have_tracker_miner_apps.to_string(),
  '    RSS:                                    ' + have_tracker_miner_rss.to_string(),
  '    Email:',
  '        Evolution:                        @0@ (@1@)'.format(
      have_tracker_miner_evolution, tracker_miner_evolution_install_dir),
  '        Thunderbird:                      @0@ (@1@)'.format(
      have_tracker_miner_thunderbird, tracker_miner_thunderbird_install_dir),
  '   Bookmarks:',
  '        FireFox:                          @0@ (@1@)'.format(
      have_tracker_miner_firefox, tracker_miner_firefox_install_dir),
  '',
  '   Extract (secondary extraction):     ' + have_tracker_extract.to_string(),
  '   Writeback (writing changes back):   ' + have_tracker_writeback.to_string(),
]


if have_tracker_extract
  summary += [
    '\nMetadata Extractors:',
    '    Support PNG:                            ' + libpng.found().to_string(),
    '    Support PDF:                            ' + poppler.found().to_string(),
    '    Support XPS:                            ' + libgxps.found().to_string(),
    '    Support GIF:                            @0@ (xmp: @1@)'.format(libgif.found().to_string(), exempi.found().to_string()),
    '    Support JPEG:                           @0@ (xmp: @1@, exif: @2@, iptc: @3@)'.format(
        libjpeg.found().to_string(), exempi.found().to_string(), libexif.found().to_string(), libiptcdata.found().to_string()),
    '    Support TIFF:                           @0@ (xmp: @1@, exif: @2@, iptc: @3@)'.format(
        libtiff.found().to_string(), exempi.found().to_string(), libexif.found().to_string(), libiptcdata.found().to_string()),
    '    Support Vorbis (ogg/etc):               ' + libvorbis.found().to_string(),
    '    Support Flac:                           ' + flac.found().to_string(),
    '    Support MS & Open Office:               ' + libgsf.found().to_string(),
    '    Support XML / HTML:                     ' + libxml2.found().to_string(),
    '    Support embedded / sidecar XMP:         ' + exempi.found().to_string(),
    '    Support generic media formats:          @0@ (backend: @1@)'.format(
        generic_media_handler_name, gstreamer_backend_name),
    '    Support cue sheet parsing:              ' + libcue.found().to_string(),
    '    Support playlists (w/ Totem):           ' + totem_plparser.found().to_string(),
    '    Support ISO image parsing:              ' + libosinfo.found().to_string(),
    '    Support AbiWord document parsing:       true',
    '    Support DVI parsing:                    true',
    '    Support MP3 parsing:                    true',
    '    Support MP3 tag charset detection:      ' + charset_library_name,
    '    Support PS parsing:                     true',
    '    Support text parsing:                   true',
    '    Support icon parsing:                   true'
  ]
endif


if have_tracker_writeback
  summary += [
    '\nWriteback Formats:',
    '    Audio files using Taglib:               ' + taglib.found().to_string(),
    '    XMP:                                    ' + exempi.found().to_string(),
  ]
endif

summary += [
    '\nApplications:',
    '    Build tracker-preferences:              ' + have_tracker_preferences.to_string(),
    '    Build tracker-needle:                   ' + have_tracker_needle.to_string(),
    '\nFrameworks / Options:',
    '    Support Nautilus file manager           @0@ (@1@)'.format(
        nautilus_extension.found().to_string(), tracker_nautilus_extension_install_dir),
    '    Support Guaranteed Metadata             ' + get_option('guarantee_metadata').to_string(),
]

message('\n'.join(summary))

if not sqlite_safe
  message('''WARNING:
        SQLite3 version @0@ is not safe. For detail
        3.7.10 - 3.7.13: https://mail.gnome.org/archives/tracker-list/2012-October/msg00028.html
        3.8.1:           https://mail.gnome.org/archives/tracker-list/2013-November/msg00021.html
        3.8.4.2:         https://mail.gnome.org/archives/tracker-list/2014-April/msg00001.html
  ''').format(sqlite.version())
endif