[tracker] tracker-extract: Make the AbiWord extractor optional, using --enable-abiword



commit 01e9be75873fef276065a421760b2a85d1e607da
Author: Jonatan PĂ„lsson <jonatan palsson pelagicore com>
Date:   Tue Jul 9 08:51:40 2013 +0200

    tracker-extract: Make the AbiWord extractor optional, using --enable-abiword

 configure.ac                    |   21 +++++++++++++++++++++
 src/tracker-extract/Makefile.am |    7 +++++--
 2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 91aca88..75ee045 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2179,6 +2179,26 @@ fi
 AM_CONDITIONAL(HAVE_LIBCUE, test "x$have_libcue" = "xyes")
 
 ####################################################################
+# Check for tracker-extract: AbiWord
+####################################################################
+
+AC_ARG_ENABLE(abiword,
+              AS_HELP_STRING([--enable-abiword],
+                             [enable AbiWord support [[default=auto]]]),,
+              [enable_abiword=auto])
+
+if test "x$enable_abiword" != "xno" ; then
+   AC_SUBST(ABIWORD_CFLAGS)
+   AC_SUBST(ABIWORD_LIBS)
+   AC_DEFINE(HAVE_ABIWORD, [], [Define if we have AbiWord extractor])
+   have_abiword=yes
+else
+   have_abiword="no  (disabled)"
+fi
+
+AM_CONDITIONAL(HAVE_ABIWORD, test "x$have_abiword" = "xyes")
+
+####################################################################
 # Check for tracker-extract, tracker-writeback: totem-pl-parser
 ####################################################################
 
@@ -2454,6 +2474,7 @@ Metadata Extractors:
        Support cue sheet parsing:              $have_libcue
        Support playlists (w/ Totem):           $have_playlist
        Support ISO image parsing:              $have_libosinfo
+       Support AbiWord document parsing:       $have_abiword
 
 Data Miners:
 
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index 6584258..0708b20 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -54,7 +54,6 @@ 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-abw.la \
        libextract-dvi.la \
        libextract-mp3.la \
        libextract-ps.la \
@@ -62,7 +61,6 @@ modules_LTLIBRARIES = \
        libextract-icon.la
 
 rules_DATA = \
-       10-abw.rule \
        10-dvi.rule \
        10-ico.rule \
        10-mp3.rule \
@@ -159,6 +157,11 @@ modules_LTLIBRARIES += libextract-png.la
 rules_DATA += 10-png.rule
 endif
 
+if HAVE_ABIWORD
+modules_LTLIBRARIES += libextract-abw.la
+rules_DATA += 10-abw.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]