From c89e36a665fa350dc1ca2b2795ed166243ee0910 Mon Sep 17 00:00:00 2001 From: sehraf Date: Fri, 4 May 2018 20:52:31 +0200 Subject: [PATCH] add auto selection of libsecret with fallback to libgnome-keyring --- retroshare.pri | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/retroshare.pri b/retroshare.pri index 440cceba9..6f2b371ee 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -340,11 +340,17 @@ linux-* { QMAKE_LIBDIR *= "$$RS_LIB_DIR" rs_autologin { - #DEFINES *= HAS_GNOME_KEYRING - #PKGCONFIG *= gnome-keyring-1 - - DEFINES *= HAS_LIBSECRET - PKGCONFIG *= libsecret-1 + # try libsecret first since it is not limited to gnome keyring and libgnome-keyring is deprecated + LIBSECRET_AVAILABLE = $$system(pkg-config --exists libsecret-1 && echo yes) + isEmpty(LIBSECRET_AVAILABLE) { + message("using libgnome-keyring for auto login") + DEFINES *= HAS_GNOME_KEYRING + PKGCONFIG *= gnome-keyring-1 + } else { + message("using libsecret for auto login") + DEFINES *= HAS_LIBSECRET + PKGCONFIG *= libsecret-1 + } } }