Hi,
On Tue, 21 Nov 2006 23:33:45 +0000
Jamie McCracken <[EMAIL PROTECTED]> wrote:

> I agree but I cant get it to work on Edgy at all (complains about 
> linxine even though I did not enable it and does not find any of the 
> metadata extractorsor inotify)
> 
> I guess it does not work well with autogen.sh or maybe it needs
> latest autoconf?

Sorry, I thought, that the question is more about the idea and
not about the implementation, which I haven't tested :)
I re-worked the patch, to address some issues hopefully:
It should work the same way as till now, if there are no options
specified with configure and should allow controlling the configure,
if needed. From configure --help
  --disable-warnings      disable GCC warnings
  --enable-video-extractor=ARG
                          enables one of the (gstreamer, xine,
external, auto) video extractor backends
  --enable-test           build test suite
  --enable-external-sqlite
                          build using system's sqlite which must be a
                          threadsafe version
  --enable-file-monitoring=ARG
                          enables one of the (inotify, fam, polling,
auto) file monitoring backends
  --enable-inotify-debug  turn on inotify debugging
  --disable-gui           Disable building of the gnome-search-tool
  --disable-pdf           Disable PDF data extractor
  --disable-png           Disable PNG data extractor
  --disable-exif          Disable exif data extractor
  --disable-gsf           Disable GSF data extractor
  
the ones with disable option should be enabled by default and not die if
the libraries are not found, just flip it to disabled state.
--enable-video-extractor is auto by default meaning that it searches
for gstreamer or xine (gstreamer has priority before xine) and should
fall back to external if none of them is found. If the extractor is
specified with configure (and it is not the auto one), the configure
process will die if the needed libraries are not found.
--enable-file-monitoring is also auto by default, which means that it
searches in the following way:
inotify - kernerl headers, inotify - glibc headers, gamin, fam, polling
and in this order it should select the used backend. If a
backend is specified (not the auto one) and not found, the configure
will die.
Hope this patch works :), I haven't have the time to test it 100%
though.

Regards
Gergan
--- configure.in.orig	2006-11-21 22:20:02.000000000 +0100
+++ configure.in	2006-11-23 04:08:41.000000000 +0100
@@ -4,6 +4,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([tracker],[0.5.2],[EMAIL PROTECTED])
+
 AC_CONFIG_SRCDIR([src/trackerd/trackerd.c])
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
@@ -26,59 +27,56 @@
 # Checks for functions
 AC_CHECK_FUNCS([getline])
 
-# Check for glib 2.0
-
+dnl Library Checks
+DBUS_REQUIRED=0.60
 GLIB_REQUIRED=2.9.1
+PANGO_REQUIRED=1.0.0
+GMIME_REQUIRED=2.1.0
 
-PKG_CHECK_MODULES(GLIB2, [ glib-2.0 >= 2.9.1 ])
+PKG_CHECK_MODULES(GLIB2, [ glib-2.0 >= $GLIB_REQUIRED ])
 AC_SUBST(GLIB2_CFLAGS)
 AC_SUBST(GLIB2_LIBS)
 
 # Check for gthread 2.0
-PKG_CHECK_MODULES(GTHREAD, [ gthread-2.0 >= 2.9.1 ])
+PKG_CHECK_MODULES(GTHREAD, [ gthread-2.0 >= $GLIB_REQUIRED ])
 AC_SUBST(GTHREAD_CFLAGS)
 AC_SUBST(GTHREAD_LIBS)
 
 # Check for gobject 2.0
-PKG_CHECK_MODULES(GOBJECT, [ gobject-2.0 >= 2.9.1 ])
+PKG_CHECK_MODULES(GOBJECT, [ gobject-2.0 >= $GLIB_REQUIRED ])
 AC_SUBST(GOBJECT_CFLAGS)
 AC_SUBST(GOBJECT_LIBS)
 
 #Check for pango
-PKG_CHECK_MODULES(PANGO, [ pango >= 1.0.0 ])
+PKG_CHECK_MODULES(PANGO, [ pango >= $PANGO_REQUIRED ])
 AC_SUBST(PANGO_CFLAGS)
 AC_SUBST(PANGO_LIBS)
 
 # Check for GMime
-PKG_CHECK_MODULES(GMIME, [ gmime-2.0 >= 2.1.0 ])
+PKG_CHECK_MODULES(GMIME, [ gmime-2.0 >= $GMIME_REQUIRED ])
 AC_SUBST(GMIME_CFLAGS)
 AC_SUBST(GMIME_LIBS)
 
 # Check for Dbus 0.50 or higher
-PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.50 dbus-glib-1 >= 0.50 ])
+PKG_CHECK_MODULES(DBUS, [ dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED ])
 AC_SUBST(DBUS_CFLAGS)
 AC_SUBST(DBUS_LIBS)
 
 ####################################################################
 # Compiler warning checks
 ####################################################################
-warning_support=yes
-AC_ARG_ENABLE(warnings, [  --disable-warnings      compile without using gcc warnings],
-			[
-				warning_support=no
-			]
-		)
-
-
-if test "$warning_support" = "yes"; 
-then
-	CFLAGS="\
-	-Wall \
-	-Wchar-subscripts \
-	-Wnested-externs -Wpointer-arith \
-	-Wsign-compare \
-	$CFLAGS"
-
+AC_ARG_ENABLE(warnings,
+              AC_HELP_STRING([--disable-warnings], [disable GCC warnings]),,
+              [enable_warnings=yes])
+
+if test "x$enable_warnings" = "xyes"; then
+   CFLAGS="\
+   -Wall \
+   -Wchar-subscripts \
+   -Wnested-externs \
+   -Wpointer-arith \
+   -Wsign-compare \
+   $CFLAGS"
 fi
 
 ####################################################################
@@ -118,228 +116,237 @@
 ####################################################################
 RECENT_GLIB=2.12.0
 
-PKG_CHECK_MODULES(glib2, [
-               glib-2.0 >= RECENT_GLIB],
-               [have_recent_glib=yes] , [have_recent_glib=no])
+PKG_CHECK_MODULES(glib2, [ glib-2.0 >= $RECENT_GLIB ],
+                  [have_recent_glib=yes], [have_recent_glib=no])
+
+if test "$have_recent_glib" = "yes" ; then
+   AC_DEFINE(HAVE_RECENT_GLIB, 1, [Define if we have recent glib])
+fi
 
 AM_CONDITIONAL(HAVE_RECENT_GLIB, test "$have_recent_glib" = "yes")
-test "$have_recent_glib" = "yes" && AC_DEFINE(HAVE_RECENT_GLIB, [], [Define if we have recent glib])
 
 ####################################################################
 # check for GStreamer or Xine. Otherwise, call an external video
 # player (Totem or MPlayer).
 ####################################################################
 
-use_gstreamer=yes
-use_libxine=no
+AC_ARG_ENABLE(video-extractor,
+	AC_HELP_STRING(
+		[--enable-video-extractor=ARG],
+		[enables one of the (gstreamer, xine, external, auto) video extractor backends]),,
+	[enable_video_extractor=auto])
+
+PKG_CHECK_MODULES(GSTREAMER, 
+	[gstreamer-0.10 >= 0.10.0],
+	[have_libgstreamer=yes] , [have_libgstreamer=no])
+AC_SUBST(GSTREAMER_CFLAGS)
+AC_SUBST(GSTREAMER_LIBS)
+
+PKG_CHECK_MODULES(XINE, 
+	[libxine >= 1.0],
+	[have_libxine=yes] , [have_libxine=no])
+AC_SUBST(XINE_CFLAGS)
+AC_SUBST(XINE_LIBS)
 
-AC_ARG_ENABLE(libxine,   [  --enable-libxine        build using libXine for metadata extraction of video files],
-			[
-				use_libxine=yes
-				use_gstreamer=no
-			]
-		)
-
-AC_ARG_ENABLE(gstreamer, [  --enable-gstreamer      build using GStreamer for metadata extraction of video files],
-			[
-				use_libxine=no
-				use_gstreamer=yes
-			]
-		)
-
-videos_are_handled="no"
-videos_handler="_"
-
-AM_CONDITIONAL(USING_GSTREAMER, false)
-AM_CONDITIONAL(USING_LIBXINE, false)
-AM_CONDITIONAL(USING_EXTERNAL_VIDEO_PLAYER, false)
-
-have_libgstreamer=no
-have_libxine=no
 
-if test "$use_gstreamer" = "yes";
-then
-	PKG_CHECK_MODULES(GSTREAMER, [
-		gstreamer-0.10 >= 0.10.0],
-		[have_libgstreamer=yes] , [have_libgstreamer=no])
-
-	if test "$have_libgstreamer" = "yes";
-	then
-		AM_CONDITIONAL(USING_GSTREAMER, true)
-		AC_SUBST(GSTREAMER_CFLAGS)
-		AC_SUBST(GSTREAMER_LIBS)
-
-		videos_are_handled="yes"
+if test "x$enable_video_extractor" = "xauto"; then
+	if test "$have_libgstreamer" = "yes"; then
 		videos_handler="GStreamer"
-
-		AC_DEFINE(HAVE_GSTREAMER, [], [Define if we have GStreamer])
+		videos_are_handled="yes"
+	elif test "$have_libxine" = "yes"; then
+		videos_handler="Xine"
+		videos_are_handled="yes"
+	else
+		videos_are_handled="?"
+		videos_handler="An external video player will be called"
 	fi
-
-elif test "$use_libxine" = "yes";
-then
-	PKG_CHECK_MODULES(XINE, [
-		libxine >= 1.0 ],
-		[have_libxine=yes] , [have_libxine=no])
-
-	if test "$have_libxine" = "yes";
-	then
-		AM_CONDITIONAL(USING_LIBXINE, true)
-		AC_SUBST(XINE_CFLAGS)
-		AC_SUBST(XINE_LIBS)
-
+elif test "x$enable_video_extractor" = "xgstreamer"; then
+	if test "$have_libgstreamer" = "yes"; then
+		videos_handler="GStreamer"
 		videos_are_handled="yes"
+	else
+		AC_MSG_ERROR([***Gstreamer requested but not found - exiting!])
+	fi
+elif test "x$enable_video_extractor" = "xxine"; then
+	if test "$have_libxine" = "yes"; then
 		videos_handler="Xine"
-
-		AC_DEFINE(HAVE_LIBXINE, [], [Define if we have Libxine])
+		videos_are_handled="yes"
+	else
+		AC_MSG_ERROR([***libxine requested but not found - exiting!])
 	fi
-fi
-
-if test "$have_libgstreamer" = "no" && test "$have_libxine" = "no";
-then
-	AM_CONDITIONAL(USING_EXTERNAL_VIDEO_PLAYER, true)
-
+else
 	videos_are_handled="?"
 	videos_handler="An external video player will be called"
-
+fi
+if test "$videos_handler" = "GStreamer"; then
+	AC_DEFINE(HAVE_GSTREAMER, [], [Define if we have GStreamer])
+	AM_CONDITIONAL(USING_GSTREAMER, true)
+	AM_CONDITIONAL(USING_LIBXINE, false)
+	AM_CONDITIONAL(USING_EXTERNAL_VIDEO_PLAYER, false)
+elif test "$videos_handler" = "Xine"; then
+	AC_DEFINE(HAVE_LIBXINE, [], [Define if we have Libxine])
+	AM_CONDITIONAL(USING_LIBXINE, true)
+	AM_CONDITIONAL(USING_EXTERNAL_VIDEO_PLAYER, false)
+	AM_CONDITIONAL(USING_GSTREAMER, false)
+else
+	AM_CONDITIONAL(USING_EXTERNAL_VIDEO_PLAYER, true)
 	AC_DEFINE(USING_EXTERNAL_VIDEO_PLAYER, [], [Define that Tracker will try to use external video players])
-
+	AM_CONDITIONAL(USING_LIBXINE, false)
+	AM_CONDITIONAL(USING_GSTREAMER, false)
 fi
 
-
-####################################################################
-# Optional database/indexer component checks
-####################################################################
-
-external_sqlite=no
-AC_DEFINE(USING_SQLITE, [], [Define if we are using sqlite])
-AM_CONDITIONAL(USING_SQLITE, true)
-AM_CONDITIONAL(USING_EXTERNAL_SQLITE, false)
-
 AM_CONDITIONAL(BUILD_TEST, false)
-
-AC_ARG_ENABLE(test, [  --enable-test           build test suite],
+AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],[build test suite]),
 			 [
 				AM_CONDITIONAL(BUILD_TEST, true)
 				AC_DEFINE(BUILD_TEST, [], [Define if we are building test stuff])
 			 ]
 	 	)
 
+####################################################################
+# Optional database/indexer component checks
+####################################################################
+
 
-AC_ARG_ENABLE(external_sqlite, [  --enable-external-sqlite       build using system's sqlite which must be a threadsafe version],
-			 [
-				external_sqlite=yes
-			 ]
-	 	)
+SQLITE_REQUIRED=3.2
+AC_DEFINE(USING_SQLITE, [], [Define if we are using sqlite])
+AM_CONDITIONAL(USING_SQLITE, true)
 
+AC_ARG_ENABLE(external_sqlite, 
+	AC_HELP_STRING(
+		[--enable-external-sqlite],
+		[build using system's sqlite which must be a threadsafe version]),,
+	[enable_external_sqlite=no])
 
-if test "$external_sqlite" = "yes"; 
+if test "x$enable_external_sqlite" = "xyes"; 
 then
-	AM_CONDITIONAL(USING_EXTERNAL_SQLITE, true)
 	
 	# Check for SQLite3
-	PKG_CHECK_MODULES(SQLITE3, [ sqlite3 >= 3.2 ])
+	PKG_CHECK_MODULES(SQLITE3, [ sqlite3 >= $SQLITE_REQUIRED ])
 	AC_SUBST(SQLITE3_CFLAGS)
 	AC_SUBST(SQLITE3_LIBS)
+	AM_CONDITIONAL(USING_EXTERNAL_SQLITE, true)
+else
+	AM_CONDITIONAL(USING_EXTERNAL_SQLITE, false)
 fi		
 
 ###############################################################################
 # Check for file monitor backends
 ###############################################################################
+
+FAM_LIBS=
+inotify_support=no
+inotify_linux=no
+inotify_header=none
+fam_support=no
+fam_type=none
+
 AM_CONDITIONAL(HAVE_INOTIFY, false)
 AM_CONDITIONAL(HAVE_INOTIFY_LINUX, false)
 AM_CONDITIONAL(HAVE_FAM, false)
 
-##################################################################
-# check for inotify
-##################################################################
+AC_ARG_ENABLE(file-monitoring,
+	AC_HELP_STRING(
+		[--enable-file-monitoring=ARG],
+		[enables one of the (inotify, fam, polling, auto) file monitoring backends]),,
+	enable_file_monitoring=auto)
 
-inotify_support=no
-inotify_linux=no
-inotify_header=none
-fs_monitor_backends=""
-primary_backend="polling only"
 
-AC_CHECK_HEADERS([linux/inotify.h],
+AC_CHECK_HEADERS([sys/inotify.h],
 		 [
-		 inotify_linux=yes
 		 inotify_support=yes
-		 AC_DEFINE(HAVE_INOTIFY_LINUX, [], [Define if we have inotify and header is linux/inotify.h])
-		 AM_CONDITIONAL(HAVE_INOTIFY_LINUX, true)
-		 inotify_header=linux/inotify.h
+		 inotify_linux=no
 		 ])
 
-AC_CHECK_HEADERS([sys/inotify.h],
+AC_CHECK_HEADERS([linux/inotify.h],
 		 [
+		 inotify_linux=yes
 		 inotify_support=yes
-		 inotify_linux=no
-		 inotify_header=sys/inotify.h
 		 ])
 
+AC_CHECK_LIB(fam, FAMOpen,
+		[AC_CHECK_HEADERS(fam.h,
+		[
+		fam_support=yes
+		fam_type=fam
+		],[fam_support=no])],
+		[fam_support=no])
 
-
-AC_ARG_ENABLE(inotify, [  --disable-inotify       build without enabling inotify for file monitoring],
-			 [
-				inotify_support=no
-			 ]
-	 	)
-
-
-if test "$inotify_support" = "yes"; 
-then
-	AC_DEFINE(HAVE_INOTIFY, [], [Define if we have inotify])
-	AM_CONDITIONAL(HAVE_INOTIFY, true)
-	AC_ARG_ENABLE(debug, [  --enable-inotify-debug  turn on inotify debugging],
-              [AC_DEFINE(LIBINOTIFY_DEBUG,, [is debugging enabled?])],)
-	fs_monitor_backends="${fs_monitor_backends}inotify "
-	primary_backend="inotify"
-fi
-
-
-
-##################################################################
-# check for FAM/GAMIN
-##################################################################
-
-FAM_LIBS=
-disable_fam=no
-AC_ARG_ENABLE(fam, [  --disable-fam           build without enabling fam for file monitoring],
-			 [
-				disable_fam=yes
-			 ]
-	 	)
-
-if  test "$disable_fam" = "no"
-then
-	PKG_CHECK_MODULES(GAMIN, 
+PKG_CHECK_MODULES(GAMIN, 
 		gamin,
-		[have_fam=yes] , [have_fam=no])
-
-	if test x"$have_fam" = "xyes"
-	then       
-		AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
-		AM_CONDITIONAL(HAVE_FAM, true)
-		if test "$fs_monitor_backends" = ""; then
+		[
+		fam_support=yes
+		fam_type=gamin
+		], 
+		[
+		fam_support=no
+		])
+
+if test "x$enable_file_monitoring" = "xauto"; then
+	if test "$inotify_support"  = "yes"; then
+		primary_backend=inotify
+		if test "$inotify_linux" = "yes"; then
+			inotify_header="linux/inotify.h"
+		else
+			inotify_header="sys/inotify.h"
+		fi
+		AC_ARG_ENABLE(debug, [  --enable-inotify-debug  turn on inotify debugging],
+        	      [AC_DEFINE(LIBINOTIFY_DEBUG,, [is debugging enabled?])],)
+	elif test "$fam_support" = "yes"; then
+		if test "$fam_type" = "gamin"; then
 			primary_backend="gamin"
-			FAM_LIBS="-lgamin-1"
-		fi 
-        	fs_monitor_backends="${fs_monitor_backends}gamin"
+		else
+			primary_backend="fam"
+		fi
 	else
-       		AC_CHECK_LIB(fam, FAMOpen,
-			[AC_CHECK_HEADERS(fam.h,
-			[AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
-			AM_CONDITIONAL(HAVE_FAM, true)
-			if test "$fs_monitor_backends" = ""; then
-				primary_backend="fam"
-				FAM_LIBS="-lfam"
-			fi 
- 	        	fs_monitor_backends="${fs_monitor_backends}fam"],
-	    		AC_MSG_WARN(FAM support will not be built (header files not found)))],
-	  		AC_MSG_WARN(FAM support will not be built (FAM library not found)))
+		primary_backend="polling only"
 	fi
+elif test "x$enable_file_monitoring" = "xinotify"; then
+	if test "$inotify_support" = "no"; then
+		AC_MSG_ERROR([***inotify requested but not found - exiting!])
+	else
+		primary_backend="inotify"
+		if test "$inotify_linux" = "yes"; then
+			inotify_header="linux/inotify.h"
+		else
+			inotify_header="sys/inotify.h"
+		fi
+	fi
+elif test "x$enable_file_monitoring" = "xfam"; then
+	if test "$fam_support" = "no"; then
+		AC_MSG_ERROR([***fam requested but not found - exiting!])
+	else
+		if test "$fam_type" = "gamin"; then
+			primary_backend="gamin"
+		else
+			primary_backend="fam"
+		fi
+	fi
+else
+	primary_backend="polling only"
 fi
-	
-AC_SUBST(FAM_LIBS)
 
+if test "$primary_backend" = "inotify"; then
+	AC_DEFINE(HAVE_INOTIFY, [], [Define if we have inotify])
+	AM_CONDITIONAL(HAVE_INOTIFY, true)
+	if test "$inotify_linux" = "yes"; then
+			AC_DEFINE(HAVE_INOTIFY_LINUX, [], 
+			[
+			Define if we have inotify and header is linux/inotify.h
+			])
+			AM_CONDITIONAL(HAVE_INOTIFY_LINUX, true)
+	fi
+elif test "$primary_backend" = "gamin"; then 
+	AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
+	AM_CONDITIONAL(HAVE_FAM, true)
+	FAM_LIBS="-lgamin-1"
+	AC_SUBST(FAM_LIBS)
+elif test "$primary_backend" = "fam"; then
+	AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
+	AM_CONDITIONAL(HAVE_FAM, true)
+	FAM_LIBS="-lfam"
+	AC_SUBST(FAM_LIBS)
+fi
 
 ##################################################################
 # check for GNOME/GTK dependencies to build tracker search tool (Gnome client)
@@ -352,30 +359,36 @@
 LIBGLADE_REQUIRED=2.5.0
 GNOMEVFS_REQUIRED=2.8.4
 
-PKG_CHECK_MODULES(GNOME_UTILS, [
-        gtk+-2.0 >= $GTK_REQUIRED
-        libgnome-2.0 >= $LIBGNOME_REQUIRED
-        libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED],
-        [have_gnome=yes] , [have_gnome=no])
-
-PKG_CHECK_MODULES(GNOMEVFS, [
-        gnome-vfs-2.0 >= $GNOMEVFS_REQUIRED
-        gnome-vfs-module-2.0 >= $GNOMEVFS_REQUIRED],
-        [have_gnome=yes] , [have_gnome=no])
-
-PKG_CHECK_MODULES(GNOMEDESKTOP, [
-        gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED],
-        [have_gnome=yes] , [have_gnome=no])
-
-
+AC_ARG_ENABLE(gui, AC_HELP_STRING([--disable-gui], [Disable building of the gnome-search-tool]),,[enable_gui=yes])
+if test "x$enable_gui" = "xyes"; then
+	PKG_CHECK_MODULES(GNOME_UTILS, [
+        	gtk+-2.0 >= $GTK_REQUIRED
+	        libgnome-2.0 >= $LIBGNOME_REQUIRED
+        	libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED],
+	        [have_gnome=yes] , [have_gnome=no])
+	#there is the slight possibility to have gnome-vfs and not libgnome for example
+	#so we should check and not overwrite have_gnome
+	if test "$have_gnome" = "yes"; then 
+		PKG_CHECK_MODULES(GNOMEVFS, [
+        		gnome-vfs-2.0 >= $GNOMEVFS_REQUIRED
+		        gnome-vfs-module-2.0 >= $GNOMEVFS_REQUIRED],
+		        [have_gnome=yes] , [have_gnome=no])
+	fi
+	if test "$have_gnome" = "yes"; then
+		PKG_CHECK_MODULES(GNOMEDESKTOP, [
+		        gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED],
+        		[have_gnome=yes] , [have_gnome=no])
+	fi
+	AC_SUBST(GNOME_UTILS_CFLAGS)
+	AC_SUBST(GNOME_UTILS_LIBS)
+	AC_SUBST(GNOMEVFS_CFLAGS)
+	AC_SUBST(GNOMEVFS_LIBS)
+	AC_SUBST(GNOMEDESKTOP_CFLAGS)
+	AC_SUBST(GNOMEDESKTOP_LIBS)
+else
+	have_gnome="no (disabled)"
+fi
 AM_CONDITIONAL(HAVE_GNOME, test "$have_gnome" = "yes")
-AC_SUBST(GNOME_UTILS_CFLAGS)
-AC_SUBST(GNOME_UTILS_LIBS)
-AC_SUBST(GNOMEVFS_CFLAGS)
-AC_SUBST(GNOMEVFS_LIBS)
-AC_SUBST(GNOMEDESKTOP_CFLAGS)
-AC_SUBST(GNOMEDESKTOP_LIBS)
-
 if test "$have_gnome" = "yes"; then
    GNOME_COMMON_INIT
 fi
@@ -389,15 +402,19 @@
 CAIRO_REQUIRED=1.0
 GDK_REQUIRED=1.0
 
-PKG_CHECK_MODULES(POPPLER_GLIB, [
-	poppler-glib >= $POPPLER_GLIB_REQUIRED
-	cairo >= $CAIRO_REQUIRED
-	gdk-2.0 >= $GDK_REQUIRED],
-	[have_poppler=yes] , [have_poppler=no])
-
+AC_ARG_ENABLE(pdf, AC_HELP_STRING([--disable-pdf], [Disable PDF data extractor]),,[enable_pdf=yes])
+if test "x$enable_pdf" = "xyes"; then
+	PKG_CHECK_MODULES(POPPLER_GLIB, [
+		poppler-glib >= $POPPLER_GLIB_REQUIRED
+		cairo >= $CAIRO_REQUIRED
+		gdk-2.0 >= $GDK_REQUIRED],
+		[have_poppler=yes] , [have_poppler=no])
+	AC_SUBST(POPPLER_GLIB_CFLAGS)
+	AC_SUBST(POPPLER_GLIB_LIBS)
+else
+	have_poppler="no (disabled)"
+fi
 AM_CONDITIONAL(HAVE_POPPLER_GLIB, test "$have_poppler" = "yes")
-AC_SUBST(POPPLER_GLIB_CFLAGS)
-AC_SUBST(POPPLER_GLIB_LIBS)
 test "$have_poppler" = "yes" && AC_DEFINE(HAVE_POPPLER, [], [Define if we have poppler])
 
 
@@ -407,13 +424,17 @@
 
 LIBPNG_REQUIRED=1.2
 
-PKG_CHECK_MODULES(LIBPNG, [
-	libpng >= $LIBPNG_REQUIRED],
-	[have_libpng=yes] , [have_png=no])
-
+AC_ARG_ENABLE(png, AC_HELP_STRING([--disable-png],[Disable PNG data extractor]),,[enable_png=yes])
+if test "x$enable_png" = "xyes"; then
+	PKG_CHECK_MODULES(LIBPNG, [
+		libpng >= $LIBPNG_REQUIRED],
+		[have_libpng=yes] , [have_libpng=no])
+	AC_SUBST(LIBPNG_CFLAGS)
+	AC_SUBST(LIBPNG_LIBS)
+else
+	have_libpng="no (disabled)"
+fi
 AM_CONDITIONAL(HAVE_LIBPNG, test "$have_libpng" = "yes")
-AC_SUBST(LIBPNG_CFLAGS)
-AC_SUBST(LIBPNG_LIBS)
 test "$have_libpng" = "yes" && AC_DEFINE(HAVE_LIBPNG, [], [Define if we have libpng])
 
 
@@ -423,13 +444,17 @@
 
 LIBEXIF_REQUIRED=0.6
 
-PKG_CHECK_MODULES(LIBEXIF, [
-	libexif >= $LIBEXIF_REQUIRED],
-	[have_libexif=yes] , [have_libexif=no])
-
+AC_ARG_ENABLE(exif, AC_HELP_STRING([--disable-exif],[Disable exif data extractor]),,[enable_exif=yes])
+if test "x$enable_exif" = "xyes"; then
+	PKG_CHECK_MODULES(LIBEXIF, [
+		libexif >= $LIBEXIF_REQUIRED],
+		[have_libexif=yes] , [have_libexif=no])
+	AC_SUBST(LIBEXIF_CFLAGS)
+	AC_SUBST(LIBEXIF_LIBS)
+else
+	have_libexif="no (disabled)"
+fi
 AM_CONDITIONAL(HAVE_LIBEXIF, test "$have_libexif" = "yes")
-AC_SUBST(LIBEXIF_CFLAGS)
-AC_SUBST(LIBEXIF_LIBS)
 test "$have_libexif" = "yes" && AC_DEFINE(HAVE_LIBEXIF, [], [Define if we have libexif])
 
 ##################################################################
@@ -438,13 +463,17 @@
 
 LIBGSF_REQUIRED=1.13
 
-PKG_CHECK_MODULES(LIBGSF, [
-	libgsf-1 >= $LIBGSF_REQUIRED],
-	[have_libgsf=yes] , [have_libgsf=no])
-
+AC_ARG_ENABLE(gsf, AC_HELP_STRING([--disable-gsf], [Disable GSF data extractor]),,[enable_gsf=yes])
+if test "x$enable_gsf" = "xyes"; then
+	PKG_CHECK_MODULES(LIBGSF,[
+		libgsf-1 >= $LIBGSF_REQUIRED],
+		[have_libgsf=yes] , [have_libgsf=no])
+	AC_SUBST(LIBGSF_CFLAGS)
+	AC_SUBST(LIBGSF_LIBS)
+else
+	have_libgsf="no (disabled)"
+fi
 AM_CONDITIONAL(HAVE_LIBGSF, test "$have_libgsf" = "yes")
-AC_SUBST(LIBGSF_CFLAGS)
-AC_SUBST(LIBGSF_LIBS)
 test "$have_libgsf" = "yes" && AC_DEFINE(HAVE_LIBGSF, [], [Define if we have libgsf])
 
 ####################################################################
@@ -503,9 +532,8 @@
 	prefix:					${prefix}
 	source code location:			${srcdir}
 	compiler:				${CC}
-	enable gcc warnings:			$warning_support
+	enable gcc warnings:			$enable_warnings
 	database engine:			SQLite
-	available file mointor backends:	$fs_monitor_backends
 	file monitor backend to be used:	$primary_backend
 	inotify header location:		$inotify_header
 	ioprio support:				$ioprio_support
@@ -520,7 +548,7 @@
 	video files:				$videos_are_handled ($videos_handler)
 
 "
-if test "$external_sqlite" = "yes"; then
+if test "x$enable_external_sqlite" = "xyes"; then
 echo "
 ****WARNING**** : you have chosen to use an external version of SQLite instead of the in-built threadsafe one. 
 You must make sure a version of SQLite compiled with --enable-threadsafe is available otherwise expect pain!
_______________________________________________
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to