On 18.12.2011 04:01, Michael Biebl wrote:
>
> As a port of NetworkManager is unlikely, the only remaining option I
> see, is that we try to make the NM integration in gnome-shell optional.
>
> But this needs someone running gnome-shell on kfreebsd and who would be
> willing to help with testing and fixing the issues that will come up.
Attached is a untested patch which should make it possible to compile
and run gnome-shell without network-manager. It needs an autoreconf, and
mixing intltool and gettext doesn't work that well. That's what
11-no-gettext.patch is for.
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From ce3bc8b64bc1aeaf8917ed5dd5f8437ca87fd906 Mon Sep 17 00:00:00 2001
From: Michael Biebl
Date: Thu, 22 Dec 2011 22:04:12 +0100
Subject: [PATCH] Make NM optional
---
configure.ac| 49 +++--
js/Makefile.am |5 -
js/ui/main.js | 12 ++--
src/Makefile.am | 16 +---
4 files changed, 74 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1c64122..13cd42b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,8 +95,41 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION
libcanberra
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
- polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
- libnm-glib libnm-util gnome-keyring-1)
+ polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes)
+
+##
+# Check for NetworkManager
+##
+NM_MIN_VERSION=0.9
+AC_ARG_ENABLE(network-manager,
+ AS_HELP_STRING([--disable-network-manager],
+ [disable NetworkManager support @<:@default=auto@:>@]),,
+ [enable_network_manager=auto])
+
+if test "x$enable_network_manager" != "xno"; then
+ PKG_CHECK_MODULES(NETWORK_MANAGER,
+ [libnm-glib libnm-util gnome-keyring-1],
+ [have_network_manager=yes],
+ [have_network_manager=no])
+
+ GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $NETWORK_MANAGER_CFLAGS"
+ GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $NETWORK_MANAGER_LIBS"
+
+ if test "x$have_network_manager" = "xyes"; then
+ AC_DEFINE(HAVE_NETWORK_MANAGER, [], [Define if we have NetworkManager])
+ fi
+else
+ have_network_manager="no (disabled)"
+fi
+
+if test "x$enable_network_manager" = "xyes"; then
+ if test "x$have_network_manager" != "xyes"; then
+ AC_MSG_ERROR([Couldn't find NetworkManager.])
+ fi
+fi
+
+AM_CONDITIONAL(HAVE_NETWORK_MANAGER, test "$have_network_manager" = "yes")
+
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
@@ -250,3 +283,15 @@ AC_CONFIG_FILES([
man/Makefile
])
AC_OUTPUT
+
+echo "
+Build configuration:
+
+ Prefix: ${prefix}
+ Source code location: ${srcdir}
+ Compiler: ${CC}
+ Compiler Warnings: $enable_compile_warnings
+
+ Support for NetworkManager: $have_network_manager
+ Support for GStreamer recording:$build_recorder
+"
diff --git a/js/Makefile.am b/js/Makefile.am
index 58e0489..3d1418d 100644
--- a/js/Makefile.am
+++ b/js/Makefile.am
@@ -45,7 +45,6 @@ nobase_dist_js_DATA = \
ui/main.js \
ui/messageTray.js \
ui/modalDialog.js \
- ui/networkAgent.js \
ui/shellEntry.js \
ui/shellMountOperation.js \
ui/notificationDaemon.js \
@@ -78,3 +77,7 @@ nobase_dist_js_DATA = \
ui/workspacesView.js \
ui/workspaceSwitcherPopup.js\
ui/xdndHandler.js
+
+if HAVE_NETWORK_MANAGER
+nobase_dist_js_DATA += ui/networkAgent.js
+endif
diff --git a/js/ui/main.js b/js/ui/main.js
index 4c97440..4574a7d 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -27,7 +27,6 @@ const PlaceDisplay = imports.ui.placeDisplay;
const RunDialog = imports.ui.runDialog;
const Layout = imports.ui.layout;
const LookingGlass = imports.ui.lookingGlass;
-const NetworkAgent = imports.ui.networkAgent;
const NotificationDaemon = imports.ui.notificationDaemon;
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
const Scripting = imports.ui.scripting;
@@ -39,6 +38,12 @@ const XdndHandler = imports.ui.xdndHandler;
const StatusIconDispatcher = imports.ui.statusIconDispatcher;
const Util = imports.misc.util;
+try {
+const NetworkAgent = imports.ui.networkAgent;
+} catch (e) {
+NetworkAgent = null;
+}
+
const DEFAULT_BACKGROUND_COLOR = new Clutter.Color();
DEFAULT_BACKGROUND_COLOR.from_pixel(0x2266bbff);
@@ -84,7 +89,10 @@ function _createUserSession() {
telepathyClient = new TelepathyClient.Client();
automountManager = new AutomountManager.AutomountManager();
autorunManager = new AutorunManager.AutorunManager();
-