[network-manager-openvpn/lr/libnm: 12/13] build: allow build without libnm-glib
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/lr/libnm: 12/13] build: allow build without libnm-glib
- Date: Wed, 19 Aug 2015 15:35:26 +0000 (UTC)
commit adf37f4b2dece0b60b95b202f8f601c5ab5b4737
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Thu Jul 23 17:21:55 2015 +0200
build: allow build without libnm-glib
common/Makefile.am | 5 ++++-
configure.ac | 23 ++++++++++++++---------
properties/Makefile.am | 5 ++++-
3 files changed, 22 insertions(+), 11 deletions(-)
---
diff --git a/common/Makefile.am b/common/Makefile.am
index ad2c9b7..f99bfd0 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1,4 +1,7 @@
-noinst_LTLIBRARIES=libnm-vpn-plugin-openvpn-common.la libnm-openvpn-common.la
+noinst_LTLIBRARIES=libnm-vpn-plugin-openvpn-common.la
+if WITH_LIBNM_GLIB
+noinst_LTLIBRARIES += libnm-openvpn-common.la
+endif
libnm_vpn_plugin_openvpn_common_la_CPPFLAGS = \
$(LIBNM_CFLAGS) \
diff --git a/configure.ac b/configure.ac
index 24c0434..860ed55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,8 @@ dnl GNOME support
dnl
AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-openvpn 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-openvpn without
libnm-glib comatibility]))
+AM_CONDITIONAL(WITH_LIBNM_GLIB, test x"$with_libnm_glib" != xno)
GETTEXT_PACKAGE=NetworkManager-openvpn
AC_SUBST(GETTEXT_PACKAGE)
@@ -60,21 +62,24 @@ AM_GLIB_GNU_GETTEXT
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32)
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
-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)
-LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_1_0"
-LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_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 >= 1.1.0)
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 >= 1.1.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);
+
+ LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_1_0"
+ LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_1_0"
+ fi
fi
PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0)
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 7a9b277..7c3c862 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -1,7 +1,10 @@
SUBDIRS = . tests
plugindir = $(libdir)/NetworkManager
-plugin_LTLIBRARIES = libnm-vpn-plugin-openvpn.la libnm-openvpn-properties.la
+plugin_LTLIBRARIES = libnm-vpn-plugin-openvpn.la
+if WITH_LIBNM_GLIB
+plugin_LTLIBRARIES += libnm-openvpn-properties.la
+endif
libnm_vpn_plugin_openvpn_la_SOURCES = \
nm-openvpn.c \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]