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



commit 8011bbe061a3571d7e7ae0da6ed9b1fcf55b7cf6
Author: Jonatan PĂ„lsson <jonatan palsson pelagicore com>
Date:   Tue Jul 9 10:01:05 2013 +0200

    tracker-extract: Make MP3 extractor optional, using --enable-mp3

 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 43f4f38..dffaaa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2219,6 +2219,26 @@ fi
 AM_CONDITIONAL(HAVE_DVI, test "x$have_dvi" = "xyes")
 
 ####################################################################
+# Check for tracker-extract: mp3
+####################################################################
+
+AC_ARG_ENABLE(mp3,
+              AS_HELP_STRING([--enable-mp3],
+                             [enable MP3 support [[default=auto]]]),,
+              [enable_mp3=auto])
+
+if test "x$enable_mp3" != "xno"; then
+   AC_SUBST(MP3_CFLAGS)
+   AC_SUBST(MP3_LIBS)
+   AC_DEFINE(HAVE_MP3, [], [Define if we have MP3 extractor])
+   have_mp3=yes
+else
+   have_mp3="no  (disabled)"
+fi
+
+AM_CONDITIONAL(HAVE_MP3, test "x$have_mp3" = "xyes")
+
+####################################################################
 # Check for tracker-extract, tracker-writeback: totem-pl-parser
 ####################################################################
 
@@ -2496,6 +2516,7 @@ Metadata Extractors:
        Support ISO image parsing:              $have_libosinfo
        Support AbiWord document parsing:       $have_abiword
        Support DVI parsing:                    $have_dvi
+       Support MP3 parsing:                    $have_mp3
 
 Data Miners:
 
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index 457dde4..b13110a 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -54,14 +54,12 @@ 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-mp3.la \
        libextract-ps.la \
        libextract-text.la \
        libextract-icon.la
 
 rules_DATA = \
        10-ico.rule \
-       10-mp3.rule \
        10-ps.rule \
        90-text-generic.rule
 
@@ -165,6 +163,11 @@ modules_LTLIBRARIES += libextract-dvi.la
 rules_DATA += 10-dvi.rule
 endif
 
+if HAVE_MP3
+modules_LTLIBRARIES += libextract-mp3.la
+rules_DATA += 10-mp3.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]