[brasero] Make soft autodetection.



commit f6c28f61ddea2841d4d47a67ae7bd3eed3d143f2
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date:   Mon Mar 8 17:20:06 2010 +0000

    Make soft autodetection.

 configure.in |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)
---
diff --git a/configure.in b/configure.in
index 6fa36df..3cf85bd 100644
--- a/configure.in
+++ b/configure.in
@@ -380,11 +380,36 @@ BEAGLE_REQUIRED=0.3.0
 TRACKER_REQUIRED=0.7.16
 
 AC_ARG_ENABLE(search,
-			AS_HELP_STRING([--enable-search],[Build search pane (if a search backend is available) [[default=yes]]]),
-			[enable_search=$enableval],
+			AS_HELP_STRING([--enable-search],[Build search pane (if a search backend is available) [[default=auto]]]),
+			[case "$enableval" in
+				"auto")    enable_search="yes" ;;
+				"yes")     enable_search="yes" ;;
+				"no")      enable_search="no" ;;
+				"tracker") enable_search="tracker" ;;
+				"beagle")  enable_search="beagle" ;;
+				*)         echo "Unknown option"; exit 2 ;;
+			esac],
 			[enable_search="yes"])
 
-if test x"$enable_search" = "xyes"; then
+if test x"$enable_search" = "xtracker"; then
+	PKG_CHECK_MODULES(BRASERO_SEARCH, tracker-client-0.7 >= $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])
+	AC_SUBST(BRASERO_SEARCH_CFLAGS)
+	AC_SUBST(BRASERO_SEARCH_LIBS)
+	build_beagle="no"
+	build_tracker="yes"
+	build_search="yes"
+elif test x"$enable_search" = "xbeagle"; then
+	PKG_CHECK_MODULES(BRASERO_SEARCH, libbeagle-1.0 >= $BEAGLE_REQUIRED)
+	AC_DEFINE(BUILD_SEARCH, 1, [define if you  want to use search pane])
+	AC_DEFINE(BUILD_BEAGLE, 1, [define if you  want to use search pane])
+	AC_SUBST(BRASERO_SEARCH_CFLAGS)
+	AC_SUBST(BRASERO_SEARCH_LIBS)
+	build_beagle="yes"
+	build_tracker="no"
+	build_search="yes"
+elif test x"$enable_search" = "xyes"; then
 	PKG_CHECK_MODULES(BRASERO_SEARCH, tracker-client-0.7 >= $TRACKER_REQUIRED, build_search=yes, build_search=no)
 	if test x"$build_search" = "xyes"; then
 		AC_DEFINE(BUILD_SEARCH, 1, [define if you  want to use search pane])



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