author | Mikael Berthe <mikael@lilotux.net> |
Fri, 14 Dec 2012 18:32:36 +0100 | |
changeset 2061 | f36d60bed54b |
parent 1048 | mcabber/macros/missing/gpgme.m4@a743eaa94d94 |
permissions | -rw-r--r-- |
1048
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
1 |
# gpgme.m4 - autoconf macro to detect GPGME. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
2 |
# Copyright (C) 2002, 2003, 2004 g10 Code GmbH |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
3 |
# |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
4 |
# This file is free software; as a special exception the author gives |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
5 |
# unlimited permission to copy and/or distribute it, with or without |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
6 |
# modifications, as long as this notice is preserved. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
7 |
# |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
8 |
# This file is distributed in the hope that it will be useful, but |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
9 |
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
10 |
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
11 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
12 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
13 |
AC_DEFUN([_AM_PATH_GPGME_CONFIG], |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
14 |
[ AC_ARG_WITH(gpgme-prefix, |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
15 |
AC_HELP_STRING([--with-gpgme-prefix=PFX], |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
16 |
[prefix where GPGME is installed (optional)]), |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
17 |
gpgme_config_prefix="$withval", gpgme_config_prefix="") |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
18 |
if test "x$gpgme_config_prefix" != x ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
19 |
GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
20 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
21 |
AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
22 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
23 |
if test "$GPGME_CONFIG" != "no" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
24 |
gpgme_version=`$GPGME_CONFIG --version` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
25 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
26 |
gpgme_version_major=`echo $gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
27 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
28 |
gpgme_version_minor=`echo $gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
29 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
30 |
gpgme_version_micro=`echo $gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
31 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
32 |
]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
33 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
34 |
dnl AM_PATH_GPGME([MINIMUM-VERSION, |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
35 |
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
36 |
dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
37 |
dnl |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
38 |
AC_DEFUN([AM_PATH_GPGME], |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
39 |
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
40 |
tmp=ifelse([$1], ,1:0.4.2,$1) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
41 |
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
42 |
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
43 |
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
44 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
45 |
req_gpgme_api=0 |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
46 |
min_gpgme_version="$tmp" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
47 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
48 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
49 |
AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
50 |
ok=no |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
51 |
if test "$GPGME_CONFIG" != "no" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
52 |
req_major=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
53 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
54 |
req_minor=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
55 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
56 |
req_micro=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
57 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
58 |
if test "$gpgme_version_major" -gt "$req_major"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
59 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
60 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
61 |
if test "$gpgme_version_major" -eq "$req_major"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
62 |
if test "$gpgme_version_minor" -gt "$req_minor"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
63 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
64 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
65 |
if test "$gpgme_version_minor" -eq "$req_minor"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
66 |
if test "$gpgme_version_micro" -ge "$req_micro"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
67 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
68 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
69 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
70 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
71 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
72 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
73 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
74 |
if test $ok = yes; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
75 |
# If we have a recent GPGME, we should also check that the |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
76 |
# API is compatible. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
77 |
if test "$req_gpgme_api" -gt 0 ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
78 |
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
79 |
if test "$tmp" -gt 0 ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
80 |
if test "$req_gpgme_api" -ne "$tmp" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
81 |
ok=no |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
82 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
83 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
84 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
85 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
86 |
if test $ok = yes; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
87 |
GPGME_CFLAGS=`$GPGME_CONFIG --cflags` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
88 |
GPGME_LIBS=`$GPGME_CONFIG --libs` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
89 |
AC_MSG_RESULT(yes) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
90 |
ifelse([$2], , :, [$2]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
91 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
92 |
GPGME_CFLAGS="" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
93 |
GPGME_LIBS="" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
94 |
AC_MSG_RESULT(no) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
95 |
ifelse([$3], , :, [$3]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
96 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
97 |
AC_SUBST(GPGME_CFLAGS) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
98 |
AC_SUBST(GPGME_LIBS) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
99 |
]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
100 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
101 |
dnl AM_PATH_GPGME_PTH([MINIMUM-VERSION, |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
102 |
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
103 |
dnl Test for libgpgme and define GPGME_PTH_CFLAGS and GPGME_PTH_LIBS. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
104 |
dnl |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
105 |
AC_DEFUN([AM_PATH_GPGME_PTH], |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
106 |
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
107 |
tmp=ifelse([$1], ,1:0.4.2,$1) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
108 |
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
109 |
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
110 |
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
111 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
112 |
req_gpgme_api=0 |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
113 |
min_gpgme_version="$tmp" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
114 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
115 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
116 |
AC_MSG_CHECKING(for GPGME Pth - version >= $min_gpgme_version) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
117 |
ok=no |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
118 |
if test "$GPGME_CONFIG" != "no" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
119 |
if `$GPGME_CONFIG --thread=pth 2> /dev/null` ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
120 |
req_major=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
121 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
122 |
req_minor=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
123 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
124 |
req_micro=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
125 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
126 |
if test "$gpgme_version_major" -gt "$req_major"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
127 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
128 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
129 |
if test "$gpgme_version_major" -eq "$req_major"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
130 |
if test "$gpgme_version_minor" -gt "$req_minor"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
131 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
132 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
133 |
if test "$gpgme_version_minor" -eq "$req_minor"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
134 |
if test "$gpgme_version_micro" -ge "$req_micro"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
135 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
136 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
137 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
138 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
139 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
140 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
141 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
142 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
143 |
if test $ok = yes; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
144 |
# If we have a recent GPGME, we should also check that the |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
145 |
# API is compatible. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
146 |
if test "$req_gpgme_api" -gt 0 ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
147 |
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
148 |
if test "$tmp" -gt 0 ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
149 |
if test "$req_gpgme_api" -ne "$tmp" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
150 |
ok=no |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
151 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
152 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
153 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
154 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
155 |
if test $ok = yes; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
156 |
GPGME_PTH_CFLAGS=`$GPGME_CONFIG --thread=pth --cflags` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
157 |
GPGME_PTH_LIBS=`$GPGME_CONFIG --thread=pth --libs` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
158 |
AC_MSG_RESULT(yes) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
159 |
ifelse([$2], , :, [$2]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
160 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
161 |
GPGME_PTH_CFLAGS="" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
162 |
GPGME_PTH_LIBS="" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
163 |
AC_MSG_RESULT(no) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
164 |
ifelse([$3], , :, [$3]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
165 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
166 |
AC_SUBST(GPGME_PTH_CFLAGS) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
167 |
AC_SUBST(GPGME_PTH_LIBS) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
168 |
]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
169 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
170 |
dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION, |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
171 |
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
172 |
dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
173 |
dnl and GPGME_PTHREAD_LIBS. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
174 |
dnl |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
175 |
AC_DEFUN([AM_PATH_GPGME_PTHREAD], |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
176 |
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
177 |
tmp=ifelse([$1], ,1:0.4.2,$1) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
178 |
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
179 |
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
180 |
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
181 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
182 |
req_gpgme_api=0 |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
183 |
min_gpgme_version="$tmp" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
184 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
185 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
186 |
AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
187 |
ok=no |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
188 |
if test "$GPGME_CONFIG" != "no" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
189 |
if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
190 |
req_major=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
191 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
192 |
req_minor=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
193 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
194 |
req_micro=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
195 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
196 |
if test "$gpgme_version_major" -gt "$req_major"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
197 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
198 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
199 |
if test "$gpgme_version_major" -eq "$req_major"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
200 |
if test "$gpgme_version_minor" -gt "$req_minor"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
201 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
202 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
203 |
if test "$gpgme_version_minor" -eq "$req_minor"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
204 |
if test "$gpgme_version_micro" -ge "$req_micro"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
205 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
206 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
207 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
208 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
209 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
210 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
211 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
212 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
213 |
if test $ok = yes; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
214 |
# If we have a recent GPGME, we should also check that the |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
215 |
# API is compatible. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
216 |
if test "$req_gpgme_api" -gt 0 ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
217 |
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
218 |
if test "$tmp" -gt 0 ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
219 |
if test "$req_gpgme_api" -ne "$tmp" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
220 |
ok=no |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
221 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
222 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
223 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
224 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
225 |
if test $ok = yes; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
226 |
GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
227 |
GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
228 |
AC_MSG_RESULT(yes) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
229 |
ifelse([$2], , :, [$2]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
230 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
231 |
GPGME_PTHREAD_CFLAGS="" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
232 |
GPGME_PTHREAD_LIBS="" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
233 |
AC_MSG_RESULT(no) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
234 |
ifelse([$3], , :, [$3]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
235 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
236 |
AC_SUBST(GPGME_PTHREAD_CFLAGS) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
237 |
AC_SUBST(GPGME_PTHREAD_LIBS) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
238 |
]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
239 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
240 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
241 |
dnl AM_PATH_GPGME_GLIB([MINIMUM-VERSION, |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
242 |
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
243 |
dnl Test for libgpgme-glib and define GPGME_GLIB_CFLAGS and GPGME_GLIB_LIBS. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
244 |
dnl |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
245 |
AC_DEFUN([AM_PATH_GPGME_GLIB], |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
246 |
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
247 |
tmp=ifelse([$1], ,1:0.4.2,$1) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
248 |
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
249 |
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
250 |
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
251 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
252 |
req_gpgme_api=0 |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
253 |
min_gpgme_version="$tmp" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
254 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
255 |
|
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
256 |
AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
257 |
ok=no |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
258 |
if test "$GPGME_CONFIG" != "no" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
259 |
req_major=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
260 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
261 |
req_minor=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
262 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
263 |
req_micro=`echo $min_gpgme_version | \ |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
264 |
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
265 |
if test "$gpgme_version_major" -gt "$req_major"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
266 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
267 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
268 |
if test "$gpgme_version_major" -eq "$req_major"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
269 |
if test "$gpgme_version_minor" -gt "$req_minor"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
270 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
271 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
272 |
if test "$gpgme_version_minor" -eq "$req_minor"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
273 |
if test "$gpgme_version_micro" -ge "$req_micro"; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
274 |
ok=yes |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
275 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
276 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
277 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
278 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
279 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
280 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
281 |
if test $ok = yes; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
282 |
# If we have a recent GPGME, we should also check that the |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
283 |
# API is compatible. |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
284 |
if test "$req_gpgme_api" -gt 0 ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
285 |
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
286 |
if test "$tmp" -gt 0 ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
287 |
if test "$req_gpgme_api" -ne "$tmp" ; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
288 |
ok=no |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
289 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
290 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
291 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
292 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
293 |
if test $ok = yes; then |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
294 |
GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
295 |
GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs` |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
296 |
AC_MSG_RESULT(yes) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
297 |
ifelse([$2], , :, [$2]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
298 |
else |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
299 |
GPGME_GLIB_CFLAGS="" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
300 |
GPGME_GLIB_LIBS="" |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
301 |
AC_MSG_RESULT(no) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
302 |
ifelse([$3], , :, [$3]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
303 |
fi |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
304 |
AC_SUBST(GPGME_GLIB_CFLAGS) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
305 |
AC_SUBST(GPGME_GLIB_LIBS) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
306 |
]) |
a743eaa94d94
Add a copy of gpgme.m4, just in case
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
307 |