[brasero] build: Simplify tracker version searching and support 0.16 API



commit 45cecda00ae84b4aaa872430ff3e8ad40bd98df6
Author: Kalev Lember <kalevlember gmail com>
Date:   Sun Jan 27 23:25:54 2013 +0100

    build: Simplify tracker version searching and support 0.16 API
    
    Use an iterator instead of a deep dependency tree. This should simplify
    adding support for new tracker versions in the future.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692664

 configure.ac |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ce79401..d77bffe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -382,21 +382,22 @@ AC_ARG_ENABLE(search,
                        esac],
                        [enable_search="auto"])
 
+if test x"$enable_search" != "xno"; then
+        # Try to figure out the tracker API version to use
+        tracker_api="0.10"
+        m4_foreach([VERSION], [[0.10], [0.12], [0.14], [0.16]],
+                              [PKG_CHECK_EXISTS([tracker-sparql-VERSION >= $TRACKER_REQUIRED],
+                                                [tracker_api="VERSION"])
+                              ])
+fi
+
 if test x"$enable_search" = "xauto"; then
-        PKG_CHECK_EXISTS([tracker-sparql-0.14 >= $TRACKER_REQUIRED],
-                          [enable_search=yes],
-                          [PKG_CHECK_EXISTS([tracker-sparql-0.12 >= $TRACKER_REQUIRED],
-                                            [enable_search=yes],
-                                            [PKG_CHECK_EXISTS([tracker-sparql-0.10 >= $TRACKER_REQUIRED],
-                                                              [enable_search=yes],
-                                                              [enable_search=no])])])
+        PKG_CHECK_EXISTS([tracker-sparql-$tracker_api >= $TRACKER_REQUIRED],
+                         [enable_search=yes],
+                         [enable_search=no])
 fi
 
 if test x"$enable_search" = "xyes"; then
-        PKG_CHECK_EXISTS([tracker-sparql-0.14 >= $TRACKER_REQUIRED],
-                         [tracker_api=0.14],
-                         [PKG_CHECK_EXISTS([tracker-sparql-0.12 >= $TRACKER_REQUIRED],
-                                           [tracker_api=0.12], [tracker_api=0.10])])
        PKG_CHECK_MODULES(BRASERO_SEARCH, tracker-sparql-$tracker_api >= $TRACKER_REQUIRED)
        AC_DEFINE(BUILD_SEARCH, 1, [define if you  want to use search pane])
        AC_DEFINE(BUILD_TRACKER, 1, [define if you  want to use search pane])


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