2 ### Welcome to Beagle's configure.in. We hope you enjoy your stay.
5 AC_INIT(beagled/BeagleDaemon.cs)
7 AM_INIT_AUTOMAKE(beagle, 0.2.5)
9 ########################################################################
16 GTK_SHARP_REQUIRED=2.3.90
17 GMIME_SHARP_REQUIRED=2.1.19
18 EVOLUTION_SHARP_REQUIRED=0.10.2
19 GSF_SHARP_REQUIRED=0.6
22 LIBBEAGLE_GOBJECT_REQUIRED=2.6
23 LIBBEAGLE_LIBXML_REQUIRED=2.6.19
28 ########################################################################
31 AM_CONFIG_HEADER(config.h)
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)
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])
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"
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])
79 AC_MSG_RESULT([found])
94 AC_MSG_ERROR([Unrecognised target OS: $target])
97 AM_CONDITIONAL(OS_LINUX, test "x$os" = "xlinux")
98 AM_CONDITIONAL(OS_FREEBSD, test "x$os" = "xfreebsd")
100 # check for desktop-launch
102 AC_PATH_PROG(DESKTOP_LAUNCH, desktop-launch, no)
103 AM_CONDITIONAL(ENABLE_DESKTOP_LAUNCH, test "x$DESKTOP_LAUNCH" != "xno")
106 # Disable GoogleDriver by default, enable if you want know what you are doing
107 dnl -----------------------------------------------
108 AC_ARG_ENABLE([googledriver],
109 AC_HELP_STRING([--enable-googledriver], [Enable Google backend]),
110 enable_googledriver=$enableval,
111 enable_googledriver=no)
113 if test "x$enable_googledriver" = "xyes"; then
115 AC_PATH_PROG(WSDL, wsdl)
118 AM_CONDITIONAL(ENABLE_GOOGLEDRIVER, test "x$enable_googledriver" = "xyes")
124 AC_PROG_INTLTOOL([0.23])
125 GETTEXT_PACKAGE=beagle
126 AC_SUBST(GETTEXT_PACKAGE)
127 ALL_LINGUAS="bg ca cs da de el en_CA en_GB es fi fr gl he hu it ja ka ko lt mk nb nl pa pl pt_BR sv tr uk vi zh_CN zh_HK zh_TW"
129 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the package for translations])
131 # Many distros don't have a dependency on sqlite for their
132 # mono-data-sqlite packages, and the mono build process itself
133 # doesn't require it. But we do, so check for it here.
135 PKG_CHECK_MODULES(SQLITE, sqlite, SQLITE_MAJ_VER="2", do_nothing="1")
136 # Note we really need 3.3.1, but the pkgconfig file from upstream only
137 # reports 3.3 for all releases in the 3.3 line.
138 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3, SQLITE_MAJ_VER="3", do_nothing="1")
140 if test "x$SQLITE_MAJ_VER" = "x0"; then
141 # Note we really need 3.3.1, but the pkgconfig file from upstream only
142 # reports 3.3 for all releases in the 3.3 line. Make sure we error out
143 # with the correct 3.3.1 version requirement, though.
144 AC_MSG_ERROR([You need to install sqlite 2.x or >= 3.3.1])
147 AC_SUBST(SQLITE_MAJ_VER)
151 # Needed by glue/screensaver-glue.c
152 # The OLD_CFLAGS/CFLAGS hack is needed to build on Ubuntu Breezy Badger
154 OLD_LDFLAGS="$LDFLAGS"
156 CFLAGS="$CFLAGS $X_CFLAGS"
157 LDFLAGS="$LDFLAGS $X_LIBS"
158 AC_CHECK_HEADER(X11/extensions/scrnsaver.h, enable_scrnsaver=yes, enable_scrnsaver=no)
159 AC_CHECK_LIB(Xss,XScreenSaverQueryExtension, enable_libxss=yes, enable_libxss=no)
160 AM_CONDITIONAL(HAS_LIBXSS, test "x$enable_scrnsaver$enable_libxss" = "xyesyes")
161 if test "x$enable_scrnsaver$enable_libxss" = "xyesyes"; then
165 LDFLAGS="$OLD_LDFLAGS"
168 dnl -------------------------------------------------------
171 AC_HELP_STRING([--disable-gui], [Disable beagle-search]),
172 enable_gui=$enableval,
175 AM_CONDITIONAL(ENABLE_GUI, test "x$enable_gui" = "xyes")
177 if test "x$enable_gui" = "xyes"; then
179 # We pinvoke into gnome-vfs directly from Util/GnomeFu.cs, and
180 # we get the GNOME prefix from libgnome-2.0
181 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 libgnome-2.0)
183 dnl -------------------------------------------------------
184 dnl Various version requirements
186 PKG_CHECK_MODULES(BEAGLE_UI,
188 gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED
189 gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED
190 glade-sharp-2.0 >= $GTK_SHARP_REQUIRED
191 gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED
192 gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED
193 gmime-sharp >= $GMIME_SHARP_REQUIRED
195 AC_SUBST(BEAGLE_UI_LIBS)
197 PKG_CHECK_MODULES(UIGLUE, gtk+-2.0 >= $GTK_REQUIRED librsvg-2.0)
198 AC_SUBST(UIGLUE_CFLAGS)
199 AC_SUBST(UIGLUE_LIBS)
201 dnl Gdk and Atk are needed for trayicon glue
203 GDK20_MINIMUM_VERSION=2.2.3
204 ATK_MINIMUM_VERSION=1.2.4
206 PKG_CHECK_MODULES(LIBTRAYICON,
208 gdk-2.0 >= $GDK20_MINIMUM_VERSION
209 atk >= $ATK_MINIMUM_VERSION
211 AC_SUBST(LIBTRAYICON_CFLAGS)
212 AC_SUBST(LIBTRAYICON_LIBS)
216 dnl ----------------------------------------------
218 dnl evolution support
220 AC_ARG_ENABLE([evolution],
221 AC_HELP_STRING([--disable-evolution], [Disable evolution support (default auto)]),
222 enable_evo=$enableval,
223 enable_evo_sharp=auto)
226 EVO_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix evolution-sharp`
228 EVO_LIBDIR=`$PKG_CONFIG --variable=evolibdir evolution-sharp`
231 PKG_CHECK_MODULES(EVO,
232 evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \
233 gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \
234 gmime-sharp >= $GMIME_SHARP_REQUIRED,
235 have_evo_dependencies=yes, have_evo_dependencies=no)
238 if test "x$have_evo_dependencies" = "xno"; then
240 dnl error out if user has explicitly requested evolution support
241 if test "x$enable_evo" = "xyes"; then
242 AC_MSG_ERROR([Could not find Evolution dependencies])
245 enable_evo="no (missing dependencies)"
249 if test "x$enable_evo" != "xno"; then
252 enable_evo="no (disabled)"
257 AM_CONDITIONAL(ENABLE_EVOLUTION, test "x$enable_evo" = "xyes")
259 dnl ----------------------------------------------
261 dnl Should we use our own copy of the sqlite bindings or the version
262 dnl that got installed along with mono?
264 use_local_sqlite="yes" # hard-wired for now
265 AM_CONDITIONAL(USE_LOCAL_SQLITE, test "x$use_local_sqlite" = "xyes")
267 dnl ----------------------------------------------
271 AC_ARG_ENABLE([inotify],
272 AC_HELP_STRING([--disable-inotify], [Disable inotify filesystem monitoring support (default auto)]),
273 enable_inotify=$enableval,
276 if test "x$os_has_inotify" = "xno"; then
278 dnl error out if user has explicitly requested inotify
279 if test "x$enable_inotify" = "xyes"; then
280 AC_MSG_ERROR([inotify is unavailable on your system architecture])
283 enable_inotify="no (unavailable)"
287 if test "x$enable_inotify" != "xno"; then
290 enable_inotify="no (disabled)"
295 AM_CONDITIONAL(ENABLE_INOTIFY, test "x$enable_inotify" = "xyes")
297 dnl ----------------------------------------------
301 PKG_CHECK_MODULES(GSF_SHARP, gsf-sharp >= 0.5, enable_gsf_sharp=yes, enable_gsf_sharp=no)
302 AM_CONDITIONAL(ENABLE_GSF_SHARP, test "x$enable_gsf_sharp" = "xyes")
304 dnl ----------------------------------------------
306 dnl libexif: Needed to index jpeg metadata
308 LIBEXIF_API_CHANGE=0.6.0
309 LIBEXIF_REQUIRED_MIN=0.5.7
310 LIBEXIF_REQUIRED_MAX=0.7.0
312 PKG_CHECK_MODULES(LIBEXIF, libexif >= $LIBEXIF_REQUIRED_MIN libexif < $LIBEXIF_REQUIRED_MAX)
313 PKG_CHECK_MODULES(LIBEXIF_API_CHECK, libexif >= $LIBEXIF_API_CHANGE, have_old_libexif=no, have_old_libexif=yes)
315 if test "x$have_old_libexif" = "xyes"; then
318 PKG_CHECK_MODULES(LIBEXIF_VERSION_CHECK, libexif >= 0.6.12, EXIF_SOVERSION=12, EXIF_SOVERSION=10)
320 AC_SUBST(EXIF_SOVERSION)
322 PKG_CHECK_MODULES(BEAGLED,
325 gmime-sharp >= $GMIME_SHARP_REQUIRED
326 gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED
328 BEAGLED_LIBS="$BEAGLED_LIBS $GSF_SHARP_LIBS"
329 AC_SUBST(BEAGLED_LIBS)
331 GSF_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gsf-sharp`
332 GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp`
334 dnl ----------------------------------------------
340 AC_ARG_ENABLE([libbeagle],
341 AC_HELP_STRING([--disable-libbeagle], [Disable libbeagle (C API)]),
342 enable_libbeagle=$enableval,
343 enable_libbeagle=auto)
345 dnl library versioning
346 dnl Increase when changing the API
349 dnl Update when changing implementation of current API,
350 dnl reset to 0 when changing CURRENT. This is the revision of
351 dnl current API version
354 dnl Increase of API change is ABI compatible, otherwise reset to 0
357 LIBBEAGLE_VERSION_INFO="$LIBBEAGLE_CURRENT:$LIBBEAGLE_REVISION:$LIBBEAGLE_AGE"
358 AC_SUBST(LIBBEAGLE_VERSION_INFO)
360 PKG_CHECK_MODULES(LIBBEAGLE, [
361 gobject-2.0 >= $LIBBEAGLE_GOBJECT_REQUIRED
362 libxml-2.0 >= $LIBBEAGLE_LIBXML_REQUIRED
363 ], have_libbeagle_deps=yes, have_libbeagle_deps=no)
365 AC_SUBST(LIBBEAGLE_CFLAGS)
366 AC_SUBST(LIBBEAGLE_LIBS)
368 if test "x$have_libbeagle_deps" = "xno"; then
370 if test "x$enable_libbeagle" = "xyes"; then
371 AC_MSG_ERROR([Missing libbeagle dependencies])
374 enable_libbeagle="no (missing dependencies)"
376 if test "x$enable_libbeagle" != "xno"; then
377 enable_libbeagle="yes"
379 enable_libbeagle="no (disabled)"
383 AM_CONDITIONAL(ENABLE_LIBBEAGLE, test "x$enable_libbeagle" = "xyes")
385 dnl ----------------------------------------------
386 AC_ARG_ENABLE([bludgeon],
387 AC_HELP_STRING([--disable-bludgeon], [Disable bludgeon testing tool]),
388 enable_bludgeon=$enableval,
390 AM_CONDITIONAL(ENABLE_BLUDGEON, test "x$enable_bludgeon" = "xyes")
393 dnl ----------------------------------------------
394 dnl Epiphany Extension
395 dnl Much of this is cut&pasted from epiphany-extensions/configure.ac
397 AC_ARG_ENABLE([epiphany-extension],
398 AC_HELP_STRING([--enable-epiphany-extension], [Enable Epiphany Extension (default auto)]),
399 enable_epiphany_extension=$enableval,
400 enable_epiphany_extension=auto)
402 if $PKG_CONFIG --exists epiphany-2.14; then
404 EPIPHANY_REQUIRED=2.14.0
405 elif $PKG_CONFIG --exists epiphany-1.8; then
407 EPIPHANY_REQUIRED=1.7.0
408 elif $PKG_CONFIG --exists epiphany-1.6; then
410 EPIPHANY_REQUIRED=1.6.0
412 enable_epiphany_extension="no (Epiphany not installed)"
415 if test "x$enable_epiphany_extension" = "xyes"; then
417 LIBXML_REQUIRED=2.6.0
418 LIBGLIB_REQUIRED=2.4.0
419 LIBGTK_REQUIRED=2.4.0
421 AC_SUBST(EPIPHANY_REQUIRED)
422 AC_SUBST(LIBXML_REQUIRED)
423 AC_SUBST(LIBGLIB_REQUIRED)
424 AC_SUBST(LIBGTK_REQUIRED)
426 PKG_CHECK_MODULES(EPIPHANY_DEPENDENCY,
427 libxml-2.0 >= $LIBXML_REQUIRED \
429 glib-2.0 >= $LIBGLIB_REQUIRED \
431 gtk+-2.0 >= $LIBGTK_REQUIRED \
432 epiphany-$EPIPHANY_MAJOR >= $EPIPHANY_REQUIRED,
433 have_epiphany_dependencies=yes,
434 have_epiphany_dependencies=no)
435 AC_SUBST(EPIPHANY_DEPENDENCY_CFLAGS)
436 AC_SUBST(EPIPHANY_DEPENDENCY_LIBS)
438 EPIPHANY_EXTENSIONS_DIR="`$PKG_CONFIG --variable=extensionsdir epiphany-$EPIPHANY_MAJOR`"
439 AC_SUBST([EPIPHANY_EXTENSIONS_DIR])
440 EPIPHANY_PREFIX="`$PKG_CONFIG --variable=prefix epiphany-$EPIPHANY_MAJOR`"
441 AC_SUBST(EPIPHANY_PREFIX)
443 if test "x$have_epiphany_dependencies" = "xno"; then
444 enable_epiphany_extension="no (missing dependencies)"
445 elif test "x$enable_epiphany_extension" != "xyes"; then
446 enable_epiphany_extension="disabled"
451 AM_CONDITIONAL(ENABLE_EPIPHANY_EXTENSION, test "x$enable_epiphany_extension" = "xyes")
453 AC_ARG_ENABLE([epiphany-extension-install],
454 AS_HELP_STRING([--enable-epiphany-extension-install],[Install Epiphany Extension]),
455 [install_epiphany_extension=$enableval],
456 [install_epiphany_extension=yes])
458 AM_CONDITIONAL([INSTALL_EPIPHANY_EXTENSION], [test "x$install_epiphany_extension" = "xyes"])
460 dnl ----------------------------------------------
464 PKG_CHECK_MODULES(GALAGO, galago-sharp, enable_galago=yes, enable_galago=no)
465 AM_CONDITIONAL(ENABLE_GALAGO, test "x$enable_galago" = "xyes")
466 AC_SUBST(GALAGO_LIBS)
469 dnl ----------------------------------------------
471 GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
472 AC_SUBST(GTK_BINARY_VERSION)
474 dnl For the systeminfo glue
476 PKG_CHECK_MODULES(SYSTEMINFO_GLUE, gdk-2.0)
477 SYSTEMINFO_GLUE_X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $XSS_LIBS $X_EXTRA_LIBS"
478 AC_SUBST(SYSTEMINFO_GLUE_X_LIBS)
480 dnl ----------------------------------------------
484 PKG_CHECK_MODULES(WV1, wv-1.0, enable_wv1=yes, enable_wv1=no)
485 AM_CONDITIONAL(ENABLE_WV1, test "x$enable_wv1" = "xyes")
488 dnl ----------------------------------------------
490 dnl KDE launcher/icon support
492 kde_prefix_print="unknown; will guess at runtime"
493 AC_PATH_PROG(KDE_CONFIG, [kde-config], [no])
494 if test ! "x$KDE_CONFIG" = "xno"; then
495 KDE_PREFIX=`$KDE_CONFIG --prefix`
496 kde_prefix_print="$KDE_PREFIX"
500 dnl ----------------------------------------------
502 dnl Beagle webservices
504 dnl AC_ARG_ENABLE([webservices],
505 dnl AC_HELP_STRING([--enable-webservices], [Enable WebServices (default disabled)]),
506 dnl enable_webservices=$enableval,
507 dnl enable_webservices=no)
509 enable_webservices=no
510 AM_CONDITIONAL(ENABLE_WEBSERVICES, test "x$enable_webservices" = "xyes")
512 dnl ----------------------------------------------
514 dnl Prefixes for helper scripts
515 GAC_PREFIX="$EVO_SHARP_PREFIX:$GSF_SHARP_PREFIX:$GMIME_SHARP_PREFIX"
516 dnl Remove duplicate prefixes
517 GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|:|\n|g' | sort | uniq | tr '\n' ':'`"
519 GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|::\+|:|g' -e 's|^:\+||' -e 's|:\+$||'`"
522 GNOME_PREFIX="`$PKG_CONFIG --variable=prefix libgnome-2.0`"
523 AC_SUBST(GNOME_PREFIX)
525 dnl ----------------------------------------------
527 dnl Check if the system has libchm, used by the CHMFilter
529 # FIXME: Disabled since its broken
530 #AC_CHECK_LIB(chm,chm_open,has_libchm=yes,has_libchm=no)
532 AM_CONDITIONAL(HAS_LIBCHM, test "x$has_libchm" = "xyes")
534 dnl ----------------------------------------------
536 dnl Conditional for debugging XML messages.
540 AC_ARG_ENABLE([xml-dump],
541 AC_HELP_STRING([--enable-xml-dump], [Enables printing of the XML messages sent between components (default no)]),
542 enable_xml_dump=$enableval,
545 if test "x$enable_xml_dump" = "xyes"; then
546 AC_DEFINE_UNQUOTED(ENABLE_XML_DUMP, 1, [Dump XML messages for debugging])
547 BEAGLE_DEFINES="-define:ENABLE_XML_DUMP"
550 AC_SUBST(BEAGLE_DEFINES)
552 dnl ----------------------------------------------
556 AC_ARG_ENABLE(python,
557 AC_HELP_STRING([--disable-python], [Disable python support (default auto)]),
558 enable_python=$enableval,
562 if test "x$enable_libbeagle" = "xyes" -a "x$enable_python" != "xno"; then
563 have_python_version=no
564 have_python_headers=no
566 have_pygtk_codegen=no
570 if test -z "$PYTHON"; then
571 AC_MSG_WARN([Python not found])
573 AM_PYTHON_CHECK_VERSION($PYTHON, $PYTHON_REQUIRED,
574 have_python_version=yes,
575 have_python_version=no)
578 if test "x$have_python_version" != "xyes"; then
579 AC_MSG_WARN([Python version $PYTHON_REQUIRED not found])
581 AM_CHECK_PYTHON_HEADERS(have_python_headers=yes, have_python_headers=no)
584 if test "x$have_python_headers" != "xyes"; then
585 AC_MSG_WARN([could not find Python headers])
587 PKG_CHECK_MODULES(PYBEAGLE,
588 pygtk-2.0 >= $PYGTK_REQUIRED
589 pygobject-2.0 >= $PYGTK_REQUIRED,
594 if test "x$have_pygtk_deps" != "xyes"; then
595 AC_MSG_WARN([could not find pygtk])
597 AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
600 if test -z "$PYGTK_CODEGEN"; then
601 AC_MSG_WARN([could not find pygtk-codegen in path])
603 AC_MSG_CHECKING(for pygtk defs)
604 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
605 AC_MSG_RESULT($PYGTK_DEFSDIR)
611 if test "x$enable_python" = "xyes"; then
612 if test "x$enable_libbeagle" != "xyes"; then
613 AC_MSG_ERROR([Python bindings are requested, but libbeagle isn't to be built])
614 elif test "x$have_python" = "xno"; then
615 AC_MSG_ERROR([Python bindings are requested, but cannot be built])
619 AM_CONDITIONAL(ENABLE_PYTHON, test "x$have_python" = "xyes")
620 AC_SUBST(PYBEAGLE_LIBS)
621 AC_SUBST(PYBEAGLE_CFLAGS)
622 AC_SUBST(PYGTK_DEFSDIR)
624 dnl ----------------------------------------------
632 BeagleClient/Makefile
639 libbeagle/libbeagle-0.0.pc
640 libbeagle/beagle/Makefile
641 libbeagle/examples/Makefile
642 libbeagle/docs/Makefile
643 libbeagle/docs/reference/Makefile
644 epiphany-extension/Makefile
645 mozilla-extension/Makefile
648 wrappers/python/Makefile
656 Beagle Version: ${VERSION}
658 inotify? ${enable_inotify}
661 GNOME Prefix: ${GNOME_PREFIX}
662 KDE Prefix: ${kde_prefix_print}
664 Evolution support? ${enable_evo}
665 gsf-sharp? ${enable_gsf_sharp}
667 galago-sharp? ${enable_galago}
668 libchm? ${has_libchm} (Currently broken)
669 google backend? ${enable_googledriver} (Unsupported)
671 Mozilla Extension? yes
672 Epiphany Extension? ${enable_epiphany_extension}
674 Local SqliteClient? ${use_local_sqlite}
675 Sqlite version: ${SQLITE_MAJ_VER}.x
677 Enable WebServices no (WebServices are deprecated)
678 Enable libbeagle ${enable_libbeagle}
679 Enable python bindings ${have_python}
681 Enable beagle-search GUI ${enable_gui}
685 if test "x$enable_epiphany_extension" = "xyes"; then
686 echo "NOTE: The Beagle Epiphany Extension Is Totally Insecure!"
687 echo " Use it at your own risk!"