summaryrefslogtreecommitdiff
path: root/configure.ac
blob: e39c62b5d75b8adf17527ed996e5a0a4db686580 (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
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
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
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# This file is part of Tracker.

AC_PREREQ(2.57)
AC_INIT([tracker],[0.6.0],[tracker-list@gnome.org])

AC_CONFIG_SRCDIR([src/trackerd/trackerd.c])
AM_INIT_AUTOMAKE([dist-bzip2])

AC_SUBST(PACKAGE_URL, [http://www.tracker-project.org])

CFLAGS="$CFLAGS"

# Checks for programs.
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL

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

AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([You must have zlib.h and zlib installed])])

AC_CHECK_HEADER([magic.h], [], [AC_MSG_ERROR([You must have magic.h and libmagic installed])])

# Checks for functions
AC_CHECK_FUNCS([getline])

dnl Library Checks
DBUS_REQUIRED=0.60
GLIB_REQUIRED=2.9.1
PANGO_REQUIRED=1.0.0
GMIME_REQUIRED=2.1.0

PKG_CHECK_MODULES(GLIB2, [ glib-2.0 >= $GLIB_REQUIRED ])
AC_SUBST(GLIB2_CFLAGS)
AC_SUBST(GLIB2_LIBS)

# Check for gthread 2.0
PKG_CHECK_MODULES(GTHREAD, [ gthread-2.0 >= $GLIB_REQUIRED ])
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)

# Check for gobject 2.0
PKG_CHECK_MODULES(GOBJECT, [ gobject-2.0 >= $GLIB_REQUIRED ])
AC_SUBST(GOBJECT_CFLAGS)
AC_SUBST(GOBJECT_LIBS)

#Check for pango
PKG_CHECK_MODULES(PANGO, [ pango >= $PANGO_REQUIRED ])
AC_SUBST(PANGO_CFLAGS)
AC_SUBST(PANGO_LIBS)

# Check for GMime
PKG_CHECK_MODULES(GMIME, [ gmime-2.0 >= $GMIME_REQUIRED ])
AC_SUBST(GMIME_CFLAGS)
AC_SUBST(GMIME_LIBS)

# Check for Dbus 0.50 or higher
PKG_CHECK_MODULES(DBUS, [ dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED ])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)

# Check for libpng 1.2 or higher
PKG_CHECK_MODULES(LIBPNG, [ libpng >= 1.2 ])
AC_SUBST(LIBPNG_CFLAGS)
AC_SUBST(LIBPNG_LIBS)

####################################################################
# DBus Service
####################################################################

dnl DBus services dir
AC_ARG_WITH([session_bus_services_dir],
            AC_HELP_STRING([--with-session-bus-services-dir], [Path to DBus services directory]))

if test "x$with_session_bus_services_dir" = "x" ; then
   services_dir="`pkg-config --variable session_bus_services_dir dbus-1`"
else
   services_dir="$with_session_bus_services_dir"
fi

DBUS_SERVICES_DIR="$services_dir"
AC_SUBST(DBUS_SERVICES_DIR)


####################################################################
# Deskbar Applet Handler
####################################################################

AC_ARG_ENABLE([deskbar_applet],
              AC_HELP_STRING([--enable-deskbar-applet], [Enable support for deskbar applet]),,
              [enable_deskbar_applet=no])

AM_CONDITIONAL(USING_DESKBAR_APPLET, test "x$enable_deskbar_applet" != "xno")

AC_ARG_WITH([deskbar_applet_handler_dir],
            AC_HELP_STRING([--with-deskbar-applet-handler-dir], [Path to Deskbar handler directory]))

if test "x$with_deskbar_applet_handler_dir" = "x" ; then
   handler_dir="`pkg-config --variable handlersdir deskbar-applet`"
else
   handler_dir="$with_deskbar_applet_handler_dir"
fi

DESKBAR_HANDLER_DIR="$handler_dir"
AC_SUBST(DESKBAR_HANDLER_DIR)

####################################################################
# Compiler warning checks
####################################################################
AC_ARG_ENABLE(warnings,
              AC_HELP_STRING([--disable-warnings], [disable GCC warnings]),,
              [enable_warnings=yes])

if test "x$enable_warnings" = "xyes"; then
   CFLAGS="\
   -Wall \
   -Wchar-subscripts \
   -Wnested-externs \
   -Wpointer-arith \
   -Wsign-compare \
   $CFLAGS"
fi

####################################################################
# Compiler generate debug code
####################################################################


AC_ARG_ENABLE([debug_code],
              AC_HELP_STRING([--enable-debug-code], [build with debug symbols]),,
              [enable_debug_code=no])

if test "x$enable_debug_code" = "xyes"; then
	CFLAGS="-g $CFLAGS"
fi

####################################################################
# gettext/intltool support 
####################################################################

ALL_LINGUAS="ar ca de dz en_GB es et fi fr gl it nb ru sl sv"
AC_SUBST(ALL_LINGUAS)

GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
                   [The gettext translation domain])

AM_GLIB_GNU_GETTEXT
AC_PROG_INTLTOOL([0.22])

# The following lines replace AM_GLIB_DEFINE_LOCALEDIR(TRACKER_LOCALEDIR)
# due to the bug with autoconf 2.60

dnl Set TRACKER_LOCALEDIR in config.h.
if test "x${prefix}" = "xNONE";
then
	TRACKER_LOCALEDIR="${ac_default_prefix}/${DATADIRNAME}/locale"
else
	TRACKER_LOCALEDIR="${prefix}/${DATADIRNAME}/locale"
fi

AC_DEFINE_UNQUOTED(TRACKER_LOCALEDIR, "$TRACKER_LOCALEDIR",
		[The directory in which locale data will be stored])

# end of AM_GLIB_DEFINE_LOCALEDIR(TRACKER_LOCALEDIR) replacement

####################################################################
# check for newer glib (>= 2.12.0) for g_option_context_set_summary ()
# availability
####################################################################
RECENT_GLIB=2.12.0

PKG_CHECK_MODULES(glib2, [ glib-2.0 >= $RECENT_GLIB ],
                  [have_recent_glib=yes], [have_recent_glib=no])

if test "$have_recent_glib" = "yes" ; then
   AC_DEFINE(HAVE_RECENT_GLIB, 1, [Define if we have recent glib])
fi

AM_CONDITIONAL(HAVE_RECENT_GLIB, test "$have_recent_glib" = "yes")

####################################################################
# check for GStreamer or Xine. Otherwise, call an external video
# player (Totem or MPlayer).
####################################################################

AC_ARG_ENABLE(video-extractor,
	AC_HELP_STRING(
		[--enable-video-extractor=ARG],
		[enables one of the (gstreamer, xine, external, auto) video extractor backends]),,
	[enable_video_extractor=auto])

PKG_CHECK_MODULES(GSTREAMER, 
	[gstreamer-0.10 >= 0.10.0],
	[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)


if test "x$enable_video_extractor" = "xauto"; then
	if test "$have_libgstreamer" = "yes"; then
		videos_handler="GStreamer"
		videos_are_handled="yes"
	elif test "$have_libxine" = "yes"; then
		videos_handler="Xine"
		videos_are_handled="yes"
	else
		videos_are_handled="?"
		videos_handler="An external video player will be called"
	fi
elif test "x$enable_video_extractor" = "xgstreamer"; then
	if test "$have_libgstreamer" = "yes"; then
		videos_handler="GStreamer"
		videos_are_handled="yes"
	else
		AC_MSG_ERROR([***Gstreamer requested but not found - exiting!])
	fi
elif test "x$enable_video_extractor" = "xxine"; then
	if test "$have_libxine" = "yes"; then
		videos_handler="Xine"
		videos_are_handled="yes"
	else
		AC_MSG_ERROR([***libxine requested but not found - exiting!])
	fi
else
	videos_are_handled="?"
	videos_handler="An external video player will be called"
fi
if test "$videos_handler" = "GStreamer"; then
	AC_DEFINE(HAVE_GSTREAMER, [], [Define if we have GStreamer])
	AM_CONDITIONAL(USING_GSTREAMER, true)
	AM_CONDITIONAL(USING_LIBXINE, false)
	AM_CONDITIONAL(USING_EXTERNAL_VIDEO_PLAYER, false)
elif test "$videos_handler" = "Xine"; then
	AC_DEFINE(HAVE_LIBXINE, [], [Define if we have Libxine])
	AM_CONDITIONAL(USING_LIBXINE, true)
	AM_CONDITIONAL(USING_EXTERNAL_VIDEO_PLAYER, false)
	AM_CONDITIONAL(USING_GSTREAMER, false)
else
	AM_CONDITIONAL(USING_EXTERNAL_VIDEO_PLAYER, true)
	AC_DEFINE(USING_EXTERNAL_VIDEO_PLAYER, [], [Define that Tracker will try to use external video players])
	AM_CONDITIONAL(USING_LIBXINE, false)
	AM_CONDITIONAL(USING_GSTREAMER, false)
fi


####################################################################
# External SQLite check
####################################################################

SQLITE_REQUIRED=3.2

AC_ARG_ENABLE(external_sqlite, 
	AC_HELP_STRING(
		[--enable-external-sqlite],
		[build using system's sqlite which must be a threadsafe version]),,
	[enable_external_sqlite=no])

if test "x$enable_external_sqlite" = "xyes"; then
	PKG_CHECK_MODULES(SQLITE3, [ sqlite3 >= $SQLITE_REQUIRED ])
	AM_CONDITIONAL(USING_EXTERNAL_SQLITE, true)
else
	SQLITE3_CFLAGS="-I\$(top_srcdir)/src/sqlite3"
	SQLITE3_LIBS="\$(top_builddir)/src/sqlite3/libsqlite-private.la"
	AM_CONDITIONAL(USING_EXTERNAL_SQLITE, false)
fi		

AC_SUBST(SQLITE3_CFLAGS)
AC_SUBST(SQLITE3_LIBS)


###############################################################################
# Check for file monitor backends
###############################################################################

FAM_LIBS=
inotify_support=no
inotify_linux=no
inotify_header=none
fam_support=no
fam_type=none

AM_CONDITIONAL(HAVE_INOTIFY, false)
AM_CONDITIONAL(HAVE_INOTIFY_LINUX, false)
AM_CONDITIONAL(HAVE_FAM, false)

AC_ARG_ENABLE(file-monitoring,
	AC_HELP_STRING(
		[--enable-file-monitoring=ARG],
		[enables one of the (inotify, fam, polling, auto) file monitoring backends]),,
	enable_file_monitoring=auto)


AC_CHECK_HEADERS([sys/inotify.h],
		 [
		 inotify_support=yes
		 inotify_linux=no
		 ])

AC_CHECK_HEADERS([linux/inotify.h],
		 [
		 inotify_linux=yes
		 inotify_support=yes
		 ])

AC_CHECK_LIB(fam, FAMOpen,
		[AC_CHECK_HEADERS(fam.h,
		[
		fam_support=yes
		fam_type=fam
		],[fam_support=no])],
		[fam_support=no])

PKG_CHECK_MODULES(GAMIN, 
		gamin,
		[
		fam_support=yes
		fam_type=gamin
		], 
		[
		fam_support=no
		])

if test "x$enable_file_monitoring" = "xauto"; then
	if test "$inotify_support"  = "yes"; then
		primary_backend=inotify
		if test "$inotify_linux" = "yes"; then
			inotify_header="linux/inotify.h"
		else
			inotify_header="sys/inotify.h"
		fi

	elif test "$fam_support" = "yes"; then
		if test "$fam_type" = "gamin"; then
			primary_backend="gamin"
		else
			primary_backend="fam"
		fi
	else
		primary_backend="polling only"
	fi
elif test "x$enable_file_monitoring" = "xinotify"; then
	if test "$inotify_support" = "no"; then
		AC_MSG_ERROR([***inotify requested but not found - exiting!])
	else
		primary_backend="inotify"
		if test "$inotify_linux" = "yes"; then
			inotify_header="linux/inotify.h"
		else
			inotify_header="sys/inotify.h"
		fi
	fi
elif test "x$enable_file_monitoring" = "xfam"; then
	if test "$fam_support" = "no"; then
		AC_MSG_ERROR([***fam requested but not found - exiting!])
	else
		if test "$fam_type" = "gamin"; then
			primary_backend="gamin"
		else
			primary_backend="fam"
		fi
	fi
else
	primary_backend="polling only"
fi

if test "$primary_backend" = "inotify"; then
	AC_DEFINE(HAVE_INOTIFY, [], [Define if we have inotify])
	AM_CONDITIONAL(HAVE_INOTIFY, true)
	if test "$inotify_linux" = "yes"; then
			AC_DEFINE(HAVE_INOTIFY_LINUX, [], 
			[
			Define if we have inotify and header is linux/inotify.h
			])
			AM_CONDITIONAL(HAVE_INOTIFY_LINUX, true)
	fi
elif test "$primary_backend" = "gamin"; then 
	AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
	AM_CONDITIONAL(HAVE_FAM, true)
	FAM_LIBS="-lgamin-1"
	AC_SUBST(FAM_LIBS)
elif test "$primary_backend" = "fam"; then
	AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
	AM_CONDITIONAL(HAVE_FAM, true)
	FAM_LIBS="-lfam"
	AC_SUBST(FAM_LIBS)
fi


##################################################################
# Enable building libtracker-gtk?
##################################################################
LIBTRACKERGTK_GTK_REQUIRED=2.8.20


AC_ARG_ENABLE([libtrackergtk], AC_HELP_STRING([--disable-libtrackergtk], [Disable libtrackergtk]),,[enable_libtrackergtk=yes])
if test "x$enable_libtrackergtk" != "xno" ; then

   	libtrackergtk_modules="\
        	glib-2.0    >=  $GLIB_REQUIRED, \
        	gtk+-2.0    >=  $LIBTRACKERGTK_GTK_REQUIRED, \
        	dbus-1      >=  $DBUS_REQUIRED, \
        	dbus-glib-1 >=  $DBUS_REQUIRED"

	PKG_CHECK_MODULES(LIBTRACKERGTK, [$libtrackergtk_modules],[enable_libtrackergtk=yes] , [enable_libtrackergtk=no])

    	AC_SUBST([LIBTRACKERGTK_CFLAGS])
    	AC_SUBST([LIBTRACKERGTK_LIBS])
else
	enable-libtrackergtk="no (disabled)"
fi

AM_CONDITIONAL(ENABLE_LIBTRACKERGTK, test "$enable-libtrackergtk" != "no")




##################################################################
# Enable UNAC support?
##################################################################


AC_ARG_ENABLE([unac], AC_HELP_STRING([--disable-unac], [Disable unac accent stripper support]),,[enable_unac=yes])

if test "x$enable_unac" != "xno" ; then

  	PKG_CHECK_MODULES(UNAC, [unac >= 1.0.0],[enable_unac=yes] , [enable_unac=no])

    	AC_SUBST([UNAC_CFLAGS])
    	AC_SUBST([UNAC_LIBS])
	
else
	enable-unac="no (disabled)"
fi

if test "$enable_unac" = "yes"; then
	AC_DEFINE(HAVE_UNAC, [], [Define if we have unac lib])
fi
AM_CONDITIONAL(ENABLE_UNAC, test "$enable-unac" != "no")




##################################################################
# check for GNOME/GTK dependencies to build tracker search tool (Gnome client)
##################################################################

GTK_REQUIRED=2.8.0
LIBGNOME_DESKTOP_REQUIRED=2.9.91
LIBGNOME_REQUIRED=2.13.2
LIBGNOMEUI_REQUIRED=2.13.7
LIBGLADE_REQUIRED=2.5.0
GNOMEVFS_REQUIRED=2.8.4

AC_ARG_ENABLE(gui, AC_HELP_STRING([--disable-gui], [Disable building of the gnome-search-tool]),,[enable_gui=yes])
if test "x$enable_gui" = "xyes"; then
	PKG_CHECK_MODULES(GNOME_UTILS, [
        	gtk+-2.0 >= $GTK_REQUIRED
	        libgnome-2.0 >= $LIBGNOME_REQUIRED
        	libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED],
	        [have_gnome=yes] , [have_gnome=no])
	#there is the slight possibility to have gnome-vfs and not libgnome for example
	#so we should check and not overwrite have_gnome
	if test "$have_gnome" = "yes"; then 
		PKG_CHECK_MODULES(GNOMEVFS, [
        		gnome-vfs-2.0 >= $GNOMEVFS_REQUIRED
		        gnome-vfs-module-2.0 >= $GNOMEVFS_REQUIRED],
		        [have_gnome=yes] , [have_gnome=no])
	fi
	if test "$have_gnome" = "yes"; then
		PKG_CHECK_MODULES(GNOMEDESKTOP, [
		        gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED],
        		[have_gnome=yes] , [have_gnome=no])
	fi
	AC_SUBST(GNOME_UTILS_CFLAGS)
	AC_SUBST(GNOME_UTILS_LIBS)
	AC_SUBST(GNOMEVFS_CFLAGS)
	AC_SUBST(GNOMEVFS_LIBS)
	AC_SUBST(GNOMEDESKTOP_CFLAGS)
	AC_SUBST(GNOMEDESKTOP_LIBS)
else
	have_gnome="no (disabled)"
fi


# do not build if libtracker-gtk is not being built
if test "x$enable_libtrackergtk" = "yes"; then
	have_gnome="no (disabled as libtracker-gtk is not being built)"	
fi

AM_CONDITIONAL(HAVE_GNOME, test "$have_gnome" = "yes")
if test "$have_gnome" = "yes"; then
   GNOME_COMMON_INIT
fi


##################################################################
# Checks for tracker-preferences
##################################################################

PREFERENCES_GLADE_REQUIRED=2.6

AC_ARG_ENABLE([preferences],
              AC_HELP_STRING([--disable-preferences], [Disable the preferences dialog]),,
              [enable_preferences=yes])

if test "x$enable_preferences" != "xno" ; then

   	PKG_CHECK_MODULES(GLIB2, [ glib-2.0 >= $PREFERENCES_GLIB_REQUIRED ],[enable_preference=yes] , [enable_preference=no])
   	AC_SUBST([GLIB2_CFLAGS])
   	AC_SUBST([GLIB2_LIBS])

	if test "$enable_preferences" = "yes"; then 
		PKG_CHECK_MODULES(GTK2, [ gtk+-2.0 >= $PREFERENCES_GTK_REQUIRED ],[enable_preference=yes] , [enable_preference=no])
		AC_SUBST([GTK2_CFLAGS])
   		AC_SUBST([GTK2_LIBS])
	fi

	if test "$enable_preferences" = "yes"; then 

	   	PKG_CHECK_MODULES(LIBGLADE, [ libglade-2.0 >= $PREFERENCES_GLADE_REQUIRED ], [enable_preferences=yes], [enable_preferences=no])
		AC_SUBST([LIBGLADE_CFLAGS])
   		AC_SUBST([LIBGLADE_LIBS])
	fi
else
	enable-preferences="no (disabled)"
fi

AM_CONDITIONAL(ENABLE_PREFERENCES, test "$enable_preferences" != "no")




##################################################################
# check for poppler's glib bingings
##################################################################

POPPLER_GLIB_REQUIRED=0.4.5
CAIRO_REQUIRED=1.0
GDK_REQUIRED=1.0

AC_ARG_ENABLE(pdf, AC_HELP_STRING([--disable-pdf], [Disable PDF data extractor]),,[enable_pdf=yes])
if test "x$enable_pdf" = "xyes"; then
	PKG_CHECK_MODULES(POPPLER_GLIB, [
		poppler-glib >= $POPPLER_GLIB_REQUIRED
		cairo >= $CAIRO_REQUIRED
		gdk-2.0 >= $GDK_REQUIRED],
		[have_poppler=yes] , [have_poppler=no])
	AC_SUBST(POPPLER_GLIB_CFLAGS)
	AC_SUBST(POPPLER_GLIB_LIBS)
else
	have_poppler="no (disabled)"
fi
AM_CONDITIONAL(HAVE_POPPLER_GLIB, test "$have_poppler" = "yes")
test "$have_poppler" = "yes" && AC_DEFINE(HAVE_POPPLER, [], [Define if we have poppler])

##################################################################
# check for libexif
##################################################################

LIBEXIF_REQUIRED=0.6

AC_ARG_ENABLE(exif, AC_HELP_STRING([--disable-exif],[Disable exif data extractor]),,[enable_exif=yes])
if test "x$enable_exif" = "xyes"; then
	PKG_CHECK_MODULES(LIBEXIF, [
		libexif >= $LIBEXIF_REQUIRED],
		[have_libexif=yes] , [have_libexif=no])
	AC_SUBST(LIBEXIF_CFLAGS)
	AC_SUBST(LIBEXIF_LIBS)
else
	have_libexif="no (disabled)"
fi
AM_CONDITIONAL(HAVE_LIBEXIF, test "$have_libexif" = "yes")
test "$have_libexif" = "yes" && AC_DEFINE(HAVE_LIBEXIF, [], [Define if we have libexif])

##################################################################
# check for libgsf
##################################################################

LIBGSF_REQUIRED=1.13

AC_ARG_ENABLE(gsf, AC_HELP_STRING([--disable-gsf], [Disable GSF data extractor]),,[enable_gsf=yes])
if test "x$enable_gsf" = "xyes"; then
	PKG_CHECK_MODULES(LIBGSF,[
		libgsf-1 >= $LIBGSF_REQUIRED],
		[have_libgsf=yes] , [have_libgsf=no])
	AC_SUBST(LIBGSF_CFLAGS)
	AC_SUBST(LIBGSF_LIBS)
else
	have_libgsf="no (disabled)"
fi
AM_CONDITIONAL(HAVE_LIBGSF, test "$have_libgsf" = "yes")
test "$have_libgsf" = "yes" && AC_DEFINE(HAVE_LIBGSF, [], [Define if we have libgsf])

####################################################################
# Check ioprio support
####################################################################

AC_MSG_CHECKING([[checking ioprio support]])
ioprio_support=no
AC_RUN_IFELSE([ AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <errno.h> 
#include <sys/syscall.h>
#include <unistd.h>
inline int ioprio_get (int which, int who)
{
	return syscall (__NR_ioprio_get, which, who);
}
   ]], [[
exit(ioprio_get(1,0));
   ]]) ], 
   [ AC_DEFINE(IOPRIO_SUPPORT,[],[Define ioprio support]) ioprio_support=yes ])
AC_MSG_RESULT([$ioprio_support])

#####################################################

AC_CONFIG_FILES([
	Makefile
	tracker.pc
	trackerd.desktop
	libtracker-gtk.pc
	docs/Makefile
	data/Makefile
	data/languages/Makefile
	data/icons/Makefile
	data/icons/16x16/Makefile
	data/icons/22x22/Makefile
	data/icons/24x24/Makefile
	data/icons/32x32/Makefile
	data/icons/48x48/Makefile
	data/icons/scalable/Makefile
	filters/Makefile
	filters/application/Makefile
	filters/text/Makefile
	thumbnailers/Makefile
	thumbnailers/application/Makefile
	thumbnailers/image/Makefile
	src/Makefile
	src/libstemmer/Makefile
	src/sqlite3/Makefile
	src/text-filters/Makefile
	src/text-filters/html_converter/Makefile
	src/text-filters/ooo_converter/Makefile
	src/tracker-extract/Makefile
	src/tracker-thumbnailer/Makefile
	src/trackerd/Makefile
	src/libtracker/Makefile
	src/libtracker-gtk/Makefile
	src/tracker-search-tool/Makefile
	src/tracker-search-tool/tracker-search-tool.desktop
	src/tracker-preferences/Makefile
	src/xdgmime/Makefile
	po/Makefile.in
])

AC_CONFIG_HEADERS([config.h])

AC_OUTPUT

echo "
Tracker-$VERSION:

	prefix:					${prefix}
	source code location:			${srcdir}
	compiler:				${CC}
	enable gcc warnings:			$enable_warnings
	build with debug symbols:		$enable_debug_code
	database engine:			SQLite
	file monitor backend to be used:	$primary_backend
	inotify header location:		$inotify_header
	ioprio support:				$ioprio_support
	unac accent stripper support:		$enable_unac
	build search tool (GNOME):		$have_gnome
	build preferences ui:			$enable_preferences
	build libtracker-gtk:			$enable_libtrackergtk

Metadata extractors:

	pdf:					$have_poppler
	png:					yes
	exif (jpeg):				$have_libexif
	gsf:					$have_libgsf
	video files:				$videos_are_handled ($videos_handler)

"
if test "x$enable_external_sqlite" = "xyes"; then
echo "
****WARNING**** : you have chosen to use an external version of SQLite instead of the in-built threadsafe one. 
You must make sure a version of SQLite compiled with --enable-threadsafe is available otherwise expect pain!
"
fi