FilterHtml.cs: Add ExtractText(string) command to extract text out of large html...
[beagle.git] / configure.in
blob6272ccf446723594518c72a5fe9dcef9b88b382c
1 ###
2 ### Welcome to Beagle's configure.in.  We hope you enjoy your stay.
3 ###
5 AC_INIT(beagled/BeagleDaemon.cs)
6 AC_CANONICAL_SYSTEM
7 AM_INIT_AUTOMAKE(beagle, 0.2.10)
9 ########################################################################
11 ###
12 ### Some dependencies
13 ###
15 MONO_REQUIRED=1.1.13.5
16 GTK_SHARP_REQUIRED=2.4.0
17 GMIME_SHARP_REQUIRED=2.2.0
18 EVOLUTION_SHARP_REQUIRED=0.10.2
19 GSF_SHARP_REQUIRED=0.6
20 GTK_REQUIRED=2.6.0
22 LIBBEAGLE_GOBJECT_REQUIRED=2.6
23 LIBBEAGLE_LIBXML_REQUIRED=2.6.19
25 PYTHON_REQUIRED=2.3
26 PYGTK_REQUIRED=2.6
28 ########################################################################
30 AM_MAINTAINER_MODE
31 AM_CONFIG_HEADER(config.h)
33 AC_PROG_INSTALL
34 AM_PROG_LIBTOOL
35 AC_PROG_CXX
37 VERSION=${VERSION}
38 AC_SUBST(VERSION)
40 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
41 if test "x$PKG_CONFIG" = "xno"; then
42         AC_MSG_ERROR([You need to install pkg-config])
45 AC_PATH_PROG(BASH, bash)
46 AC_SUBST(BASH)
48 # mozilla extension uses zip to create the jar/xpi files
49 AC_PATH_PROG(ZIP, zip)
51 AC_PATH_PROG(MONO, mono)
52 AC_PATH_PROG(MCS, mcs)
54 AC_MSG_CHECKING([for mono.pc])
55 if test -z `$PKG_CONFIG --variable=prefix mono`; then
56   AC_MSG_ERROR([missing the mono.pc file, usually found in the mono-devel package])
57 else
58   AC_MSG_RESULT([found])
61 # check that we have the require version of mono
62 PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED) 
64 # SharpZipLib broke API in 1.1.11.  Route around the damage.
65 if `$PKG_CONFIG --atleast-version=1.1.11 mono`; then
66   SHARPZIPLIB_LIBS="-r:`$PKG_CONFIG --variable=prefix mono`/lib/mono/compat-1.0/ICSharpCode.SharpZipLib.dll"
67 else
68   SHARPZIPLIB_LIBS="-r:ICSharpCode.SharpZipLib"
70 AC_SUBST(SHARPZIPLIB_LIBS)
72 # check for various mono DLLs that we need.
73 needed_dlls="Mono.Data.SqliteClient Mono.Posix System.Runtime.Remoting System.Web System.Web.Services"
74 for i in $needed_dlls; do
75   AC_MSG_CHECKING([for $i.dll])
76   if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/1.0/$i.dll; then
77     AC_MSG_ERROR([missing required mono DLL: $i.dll])
78   else
79     AC_MSG_RESULT([found])
80   fi
81 done
83 # check for OS
84 case "$target" in
85   *-*-linux*)
86     os=linux
87         os_has_inotify=yes
88     ;;
89   *-*-freebsd*)
90     os=freebsd
91         os_has_inotify=no
92     ;;
93   *)
94     AC_MSG_ERROR([Unrecognised target OS: $target])
95     ;;
96 esac
97 AM_CONDITIONAL(OS_LINUX, test "x$os" = "xlinux")
98 AM_CONDITIONAL(OS_FREEBSD, test "x$os" = "xfreebsd")
100 # xdgmime really wants to have HAVE_MMAP defined
101 AC_FUNC_MMAP()
103 # check for desktop-launch
105 AC_PATH_PROG(DESKTOP_LAUNCH, desktop-launch, no)
106 AM_CONDITIONAL(ENABLE_DESKTOP_LAUNCH, test "x$DESKTOP_LAUNCH" != "xno")
108 # Google QueryDriver
109 # Disable GoogleDriver by default, enable if you want know what you are doing
110 dnl -----------------------------------------------
111 AC_ARG_ENABLE([googledriver],
112         AC_HELP_STRING([--enable-googledriver], [Enable Google backend]),
113         enable_googledriver=$enableval,
114         enable_googledriver=no)
116 if test "x$enable_googledriver" = "xyes"; then
117         # check for wsdl
118         AC_PATH_PROG(WSDL, wsdl)
121 AM_CONDITIONAL(ENABLE_GOOGLEDRIVER, test "x$enable_googledriver" = "xyes")
124 # I18N
127 AC_PROG_INTLTOOL([0.23])
128 GETTEXT_PACKAGE=beagle
129 AC_SUBST(GETTEXT_PACKAGE)
130 ALL_LINGUAS="bg ca cs da de el en_CA en_GB es fi fr gl he hi hu it ja ka ko lt lv mk nb nl pa pl pt_BR ru sr sr@Latn sv th tr uk vi zh_CN zh_HK zh_TW"
131 AM_GLIB_GNU_GETTEXT
132 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the package for translations])
134 # Many distros don't have a dependency on sqlite for their
135 # mono-data-sqlite packages, and the mono build process itself
136 # doesn't require it.  But we do, so check for it here.
137 SQLITE_MAJ_VER="0"
138 AC_ARG_ENABLE([sqlite2],
139               AC_HELP_STRING([--enable-sqlite2], [Force the use of sqlite2, even if 3 is available.]),
140               enable_sqlite2=$enableval,
141               enable_sqlite2=auto)
142 if test "x$enable_sqlite2" = "xyes"; then
143         PKG_CHECK_MODULES(SQLITE, sqlite, SQLITE_MAJ_VER="2", do_nothing="1")
144         if test "x$SQLITE_MAJ_VER" = "x0"; then
145         AC_MSG_ERROR([You need to install sqlite 2])
146         fi
149 AC_ARG_ENABLE([sqlite3],
150               AC_HELP_STRING([--enable-sqlite3], [Force the use of sqlite3, even if 3 is available.]),
151               enable_sqlite3=$enableval,
152               enable_sqlite3=auto)
153 if test "x$enable_sqlite3" = "xyes"; then
154         PKG_CHECK_MODULES(SQLITE, sqlite3, SQLITE_MAJ_VER="3", do_nothing="1")
155         if test "x$SQLITE_MAJ_VER" = "x0"; then
156         AC_MSG_ERROR([You need to install sqlite 3])
157         fi
159 if test "x$SQLITE_MAJ_VER" = "x0"; then
160         PKG_CHECK_MODULES(SQLITE, sqlite, SQLITE_MAJ_VER="2", do_nothing="1")
161         # Note we really need 3.3.1, but the pkgconfig file from upstream only
162         # reports 3.3 for all releases in the 3.3 line.
163         PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3, SQLITE_MAJ_VER="3", do_nothing="1")
165         if test "x$SQLITE_MAJ_VER" = "x0"; then
166                 # Note we really need 3.3.1, but the pkgconfig file from upstream only
167                 # reports 3.3 for all releases in the 3.3 line.  Make sure we error out
168                 # with the correct 3.3.1 version requirement, though.
169                 AC_MSG_ERROR([You need to install sqlite 2.x or >= 3.3.1])
170         fi
173 AC_SUBST(SQLITE_MAJ_VER)
175 AC_ARG_ENABLE([xss],
176               AC_HELP_STRING([--disable-xss], [Disable monitoring xscreensaver to speed up indexing when user is idle]),
177               enable_xss=$enableval,
178               enable_xss=yes)
180 AC_PATH_XTRA
182 # Needed by glue/screensaver-glue.c
183 # The OLD_CFLAGS/CFLAGS hack is needed to build on Ubuntu Breezy Badger 
184 OLD_CFLAGS="$CFLAGS"
185 OLD_LDFLAGS="$LDFLAGS"
186 OLD_LIBS="$LIBS"
187 CFLAGS="$CFLAGS $X_CFLAGS"
188 LDFLAGS="$LDFLAGS $X_LIBS"
189 AC_CHECK_HEADER(X11/extensions/scrnsaver.h, enable_scrnsaver=yes, enable_scrnsaver=no)
190 AC_CHECK_LIB(Xss,XScreenSaverQueryExtension, enable_libxss=yes, enable_libxss=no)
191 have_xss=no
192 if test "x$enable_xss$enable_scrnsaver$enable_libxss" = "xyesyesyes"; then
193         XSS_LIBS="-lXss"
194         have_xss=yes
195         AC_DEFINE(HAVE_LIBXSS,1,[Define to 1 if libXss is installed])
197 AM_CONDITIONAL(ENABLE_LIBXSS, test "x$have_xss" = "xyes")
198 CFLAGS="$OLD_CFLAGS"
199 LDFLAGS="$OLD_LDFLAGS"
200 LIBS="$OLD_LIBS"
202 dnl ----------------------------------------------
203 AC_ARG_ENABLE([thunderbird],
204         AC_HELP_STRING([--disable-thunderbird], [Disable Thunderbird Mail Backend]),
205         enable_tbird=$enableval,
206         enable_tbird=yes)
207 AM_CONDITIONAL(ENABLE_THUNDERBIRD, test "x$enable_tbird" = "xyes")
209 dnl -------------------------------------------------------
211 AC_ARG_ENABLE([gui],
212         AC_HELP_STRING([--disable-gui], [Disable beagle-search]),
213         enable_gui=$enableval,
214         enable_gui=yes)
216 AM_CONDITIONAL(ENABLE_GUI, test "x$enable_gui" = "xyes")
218 if test "x$enable_gui" = "xyes"; then
220         # We pinvoke into gnome-vfs directly from Util/GnomeFu.cs, and
221         # we get the GNOME prefix from libgnome-2.0
222         PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 libgnome-2.0)
224         dnl -------------------------------------------------------
225         dnl Various version requirements
227         PKG_CHECK_MODULES(BEAGLE_UI,
229         gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED
230         gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED
231         glade-sharp-2.0 >= $GTK_SHARP_REQUIRED
232         gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED
233         gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED
234         gmime-sharp >= $GMIME_SHARP_REQUIRED
236         AC_SUBST(BEAGLE_UI_LIBS)
238         PKG_CHECK_MODULES(UIGLUE, gtk+-2.0 >= $GTK_REQUIRED librsvg-2.0)
239         AC_SUBST(UIGLUE_CFLAGS)
240         AC_SUBST(UIGLUE_LIBS)
241         
242         dnl Gdk and Atk are needed for trayicon glue
243         
244         GDK20_MINIMUM_VERSION=2.2.3
245         ATK_MINIMUM_VERSION=1.2.4
246         
247         PKG_CHECK_MODULES(LIBTRAYICON,
249         gdk-2.0 >= $GDK20_MINIMUM_VERSION 
250         atk >= $ATK_MINIMUM_VERSION
252         AC_SUBST(LIBTRAYICON_CFLAGS)
253         AC_SUBST(LIBTRAYICON_LIBS)
254         
257 dnl ----------------------------------------------
259 dnl "Open With" Menu (Requires GTK 2.8)
260         PKG_CHECK_MODULES(OPEN_WITH,
262         gtk-sharp-2.0 >= 2.8
263 ],OPEN_WITH=yes,OPEN_WITH=no)
264 AM_CONDITIONAL(ENABLE_OPEN_WITH, test "x$OPEN_WITH" != "xno")
265 dnl ----------------------------------------------
267 dnl evolution support
269 AC_ARG_ENABLE([evolution],
270         AC_HELP_STRING([--disable-evolution], [Disable evolution support (default auto)]),
271         enable_evo=$enableval,
272         enable_evo_sharp=auto)
275 EVO_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix evolution-sharp`
277 EVO_LIBDIR=`$PKG_CONFIG --variable=evolibdir evolution-sharp`
278 AC_SUBST(EVO_LIBDIR)
280 PKG_CHECK_MODULES(EVO,
281                   evolution-sharp >= $EVOLUTION_SHARP_REQUIRED  \
282                   gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED        \
283                   gmime-sharp >= $GMIME_SHARP_REQUIRED,
284                   have_evo_dependencies=yes, have_evo_dependencies=no)
285 AC_SUBST(EVO_LIBS)
287 if test "x$have_evo_dependencies" = "xno"; then
289         dnl error out if user has explicitly requested evolution support
290         if test "x$enable_evo" = "xyes"; then
291                 AC_MSG_ERROR([Could not find Evolution dependencies])
292         fi
294         enable_evo="no (missing dependencies)"
296 else
298         if test "x$enable_evo" != "xno"; then
299                 enable_evo="yes"
300         else
301                 enable_evo="no (disabled)"
302         fi
306 AM_CONDITIONAL(ENABLE_EVOLUTION, test "x$enable_evo" = "xyes")
308 dnl ----------------------------------------------
310 dnl Should we use our own copy of the sqlite bindings or the version
311 dnl that got installed along with mono?
313 use_local_sqlite="yes" # hard-wired for now
314 AM_CONDITIONAL(USE_LOCAL_SQLITE, test "x$use_local_sqlite" = "xyes")
316 dnl ----------------------------------------------
318 dnl inotify
320 AC_ARG_ENABLE([inotify],
321          AC_HELP_STRING([--disable-inotify], [Disable inotify filesystem monitoring support (default auto)]),
322          enable_inotify=$enableval,
323          enable_inotify=auto)
325 if test "x$os_has_inotify" = "xno"; then
327         dnl error out if user has explicitly requested inotify
328         if test "x$enable_inotify" = "xyes"; then
329                 AC_MSG_ERROR([inotify is unavailable on your system architecture])
330         fi
332         enable_inotify="no (unavailable)"
334 else
336         if test "x$enable_inotify" != "xno"; then
337                 enable_inotify="yes"
338         else
339                 enable_inotify="no (disabled)"
340         fi
344 AM_CONDITIONAL(ENABLE_INOTIFY, test "x$enable_inotify" = "xyes")
346 dnl ----------------------------------------------
348 dnl beagled
350 PKG_CHECK_MODULES(GSF_SHARP, gsf-sharp >= 0.5, enable_gsf_sharp=yes, enable_gsf_sharp=no)
351 AM_CONDITIONAL(ENABLE_GSF_SHARP, test "x$enable_gsf_sharp" = "xyes")
353 dnl ----------------------------------------------
355 dnl libexif: Needed to index jpeg metadata
357 LIBEXIF_API_CHANGE=0.6.0
358 LIBEXIF_REQUIRED_MIN=0.5.7
359 LIBEXIF_REQUIRED_MAX=0.7.0
361 PKG_CHECK_MODULES(LIBEXIF, libexif >= $LIBEXIF_REQUIRED_MIN libexif < $LIBEXIF_REQUIRED_MAX)
362 PKG_CHECK_MODULES(LIBEXIF_API_CHECK, libexif >= $LIBEXIF_API_CHANGE, have_old_libexif=no, have_old_libexif=yes)
364 if test "x$have_old_libexif" = "xyes"; then
365         EXIF_SOVERSION=9
366 else
367         PKG_CHECK_MODULES(LIBEXIF_VERSION_CHECK, libexif >= 0.6.12, EXIF_SOVERSION=12, EXIF_SOVERSION=10)
369 AC_SUBST(EXIF_SOVERSION)
371 PKG_CHECK_MODULES(BEAGLED,
373         shared-mime-info
374         gmime-sharp >= $GMIME_SHARP_REQUIRED
375         glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
377         BEAGLED_LIBS="$BEAGLED_LIBS $GSF_SHARP_LIBS"
378 AC_SUBST(BEAGLED_LIBS)
380 GSF_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gsf-sharp`
381 GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp`
383 dnl ----------------------------------------------
385 dnl libbeagle
387 GTK_DOC_CHECK(1.0)
389 AC_ARG_ENABLE([libbeagle],
390         AC_HELP_STRING([--disable-libbeagle], [Disable libbeagle (C API)]),
391         enable_libbeagle=$enableval,
392         enable_libbeagle=auto)
394 dnl library versioning
395 dnl Increase when changing the API
396 LIBBEAGLE_CURRENT=0
398 dnl Update when changing implementation of current API,
399 dnl reset to 0 when changing CURRENT.  This is the revision of
400 dnl current API version
401 LIBBEAGLE_REVISION=0
403 dnl Increase of API change is ABI compatible, otherwise reset to 0
404 LIBBEAGLE_AGE=0
406 LIBBEAGLE_VERSION_INFO="$LIBBEAGLE_CURRENT:$LIBBEAGLE_REVISION:$LIBBEAGLE_AGE"
407 AC_SUBST(LIBBEAGLE_VERSION_INFO)
409 PKG_CHECK_MODULES(LIBBEAGLE, [
410         gobject-2.0 >= $LIBBEAGLE_GOBJECT_REQUIRED
411         libxml-2.0  >= $LIBBEAGLE_LIBXML_REQUIRED
412 ], have_libbeagle_deps=yes, have_libbeagle_deps=no)
414 AC_SUBST(LIBBEAGLE_CFLAGS)
415 AC_SUBST(LIBBEAGLE_LIBS)
417 if test "x$have_libbeagle_deps" = "xno"; then
419         if test "x$enable_libbeagle" = "xyes"; then
420                 AC_MSG_ERROR([Missing libbeagle dependencies])
421         fi
423         enable_libbeagle="no (missing dependencies)"
424 else
425         if test "x$enable_libbeagle" != "xno"; then
426                 enable_libbeagle="yes"
427         else
428                 enable_libbeagle="no (disabled)"
429         fi
432 AM_CONDITIONAL(ENABLE_LIBBEAGLE, test "x$enable_libbeagle" = "xyes")
434 dnl ----------------------------------------------
435 AC_ARG_ENABLE([bludgeon],
436         AC_HELP_STRING([--disable-bludgeon], [Disable bludgeon testing tool]),
437         enable_bludgeon=$enableval,
438         enable_bludgeon=yes)
439 AM_CONDITIONAL(ENABLE_BLUDGEON, test "x$enable_bludgeon" = "xyes")
441         
442 dnl ----------------------------------------------
443 dnl Epiphany Extension
444 dnl Much of this is cut&pasted from epiphany-extensions/configure.ac
446 AC_ARG_ENABLE([epiphany-extension],
447         AC_HELP_STRING([--enable-epiphany-extension], [Enable Epiphany Extension (default auto)]),
448         enable_epiphany_extension=$enableval,
449         enable_epiphany_extension=auto)
451 if $PKG_CONFIG --exists epiphany-2.16; then
452         EPIPHANY_MAJOR=2.16
453         EPIPHANY_REQUIRED=2.16.0
454 elif $PKG_CONFIG --exists epiphany-2.14; then
455         EPIPHANY_MAJOR=2.14
456         EPIPHANY_REQUIRED=2.14.0
457 elif $PKG_CONFIG --exists epiphany-1.8; then
458         EPIPHANY_MAJOR=1.8
459         EPIPHANY_REQUIRED=1.7.0
460 elif $PKG_CONFIG --exists epiphany-1.6; then
461         EPIPHANY_MAJOR=1.6
462         EPIPHANY_REQUIRED=1.6.0
463 else
464         enable_epiphany_extension="no (Epiphany not installed)"
467 if test "x$enable_epiphany_extension" = "xyes"; then
469 LIBXML_REQUIRED=2.6.0
470 LIBGLIB_REQUIRED=2.4.0
471 LIBGTK_REQUIRED=2.4.0
473 AC_SUBST(EPIPHANY_REQUIRED)
474 AC_SUBST(LIBXML_REQUIRED)
475 AC_SUBST(LIBGLIB_REQUIRED)
476 AC_SUBST(LIBGTK_REQUIRED)
478 PKG_CHECK_MODULES(EPIPHANY_DEPENDENCY, 
479                   libxml-2.0 >= $LIBXML_REQUIRED \
480                   libglade-2.0 \
481                   glib-2.0 >= $LIBGLIB_REQUIRED \
482                   gmodule-2.0 \
483                   gtk+-2.0 >= $LIBGTK_REQUIRED \
484                   epiphany-$EPIPHANY_MAJOR >= $EPIPHANY_REQUIRED,
485                   have_epiphany_dependencies=yes,
486                   have_epiphany_dependencies=no)
487 AC_SUBST(EPIPHANY_DEPENDENCY_CFLAGS)
488 AC_SUBST(EPIPHANY_DEPENDENCY_LIBS)
490 EPIPHANY_EXTENSIONS_DIR="`$PKG_CONFIG --variable=extensionsdir epiphany-$EPIPHANY_MAJOR`"
491 AC_SUBST([EPIPHANY_EXTENSIONS_DIR])
492 EPIPHANY_PREFIX="`$PKG_CONFIG --variable=prefix epiphany-$EPIPHANY_MAJOR`"
493 AC_SUBST(EPIPHANY_PREFIX)
495 if test "x$have_epiphany_dependencies" = "xno"; then
496         enable_epiphany_extension="no (missing dependencies)"
497 elif test "x$enable_epiphany_extension" != "xyes"; then
498         enable_epiphany_extension="disabled"
503 AM_CONDITIONAL(ENABLE_EPIPHANY_EXTENSION, test "x$enable_epiphany_extension" = "xyes")
505 AC_ARG_ENABLE([epiphany-extension-install],
506         AS_HELP_STRING([--enable-epiphany-extension-install],[Install Epiphany Extension]),
507         [install_epiphany_extension=$enableval],
508         [install_epiphany_extension=yes])
510 AM_CONDITIONAL([INSTALL_EPIPHANY_EXTENSION], [test "x$install_epiphany_extension" = "xyes"])
512 dnl ----------------------------------------------
514 dnl Galago
516 PKG_CHECK_MODULES(GALAGO, galago-sharp >= 0.5 , enable_galago=yes, enable_galago=no)
517 AM_CONDITIONAL(ENABLE_GALAGO, test "x$enable_galago" = "xyes")
518 AC_SUBST(GALAGO_LIBS)
521 dnl ----------------------------------------------
523 GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
524 AC_SUBST(GTK_BINARY_VERSION)
526 dnl For the systeminfo glue
528 SYSTEMINFO_GLUE_X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $XSS_LIBS $X_EXTRA_LIBS"
529 AC_SUBST(SYSTEMINFO_GLUE_X_LIBS)
531 dnl ----------------------------------------------
533 dnl For the wv1 glue
535 PKG_CHECK_MODULES(WV1, wv-1.0, enable_wv1=yes, enable_wv1=no)
536 AM_CONDITIONAL(ENABLE_WV1, test "x$enable_wv1" = "xyes")
537 AC_SUBST(WV1_LIBS)
539 dnl ----------------------------------------------
541 dnl KDE launcher/icon support
543 kde_prefix_print="unknown; will guess at runtime"
544 AC_PATH_PROG(KDE_CONFIG, [kde-config], [no])
545 if test ! "x$KDE_CONFIG" = "xno"; then
546         KDE_PREFIX=`$KDE_CONFIG --prefix`
547         kde_prefix_print="$KDE_PREFIX"
549 AC_SUBST(KDE_PREFIX)
551 dnl ----------------------------------------------
553 dnl Prefixes for helper scripts
554 GAC_PREFIX="$EVO_SHARP_PREFIX:$GSF_SHARP_PREFIX:$GMIME_SHARP_PREFIX"
555 dnl Remove duplicate prefixes
556 GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|:|\n|g' | sort | uniq | tr '\n' ':'`"
557 dnl Remove stray :s
558 GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|::\+|:|g' -e 's|^:\+||' -e 's|:\+$||'`"
559 AC_SUBST(GAC_PREFIX)
561 GNOME_PREFIX="`$PKG_CONFIG --variable=prefix libgnome-2.0`"
562 AC_SUBST(GNOME_PREFIX)
564 dnl ----------------------------------------------
566 dnl Check if the system has libchm, used by the CHMFilter
568 # Check for libchm for CHM filter
569 AC_CHECK_LIB(chm,chm_open,has_libchm=yes,has_libchm=no)
570 AM_CONDITIONAL(HAS_LIBCHM, test "x$has_libchm" = "xyes")
572 dnl ----------------------------------------------
574 dnl Conditional for debugging XML messages.
576 BEAGLE_DEFINES=""
578 AC_ARG_ENABLE([xml-dump],
579         AC_HELP_STRING([--enable-xml-dump], [Enables printing of the XML messages sent between components (default no)]),
580         enable_xml_dump=$enableval,
581         enable_xml_dump=no)
583 if test "x$enable_xml_dump" = "xyes"; then
584         AC_DEFINE_UNQUOTED(ENABLE_XML_DUMP, 1, [Dump XML messages for debugging])
585         BEAGLE_DEFINES="-define:ENABLE_XML_DUMP"
588 AC_SUBST(BEAGLE_DEFINES)
590 dnl ----------------------------------------------
592 dnl Python 2.3
594 AC_ARG_ENABLE(python,
595         AC_HELP_STRING([--disable-python], [Disable python support (default auto)]),
596         enable_python=$enableval,
597         enable_python=auto)
599 have_python=no
600 if test "x$enable_libbeagle" = "xyes" -a "x$enable_python" != "xno"; then
601         have_python_version=no
602         have_python_headers=no
603         have_pygtk_deps=no
604         have_pygtk_codegen=no
606         AM_PATH_PYTHON()
608         if test -z "$PYTHON"; then
609                 AC_MSG_WARN([Python not found])
610         else
611                 AM_PYTHON_CHECK_VERSION($PYTHON, $PYTHON_REQUIRED,
612                         have_python_version=yes,
613                         have_python_version=no)
614         fi
616         if test "x$have_python_version" != "xyes"; then
617                 AC_MSG_WARN([Python version $PYTHON_REQUIRED not found])
618         else
619                 AM_CHECK_PYTHON_HEADERS(have_python_headers=yes, have_python_headers=no)
620         fi
622         if test "x$have_python_headers" != "xyes"; then
623                 AC_MSG_WARN([could not find Python headers])
624         else
625                 PKG_CHECK_MODULES(PYBEAGLE,
626                         pygtk-2.0 >= $PYGTK_REQUIRED
627                         pygobject-2.0 >= $PYGTK_REQUIRED,
628                         have_pygtk_deps=yes,
629                         have_pygtk_deps=no)
630         fi
632         if test "x$have_pygtk_deps" != "xyes"; then
633                 AC_MSG_WARN([could not find pygtk])
634         else
635                 AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
636         fi
638         if test -z "$PYGTK_CODEGEN"; then
639                 AC_MSG_WARN([could not find pygtk-codegen in path])
640         else
641                 AC_MSG_CHECKING(for pygtk defs)
642                 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
643                 AC_MSG_RESULT($PYGTK_DEFSDIR)
645                 have_python=yes
646         fi
649 if test "x$enable_python" = "xyes"; then
650         if test "x$enable_libbeagle" != "xyes"; then
651                 AC_MSG_ERROR([Python bindings are requested, but libbeagle isn't to be built])
652         elif test "x$have_python" = "xno"; then
653                 AC_MSG_ERROR([Python bindings are requested, but cannot be built])
654         fi
657 AM_CONDITIONAL(ENABLE_PYTHON, test "x$have_python" = "xyes")
658 AC_SUBST(PYBEAGLE_LIBS)
659 AC_SUBST(PYBEAGLE_CFLAGS)
660 AC_SUBST(PYGTK_DEFSDIR)
662 dnl ----------------------------------------------
664 AC_OUTPUT([
665 Makefile
666 Util/Makefile
667 Util/Util.dll.config
668 images/Makefile
669 glue/Makefile
670 BeagleClient/Makefile
671 beagled/Makefile
672 Filters/Makefile
673 tools/Makefile
674 tools/beagle-settings.desktop.in
675 search/Makefile
676 search/beagle-search.desktop.in
677 ImLogViewer/Makefile
678 ContactViewer/Makefile
679 libbeagle/Makefile
680 libbeagle/libbeagle-0.0.pc
681 libbeagle/beagle/Makefile
682 libbeagle/examples/Makefile
683 libbeagle/docs/Makefile
684 libbeagle/docs/reference/Makefile
685 epiphany-extension/Makefile
686 mozilla-extension/Makefile
687 bludgeon/Makefile
688 wrappers/Makefile
689 wrappers/python/Makefile
690 beagle-0.0.pc
691 beagle-daemon.pc
692 beagle-ui-0.0.pc
693 beagle.spec
694 po/Makefile.in
697 echo "
698         Beagle Version:           ${VERSION}
699         Target OS:                ${os}
700         inotify?                  ${enable_inotify}
702         Prefix:                   ${prefix}
703         GNOME Prefix:             ${GNOME_PREFIX}
704         KDE Prefix:               ${kde_prefix_print}
706         Evolution support?        ${enable_evo}
707         gsf-sharp?                ${enable_gsf_sharp}
708         wv1?                      ${enable_wv1}
709         galago-sharp?             ${enable_galago}
710         libchm?                   ${has_libchm} 
711         google backend?           ${enable_googledriver} (Unsupported)
712         Thunderbird backend?      ${enable_tbird}
714         Mozilla Extension?        yes
715         Epiphany Extension?       ${enable_epiphany_extension}
717         Local SqliteClient?       ${use_local_sqlite}
718         Sqlite version:           ${SQLITE_MAJ_VER}.x
720         Enable libbeagle          ${enable_libbeagle}
721         Enable python bindings    ${have_python}
722         Monitor screensaver       ${have_xss}
724         Enable beagle-search GUI  ${enable_gui}
725         Enable \"Open With\" menu   ${OPEN_WITH}
727 echo
729 if test "x$enable_epiphany_extension" = "xyes"; then
730    echo "NOTE: The Beagle Epiphany Extension Is Totally Insecure!"
731    echo "      Use it at your own risk!"
732    echo