[network-manager-openswan/lr/libnm: 7/10] build: allow build without libnm-glib
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openswan/lr/libnm: 7/10] build: allow build without libnm-glib
- Date: Mon, 31 Aug 2015 14:28:47 +0000 (UTC)
commit 5b7271f1a2cf5de6d29f521d3fc9d2e4b090df0b
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Fri Jul 24 19:14:23 2015 +0200
build: allow build without libnm-glib
configure.ac | 22 ++++++++++++++--------
properties/Makefile.am | 7 +++++--
2 files changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2cfe669..25a2fc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,8 @@ dnl GNOME support
dnl
AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-openswan 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-openswan 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
@@ -67,20 +69,24 @@ PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.74)
PKG_CHECK_MODULES(LIBNL, libnl-3.0 >= 3.2.8)
-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)
-
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
dnl
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 2fb4f4e..8ae776b 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -1,5 +1,8 @@
plugindir = $(libdir)/NetworkManager
-plugin_LTLIBRARIES = libnm-vpn-plugin-openswan.la libnm-openswan-properties.la
+plugin_LTLIBRARIES = libnm-vpn-plugin-openswan.la
+if WITH_LIBNM_GLIB
+plugin_LTLIBRARIES += libnm-openswan-properties.la
+endif
common_CFLAGS = \
$(GLIB_CFLAGS) \
@@ -19,7 +22,7 @@ libnm_vpn_plugin_openswan_la_CFLAGS = \
libnm_openswan_properties_la_CFLAGS = \
-DNM_OPENSWAN_OLD \
$(common_CFLAGS) \
- $(LIBNM_GLIB_CFLAGS)
+ $(NM_CFLAGS)
libnm_vpn_plugin_openswan_la_SOURCES = \
nm-openswan.c \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]