summaryrefslogtreecommitdiff
path: root/external/gpgmepp/find-libgpg-error-libassuan.patch
blob: 699136cfb066b3dc2289c185312ab0e7fc6405a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
diff --git a/configure.ac b/configure.ac
index f28480b..92a3e85 100644
--- configure.ac
+++ configure.ac
@@ -674,15 +674,34 @@ AC_CHECK_FUNCS(setlocale)
 
 # Checking for libgpg-error.
 have_gpg_error=no
-AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
-                  have_gpg_error=yes, have_gpg_error=no)
+if test "x${GPG_ERROR_CFLAGS}" = x; then
+  AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
+                have_gpg_error=yes, have_gpg_error=no)
+else
+  have_gpg_error=yes
+  GPG_ERROR_CFLAGS="$GPG_ERROR_CFLAGS"
+  GPG_ERROR_LIBS="$GPG_ERROR_LIBS"
+  AC_SUBST(GPG_ERROR_CFLAGS)
+  AC_SUBST(GPG_ERROR_LIBS)
+
+fi
+
 AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
           [The default error source for GPGME.])
 
 # And for libassuan.
 have_libassuan=no
-AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
+if test "x${LIBASSUAN_CFLAGS}" = x; then
+  AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
                   have_libassuan=yes, have_libassuan=no)
+else
+  have_libassuan=yes
+  LIBASSUAN_CFLAGS="$LIBASSUAN_CFLAGS"
+  LIBASSUAN_LIBS="$LIBASSUAN_LIBS"
+  AC_SUBST(LIBASSUAN_CFLAGS)
+  AC_SUBST(LIBASSUAN_LIBS)
+fi
+
 if test "$have_libassuan" = "yes"; then
   AC_DEFINE_UNQUOTED(GPGME_LIBASSUAN_VERSION, "$libassuan_version",
                      [version of the libassuan library])
diff --git a/src/Makefile.am b/src/Makefile.am
index ce6f1d4..6b1d835 100644
--- src/Makefile.am
+++ src/Makefile.am
@@ -26,7 +26,7 @@
 m4data_DATA = gpgme.m4
 nodist_include_HEADERS = gpgme.h
 
-bin_PROGRAMS = gpgme-tool gpgme-json
+bin_PROGRAMS = gpgme-tool
 
 if BUILD_W32_GLIB
 ltlib_gpgme_glib = libgpgme-glib.la
@@ -97,13 +97,10 @@
 
 # We use a global CFLAGS setting for all libraries
 # versions, because then every object file is only compiled once.
-AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@
+AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GPG_ERROR_CFLAGS@ @GLIB_CFLAGS@
 
 gpgme_tool_SOURCES = gpgme-tool.c argparse.c argparse.h
-gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@
-
-gpgme_json_SOURCES = gpgme-json.c cJSON.c cJSON.h
-gpgme_json_LDADD = -lm libgpgme.la $(GPG_ERROR_LIBS)
+gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@
 
 
 if HAVE_W32_SYSTEM
--- lang/cpp/tests/Makefile.am	2020-06-20 00:43:49.213657887 +0200
+++ lang/cpp/tests/Makefile.am~	2019-01-25 13:27:34.000000000 +0100
@@ -21,7 +21,7 @@
 AM_LDFLAGS = -no-install
 
 LDADD = ../../cpp/src/libgpgmepp.la \
+        ../../../src/libgpgme.la @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@ \
-        ../../../src/libgpgme.la @GPG_ERROR_LIBS@ \
         @LDADD_FOR_TESTS_KLUDGE@ -lstdc++
 
 AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
--- lang/cpp/tests/Makefile.in	2020-06-20 00:44:49.542344510 +0200
+++ lang/cpp/tests/Makefile.in~	2020-06-13 00:55:19.021212970 +0200
@@ -415,7 +415,7 @@
 top_srcdir = @top_srcdir@
 AM_LDFLAGS = -no-install
 LDADD = ../../cpp/src/libgpgmepp.la \
+        ../../../src/libgpgme.la @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@ \
-        ../../../src/libgpgme.la @GPG_ERROR_LIBS@ \
         @LDADD_FOR_TESTS_KLUDGE@ -lstdc++
 
 AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \