[tracker] tracker-extract: Make text extractor optional, using --enable-text



commit 2b4a106966a05b6cdb589cee862a566358d5296c
Author: Jonatan PĂ„lsson <jonatan palsson pelagicore com>
Date:   Tue Jul 9 10:12:36 2013 +0200

    tracker-extract: Make text extractor optional, using --enable-text

 configure.ac                    |   21 +++++++++++++++++++++
 src/tracker-extract/Makefile.am |    9 ++++++---
 2 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 218494c..447b4da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2259,6 +2259,26 @@ fi
 AM_CONDITIONAL(HAVE_PS, test "x$have_ps" = "xyes")
 
 ####################################################################
+# Check for tracker-extract: text
+####################################################################
+
+AC_ARG_ENABLE(text,
+              AS_HELP_STRING([--enable-text],
+                             [enable text support [[default=auto]]]),,
+              [enable_text=auto])
+
+if test "x$enable_text" != "xno"; then
+   AC_SUBST(TEXT_CFLAGS)
+   AC_SUBST(TEXT_LIBS)
+   AC_DEFINE(HAVE_TEXT, [], [Define if we have text extractor])
+   have_text=yes
+else
+   have_text="no  (disabled)"
+fi
+
+AM_CONDITIONAL(HAVE_TEXT, test "x$have_text" = "xyes")
+
+####################################################################
 # Check for tracker-extract, tracker-writeback: totem-pl-parser
 ####################################################################
 
@@ -2538,6 +2558,7 @@ Metadata Extractors:
        Support DVI parsing:                    $have_dvi
        Support MP3 parsing:                    $have_mp3
        Support PS parsing:                     $have_ps
+       Support text parsing:                   $have_text
 
 Data Miners:
 
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index 639cb7d..80e6142 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -54,12 +54,10 @@ rules_in_files = \
 # We don't always link with libtracker-common, we only link
 # against it if we directly use functions in the .so
 modules_LTLIBRARIES = \
-       libextract-text.la \
        libextract-icon.la
 
 rules_DATA = \
-       10-ico.rule \
-       90-text-generic.rule
+       10-ico.rule
 
 if HAVE_LIBVORBIS
 modules_LTLIBRARIES += libextract-vorbis.la
@@ -171,6 +169,11 @@ modules_LTLIBRARIES += libextract-ps.la
 rules_DATA += 10-ps.rule
 endif
 
+if HAVE_TEXT
+modules_LTLIBRARIES += libextract-text.la
+rules_DATA += 90-text-generic.rule
+endif
+
 # ABW
 libextract_abw_la_SOURCES = tracker-extract-abw.c
 libextract_abw_la_CFLAGS = $(TRACKER_EXTRACT_MODULES_CFLAGS)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]