[gnome-shell-extensions] Rework how external packages are pulled in



commit eae099f97c5fe31854919b7658572f8a98d76b12
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu May 12 18:27:52 2011 +0200

    Rework how external packages are pulled in
    
    Now if a required external package cannot be found, it doesn't fail
    and instead prints a warning. This is to allow building with
    --enable-extensions=all without the required libraries.
    Also bump required libgtop version to the one with the typelib.

 configure.ac |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ace79e3..3676db1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,8 +18,6 @@ PKG_PROG_PKG_CONFIG([0.22])
 
 GLIB_GSETTINGS
 
-ADDITIONAL_PACKAGES=
-
 dnl keep this in alphabetic order
 dnl by default, install only extensions that do not change completely the shell experience,
 dnl that don't require GSettings and that don't require external packages for typelibs
@@ -38,20 +36,21 @@ if test x$enable_extensions = xall; then
    enable_extensions="$ALL_EXTENSIONS"
 fi
 
-ADDITIONAL_PACKAGES=
 ENABLED_EXTENSIONS=
 for e in $enable_extensions; do
 	case $e in
 		systemMonitor)
-			ENABLED_EXTENSIONS="$ENABLED_EXTENSIONS $e"
-			ADDITIONAL_PACKAGES="$ADDITIONAL_PAGKAGES libgtop-2.0 >= 2.28.3"
+			PKG_CHECK_MODULES(GTOP, libgtop-2.0 >= 2.28.4,
+					[ENABLED_EXTENSIONS="$ENABLED_EXTENSIONS $e"],
+					[AC_MSG_WARN([libgtop-2.0 not found, disabling systemMonitor])])
 			;;
 		xrandr-indicator)
-			ENABLED_EXTENSIONS="$ENABLED_EXTENSIONS $e"
-			ADDITIONAL_PACKAGES="$ADDITIONAL_PAGKAGES gnome-desktop-3.0 >= 2.91.6"
+			PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0 >= 2.91.6,
+					[ENABLED_EXTENSIONS="$ENABLED_EXTENSIONS $e"],
+					[AC_MSG_WARN([gnome-desktop-3.0 not found, disabling xrandr-indicator])])
 			;;
 dnl		keep this in alphabetic order
-		alternate-tab|alternative-status-menu|auto-move-windows|dock|drive-menu|example|gajim|places-menu|windowsNavigator)
+		alternate-tab|alternative-status-menu|auto-move-windows|dock|drive-menu|example|gajim|places-menu|user-theme|windowsNavigator)
 			ENABLED_EXTENSIONS="$ENABLED_EXTENSIONS $e"
 			;;
 		*)
@@ -61,13 +60,6 @@ done
 
 AC_SUBST(ENABLED_EXTENSIONS, [$ENABLED_EXTENSIONS])
 
-dnl We don't really need cflags or libdirs, we just check
-dnl to ensure we don't fail at runtime.
-
-if test "x$ADDITIONAL_PACKAGES" != x; then
-	PKG_CHECK_MODULES(ADDITIONAL, [$ADDITIONAL_PACKAGES])
-fi
-
 dnl Please keep this sorted alphabetically
 AC_CONFIG_FILES([
   extensions/alternate-tab/Makefile



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