Debian Codegraph @

debian/patches/05-delete-outdated-libgcrypt.m4.diff

raw symbols SCIP
1 Description: Delete outdated local copy of libgcrypt.m4 which relies on libgcrypt-config.
2 Author: Andreas Metzler <[email protected]>
3 Bug-Debian: https://bugs.debian.org/1071951
4 Last-Update: 2024-07-07
5
6 --- a/m4/libgcrypt.m4
7 +++ /dev/null
8 @@ -1,167 +0,0 @@
9 -# libgcrypt.m4 - Autoconf macros to detect libgcrypt
10 -# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020 g10 Code GmbH
11 -#
12 -# This file is free software; as a special exception the author gives
13 -# unlimited permission to copy and/or distribute it, with or without
14 -# modifications, as long as this notice is preserved.
15 -#
16 -# This file is distributed in the hope that it will be useful, but
17 -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
18 -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 -#
20 -# Last-changed: 2020-09-27
21 -
22 -
23 -dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
24 -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
25 -dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
26 -dnl MINIMUM-VERSION is a string with the version number optionally prefixed
27 -dnl with the API version to also check the API compatibility. Example:
28 -dnl a MINIMUM-VERSION of 1:1.2.5 won't pass the test unless the installed
29 -dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
30 -dnl this features allows to prevent build against newer versions of libgcrypt
31 -dnl with a changed API.
32 -dnl
33 -dnl If a prefix option is not used, the config script is first
34 -dnl searched in $SYSROOT/bin and then along $PATH. If the used
35 -dnl config script does not match the host specification the script
36 -dnl is added to the gpg_config_script_warn variable.
37 -dnl
38 -AC_DEFUN([AM_PATH_LIBGCRYPT],
39 -[ AC_REQUIRE([AC_CANONICAL_HOST])
40 - AC_ARG_WITH(libgcrypt-prefix,
41 - AS_HELP_STRING([--with-libgcrypt-prefix=PFX],
42 - [prefix where LIBGCRYPT is installed (optional)]),
43 - libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
44 - if test x"${LIBGCRYPT_CONFIG}" = x ; then
45 - if test x"${libgcrypt_config_prefix}" != x ; then
46 - LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
47 - fi
48 - fi
49 -
50 - use_gpgrt_config=""
51 - if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
52 - if $GPGRT_CONFIG libgcrypt --exists; then
53 - LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt"
54 - AC_MSG_NOTICE([Use gpgrt-config as libgcrypt-config])
55 - use_gpgrt_config=yes
56 - fi
57 - fi
58 - if test -z "$use_gpgrt_config"; then
59 - if test x"${LIBGCRYPT_CONFIG}" = x ; then
60 - case "${SYSROOT}" in
61 - /*)
62 - if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
63 - LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
64 - fi
65 - ;;
66 - '')
67 - ;;
68 - *)
69 - AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
70 - ;;
71 - esac
72 - fi
73 - AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
74 - fi
75 -
76 - tmp=ifelse([$1], ,1:1.2.0,$1)
77 - if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
78 - req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
79 - min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
80 - else
81 - req_libgcrypt_api=0
82 - min_libgcrypt_version="$tmp"
83 - fi
84 -
85 - AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
86 - ok=no
87 - if test "$LIBGCRYPT_CONFIG" != "no" ; then
88 - req_major=`echo $min_libgcrypt_version | \
89 - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
90 - req_minor=`echo $min_libgcrypt_version | \
91 - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
92 - req_micro=`echo $min_libgcrypt_version | \
93 - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
94 - if test -z "$use_gpgrt_config"; then
95 - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
96 - else
97 - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion`
98 - fi
99 - major=`echo $libgcrypt_config_version | \
100 - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
101 - minor=`echo $libgcrypt_config_version | \
102 - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
103 - micro=`echo $libgcrypt_config_version | \
104 - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
105 - if test "$major" -gt "$req_major"; then
106 - ok=yes
107 - else
108 - if test "$major" -eq "$req_major"; then
109 - if test "$minor" -gt "$req_minor"; then
110 - ok=yes
111 - else
112 - if test "$minor" -eq "$req_minor"; then
113 - if test "$micro" -ge "$req_micro"; then
114 - ok=yes
115 - fi
116 - fi
117 - fi
118 - fi
119 - fi
120 - fi
121 - if test $ok = yes; then
122 - AC_MSG_RESULT([yes ($libgcrypt_config_version)])
123 - else
124 - AC_MSG_RESULT(no)
125 - fi
126 - if test $ok = yes; then
127 - # If we have a recent libgcrypt, we should also check that the
128 - # API is compatible
129 - if test "$req_libgcrypt_api" -gt 0 ; then
130 - if test -z "$use_gpgrt_config"; then
131 - tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
132 - else
133 - tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0`
134 - fi
135 - if test "$tmp" -gt 0 ; then
136 - AC_MSG_CHECKING([LIBGCRYPT API version])
137 - if test "$req_libgcrypt_api" -eq "$tmp" ; then
138 - AC_MSG_RESULT([okay])
139 - else
140 - ok=no
141 - AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
142 - fi
143 - fi
144 - fi
145 - fi
146 - if test $ok = yes; then
147 - LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
148 - LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
149 - ifelse([$2], , :, [$2])
150 - if test -z "$use_gpgrt_config"; then
151 - libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
152 - else
153 - libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none`
154 - fi
155 - if test x"$libgcrypt_config_host" != xnone ; then
156 - if test x"$libgcrypt_config_host" != x"$host" ; then
157 - AC_MSG_WARN([[
158 -***
159 -*** The config script "$LIBGCRYPT_CONFIG" was
160 -*** built for $libgcrypt_config_host and thus may not match the
161 -*** used host $host.
162 -*** You may want to use the configure option --with-libgcrypt-prefix
163 -*** to specify a matching config script or use \$SYSROOT.
164 -***]])
165 - gpg_config_script_warn="$gpg_config_script_warn libgcrypt"
166 - fi
167 - fi
168 - else
169 - LIBGCRYPT_CFLAGS=""
170 - LIBGCRYPT_LIBS=""
171 - ifelse([$3], , :, [$3])
172 - fi
173 - AC_SUBST(LIBGCRYPT_CFLAGS)
174 - AC_SUBST(LIBGCRYPT_LIBS)
175 -])