1 diff --git a/configure.ac b/configure.ac
2 index f28480b..92a3e85 100644
5 @@ -674,15 +674,34 @@ AC_CHECK_FUNCS(setlocale)
7 # Checking for libgpg-error.
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)
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)
23 AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
24 [The default error source for GPGME.])
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)
34 + LIBASSUAN_CFLAGS="$LIBASSUAN_CFLAGS"
35 + LIBASSUAN_LIBS="$LIBASSUAN_LIBS"
36 + AC_SUBST(LIBASSUAN_CFLAGS)
37 + AC_SUBST(LIBASSUAN_LIBS)
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
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@