aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/libgcrypt/libgcrypt-1.2.2/configure.ac
diff options
context:
space:
mode:
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.ac1686
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.)
22AC_REVISION($Revision: 1119 $) 22AC_REVISION($Revision: 1119 $)
23AC_PREREQ(2.59) 23AC_PREREQ(2.59)
24min_automake_version="1.9.3" 24min_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
30AC_INIT(libgcrypt, 1.2.2, bug-libgcrypt@gnupg.org) 30AC_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++)
36LIBGCRYPT_LT_CURRENT=13 36LIBGCRYPT_LT_CURRENT=13
37LIBGCRYPT_LT_AGE=2 37LIBGCRYPT_LT_AGE=2
38LIBGCRYPT_LT_REVISION=1 38LIBGCRYPT_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.
41LIBGCRYPT_CONFIG_API_VERSION=1 41LIBGCRYPT_CONFIG_API_VERSION=1
42 42
43NEED_GPG_ERROR_VERSION=0.5 43NEED_GPG_ERROR_VERSION=0.5
44 44
45 45
46PACKAGE=$PACKAGE_NAME 46PACKAGE=$PACKAGE_NAME
47VERSION=$PACKAGE_VERSION 47VERSION=$PACKAGE_VERSION
48 48
49AC_CONFIG_SRCDIR([src/gcrypt.h]) 49AC_CONFIG_SRCDIR([src/gcrypt.h])
50AC_CANONICAL_TARGET() 50AC_CANONICAL_TARGET()
51AM_INIT_AUTOMAKE($PACKAGE, $VERSION) 51AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
52AM_CONFIG_HEADER(config.h) 52AM_CONFIG_HEADER(config.h)
53AM_MAINTAINER_MODE 53AM_MAINTAINER_MODE
54 54
55AH_TOP([ 55AH_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
61AH_BOTTOM([ 61AH_BOTTOM([
62#define _GCRYPT_IN_LIBGCRYPT 1 62#define _GCRYPT_IN_LIBGCRYPT 1
63]) 63])
64 64
65AH_VERBATIM([_REENTRANT], 65AH_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
73AC_SUBST(LIBGCRYPT_LT_CURRENT) 73AC_SUBST(LIBGCRYPT_LT_CURRENT)
74AC_SUBST(LIBGCRYPT_LT_AGE) 74AC_SUBST(LIBGCRYPT_LT_AGE)
75AC_SUBST(LIBGCRYPT_LT_REVISION) 75AC_SUBST(LIBGCRYPT_LT_REVISION)
76AC_SUBST(PACKAGE) 76AC_SUBST(PACKAGE)
77AC_SUBST(VERSION) 77AC_SUBST(VERSION)
78AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) 78AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
79AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) 79AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
80 80
81 81
82AC_PROG_MAKE_SET 82AC_PROG_MAKE_SET
83missing_dir=`cd $ac_aux_dir && pwd` 83missing_dir=`cd $ac_aux_dir && pwd`
84AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) 84AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
85AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) 85AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
86AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) 86AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
87AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) 87AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
88# AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) 88# AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
89AC_PROG_CC 89AC_PROG_CC
90AC_PROG_CPP 90AC_PROG_CPP
91AM_PROG_AS 91AM_PROG_AS
92AC_ISC_POSIX 92AC_ISC_POSIX
93AC_PROG_INSTALL 93AC_PROG_INSTALL
94AC_PROG_AWK 94AC_PROG_AWK
95 95
96AM_PROG_LIBTOOL 96AM_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
103LIBGCRYPT_CONFIG_LIBS="-lgcrypt" 103LIBGCRYPT_CONFIG_LIBS="-lgcrypt"
104LIBGCRYPT_CONFIG_CFLAGS="" 104LIBGCRYPT_CONFIG_CFLAGS=""
105 105
106# Definitions for symmetric ciphers. 106# Definitions for symmetric ciphers.
107available_ciphers="arcfour blowfish cast5 des aes twofish serpent rfc2268" 107available_ciphers="arcfour blowfish cast5 des aes twofish serpent rfc2268"
108enabled_ciphers="" 108enabled_ciphers=""
109 109
110# Definitions for public-key ciphers. 110# Definitions for public-key ciphers.
111available_pubkey_ciphers="dsa elgamal rsa" 111available_pubkey_ciphers="dsa elgamal rsa"
112enabled_pubkey_ciphers="" 112enabled_pubkey_ciphers=""
113 113
114# Definitions for message digests. 114# Definitions for message digests.
115available_digests="crc md4 md5 rmd160 sha1 sha256" 115available_digests="crc md4 md5 rmd160 sha1 sha256"
116available_digests_64="sha512 tiger" 116available_digests_64="sha512 tiger"
117enabled_digests="" 117enabled_digests=""
118 118
119# Definitions for random modules. 119# Definitions for random modules.
120available_random_modules="linux egd unix" 120available_random_modules="linux egd unix"
121auto_random_modules="$available_random_modules" 121auto_random_modules="$available_random_modules"
122 122
123# Supported thread backends. 123# Supported thread backends.
124LIBGCRYPT_THREAD_MODULES="" 124LIBGCRYPT_THREAD_MODULES=""
125 125
126# Other definitions. 126# Other definitions.
127print_egd_notice=no 127print_egd_notice=no
128 128
129# Setup some stuff depending on host/target. 129# Setup some stuff depending on host/target.
130case "${target}" in 130case "${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 ;;
180esac 180esac
181 181
182# A printable OS Name is sometime useful. 182# A printable OS Name is sometime useful.
183case "${target}" in 183case "${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 ;;
203esac 203esac
204 204
205 205
206case "${target}" in 206case "${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 ;;
230esac 230esac
231 231
232 232
233AC_C_BIGENDIAN 233AC_C_BIGENDIAN
234 234
235AC_CHECK_SIZEOF(unsigned short, 2) 235AC_CHECK_SIZEOF(unsigned short, 2)
236AC_CHECK_SIZEOF(unsigned int, 4) 236AC_CHECK_SIZEOF(unsigned int, 4)
237AC_CHECK_SIZEOF(unsigned long, 4) 237AC_CHECK_SIZEOF(unsigned long, 4)
238AC_CHECK_SIZEOF(unsigned long long, 0) 238AC_CHECK_SIZEOF(unsigned long long, 0)
239 239
240if test "$ac_cv_sizeof_unsigned_short" = "0" \ 240if 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]);
244fi 244fi
245 245
246# Do we have any 64-bit data types? 246# Do we have any 64-bit data types?
247if test "$ac_cv_sizeof_unsigned_int" != "8" \ 247if 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])
252else 252else
253 available_digests="$available_digests $available_digests_64" 253 available_digests="$available_digests $available_digests_64"
254fi 254fi
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.
258default_ciphers="$available_ciphers" 258default_ciphers="$available_ciphers"
259default_pubkey_ciphers="$available_pubkey_ciphers" 259default_pubkey_ciphers="$available_pubkey_ciphers"
260default_digests="$available_digests" 260default_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.
267AC_ARG_ENABLE(ciphers, 267AC_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=""])
272if test "x$enabled_ciphers" = "x" \ 272if 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
276fi 276fi
277AC_MSG_CHECKING([which symmetric ciphers to include]) 277AC_MSG_CHECKING([which symmetric ciphers to include])
278for cipher in $enabled_ciphers; do 278for 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
283done 283done
284AC_MSG_RESULT([$enabled_ciphers]) 284AC_MSG_RESULT([$enabled_ciphers])
285 285
286# Implementation of the --enable-pubkey-ciphers switch. 286# Implementation of the --enable-pubkey-ciphers switch.
287AC_ARG_ENABLE(pubkey-ciphers, 287AC_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=""])
292if test "x$enabled_pubkey_ciphers" = "x" \ 292if 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
296fi 296fi
297AC_MSG_CHECKING([which public-key ciphers to include]) 297AC_MSG_CHECKING([which public-key ciphers to include])
298for cipher in $enabled_pubkey_ciphers; do 298for 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
303done 303done
304AC_MSG_RESULT([$enabled_pubkey_ciphers]) 304AC_MSG_RESULT([$enabled_pubkey_ciphers])
305 305
306# Implementation of the --enable-digests switch. 306# Implementation of the --enable-digests switch.
307AC_ARG_ENABLE(digests, 307AC_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=""])
312if test "x$enabled_digests" = "x" \ 312if 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
316fi 316fi
317AC_MSG_CHECKING([which message digests to include]) 317AC_MSG_CHECKING([which message digests to include])
318for digest in $enabled_digests; do 318for 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
323done 323done
324AC_MSG_RESULT([$enabled_digests]) 324AC_MSG_RESULT([$enabled_digests])
325 325
326# Implementation of the --enable-random switch. 326# Implementation of the --enable-random switch.
327AC_ARG_ENABLE(random, 327AC_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 [])
332if test "x$random" = "x" -o "$random" = "yes" -o "$random" = "no"; then 332if test "x$random" = "x" -o "$random" = "yes" -o "$random" = "no"; then
333 random=default 333 random=default
334fi 334fi
335AC_MSG_CHECKING([which random module to use]) 335AC_MSG_CHECKING([which random module to use])
336if test "$random" != "default" -a "$random" != "auto"; then 336if 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
341fi 341fi
342AC_MSG_RESULT($random) 342AC_MSG_RESULT($random)
343 343
344# Implementation of the --disable-dev-random switch. 344# Implementation of the --disable-dev-random switch.
345AC_MSG_CHECKING([whether use of /dev/random is requested]) 345AC_MSG_CHECKING([whether use of /dev/random is requested])
346AC_ARG_ENABLE(dev-random, 346AC_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)
349AC_MSG_RESULT($try_dev_random) 349AC_MSG_RESULT($try_dev_random)
350 350
351# Implementation of the --with-egd-socket switch. 351# Implementation of the --with-egd-socket switch.
352AC_ARG_WITH(egd-socket, 352AC_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="" )
355AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name", 355AC_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.
360AC_MSG_CHECKING([whether assembler modules are requested]) 360AC_MSG_CHECKING([whether assembler modules are requested])
361AC_ARG_ENABLE([asm], 361AC_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])
366AC_MSG_RESULT($try_asm_modules) 366AC_MSG_RESULT($try_asm_modules)
367 367
368# Implementation of the --enable-m-guard switch. 368# Implementation of the --enable-m-guard switch.
369AC_MSG_CHECKING([whether memory guard is requested]) 369AC_MSG_CHECKING([whether memory guard is requested])
370AC_ARG_ENABLE(m-guard, 370AC_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)
374if test "$use_m_guard" = yes ; then 374if 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])
376fi 376fi
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
380AC_MSG_CHECKING([whether use of capabilities is requested]) 380AC_MSG_CHECKING([whether use of capabilities is requested])
381AC_ARG_WITH(capabilities, 381AC_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])
384AC_MSG_RESULT($use_capabilities) 384AC_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.
388AC_MSG_CHECKING([whether non excutable stack support is requested]) 388AC_MSG_CHECKING([whether non excutable stack support is requested])
389AC_ARG_ENABLE(noexecstack, 389AC_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)
393AC_MSG_RESULT($noexecstack_support) 393AC_MSG_RESULT($noexecstack_support)
394 394
395 395
396 396
397AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME", 397AC_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.
402have_ld_version_script=no 402have_ld_version_script=no
403case "${host}" in 403case "${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 ;;
410esac 410esac
411AC_ARG_ENABLE([ld-version-script], 411AC_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 [ : ] )
417AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") 417AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
418 418
419AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM", 419AC_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])
421AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM", 421AC_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
428AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION") 428AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION")
429if test "x$GPG_ERROR_LIBS" = "x"; then 429if 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/ .])
432fi 432fi
433 433
434AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GCRYPT, 434AC_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.
439AC_CHECK_LIB(nsl, gethostbyname) 439AC_CHECK_LIB(nsl, gethostbyname)
440AC_CHECK_LIB(socket, socket, ac_need_libsocket=1, ac_try_nsl=1) 440AC_CHECK_LIB(socket, socket, ac_need_libsocket=1, ac_try_nsl=1)
441if test x$ac_need_libsocket = x1; then 441if test x$ac_need_libsocket = x1; then
442 LIBS="$LIBS -lsocket" 442 LIBS="$LIBS -lsocket"
443fi 443fi
444if test x$ac_try_nsl = x1; then 444if 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
450fi 450fi
451 451
452################################## 452##################################
453#### Checks for header files. #### 453#### Checks for header files. ####
454################################## 454##################################
455 455
456AC_HEADER_STDC 456AC_HEADER_STDC
457AC_CHECK_HEADERS(unistd.h sys/select.h) 457AC_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
464AC_C_CONST 464AC_C_CONST
465AC_C_INLINE 465AC_C_INLINE
466AC_TYPE_SIZE_T 466AC_TYPE_SIZE_T
467AC_TYPE_SIGNAL 467AC_TYPE_SIGNAL
468AC_DECL_SYS_SIGLIST 468AC_DECL_SYS_SIGLIST
469 469
470GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF) 470GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
471GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF) 471GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
472GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF) 472GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
473GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF) 473GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
474GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF) 474GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
475 475
476AC_CHECK_TYPE(socklen_t,, 476AC_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
489AC_FUNC_VPRINTF 489AC_FUNC_VPRINTF
490# We have replacements for these in src/missing-string.c 490# We have replacements for these in src/missing-string.c
491AC_CHECK_FUNCS(stpcpy strcasecmp) 491AC_CHECK_FUNCS(stpcpy strcasecmp)
492# We have replacements for these in src/g10lib.h 492# We have replacements for these in src/g10lib.h
493AC_CHECK_FUNCS(strtoul memmove stricmp atexit raise) 493AC_CHECK_FUNCS(strtoul memmove stricmp atexit raise)
494# Other checks 494# Other checks
495AC_CHECK_FUNCS(strerror rand mmap getpagesize waitpid wait4) 495AC_CHECK_FUNCS(strerror rand mmap getpagesize waitpid wait4)
496AC_CHECK_FUNCS(gettimeofday getrusage gethrtime clock_gettime) 496AC_CHECK_FUNCS(gettimeofday getrusage gethrtime clock_gettime)
497 497
498GNUPG_CHECK_MLOCK 498GNUPG_CHECK_MLOCK
499 499
500# Check whether we can use Linux capabilities as requested. 500# Check whether we can use Linux capabilities as requested.
501if test "$use_capabilities" = "yes" ; then 501if test "$use_capabilities" = "yes" ; then
502use_capabilities=no 502use_capabilities=no
503AC_CHECK_HEADERS(sys/capability.h) 503AC_CHECK_HEADERS(sys/capability.h)
504if test "$ac_cv_header_sys_capability_h" = "yes" ; then 504if 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
512fi 512fi
513if test "$use_capabilities" = "no" ; then 513if 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***]])
524fi 524fi
525fi 525fi
526 526
527# Check whether a random device is available. 527# Check whether a random device is available.
528if test "$try_dev_random" = yes ; then 528if 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
536else 536else
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)
540fi 540fi
541 541
542# Figure out the random modules for this configuration. 542# Figure out the random modules for this configuration.
543if test "$random" = "default"; then 543if 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
561else 561else
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
566fi 566fi
567 567
568 568
569# 569#
570# Setup assembler stuff. 570# Setup assembler stuff.
571# 571#
572GNUPG_SYS_SYMBOL_UNDERSCORE() 572GNUPG_SYS_SYMBOL_UNDERSCORE()
573AC_MSG_CHECKING(for mpi assembler functions) 573AC_MSG_CHECKING(for mpi assembler functions)
574if test -f $srcdir/mpi/config.links ; then 574if 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)
581else 581else
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!])
584fi 584fi
585MPI_MOD_LIST_LO="" 585MPI_MOD_LIST_LO=""
586MPI_MOD_LIST_O="" 586MPI_MOD_LIST_O=""
587if test "$ac_cv_mpi_mod_list" != ""; then 587if 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
592fi 592fi
593AC_SUBST(MPI_MOD_LIST_LO) 593AC_SUBST(MPI_MOD_LIST_LO)
594AC_SUBST(MPI_MOD_LIST_O) 594AC_SUBST(MPI_MOD_LIST_O)
595MPI_SFLAGS="$ac_cv_mpi_sflags" 595MPI_SFLAGS="$ac_cv_mpi_sflags"
596AC_SUBST(MPI_SFLAGS) 596AC_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.
601changequote(,)# 601changequote(,)#
602tmp_pat='[a-zA-Z]' 602tmp_pat='[a-zA-Z]'
603changequote([,])# 603changequote([,])#
604if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then 604if 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])
607fi 607fi
608 608
609AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes) 609AM_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
615AC_ARG_ENABLE(gcc-warnings, 615AC_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
621if test "$GCC" = yes; then 621if 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
640fi 640fi
641AC_SUBST(NOEXECSTACK_FLAGS) 641AC_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#
647GNUPG_FIX_HDR_VERSION([src/gcrypt.h], GCRYPT_VERSION) 647GNUPG_FIX_HDR_VERSION([src/gcrypt.h], GCRYPT_VERSION)
648 648
649AC_SUBST(LIBGCRYPT_CONFIG_API_VERSION) 649AC_SUBST(LIBGCRYPT_CONFIG_API_VERSION)
650AC_SUBST(LIBGCRYPT_CONFIG_LIBS) 650AC_SUBST(LIBGCRYPT_CONFIG_LIBS)
651AC_SUBST(LIBGCRYPT_CONFIG_CFLAGS) 651AC_SUBST(LIBGCRYPT_CONFIG_CFLAGS)
652AC_SUBST(LIBGCRYPT_THREAD_MODULES) 652AC_SUBST(LIBGCRYPT_THREAD_MODULES)
653 653
654AC_CONFIG_COMMANDS([gcrypt-conf],[[ 654AC_CONFIG_COMMANDS([gcrypt-conf],[[
655chmod +x src/libgcrypt-config 655chmod +x src/libgcrypt-config
656]],[[ 656]],[[
657prefix=$prefix 657prefix=$prefix
658exec_prefix=$exec_prefix 658exec_prefix=$exec_prefix
659libdir=$libdir 659libdir=$libdir
660datadir=$datadir 660datadir=$datadir
661DATADIRNAME=$DATADIRNAME 661DATADIRNAME=$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
671LIST_MEMBER(arcfour, $enabled_ciphers) 671LIST_MEMBER(arcfour, $enabled_ciphers)
672test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS arcfour.lo" 672test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS arcfour.lo"
673AC_DEFINE_UNQUOTED(USE_ARCFOUR, $found, 673AC_DEFINE_UNQUOTED(USE_ARCFOUR, $found,
674 [Defined if this module should be included]) 674 [Defined if this module should be included])
675 675
676LIST_MEMBER(blowfish, $enabled_ciphers) 676LIST_MEMBER(blowfish, $enabled_ciphers)
677test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS blowfish.lo" 677test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS blowfish.lo"
678AC_DEFINE_UNQUOTED(USE_BLOWFISH, $found, 678AC_DEFINE_UNQUOTED(USE_BLOWFISH, $found,
679 [Defined if this module should be included]) 679 [Defined if this module should be included])
680 680
681LIST_MEMBER(cast5, $enabled_ciphers) 681LIST_MEMBER(cast5, $enabled_ciphers)
682test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS cast5.lo" 682test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS cast5.lo"
683AC_DEFINE_UNQUOTED(USE_CAST5, $found, 683AC_DEFINE_UNQUOTED(USE_CAST5, $found,
684 [Defined if this module should be included]) 684 [Defined if this module should be included])
685 685
686LIST_MEMBER(des, $enabled_ciphers) 686LIST_MEMBER(des, $enabled_ciphers)
687test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS des.lo" 687test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS des.lo"
688AC_DEFINE_UNQUOTED(USE_DES, $found, 688AC_DEFINE_UNQUOTED(USE_DES, $found,
689 [Defined if this module should be included]) 689 [Defined if this module should be included])
690 690
691LIST_MEMBER(aes, $enabled_ciphers) 691LIST_MEMBER(aes, $enabled_ciphers)
692test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS rijndael.lo" 692test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS rijndael.lo"
693AC_DEFINE_UNQUOTED(USE_AES, $found, 693AC_DEFINE_UNQUOTED(USE_AES, $found,
694 [Defined if this module should be included]) 694 [Defined if this module should be included])
695 695
696LIST_MEMBER(twofish, $enabled_ciphers) 696LIST_MEMBER(twofish, $enabled_ciphers)
697test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS twofish.lo" 697test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS twofish.lo"
698AC_DEFINE_UNQUOTED(USE_TWOFISH, $found, 698AC_DEFINE_UNQUOTED(USE_TWOFISH, $found,
699 [Defined if this module should be included]) 699 [Defined if this module should be included])
700 700
701LIST_MEMBER(serpent, $enabled_ciphers) 701LIST_MEMBER(serpent, $enabled_ciphers)
702test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS serpent.lo" 702test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS serpent.lo"
703AC_DEFINE_UNQUOTED(USE_SERPENT, $found, 703AC_DEFINE_UNQUOTED(USE_SERPENT, $found,
704 [Defined if this module should be included]) 704 [Defined if this module should be included])
705 705
706LIST_MEMBER(rfc2268, $enabled_ciphers) 706LIST_MEMBER(rfc2268, $enabled_ciphers)
707test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS rfc2268.lo" 707test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS rfc2268.lo"
708AC_DEFINE_UNQUOTED(USE_RFC2268, $found, 708AC_DEFINE_UNQUOTED(USE_RFC2268, $found,
709 [Defined if this module should be included]) 709 [Defined if this module should be included])
710 710
711LIST_MEMBER(dsa, $enabled_pubkey_ciphers) 711LIST_MEMBER(dsa, $enabled_pubkey_ciphers)
712test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS dsa.lo" 712test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS dsa.lo"
713AC_DEFINE_UNQUOTED(USE_DSA, $found, 713AC_DEFINE_UNQUOTED(USE_DSA, $found,
714 [Defined if this module should be included]) 714 [Defined if this module should be included])
715 715
716LIST_MEMBER(rsa, $enabled_pubkey_ciphers) 716LIST_MEMBER(rsa, $enabled_pubkey_ciphers)
717test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS rsa.lo" 717test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS rsa.lo"
718AC_DEFINE_UNQUOTED(USE_RSA, $found, 718AC_DEFINE_UNQUOTED(USE_RSA, $found,
719 [Defined if this module should be included]) 719 [Defined if this module should be included])
720 720
721LIST_MEMBER(elgamal, $enabled_pubkey_ciphers) 721LIST_MEMBER(elgamal, $enabled_pubkey_ciphers)
722test "$found" = "1" \ 722test "$found" = "1" \
723 && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS elgamal.lo" 723 && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS elgamal.lo"
724AC_DEFINE_UNQUOTED(USE_ELGAMAL, $found, 724AC_DEFINE_UNQUOTED(USE_ELGAMAL, $found,
725 [Defined if this module should be included]) 725 [Defined if this module should be included])
726 726
727LIST_MEMBER(crc, $enabled_digests) 727LIST_MEMBER(crc, $enabled_digests)
728test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS crc.lo" 728test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS crc.lo"
729AC_DEFINE_UNQUOTED(USE_CRC, $found, 729AC_DEFINE_UNQUOTED(USE_CRC, $found,
730 [Defined if this module should be included]) 730 [Defined if this module should be included])
731 731
732LIST_MEMBER(md4, $enabled_digests) 732LIST_MEMBER(md4, $enabled_digests)
733test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS md4.lo" 733test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS md4.lo"
734AC_DEFINE_UNQUOTED(USE_MD4, $found, 734AC_DEFINE_UNQUOTED(USE_MD4, $found,
735 [Defined if this module should be included]) 735 [Defined if this module should be included])
736 736
737LIST_MEMBER(md5, $enabled_digests) 737LIST_MEMBER(md5, $enabled_digests)
738test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS md5.lo" 738test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS md5.lo"
739AC_DEFINE_UNQUOTED(USE_MD5, $found, 739AC_DEFINE_UNQUOTED(USE_MD5, $found,
740 [Defined if this module should be included]) 740 [Defined if this module should be included])
741 741
742LIST_MEMBER(sha256, $enabled_digests) 742LIST_MEMBER(sha256, $enabled_digests)
743test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS sha256.lo" 743test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS sha256.lo"
744AC_DEFINE_UNQUOTED(USE_SHA256, $found, 744AC_DEFINE_UNQUOTED(USE_SHA256, $found,
745 [Defined if this module should be included]) 745 [Defined if this module should be included])
746 746
747LIST_MEMBER(sha512, $enabled_digests) 747LIST_MEMBER(sha512, $enabled_digests)
748test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS sha512.lo" 748test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS sha512.lo"
749AC_DEFINE_UNQUOTED(USE_SHA512, $found, 749AC_DEFINE_UNQUOTED(USE_SHA512, $found,
750 [Defined if this module should be included]) 750 [Defined if this module should be included])
751 751
752LIST_MEMBER(tiger, $enabled_digests) 752LIST_MEMBER(tiger, $enabled_digests)
753test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS tiger.lo" 753test "$found" = "1" && GCRYPT_DIGESTS="$GCRYPT_DIGESTS tiger.lo"
754AC_DEFINE_UNQUOTED(USE_TIGER, $found, 754AC_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.
758GCRYPT_DIGESTS="$GCRYPT_DIGESTS rmd160.lo sha1.lo" 758GCRYPT_DIGESTS="$GCRYPT_DIGESTS rmd160.lo sha1.lo"
759AC_DEFINE_UNQUOTED(USE_RMD160, 1, [Defined if this module should be included]) 759AC_DEFINE_UNQUOTED(USE_RMD160, 1, [Defined if this module should be included])
760AC_DEFINE_UNQUOTED(USE_SHA1, 1, [Defined if this module should be included]) 760AC_DEFINE_UNQUOTED(USE_SHA1, 1, [Defined if this module should be included])
761 761
762LIST_MEMBER(linux, $random_modules) 762LIST_MEMBER(linux, $random_modules)
763test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndlinux.lo" 763test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndlinux.lo"
764AC_DEFINE_UNQUOTED(USE_RNDLINUX, $found, 764AC_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
768LIST_MEMBER(unix, $random_modules) 768LIST_MEMBER(unix, $random_modules)
769test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndunix.lo" 769test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndunix.lo"
770AC_DEFINE_UNQUOTED(USE_RNDUNIX, $found, 770AC_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.])
772if test "$found" = "1"; then 772if test "$found" = "1"; then
773 print_egd_notice=yes 773 print_egd_notice=yes
774fi 774fi
775 775
776LIST_MEMBER(egd, $random_modules) 776LIST_MEMBER(egd, $random_modules)
777test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndegd.lo" 777test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndegd.lo"
778AC_DEFINE_UNQUOTED(USE_RNDEGD, $found, 778AC_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
781LIST_MEMBER(w32, $random_modules) 781LIST_MEMBER(w32, $random_modules)
782test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndw32.lo" 782test "$found" = "1" && GCRYPT_RANDOM="$GCRYPT_RANDOM rndw32.lo"
783AC_DEFINE_UNQUOTED(USE_RNDW32, $found, 783AC_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
786AC_SUBST([GCRYPT_CIPHERS]) 786AC_SUBST([GCRYPT_CIPHERS])
787AC_SUBST([GCRYPT_PUBKEY_CIPHERS]) 787AC_SUBST([GCRYPT_PUBKEY_CIPHERS])
788AC_SUBST([GCRYPT_DIGESTS]) 788AC_SUBST([GCRYPT_DIGESTS])
789AC_SUBST([GCRYPT_RANDOM]) 789AC_SUBST([GCRYPT_RANDOM])
790 790
791AC_SUBST(LIBGCRYPT_CIPHERS, $enabled_ciphers) 791AC_SUBST(LIBGCRYPT_CIPHERS, $enabled_ciphers)
792AC_SUBST(LIBGCRYPT_PUBKEY_CIPHERS, $enabled_pubkey_ciphers) 792AC_SUBST(LIBGCRYPT_PUBKEY_CIPHERS, $enabled_pubkey_ciphers)
793AC_SUBST(LIBGCRYPT_DIGESTS, $enabled_digests) 793AC_SUBST(LIBGCRYPT_DIGESTS, $enabled_digests)
794 794
795AC_CONFIG_FILES([ 795AC_CONFIG_FILES([
796Makefile 796Makefile
797mpi/Makefile 797mpi/Makefile
798cipher/Makefile 798cipher/Makefile
799doc/Makefile 799doc/Makefile
800src/Makefile 800src/Makefile
801src/libgcrypt-config 801src/libgcrypt-config
802tests/Makefile 802tests/Makefile
803w32-dll/Makefile 803w32-dll/Makefile
804]) 804])
805AC_OUTPUT 805AC_OUTPUT
806 806
807# Give some feedback 807# Give some feedback
808echo 808echo
809 809
810if test "$print_egd_notice" = "yes"; then 810if test "$print_egd_notice" = "yes"; then
811cat <<G10EOF 811cat <<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
827G10EOF 827G10EOF
828fi 828fi
829 829
830warn="" 830warn=""
831for file in "random_modules"; do 831for 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
833done 833done
834if test -n "$warn"; then 834if 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."
839fi 839fi
840 840
841# Give some feedback 841# Give some feedback
842echo " Configured for: $PRINTABLE_OS_NAME ($target)" 842echo " Configured for: $PRINTABLE_OS_NAME ($target)"
843echo 843echo