$OpenBSD: patch-src_Makefile_am,v 1.4 2013/03/30 08:04:19 jasper Exp $

Make Network Manager support optional.
https://bugzilla.gnome.org/show_bug.cgi?id=679871

--- src/Makefile.am.orig	Fri Mar 22 20:06:31 2013
+++ src/Makefile.am	Fri Mar 29 21:57:26 2013
@@ -116,7 +116,6 @@ shell_public_headers_h =		\
 	shell-invert-lightness-effect.h	\
 	shell-keybinding-modes.h	\
 	shell-mount-operation.h		\
-	shell-network-agent.h		\
 	shell-perf-log.h		\
 	shell-screenshot.h		\
 	shell-slicer.h			\
@@ -159,7 +158,6 @@ libgnome_shell_la_SOURCES =		\
 	shell-keyring-prompt.h		\
 	shell-keyring-prompt.c		\
 	shell-mount-operation.c		\
-	shell-network-agent.c		\
 	shell-perf-log.c		\
 	shell-polkit-authentication-agent.h	\
 	shell-polkit-authentication-agent.c	\
@@ -233,6 +231,16 @@ endif BUILD_RECORDER
 
 ########################################
 
+if NETWORK_MANAGER
+
+shell_public_headers_h += shell-network-agent.h
+
+libgnome_shell_la_SOURCES += shell-network-agent.c
+
+endif NETWORK_MANAGER
+
+########################################
+
 libexec_PROGRAMS += gnome-shell-perf-helper
 
 gnome_shell_perf_helper_SOURCES = shell-perf-helper.c
@@ -287,7 +295,10 @@ libgnome_shell_la_LIBADD =		\
 libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
 
 Shell-0.1.gir: libgnome-shell.la St-1.0.gir
-Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 Soup-2.4 GMenu-3.0 NetworkManager-1.0 NMClient-1.0
+Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 Soup-2.4 GMenu-3.0
+if NETWORK_MANAGER
+Shell_0_1_gir_INCLUDES += NetworkManager-1.0 NMClient-1.0
+endif
 Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
 Shell_0_1_gir_LIBS = libgnome-shell.la
 Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)
