[network-manager-openconnect/dwmw2/compat-1-2] Make master branch build against NM 1.2 to provide (hidden) Juniper support



commit 172b0a69570d7f4995e66d3ae9ff1e5e30799d7b
Author: David Woodhouse <David Woodhouse intel com>
Date:   Mon Jul 4 11:56:00 2016 +0100

    Make master branch build against NM 1.2 to provide (hidden) Juniper support
    
    You'd have to explicitly enable the option with nmcli but it should work,
    and *lots* of people are asking for it, so best not to make them wait until
    1.4.

 configure.ac                              |   14 +++++++-------
 properties/nm-openconnect-editor-plugin.c |   12 +++++++++---
 2 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d375c3f..c31e124 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,18 +95,18 @@ if test x"$with_gnome" != xno; then
 
        if test x"$with_libnm_glib" != xno; then
                PKG_CHECK_MODULES(LIBNM_GLIB,
-                       NetworkManager >= 1.3.0
-                       libnm-util >= 1.3.0
-                       libnm-glib >= 1.3.0
-                       libnm-glib-vpn >= 1.3.0);
+                       NetworkManager >= 1.2.0
+                       libnm-util >= 1.2.0
+                       libnm-glib >= 1.2.0
+                       libnm-glib-vpn >= 1.2.0);
 
-               LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_4"
+               LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
                LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_4"
        fi
 fi
 
-PKG_CHECK_MODULES(LIBNM, libnm >= 1.3.0)
-LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_4"
+PKG_CHECK_MODULES(LIBNM, libnm >= 1.2.0)
+LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
 LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_4"
 
 AC_ARG_WITH(authdlg, AS_HELP_STRING([--without-authdlg], [Build NetworkManager-openconnect without 
authentication dialog]), [], [with_authdlg_specified=no])
diff --git a/properties/nm-openconnect-editor-plugin.c b/properties/nm-openconnect-editor-plugin.c
index 5df3c4f..ecd79c1 100644
--- a/properties/nm-openconnect-editor-plugin.c
+++ b/properties/nm-openconnect-editor-plugin.c
@@ -45,10 +45,12 @@
 #endif
 
 #ifdef NM_VPN_OLD
-#include "nm-openconnect-editor.h"
+# include "nm-openconnect-editor.h"
 #else
-#include "nm-utils/nm-vpn-editor-plugin-call.h"
-#include "nm-utils/nm-vpn-plugin-utils.h"
+# if NM_CHECK_VERSION(1,3,0)
+#  include "nm-utils/nm-vpn-editor-plugin-call.h"
+# endif
+# include "nm-utils/nm-vpn-plugin-utils.h"
 #endif
 
 #define OPENCONNECT_PLUGIN_NAME    _("Cisco AnyConnect Compatible VPN (openconnect)")
@@ -327,6 +329,7 @@ get_capabilities (NMVpnEditorPlugin *iface)
 }
 
 #ifndef NM_VPN_OLD
+#if NM_CHECK_VERSION(1,3,0)
 static void
 notify_plugin_info_set (NMVpnEditorPlugin *plugin,
                         NMVpnPluginInfo *plugin_info)
@@ -410,6 +413,7 @@ NM_VPN_EDITOR_PLUGIN_VT_DEFINE (vt, _get_vt,
        .fcn_get_service_add_details = _vt_impl_get_service_add_details,
        .fcn_get_service_add_detail  = _vt_impl_get_service_add_detail,
 )
+#endif
 
 static NMVpnEditor *
 _call_editor_factory (gpointer factory,
@@ -523,9 +527,11 @@ openconnect_editor_plugin_interface_init (NMVpnEditorPluginInterface *iface_clas
        iface_class->import_from_file = import;
        iface_class->export_to_file = export;
 #ifndef NM_VPN_OLD
+#if NM_CHECK_VERSION(1,3,0)
        iface_class->notify_plugin_info_set = notify_plugin_info_set;
        iface_class->get_vt = _get_vt;
 #endif
+#endif
 }
 
 G_MODULE_EXPORT NMVpnEditorPlugin *


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