[network-manager-iodine: 10/14] build: allow build without libnm-glib



commit a8d78602c537eb632d6f92b1f92b77123f8736ee
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Mon Aug 24 17:47:51 2015 +0200

    build: allow build without libnm-glib

 configure.ac           |   21 +++++++++++++--------
 properties/Makefile.am |    5 ++++-
 2 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f1639c3..38faa55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,9 @@ AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno)
 AC_ARG_WITH(authdlg, AS_HELP_STRING([--without-authdlg], [Build NetworkManager-iodine without authentication 
dialog]))
 AM_CONDITIONAL(WITH_AUTHDLG, test x"$with_authdlg" != xno)
 
+AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--without-libnm-glib], [Build NetworkManager-iodine without 
libnm-glib comatibility]))
+AM_CONDITIONAL(WITH_LIBNM_GLIB, test x"$with_libnm_glib" != xno)
+
 GETTEXT_PACKAGE=NetworkManager-iodine
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
@@ -57,17 +60,19 @@ if test x"$with_gnome" != xno; then
        PKG_CHECK_MODULES(GTK, gtk+-3.0 > $gtk3_req, ,
                          [PKG_CHECK_MODULES(GTK, gtk+-2.0 > $gtk2_req)])
 
+       PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0)
         PKG_CHECK_MODULES(LIBSECRET, libsecret-1)
 
-       PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 0.9.9.0)
-       PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0)
-fi
+       if test x"$with_libnm_glib" != xno; then
+               PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 0.9.9.0)
+               PKG_CHECK_MODULES(LIBNM_GLIB,
+                                 NetworkManager >= 1.1.0
+                                 libnm-util >= 1.1.0
+                                 libnm-glib  >= 1.1.0
+                                 libnm-glib-vpn >= 1.1.0)
+       fi
 
-PKG_CHECK_MODULES(LIBNM_GLIB,
-                  NetworkManager >= 1.1.0
-                  libnm-util >= 1.1.0
-                  libnm-glib  >= 1.1.0
-                  libnm-glib-vpn >= 1.1.0)
+fi
 
 PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0)
 LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 8223089..6edc5bc 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -1,5 +1,8 @@
 plugindir = $(libdir)/NetworkManager
-plugin_LTLIBRARIES = libnm-vpn-plugin-iodine.la libnm-iodine-properties.la
+plugin_LTLIBRARIES = libnm-vpn-plugin-iodine.la
+if WITH_LIBNM_GLIB
+plugin_LTLIBRARIES += libnm-iodine-properties.la
+endif
 
 libnm_vpn_plugin_iodine_la_SOURCES =                    \
         nm-iodine.c \


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