network: Fix build with NM 0.9.8.x

Team support was only added in the 0.9.9.x branch for the 0.9.10
stable release. It's not available in any releases (beta or stable
ones) yet.

https://bugzilla.gnome.org/show_bug.cgi?id=723769
This commit is contained in:
Bastien Nocera 2014-02-12 13:36:53 +01:00
parent 2e86e9e018
commit f31dbd0271
3 changed files with 16 additions and 3 deletions

View file

@ -198,6 +198,13 @@ if test x${have_networkmanager} = xyes; then
AC_SUBST(NM_VPN_MODULE_DIR)
fi
# Work-around for https://bugzilla.gnome.org/show_bug.cgi?id=723769
PKG_CHECK_MODULES(NM_UNSTABLE_CHECK, libnm-util >= 0.9.9.0, nm_unstable=yes, nm_unstable=no)
if test x$nm_unstable = xyes; then
AC_DEFINE(HAVE_NM_UNSTABLE, 1, [Define to 1 if NetworkManager is available])
fi
AM_CONDITIONAL(HAVE_NM_UNSTABLE, [test x$nm_unstable = xyes])
# Check for gnome-bluetooth
PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.11.1,
[have_bluetooth=yes], have_bluetooth=no)

View file

@ -34,8 +34,6 @@ libnetwork_la_SOURCES = \
net-device-mobile.h \
net-device-bond.c \
net-device-bond.h \
net-device-team.c \
net-device-team.h \
net-device-bridge.c \
net-device-bridge.h \
net-virtual-device.c \
@ -49,6 +47,12 @@ libnetwork_la_SOURCES = \
cc-network-panel.c \
cc-network-panel.h
TEAM_FILES = net-device-team.c net-device-team.h
EXTRA_DIST = $(TEAM_FILES)
if HAVE_NM_UNSTABLE
libnetwork_la_SOURCES += $(TEAM_FILES)
endif
libnetwork_la_LIBADD = $(PANEL_LIBS) $(NETWORK_PANEL_LIBS) $(NETWORK_MANAGER_LIBS) $(builddir)/connection-editor/libconnection-editor.la
libnetwork_la_LDFLAGS = $(PANEL_LDFLAGS)
@ -66,6 +70,6 @@ desktop_in_files = gnome-network-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
EXTRA_DIST = $(resource_files) network.gresource.xml
EXTRA_DIST += $(resource_files) network.gresource.xml
-include $(top_srcdir)/git.mk

View file

@ -594,7 +594,9 @@ typedef struct {
static const NetConnectionType connection_types[] = {
{ N_("VPN"), nm_setting_vpn_get_type },
{ N_("Bond"), nm_setting_bond_get_type },
#ifdef HAVE_NM_UNSTABLE
{ N_("Team"), nm_setting_team_get_type },
#endif /* NM_UNSTABLE */
{ N_("Bridge"), nm_setting_bridge_get_type },
{ N_("VLAN"), nm_setting_vlan_get_type }
};