[network-manager-pptp/lr/libnm: 13/14] build: allow build without libnm-glib



commit d00c7ec38df706f884c51586343f91033907a2ee
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Sat Jul 25 10:13:29 2015 +0200

    build: allow build without libnm-glib

 configure.ac           |   16 ++++++++++------
 properties/Makefile.am |    5 ++++-
 2 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a31be24..3ab299c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,8 @@ dnl GNOME support
 dnl
 AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-pptp 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-pptp without libnm-glib 
comatibility]))
+AM_CONDITIONAL(WITH_LIBNM_GLIB, test x"$with_libnm_glib" != xno)
 
 GETTEXT_PACKAGE=NetworkManager-pptp
 AC_SUBST(GETTEXT_PACKAGE)
@@ -67,18 +69,20 @@ GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
 
 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.74)
 
-PKG_CHECK_MODULES(LIBNM_GLIB,
-                  NetworkManager >= 1.1.0
-                  libnm-glib >= 1.1.0
-                  libnm-glib-vpn >= 1.1.0)
-
 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.10)
        PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0)
        PKG_CHECK_MODULES(LIBSECRET, libsecret-unstable)
+
+       if test x"$with_libnm_glib" != xno; then
+               PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 0.9.10)
+               PKG_CHECK_MODULES(LIBNM_GLIB,
+                                 NetworkManager >= 1.1.0
+                                 libnm-glib >= 1.1.0
+                                 libnm-glib-vpn >= 1.1.0)
+       fi
 fi
 
 PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0)
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 33a6ded..65f8eb0 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -1,5 +1,8 @@
 plugindir = $(libdir)/NetworkManager
-plugin_LTLIBRARIES = libnm-pptp-properties.la libnm-pptp-properties-old.la
+plugin_LTLIBRARIES = libnm-pptp-properties.la
+if WITH_LIBNM_GLIB
+plugin_LTLIBRARIES += libnm-pptp-properties-old.la
+endif
 
 AM_CPPFLAGS = -I${top_srcdir}
 


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