~vcs-imports/beagle/trunk

1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
1
###
2
### Welcome to Beagle's configure.in.  We hope you enjoy your stay.
3
###
4
5
AC_INIT(beagled/BeagleDaemon.cs)
6
AC_CANONICAL_SYSTEM
1277 by dbera
Update for 0.3.9
7
AM_INIT_AUTOMAKE(beagle, 0.3.9)
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
8
9
########################################################################
10
11
###
12
### Some dependencies
13
###
14
1050 by dbera
Revert the sgen changes (4620-4627). After lots of testing, MONO_XMLSERIALIZER_THS is a better alternative suitable to the organization of our classes and does not requrie a whole lot of hack while delivering the same results.
15
MONO_REQUIRED=1.2.4
16
MONODOC_REQUIRED=1.2.4
954 by dbera
Require ndesk-dbus >= 0.5.2 (the first thread safe version).
17
NDESK_DBUS_REQUIRED=0.5.2
18
NDESK_DBUS_GLIB_REQUIRED=0.3.0
1197 by dbera
Bump gtk+/# >= 2.10. Use the nice Gnome.Vfs.MimeApplication to open hits instead of our home-cooker GnomeFu. We dont really need gnome prefix since we use the Gnome# API to get what we need - this drops the build dependencies of libgnome-2.0-dev and libgnomevfs-dev.
19
GTK_SHARP_REQUIRED=2.10.0
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
20
GMIME_SHARP_REQUIRED=2.2.0
552 by joeshaw
Update for evolution-sharp API changes introduced in 0.13.3, patch from
21
EVOLUTION_SHARP_REQUIRED=0.13.3
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
22
GSF_SHARP_REQUIRED=0.6
1197 by dbera
Bump gtk+/# >= 2.10. Use the nice Gnome.Vfs.MimeApplication to open hits instead of our home-cooker GnomeFu. We dont really need gnome prefix since we use the Gnome# API to get what we need - this drops the build dependencies of libgnome-2.0-dev and libgnomevfs-dev.
23
GTK_REQUIRED=2.10.0
519 by llipka
Merging the 'beagle-networking-branch' to 'trunk'.
24
AVAHI_SHARP_REQUIRED=0.6.10
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
25
26
########################################################################
27
28
AM_MAINTAINER_MODE
29
AM_CONFIG_HEADER(config.h)
30
31
AC_PROG_INSTALL
32
AM_PROG_LIBTOOL
33
AC_PROG_CXX
34
35
VERSION=${VERSION}
36
AC_SUBST(VERSION)
37
38
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
39
if test "x$PKG_CONFIG" = "xno"; then
40
	AC_MSG_ERROR([You need to install pkg-config])
41
fi
42
43
AC_PATH_PROG(BASH, bash)
44
AC_SUBST(BASH)
45
569 by joeshaw
Rename mozilla-extension to firefox-extension, since we make no
46
# firefox extension uses zip to create the jar/xpi files
62 by joeshaw
Some distros ship gmcs separately from mono, so make the AC_PATH_PROG()
47
AC_PATH_PROG(ZIP, zip, no)
48
if test "x$ZIP" = "xno"; then
49
	AC_MSG_ERROR([You need to install the zip program])
50
fi
51
52
AC_PATH_PROG(MONO, mono, no)
53
if test "x$MONO" = "xno"; then
54
	AC_MSG_ERROR([You need to install the Mono runtime])
55
fi
56
57
AC_PATH_PROG(MCS, gmcs, no)
58
if test "x$MCS" = "xno"; then
59
	AC_MSG_ERROR([You need to install the Mono gmcs compiler])
60
fi
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
61
62
AC_MSG_CHECKING([for mono.pc])
63
if test -z `$PKG_CONFIG --variable=prefix mono`; then
64
  AC_MSG_ERROR([missing the mono.pc file, usually found in the mono-devel package])
65
else
66
  AC_MSG_RESULT([found])
67
fi
68
1021 by dbera
Add new signal handler based on mono-1.9 UnixSignal. Enable this code if mono-1.9 is detected during configure. Then we dont need to enforce mono-1.9 on the users.
69
BEAGLE_DEFINES=""
70
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
71
# check that we have the require version of mono
72
1021 by dbera
Add new signal handler based on mono-1.9 UnixSignal. Enable this code if mono-1.9 is detected during configure. Then we dont need to enforce mono-1.9 on the users.
73
# Temporary: check for mono-1.9
1024 by dbera
Fix building with mono-1.9
74
PKG_CHECK_MODULES(MONO, mono >= 1.9, mono_1_9=yes, mono_1_9=no) 
1021 by dbera
Add new signal handler based on mono-1.9 UnixSignal. Enable this code if mono-1.9 is detected during configure. Then we dont need to enforce mono-1.9 on the users.
75
if test "x$mono_1_9" = "xno"; then
1050 by dbera
Revert the sgen changes (4620-4627). After lots of testing, MONO_XMLSERIALIZER_THS is a better alternative suitable to the organization of our classes and does not requrie a whole lot of hack while delivering the same results.
76
	AC_MSG_RESULT([missing mono >= 1.9. Searching for mono >= 1.2.4])
1021 by dbera
Add new signal handler based on mono-1.9 UnixSignal. Enable this code if mono-1.9 is detected during configure. Then we dont need to enforce mono-1.9 on the users.
77
	PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED) 
78
else
1050 by dbera
Revert the sgen changes (4620-4627). After lots of testing, MONO_XMLSERIALIZER_THS is a better alternative suitable to the organization of our classes and does not requrie a whole lot of hack while delivering the same results.
79
	AC_MSG_RESULT([found mono >= 1.9])
1021 by dbera
Add new signal handler based on mono-1.9 UnixSignal. Enable this code if mono-1.9 is detected during configure. Then we dont need to enforce mono-1.9 on the users.
80
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:MONO_1_9"
81
fi
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
82
83
# check for various mono DLLs that we need.
663 by dbera
Migrate from Mono.Data.SqliteClient to Mono.Data.Sqlite. Note:SqliteCommand.Parameters.Add() is replaced with AddWithValue().
84
needed_dlls="Mono.Data.Sqlite Mono.Posix System.Data System.Web ICSharpCode.SharpZipLib"
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
85
for i in $needed_dlls; do
86
  AC_MSG_CHECKING([for $i.dll])
87
  if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then
88
    AC_MSG_ERROR([missing required mono DLL: $i.dll])
89
  else
90
    AC_MSG_RESULT([found])
91
  fi
92
done
93
94
# SharpZipLib was broken previously, and all our Makefile.am's depend on this
95
# define.
96
SHARPZIPLIB_LIBS="-r:ICSharpCode.SharpZipLib"
97
AC_SUBST(SHARPZIPLIB_LIBS)
98
828 by llipka
Merge beagle-hal-branch to trunk.
99
# D-Bus libraries
954 by dbera
Require ndesk-dbus >= 0.5.2 (the first thread safe version).
100
PKG_CHECK_MODULES(NDESK_DBUS, ndesk-dbus-1.0 >= $NDESK_DBUS_REQUIRED)
101
102
PKG_CHECK_MODULES(NDESK_DBUS_GLIB, ndesk-dbus-glib-1.0 >= $NDESK_DBUS_GLIB_REQUIRED)
103
AC_SUBST(NDESK_DBUS_GLIB_LIBS)
828 by llipka
Merge beagle-hal-branch to trunk.
104
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
105
# check for OS
106
case "$target" in
107
  *-*-linux*)
108
    os=linux
109
    ;;
110
  *-*-freebsd*)
111
    os=freebsd
112
    ;;
113
  *)
114
    AC_MSG_ERROR([Unrecognised target OS: $target])
115
    ;;
116
esac
117
AM_CONDITIONAL(OS_LINUX, test "x$os" = "xlinux")
118
AM_CONDITIONAL(OS_FREEBSD, test "x$os" = "xfreebsd")
119
120
# xdgmime really wants to have HAVE_MMAP defined
121
AC_FUNC_MMAP()
122
123
# check for desktop-launch
124
AC_PATH_PROG(DESKTOP_LAUNCH, desktop-launch, no)
125
AM_CONDITIONAL(ENABLE_DESKTOP_LAUNCH, test "x$DESKTOP_LAUNCH" != "xno")
126
127
# check for xdg-open
128
AC_PATH_PROG(XDG_OPEN, xdg-open, no)
129
AM_CONDITIONAL(ENABLE_XDG_OPEN, test "x$XDG_OPEN" != "xno")
130
131
#
132
# I18N
133
#
134
912 by dbera
Port beagle to LINGUAS. Fixes #510172.
135
IT_PROG_INTLTOOL([0.35.0])
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
136
GETTEXT_PACKAGE=beagle
137
AC_SUBST(GETTEXT_PACKAGE)
138
AM_GLIB_GNU_GETTEXT
139
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the package for translations])
140
141
# Many distros don't have a dependency on sqlite for their
142
# mono-data-sqlite packages, and the mono build process itself
143
# doesn't require it.  But we do, so check for it here.
661 by dbera
Drop support for sqlite 2. Just remove the configure check and remove references of sqlite2 from the code.
144
1159 by dbera
Instead of checking for sqlite3.pc, which we don't really need, look for the library libsqlite3 which is what we actually need. One less dependency!
145
# We really need sqlite 3.3.1+; the earlier pkgconfig based
146
# test was also flawed. Hence check for the sqlite3_prepare_v2
147
# API which was added in 3.3.9. 3.3.9 was released in Jan 07,
148
# so we can assume everyone has a much much newer sqlite3
149
AC_MSG_CHECKING([for sqlite3 >= 3.3.9])
150
AC_CHECK_LIB(sqlite3, sqlite3_prepare_v2)
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
151
152
AC_ARG_ENABLE([xss],
153
	      AC_HELP_STRING([--disable-xss], [Disable monitoring xscreensaver to speed up indexing when user is idle]),
154
	      enable_xss=$enableval,
155
	      enable_xss=yes)
156
157
AC_PATH_XTRA
158
159
# Needed by glue/screensaver-glue.c
160
# The OLD_CFLAGS/CFLAGS hack is needed to build on Ubuntu Breezy Badger 
161
OLD_CFLAGS="$CFLAGS"
162
OLD_LDFLAGS="$LDFLAGS"
163
OLD_LIBS="$LIBS"
164
CFLAGS="$CFLAGS $X_CFLAGS"
165
LDFLAGS="$LDFLAGS $X_LIBS"
166
AC_CHECK_HEADER(X11/extensions/scrnsaver.h, enable_scrnsaver=yes, enable_scrnsaver=no)
167
AC_CHECK_LIB(Xss,XScreenSaverQueryExtension, enable_libxss=yes, enable_libxss=no)
168
have_xss=no
169
if test "x$enable_xss$enable_scrnsaver$enable_libxss" = "xyesyesyes"; then
170
	XSS_LIBS="-lXss"
171
	have_xss=yes
172
	AC_DEFINE(HAVE_LIBXSS,1,[Define to 1 if libXss is installed])
173
fi
174
AM_CONDITIONAL(ENABLE_LIBXSS, test "x$have_xss" = "xyes")
175
CFLAGS="$OLD_CFLAGS"
176
LDFLAGS="$OLD_LDFLAGS"
177
LIBS="$OLD_LIBS"
178
179
dnl ----------------------------------------------
510 by dbera
Merge r3833 from the tbrd-soc07 branch. The thunderbird project is officially completed now (ahem ... except bugfixes and ... possibly future work).
180
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
181
AC_ARG_ENABLE([thunderbird],
518 by postlund
* Add missing locale strings
182
        AC_HELP_STRING([--disable-thunderbird], [Disable Thunderbird Mail Backend (default no)]),
510 by dbera
Merge r3833 from the tbrd-soc07 branch. The thunderbird project is officially completed now (ahem ... except bugfixes and ... possibly future work).
183
        enable_tbird=$enableval,
518 by postlund
* Add missing locale strings
184
        enable_tbird=yes)
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
185
AM_CONDITIONAL(ENABLE_THUNDERBIRD, test "x$enable_tbird" = "xyes")
186
1066 by dbera
Add a GMail live search backend
187
dnl ----------------------------------------------
188
189
AC_ARG_ENABLE([googlebackends],
1116 by dbera
Enable googlebackends by default during building but disable the backend by default in the conf-file.
190
        AC_HELP_STRING([--disable-googlebackends], [Disable GMail and other Google backends (default no)]),
1066 by dbera
Add a GMail live search backend
191
        enable_google=$enableval,
1116 by dbera
Enable googlebackends by default during building but disable the backend by default in the conf-file.
192
        enable_google=yes)
1066 by dbera
Add a GMail live search backend
193
AM_CONDITIONAL(ENABLE_GOOGLEBACKENDS, test "x$enable_google" = "xyes")
194
195
if test "x$enable_google" = "xyes"; then
196
  i="System.Security"
197
  AC_MSG_CHECKING([for $i.dll (needed by Google backends)])
198
  if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then
199
    AC_MSG_ERROR([missing required mono DLL: $i.dll])
200
  else
201
    AC_MSG_RESULT([found])
202
  fi
203
fi
204
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
205
dnl -------------------------------------------------------
206
207
AC_ARG_ENABLE([gui],
208
	AC_HELP_STRING([--disable-gui], [Disable beagle-search]),
209
	enable_gui=$enableval,
210
	enable_gui=yes)
211
212
AM_CONDITIONAL(ENABLE_GUI, test "x$enable_gui" = "xyes")
213
214
if test "x$enable_gui" = "xyes"; then
215
216
	dnl -------------------------------------------------------
217
	dnl Various version requirements
218
219
	PKG_CHECK_MODULES(BEAGLE_UI,
220
[
221
	gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED
222
	gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED
223
	glade-sharp-2.0 >= $GTK_SHARP_REQUIRED
224
	gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED
225
	gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED
226
	gmime-sharp >= $GMIME_SHARP_REQUIRED
227
])
228
	AC_SUBST(BEAGLE_UI_LIBS)
229
1187 by dbera
tomboykeybinder.c explicitly calls X11 functions, so explicitly use -lX11 to build libbeagleuiglue.so. Fixes #540120.
230
	PKG_CHECK_MODULES(UIGLUE, gtk+-2.0 >= $GTK_REQUIRED librsvg-2.0 x11)
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
231
	AC_SUBST(UIGLUE_CFLAGS)
232
	AC_SUBST(UIGLUE_LIBS)
233
	
234
	dnl Gdk and Atk are needed for trayicon glue
235
	
236
	GDK20_MINIMUM_VERSION=2.2.3
237
	ATK_MINIMUM_VERSION=1.2.4
238
	
239
	PKG_CHECK_MODULES(LIBTRAYICON,
240
[
241
	gdk-2.0 >= $GDK20_MINIMUM_VERSION 
242
	atk >= $ATK_MINIMUM_VERSION
243
])
244
	AC_SUBST(LIBTRAYICON_CFLAGS)
245
	AC_SUBST(LIBTRAYICON_LIBS)
1038 by dbera
Check for msgfmt when building with gui enabled. Our autogen.sh checks for gettext and family but there is no check for them in configure.in for those who use tarball to build beagle.
246
247
	AC_PATH_PROG(MSGFMT, msgfmt, no)
248
	if test "x$MSGFMT" = "xno"; then
249
		AC_MSG_ERROR([You need to install gettext, or pass --disable-gui to build without GUI support])
250
	fi
251
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
252
fi
253
254
dnl ----------------------------------------------
255
256
dnl evolution support
257
258
AC_ARG_ENABLE([evolution],
259
	AC_HELP_STRING([--disable-evolution], [Disable evolution support (default auto)]),
260
	enable_evo=$enableval,
261
	enable_evo_sharp=auto)
262
263
264
EVO_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix evolution-sharp`
265
266
EVO_LIBDIR=`$PKG_CONFIG --variable=evolibdir evolution-sharp`
267
AC_SUBST(EVO_LIBDIR)
268
269
PKG_CHECK_MODULES(EVO,
270
                  evolution-sharp >= $EVOLUTION_SHARP_REQUIRED 	\
271
                  gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED	\
973 by dbera
Fix #514252. Add explicit dependency of glib-sharp to evo-backends.
272
		  glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
273
                  gmime-sharp >= $GMIME_SHARP_REQUIRED,
274
                  have_evo_dependencies=yes, have_evo_dependencies=no)
275
AC_SUBST(EVO_LIBS)
276
277
if test "x$have_evo_dependencies" = "xno"; then
278
279
	dnl error out if user has explicitly requested evolution support
280
	if test "x$enable_evo" = "xyes"; then
281
		AC_MSG_ERROR([Could not find Evolution dependencies])
282
	fi
283
284
	enable_evo="no (missing dependencies)"
285
286
else
287
288
	if test "x$enable_evo" != "xno"; then
289
		enable_evo="yes"
290
	else
291
		enable_evo="no (disabled)"
292
	fi
293
294
fi
295
296
AM_CONDITIONAL(ENABLE_EVOLUTION, test "x$enable_evo" = "xyes")
297
298
dnl ----------------------------------------------
299
300
dnl inotify
301
302
AC_ARG_ENABLE([inotify],
303
	 AC_HELP_STRING([--disable-inotify], [Disable inotify filesystem monitoring support (default auto)]),
304
	 enable_inotify=$enableval,
305
	 enable_inotify=auto)
306
1246 by dbera
Use sys/inotify.h (in glibc since 2.4) instead of our local copy. Patch from Adrian Bunk. Fixes #553159.
307
AC_CHECK_HEADERS(sys/inotify.h)
308
309
if test "x$ac_cv_header_sys_inotify_h" = "xno"; then
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
310
311
	dnl error out if user has explicitly requested inotify
312
	if test "x$enable_inotify" = "xyes"; then
313
		AC_MSG_ERROR([inotify is unavailable on your system architecture])
314
	fi
315
316
	enable_inotify="no (unavailable)"
317
318
else
319
320
	if test "x$enable_inotify" != "xno"; then
321
		enable_inotify="yes"
322
	else
323
		enable_inotify="no (disabled)"
324
	fi
325
326
fi
327
328
AM_CONDITIONAL(ENABLE_INOTIFY, test "x$enable_inotify" = "xyes")
329
330
dnl ----------------------------------------------
331
332
dnl gsf-sharp
333
75 by joeshaw
Allow the user to disable gsf-sharp at configure time, rather than only
334
AC_ARG_ENABLE([gsf-sharp],
335
	AC_HELP_STRING([--disable-gsf-sharp], [Disable gsf-sharp support (default auto)]),
336
	enable_gsf_sharp=$enableval,
337
	enable_gsf_sharp=auto)
338
339
if test "x$enable_gsf_sharp" != "xno"; then
340
	PKG_CHECK_MODULES(GSF_SHARP, gsf-sharp >= 0.5, has_gsf_sharp=yes, has_gsf_sharp=no)
341
	if test "x$enable_gsf_sharp" = "xyes" -a "x$has_gsf_sharp" != "xyes"; then
342
		AC_MSG_ERROR([gsf-sharp >= 0.5 not found])
343
	else
344
		enable_gsf_sharp=$has_gsf_sharp
345
	fi
346
fi
347
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
348
AM_CONDITIONAL(ENABLE_GSF_SHARP, test "x$enable_gsf_sharp" = "xyes")
349
if test "x$enable_gsf_sharp" = "xyes"; then
350
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_GSF_SHARP"
351
fi
352
353
dnl ----------------------------------------------
354
355
dnl wv1
356
357
enable_wv1=no
358
if test "x$enable_gsf_sharp" = "xyes"; then
359
	PKG_CHECK_MODULES(WV1, wv-1.0, enable_wv1=yes, enable_wv1=no)
360
	AC_SUBST(WV1_LIBS)
361
fi
362
363
AM_CONDITIONAL(ENABLE_WV1, test "x$enable_wv1" = "xyes")
364
if test "x$enable_wv1" = "xyes"; then
365
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_WV1"
366
fi
367
368
dnl ----------------------------------------------
369
437 by dbera
Remove in house copy of Taglib-sharp since taglib-sharp is being packaged. Fixes #437999.
370
dnl taglib-sharp: Needed for indexing audio formats
371
1158 by dbera
Hard dependency added: taglib-sharp-2.x.
372
PKG_CHECK_MODULES(TAGLIB_SHARP, taglib-sharp >= 2.0)
437 by dbera
Remove in house copy of Taglib-sharp since taglib-sharp is being packaged. Fixes #437999.
373
AC_SUBST(TAGLIB_SHARP_LIBS)
374
375
dnl ----------------------------------------------
376
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
377
PKG_CHECK_MODULES(BEAGLED,
378
[
379
	shared-mime-info
380
	gmime-sharp >= $GMIME_SHARP_REQUIRED
381
	glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
382
])
127 by joeshaw
Update some assembly requirements in configure.in, and remove some
383
BEAGLED_LIBS="$BEAGLED_LIBS $GSF_SHARP_LIBS"
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
384
AC_SUBST(BEAGLED_LIBS)
385
386
GSF_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gsf-sharp`
387
GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp`
388
389
dnl ----------------------------------------------
390
dnl Epiphany Extension
391
392
AC_ARG_ENABLE([epiphany-extension],
393
	AC_HELP_STRING([--enable-epiphany-extension], [Enable Epiphany Extension (default auto)]),
394
	enable_epiphany_extension=$enableval,
395
	enable_epiphany_extension=auto)
396
1057 by arunsr
Add support for Epiphany 2.22
397
use_new_epiphany_extension=no
573 by joeshaw
Include the new Epiphany extension by Tao Fei from his Summer of Code
398
if test "x$enable_epiphany_extension" != "xno"; then
399
	AC_MSG_CHECKING([for Epiphany])
400
	AC_MSG_RESULT()
1059 by arunsr
Add a reminder in configure.in about the use of the Epiphany version string
401
402
	dnl If you want to add anything but a <major>.<minor> version here, you
403
	dnl need to see the handling of the epiphany_version variable in the
404
	dnl epiphany extension code
1280 by arunsr
Support Epiphany 2.24
405
	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"
573 by joeshaw
Include the new Epiphany extension by Tao Fei from his Summer of Code
406
	for v in $VALID_EPIPHANY_VERSIONS; do
407
	
408
		AC_MSG_CHECKING([for Epiphany $v])
409
		PKG_CHECK_EXISTS(epiphany-$v, found_ephy=yes, found_ephy=no)
410
		if test "x$found_ephy" = "xyes"; then
411
			EPIPHANY_MAJOR=$v
412
			AC_MSG_RESULT([yes])
413
			break
414
		else
415
			AC_MSG_RESULT([no])
416
		fi
417
	done
418
419
	if test "x$found_ephy" = "xno"; then
420
		if test "x$enable_epiphany_extension" = "xyes"; then
421
			AC_MSG_ERROR([Epiphany (and/or its development files) could not be found])
422
		else
423
			enable_epiphany_extension="no (Epiphany not installed)"
424
		fi
425
	else
426
		EPIPHANY_EXTENSION_INIT($EPIPHANY_MAJOR)
427
		if test "$EPIPHANY_HAS_PYTHON" != "1"; then
428
			enable_epiphany_extension="no (Epiphany lacks Python support)"
429
		else
430
			enable_epiphany_extension="yes"
431
		fi
432
	fi
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
433
fi
434
435
AM_CONDITIONAL(ENABLE_EPIPHANY_EXTENSION, test "x$enable_epiphany_extension" = "xyes")
1058 by arunsr
Merge the pre-Epiphany-2.22 and Epiphany-2.22+ extensions.
436
AC_SUBST(EPIPHANY_MAJOR)
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
437
718 by dbera
A desparate and naive attempt to get "make distcheck" to succeed. It did succeed after the following changes, except I am not sure if those changes are correct. I was just short of embracing insanity when I got the final problem fixed up.
438
# distcheck hack
439
AC_ARG_ENABLE([epiphany-extension-install],
440
	AS_HELP_STRING([--enable-epiphany-extension-install],[Install Epiphany Extension]),
441
	[install_epiphany_extension=$enableval],
442
	[install_epiphany_extension=yes])
443
444
AM_CONDITIONAL([INSTALL_EPIPHANY_EXTENSION], [test "x$install_epiphany_extension" = "xyes"])
445
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
446
dnl ----------------------------------------------
447
448
dnl Galago
449
450
PKG_CHECK_MODULES(GALAGO, galago-sharp >= 0.5 , enable_galago=yes, enable_galago=no)
451
AM_CONDITIONAL(ENABLE_GALAGO, test "x$enable_galago" = "xyes")
452
AC_SUBST(GALAGO_LIBS)
453
519 by llipka
Merging the 'beagle-networking-branch' to 'trunk'.
454
dnl ----------------------------------------------
455
456
dnl Zeroconf support
457
458
AC_ARG_ENABLE([avahi],
643 by llipka
Disable Avahi by default until we get all the remaining issues fixed. Joe is right, this isn't consumer-ready yet.
459
        AC_HELP_STRING([--enable-avahi], [Enable Avahi (default no)]),
519 by llipka
Merging the 'beagle-networking-branch' to 'trunk'.
460
        enable_avahi=$enableval,
643 by llipka
Disable Avahi by default until we get all the remaining issues fixed. Joe is right, this isn't consumer-ready yet.
461
        enable_avahi=no)
532 by llipka
First batch of network services refactoring and clean-up.
462
463
PKG_CHECK_MODULES(AVAHI_SHARP, avahi-sharp >= $AVAHI_SHARP_REQUIRED,
464
                  have_avahi_dependencies=yes, have_avahi_dependencies=no)
465
AC_SUBST(AVAHI_SHARP_LIBS)
466
467
if test "x$have_avahi_dependencies" = "xno"; then
468
469
	dnl error out if user has explicitly requested avahi support
470
	if test "x$enable_avahi" = "xyes"; then
471
		AC_MSG_ERROR([Could not find Avahi dependencies])
472
	fi
473
474
	enable_avahi="no (missing dependencies)"
475
476
else
477
478
	if test "x$enable_avahi" != "xno"; then
730 by dbera
Logic error (return empty string if stringoption exists but without any value) and typo ('yy' and 'p' should be removed from vim from benefit of mankind).
479
		enable_avahi="yes"
532 by llipka
First batch of network services refactoring and clean-up.
480
	else
481
		enable_avahi="no (disabled)"
482
	fi
483
484
fi
519 by llipka
Merging the 'beagle-networking-branch' to 'trunk'.
485
486
AM_CONDITIONAL(ENABLE_AVAHI, test "x$enable_avahi" = "xyes")
487
730 by dbera
Logic error (return empty string if stringoption exists but without any value) and typo ('yy' and 'p' should be removed from vim from benefit of mankind).
488
if test "x$enable_avahi" = "xyes"; then
489
    enable_avahi="yes (EXPERIMENTAL)"
490
fi
491
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
492
dnl ----------------------------------------------
493
494
GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
495
AC_SUBST(GTK_BINARY_VERSION)
496
497
dnl For the systeminfo glue
498
499
SYSTEMINFO_GLUE_X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $XSS_LIBS $X_EXTRA_LIBS"
500
AC_SUBST(SYSTEMINFO_GLUE_X_LIBS)
501
502
dnl ----------------------------------------------
503
504
dnl KDE launcher/icon support
505
506
kde_prefix_print="unknown; will guess at runtime"
507
AC_PATH_PROG(KDE_CONFIG, [kde-config], [no])
508
if test ! "x$KDE_CONFIG" = "xno"; then
509
	KDE_PREFIX=`$KDE_CONFIG --prefix`
510
	kde_prefix_print="$KDE_PREFIX"
511
fi
512
AC_SUBST(KDE_PREFIX)
513
514
dnl ----------------------------------------------
515
516
dnl Prefixes for helper scripts
517
GAC_PREFIX="$EVO_SHARP_PREFIX:$GSF_SHARP_PREFIX:$GMIME_SHARP_PREFIX"
518
dnl Remove duplicate prefixes
519
GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|:|\n|g' | sort | uniq | tr '\n' ':'`"
520
dnl Remove stray :s
521
GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|::\+|:|g' -e 's|^:\+||' -e 's|:\+$||'`"
522
AC_SUBST(GAC_PREFIX)
523
524
dnl ----------------------------------------------
525
526
dnl Check if the system has libchm, used by the CHMFilter
527
528
# Check for libchm for CHM filter
529
AC_CHECK_LIB(chm,chm_open,has_libchm=yes,has_libchm=no)
530
AM_CONDITIONAL(HAS_LIBCHM, test "x$has_libchm" = "xyes")
531
if test "x$has_libchm" = "xyes"; then
532
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:HAVE_LIBCHM"
533
fi
534
535
dnl ----------------------------------------------
536
922 by dbera
Add a Qt port of beagle-settings, using Qyoto (Qt C# binding). Its absolutely trivial to create UI using qt-designer and C# makes it zero-effort to write the few lines of code.
537
dnl Qt beagle-settings
538
539
AC_ARG_ENABLE([qt],
540
	AC_HELP_STRING([--enable-qt], [Enable Qt GUI for beagle-settings (default no)]),
541
	enable_qt=$enableval,
542
	enable_qt=no)
543
1131 by dbera
Add the google backend related options to beagle-settings-qt.
544
QYOTO_ASSEMBLY=""
545
546
dnl The location and detection is a mess; this would improve once Qyoto gets more attention
547
dnl First try to locate qyoto.pc for Ubuntu and other sane distributions
922 by dbera
Add a Qt port of beagle-settings, using Qyoto (Qt C# binding). Its absolutely trivial to create UI using qt-designer and C# makes it zero-effort to write the few lines of code.
548
if test "x$enable_qt" != "xno"; then
549
	PKG_CHECK_MODULES(QYOTO, qyoto >= 4.3.0, has_qyoto=yes, has_qyoto=no)
550
	if test "x$enable_qt" = "xyes" -a "x$has_qyoto" != "xyes"; then
1131 by dbera
Add the google backend related options to beagle-settings-qt.
551
		AC_MSG_NOTICE([qyoto.pc >= 4.3.0 not found])
922 by dbera
Add a Qt port of beagle-settings, using Qyoto (Qt C# binding). Its absolutely trivial to create UI using qt-designer and C# makes it zero-effort to write the few lines of code.
552
	else
553
		enable_qt=$has_qyoto
1131 by dbera
Add the google backend related options to beagle-settings-qt.
554
		QYOTO_ASSEMBLY="-pkg:qyoto"
555
	fi
556
fi
557
558
dnl Some distributions do not ship a qyoto.pc file (opensuse)
559
dnl I hope checking the presence of the qt-dotnet.dll should be enough
560
if test "x$enable_qt" != "xno" -a "x$has_qyoto" = "xno"; then
561
	i="qt-dotnet"
562
	AC_MSG_CHECKING([for $i.dll])
563
	if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then
564
		AC_MSG_ERROR([missing required mono DLL: $i.dll])
565
	else
566
		AC_MSG_RESULT([found])
567
		QYOTO_ASSEMBLY="-r:qt-dotnet"
568
		enable_qt="yes"
922 by dbera
Add a Qt port of beagle-settings, using Qyoto (Qt C# binding). Its absolutely trivial to create UI using qt-designer and C# makes it zero-effort to write the few lines of code.
569
	fi
570
fi
571
572
AM_CONDITIONAL(ENABLE_QT, test "x$enable_qt" = "xyes")
1131 by dbera
Add the google backend related options to beagle-settings-qt.
573
AC_SUBST(QYOTO_ASSEMBLY)
922 by dbera
Add a Qt port of beagle-settings, using Qyoto (Qt C# binding). Its absolutely trivial to create UI using qt-designer and C# makes it zero-effort to write the few lines of code.
574
575
dnl ----------------------------------------------
576
564 by dbera
Add Makefile magic to automagically generate the html and update the C# apidocs skeleton. make update-docs and make update-html is the key! The docs are not distributed, they are far from complete. I couldnt quite make Makefile.am do what I wanted it to do, so some of the make targets do weird things.
577
dnl Monodoc
578
579
AC_ARG_ENABLE(docs,
580
	AC_HELP_STRING([--disable-docs],
581
	[Do not build documentation (default yes)]),
582
	with_docs=$enableval,
583
	with_docs=yes)
584
585
if test "x$with_docs" = "xyes"; then
586
	AC_PATH_PROG(MONODOCER, monodocer, no)
587
	if test "x$MONODOCER" = "xno"; then
588
		AC_MSG_ERROR([You need to install monodoc, or pass --disable-docs to configure to skip documentation installation])
589
	fi
590
591
	AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
592
	if test "x$MDASSEMBLER" = "xno"; then
593
		AC_MSG_ERROR([You need to install mdassembler, or pass --disable-docs to configure to skip documentation installation])
594
	fi
595
596
	AM_CONDITIONAL(BUILD_DOCS, true)
597
else
598
	AC_MSG_NOTICE([not building Beagle csharp API documentation])
599
	AM_CONDITIONAL(BUILD_DOCS, false)
600
fi
601
1133 by dbera
RDF Adapter merge #2: Merge new files, add updates to SemWeb and build switches.
602
dnl ----------------------------------------------
603
604
dnl RDF Adapter is purely for research purposes right now
605
606
AC_ARG_ENABLE([rdf-adapter],
607
	AC_HELP_STRING([--enable-rdf-adapter], [Builds the RDF Adapter (default no)]),
608
	enable_rdf_adapter=$enableval,
609
	enable_rdf_adapter=no)
610
611
if test "x$enable_rdf_adapter" = "xyes"; then
612
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_RDF_ADAPTER"
613
fi
614
615
AM_CONDITIONAL(ENABLE_RDF_ADAPTER, test "x$enable_rdf_adapter" = "xyes")
564 by dbera
Add Makefile magic to automagically generate the html and update the C# apidocs skeleton. make update-docs and make update-html is the key! The docs are not distributed, they are far from complete. I couldnt quite make Makefile.am do what I wanted it to do, so some of the make targets do weird things.
616
617
dnl ----------------------------------------------
618
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
619
dnl Conditional for debugging XML messages.
620
621
AC_ARG_ENABLE([xml-dump],
622
	AC_HELP_STRING([--enable-xml-dump], [Enables printing of the XML messages sent between components (default no)]),
623
	enable_xml_dump=$enableval,
624
	enable_xml_dump=no)
625
626
if test "x$enable_xml_dump" = "xyes"; then
627
	AC_DEFINE_UNQUOTED(ENABLE_XML_DUMP, 1, [Dump XML messages for debugging])
628
	BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_XML_DUMP"
629
fi
630
631
AC_SUBST(BEAGLE_DEFINES)
632
633
dnl ----------------------------------------------
634
635
AC_OUTPUT([
636
Makefile
637
Util/Makefile
638
glue/Makefile
639
BeagleClient/Makefile
640
beagled/Makefile
641
Filters/Makefile
642
tools/Makefile
643
tools/beagle-settings.desktop.in
1084 by dbera
Add a custom icon for note (stolen from Tomboy, yet again ... thanks Tomboy).
644
search/icons/Makefile
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
645
search/beagle-search.desktop.in
1197 by dbera
Bump gtk+/# >= 2.10. Use the nice Gnome.Vfs.MimeApplication to open hits instead of our home-cooker GnomeFu. We dont really need gnome prefix since we use the Gnome# API to get what we need - this drops the build dependencies of libgnome-2.0-dev and libgnomevfs-dev.
646
search/Makefile
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
647
ImLogViewer/Makefile
648
epiphany-extension/Makefile
569 by joeshaw
Rename mozilla-extension to firefox-extension, since we make no
649
firefox-extension/Makefile
507 by dbera
Merge from tbird-soc07 branch r3824.
650
thunderbird-extension/Makefile
564 by dbera
Add Makefile magic to automagically generate the html and update the C# apidocs skeleton. make update-docs and make update-html is the key! The docs are not distributed, they are far from complete. I couldnt quite make Makefile.am do what I wanted it to do, so some of the make targets do weird things.
651
doc/Makefile
652
doc/api/Makefile
1133 by dbera
RDF Adapter merge #2: Merge new files, add updates to SemWeb and build switches.
653
RDFAdapter/Makefile
959 by dbera
Move all the config data to its own directory beagle/conf-data. Set BEAGLE_CONF_DIR to point the local conf-data directory when running uninstalled.
654
conf-data/Makefile
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
655
beagle-0.0.pc
656
beagle-daemon.pc
657
beagle-ui-0.0.pc
658
beagle.spec
659
po/Makefile.in
660
])
661
662
echo "
532 by llipka
First batch of network services refactoring and clean-up.
663
	Beagle version:           ${VERSION}
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
664
	Target OS:		  ${os}
532 by llipka
First batch of network services refactoring and clean-up.
665
	Inotify:		  ${enable_inotify}
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
666
667
	Prefix:			  ${prefix}
532 by llipka
First batch of network services refactoring and clean-up.
668
	KDE prefix:		  ${kde_prefix_print}
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
669
532 by llipka
First batch of network services refactoring and clean-up.
670
	evolution-sharp?	  ${enable_evo}
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
671
	gsf-sharp?		  ${enable_gsf_sharp}
532 by llipka
First batch of network services refactoring and clean-up.
672
	galago-sharp?		  ${enable_galago}
673
	avahi-sharp		  ${enable_avahi}
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
674
	wv1?			  ${enable_wv1}
675
	libchm?			  ${has_libchm} 
676
569 by joeshaw
Rename mozilla-extension to firefox-extension, since we make no
677
	Firefox Extension?	  yes
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
678
	Epiphany Extension?	  ${enable_epiphany_extension}
569 by joeshaw
Rename mozilla-extension to firefox-extension, since we make no
679
	Thunderbird Extension? 	  ${enable_tbird}
1066 by dbera
Add a GMail live search backend
680
	Google Backends?          ${enable_google}
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
681
682
	Monitor screensaver       ${have_xss}
532 by llipka
First batch of network services refactoring and clean-up.
683
	beagle-search GUI	  ${enable_gui}
922 by dbera
Add a Qt port of beagle-settings, using Qyoto (Qt C# binding). Its absolutely trivial to create UI using qt-designer and C# makes it zero-effort to write the few lines of code.
684
	Qt beagle-settings GUI    ${enable_qt}
685
1145 by dbera
Merge the links-extraction feature from the rdf branch. Builds with and without ENABLE_RDF_ADAPTER. TODO for the links feature:
686
	Build RDF Adapter         ${enable_rdf_adapter} (purely experimental)
569 by joeshaw
Rename mozilla-extension to firefox-extension, since we make no
687
	Build docs?               ${with_docs}
1 by joeshaw
Move the code back in as trunk/beagle, since we'll be moving dead code
688
"