diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/configure.ac')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/configure.ac | 1686 |
1 files changed, 843 insertions, 843 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/configure.ac b/linden/indra/libgcrypt/libgcrypt-1.2.2/configure.ac index dab5e54..4f58e31 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/configure.ac +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/configure.ac | |||
@@ -1,843 +1,843 @@ | |||
1 | # Configure.ac script for Libgcrypt | 1 | # Configure.ac script for Libgcrypt |
2 | # Copyright (C) 1998, 1999, 2000, 2001, 2002 | 2 | # Copyright (C) 1998, 1999, 2000, 2001, 2002 |
3 | # 2003, 2004 Free Software Foundation, Inc. | 3 | # 2003, 2004 Free Software Foundation, Inc. |
4 | # | 4 | # |
5 | # This file is part of Libgcrypt. | 5 | # This file is part of Libgcrypt. |
6 | # | 6 | # |
7 | # Libgcrypt is free software; you can redistribute it and/or modify | 7 | # Libgcrypt is free software; you can redistribute it and/or modify |
8 | # it under the terms of the GNU Lesser general Public License as | 8 | # it under the terms of the GNU Lesser general Public License as |
9 | # published by the Free Software Foundation; either version 2.1 of | 9 | # published by the Free Software Foundation; either version 2.1 of |
10 | # the License, or (at your option) any later version. | 10 | # the License, or (at your option) any later version. |
11 | # | 11 | # |
12 | # Libgcrypt is distributed in the hope that it will be useful, | 12 | # Libgcrypt is distributed in the hope that it will be useful, |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | # GNU Lesser General Public License for more details. | 15 | # GNU Lesser General Public License for more details. |
16 | # | 16 | # |
17 | # You should have received a copy of the GNU Lesser General Public | 17 | # You should have received a copy of the GNU Lesser General Public |
18 | # License along with this program; if not, write to the Free Software | 18 | # License along with this program; if not, write to the Free Software |
19 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 19 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
20 | # | 20 | # |
21 | # (Process this file with autoconf to produce a configure script.) | 21 | # (Process this file with autoconf to produce a configure script.) |
22 | AC_REVISION($Revision: 1119 $) | 22 | AC_REVISION($Revision: 1119 $) |
23 | AC_PREREQ(2.59) | 23 | AC_PREREQ(2.59) |
24 | min_automake_version="1.9.3" | 24 | min_automake_version="1.9.3" |
25 | 25 | ||
26 | # Version number: Remember to change it immediately *after* a release | 26 | # Version number: Remember to change it immediately *after* a release |
27 | # but remove a "-cvs" prefix right *before* a release and append it | 27 | # but remove a "-cvs" prefix right *before* a release and append it |
28 | # soon later. | 28 | # soon later. |
29 | 29 | ||
30 | AC_INIT(libgcrypt, 1.2.2, bug-libgcrypt@gnupg.org) | 30 | AC_INIT(libgcrypt, 1.2.2, bug-libgcrypt@gnupg.org) |
31 | 31 | ||
32 | # LT Version numbers, remember to change them just *before* a release. | 32 | # LT Version numbers, remember to change them just *before* a release. |
33 | # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) | 33 | # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) |
34 | # (Interfaces added: CURRENT++, AGE++, REVISION=0) | 34 | # (Interfaces added: CURRENT++, AGE++, REVISION=0) |
35 | # (No interfaces changed: REVISION++) | 35 | # (No interfaces changed: REVISION++) |
36 | LIBGCRYPT_LT_CURRENT=13 | 36 | LIBGCRYPT_LT_CURRENT=13 |
37 | LIBGCRYPT_LT_AGE=2 | 37 | LIBGCRYPT_LT_AGE=2 |
38 | LIBGCRYPT_LT_REVISION=1 | 38 | LIBGCRYPT_LT_REVISION=1 |
39 | 39 | ||
40 | # If the API is changed in an incompatible way: increment the next counter. | 40 | # If the API is changed in an incompatible way: increment the next counter. |
41 | LIBGCRYPT_CONFIG_API_VERSION=1 | 41 | LIBGCRYPT_CONFIG_API_VERSION=1 |
42 | 42 | ||
43 | NEED_GPG_ERROR_VERSION=0.5 | 43 | NEED_GPG_ERROR_VERSION=0.5 |
44 | 44 | ||
45 | 45 | ||
46 | PACKAGE=$PACKAGE_NAME | 46 | PACKAGE=$PACKAGE_NAME |
47 | VERSION=$PACKAGE_VERSION | 47 | VERSION=$PACKAGE_VERSION |
48 | 48 | ||
49 | AC_CONFIG_SRCDIR([src/gcrypt.h]) | 49 | AC_CONFIG_SRCDIR([src/gcrypt.h]) |
50 | AC_CANONICAL_TARGET() | 50 | AC_CANONICAL_TARGET() |
51 | AM_INIT_AUTOMAKE($PACKAGE, $VERSION) | 51 | AM_INIT_AUTOMAKE($PACKAGE, $VERSION) |
52 | AM_CONFIG_HEADER(config.h) | 52 | AM_CONFIG_HEADER(config.h) |
53 | AM_MAINTAINER_MODE | 53 | AM_MAINTAINER_MODE |
54 | 54 | ||
55 | AH_TOP([ | 55 | AH_TOP([ |
56 | /* need this, because some autoconf tests rely on this (e.g. stpcpy) | 56 | /* need this, because some autoconf tests rely on this (e.g. stpcpy) |
57 | * and it should be used for new programs */ | 57 | * and it should be used for new programs */ |
58 | #define _GNU_SOURCE 1 | 58 | #define _GNU_SOURCE 1 |
59 | ]) | 59 | ]) |
60 | 60 | ||
61 | AH_BOTTOM([ | 61 | AH_BOTTOM([ |
62 | #define _GCRYPT_IN_LIBGCRYPT 1 | 62 | #define _GCRYPT_IN_LIBGCRYPT 1 |
63 | ]) | 63 | ]) |
64 | 64 | ||
65 | AH_VERBATIM([_REENTRANT], | 65 | AH_VERBATIM([_REENTRANT], |
66 | [/* To allow the use of Libgcrypt in multithreaded programs we have to use | 66 | [/* To allow the use of Libgcrypt in multithreaded programs we have to use |
67 | special features from the library. */ | 67 | special features from the library. */ |
68 | #ifndef _REENTRANT | 68 | #ifndef _REENTRANT |
69 | # define _REENTRANT 1 | 69 | # define _REENTRANT 1 |
70 | #endif | 70 | #endif |
71 | ]) | 71 | ]) |
72 | 72 | ||
73 | AC_SUBST(LIBGCRYPT_LT_CURRENT) | 73 | AC_SUBST(LIBGCRYPT_LT_CURRENT) |
74 | AC_SUBST(LIBGCRYPT_LT_AGE) | 74 | AC_SUBST(LIBGCRYPT_LT_AGE) |
75 | AC_SUBST(LIBGCRYPT_LT_REVISION) | 75 | AC_SUBST(LIBGCRYPT_LT_REVISION) |
76 | AC_SUBST(PACKAGE) | 76 | AC_SUBST(PACKAGE) |
77 | AC_SUBST(VERSION) | 77 | AC_SUBST(VERSION) |
78 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) | 78 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) |
79 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) | 79 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) |
80 | 80 | ||
81 | 81 | ||
82 | AC_PROG_MAKE_SET | 82 | AC_PROG_MAKE_SET |
83 | missing_dir=`cd $ac_aux_dir && pwd` | 83 | missing_dir=`cd $ac_aux_dir && pwd` |
84 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) | 84 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
85 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) | 85 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
86 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) | 86 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
87 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) | 87 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
88 | # AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) | 88 | # AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
89 | AC_PROG_CC | 89 | AC_PROG_CC |
90 | AC_PROG_CPP | 90 | AC_PROG_CPP |
91 | AM_PROG_AS | 91 | AM_PROG_AS |
92 | AC_ISC_POSIX | 92 | AC_ISC_POSIX |
93 | AC_PROG_INSTALL | 93 | AC_PROG_INSTALL |
94 | AC_PROG_AWK | 94 | AC_PROG_AWK |
95 | 95 | ||
96 | AM_PROG_LIBTOOL | 96 | AM_PROG_LIBTOOL |
97 | 97 | ||
98 | ########################## | 98 | ########################## |
99 | ## General definitions. ## | 99 | ## General definitions. ## |
100 | ########################## | 100 | ########################## |
101 | 101 | ||
102 | # Used by libgcrypt-config | 102 | # Used by libgcrypt-config |
103 | LIBGCRYPT_CONFIG_LIBS="-lgcrypt" | 103 | LIBGCRYPT_CONFIG_LIBS="-lgcrypt" |
104 | LIBGCRYPT_CONFIG_CFLAGS="" | 104 | LIBGCRYPT_CONFIG_CFLAGS="" |
105 | 105 | ||
106 | # Definitions for symmetric ciphers. | 106 | # Definitions for symmetric ciphers. |
107 | available_ciphers="arcfour blowfish cast5 des aes twofish serpent rfc2268" | 107 | available_ciphers="arcfour blowfish cast5 des aes twofish serpent rfc2268" |
108 | enabled_ciphers="" | 108 | enabled_ciphers="" |
109 | 109 | ||
110 | # Definitions for public-key ciphers. | 110 | # Definitions for public-key ciphers. |
111 | available_pubkey_ciphers="dsa elgamal rsa" | 111 | available_pubkey_ciphers="dsa elgamal rsa" |
112 | enabled_pubkey_ciphers="" | 112 | enabled_pubkey_ciphers="" |
113 | 113 | ||
114 | # Definitions for message digests. | 114 | # Definitions for message digests. |
115 | available_digests="crc md4 md5 rmd160 sha1 sha256" | 115 | available_digests="crc md4 md5 rmd160 sha1 sha256" |
116 | available_digests_64="sha512 tiger" | 116 | available_digests_64="sha512 tiger" |
117 | enabled_digests="" | 117 | enabled_digests="" |
118 | 118 | ||
119 | # Definitions for random modules. | 119 | # Definitions for random modules. |
120 | available_random_modules="linux egd unix" | 120 | available_random_modules="linux egd unix" |
121 | auto_random_modules="$available_random_modules" | 121 | auto_random_modules="$available_random_modules" |
122 | 122 | ||
123 | # Supported thread backends. | 123 | # Supported thread backends. |
124 | LIBGCRYPT_THREAD_MODULES="" | 124 | LIBGCRYPT_THREAD_MODULES="" |
125 | 125 | ||
126 | # Other definitions. | 126 | # Other definitions. |
127 | print_egd_notice=no | 127 | print_egd_notice=no |
128 | 128 | ||
129 | # Setup some stuff depending on host/target. | 129 | # Setup some stuff depending on host/target. |
130 | case "${target}" in | 130 | case "${target}" in |
131 | *-*-mingw32*) | 131 | *-*-mingw32*) |
132 | available_random_modules="w32" | 132 | available_random_modules="w32" |
133 | ac_cv_have_dev_random=no | 133 | ac_cv_have_dev_random=no |
134 | AC_DEFINE(USE_ONLY_8DOT3,1, | 134 | AC_DEFINE(USE_ONLY_8DOT3,1, |
135 | [set this to limit filenames to the 8.3 format]) | 135 | [set this to limit filenames to the 8.3 format]) |
136 | AC_DEFINE(HAVE_DRIVE_LETTERS,1, | 136 | AC_DEFINE(HAVE_DRIVE_LETTERS,1, |
137 | [defined if we must run on a stupid file system]) | 137 | [defined if we must run on a stupid file system]) |
138 | AC_DEFINE(HAVE_DOSISH_SYSTEM,1, | 138 | AC_DEFINE(HAVE_DOSISH_SYSTEM,1, |
139 | [defined if we run on some of the PCDOS like systems | 139 | [defined if we run on some of the PCDOS like systems |
140 | (DOS, Windoze. OS/2) with special properties like | 140 | (DOS, Windoze. OS/2) with special properties like |
141 | no file modes]) | 141 | no file modes]) |
142 | ;; | 142 | ;; |
143 | 143 | ||
144 | i?86-emx-os2 | i?86-*-os2*emx) | 144 | i?86-emx-os2 | i?86-*-os2*emx) |
145 | # OS/2 with the EMX environment | 145 | # OS/2 with the EMX environment |
146 | ac_cv_have_dev_random=no | 146 | ac_cv_have_dev_random=no |
147 | AC_DEFINE(HAVE_DRIVE_LETTERS) | 147 | AC_DEFINE(HAVE_DRIVE_LETTERS) |
148 | AC_DEFINE(HAVE_DOSISH_SYSTEM) | 148 | AC_DEFINE(HAVE_DOSISH_SYSTEM) |
149 | ;; | 149 | ;; |
150 | 150 | ||
151 | i?86-*-msdosdjgpp*) | 151 | i?86-*-msdosdjgpp*) |
152 | # DOS with the DJGPP environment | 152 | # DOS with the DJGPP environment |
153 | ac_cv_have_dev_random=no | 153 | ac_cv_have_dev_random=no |
154 | AC_DEFINE(HAVE_DRIVE_LETTERS) | 154 | AC_DEFINE(HAVE_DRIVE_LETTERS) |
155 | AC_DEFINE(HAVE_DOSISH_SYSTEM) | 155 | AC_DEFINE(HAVE_DOSISH_SYSTEM) |
156 | ;; | 156 | ;; |
157 | 157 | ||
158 | *-*-freebsd*) | 158 | *-*-freebsd*) |
159 | # FreeBSD | 159 | # FreeBSD |
160 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | 160 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
161 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 161 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
162 | ;; | 162 | ;; |
163 | 163 | ||
164 | *-*-hpux*) | 164 | *-*-hpux*) |
165 | if test -z "$GCC" ; then | 165 | if test -z "$GCC" ; then |
166 | CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE" | 166 | CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE" |
167 | fi | 167 | fi |
168 | ;; | 168 | ;; |
169 | *-dec-osf4*) | 169 | *-dec-osf4*) |
170 | if test -z "$GCC" ; then | 170 | if test -z "$GCC" ; then |
171 | # Suppress all warnings | 171 | # Suppress all warnings |
172 | # to get rid of the unsigned/signed char mismatch warnings. | 172 | # to get rid of the unsigned/signed char mismatch warnings. |
173 | CFLAGS="$CFLAGS -w" | 173 | CFLAGS="$CFLAGS -w" |
174 | fi | 174 | fi |
175 | ;; | 175 | ;; |
176 | m68k-atari-mint) | 176 | m68k-atari-mint) |
177 | ;; | 177 | ;; |
178 | *) | 178 | *) |
179 | ;; | 179 | ;; |
180 | esac | 180 | esac |
181 | 181 | ||
182 | # A printable OS Name is sometime useful. | 182 | # A printable OS Name is sometime useful. |
183 | case "${target}" in | 183 | case "${target}" in |
184 | *-*-mingw32*) | 184 | *-*-mingw32*) |
185 | PRINTABLE_OS_NAME="MingW32" | 185 | PRINTABLE_OS_NAME="MingW32" |
186 | ;; | 186 | ;; |
187 | 187 | ||
188 | i?86-emx-os2 | i?86-*-os2*emx ) | 188 | i?86-emx-os2 | i?86-*-os2*emx ) |
189 | PRINTABLE_OS_NAME="OS/2" | 189 | PRINTABLE_OS_NAME="OS/2" |
190 | ;; | 190 | ;; |
191 | 191 | ||
192 | i?86-*-msdosdjgpp*) | 192 | i?86-*-msdosdjgpp*) |
193 | PRINTABLE_OS_NAME="MSDOS/DJGPP" | 193 | PRINTABLE_OS_NAME="MSDOS/DJGPP" |
194 | ;; | 194 | ;; |
195 | 195 | ||
196 | *-linux*) | 196 | *-linux*) |
197 | PRINTABLE_OS_NAME="GNU/Linux" | 197 | PRINTABLE_OS_NAME="GNU/Linux" |
198 | ;; | 198 | ;; |
199 | 199 | ||
200 | *) | 200 | *) |
201 | PRINTABLE_OS_NAME=`uname -s || echo "Unknown"` | 201 | PRINTABLE_OS_NAME=`uname -s || echo "Unknown"` |
202 | ;; | 202 | ;; |
203 | esac | 203 | esac |
204 | 204 | ||
205 | 205 | ||
206 | case "${target}" in | 206 | case "${target}" in |
207 | *-openbsd* | *-netbsd*) | 207 | *-openbsd* | *-netbsd*) |
208 | # FIXME: Are these the best flags for OpenBSD? | 208 | # FIXME: Are these the best flags for OpenBSD? |
209 | NAME_OF_DEV_RANDOM="/dev/srandom" | 209 | NAME_OF_DEV_RANDOM="/dev/srandom" |
210 | NAME_OF_DEV_URANDOM="/dev/urandom" | 210 | NAME_OF_DEV_URANDOM="/dev/urandom" |
211 | # DYNLINK_MOD_CFLAGS="-shared -rdynamic $CFLAGS_PIC -Wl,-Bshareable -Wl,-x" | 211 | # DYNLINK_MOD_CFLAGS="-shared -rdynamic $CFLAGS_PIC -Wl,-Bshareable -Wl,-x" |
212 | ;; | 212 | ;; |
213 | 213 | ||
214 | *-solaris* | *-irix* | *-dec-osf* ) | 214 | *-solaris* | *-irix* | *-dec-osf* ) |
215 | NAME_OF_DEV_RANDOM="/dev/random" | 215 | NAME_OF_DEV_RANDOM="/dev/random" |
216 | NAME_OF_DEV_URANDOM="/dev/random" | 216 | NAME_OF_DEV_URANDOM="/dev/random" |
217 | # DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC" | 217 | # DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC" |
218 | ;; | 218 | ;; |
219 | 219 | ||
220 | *) | 220 | *) |
221 | NAME_OF_DEV_RANDOM="/dev/random" | 221 | NAME_OF_DEV_RANDOM="/dev/random" |
222 | NAME_OF_DEV_URANDOM="/dev/urandom" | 222 | NAME_OF_DEV_URANDOM="/dev/urandom" |
223 | # -shared is a gcc-ism. Find pic flags from GNUPG_CHECK_PIC. | 223 | # -shared is a gcc-ism. Find pic flags from GNUPG_CHECK_PIC. |
224 | # if test -n "$GCC" ; then | 224 | # if test -n "$GCC" ; then |
225 | # DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC" | 225 | # DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC" |
226 | # else | 226 | # else |
227 | # DYNLINK_MOD_CFLAGS="$CFLAGS_PIC" | 227 | # DYNLINK_MOD_CFLAGS="$CFLAGS_PIC" |
228 | # fi | 228 | # fi |
229 | ;; | 229 | ;; |
230 | esac | 230 | esac |
231 | 231 | ||
232 | 232 | ||
233 | AC_C_BIGENDIAN | 233 | AC_C_BIGENDIAN |
234 | 234 | ||
235 | AC_CHECK_SIZEOF(unsigned short, 2) | 235 | AC_CHECK_SIZEOF(unsigned short, 2) |
236 | AC_CHECK_SIZEOF(unsigned int, 4) | 236 | AC_CHECK_SIZEOF(unsigned int, 4) |
237 | AC_CHECK_SIZEOF(unsigned long, 4) | 237 | AC_CHECK_SIZEOF(unsigned long, 4) |
238 | AC_CHECK_SIZEOF(unsigned long long, 0) | 238 | AC_CHECK_SIZEOF(unsigned long long, 0) |
239 | 239 | ||
240 | if test "$ac_cv_sizeof_unsigned_short" = "0" \ | 240 | if test "$ac_cv_sizeof_unsigned_short" = "0" \ |
241 | || test "$ac_cv_sizeof_unsigned_int" = "0" \ | 241 | || test "$ac_cv_sizeof_unsigned_int" = "0" \ |
242 | || test "$ac_cv_sizeof_unsigned_long" = "0"; then | 242 | || test "$ac_cv_sizeof_unsigned_long" = "0"; then |
243 | AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]); | 243 | AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]); |
244 | fi | 244 | fi |
245 | 245 | ||
246 | # Do we have any 64-bit data types? | 246 | # Do we have any 64-bit data types? |
247 | if test "$ac_cv_sizeof_unsigned_int" != "8" \ | 247 | if test "$ac_cv_sizeof_unsigned_int" != "8" \ |
248 | && test "$ac_cv_sizeof_unsigned_long" != "8" \ | 248 | && test "$ac_cv_sizeof_unsigned_long" != "8" \ |
249 | && test "$ac_cv_sizeof_unsigned_long_long" != "8" \ | 249 | && test "$ac_cv_sizeof_unsigned_long_long" != "8" \ |
250 | && test "$ac_cv_sizeof_uint64_t" != "8"; then | 250 | && test "$ac_cv_sizeof_uint64_t" != "8"; then |
251 | AC_MSG_WARN([No 64-bit types. Disabling TIGER/192, SHA-384, and SHA-512]) | 251 | AC_MSG_WARN([No 64-bit types. Disabling TIGER/192, SHA-384, and SHA-512]) |
252 | else | 252 | else |
253 | available_digests="$available_digests $available_digests_64" | 253 | available_digests="$available_digests $available_digests_64" |
254 | fi | 254 | fi |
255 | 255 | ||
256 | # If not specified otherwise, all available algorithms will be | 256 | # If not specified otherwise, all available algorithms will be |
257 | # included. | 257 | # included. |
258 | default_ciphers="$available_ciphers" | 258 | default_ciphers="$available_ciphers" |
259 | default_pubkey_ciphers="$available_pubkey_ciphers" | 259 | default_pubkey_ciphers="$available_pubkey_ciphers" |
260 | default_digests="$available_digests" | 260 | default_digests="$available_digests" |
261 | 261 | ||
262 | ############################ | 262 | ############################ |
263 | ## Command line switches. ## | 263 | ## Command line switches. ## |
264 | ############################ | 264 | ############################ |
265 | 265 | ||
266 | # Implementation of the --enable-ciphers switch. | 266 | # Implementation of the --enable-ciphers switch. |
267 | AC_ARG_ENABLE(ciphers, | 267 | AC_ARG_ENABLE(ciphers, |
268 | AC_HELP_STRING([--enable-ciphers=ciphers], | 268 | AC_HELP_STRING([--enable-ciphers=ciphers], |
269 | [select the symmetric ciphers to include]), | 269 | [select the symmetric ciphers to include]), |
270 | [enabled_ciphers=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')], | 270 | [enabled_ciphers=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')], |
271 | [enabled_ciphers=""]) | 271 | [enabled_ciphers=""]) |
272 | if test "x$enabled_ciphers" = "x" \ | 272 | if test "x$enabled_ciphers" = "x" \ |
273 | -o "$enabled_ciphers" = "yes" \ | 273 | -o "$enabled_ciphers" = "yes" \ |
274 | -o "$enabled_ciphers" = "no"; then | 274 | -o "$enabled_ciphers" = "no"; then |
275 | enabled_ciphers=$default_ciphers | 275 | enabled_ciphers=$default_ciphers |
276 | fi | 276 | fi |
277 | AC_MSG_CHECKING([which symmetric ciphers to include]) | 277 | AC_MSG_CHECKING([which symmetric ciphers to include]) |
278 | for cipher in $enabled_ciphers; do | 278 | for cipher in $enabled_ciphers; do |
279 | LIST_MEMBER($cipher, $available_ciphers) | 279 | LIST_MEMBER($cipher, $available_ciphers) |
280 | if test "$found" = "0"; then | 280 | if test "$found" = "0"; then |
281 | AC_MSG_ERROR([unsupported cipher specified]) | 281 | AC_MSG_ERROR([unsupported cipher specified]) |
282 | fi | 282 | fi |
283 | done | 283 | done |
284 | AC_MSG_RESULT([$enabled_ciphers]) | 284 | AC_MSG_RESULT([$enabled_ciphers]) |
285 | 285 | ||
286 | # Implementation of the --enable-pubkey-ciphers switch. | 286 | # Implementation of the --enable-pubkey-ciphers switch. |
287 | AC_ARG_ENABLE(pubkey-ciphers, | 287 | AC_ARG_ENABLE(pubkey-ciphers, |
288 | AC_HELP_STRING([--enable-pubkey-ciphers=ciphers], | 288 | AC_HELP_STRING([--enable-pubkey-ciphers=ciphers], |
289 | [select the public-key ciphers to include]), | 289 | [select the public-key ciphers to include]), |
290 | [enabled_pubkey_ciphers=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')], | 290 | [enabled_pubkey_ciphers=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')], |
291 | [enabled_pubkey_ciphers=""]) | 291 | [enabled_pubkey_ciphers=""]) |
292 | if test "x$enabled_pubkey_ciphers" = "x" \ | 292 | if test "x$enabled_pubkey_ciphers" = "x" \ |
293 | -o "$enabled_pubkey_ciphers" = "yes" \ | 293 | -o "$enabled_pubkey_ciphers" = "yes" \ |
294 | -o "$enabled_pubkey_ciphers" = "no"; then | 294 | -o "$enabled_pubkey_ciphers" = "no"; then |
295 | enabled_pubkey_ciphers=$default_pubkey_ciphers | 295 | enabled_pubkey_ciphers=$default_pubkey_ciphers |
296 | fi | 296 | fi |
297 | AC_MSG_CHECKING([which public-key ciphers to include]) | 297 | AC_MSG_CHECKING([which public-key ciphers to include]) |
298 | for cipher in $enabled_pubkey_ciphers; do | 298 | for cipher in $enabled_pubkey_ciphers; do |
299 | LIST_MEMBER($cipher, $available_pubkey_ciphers) | 299 | LIST_MEMBER($cipher, $available_pubkey_ciphers) |
300 | if test "$found" = "0"; then | 300 | if test "$found" = "0"; then |
301 | AC_MSG_ERROR([unsupported public-key cipher specified]) | 301 | AC_MSG_ERROR([unsupported public-key cipher specified]) |
302 | fi | 302 | fi |
303 | done | 303 | done |
304 | AC_MSG_RESULT([$enabled_pubkey_ciphers]) | 304 | AC_MSG_RESULT([$enabled_pubkey_ciphers]) |
305 | 305 | ||
306 | # Implementation of the --enable-digests switch. | 306 | # Implementation of the --enable-digests switch. |
307 | AC_ARG_ENABLE(digests, | 307 | AC_ARG_ENABLE(digests, |
308 | AC_HELP_STRING([--enable-digests=digests], | 308 | AC_HELP_STRING([--enable-digests=digests], |
309 | [select the message digests to include]), | 309 | [select the message digests to include]), |
310 | [enabled_digests=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')], | 310 | [enabled_digests=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')], |
311 | [enabled_digests=""]) | 311 | [enabled_digests=""]) |
312 | if test "x$enabled_digests" = "x" \ | 312 | if test "x$enabled_digests" = "x" \ |
313 | -o "$enabled_digests" = "yes" \ | 313 | -o "$enabled_digests" = "yes" \ |
314 | -o "$enabled_digests" = "no"; then | 314 | -o "$enabled_digests" = "no"; then |
315 | enabled_digests=$default_digests | 315 | enabled_digests=$default_digests |
316 | fi | 316 | fi |
317 | AC_MSG_CHECKING([which message digests to include]) | 317 | AC_MSG_CHECKING([which message digests to include]) |
318 | for digest in $enabled_digests; do | 318 | for digest in $enabled_digests; do |
319 | LIST_MEMBER($digest, $available_digests) | 319 | LIST_MEMBER($digest, $available_digests) |
320 | if test "$found" = "0"; then | 320 | if test "$found" = "0"; then |
321 | AC_MSG_ERROR([unsupported message digest specified]) | 321 | AC_MSG_ERROR([unsupported message digest specified]) |
322 | fi | 322 | fi |
323 | done | 323 | done |
324 | AC_MSG_RESULT([$enabled_digests]) | 324 | AC_MSG_RESULT([$enabled_digests]) |
325 | 325 | ||
326 | # Implementation of the --enable-random switch. | 326 | # Implementation of the --enable-random switch. |
327 | AC_ARG_ENABLE(random, | 327 | AC_ARG_ENABLE(random, |
328 | AC_HELP_STRING([--enable-random=name], | 328 | AC_HELP_STRING([--enable-random=name], |
329 | [select which random number generator to use]), | 329 | [select which random number generator to use]), |
330 | [random=$(echo $enableval | tr '[A-Z]' '[a-z]')], | 330 | [random=$(echo $enableval | tr '[A-Z]' '[a-z]')], |
331 | []) | 331 | []) |
332 | if test "x$random" = "x" -o "$random" = "yes" -o "$random" = "no"; then | 332 | if test "x$random" = "x" -o "$random" = "yes" -o "$random" = "no"; then |
333 | random=default | 333 | random=default |
334 | fi | 334 | fi |
335 | AC_MSG_CHECKING([which random module to use]) | 335 | AC_MSG_CHECKING([which random module to use]) |
336 | if test "$random" != "default" -a "$random" != "auto"; then | 336 | if test "$random" != "default" -a "$random" != "auto"; then |
337 | LIST_MEMBER($random, $available_random_modules) | 337 | LIST_MEMBER($random, $available_random_modules) |
338 | if test "$found" = "0"; then | 338 | if test "$found" = "0"; then |
339 | AC_MSG_ERROR([unsupported random module specified]) | 339 | AC_MSG_ERROR([unsupported random module specified]) |
340 | fi | 340 | fi |
341 | fi | 341 | fi |
342 | AC_MSG_RESULT($random) | 342 | AC_MSG_RESULT($random) |
343 | 343 | ||
344 | # Implementation of the --disable-dev-random switch. | 344 | # Implementation of the --disable-dev-random switch. |
345 | AC_MSG_CHECKING([whether use of /dev/random is requested]) | 345 | AC_MSG_CHECKING([whether use of /dev/random is requested]) |
346 | AC_ARG_ENABLE(dev-random, | 346 | AC_ARG_ENABLE(dev-random, |
347 | [ --disable-dev-random disable the use of dev random], | 347 | [ --disable-dev-random disable the use of dev random], |
348 | try_dev_random=$enableval, try_dev_random=yes) | 348 | try_dev_random=$enableval, try_dev_random=yes) |
349 | AC_MSG_RESULT($try_dev_random) | 349 | AC_MSG_RESULT($try_dev_random) |
350 | 350 | ||
351 | # Implementation of the --with-egd-socket switch. | 351 | # Implementation of the --with-egd-socket switch. |
352 | AC_ARG_WITH(egd-socket, | 352 | AC_ARG_WITH(egd-socket, |
353 | [ --with-egd-socket=NAME Use NAME for the EGD socket)], | 353 | [ --with-egd-socket=NAME Use NAME for the EGD socket)], |
354 | egd_socket_name="$withval", egd_socket_name="" ) | 354 | egd_socket_name="$withval", egd_socket_name="" ) |
355 | AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name", | 355 | AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name", |
356 | [Define if you don't want the default EGD socket name. | 356 | [Define if you don't want the default EGD socket name. |
357 | For details see cipher/rndegd.c]) | 357 | For details see cipher/rndegd.c]) |
358 | 358 | ||
359 | # Implementation of --disable-asm. | 359 | # Implementation of --disable-asm. |
360 | AC_MSG_CHECKING([whether assembler modules are requested]) | 360 | AC_MSG_CHECKING([whether assembler modules are requested]) |
361 | AC_ARG_ENABLE([asm], | 361 | AC_ARG_ENABLE([asm], |
362 | AC_HELP_STRING([--disable-asm], | 362 | AC_HELP_STRING([--disable-asm], |
363 | [Disable assembler modules]), | 363 | [Disable assembler modules]), |
364 | [try_asm_modules=$enableval], | 364 | [try_asm_modules=$enableval], |
365 | [try_asm_modules=yes]) | 365 | [try_asm_modules=yes]) |
366 | AC_MSG_RESULT($try_asm_modules) | 366 | AC_MSG_RESULT($try_asm_modules) |
367 | 367 | ||
368 | # Implementation of the --enable-m-guard switch. | 368 | # Implementation of the --enable-m-guard switch. |
369 | AC_MSG_CHECKING([whether memory guard is requested]) | 369 | AC_MSG_CHECKING([whether memory guard is requested]) |
370 | AC_ARG_ENABLE(m-guard, | 370 | AC_ARG_ENABLE(m-guard, |
371 | [ --enable-m-guard enable memory guard facility], | 371 | [ --enable-m-guard enable memory guard facility], |
372 | use_m_guard=$enableval, use_m_guard=no) | 372 | use_m_guard=$enableval, use_m_guard=no) |
373 | AC_MSG_RESULT($use_m_guard) | 373 | AC_MSG_RESULT($use_m_guard) |
374 | if test "$use_m_guard" = yes ; then | 374 | if test "$use_m_guard" = yes ; then |
375 | AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature]) | 375 | AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature]) |
376 | fi | 376 | fi |
377 | 377 | ||
378 | # Implementation of the --with-capabilities switch. | 378 | # Implementation of the --with-capabilities switch. |
379 | # Check whether we want to use Linux capabilities | 379 | # Check whether we want to use Linux capabilities |
380 | AC_MSG_CHECKING([whether use of capabilities is requested]) | 380 | AC_MSG_CHECKING([whether use of capabilities is requested]) |
381 | AC_ARG_WITH(capabilities, | 381 | AC_ARG_WITH(capabilities, |
382 | [ --with-capabilities use linux capabilities [default=no]], | 382 | [ --with-capabilities use linux capabilities [default=no]], |
383 | [use_capabilities="$withval"],[use_capabilities=no]) | 383 | [use_capabilities="$withval"],[use_capabilities=no]) |
384 | AC_MSG_RESULT($use_capabilities) | 384 | AC_MSG_RESULT($use_capabilities) |
385 | 385 | ||
386 | # We don't have a test to check whether as(1) knows about the | 386 | # We don't have a test to check whether as(1) knows about the |
387 | # non executable stack option. Thus we provide an option to enable it. | 387 | # non executable stack option. Thus we provide an option to enable it. |
388 | AC_MSG_CHECKING([whether non excutable stack support is requested]) | 388 | AC_MSG_CHECKING([whether non excutable stack support is requested]) |
389 | AC_ARG_ENABLE(noexecstack, | 389 | AC_ARG_ENABLE(noexecstack, |
390 | AC_HELP_STRING([--enable-noexecstack], | 390 | AC_HELP_STRING([--enable-noexecstack], |
391 | [enable non executable stack support (gcc only)]), | 391 | [enable non executable stack support (gcc only)]), |
392 | noexecstack_support=$enableval, noexecstack_support=no) | 392 | noexecstack_support=$enableval, noexecstack_support=no) |
393 | AC_MSG_RESULT($noexecstack_support) | 393 | AC_MSG_RESULT($noexecstack_support) |
394 | 394 | ||
395 | 395 | ||
396 | 396 | ||
397 | AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME", | 397 | AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME", |
398 | [A human readable text with the name of the OS]) | 398 | [A human readable text with the name of the OS]) |
399 | 399 | ||
400 | # For some systems we know that we have ld_version scripts. | 400 | # For some systems we know that we have ld_version scripts. |
401 | # Use it then as default. | 401 | # Use it then as default. |
402 | have_ld_version_script=no | 402 | have_ld_version_script=no |
403 | case "${host}" in | 403 | case "${host}" in |
404 | *-*-linux*) | 404 | *-*-linux*) |
405 | have_ld_version_script=yes | 405 | have_ld_version_script=yes |
406 | ;; | 406 | ;; |
407 | *-*-gnu*) | 407 | *-*-gnu*) |
408 | have_ld_version_script=yes | 408 | have_ld_version_script=yes |
409 | ;; | 409 | ;; |
410 | esac | 410 | esac |
411 | AC_ARG_ENABLE([ld-version-script], | 411 | AC_ARG_ENABLE([ld-version-script], |
412 | AC_HELP_STRING([--enable-ld-version-script], | 412 | AC_HELP_STRING([--enable-ld-version-script], |
413 | [enable/disable use of linker version script. | 413 | [enable/disable use of linker version script. |
414 | (default is system dependent)]), | 414 | (default is system dependent)]), |
415 | [have_ld_version_script=$enableval], | 415 | [have_ld_version_script=$enableval], |
416 | [ : ] ) | 416 | [ : ] ) |
417 | AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") | 417 | AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") |
418 | 418 | ||
419 | AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM", | 419 | AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM", |
420 | [defined to the name of the strong random device]) | 420 | [defined to the name of the strong random device]) |
421 | AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM", | 421 | AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM", |
422 | [defined to the name of the weaker random device]) | 422 | [defined to the name of the weaker random device]) |
423 | 423 | ||
424 | ############################### | 424 | ############################### |
425 | #### Checks for libraries. #### | 425 | #### Checks for libraries. #### |
426 | ############################### | 426 | ############################### |
427 | 427 | ||
428 | AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION") | 428 | AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION") |
429 | if test "x$GPG_ERROR_LIBS" = "x"; then | 429 | if test "x$GPG_ERROR_LIBS" = "x"; then |
430 | AC_MSG_ERROR([libgpg-error is needed. | 430 | AC_MSG_ERROR([libgpg-error is needed. |
431 | See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .]) | 431 | See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .]) |
432 | fi | 432 | fi |
433 | 433 | ||
434 | AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GCRYPT, | 434 | AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GCRYPT, |
435 | [The default error source for libgcrypt.]) | 435 | [The default error source for libgcrypt.]) |
436 | 436 | ||
437 | # Solaris needs -lsocket and -lnsl. Unisys system includes | 437 | # Solaris needs -lsocket and -lnsl. Unisys system includes |
438 | # gethostbyname in libsocket but needs libnsl for socket. | 438 | # gethostbyname in libsocket but needs libnsl for socket. |
439 | AC_CHECK_LIB(nsl, gethostbyname) | 439 | AC_CHECK_LIB(nsl, gethostbyname) |
440 | AC_CHECK_LIB(socket, socket, ac_need_libsocket=1, ac_try_nsl=1) | 440 | AC_CHECK_LIB(socket, socket, ac_need_libsocket=1, ac_try_nsl=1) |
441 | if test x$ac_need_libsocket = x1; then | 441 | if test x$ac_need_libsocket = x1; then |
442 | LIBS="$LIBS -lsocket" | 442 | LIBS="$LIBS -lsocket" |
443 | fi | 443 | fi |
444 | if test x$ac_try_nsl = x1; then | 444 | if test x$ac_try_nsl = x1; then |
445 | AC_CHECK_LIB(nsl, gethostbyname, ac_need_libnsl=1) | 445 | AC_CHECK_LIB(nsl, gethostbyname, ac_need_libnsl=1) |
446 | if test x$ac_need_libnsl = x1 | 446 | if test x$ac_need_libnsl = x1 |
447 | then | 447 | then |
448 | LIBS="$LIBS -lnsl" | 448 | LIBS="$LIBS -lnsl" |
449 | fi | 449 | fi |
450 | fi | 450 | fi |
451 | 451 | ||
452 | ################################## | 452 | ################################## |
453 | #### Checks for header files. #### | 453 | #### Checks for header files. #### |
454 | ################################## | 454 | ################################## |
455 | 455 | ||
456 | AC_HEADER_STDC | 456 | AC_HEADER_STDC |
457 | AC_CHECK_HEADERS(unistd.h sys/select.h) | 457 | AC_CHECK_HEADERS(unistd.h sys/select.h) |
458 | 458 | ||
459 | ########################################## | 459 | ########################################## |
460 | #### Checks for typedefs, structures, #### | 460 | #### Checks for typedefs, structures, #### |
461 | #### and compiler characteristics. #### | 461 | #### and compiler characteristics. #### |
462 | ########################################## | 462 | ########################################## |
463 | 463 | ||
464 | AC_C_CONST | 464 | AC_C_CONST |
465 | AC_C_INLINE | 465 | AC_C_INLINE |
466 | AC_TYPE_SIZE_T | 466 | AC_TYPE_SIZE_T |
467 | AC_TYPE_SIGNAL | 467 | AC_TYPE_SIGNAL |
468 | AC_DECL_SYS_SIGLIST | 468 | AC_DECL_SYS_SIGLIST |
469 | 469 | ||
470 | GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF) | 470 | GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF) |
471 | GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF) | 471 | GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF) |
472 | GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF) | 472 | GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF) |
473 | GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF) | 473 | GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF) |
474 | GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF) | 474 | GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF) |
475 | 475 | ||
476 | AC_CHECK_TYPE(socklen_t,, | 476 | AC_CHECK_TYPE(socklen_t,, |
477 | [AC_DEFINE_UNQUOTED([socklen_t], | 477 | [AC_DEFINE_UNQUOTED([socklen_t], |
478 | [int], | 478 | [int], |
479 | [Define to `int' if unavailable.])], | 479 | [Define to `int' if unavailable.])], |
480 | [ | 480 | [ |
481 | #include <sys/types.h> | 481 | #include <sys/types.h> |
482 | #include <sys/socket.h> | 482 | #include <sys/socket.h> |
483 | ]) | 483 | ]) |
484 | 484 | ||
485 | ####################################### | 485 | ####################################### |
486 | #### Checks for library functions. #### | 486 | #### Checks for library functions. #### |
487 | ####################################### | 487 | ####################################### |
488 | 488 | ||
489 | AC_FUNC_VPRINTF | 489 | AC_FUNC_VPRINTF |
490 | # We have replacements for these in src/missing-string.c | 490 | # We have replacements for these in src/missing-string.c |
491 | AC_CHECK_FUNCS(stpcpy strcasecmp) | 491 | AC_CHECK_FUNCS(stpcpy strcasecmp) |
492 | # We have replacements for these in src/g10lib.h | 492 | # We have replacements for these in src/g10lib.h |
493 | AC_CHECK_FUNCS(strtoul memmove stricmp atexit raise) | 493 | AC_CHECK_FUNCS(strtoul memmove stricmp atexit raise) |
494 | # Other checks | 494 | # Other checks |
495 | AC_CHECK_FUNCS(strerror rand mmap getpagesize waitpid wait4) | 495 | AC_CHECK_FUNCS(strerror rand mmap getpagesize waitpid wait4) |
496 | AC_CHECK_FUNCS(gettimeofday getrusage gethrtime clock_gettime) | 496 | AC_CHECK_FUNCS(gettimeofday getrusage gethrtime clock_gettime) |
497 | 497 | ||
498 | GNUPG_CHECK_MLOCK | 498 | GNUPG_CHECK_MLOCK |
499 | 499 | ||
500 | # Check whether we can use Linux capabilities as requested. | 500 | # Check whether we can use Linux capabilities as requested. |
501 | if test "$use_capabilities" = "yes" ; then | 501 | if test "$use_capabilities" = "yes" ; then |
502 | use_capabilities=no | 502 | use_capabilities=no |
503 | AC_CHECK_HEADERS(sys/capability.h) | 503 | AC_CHECK_HEADERS(sys/capability.h) |
504 | if test "$ac_cv_header_sys_capability_h" = "yes" ; then | 504 | if test "$ac_cv_header_sys_capability_h" = "yes" ; then |
505 | AC_CHECK_LIB(cap, cap_init, ac_need_libcap=1) | 505 | AC_CHECK_LIB(cap, cap_init, ac_need_libcap=1) |
506 | if test "$ac_cv_lib_cap_cap_init" = "yes"; then | 506 | if test "$ac_cv_lib_cap_cap_init" = "yes"; then |
507 | AC_DEFINE(USE_CAPABILITIES,1, | 507 | AC_DEFINE(USE_CAPABILITIES,1, |
508 | [define if capabilities should be used]) | 508 | [define if capabilities should be used]) |
509 | LIBS="$LIBS -lcap" | 509 | LIBS="$LIBS -lcap" |
510 | use_capabilities=yes | 510 | use_capabilities=yes |
511 | fi | 511 | fi |
512 | fi | 512 | fi |
513 | if test "$use_capabilities" = "no" ; then | 513 | if test "$use_capabilities" = "no" ; then |
514 | AC_MSG_WARN([[ | 514 | AC_MSG_WARN([[ |
515 | *** | 515 | *** |
516 | *** The use of capabilities on this system is not possible. | 516 | *** The use of capabilities on this system is not possible. |
517 | *** You need a recent Linux kernel and some patches: | 517 | *** You need a recent Linux kernel and some patches: |
518 | *** fcaps-2.2.9-990610.patch (kernel patch for 2.2.9) | 518 | *** fcaps-2.2.9-990610.patch (kernel patch for 2.2.9) |
519 | *** fcap-module-990613.tar.gz (kernel module) | 519 | *** fcap-module-990613.tar.gz (kernel module) |
520 | *** libcap-1.92.tar.gz (user mode library and utilities) | 520 | *** libcap-1.92.tar.gz (user mode library and utilities) |
521 | *** And you have to configure the kernel with CONFIG_VFS_CAP_PLUGIN | 521 | *** And you have to configure the kernel with CONFIG_VFS_CAP_PLUGIN |
522 | *** set (filesystems menu). Be warned: This code is *really* ALPHA. | 522 | *** set (filesystems menu). Be warned: This code is *really* ALPHA. |
523 | ***]]) | 523 | ***]]) |
524 | fi | 524 | fi |
525 | fi | 525 | fi |
526 | 526 | ||
527 | # Check whether a random device is available. | 527 | # Check whether a random device is available. |
528 | if test "$try_dev_random" = yes ; then | 528 | if test "$try_dev_random" = yes ; then |
529 | AC_CACHE_CHECK(for random device, ac_cv_have_dev_random, | 529 | AC_CACHE_CHECK(for random device, ac_cv_have_dev_random, |
530 | [if test -r "$NAME_OF_DEV_RANDOM" && test -r "$NAME_OF_DEV_URANDOM" ; then | 530 | [if test -r "$NAME_OF_DEV_RANDOM" && test -r "$NAME_OF_DEV_URANDOM" ; then |
531 | ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi]) | 531 | ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi]) |
532 | if test "$ac_cv_have_dev_random" = yes; then | 532 | if test "$ac_cv_have_dev_random" = yes; then |
533 | AC_DEFINE(HAVE_DEV_RANDOM,1, | 533 | AC_DEFINE(HAVE_DEV_RANDOM,1, |
534 | [defined if the system supports a random device] ) | 534 | [defined if the system supports a random device] ) |
535 | fi | 535 | fi |
536 | else | 536 | else |
537 | AC_MSG_CHECKING(for random device) | 537 | AC_MSG_CHECKING(for random device) |
538 | ac_cv_have_dev_random=no | 538 | ac_cv_have_dev_random=no |
539 | AC_MSG_RESULT(has been disabled) | 539 | AC_MSG_RESULT(has been disabled) |
540 | fi | 540 | fi |
541 | 541 | ||
542 | # Figure out the random modules for this configuration. | 542 | # Figure out the random modules for this configuration. |
543 | if test "$random" = "default"; then | 543 | if test "$random" = "default"; then |
544 | 544 | ||
545 | # Select default value. | 545 | # Select default value. |
546 | if test "$ac_cv_have_dev_random" = yes; then | 546 | if test "$ac_cv_have_dev_random" = yes; then |
547 | # Try Linuxish random device. | 547 | # Try Linuxish random device. |
548 | random_modules="linux" | 548 | random_modules="linux" |
549 | else | 549 | else |
550 | case "${target}" in | 550 | case "${target}" in |
551 | *-*-mingw32*|*-*-cygwin*) | 551 | *-*-mingw32*|*-*-cygwin*) |
552 | # Windows random device. | 552 | # Windows random device. |
553 | random_modules="w32" | 553 | random_modules="w32" |
554 | ;; | 554 | ;; |
555 | *) | 555 | *) |
556 | # Build everything, allow to select at runtime. | 556 | # Build everything, allow to select at runtime. |
557 | random_modules="$auto_random_modules" | 557 | random_modules="$auto_random_modules" |
558 | ;; | 558 | ;; |
559 | esac | 559 | esac |
560 | fi | 560 | fi |
561 | else | 561 | else |
562 | if test "$random" = "auto"; then | 562 | if test "$random" = "auto"; then |
563 | # Build everything, allow to select at runtime. | 563 | # Build everything, allow to select at runtime. |
564 | random_modules="$auto_random_modules" | 564 | random_modules="$auto_random_modules" |
565 | fi | 565 | fi |
566 | fi | 566 | fi |
567 | 567 | ||
568 | 568 | ||
569 | # | 569 | # |
570 | # Setup assembler stuff. | 570 | # Setup assembler stuff. |
571 | # | 571 | # |
572 | GNUPG_SYS_SYMBOL_UNDERSCORE() | 572 | GNUPG_SYS_SYMBOL_UNDERSCORE() |
573 | AC_MSG_CHECKING(for mpi assembler functions) | 573 | AC_MSG_CHECKING(for mpi assembler functions) |
574 | if test -f $srcdir/mpi/config.links ; then | 574 | if test -f $srcdir/mpi/config.links ; then |
575 | . $srcdir/mpi/config.links | 575 | . $srcdir/mpi/config.links |
576 | AC_CONFIG_LINKS("$mpi_ln_list") | 576 | AC_CONFIG_LINKS("$mpi_ln_list") |
577 | ac_cv_mpi_mod_list="$mpi_mod_list" | 577 | ac_cv_mpi_mod_list="$mpi_mod_list" |
578 | ac_cv_mpi_sflags="$mpi_sflags" | 578 | ac_cv_mpi_sflags="$mpi_sflags" |
579 | ac_cv_mpi_config_done="yes" | 579 | ac_cv_mpi_config_done="yes" |
580 | AC_MSG_RESULT(done) | 580 | AC_MSG_RESULT(done) |
581 | else | 581 | else |
582 | AC_MSG_RESULT(failed) | 582 | AC_MSG_RESULT(failed) |
583 | AC_MSG_ERROR([mpi/config.links missing!]) | 583 | AC_MSG_ERROR([mpi/config.links missing!]) |
584 | fi | 584 | fi |
585 | MPI_MOD_LIST_LO="" | 585 | MPI_MOD_LIST_LO="" |
586 | MPI_MOD_LIST_O="" | 586 | MPI_MOD_LIST_O="" |
587 | if test "$ac_cv_mpi_mod_list" != ""; then | 587 | if test "$ac_cv_mpi_mod_list" != ""; then |
588 | for i in $ac_cv_mpi_mod_list; do | 588 | for i in $ac_cv_mpi_mod_list; do |
589 | MPI_MOD_LIST_LO="$MPI_MOD_LIST_LO $i.lo" | 589 | MPI_MOD_LIST_LO="$MPI_MOD_LIST_LO $i.lo" |
590 | MPI_MOD_LIST_O="$MPI_MOD_LIST_O $i.o" | 590 | MPI_MOD_LIST_O="$MPI_MOD_LIST_O $i.o" |
591 | done | 591 | done |
592 | fi | 592 | fi |
593 | AC_SUBST(MPI_MOD_LIST_LO) | 593 | AC_SUBST(MPI_MOD_LIST_LO) |
594 | AC_SUBST(MPI_MOD_LIST_O) | 594 | AC_SUBST(MPI_MOD_LIST_O) |
595 | MPI_SFLAGS="$ac_cv_mpi_sflags" | 595 | MPI_SFLAGS="$ac_cv_mpi_sflags" |
596 | AC_SUBST(MPI_SFLAGS) | 596 | AC_SUBST(MPI_SFLAGS) |
597 | 597 | ||
598 | # Allow users to append something to the version string without | 598 | # Allow users to append something to the version string without |
599 | # flagging it as development version. The user version part is | 599 | # flagging it as development version. The user version part is |
600 | # considered everything after a dash. | 600 | # considered everything after a dash. |
601 | changequote(,)# | 601 | changequote(,)# |
602 | tmp_pat='[a-zA-Z]' | 602 | tmp_pat='[a-zA-Z]' |
603 | changequote([,])# | 603 | changequote([,])# |
604 | if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then | 604 | if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then |
605 | AC_DEFINE(IS_DEVELOPMENT_VERSION,1, | 605 | AC_DEFINE(IS_DEVELOPMENT_VERSION,1, |
606 | [Defined if this is not a regular release]) | 606 | [Defined if this is not a regular release]) |
607 | fi | 607 | fi |
608 | 608 | ||
609 | AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes) | 609 | AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes) |
610 | 610 | ||
611 | # We don't check for GNU make anymore - automake should not have the | 611 | # We don't check for GNU make anymore - automake should not have the |
612 | # old flaws anymore. | 612 | # old flaws anymore. |
613 | #GNUPG_CHECK_GNUMAKE | 613 | #GNUPG_CHECK_GNUMAKE |
614 | 614 | ||
615 | AC_ARG_ENABLE(gcc-warnings, | 615 | AC_ARG_ENABLE(gcc-warnings, |
616 | AC_HELP_STRING([--enable-gcc-warnings], | 616 | AC_HELP_STRING([--enable-gcc-warnings], |
617 | [enable more verbose gcc warnings]), | 617 | [enable more verbose gcc warnings]), |
618 | [more_gcc_warnings="$enableval"], | 618 | [more_gcc_warnings="$enableval"], |
619 | [more_gcc_warnings="no"]) | 619 | [more_gcc_warnings="no"]) |
620 | 620 | ||
621 | if test "$GCC" = yes; then | 621 | if test "$GCC" = yes; then |
622 | if test "$USE_MAINTAINER_MODE" = "yes" || | 622 | if test "$USE_MAINTAINER_MODE" = "yes" || |
623 | test "$more_gcc_warnings" = "yes"; then | 623 | test "$more_gcc_warnings" = "yes"; then |
624 | CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" | 624 | CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" |
625 | if test "$more_gcc_warnings" = "yes"; then | 625 | if test "$more_gcc_warnings" = "yes"; then |
626 | CFLAGS="$CFLAGS -W -Wpointer-arith -Wbad-function-cast" | 626 | CFLAGS="$CFLAGS -W -Wpointer-arith -Wbad-function-cast" |
627 | CFLAGS="$CFLAGS -Wwrite-strings -Wunreachable-code" | 627 | CFLAGS="$CFLAGS -Wwrite-strings -Wunreachable-code" |
628 | CFLAGS="$CFLAGS -Wno-sign-compare" | 628 | CFLAGS="$CFLAGS -Wno-sign-compare" |
629 | fi | 629 | fi |
630 | else | 630 | else |
631 | CFLAGS="$CFLAGS -Wall" | 631 | CFLAGS="$CFLAGS -Wall" |
632 | fi | 632 | fi |
633 | 633 | ||
634 | # Non exec stack hack. Fixme: Write a test to check whether as | 634 | # Non exec stack hack. Fixme: Write a test to check whether as |
635 | # can cope with it and use the enable-noexecstack option only to | 635 | # can cope with it and use the enable-noexecstack option only to |
636 | # disable it in case it is required on some platforms. | 636 | # disable it in case it is required on some platforms. |
637 | if test "$noexecstack_support" = yes; then | 637 | if test "$noexecstack_support" = yes; then |
638 | NOEXECSTACK_FLAGS="-Wa,--noexecstack" | 638 | NOEXECSTACK_FLAGS="-Wa,--noexecstack" |
639 | fi | 639 | fi |
640 | fi | 640 | fi |
641 | AC_SUBST(NOEXECSTACK_FLAGS) | 641 | AC_SUBST(NOEXECSTACK_FLAGS) |
642 | 642 | ||
643 | # | 643 | # |
644 | # Make the version number in src/gcrypt.h the same as the one here. | 644 | # Make the version number in src/gcrypt.h the same as the one here. |
645 | # (this is easier than to have a *.in file just for one substitution) | 645 | # (this is easier than to have a *.in file just for one substitution) |
646 | # | 646 | # |
647 | GNUPG_FIX_HDR_VERSION([src/gcrypt.h], GCRYPT_VERSION) | 647 | GNUPG_FIX_HDR_VERSION([src/gcrypt.h], GCRYPT_VERSION) |
648 | 648 | ||
649 | AC_SUBST(LIBGCRYPT_CONFIG_API_VERSION) | 649 | AC_SUBST(LIBGCRYPT_CONFIG_API_VERSION) |
650 | AC_SUBST(LIBGCRYPT_CONFIG_LIBS) | 650 | AC_SUBST(LIBGCRYPT_CONFIG_LIBS) |
651 | AC_SUBST(LIBGCRYPT_CONFIG_CFLAGS) | 651 | AC_SUBST(LIBGCRYPT_CONFIG_CFLAGS) |
652 | AC_SUBST(LIBGCRYPT_THREAD_MODULES) | 652 | AC_SUBST(LIBGCRYPT_THREAD_MODULES) |
653 | 653 | ||
654 | AC_CONFIG_COMMANDS([gcrypt-conf],[[ | 654 | AC_CONFIG_COMMANDS([gcrypt-conf],[[ |
655 | chmod +x src/libgcrypt-config | 655 | chmod +x src/libgcrypt-config |
656 | ]],[[ | 656 | ]],[[ |
657 | prefix=$prefix | 657 | prefix=$prefix |
658 | exec_prefix=$exec_prefix | 658 | exec_prefix=$exec_prefix |
659 | libdir=$libdir | 659 | libdir=$libdir |
660 | datadir=$datadir | 660 | datadir=$datadir |
661 | DATADIRNAME=$DATADIRNAME | 661 | DATADIRNAME=$DATADIRNAME |
662 | ]]) | 662 | ]]) |
663 | 663 | ||
664 | ##################### | 664 | ##################### |
665 | #### Conclusion. #### | 665 | #### Conclusion. #### |
666 | ##################### | 666 | ##################### |
667 | 667 | ||
668 | # Define conditional sources and config.h symbols depending on the | 668 | # Define conditional sources and config.h symbols depending on the |
669 | # selected ciphers, pubkey-ciphers, digests and random modules. | 669 | # selected ciphers, pubkey-ciphers, digests and random modules. |
670 | 670 | ||
671 | LIST_MEMBER(arcfour, $enabled_ciphers) | 671 | LIST_MEMBER(arcfour, $enabled_ciphers) |
672 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS arcfour.lo" | 672 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS arcfour.lo" |
673 | AC_DEFINE_UNQUOTED(USE_ARCFOUR, $found, | 673 | AC_DEFINE_UNQUOTED(USE_ARCFOUR, $found, |
674 | [Defined if this module should be included]) | 674 | [Defined if this module should be included]) |
675 | 675 | ||
676 | LIST_MEMBER(blowfish, $enabled_ciphers) | 676 | LIST_MEMBER(blowfish, $enabled_ciphers) |
677 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS blowfish.lo" | 677 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS blowfish.lo" |
678 | AC_DEFINE_UNQUOTED(USE_BLOWFISH, $found, | 678 | AC_DEFINE_UNQUOTED(USE_BLOWFISH, $found, |
679 | [Defined if this module should be included]) | 679 | [Defined if this module should be included]) |
680 | 680 | ||
681 | LIST_MEMBER(cast5, $enabled_ciphers) | 681 | LIST_MEMBER(cast5, $enabled_ciphers) |
682 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS cast5.lo" | 682 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS cast5.lo" |
683 | AC_DEFINE_UNQUOTED(USE_CAST5, $found, | 683 | AC_DEFINE_UNQUOTED(USE_CAST5, $found, |
684 | [Defined if this module should be included]) | 684 | [Defined if this module should be included]) |
685 | 685 | ||
686 | LIST_MEMBER(des, $enabled_ciphers) | 686 | LIST_MEMBER(des, $enabled_ciphers) |
687 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS des.lo" | 687 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS des.lo" |
688 | AC_DEFINE_UNQUOTED(USE_DES, $found, | 688 | AC_DEFINE_UNQUOTED(USE_DES, $found, |
689 | [Defined if this module should be included]) | 689 | [Defined if this module should be included]) |
690 | 690 | ||
691 | LIST_MEMBER(aes, $enabled_ciphers) | 691 | LIST_MEMBER(aes, $enabled_ciphers) |
692 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS rijndael.lo" | 692 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS rijndael.lo" |
693 | AC_DEFINE_UNQUOTED(USE_AES, $found, | 693 | AC_DEFINE_UNQUOTED(USE_AES, $found, |
694 | [Defined if this module should be included]) | 694 | [Defined if this module should be included]) |
695 | 695 | ||
696 | LIST_MEMBER(twofish, $enabled_ciphers) | 696 | LIST_MEMBER(twofish, $enabled_ciphers) |
697 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS twofish.lo" | 697 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS twofish.lo" |
698 | AC_DEFINE_UNQUOTED(USE_TWOFISH, $found, | 698 | AC_DEFINE_UNQUOTED(USE_TWOFISH, $found, |
699 | [Defined if this module should be included]) | 699 | [Defined if this module should be included]) |
700 | 700 | ||
701 | LIST_MEMBER(serpent, $enabled_ciphers) | 701 | LIST_MEMBER(serpent, $enabled_ciphers) |
702 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS serpent.lo" | 702 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS serpent.lo" |
703 | AC_DEFINE_UNQUOTED(USE_SERPENT, $found, | 703 | AC_DEFINE_UNQUOTED(USE_SERPENT, $found, |
704 | [Defined if this module should be included]) | 704 | [Defined if this module should be included]) |
705 | 705 | ||
706 | LIST_MEMBER(rfc2268, $enabled_ciphers) | 706 | LIST_MEMBER(rfc2268, $enabled_ciphers) |
707 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS rfc2268.lo" | 707 | test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS rfc2268.lo" |
708 | AC_DEFINE_UNQUOTED(USE_RFC2268, $found, | 708 | AC_DEFINE_UNQUOTED(USE_RFC2268, $found, |
709 | [Defined if this module should be included]) | 709 | [Defined if this module should be included]) |
710 | 710 | ||
711 | LIST_MEMBER(dsa, $enabled_pubkey_ciphers) | 711 | LIST_MEMBER(dsa, $enabled_pubkey_ciphers) |
712 | test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS dsa.lo" | 712 | test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS dsa.lo" |
713 | AC_DEFINE_UNQUOTED(USE_DSA, $found, | 713 | AC_DEFINE_UNQUOTED(USE_DSA, $found, |
714 | [Defined if this module should be included]) | 714 | [Defined if this module should be included]) |
715 | 715 | ||
716 | LIST_MEMBER(rsa, $enabled_pubkey_ciphers) | 716 | LIST_MEMBER(rsa, $enabled_pubkey_ciphers) |
717 | test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS rsa.lo" | 717 | test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS rsa.lo" |
718 | AC_DEFINE_UNQUOTED(USE_RSA, $found, | 718 | AC_DEFINE_UNQUOTED(USE_RSA, $found, |
719 | [Defined if this module should be included]) | 719 | [Defined if this module should be included]) |
720 | 720 | ||
721 | LIST_MEMBER(elgamal, $enabled_pubkey_ciphers) | 721 | LIST_MEMBER(elgamal, $enabled_pubkey_ciphers) |
722 | test "$found" = "1" \ | 722 | test "$found" = "1" \ |
723 | && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS elgamal.lo" | 723 | && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS elgamal.lo" |
724 | AC_DEFINE_UNQUOTED(USE_ELGAMAL, $found, | 724 | AC_DEFINE_UNQUOTED(USE_ELGAMAL, $found, |
725 | [Defined if this module should be included]) | 725 | [Defined if this module should be included]) |
726 | 726 | ||
727 | LIST_MEMBER(crc, $enabled_digests) | 727 | LIST_MEMBER(crc, $enabled_digests) |
728 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS crc.lo" | 728 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS crc.lo" |
729 | AC_DEFINE_UNQUOTED(USE_CRC, $found, | 729 | AC_DEFINE_UNQUOTED(USE_CRC, $found, |
730 | [Defined if this module should be included]) | 730 | [Defined if this module should be included]) |
731 | 731 | ||
732 | LIST_MEMBER(md4, $enabled_digests) | 732 | LIST_MEMBER(md4, $enabled_digests) |
733 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS md4.lo" | 733 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS md4.lo" |
734 | AC_DEFINE_UNQUOTED(USE_MD4, $found, | 734 | AC_DEFINE_UNQUOTED(USE_MD4, $found, |
735 | [Defined if this module should be included]) | 735 | [Defined if this module should be included]) |
736 | 736 | ||
737 | LIST_MEMBER(md5, $enabled_digests) | 737 | LIST_MEMBER(md5, $enabled_digests) |
738 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS md5.lo" | 738 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS md5.lo" |
739 | AC_DEFINE_UNQUOTED(USE_MD5, $found, | 739 | AC_DEFINE_UNQUOTED(USE_MD5, $found, |
740 | [Defined if this module should be included]) | 740 | [Defined if this module should be included]) |
741 | 741 | ||
742 | LIST_MEMBER(sha256, $enabled_digests) | 742 | LIST_MEMBER(sha256, $enabled_digests) |
743 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS sha256.lo" | 743 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS sha256.lo" |
744 | AC_DEFINE_UNQUOTED(USE_SHA256, $found, | 744 | AC_DEFINE_UNQUOTED(USE_SHA256, $found, |
745 | [Defined if this module should be included]) | 745 | [Defined if this module should be included]) |
746 | 746 | ||
747 | LIST_MEMBER(sha512, $enabled_digests) | 747 | LIST_MEMBER(sha512, $enabled_digests) |
748 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS sha512.lo" | 748 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS sha512.lo" |
749 | AC_DEFINE_UNQUOTED(USE_SHA512, $found, | 749 | AC_DEFINE_UNQUOTED(USE_SHA512, $found, |
750 | [Defined if this module should be included]) | 750 | [Defined if this module should be included]) |
751 | 751 | ||
752 | LIST_MEMBER(tiger, $enabled_digests) | 752 | LIST_MEMBER(tiger, $enabled_digests) |
753 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS tiger.lo" | 753 | test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS tiger.lo" |
754 | AC_DEFINE_UNQUOTED(USE_TIGER, $found, | 754 | AC_DEFINE_UNQUOTED(USE_TIGER, $found, |
755 | [Defined if this module should be included]) | 755 | [Defined if this module should be included]) |
756 | 756 | ||
757 | # rmd160 and sha1 should be included always. | 757 | # rmd160 and sha1 should be included always. |
758 | GCRYPT_DIGESTS="$GCRYPT_DIGESTS rmd160.lo sha1.lo" | 758 | GCRYPT_DIGESTS="$GCRYPT_DIGESTS rmd160.lo sha1.lo" |
759 | AC_DEFINE_UNQUOTED(USE_RMD160, 1, [Defined if this module should be included]) | 759 | AC_DEFINE_UNQUOTED(USE_RMD160, 1, [Defined if this module should be included]) |
760 | AC_DEFINE_UNQUOTED(USE_SHA1, 1, [Defined if this module should be included]) | 760 | AC_DEFINE_UNQUOTED(USE_SHA1, 1, [Defined if this module should be included]) |
761 | 761 | ||
762 | LIST_MEMBER(linux, $random_modules) | 762 | LIST_MEMBER(linux, $random_modules) |
763 | test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndlinux.lo" | 763 | test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndlinux.lo" |
764 | AC_DEFINE_UNQUOTED(USE_RNDLINUX, $found, | 764 | AC_DEFINE_UNQUOTED(USE_RNDLINUX, $found, |
765 | [Defined if the /dev/random based RNG should be used.]) | 765 | [Defined if the /dev/random based RNG should be used.]) |
766 | 766 | ||
767 | 767 | ||
768 | LIST_MEMBER(unix, $random_modules) | 768 | LIST_MEMBER(unix, $random_modules) |
769 | test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndunix.lo" | 769 | test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndunix.lo" |
770 | AC_DEFINE_UNQUOTED(USE_RNDUNIX, $found, | 770 | AC_DEFINE_UNQUOTED(USE_RNDUNIX, $found, |
771 | [Defined if the default Unix RNG should be used.]) | 771 | [Defined if the default Unix RNG should be used.]) |
772 | if test "$found" = "1"; then | 772 | if test "$found" = "1"; then |
773 | print_egd_notice=yes | 773 | print_egd_notice=yes |
774 | fi | 774 | fi |
775 | 775 | ||
776 | LIST_MEMBER(egd, $random_modules) | 776 | LIST_MEMBER(egd, $random_modules) |
777 | test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndegd.lo" | 777 | test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndegd.lo" |
778 | AC_DEFINE_UNQUOTED(USE_RNDEGD, $found, | 778 | AC_DEFINE_UNQUOTED(USE_RNDEGD, $found, |
779 | [Defined if the EGD based RNG should be used.]) | 779 | [Defined if the EGD based RNG should be used.]) |
780 | 780 | ||
781 | LIST_MEMBER(w32, $random_modules) | 781 | LIST_MEMBER(w32, $random_modules) |
782 | test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndw32.lo" | 782 | test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndw32.lo" |
783 | AC_DEFINE_UNQUOTED(USE_RNDW32, $found, | 783 | AC_DEFINE_UNQUOTED(USE_RNDW32, $found, |
784 | [Defined if the Windows specific RNG should be used.]) | 784 | [Defined if the Windows specific RNG should be used.]) |
785 | 785 | ||
786 | AC_SUBST([GCRYPT_CIPHERS]) | 786 | AC_SUBST([GCRYPT_CIPHERS]) |
787 | AC_SUBST([GCRYPT_PUBKEY_CIPHERS]) | 787 | AC_SUBST([GCRYPT_PUBKEY_CIPHERS]) |
788 | AC_SUBST([GCRYPT_DIGESTS]) | 788 | AC_SUBST([GCRYPT_DIGESTS]) |
789 | AC_SUBST([GCRYPT_RANDOM]) | 789 | AC_SUBST([GCRYPT_RANDOM]) |
790 | 790 | ||
791 | AC_SUBST(LIBGCRYPT_CIPHERS, $enabled_ciphers) | 791 | AC_SUBST(LIBGCRYPT_CIPHERS, $enabled_ciphers) |
792 | AC_SUBST(LIBGCRYPT_PUBKEY_CIPHERS, $enabled_pubkey_ciphers) | 792 | AC_SUBST(LIBGCRYPT_PUBKEY_CIPHERS, $enabled_pubkey_ciphers) |
793 | AC_SUBST(LIBGCRYPT_DIGESTS, $enabled_digests) | 793 | AC_SUBST(LIBGCRYPT_DIGESTS, $enabled_digests) |
794 | 794 | ||
795 | AC_CONFIG_FILES([ | 795 | AC_CONFIG_FILES([ |
796 | Makefile | 796 | Makefile |
797 | mpi/Makefile | 797 | mpi/Makefile |
798 | cipher/Makefile | 798 | cipher/Makefile |
799 | doc/Makefile | 799 | doc/Makefile |
800 | src/Makefile | 800 | src/Makefile |
801 | src/libgcrypt-config | 801 | src/libgcrypt-config |
802 | tests/Makefile | 802 | tests/Makefile |
803 | w32-dll/Makefile | 803 | w32-dll/Makefile |
804 | ]) | 804 | ]) |
805 | AC_OUTPUT | 805 | AC_OUTPUT |
806 | 806 | ||
807 | # Give some feedback | 807 | # Give some feedback |
808 | echo | 808 | echo |
809 | 809 | ||
810 | if test "$print_egd_notice" = "yes"; then | 810 | if test "$print_egd_notice" = "yes"; then |
811 | cat <<G10EOF | 811 | cat <<G10EOF |
812 | 812 | ||
813 | The performance of the Unix random gatherer module (rndunix) is not | 813 | The performance of the Unix random gatherer module (rndunix) is not |
814 | very good and it does not keep the entropy pool over multiple | 814 | very good and it does not keep the entropy pool over multiple |
815 | invocations of GnuPG. The suggested way to overcome this problem is | 815 | invocations of GnuPG. The suggested way to overcome this problem is |
816 | to use the | 816 | to use the |
817 | 817 | ||
818 | Entropy Gathering Daemon (EGD) | 818 | Entropy Gathering Daemon (EGD) |
819 | 819 | ||
820 | which provides a entropy source for the whole system. It is written | 820 | which provides a entropy source for the whole system. It is written |
821 | in Perl and available at the GnuPG FTP servers. To enable EGD you | 821 | in Perl and available at the GnuPG FTP servers. To enable EGD you |
822 | should rerun configure with the option "--enable-static-rnd=egd". | 822 | should rerun configure with the option "--enable-static-rnd=egd". |
823 | For more information consult the GnuPG webpages: | 823 | For more information consult the GnuPG webpages: |
824 | 824 | ||
825 | http://www.gnupg.org/download.html#egd | 825 | http://www.gnupg.org/download.html#egd |
826 | 826 | ||
827 | G10EOF | 827 | G10EOF |
828 | fi | 828 | fi |
829 | 829 | ||
830 | warn="" | 830 | warn="" |
831 | for file in "random_modules"; do | 831 | for file in "random_modules"; do |
832 | case "$file" in rndunix | rndw32) warn="$warn $file";; esac | 832 | case "$file" in rndunix | rndw32) warn="$warn $file";; esac |
833 | done | 833 | done |
834 | if test -n "$warn"; then | 834 | if test -n "$warn"; then |
835 | echo "Please note that you are building a version of Libgcrypt with" | 835 | echo "Please note that you are building a version of Libgcrypt with" |
836 | echo " $warn" | 836 | echo " $warn" |
837 | echo "included. These parts are licensed under the GPL and thus the" | 837 | echo "included. These parts are licensed under the GPL and thus the" |
838 | echo "use of this library has to comply with the conditions of the GPL." | 838 | echo "use of this library has to comply with the conditions of the GPL." |
839 | fi | 839 | fi |
840 | 840 | ||
841 | # Give some feedback | 841 | # Give some feedback |
842 | echo " Configured for: $PRINTABLE_OS_NAME ($target)" | 842 | echo " Configured for: $PRINTABLE_OS_NAME ($target)" |
843 | echo | 843 | echo |