summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNP-Hardass <[email protected]>2020-08-03 01:46:00 -0400
committerraveit65 <[email protected]>2020-10-20 10:34:23 +0200
commit8a2b582dbec78dfb2d60170c691af2948e55a960 (patch)
treec2d243b27f3bac8e1067b28692014b7590ebb601 /configure.ac
parent54ce429fd89c0a7a09481637219945616b255ac1 (diff)
downloadmate-power-manager-8a2b582dbec78dfb2d60170c691af2948e55a960.tar.bz2
mate-power-manager-8a2b582dbec78dfb2d60170c691af2948e55a960.tar.xz
Add autotools support for libsecret
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1db3932..b4758dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,7 @@ GLIB_REQUIRED=2.50.0
GIO_REQUIRED=2.50.0
GDK_REQUIRED=3.22.0
GTK_REQUIRED=3.22.0
+LIBSECRET_REQUIRED=0.11
GNOME_KEYRING_REQUIRED=3.0.0
DBUS_REQUIRED=1.0
DBUS_GLIB_REQUIRED=0.70
@@ -135,6 +136,22 @@ fi
AM_CONDITIONAL([HAVE_TESTS], [test $have_tests = yes])
dnl ---------------------------------------------------------------------------
+dnl - Build libsecret support
+dnl ---------------------------------------------------------------------------
+AC_ARG_WITH(libsecret,
+ [AS_HELP_STRING([--with-libsecret],
+ [Enable the use of libsecret])],
+ [],
+ [with_libsecret=no])
+
+AM_CONDITIONAL([WITH_LIBSECRET],[test "$with_libsecret" = "yes"])
+
+if test "$with_libsecret" = "yes"; then
+ PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= $LIBSECRET_REQUIRED)
+ AC_DEFINE([WITH_LIBSECRET],[1],[Define if LIBSECRET support is enabled])
+fi
+
+dnl ---------------------------------------------------------------------------
dnl - Build gnome-keyring support
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(keyring,
@@ -150,6 +167,10 @@ if test "$with_keyring" = "yes"; then
AC_DEFINE([WITH_KEYRING],[1],[Define if KEYRING support is enabled])
fi
+if test "$with_libsecret" = "yes" -a "$with_keyring" = "yes"; then
+ AC_MSG_ERROR([Please select only 1, keyring or libsecret])
+fi
+
dnl ---------------------------------------------------------------------------
dnl - Build applets
dnl ---------------------------------------------------------------------------
@@ -222,6 +243,7 @@ echo "
compiler: ${CC}
cflags: ${CFLAGS}
cwarnings: ${WARN_CFLAGS}
+ libsecret support: ${with_libsecret}
gnome-keyring support: ${with_keyring}
Building extra applets: ${enable_applets}
Self test support: ${have_tests}