cvsimport
[beagle.git] / configure.in
blob4710f54c7f5e85220159ed76c408ed98d1d5a571
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.14)
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 BEAGLE_DEFINES=""
66 # check for various mono DLLs that we need.
67 needed_dlls="Mono.Data.SqliteClient Mono.Posix System.Runtime.Remoting System.Web System.Web.Services ICSharpCode.SharpZipLib"
68 for i in $needed_dlls; do
69   AC_MSG_CHECKING([for $i.dll])
70   if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/1.0/$i.dll; then
71     AC_MSG_ERROR([missing required mono DLL: $i.dll])
72   else
73     AC_MSG_RESULT([found])
74   fi
75 done
77 # SharpZipLib was broken previously, and all our Makefile.am's depend on this
78 # define.
79 SHARPZIPLIB_LIBS="-r:ICSharpCode.SharpZipLib"
80 AC_SUBST(SHARPZIPLIB_LIBS)
82 # check for OS
83 case "$target" in
84   *-*-linux*)
85     os=linux
86         os_has_inotify=yes
87     ;;
88   *-*-freebsd*)
89     os=freebsd
90         os_has_inotify=no
91     ;;
92   *)
93     AC_MSG_ERROR([Unrecognised target OS: $target])
94     ;;
95 esac
96 AM_CONDITIONAL(OS_LINUX, test "x$os" = "xlinux")
97 AM_CONDITIONAL(OS_FREEBSD, test "x$os" = "xfreebsd")
99 # xdgmime really wants to have HAVE_MMAP defined
100 AC_FUNC_MMAP()
102 # check for desktop-launch
103 AC_PATH_PROG(DESKTOP_LAUNCH, desktop-launch, no)
104 AM_CONDITIONAL(ENABLE_DESKTOP_LAUNCH, test "x$DESKTOP_LAUNCH" != "xno")
106 # check for xdg-open
107 AC_PATH_PROG(XDG_OPEN, xdg-open, no)
108 AM_CONDITIONAL(ENABLE_XDG_OPEN, test "x$XDG_OPEN" != "xno")
110 # Google QueryDriver
111 # Disable GoogleDriver by default, enable if you want know what you are doing
112 dnl -----------------------------------------------
113 AC_ARG_ENABLE([googledriver],
114         AC_HELP_STRING([--enable-googledriver], [Enable Google backend]),
115         enable_googledriver=$enableval,
116         enable_googledriver=no)
118 if test "x$enable_googledriver" = "xyes"; then
119         # check for wsdl
120         AC_PATH_PROG(WSDL, wsdl)
123 AM_CONDITIONAL(ENABLE_GOOGLEDRIVER, test "x$enable_googledriver" = "xyes")
126 # I18N
129 AC_PROG_INTLTOOL([0.23])
130 GETTEXT_PACKAGE=beagle
131 AC_SUBST(GETTEXT_PACKAGE)
132 ALL_LINGUAS="ar 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"
133 AM_GLIB_GNU_GETTEXT
134 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the package for translations])
136 # Many distros don't have a dependency on sqlite for their
137 # mono-data-sqlite packages, and the mono build process itself
138 # doesn't require it.  But we do, so check for it here.
139 SQLITE_MAJ_VER="0"
140 AC_ARG_ENABLE([sqlite2],
141               AC_HELP_STRING([--enable-sqlite2], [Force the use of sqlite2, even if 3 is available.]),
142               enable_sqlite2=$enableval,
143               enable_sqlite2=auto)
144 if test "x$enable_sqlite2" = "xyes"; then
145         PKG_CHECK_MODULES(SQLITE, sqlite, SQLITE_MAJ_VER="2", do_nothing="1")
146         if test "x$SQLITE_MAJ_VER" = "x0"; then
147         AC_MSG_ERROR([You need to install sqlite 2])
148         fi
151 AC_ARG_ENABLE([sqlite3],
152               AC_HELP_STRING([--enable-sqlite3], [Force the use of sqlite3, even if 3 is available.]),
153               enable_sqlite3=$enableval,
154               enable_sqlite3=auto)
155 if test "x$enable_sqlite3" = "xyes"; then
156         PKG_CHECK_MODULES(SQLITE, sqlite3, SQLITE_MAJ_VER="3", do_nothing="1")
157         if test "x$SQLITE_MAJ_VER" = "x0"; then
158         AC_MSG_ERROR([You need to install sqlite 3])
159         fi
161 if test "x$SQLITE_MAJ_VER" = "x0"; then
162         PKG_CHECK_MODULES(SQLITE, sqlite, SQLITE_MAJ_VER="2", do_nothing="1")
163         # Note we really need 3.3.1, but the pkgconfig file from upstream only
164         # reports 3.3 for all releases in the 3.3 line.
165         PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3, SQLITE_MAJ_VER="3", do_nothing="1")
167         if test "x$SQLITE_MAJ_VER" = "x0"; then
168                 # Note we really need 3.3.1, but the pkgconfig file from upstream only
169                 # reports 3.3 for all releases in the 3.3 line.  Make sure we error out
170                 # with the correct 3.3.1 version requirement, though.
171                 AC_MSG_ERROR([You need to install sqlite 2.x or >= 3.3.1])
172         fi
175 AC_SUBST(SQLITE_MAJ_VER)
177 AC_ARG_ENABLE([xss],
178               AC_HELP_STRING([--disable-xss], [Disable monitoring xscreensaver to speed up indexing when user is idle]),
179               enable_xss=$enableval,
180               enable_xss=yes)
182 AC_PATH_XTRA
184 # Needed by glue/screensaver-glue.c
185 # The OLD_CFLAGS/CFLAGS hack is needed to build on Ubuntu Breezy Badger 
186 OLD_CFLAGS="$CFLAGS"
187 OLD_LDFLAGS="$LDFLAGS"
188 OLD_LIBS="$LIBS"
189 CFLAGS="$CFLAGS $X_CFLAGS"
190 LDFLAGS="$LDFLAGS $X_LIBS"
191 AC_CHECK_HEADER(X11/extensions/scrnsaver.h, enable_scrnsaver=yes, enable_scrnsaver=no)
192 AC_CHECK_LIB(Xss,XScreenSaverQueryExtension, enable_libxss=yes, enable_libxss=no)
193 have_xss=no
194 if test "x$enable_xss$enable_scrnsaver$enable_libxss" = "xyesyesyes"; then
195         XSS_LIBS="-lXss"
196         have_xss=yes
197         AC_DEFINE(HAVE_LIBXSS,1,[Define to 1 if libXss is installed])
199 AM_CONDITIONAL(ENABLE_LIBXSS, test "x$have_xss" = "xyes")
200 CFLAGS="$OLD_CFLAGS"
201 LDFLAGS="$OLD_LDFLAGS"
202 LIBS="$OLD_LIBS"
204 dnl ----------------------------------------------
205 AC_ARG_ENABLE([thunderbird],
206         AC_HELP_STRING([--disable-thunderbird], [Disable Thunderbird Mail Backend]),
207         enable_tbird=$enableval,
208         enable_tbird=yes)
209 AM_CONDITIONAL(ENABLE_THUNDERBIRD, test "x$enable_tbird" = "xyes")
211 dnl -------------------------------------------------------
213 AC_ARG_ENABLE([gui],
214         AC_HELP_STRING([--disable-gui], [Disable beagle-search]),
215         enable_gui=$enableval,
216         enable_gui=yes)
218 AM_CONDITIONAL(ENABLE_GUI, test "x$enable_gui" = "xyes")
220 if test "x$enable_gui" = "xyes"; then
222         # We pinvoke into gnome-vfs directly from Util/GnomeFu.cs, and
223         # we get the GNOME prefix from libgnome-2.0
224         PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 libgnome-2.0)
226         dnl -------------------------------------------------------
227         dnl Various version requirements
229         PKG_CHECK_MODULES(BEAGLE_UI,
231         gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED
232         gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED
233         glade-sharp-2.0 >= $GTK_SHARP_REQUIRED
234         gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED
235         gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED
236         gmime-sharp >= $GMIME_SHARP_REQUIRED
238         AC_SUBST(BEAGLE_UI_LIBS)
240         PKG_CHECK_MODULES(UIGLUE, gtk+-2.0 >= $GTK_REQUIRED librsvg-2.0)
241         AC_SUBST(UIGLUE_CFLAGS)
242         AC_SUBST(UIGLUE_LIBS)
243         
244         dnl Gdk and Atk are needed for trayicon glue
245         
246         GDK20_MINIMUM_VERSION=2.2.3
247         ATK_MINIMUM_VERSION=1.2.4
248         
249         PKG_CHECK_MODULES(LIBTRAYICON,
251         gdk-2.0 >= $GDK20_MINIMUM_VERSION 
252         atk >= $ATK_MINIMUM_VERSION
254         AC_SUBST(LIBTRAYICON_CFLAGS)
255         AC_SUBST(LIBTRAYICON_LIBS)
256         
259 dnl ----------------------------------------------
261 dnl "Open With" Menu (Requires GTK 2.8)
262         PKG_CHECK_MODULES(OPEN_WITH,
264         gtk-sharp-2.0 >= 2.8
265 ],OPEN_WITH=yes,OPEN_WITH=no)
266 AM_CONDITIONAL(ENABLE_OPEN_WITH, test "x$OPEN_WITH" != "xno")
267 dnl ----------------------------------------------
269 dnl evolution support
271 AC_ARG_ENABLE([evolution],
272         AC_HELP_STRING([--disable-evolution], [Disable evolution support (default auto)]),
273         enable_evo=$enableval,
274         enable_evo_sharp=auto)
277 EVO_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix evolution-sharp`
279 EVO_LIBDIR=`$PKG_CONFIG --variable=evolibdir evolution-sharp`
280 AC_SUBST(EVO_LIBDIR)
282 PKG_CHECK_MODULES(EVO,
283                   evolution-sharp >= $EVOLUTION_SHARP_REQUIRED  \
284                   gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED        \
285                   gmime-sharp >= $GMIME_SHARP_REQUIRED,
286                   have_evo_dependencies=yes, have_evo_dependencies=no)
287 AC_SUBST(EVO_LIBS)
289 if test "x$have_evo_dependencies" = "xno"; then
291         dnl error out if user has explicitly requested evolution support
292         if test "x$enable_evo" = "xyes"; then
293                 AC_MSG_ERROR([Could not find Evolution dependencies])
294         fi
296         enable_evo="no (missing dependencies)"
298 else
300         if test "x$enable_evo" != "xno"; then
301                 enable_evo="yes"
302         else
303                 enable_evo="no (disabled)"
304         fi
308 AM_CONDITIONAL(ENABLE_EVOLUTION, test "x$enable_evo" = "xyes")
310 dnl ----------------------------------------------
312 dnl Should we use our own copy of the sqlite bindings or the version
313 dnl that got installed along with mono?
315 use_local_sqlite="yes" # hard-wired for now
316 AM_CONDITIONAL(USE_LOCAL_SQLITE, test "x$use_local_sqlite" = "xyes")
318 dnl ----------------------------------------------
320 dnl inotify
322 AC_ARG_ENABLE([inotify],
323          AC_HELP_STRING([--disable-inotify], [Disable inotify filesystem monitoring support (default auto)]),
324          enable_inotify=$enableval,
325          enable_inotify=auto)
327 if test "x$os_has_inotify" = "xno"; then
329         dnl error out if user has explicitly requested inotify
330         if test "x$enable_inotify" = "xyes"; then
331                 AC_MSG_ERROR([inotify is unavailable on your system architecture])
332         fi
334         enable_inotify="no (unavailable)"
336 else
338         if test "x$enable_inotify" != "xno"; then
339                 enable_inotify="yes"
340         else
341                 enable_inotify="no (disabled)"
342         fi
346 AM_CONDITIONAL(ENABLE_INOTIFY, test "x$enable_inotify" = "xyes")
348 dnl ----------------------------------------------
350 dnl gsf-sharp
352 PKG_CHECK_MODULES(GSF_SHARP, gsf-sharp >= 0.5, enable_gsf_sharp=yes, enable_gsf_sharp=no)
353 AM_CONDITIONAL(ENABLE_GSF_SHARP, test "x$enable_gsf_sharp" = "xyes")
354 if test "x$enable_gsf_sharp" = "xyes"; then
355         BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_GSF_SHARP"
358 dnl ----------------------------------------------
360 dnl wv1
362 enable_wv1=no
363 if test "x$enable_gsf_sharp" = "xyes"; then
364         PKG_CHECK_MODULES(WV1, wv-1.0, enable_wv1=yes, enable_wv1=no)
365         AC_SUBST(WV1_LIBS)
368 AM_CONDITIONAL(ENABLE_WV1, test "x$enable_wv1" = "xyes")
369 if test "x$enable_wv1" = "xyes"; then
370         BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_WV1"
373 dnl ----------------------------------------------
375 dnl libexif: Needed to index jpeg metadata
377 LIBEXIF_API_CHANGE=0.6.0
378 LIBEXIF_REQUIRED_MIN=0.5.7
379 LIBEXIF_REQUIRED_MAX=0.7.0
381 PKG_CHECK_MODULES(LIBEXIF, libexif >= $LIBEXIF_REQUIRED_MIN libexif < $LIBEXIF_REQUIRED_MAX)
382 PKG_CHECK_MODULES(LIBEXIF_API_CHECK, libexif >= $LIBEXIF_API_CHANGE, have_old_libexif=no, have_old_libexif=yes)
384 if test "x$have_old_libexif" = "xyes"; then
385         EXIF_SOVERSION=9
386 else
387         PKG_CHECK_MODULES(LIBEXIF_VERSION_CHECK, libexif >= 0.6.12, EXIF_SOVERSION=12, EXIF_SOVERSION=10)
389 AC_SUBST(EXIF_SOVERSION)
391 PKG_CHECK_MODULES(BEAGLED,
393         shared-mime-info
394         gmime-sharp >= $GMIME_SHARP_REQUIRED
395         glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
397         BEAGLED_LIBS="$BEAGLED_LIBS $GSF_SHARP_LIBS"
398 AC_SUBST(BEAGLED_LIBS)
400 GSF_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gsf-sharp`
401 GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp`
403 dnl ----------------------------------------------
405 dnl libbeagle
407 AC_ARG_ENABLE([libbeagle],
408         AC_HELP_STRING([--disable-libbeagle], [Disable libbeagle (C API)]),
409         enable_libbeagle=$enableval,
410         enable_libbeagle=auto)
412 dnl library versioning
413 dnl Increase when changing the API
414 LIBBEAGLE_CURRENT=0
416 dnl Update when changing implementation of current API,
417 dnl reset to 0 when changing CURRENT.  This is the revision of
418 dnl current API version
419 LIBBEAGLE_REVISION=0
421 dnl Increase of API change is ABI compatible, otherwise reset to 0
422 LIBBEAGLE_AGE=0
424 LIBBEAGLE_VERSION_INFO="$LIBBEAGLE_CURRENT:$LIBBEAGLE_REVISION:$LIBBEAGLE_AGE"
425 AC_SUBST(LIBBEAGLE_VERSION_INFO)
427 PKG_CHECK_MODULES(LIBBEAGLE, [
428         gobject-2.0 >= $LIBBEAGLE_GOBJECT_REQUIRED
429         libxml-2.0  >= $LIBBEAGLE_LIBXML_REQUIRED
430 ], have_libbeagle_deps=yes, have_libbeagle_deps=no)
432 AC_SUBST(LIBBEAGLE_CFLAGS)
433 AC_SUBST(LIBBEAGLE_LIBS)
435 if test "x$have_libbeagle_deps" = "xno"; then
437         if test "x$enable_libbeagle" = "xyes"; then
438                 AC_MSG_ERROR([Missing libbeagle dependencies])
439         fi
441         enable_libbeagle="no (missing dependencies)"
442 else
443         if test "x$enable_libbeagle" != "xno"; then
444                 enable_libbeagle="yes"
445         else
446                 enable_libbeagle="no (disabled)"
447         fi
450 AM_CONDITIONAL(ENABLE_LIBBEAGLE, test "x$enable_libbeagle" = "xyes")
452 # Check for gtk-doc.  We need to do this whether or not libbeagle is enabled
453 # or else configure complains.
454 # KEEP THE LEADING SPACE HERE - it's used to trick gnome-autogen.sh into
455 # not running gtkdocize, which we don't need or want to run.
456  GTK_DOC_CHECK(1.0)
458 dnl ----------------------------------------------
459 AC_ARG_ENABLE([bludgeon],
460         AC_HELP_STRING([--disable-bludgeon], [Disable bludgeon testing tool]),
461         enable_bludgeon=$enableval,
462         enable_bludgeon=yes)
463 AM_CONDITIONAL(ENABLE_BLUDGEON, test "x$enable_bludgeon" = "xyes")
465         
466 dnl ----------------------------------------------
467 dnl Epiphany Extension
468 dnl Much of this is cut&pasted from epiphany-extensions/configure.ac
470 AC_ARG_ENABLE([epiphany-extension],
471         AC_HELP_STRING([--enable-epiphany-extension], [Enable Epiphany Extension (default auto)]),
472         enable_epiphany_extension=$enableval,
473         enable_epiphany_extension=auto)
475 if $PKG_CONFIG --exists epiphany-2.16; then
476         EPIPHANY_MAJOR=2.16
477         EPIPHANY_REQUIRED=2.16.0
478 elif $PKG_CONFIG --exists epiphany-2.14; then
479         EPIPHANY_MAJOR=2.14
480         EPIPHANY_REQUIRED=2.14.0
481 elif $PKG_CONFIG --exists epiphany-1.8; then
482         EPIPHANY_MAJOR=1.8
483         EPIPHANY_REQUIRED=1.7.0
484 elif $PKG_CONFIG --exists epiphany-1.6; then
485         EPIPHANY_MAJOR=1.6
486         EPIPHANY_REQUIRED=1.6.0
487 else
488         enable_epiphany_extension="no (Epiphany not installed)"
491 if test "x$enable_epiphany_extension" = "xyes"; then
493 LIBXML_REQUIRED=2.6.0
494 LIBGLIB_REQUIRED=2.4.0
495 LIBGTK_REQUIRED=2.4.0
497 AC_SUBST(EPIPHANY_REQUIRED)
498 AC_SUBST(LIBXML_REQUIRED)
499 AC_SUBST(LIBGLIB_REQUIRED)
500 AC_SUBST(LIBGTK_REQUIRED)
502 PKG_CHECK_MODULES(EPIPHANY_DEPENDENCY, 
503                   libxml-2.0 >= $LIBXML_REQUIRED \
504                   libglade-2.0 \
505                   glib-2.0 >= $LIBGLIB_REQUIRED \
506                   gmodule-2.0 \
507                   gtk+-2.0 >= $LIBGTK_REQUIRED \
508                   epiphany-$EPIPHANY_MAJOR >= $EPIPHANY_REQUIRED,
509                   have_epiphany_dependencies=yes,
510                   have_epiphany_dependencies=no)
511 AC_SUBST(EPIPHANY_DEPENDENCY_CFLAGS)
512 AC_SUBST(EPIPHANY_DEPENDENCY_LIBS)
514 EPIPHANY_EXTENSIONS_DIR="`$PKG_CONFIG --variable=extensionsdir epiphany-$EPIPHANY_MAJOR`"
515 AC_SUBST([EPIPHANY_EXTENSIONS_DIR])
516 EPIPHANY_PREFIX="`$PKG_CONFIG --variable=prefix epiphany-$EPIPHANY_MAJOR`"
517 AC_SUBST(EPIPHANY_PREFIX)
519 if test "x$have_epiphany_dependencies" = "xno"; then
520         enable_epiphany_extension="no (missing dependencies)"
521 elif test "x$enable_epiphany_extension" != "xyes"; then
522         enable_epiphany_extension="disabled"
527 AM_CONDITIONAL(ENABLE_EPIPHANY_EXTENSION, test "x$enable_epiphany_extension" = "xyes")
529 AC_ARG_ENABLE([epiphany-extension-install],
530         AS_HELP_STRING([--enable-epiphany-extension-install],[Install Epiphany Extension]),
531         [install_epiphany_extension=$enableval],
532         [install_epiphany_extension=yes])
534 AM_CONDITIONAL([INSTALL_EPIPHANY_EXTENSION], [test "x$install_epiphany_extension" = "xyes"])
536 dnl ----------------------------------------------
538 dnl Galago
540 PKG_CHECK_MODULES(GALAGO, galago-sharp >= 0.5 , enable_galago=yes, enable_galago=no)
541 AM_CONDITIONAL(ENABLE_GALAGO, test "x$enable_galago" = "xyes")
542 AC_SUBST(GALAGO_LIBS)
545 dnl ----------------------------------------------
547 GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
548 AC_SUBST(GTK_BINARY_VERSION)
550 dnl For the systeminfo glue
552 SYSTEMINFO_GLUE_X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $XSS_LIBS $X_EXTRA_LIBS"
553 AC_SUBST(SYSTEMINFO_GLUE_X_LIBS)
555 dnl ----------------------------------------------
557 dnl KDE launcher/icon support
559 kde_prefix_print="unknown; will guess at runtime"
560 AC_PATH_PROG(KDE_CONFIG, [kde-config], [no])
561 if test ! "x$KDE_CONFIG" = "xno"; then
562         KDE_PREFIX=`$KDE_CONFIG --prefix`
563         kde_prefix_print="$KDE_PREFIX"
565 AC_SUBST(KDE_PREFIX)
567 dnl ----------------------------------------------
569 dnl Prefixes for helper scripts
570 GAC_PREFIX="$EVO_SHARP_PREFIX:$GSF_SHARP_PREFIX:$GMIME_SHARP_PREFIX"
571 dnl Remove duplicate prefixes
572 GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|:|\n|g' | sort | uniq | tr '\n' ':'`"
573 dnl Remove stray :s
574 GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|::\+|:|g' -e 's|^:\+||' -e 's|:\+$||'`"
575 AC_SUBST(GAC_PREFIX)
577 GNOME_PREFIX="`$PKG_CONFIG --variable=prefix libgnome-2.0`"
578 AC_SUBST(GNOME_PREFIX)
580 dnl ----------------------------------------------
582 dnl Check if the system has libchm, used by the CHMFilter
584 # Check for libchm for CHM filter
585 AC_CHECK_LIB(chm,chm_open,has_libchm=yes,has_libchm=no)
586 AM_CONDITIONAL(HAS_LIBCHM, test "x$has_libchm" = "xyes")
587 if test "x$has_libchm" = "xyes"; then
588         BEAGLE_DEFINES="$BEAGLE_DEFINES -define:HAVE_LIBCHM"
591 dnl ----------------------------------------------
593 dnl Conditional for debugging XML messages.
595 AC_ARG_ENABLE([xml-dump],
596         AC_HELP_STRING([--enable-xml-dump], [Enables printing of the XML messages sent between components (default no)]),
597         enable_xml_dump=$enableval,
598         enable_xml_dump=no)
600 if test "x$enable_xml_dump" = "xyes"; then
601         AC_DEFINE_UNQUOTED(ENABLE_XML_DUMP, 1, [Dump XML messages for debugging])
602         BEAGLE_DEFINES="$BEAGLE_DEFINES -define:ENABLE_XML_DUMP"
605 AC_SUBST(BEAGLE_DEFINES)
607 dnl ----------------------------------------------
609 dnl Python 2.3
611 AC_ARG_ENABLE(python,
612         AC_HELP_STRING([--disable-python], [Disable python support (default auto)]),
613         enable_python=$enableval,
614         enable_python=auto)
616 have_python=no
617 if test "x$enable_libbeagle" = "xyes" -a "x$enable_python" != "xno"; then
618         have_python_version=no
619         have_python_headers=no
620         have_pygtk_deps=no
621         have_pygtk_codegen=no
623         AM_PATH_PYTHON()
625         if test -z "$PYTHON"; then
626                 AC_MSG_WARN([Python not found])
627         else
628                 AM_PYTHON_CHECK_VERSION($PYTHON, $PYTHON_REQUIRED,
629                         have_python_version=yes,
630                         have_python_version=no)
631         fi
633         if test "x$have_python_version" != "xyes"; then
634                 AC_MSG_WARN([Python version $PYTHON_REQUIRED not found])
635         else
636                 AM_CHECK_PYTHON_HEADERS(have_python_headers=yes, have_python_headers=no)
637         fi
639         if test "x$have_python_headers" != "xyes"; then
640                 AC_MSG_WARN([could not find Python headers])
641         else
642                 PKG_CHECK_MODULES(PYBEAGLE,
643                         pygtk-2.0 >= $PYGTK_REQUIRED
644                         pygobject-2.0 >= $PYGTK_REQUIRED,
645                         have_pygtk_deps=yes,
646                         have_pygtk_deps=no)
647         fi
649         if test "x$have_pygtk_deps" != "xyes"; then
650                 AC_MSG_WARN([could not find pygtk])
651         else
652                 AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
653         fi
655         if test -z "$PYGTK_CODEGEN"; then
656                 AC_MSG_WARN([could not find pygtk-codegen in path])
657         else
658                 AC_MSG_CHECKING(for pygtk defs)
659                 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
660                 AC_MSG_RESULT($PYGTK_DEFSDIR)
662                 have_python=yes
663         fi
666 if test "x$enable_python" = "xyes"; then
667         if test "x$enable_libbeagle" != "xyes"; then
668                 AC_MSG_ERROR([Python bindings are requested, but libbeagle isn't to be built])
669         elif test "x$have_python" = "xno"; then
670                 AC_MSG_ERROR([Python bindings are requested, but cannot be built])
671         fi
674 AM_CONDITIONAL(ENABLE_PYTHON, test "x$have_python" = "xyes")
675 AC_SUBST(PYBEAGLE_LIBS)
676 AC_SUBST(PYBEAGLE_CFLAGS)
677 AC_SUBST(PYGTK_DEFSDIR)
679 dnl ----------------------------------------------
681 AC_OUTPUT([
682 Makefile
683 Util/Makefile
684 Util/Util.dll.config
685 images/Makefile
686 glue/Makefile
687 BeagleClient/Makefile
688 beagled/Makefile
689 Filters/Makefile
690 tools/Makefile
691 tools/beagle-settings.desktop.in
692 search/Makefile
693 search/beagle-search.desktop.in
694 ImLogViewer/Makefile
695 ContactViewer/Makefile
696 libbeagle/Makefile
697 libbeagle/libbeagle-0.0.pc
698 libbeagle/beagle/Makefile
699 libbeagle/examples/Makefile
700 libbeagle/docs/Makefile
701 libbeagle/docs/reference/Makefile
702 epiphany-extension/Makefile
703 mozilla-extension/Makefile
704 bludgeon/Makefile
705 wrappers/Makefile
706 wrappers/python/Makefile
707 beagle-0.0.pc
708 beagle-daemon.pc
709 beagle-ui-0.0.pc
710 beagle.spec
711 po/Makefile.in
714 echo "
715         Beagle Version:           ${VERSION}
716         Target OS:                ${os}
717         inotify?                  ${enable_inotify}
719         Prefix:                   ${prefix}
720         GNOME Prefix:             ${GNOME_PREFIX}
721         KDE Prefix:               ${kde_prefix_print}
723         Evolution support?        ${enable_evo}
724         gsf-sharp?                ${enable_gsf_sharp}
725         wv1?                      ${enable_wv1}
726         galago-sharp?             ${enable_galago}
727         libchm?                   ${has_libchm} 
728         google backend?           ${enable_googledriver} (Unsupported)
729         Thunderbird backend?      ${enable_tbird}
731         Mozilla Extension?        yes
732         Epiphany Extension?       ${enable_epiphany_extension}
734         Local SqliteClient?       ${use_local_sqlite}
735         Sqlite version:           ${SQLITE_MAJ_VER}.x
737         Enable libbeagle          ${enable_libbeagle}
738         Enable python bindings    ${have_python}
739         Enable libbeagle docs     ${enable_gtk_doc}
740         Monitor screensaver       ${have_xss}
742         Enable beagle-search GUI  ${enable_gui}
743         Enable \"Open With\" menu   ${OPEN_WITH}
745 echo
747 if test "x$enable_epiphany_extension" = "xyes"; then
748    echo "NOTE: The Beagle Epiphany Extension Is Totally Insecure!"
749    echo "      Use it at your own risk!"
750    echo