[network-manager-vpnc/lr/libnm: 5/7] build: allow build without libnm-glib



commit 4b26c1dcde4a9eb459801f02eb280f10a705ac12
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Fri Jul 24 19:52:48 2015 +0200

    build: allow build without libnm-glib

 configure.ac           |   18 +++++++++++-------
 properties/Makefile.am |    5 ++++-
 2 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3098119..caa767a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,8 @@ dnl GNOME support
 dnl
 AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-vpnc without GNOME support, e.g. 
vpn service only]))
 AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno)
+AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--without-libnm-glib], [Build NetworkManager-vpnc without libnm-glib 
comatibility]))
+AM_CONDITIONAL(WITH_LIBNM_GLIB, test x"$with_libnm_glib" != xno)
 
 dnl ensure that when the Automake generated makefile calls aclocal,
 dnl it honours the $ACLOCAL_FLAGS environment variable
@@ -66,16 +68,18 @@ if test x"$with_gnome" != xno; then
        PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.4)
        GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_4"
 
-       PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 0.9.9.0)
        PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0)
        PKG_CHECK_MODULES(LIBSECRET, libsecret-unstable)
-fi
 
-PKG_CHECK_MODULES(LIBNM_GLIB,
-                  NetworkManager >= 0.9.6
-                  libnm-util >= 0.9.6
-                  libnm-glib >= 0.9.6
-                  libnm-glib-vpn >= 0.9.6)
+       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 >= 0.9.6
+                                 libnm-util >= 0.9.6
+                                 libnm-glib >= 0.9.6
+                                 libnm-glib-vpn >= 0.9.6)
+       fi
+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 3882883..0e4def3 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -1,7 +1,10 @@
 SUBDIRS=. tests
 
 plugindir = $(libdir)/NetworkManager
-plugin_LTLIBRARIES = libnm-vpn-plugin-vpnc.la libnm-vpnc-properties.la
+plugin_LTLIBRARIES = libnm-vpn-plugin-vpnc.la
+if WITH_LIBNM_GLIB
+plugin_LTLIBRARIES += libnm-vpnc-properties.la
+endif
 
 libnm_vpn_plugin_vpnc_la_SOURCES = \
        nm-vpnc.c \


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