Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / external / gpgmepp / find-libgpg-error-libassuan.patch
blob2ddd4d2f2e62698b3ea8f63cb6d9a495baa0f143
1 diff --git a/configure.ac b/configure.ac
2 index f28480b..92a3e85 100644
3 --- configure.ac
4 +++ configure.ac
5 @@ -674,15 +674,34 @@ AC_CHECK_FUNCS(setlocale)
7 # Checking for libgpg-error.
8 have_gpg_error=no
9 -AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
10 - have_gpg_error=yes, have_gpg_error=no)
11 +if test "x${GPG_ERROR_CFLAGS}" = x; then
12 + AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
13 + have_gpg_error=yes, have_gpg_error=no)
14 +else
15 + have_gpg_error=yes
16 + GPG_ERROR_CFLAGS="$GPG_ERROR_CFLAGS"
17 + GPG_ERROR_LIBS="$GPG_ERROR_LIBS"
18 + AC_SUBST(GPG_ERROR_CFLAGS)
19 + AC_SUBST(GPG_ERROR_LIBS)
21 +fi
23 AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
24 [The default error source for GPGME.])
26 # And for libassuan.
27 have_libassuan=no
28 -AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
29 +if test "x${LIBASSUAN_CFLAGS}" = x; then
30 + AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
31 have_libassuan=yes, have_libassuan=no)
32 +else
33 + have_libassuan=yes
34 + LIBASSUAN_CFLAGS="$LIBASSUAN_CFLAGS"
35 + LIBASSUAN_LIBS="$LIBASSUAN_LIBS"
36 + AC_SUBST(LIBASSUAN_CFLAGS)
37 + AC_SUBST(LIBASSUAN_LIBS)
38 +fi
40 if test "$have_libassuan" = "yes"; then
41 AC_DEFINE_UNQUOTED(GPGME_LIBASSUAN_VERSION, "$libassuan_version",
42 [version of the libassuan library])
43 diff --git a/src/Makefile.am b/src/Makefile.am
44 index ce6f1d4..6b1d835 100644
45 --- src/Makefile.am
46 +++ src/Makefile.am
47 @@ -97,10 +97,10 @@ endif
49 # We use a global CFLAGS setting for all library
50 # versions, because then every object file is only compiled once.
51 -AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@
52 +AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GPG_ERROR_CFLAGS@ @GLIB_CFLAGS@
54 gpgme_tool_SOURCES = gpgme-tool.c argparse.c argparse.h
55 -gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@
56 +gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@
59 if HAVE_W32_SYSTEM