From aceba1e1af7ba63d29f35022741d3c764df63983 Mon Sep 17 00:00:00 2001 From: Katarina Behrens Date: Fri, 10 Feb 2017 16:30:51 +0100 Subject: gpg4libre: We want to use C++ library instead in particular, the one from gpgme project. configure check is set up in such a way that it will fail with older gpgmepp that depends on KDE development packages. This means Linux distros released before 2016 have to rely upon in-tree version, but such is life ... Change-Id: I5cdceffad6e81643603fcdee57a7656218f76834 Reviewed-on: https://gerrit.libreoffice.org/34130 Tested-by: Jenkins Reviewed-by: Siegmund Gorr Reviewed-by: Thorsten Behrens --- configure.ac | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index df4b75c84728..d7532cbb9e3d 100644 --- a/configure.ac +++ b/configure.ac @@ -1759,10 +1759,10 @@ AC_ARG_WITH(system-poppler, [Use system poppler (only needed for PDF import).]),, [with_system_poppler="$with_system_libs"]) -AC_ARG_WITH(system-gpgme, - AS_HELP_STRING([--with-system-gpgme], +AC_ARG_WITH(system-gpgmepp, + AS_HELP_STRING([--with-system-gpgmepp], [Use gpgme already on system]),, - [with_system_gpgme="$with_system_libs"]) + [with_system_gpgmepp="$with_system_libs"]) AC_ARG_WITH(system-apache-commons, AS_HELP_STRING([--with-system-apache-commons], @@ -10444,25 +10444,24 @@ else fi AC_SUBST(ENABLE_PDFIUM) -SYSTEM_GPGME= +SYSTEM_GPGMEPP= if test "$_os" = "Linux"; then dnl =================================================================== dnl Check for system gpgme dnl =================================================================== - AC_MSG_CHECKING([which gpgme to use]) - if test "$with_system_gpgme" = "yes"; then + AC_MSG_CHECKING([which gpgmepp to use]) + if test "$with_system_gpgmepp" = "yes"; then AC_MSG_RESULT([external]) - SYSTEM_GPGME=TRUE + SYSTEM_GPGMEPP=TRUE - AC_PATH_PROG(GPGMECONFIG, gpgme-config) - if test -z "$GPGMECONFIG"; then - AC_MSG_ERROR([--with-system-gpgme requested, but gpgme programs not found]) - fi - - GPGME_CFLAGS=`$GPGMECONFIG --cflags` - GPGME_LIBS=`$GPGMECONFIG --libs` + # C++ library doesn't come with fancy gpgmepp-config, check for headers the old-fashioned way + AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ], + [AC_MSG_ERROR(gpgmepp headers not found, install gpgmepp development package)], []) + # progress_callback is the only func with plain C linkage + # checking for it also filters out older, KDE-dependent libgpgmepp versions + AC_CHECK_LIB(gpgmepp, progress_callback, [ GPGMEPP_LIBS=-lgpgmepp ], + [AC_MSG_ERROR(gpgmepp not found or not functional)], []) else -# This is work in progress, please DO NOT MODIFY OR REMOVE AC_MSG_RESULT([internal]) BUILD_TYPE="$BUILD_TYPE LIBGPGERROR LIBASSUAN GPGME" @@ -10477,8 +10476,8 @@ AC_SUBST(GPG_ERROR_CFLAGS) AC_SUBST(GPG_ERROR_LIBS) AC_SUBST(LIBASSUAN_CFLAGS) AC_SUBST(LIBASSUAN_LIBS) -AC_SUBST(GPGME_CFLAGS) -AC_SUBST(GPGME_LIBS) +AC_SUBST(GPGMEPP_CFLAGS) +AC_SUBST(GPGMEPP_LIBS) AC_MSG_CHECKING([whether to build the Wiki Publisher extension]) if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then -- cgit