~vcs-imports/beagle/trunk

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
###
### Welcome to Beagle's configure.in.  We hope you enjoy your stay.
###

AC_INIT(beagled/BeagleDaemon.cs)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(beagle, 0.3.9)

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

###
### Some dependencies
###

MONO_REQUIRED=1.2.4
MONODOC_REQUIRED=1.2.4
NDESK_DBUS_REQUIRED=0.5.2
NDESK_DBUS_GLIB_REQUIRED=0.3.0
GTK_SHARP_REQUIRED=2.10.0
GMIME_SHARP_REQUIRED=2.2.0
EVOLUTION_SHARP_REQUIRED=0.13.3
GSF_SHARP_REQUIRED=0.6
GTK_REQUIRED=2.10.0
AVAHI_SHARP_REQUIRED=0.6.10

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

AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)

AC_PROG_INSTALL
AM_PROG_LIBTOOL
AC_PROG_CXX

VERSION=${VERSION}
AC_SUBST(VERSION)

AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
	AC_MSG_ERROR([You need to install pkg-config])
fi

AC_PATH_PROG(BASH, bash)
AC_SUBST(BASH)

# firefox extension uses zip to create the jar/xpi files
AC_PATH_PROG(ZIP, zip, no)
if test "x$ZIP" = "xno"; then
	AC_MSG_ERROR([You need to install the zip program])
fi

AC_PATH_PROG(MONO, mono, no)
if test "x$MONO" = "xno"; then
	AC_MSG_ERROR([You need to install the Mono runtime])
fi

AC_PATH_PROG(MCS, gmcs, no)
if test "x$MCS" = "xno"; then
	AC_MSG_ERROR([You need to install the Mono gmcs compiler])
fi

AC_MSG_CHECKING([for mono.pc])
if test -z `$PKG_CONFIG --variable=prefix mono`; then
  AC_MSG_ERROR([missing the mono.pc file, usually found in the mono-devel package])
else
  AC_MSG_RESULT([found])
fi

BEAGLE_DEFINES=""

# check that we have the require version of mono

# Temporary: check for mono-1.9
PKG_CHECK_MODULES(MONO, mono >= 1.9, mono_1_9=yes, mono_1_9=no) 
if test "x$mono_1_9" = "xno"; then
	AC_MSG_RESULT([missing mono >= 1.9. Searching for mono >= 1.2.4])
	PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED) 
else
	AC_MSG_RESULT([found mono >= 1.9])
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:MONO_1_9"
fi

# check for various mono DLLs that we need.
needed_dlls="Mono.Data.Sqlite Mono.Posix System.Data System.Web ICSharpCode.SharpZipLib"
for i in $needed_dlls; do
  AC_MSG_CHECKING([for $i.dll])
  if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then
    AC_MSG_ERROR([missing required mono DLL: $i.dll])
  else
    AC_MSG_RESULT([found])
  fi
done

# SharpZipLib was broken previously, and all our Makefile.am's depend on this
# define.
SHARPZIPLIB_LIBS="-r:ICSharpCode.SharpZipLib"
AC_SUBST(SHARPZIPLIB_LIBS)

# D-Bus libraries
PKG_CHECK_MODULES(NDESK_DBUS, ndesk-dbus-1.0 >= $NDESK_DBUS_REQUIRED)

PKG_CHECK_MODULES(NDESK_DBUS_GLIB, ndesk-dbus-glib-1.0 >= $NDESK_DBUS_GLIB_REQUIRED)
AC_SUBST(NDESK_DBUS_GLIB_LIBS)

# check for OS
case "$target" in
  *-*-linux*)
    os=linux
    ;;
  *-*-freebsd*)
    os=freebsd
    ;;
  *)
    AC_MSG_ERROR([Unrecognised target OS: $target])
    ;;
esac
AM_CONDITIONAL(OS_LINUX, test "x$os" = "xlinux")
AM_CONDITIONAL(OS_FREEBSD, test "x$os" = "xfreebsd")

# xdgmime really wants to have HAVE_MMAP defined
AC_FUNC_MMAP()

# check for desktop-launch
AC_PATH_PROG(DESKTOP_LAUNCH, desktop-launch, no)
AM_CONDITIONAL(ENABLE_DESKTOP_LAUNCH, test "x$DESKTOP_LAUNCH" != "xno")

# check for xdg-open
AC_PATH_PROG(XDG_OPEN, xdg-open, no)
AM_CONDITIONAL(ENABLE_XDG_OPEN, test "x$XDG_OPEN" != "xno")

#
# I18N
#

IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=beagle
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the package for translations])

# Many distros don't have a dependency on sqlite for their
# mono-data-sqlite packages, and the mono build process itself
# doesn't require it.  But we do, so check for it here.

# We really need sqlite 3.3.1+; the earlier pkgconfig based
# test was also flawed. Hence check for the sqlite3_prepare_v2
# API which was added in 3.3.9. 3.3.9 was released in Jan 07,
# so we can assume everyone has a much much newer sqlite3
AC_MSG_CHECKING([for sqlite3 >= 3.3.9])
AC_CHECK_LIB(sqlite3, sqlite3_prepare_v2)

AC_ARG_ENABLE([xss],
	      AC_HELP_STRING([--disable-xss], [Disable monitoring xscreensaver to speed up indexing when user is idle]),
	      enable_xss=$enableval,
	      enable_xss=yes)

AC_PATH_XTRA

# Needed by glue/screensaver-glue.c
# The OLD_CFLAGS/CFLAGS hack is needed to build on Ubuntu Breezy Badger 
OLD_CFLAGS="$CFLAGS"
OLD_LDFLAGS="$LDFLAGS"
OLD_LIBS="$LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
AC_CHECK_HEADER(X11/extensions/scrnsaver.h, enable_scrnsaver=yes, enable_scrnsaver=no)
AC_CHECK_LIB(Xss,XScreenSaverQueryExtension, enable_libxss=yes, enable_libxss=no)
have_xss=no
if test "x$enable_xss$enable_scrnsaver$enable_libxss" = "xyesyesyes"; then
	XSS_LIBS="-lXss"
	have_xss=yes
	AC_DEFINE(HAVE_LIBXSS,1,[Define to 1 if libXss is installed])
fi
AM_CONDITIONAL(ENABLE_LIBXSS, test "x$have_xss" = "xyes")
CFLAGS="$OLD_CFLAGS"
LDFLAGS="$OLD_LDFLAGS"
LIBS="$OLD_LIBS"

dnl ----------------------------------------------

AC_ARG_ENABLE([thunderbird],
        AC_HELP_STRING([--disable-thunderbird], [Disable Thunderbird Mail Backend (default no)]),
        enable_tbird=$enableval,
        enable_tbird=yes)
AM_CONDITIONAL(ENABLE_THUNDERBIRD, test "x$enable_tbird" = "xyes")

dnl ----------------------------------------------

AC_ARG_ENABLE([googlebackends],
        AC_HELP_STRING([--disable-googlebackends], [Disable GMail and other Google backends (default no)]),
        enable_google=$enableval,
        enable_google=yes)
AM_CONDITIONAL(ENABLE_GOOGLEBACKENDS, test "x$enable_google" = "xyes")

if test "x$enable_google" = "xyes"; then
  i="System.Security"
  AC_MSG_CHECKING([for $i.dll (needed by Google backends)])
  if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then
    AC_MSG_ERROR([missing required mono DLL: $i.dll])
  else
    AC_MSG_RESULT([found])
  fi
fi

dnl -------------------------------------------------------

AC_ARG_ENABLE([gui],
	AC_HELP_STRING([--disable-gui], [Disable beagle-search]),
	enable_gui=$enableval,
	enable_gui=yes)

AM_CONDITIONAL(ENABLE_GUI, test "x$enable_gui" = "xyes")

if test "x$enable_gui" = "xyes"; then

	dnl -------------------------------------------------------
	dnl Various version requirements

	PKG_CHECK_MODULES(BEAGLE_UI,
[
	gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED
	gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED
	glade-sharp-2.0 >= $GTK_SHARP_REQUIRED
	gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED
	gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED
	gmime-sharp >= $GMIME_SHARP_REQUIRED
])
	AC_SUBST(BEAGLE_UI_LIBS)

	PKG_CHECK_MODULES(UIGLUE, gtk+-2.0 >= $GTK_REQUIRED librsvg-2.0 x11)
	AC_SUBST(UIGLUE_CFLAGS)
	AC_SUBST(UIGLUE_LIBS)
	
	dnl Gdk and Atk are needed for trayicon glue
	
	GDK20_MINIMUM_VERSION=2.2.3
	ATK_MINIMUM_VERSION=1.2.4
	
	PKG_CHECK_MODULES(LIBTRAYICON,
[
	gdk-2.0 >= $GDK20_MINIMUM_VERSION 
	atk >= $ATK_MINIMUM_VERSION
])
	AC_SUBST(LIBTRAYICON_CFLAGS)
	AC_SUBST(LIBTRAYICON_LIBS)

	AC_PATH_PROG(MSGFMT, msgfmt, no)
	if test "x$MSGFMT" = "xno"; then
		AC_MSG_ERROR([You need to install gettext, or pass --disable-gui to build without GUI support])
	fi

fi

dnl ----------------------------------------------

dnl evolution support

AC_ARG_ENABLE([evolution],
	AC_HELP_STRING([--disable-evolution], [Disable evolution support (default auto)]),
	enable_evo=$enableval,
	enable_evo_sharp=auto)


EVO_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix evolution-sharp`

EVO_LIBDIR=`$PKG_CONFIG --variable=evolibdir evolution-sharp`
AC_SUBST(EVO_LIBDIR)

PKG_CHECK_MODULES(EVO,
                  evolution-sharp >= $EVOLUTION_SHARP_REQUIRED 	\
                  gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED	\
		  glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
                  gmime-sharp >= $GMIME_SHARP_REQUIRED,
                  have_evo_dependencies=yes, have_evo_dependencies=no)
AC_SUBST(EVO_LIBS)

if test "x$have_evo_dependencies" = "xno"; then

	dnl error out if user has explicitly requested evolution support
	if test "x$enable_evo" = "xyes"; then
		AC_MSG_ERROR([Could not find Evolution dependencies])
	fi

	enable_evo="no (missing dependencies)"

else

	if test "x$enable_evo" != "xno"; then
		enable_evo="yes"
	else
		enable_evo="no (disabled)"
	fi

fi

AM_CONDITIONAL(ENABLE_EVOLUTION, test "x$enable_evo" = "xyes")

dnl ----------------------------------------------

dnl inotify

AC_ARG_ENABLE([inotify],
	 AC_HELP_STRING([--disable-inotify], [Disable inotify filesystem monitoring support (default auto)]),
	 enable_inotify=$enableval,
	 enable_inotify=auto)

AC_CHECK_HEADERS(sys/inotify.h)

if test "x$ac_cv_header_sys_inotify_h" = "xno"; then

	dnl error out if user has explicitly requested inotify
	if test "x$enable_inotify" = "xyes"; then
		AC_MSG_ERROR([inotify is unavailable on your system architecture])
	fi

	enable_inotify="no (unavailable)"

else

	if test "x$enable_inotify" != "xno"; then
		enable_inotify="yes"
	else
		enable_inotify="no (disabled)"
	fi

fi

AM_CONDITIONAL(ENABLE_INOTIFY, test "x$enable_inotify" = "xyes")

dnl ----------------------------------------------

dnl gsf-sharp

AC_ARG_ENABLE([gsf-sharp],
	AC_HELP_STRING([--disable-gsf-sharp], [Disable gsf-sharp support (default auto)]),
	enable_gsf_sharp=$enableval,
	enable_gsf_sharp=auto)

if test "x$enable_gsf_sharp" != "xno"; then
	PKG_CHECK_MODULES(GSF_SHARP, gsf-sharp >= 0.5, has_gsf_sharp=yes, has_gsf_sharp=no)
	if test "x$enable_gsf_sharp" = "xyes" -a "x$has_gsf_sharp" != "xyes"; then
		AC_MSG_ERROR([gsf-sharp >= 0.5 not found])
	else
		enable_gsf_sharp=$has_gsf_sharp
	fi
fi

AM_CONDITIONAL(ENABLE_GSF_SHARP, test "x$enable_gsf_sharp" = "xyes")
if test "x$enable_gsf_sharp" = "xyes"; then
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_GSF_SHARP"
fi

dnl ----------------------------------------------

dnl wv1

enable_wv1=no
if test "x$enable_gsf_sharp" = "xyes"; then
	PKG_CHECK_MODULES(WV1, wv-1.0, enable_wv1=yes, enable_wv1=no)
	AC_SUBST(WV1_LIBS)
fi

AM_CONDITIONAL(ENABLE_WV1, test "x$enable_wv1" = "xyes")
if test "x$enable_wv1" = "xyes"; then
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_WV1"
fi

dnl ----------------------------------------------

dnl taglib-sharp: Needed for indexing audio formats

PKG_CHECK_MODULES(TAGLIB_SHARP, taglib-sharp >= 2.0)
AC_SUBST(TAGLIB_SHARP_LIBS)

dnl ----------------------------------------------

PKG_CHECK_MODULES(BEAGLED,
[
	shared-mime-info
	gmime-sharp >= $GMIME_SHARP_REQUIRED
	glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
])
BEAGLED_LIBS="$BEAGLED_LIBS $GSF_SHARP_LIBS"
AC_SUBST(BEAGLED_LIBS)

GSF_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gsf-sharp`
GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp`

dnl ----------------------------------------------
dnl Epiphany Extension

AC_ARG_ENABLE([epiphany-extension],
	AC_HELP_STRING([--enable-epiphany-extension], [Enable Epiphany Extension (default auto)]),
	enable_epiphany_extension=$enableval,
	enable_epiphany_extension=auto)

use_new_epiphany_extension=no
if test "x$enable_epiphany_extension" != "xno"; then
	AC_MSG_CHECKING([for Epiphany])
	AC_MSG_RESULT()

	dnl If you want to add anything but a <major>.<minor> version here, you
	dnl need to see the handling of the epiphany_version variable in the
	dnl epiphany extension code
	VALID_EPIPHANY_VERSIONS="2.24 2.22 2.20 2.19 2.18 2.17 2.16 2.15 2.14 1.8 1.6"
	for v in $VALID_EPIPHANY_VERSIONS; do
	
		AC_MSG_CHECKING([for Epiphany $v])
		PKG_CHECK_EXISTS(epiphany-$v, found_ephy=yes, found_ephy=no)
		if test "x$found_ephy" = "xyes"; then
			EPIPHANY_MAJOR=$v
			AC_MSG_RESULT([yes])
			break
		else
			AC_MSG_RESULT([no])
		fi
	done

	if test "x$found_ephy" = "xno"; then
		if test "x$enable_epiphany_extension" = "xyes"; then
			AC_MSG_ERROR([Epiphany (and/or its development files) could not be found])
		else
			enable_epiphany_extension="no (Epiphany not installed)"
		fi
	else
		EPIPHANY_EXTENSION_INIT($EPIPHANY_MAJOR)
		if test "$EPIPHANY_HAS_PYTHON" != "1"; then
			enable_epiphany_extension="no (Epiphany lacks Python support)"
		else
			enable_epiphany_extension="yes"
		fi
	fi
fi

AM_CONDITIONAL(ENABLE_EPIPHANY_EXTENSION, test "x$enable_epiphany_extension" = "xyes")
AC_SUBST(EPIPHANY_MAJOR)

# distcheck hack
AC_ARG_ENABLE([epiphany-extension-install],
	AS_HELP_STRING([--enable-epiphany-extension-install],[Install Epiphany Extension]),
	[install_epiphany_extension=$enableval],
	[install_epiphany_extension=yes])

AM_CONDITIONAL([INSTALL_EPIPHANY_EXTENSION], [test "x$install_epiphany_extension" = "xyes"])

dnl ----------------------------------------------

dnl Galago

PKG_CHECK_MODULES(GALAGO, galago-sharp >= 0.5 , enable_galago=yes, enable_galago=no)
AM_CONDITIONAL(ENABLE_GALAGO, test "x$enable_galago" = "xyes")
AC_SUBST(GALAGO_LIBS)

dnl ----------------------------------------------

dnl Zeroconf support

AC_ARG_ENABLE([avahi],
        AC_HELP_STRING([--enable-avahi], [Enable Avahi (default no)]),
        enable_avahi=$enableval,
        enable_avahi=no)

PKG_CHECK_MODULES(AVAHI_SHARP, avahi-sharp >= $AVAHI_SHARP_REQUIRED,
                  have_avahi_dependencies=yes, have_avahi_dependencies=no)
AC_SUBST(AVAHI_SHARP_LIBS)

if test "x$have_avahi_dependencies" = "xno"; then

	dnl error out if user has explicitly requested avahi support
	if test "x$enable_avahi" = "xyes"; then
		AC_MSG_ERROR([Could not find Avahi dependencies])
	fi

	enable_avahi="no (missing dependencies)"

else

	if test "x$enable_avahi" != "xno"; then
		enable_avahi="yes"
	else
		enable_avahi="no (disabled)"
	fi

fi

AM_CONDITIONAL(ENABLE_AVAHI, test "x$enable_avahi" = "xyes")

if test "x$enable_avahi" = "xyes"; then
    enable_avahi="yes (EXPERIMENTAL)"
fi

dnl ----------------------------------------------

GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
AC_SUBST(GTK_BINARY_VERSION)

dnl For the systeminfo glue

SYSTEMINFO_GLUE_X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $XSS_LIBS $X_EXTRA_LIBS"
AC_SUBST(SYSTEMINFO_GLUE_X_LIBS)

dnl ----------------------------------------------

dnl KDE launcher/icon support

kde_prefix_print="unknown; will guess at runtime"
AC_PATH_PROG(KDE_CONFIG, [kde-config], [no])
if test ! "x$KDE_CONFIG" = "xno"; then
	KDE_PREFIX=`$KDE_CONFIG --prefix`
	kde_prefix_print="$KDE_PREFIX"
fi
AC_SUBST(KDE_PREFIX)

dnl ----------------------------------------------

dnl Prefixes for helper scripts
GAC_PREFIX="$EVO_SHARP_PREFIX:$GSF_SHARP_PREFIX:$GMIME_SHARP_PREFIX"
dnl Remove duplicate prefixes
GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|:|\n|g' | sort | uniq | tr '\n' ':'`"
dnl Remove stray :s
GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|::\+|:|g' -e 's|^:\+||' -e 's|:\+$||'`"
AC_SUBST(GAC_PREFIX)

dnl ----------------------------------------------

dnl Check if the system has libchm, used by the CHMFilter

# Check for libchm for CHM filter
AC_CHECK_LIB(chm,chm_open,has_libchm=yes,has_libchm=no)
AM_CONDITIONAL(HAS_LIBCHM, test "x$has_libchm" = "xyes")
if test "x$has_libchm" = "xyes"; then
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:HAVE_LIBCHM"
fi

dnl ----------------------------------------------

dnl Qt beagle-settings

AC_ARG_ENABLE([qt],
	AC_HELP_STRING([--enable-qt], [Enable Qt GUI for beagle-settings (default no)]),
	enable_qt=$enableval,
	enable_qt=no)

QYOTO_ASSEMBLY=""

dnl The location and detection is a mess; this would improve once Qyoto gets more attention
dnl First try to locate qyoto.pc for Ubuntu and other sane distributions
if test "x$enable_qt" != "xno"; then
	PKG_CHECK_MODULES(QYOTO, qyoto >= 4.3.0, has_qyoto=yes, has_qyoto=no)
	if test "x$enable_qt" = "xyes" -a "x$has_qyoto" != "xyes"; then
		AC_MSG_NOTICE([qyoto.pc >= 4.3.0 not found])
	else
		enable_qt=$has_qyoto
		QYOTO_ASSEMBLY="-pkg:qyoto"
	fi
fi

dnl Some distributions do not ship a qyoto.pc file (opensuse)
dnl I hope checking the presence of the qt-dotnet.dll should be enough
if test "x$enable_qt" != "xno" -a "x$has_qyoto" = "xno"; then
	i="qt-dotnet"
	AC_MSG_CHECKING([for $i.dll])
	if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then
		AC_MSG_ERROR([missing required mono DLL: $i.dll])
	else
		AC_MSG_RESULT([found])
		QYOTO_ASSEMBLY="-r:qt-dotnet"
		enable_qt="yes"
	fi
fi

AM_CONDITIONAL(ENABLE_QT, test "x$enable_qt" = "xyes")
AC_SUBST(QYOTO_ASSEMBLY)

dnl ----------------------------------------------

dnl Monodoc

AC_ARG_ENABLE(docs,
	AC_HELP_STRING([--disable-docs],
	[Do not build documentation (default yes)]),
	with_docs=$enableval,
	with_docs=yes)

if test "x$with_docs" = "xyes"; then
	AC_PATH_PROG(MONODOCER, monodocer, no)
	if test "x$MONODOCER" = "xno"; then
		AC_MSG_ERROR([You need to install monodoc, or pass --disable-docs to configure to skip documentation installation])
	fi

	AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
	if test "x$MDASSEMBLER" = "xno"; then
		AC_MSG_ERROR([You need to install mdassembler, or pass --disable-docs to configure to skip documentation installation])
	fi

	AM_CONDITIONAL(BUILD_DOCS, true)
else
	AC_MSG_NOTICE([not building Beagle csharp API documentation])
	AM_CONDITIONAL(BUILD_DOCS, false)
fi

dnl ----------------------------------------------

dnl RDF Adapter is purely for research purposes right now

AC_ARG_ENABLE([rdf-adapter],
	AC_HELP_STRING([--enable-rdf-adapter], [Builds the RDF Adapter (default no)]),
	enable_rdf_adapter=$enableval,
	enable_rdf_adapter=no)

if test "x$enable_rdf_adapter" = "xyes"; then
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_RDF_ADAPTER"
fi

AM_CONDITIONAL(ENABLE_RDF_ADAPTER, test "x$enable_rdf_adapter" = "xyes")

dnl ----------------------------------------------

dnl Conditional for debugging XML messages.

AC_ARG_ENABLE([xml-dump],
	AC_HELP_STRING([--enable-xml-dump], [Enables printing of the XML messages sent between components (default no)]),
	enable_xml_dump=$enableval,
	enable_xml_dump=no)

if test "x$enable_xml_dump" = "xyes"; then
	AC_DEFINE_UNQUOTED(ENABLE_XML_DUMP, 1, [Dump XML messages for debugging])
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_XML_DUMP"
fi

AC_SUBST(BEAGLE_DEFINES)

dnl ----------------------------------------------

AC_OUTPUT([
Makefile
Util/Makefile
glue/Makefile
BeagleClient/Makefile
beagled/Makefile
Filters/Makefile
tools/Makefile
tools/beagle-settings.desktop.in
search/icons/Makefile
search/beagle-search.desktop.in
search/Makefile
ImLogViewer/Makefile
epiphany-extension/Makefile
firefox-extension/Makefile
thunderbird-extension/Makefile
doc/Makefile
doc/api/Makefile
RDFAdapter/Makefile
conf-data/Makefile
beagle-0.0.pc
beagle-daemon.pc
beagle-ui-0.0.pc
beagle.spec
po/Makefile.in
])

echo "
	Beagle version:           ${VERSION}
	Target OS:		  ${os}
	Inotify:		  ${enable_inotify}

	Prefix:			  ${prefix}
	KDE prefix:		  ${kde_prefix_print}

	evolution-sharp?	  ${enable_evo}
	gsf-sharp?		  ${enable_gsf_sharp}
	galago-sharp?		  ${enable_galago}
	avahi-sharp		  ${enable_avahi}
	wv1?			  ${enable_wv1}
	libchm?			  ${has_libchm} 

	Firefox Extension?	  yes
	Epiphany Extension?	  ${enable_epiphany_extension}
	Thunderbird Extension? 	  ${enable_tbird}
	Google Backends?          ${enable_google}

	Monitor screensaver       ${have_xss}
	beagle-search GUI	  ${enable_gui}
	Qt beagle-settings GUI    ${enable_qt}

	Build RDF Adapter         ${enable_rdf_adapter} (purely experimental)
	Build docs?               ${with_docs}
"