[network-manager-openvpn/lr/libnm: 2/11] build: check for libnm & libnma



commit a7f76c4ae83fa3bd90a9f72a3566a676f19aedbf
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Fri Jul 24 12:05:49 2015 +0200

    build: check for libnm & libnma

 auth-dialog/Makefile.am      |    8 ++++----
 common/Makefile.am           |    8 ++++----
 configure.ac                 |   13 +++++++++----
 properties/Makefile.am       |   18 ++++++++----------
 properties/tests/Makefile.am |    8 ++++----
 src/Makefile.am              |    6 +++---
 6 files changed, 32 insertions(+), 29 deletions(-)
---
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index d707cb8..24d06d2 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -3,8 +3,8 @@ libexec_PROGRAMS = nm-openvpn-auth-dialog
 nm_openvpn_auth_dialog_CPPFLAGS =                      \
        $(GLIB_CFLAGS)                  \
        $(GTK_CFLAGS)                           \
-       $(NM_CFLAGS)            \
-       $(NMGTK_CFLAGS)         \
+       $(LIBNM_GLIB_CFLAGS)            \
+       $(LIBNM_GTK_CFLAGS)             \
        $(LIBSECRET_CFLAGS) \
        -DICONDIR=\""$(datadir)/pixmaps"\"      \
        -DUIDIR=\""$(uidir)"\"          \
@@ -17,8 +17,8 @@ nm_openvpn_auth_dialog_SOURCES = \
 
 nm_openvpn_auth_dialog_LDADD = \
        $(GTK_LIBS) \
-       $(NM_LIBS) \
-       $(NMGTK_LIBS) \
+       $(LIBNM_GLIB_LIBS) \
+       $(LIBNM_GTK_LIBS) \
        $(LIBSECRET_LIBS) \
        $(top_builddir)/common/libnm-openvpn-common-old.la
 
diff --git a/common/Makefile.am b/common/Makefile.am
index 0711e71..e8190cf 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1,12 +1,12 @@
 noinst_LTLIBRARIES=libnm-openvpn-common.la libnm-openvpn-common-old.la
 
 libnm_openvpn_common_la_CPPFLAGS = \
-       $(NM_CFLAGS) \
+       $(LIBNM_GLIB_CFLAGS) \
         -I$(top_srcdir)/src/
 
 libnm_openvpn_common_old_la_CPPFLAGS = \
        -DNM_OPENVPN_OLD \
-       $(NM_CFLAGS) \
+       $(LIBNM_GLIB_CFLAGS) \
         -I$(top_srcdir)/src/
 
 libnm_openvpn_common_la_SOURCES= \
@@ -18,9 +18,9 @@ libnm_openvpn_common_old_la_SOURCES = \
        $(libnm_openvpn_common_la_SOURCES)
 
 libnm_openvpn_common_la_LIBADD = \
-       $(NM_LIBS)
+       $(LIBNM_GLIB_LIBS)
 
 libnm_openvpn_common_old_la_LIBADD = \
-       $(NM_LIBS)
+       $(LIBNM_GLIB_LIBS)
 
 EXTRA_DIST = nm-glib-compat.h
diff --git a/configure.ac b/configure.ac
index b7c9ab5..5c896a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,22 +62,27 @@ GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
 
 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.74)
 
-PKG_CHECK_MODULES(NM,
        NetworkManager >= 0.9.10
        libnm-util >= 0.9.10
        libnm-glib >= 0.9.10
        libnm-glib-vpn >= 0.9.10)
-NM_CFLAGS="$NM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_10"
-NM_CFLAGS="$NM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_1_0"
+PKG_CHECK_MODULES(LIBNM_GLIB,
+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(NMGTK, libnm-gtk >= 0.9.10)
+       PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 1.1.0)
+       PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0)
        PKG_CHECK_MODULES(LIBSECRET, libsecret-unstable)
 fi
 
+PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0)
+LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
+LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2"
+
 NM_COMPILER_WARNINGS
 
 dnl
diff --git a/properties/Makefile.am b/properties/Makefile.am
index fc6372a..1dfd93b 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -20,8 +20,6 @@ ui_DATA = nm-openvpn-dialog.ui
 common_CFLAGS =                                         \
         $(GLIB_CFLAGS)                                  \
         $(GTK_CFLAGS)                                   \
-        $(NM_CFLAGS)                                    \
-        $(NMGTK_CFLAGS)                                 \
         -I$(top_srcdir)/src                             \
         -DICONDIR=\""$(datadir)/pixmaps"\"              \
         -DUIDIR=\""$(uidir)"\"                          \
@@ -30,25 +28,25 @@ common_CFLAGS =                                         \
 
 libnm_openvpn_properties_la_CFLAGS =                    \
         $(common_CFLAGS)                                \
-        $(NM_CFLAGS)                                    \
-        $(NMGTK_CFLAGS)
+        $(LIBNM_GLIB_CFLAGS)                            \
+        $(LIBNM_GTK_CFLAGS)
 
 libnm_openvpn_properties_old_la_CFLAGS =                \
         -DNM_OPENVPN_OLD                                \
         $(common_CFLAGS)                                \
-        $(NM_CFLAGS)                                    \
-        $(NMGTK_CFLAGS)
+        $(LIBNM_GLIB_CFLAGS)                            \
+        $(LIBNM_GTK_CFLAGS)
 
 libnm_openvpn_properties_la_LIBADD =                    \
         $(GTK_LIBS)                                     \
-        $(NM_LIBS)                                      \
-        $(NMGTK_LIBS)                                   \
+        $(LIBNM_GLIB_LIBS)                              \
+        $(LIBNM_GTK_LIBS)                               \
         $(top_builddir)/common/libnm-openvpn-common.la
 
 libnm_openvpn_properties_old_la_LIBADD =                \
         $(GTK_LIBS)                                     \
-        $(NM_LIBS)                                      \
-        $(NMGTK_LIBS)                                   \
+        $(LIBNM_GLIB_LIBS)                              \
+        $(LIBNM_GTK_LIBS)                               \
         $(top_builddir)/common/libnm-openvpn-common-old.la
 
 libnm_openvpn_properties_la_LDFLAGS =                   \
diff --git a/properties/tests/Makefile.am b/properties/tests/Makefile.am
index bfacb8c..3c7aa69 100644
--- a/properties/tests/Makefile.am
+++ b/properties/tests/Makefile.am
@@ -10,14 +10,14 @@ test_import_export_SOURCES = \
 test_import_export_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(GTK_CFLAGS) \
-       $(NM_CFLAGS) \
-       $(NMGTK_CFLAGS)
+       $(LIBNM_GLIB_CFLAGS) \
+       $(LIBNM_GTK_CFLAGS)
 
 test_import_export_LDADD = \
        $(GTHREAD_LIBS) \
        $(GTK_LIBS) \
-       $(NM_LIBS) \
-       $(NMGTK_LIBS) \
+       $(LIBNM_GLIB_LIBS) \
+       $(LIBNM_GTK_LIBS) \
        $(top_builddir)/properties/libnm-openvpn-properties-old.la
 
 if WITH_TESTS
diff --git a/src/Makefile.am b/src/Makefile.am
index b5ef6cf..d7b8e86 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
 AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
-       $(NM_CFLAGS) \
+       $(LIBNM_GLIB_CFLAGS) \
        -DBINDIR=\"$(bindir)\" \
        -DPREFIX=\""$(prefix)"\" \
        -DSYSCONFDIR=\""$(sysconfdir)"\" \
@@ -21,7 +21,7 @@ nm_openvpn_service_SOURCES = \
        nm-openvpn-service-defines.h
 
 nm_openvpn_service_LDADD = \
-       $(NM_LIBS) \
+       $(LIBNM_GLIB_LIBS) \
         $(top_builddir)/common/libnm-openvpn-common.la
 
 nm_openvpn_service_openvpn_helper_SOURCES = \
@@ -29,6 +29,6 @@ nm_openvpn_service_openvpn_helper_SOURCES = \
 
 nm_openvpn_service_openvpn_helper_LDADD = \
        $(DBUS_LIBS) \
-       $(NM_LIBS)
+       $(LIBNM_GLIB_LIBS)
 
 CLEANFILES = *~


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