1 # configure.ac script for GnuPG
2 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
3 # 2008 Free Software Foundation, Inc.
5 # This file is part of GnuPG.
7 # GnuPG is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
12 # GnuPG is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, see <http://www.gnu.org/licenses/>.
20 # (Process this file with autoconf to produce a configure script.)
23 min_automake_version="1.9.3"
25 # Remember to change the version number immediately *after* a release.
26 # Set my_issvn to "yes" for non-released code. Remember to run an
27 # "svn up" and "autogen.sh --force" right before creating a distribution.
28 m4_define([my_version], [1.4.10])
29 m4_define([my_issvn], [yes])
31 m4_define([svn_revision], m4_esyscmd([echo $((svn info 2>/dev/null \
32 || echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)| \
34 AC_INIT([gnupg], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
36 # Set development_version to yes if the minor number is odd or you
37 # feel that the default check for a development version is not
39 development_version=no
41 AC_CONFIG_AUX_DIR(scripts)
42 AC_CONFIG_SRCDIR(g10/gpg.c)
44 AM_INIT_AUTOMAKE([std-options])
46 AM_CONFIG_HEADER(config.h)
51 dnl Check for random module options
53 AC_MSG_CHECKING([which random module to use])
54 AC_ARG_ENABLE(static-rnd,
55 AC_HELP_STRING([[--enable-static-rnd=[egd|unix|linux|auto]]],
56 [specify a random number source]),
57 [use_static_rnd=$enableval], [use_static_rnd=default])
59 if test "$use_static_rnd" = no; then
60 use_static_rnd=default
63 case "$use_static_rnd" in
64 egd | linux | unix | default )
65 AC_MSG_RESULT($use_static_rnd)
68 AC_MSG_RESULT(automagically selected at runtime)
71 AC_MSG_RESULT(invalid argument)
72 AC_MSG_ERROR(there is no random module rnd$use_static_rnd)
76 AC_ARG_WITH(egd-socket,
77 AC_HELP_STRING([--with-egd-socket=NAME],[use NAME for the EGD socket]),
78 egd_socket_name="$withval", egd_socket_name="" )
79 AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name",
80 [Define if you don't want the default EGD socket name.
81 For details see cipher/rndegd.c])
85 dnl See whether the user wants to disable checking for /dev/random
87 AC_MSG_CHECKING([whether use of /dev/random is requested])
88 AC_ARG_ENABLE(dev-random,
89 AC_HELP_STRING([--disable-dev-random],[disable the use of dev random]),
90 try_dev_random=$enableval, try_dev_random=yes)
91 AC_MSG_RESULT($try_dev_random)
95 dnl Check other options
98 AC_MSG_CHECKING([whether assembler modules are requested])
100 AC_HELP_STRING([--disable-asm],[do not use assembler modules]),
101 try_asm_modules=$enableval, try_asm_modules=yes)
102 AC_MSG_RESULT($try_asm_modules)
104 dnl AC_MSG_CHECKING([whether memory guard is requested])
105 dnl AC_ARG_ENABLE(m-guard,
106 dnl [ --enable-m-guard enable memory guard facility],
107 dnl use_m_guard=$enableval, use_m_guard=no)
108 dnl AC_MSG_RESULT($use_m_guard)
109 dnl if test "$use_m_guard" = yes ; then
110 dnl AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature])
113 # SELinux support includes tracking of sensitive files to avoid
114 # leaking their contents through processing these files by gpg itself
115 AC_MSG_CHECKING([whether SELinux support is requested])
116 AC_ARG_ENABLE(selinux-support,
117 AC_HELP_STRING([--enable-selinux-support],
118 [enable SELinux support]),
119 selinux_support=$enableval, selinux_support=no)
120 AC_MSG_RESULT($selinux_support)
123 AC_MSG_CHECKING([whether the new iconv based code is requested])
124 AC_ARG_ENABLE(gnupg-iconv,
125 AC_HELP_STRING([--disable-gnupg-iconv],
126 [disable the new iconv code]),
127 gnupg_use_iconv=$enableval, gnupg_use_iconv=yes)
128 AC_MSG_RESULT($gnupg_use_iconv)
130 dnl See if we are disabling any algorithms or features for a smaller
150 disable_keyserver_path=no
152 AC_ARG_ENABLE(minimal,
153 AC_HELP_STRING([--enable-minimal],[build the smallest gpg binary possible]),
171 AC_MSG_CHECKING([whether OpenPGP card support is requested])
172 AC_ARG_ENABLE(card-support,
173 AC_HELP_STRING([--disable-card-support],
174 [disable OpenPGP card support]),
175 card_support=$enableval)
176 AC_MSG_RESULT($card_support)
179 # Note that we may later disable the agent support based on the platform.
180 AC_MSG_CHECKING([whether gpg-agent support is requested])
181 AC_ARG_ENABLE(agent-support,
182 AC_HELP_STRING([--disable-agent-support],
183 [disable gpg-agent support]),
184 agent_support=$enableval)
185 AC_MSG_RESULT($agent_support)
188 AC_MSG_CHECKING([whether to enable the RSA public key algorithm])
190 AC_HELP_STRING([--disable-rsa],[disable the RSA public key algorithm]),
192 AC_MSG_RESULT($use_rsa)
193 if test x"$use_rsa" = xyes ; then
194 AC_DEFINE(USE_RSA,1,[Define to include the RSA public key algorithm])
197 AC_MSG_CHECKING([whether to enable the IDEA cipher])
199 AC_HELP_STRING([--disable-idea],[disable the IDEA cipher]),
201 AC_MSG_RESULT($use_idea)
202 if test x"$use_idea" = xyes ; then
203 AC_DEFINE(USE_IDEA,1,[Define to include the IDEA cipher])
205 # We don't need idea but some people claim that they need it for
206 # research etc., so we allow to place an idea source code into the
207 # cipher directory and statically link it if available, otherwise we
208 # link to a stub. We don't use AC_CHECK_FILE to avoid caching.
210 AC_MSG_CHECKING([for idea cipher module])
212 if test -f $srcdir/cipher/idea.c; then
224 AC_MSG_CHECKING([whether to enable the CAST5 cipher])
226 AC_HELP_STRING([--disable-cast5],[disable the CAST5 cipher]),
227 use_cast5=$enableval)
228 AC_MSG_RESULT($use_cast5)
229 if test x"$use_cast5" = xyes ; then
230 AC_DEFINE(USE_CAST5,1,[Define to include the CAST5 cipher])
233 AC_MSG_CHECKING([whether to enable the BLOWFISH cipher])
234 AC_ARG_ENABLE(blowfish,
235 AC_HELP_STRING([--disable-blowfish],[disable the BLOWFISH cipher]),
236 use_blowfish=$enableval)
237 AC_MSG_RESULT($use_blowfish)
238 if test x"$use_blowfish" = xyes ; then
239 AC_DEFINE(USE_BLOWFISH,1,[Define to include the BLOWFISH cipher])
242 AC_MSG_CHECKING([whether to enable the AES ciphers])
244 AC_HELP_STRING([--disable-aes],[disable the AES, AES192, and AES256 ciphers]),
246 AC_MSG_RESULT($use_aes)
247 if test x"$use_aes" = xyes ; then
248 AC_DEFINE(USE_AES,1,[Define to include the AES, AES192, and AES256 ciphers])
251 AC_MSG_CHECKING([whether to enable the TWOFISH cipher])
252 AC_ARG_ENABLE(twofish,
253 AC_HELP_STRING([--disable-twofish],[disable the TWOFISH cipher]),
254 use_twofish=$enableval)
255 AC_MSG_RESULT($use_twofish)
256 if test x"$use_twofish" = xyes ; then
257 AC_DEFINE(USE_TWOFISH,1,[Define to include the TWOFISH cipher])
260 AC_MSG_CHECKING([whether to enable the CAMELLIA cipher])
261 AC_ARG_ENABLE(camellia,
262 AC_HELP_STRING([--enable-camellia],[enable the CAMELLIA cipher]),
263 use_camellia=$enableval)
264 AC_MSG_RESULT($use_camellia)
265 if test x"$use_camellia" = xyes ; then
266 AC_DEFINE(USE_CAMELLIA,1,[Define to include the CAMELLIA cipher])
269 *** The Camellia cipher is for testing only and is NOT for production use!
273 AC_MSG_CHECKING([whether to enable the SHA-224 and SHA-256 digests])
274 AC_ARG_ENABLE(sha256,
275 AC_HELP_STRING([--disable-sha256],[disable the SHA-224 and SHA-256 digests]),
276 use_sha256=$enableval)
277 AC_MSG_RESULT($use_sha256)
278 if test x"$use_sha256" = xyes ; then
279 AC_DEFINE(USE_SHA256,1,[Define to include the SHA-224 and SHA-256 digests])
282 dnl SHA512 is defined only after we confirm 64-bit support later
283 AC_MSG_CHECKING([whether to enable the SHA-384 and SHA-512 digests])
284 AC_ARG_ENABLE(sha512,
285 AC_HELP_STRING([--disable-sha512],[disable the SHA-384 and SHA-512 digests]),
286 use_sha512=$enableval)
287 AC_MSG_RESULT($use_sha512)
289 dnl BZLIB is defined only after we confirm the library is available later
290 AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
292 AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
293 use_bzip2=$enableval)
294 AC_MSG_RESULT($use_bzip2)
296 AC_MSG_CHECKING([whether to enable external program execution])
298 AC_HELP_STRING([--disable-exec],[disable all external program execution]),
300 AC_MSG_RESULT($use_exec)
301 if test "$use_exec" = no ; then
302 AC_DEFINE(NO_EXEC,1,[Define to disable all external program execution])
305 if test "$use_exec" = yes ; then
306 AC_MSG_CHECKING([whether to enable photo ID viewing])
307 AC_ARG_ENABLE(photo-viewers,
308 AC_HELP_STRING([--disable-photo-viewers],[disable photo ID viewers]),
309 [if test "$enableval" = no ; then
310 AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
312 gnupg_cv_enable_photo_viewers=$enableval
313 AC_MSG_RESULT($enableval)
315 if test "$gnupg_cv_enable_photo_viewers" = yes ; then
316 AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
317 AC_ARG_WITH(photo-viewer,
318 AC_HELP_STRING([--with-photo-viewer=FIXED_VIEWER],
319 [set a fixed photo ID viewer]),
320 [if test "$withval" = yes ; then
322 elif test "$withval" != no ; then
323 AC_DEFINE_UNQUOTED(FIXED_PHOTO_VIEWER,"$withval",
324 [if set, restrict photo-viewer to this])
326 AC_MSG_RESULT($withval)
329 AC_MSG_CHECKING([whether to enable external keyserver helpers])
330 AC_ARG_ENABLE(keyserver-helpers,
331 AC_HELP_STRING([--disable-keyserver-helpers],
332 [disable all external keyserver support]),
333 [if test "$enableval" = no ; then
334 AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
335 [define to disable keyserver helpers])
337 gnupg_cv_enable_keyserver_helpers=$enableval
338 AC_MSG_RESULT($enableval)
340 if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
341 dnl LDAP is defined only after we confirm the library is available later
342 AC_MSG_CHECKING([whether LDAP keyserver support is requested])
344 AC_HELP_STRING([--disable-ldap],[disable LDAP keyserver interface only]),
345 try_ldap=$enableval, try_ldap=yes)
346 AC_MSG_RESULT($try_ldap)
348 AC_MSG_CHECKING([whether HKP keyserver support is requested])
350 AC_HELP_STRING([--disable-hkp],[disable HKP keyserver interface only]),
351 try_hkp=$enableval, try_hkp=yes)
352 AC_MSG_RESULT($try_hkp)
354 AC_MSG_CHECKING([whether finger key fetching support is requested])
355 AC_ARG_ENABLE(finger,
356 AC_HELP_STRING([--disable-finger],
357 [disable finger key fetching interface only]),
358 try_finger=$enableval, try_finger=yes)
359 AC_MSG_RESULT($try_finger)
361 AC_MSG_CHECKING([whether generic object key fetching support is requested])
362 AC_ARG_ENABLE(generic,
363 AC_HELP_STRING([--disable-generic],
364 [disable generic object key fetching interface only]),
365 try_generic=$enableval, try_generic=yes)
366 AC_MSG_RESULT($try_generic)
368 AC_MSG_CHECKING([whether email keyserver support is requested])
369 AC_ARG_ENABLE(mailto,
370 AC_HELP_STRING([--enable-mailto],
371 [enable email keyserver interface only]),
372 try_mailto=$enableval, try_mailto=no)
373 AC_MSG_RESULT($try_mailto)
376 AC_MSG_CHECKING([whether keyserver exec-path is enabled])
377 AC_ARG_ENABLE(keyserver-path,
378 AC_HELP_STRING([--disable-keyserver-path],
379 [disable the exec-path option for keyserver helpers]),
380 [if test "$enableval" = no ; then
381 disable_keyserver_path=yes
383 AC_MSG_RESULT($enableval)
386 AC_MSG_CHECKING([whether the included zlib is requested])
387 AC_ARG_WITH(included-zlib,
388 AC_HELP_STRING([--with-included-zlib],[use the zlib code included here]),
389 [g10_force_zlib="$withval"], [g10_force_zlib=no] )
390 AC_MSG_RESULT($g10_force_zlib)
393 dnl Check for the key/uid cache size. This can't be zero, but can be
394 dnl pretty small on embedded systems.
396 AC_MSG_CHECKING([for the size of the key and uid cache])
397 AC_ARG_ENABLE(key-cache,
398 AC_HELP_STRING([--enable-key-cache=SIZE],[Set key cache to SIZE (default 4096)]),,enableval=4096)
400 if test "$enableval" = "no"; then
402 elif test "$enableval" = "yes" || test "$enableval" = ""; then
407 key_cache_size=`echo "$enableval" | sed 's/[A-Za-z]//g'`
410 if test "$enableval" != "$key_cache_size" || test "$key_cache_size" -lt 5; then
411 AC_MSG_ERROR([invalid key-cache size])
414 AC_MSG_RESULT($key_cache_size)
415 AC_DEFINE_UNQUOTED(PK_UID_CACHE_SIZE,$key_cache_size,[Size of the key and UID caches])
418 dnl Check whether we want to use Linux capabilities
420 AC_MSG_CHECKING([whether use of capabilities is requested])
421 AC_ARG_WITH(capabilities,
422 AC_HELP_STRING([--with-capabilities],
423 [use linux capabilities [default=no]]),
424 [use_capabilities="$withval"],[use_capabilities=no])
425 AC_MSG_RESULT($use_capabilities)
427 # To avoid double inclusion of config.h which might happen at some
428 # places, we add the usual double inclusion protection.
430 #ifndef GNUPG_CONFIG_H_INCLUDED
431 #define GNUPG_CONFIG_H_INCLUDED
435 /* We didn't define endianness above, so get it from OS macros. This
436 is intended for making fat binary builds on OS X. */
437 #if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
438 # if defined(__BIG_ENDIAN__)
439 # define BIG_ENDIAN_HOST 1
440 # elif defined(__LITTLE_ENDIAN__)
441 # define LITTLE_ENDIAN_HOST 1
443 # error "No endianness found"
447 #if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
448 # define EXEC_TEMPFILE_ONLY
451 /* Please note that the string version must not contain more
452 than one character because the using code assumes strlen()==1 */
453 #ifdef HAVE_DOSISH_SYSTEM
454 # define DIRSEP_C '\\'
455 # define EXTSEP_C '.'
456 # define DIRSEP_S "\\"
457 # define EXTSEP_S "."
458 # define PATHSEP_C ';'
459 # define PATHSEP_S ";"
461 # define DIRSEP_C '/'
462 # define EXTSEP_C '.'
463 # define DIRSEP_S "/"
464 # define EXTSEP_S "."
465 # define PATHSEP_C ':'
466 # define PATHSEP_S ":"
470 /* For some OSes we need to use fixed strings for certain directories. */
471 #ifdef HAVE_DRIVE_LETTERS
472 # define LOCALEDIR "c:\\\\lib\\\\gnupg\\\\locale"
473 # define GNUPG_LIBDIR "c:\\\\lib\\\\gnupg"
474 # define GNUPG_LIBEXECDIR "c:\\\\lib\\\\gnupg"
475 # define GNUPG_DATADIR "c:\\\\lib\\\\gnupg"
476 # define GNUPG_HOMEDIR "c:\\\\gnupg"
479 # define GNUPG_HOMEDIR "/SYS\$LOGIN/gnupg"
481 # define GNUPG_HOMEDIR "~/.gnupg"
485 /* Hack used for W32: ldap.m4 also tests for the ASCII version of
486 ldap_start_tls_s because that is the actual symbol used in the
487 library. winldap.h redefines it to our commonly used value,
488 thus we define our usual macro here. */
489 #ifdef HAVE_LDAP_START_TLS_SA
490 # ifndef HAVE_LDAP_START_TLS_S
491 # define HAVE_LDAP_START_TLS_S 1
495 /* This is the major version number of GnuPG so that
496 source included files can test for this. */
497 #define GNUPG_MAJOR_VERSION 1
499 /* This is the same as VERSION, but should be overridden if the
500 platform cannot handle things like dots'.' in filenames. Set
501 SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
502 uses for dots and dashes. */
503 #define SAFE_VERSION VERSION
504 #define SAFE_VERSION_DOT '.'
505 #define SAFE_VERSION_DASH '-'
507 #endif /*GNUPG_CONFIG_H_INCLUDED*/
512 dnl Checks for programs.
516 missing_dir=`cd $ac_aux_dir && pwd`
517 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
518 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
519 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
520 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
521 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
526 AC_CHECK_TOOL(AR, ar, :)
527 AC_PATH_PROG(PERL,"perl")
532 AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no)
533 AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes)
535 GNUPG_CHECK_DOCBOOK_TO_TEXI
539 # According to a comment by Marcus Brinkman in libgpg-error, the
540 # AC_PROG_CC_FOR_BUILD macro in the AC archive is broken for autoconf
541 # 2.57. Thus we use a simply use "cc" if we are cross-compiling.
542 AC_MSG_CHECKING(for cc for build)
543 if test "$cross_compiling" = "yes"; then
544 CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
546 CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
548 AC_MSG_RESULT($CC_FOR_BUILD)
549 AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
555 have_dosish_system=no
559 # special stuff for Windoze NT
560 ac_cv_have_dev_random=no
561 AC_DEFINE(USE_ONLY_8DOT3,1,
562 [set this to limit filenames to the 8.3 format])
563 AC_DEFINE(HAVE_DRIVE_LETTERS,1,
564 [defined if we must run on a stupid file system])
565 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
566 [because the Unix gettext has too much overhead on
567 MingW32 systems and these systems lack Posix functions,
568 we use a simplified version of gettext])
569 AC_DEFINE(HAVE_W32_SYSTEM,1,
570 [Defined if we run on a W32 API based system])
571 disable_keyserver_path=yes
572 have_dosish_system=yes
576 use_simple_gettext=yes
579 i?86-emx-os2 | i?86-*-os2*emx )
580 # OS/2 with the EMX environment
581 ac_cv_have_dev_random=no
582 AC_DEFINE(HAVE_DRIVE_LETTERS)
583 have_dosish_system=yes
589 # DOS with the DJGPP environment
590 ac_cv_have_dev_random=no
591 AC_DEFINE(HAVE_DRIVE_LETTERS)
592 have_dosish_system=yes
598 if test -z "$GCC" ; then
599 CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
603 if test -z "$GCC" ; then
604 # Suppress all warnings
605 # to get rid of the unsigned/signed char mismatch warnings.
610 if test -z "$GCC" ; then
611 # Use the newer compiler `-msg_disable ptrmismatch1' to
612 # get rid of the unsigned/signed char mismatch warnings.
613 # Using this may hide other pointer mismatch warnings, but
614 # it at least lets other warning classes through
615 CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
624 if test "$have_dosish_system" = yes; then
625 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
626 [defined if we run on some of the PCDOS like systems
627 (DOS, Windoze. OS/2) with special properties like
630 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
632 AM_CONDITIONAL(USE_SIMPLE_GETTEXT, test x"$use_simple_gettext" = xyes)
633 AM_CONDITIONAL(HAVE_W32_SYSTEM, test x"$have_w32_system" = xyes)
635 if test "$disable_keyserver_path" = yes; then
636 AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
637 [define to disable exec-path for keyserver helpers])
640 AC_SUBST(MPI_OPT_FLAGS)
641 GNUPG_SYS_SYMBOL_UNDERSCORE
643 dnl These need to go after AC_PROG_CC so that $EXEEXT is defined
645 AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[The executable file extension, if any])
647 if test x"$try_hkp" = xyes ; then
648 AC_SUBST(GPGKEYS_HKP,"gpgkeys_hkp$EXEEXT")
651 if test x"$try_finger" = xyes ; then
652 AC_SUBST(GPGKEYS_FINGER,"gpgkeys_finger$EXEEXT")
655 dnl Must check for network library requirements before doing link tests
656 dnl for ldap, for example. If ldap libs are static (or dynamic and without
657 dnl ELF runtime link paths), then link will fail and LDAP support won't
660 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
661 [NETLIBS="-lnsl $NETLIBS"]))
662 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
663 [NETLIBS="-lsocket $NETLIBS"]))
665 dnl Now try for the resolver functions so we can use DNS for SRV, PKA,
668 if test x"$try_dns" = xyes ; then
669 if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
670 AC_ARG_ENABLE(dns-srv,
671 AC_HELP_STRING([--disable-dns-srv],
672 [disable the use of DNS SRV in HKP and HTTP]),
673 use_dns_srv=$enableval,use_dns_srv=yes)
676 AC_ARG_ENABLE(dns-pka,
677 AC_HELP_STRING([--disable-dns-pka],
678 [disable the use of PKA records in DNS]),
679 use_dns_pka=$enableval,use_dns_pka=yes)
681 AC_ARG_ENABLE(dns-cert,
682 AC_HELP_STRING([--disable-dns-cert],
683 [disable the use of CERT records in DNS]),
684 use_dns_cert=$enableval,use_dns_cert=yes)
687 if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns_cert" = xyes; then
690 # the double underscore thing is a glibc-ism?
691 AC_SEARCH_LIBS(res_query,resolv bind socket,,
692 AC_SEARCH_LIBS(__res_query,resolv bind socket,,have_resolver=no))
693 AC_SEARCH_LIBS(dn_expand,resolv bind socket,,
694 AC_SEARCH_LIBS(__dn_expand,resolv bind socket,,have_resolver=no))
695 AC_SEARCH_LIBS(dn_skipname,resolv bind socket,,
696 AC_SEARCH_LIBS(__dn_skipname,resolv bind socket,,have_resolver=no))
698 if test x"$have_resolver" != xno ; then
700 # Make sure that the BIND 4 resolver interface is workable before
701 # enabling any code that calls it. At some point I'll rewrite the
702 # code to use the BIND 8 resolver API.
704 AC_MSG_CHECKING([whether the resolver is usable])
705 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
706 #include <netinet/in.h>
707 #include <arpa/nameser.h>
708 #include <resolv.h>],
709 [[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],have_resolver=yes,have_resolver=no)
710 AC_MSG_RESULT($have_resolver)
712 # This is Apple-specific and somewhat bizarre as they changed the
713 # define in bind 8 for some reason.
715 if test x"$have_resolver" != xyes ; then
716 AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
717 AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
718 #include <sys/types.h>
719 #include <netinet/in.h>
720 #include <arpa/nameser.h>
721 #include <resolv.h>],
722 [[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],[have_resolver=yes ; need_compat=yes])
723 AC_MSG_RESULT($have_resolver)
727 if test x"$have_resolver" = xyes ; then
730 if test x"$use_dns_srv" = xyes ; then
731 AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
734 if test x"$use_dns_pka" = xyes ; then
735 AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
738 if test x"$use_dns_cert" = xyes ; then
739 AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
742 if test x"$need_compat" = xyes ; then
743 AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
756 AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
760 if test "$try_ldap" = yes ; then
761 GNUPG_CHECK_LDAP($NETLIBS)
764 # Check for curl. We fake the curl API if libcurl isn't installed.
765 # We require 7.10 or better as we use curl_version_info().
767 LIBCURL_CHECK_CONFIG([yes],[7.10],,[fake_curl=yes])
768 AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
770 # Generic, for us, means curl
772 if test x"$try_generic" = xyes ; then
773 AC_SUBST(GPGKEYS_CURL,"gpgkeys_curl$EXEEXT")
776 dnl This isn't necessarily sendmail itself, but anything that gives a
777 dnl sendmail-ish interface to the outside world. That includes qmail,
778 dnl postfix, etc. Basically, anything that can handle "sendmail -t".
780 if test "$try_mailto" = yes ; then
781 AC_ARG_WITH(mailprog,
782 AC_HELP_STRING([--with-mailprog=NAME],
783 [use "NAME -t" for mail transport]),,with_mailprog=yes)
785 if test "$with_mailprog" = yes ; then
786 AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
787 if test "$ac_cv_path_SENDMAIL" ; then
788 GPGKEYS_MAILTO="gpgkeys_mailto"
790 elif test "$with_mailprog" != no ; then
791 AC_MSG_CHECKING([for a mail transport program])
792 AC_SUBST(SENDMAIL,$with_mailprog)
793 AC_MSG_RESULT($with_mailprog)
794 GPGKEYS_MAILTO="gpgkeys_mailto"
798 AC_SUBST(GPGKEYS_MAILTO)
802 PRINTABLE_OS_NAME="MingW32"
805 PRINTABLE_OS_NAME="Cygwin"
807 i?86-emx-os2 | i?86-*-os2*emx )
808 PRINTABLE_OS_NAME="OS/2"
811 PRINTABLE_OS_NAME="MSDOS/DJGPP"
815 PRINTABLE_OS_NAME="GNU/Linux"
818 PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
821 AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
822 [A human readable text with the name of the OS])
826 # 1. Set names of random devices
828 NAME_OF_DEV_RANDOM="/dev/random"
829 NAME_OF_DEV_URANDOM="/dev/urandom"
832 NAME_OF_DEV_RANDOM="/dev/srandom"
833 NAME_OF_DEV_URANDOM="/dev/urandom"
836 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM",
837 [defined to the name of the strong random device])
838 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM",
839 [defined to the name of the weaker random device])
840 AC_SUBST(MPI_OPT_FLAGS)
843 dnl Checks for libraries.
846 AM_GNU_GETTEXT_VERSION([0.16.1])
847 if test "$try_gettext" = yes; then
848 AM_GNU_GETTEXT(,[need-ngettext])
849 # gettext requires some extra checks. These really should be part of
850 # the basic AM_GNU_GETTEXT macro. TODO: move other gettext-specific
851 # function checks to here.
852 AC_CHECK_FUNCS(strchr)
856 USE_INCLUDED_LIBINTL=no
857 BUILD_INCLUDED_LIBINTL=no
860 AC_SUBST(USE_INCLUDED_LIBINTL)
861 AC_SUBST(BUILD_INCLUDED_LIBINTL)
866 if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
867 if test "$need_dlopen" = yes; then
870 AC_SEARCH_LIBS(dlopen,dl,found_dlopen=yes)
871 if test x"$found_dlopen" = "xyes" ; then
872 AC_DEFINE(HAVE_DL_DLOPEN,1,
873 [Defined when the dlopen function family is available])
876 if test "$try_extensions" = yes ; then
877 AC_MSG_NOTICE([dlopen not found. Disabling extensions.])
881 if test "$card_support" = yes ; then
882 AC_MSG_WARN([dlopen not found. Disabling OpenPGP card support.])
892 if test "$card_support" = yes ; then
893 AC_DEFINE(ENABLE_CARD_SUPPORT,1,[Define to include OpenPGP card support])
896 if test "$agent_support" = yes ; then
897 AC_DEFINE(ENABLE_AGENT_SUPPORT,1,[Define to include gpg-agent support])
900 if test "$try_extensions" = yes ; then
901 AC_DEFINE(USE_DYNAMIC_LINKING,1,[Define to enable the use of extensions])
904 if test "$selinux_support" = yes ; then
905 AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support])
908 if test "$gnupg_use_iconv" = yes ; then
909 AC_DEFINE(USE_GNUPG_ICONV,1,[Define to use the new iconv based code])
912 AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes)
913 AM_CONDITIONAL(ENABLE_AGENT_SUPPORT, test "$agent_support" = yes)
915 dnl Checks for header files.
917 AC_CHECK_HEADERS([unistd.h langinfo.h termio.h locale.h getopt.h pwd.h])
919 # Note that we do not check for iconv here because this is done anyway
920 # by the gettext checks and thus it allows us to disable the use of
921 # iconv by using --disable-nls.
923 dnl Checks for typedefs, structures, and compiler characteristics.
932 AC_ARG_ENABLE(endian-check,
933 AC_HELP_STRING([--disable-endian-check],
934 [disable the endian check and trust the OS provided macros]),
935 endiancheck=$enableval,endiancheck=yes)
937 if test x"$endiancheck" = xyes ; then
941 GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
942 GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
943 GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
944 GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
945 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
947 AC_CHECK_SIZEOF(unsigned short)
948 AC_CHECK_SIZEOF(unsigned int)
949 AC_CHECK_SIZEOF(unsigned long)
950 AC_CHECK_SIZEOF(unsigned long long)
952 # Ensure that we have UINT64_C before we bother to check for uint64_t
953 AC_CHECK_HEADERS([inttypes.h])
954 AC_CACHE_CHECK([for UINT64_C], [gnupg_cv_uint64_c_works],
955 AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>],[
956 uint64_t foo=UINT64_C(42);]),gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
958 if test "$gnupg_cv_uint64_c_works" = "yes" ; then
959 AC_CHECK_SIZEOF(uint64_t)
962 if test "$ac_cv_sizeof_unsigned_short" = "0" \
963 || test "$ac_cv_sizeof_unsigned_int" = "0" \
964 || test "$ac_cv_sizeof_unsigned_long" = "0"; then
965 AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
968 dnl Do we have any 64-bit data types?
969 if test x"$use_sha512" = xyes \
970 && test "$ac_cv_sizeof_unsigned_int" != "8" \
971 && test "$ac_cv_sizeof_unsigned_long" != "8" \
972 && test "$ac_cv_sizeof_unsigned_long_long" != "8" \
973 && test x"$ac_cv_sizeof_uint64_t" != "x8"; then
974 AC_MSG_NOTICE([No 64-bit types. Disabling SHA-384 and SHA-512.])
978 if test x"$use_sha512" = xyes ; then
979 AC_DEFINE(USE_SHA512,1,[Define to include the SHA-384 and SHA-512 digests])
982 AM_CONDITIONAL(USE_SHA512, test x"$use_sha512" = xyes)
984 dnl Checks for library functions.
985 AC_CHECK_DECLS(getpagesize)
989 AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr strtoul mmap sysconf)
990 AC_CHECK_FUNCS(strcasecmp strncasecmp ctermid times unsetenv getpwnam getpwuid)
991 AC_CHECK_FUNCS(memmove gettimeofday getrusage setrlimit clock_gettime)
992 AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale)
993 AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat getaddrinfo)
994 AC_CHECK_FUNCS(fcntl ftruncate)
995 AC_REPLACE_FUNCS(mkdtemp timegm isascii memrchr strsep)
997 AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
999 # See if getopt is in libiberty. This is of course not optimal since
1000 # it might be somewhere other than libiberty, but does cover the
1003 AC_CHECK_FUNC(getopt,,AC_CHECK_LIB(iberty,getopt,AC_SUBST(GETOPT,"-liberty")))
1006 # check for gethrtime and run a testprogram to see whether
1007 # it is broken. It has been reported that some Solaris and HP UX systems
1010 AC_CACHE_CHECK([for gethrtime],
1011 [gnupg_cv_func_gethrtime],
1012 [AC_TRY_LINK([#include <sys/times.h>],[
1016 [gnupg_cv_func_gethrtime=yes],
1017 [gnupg_cv_func_gethrtime=no])
1019 if test $gnupg_cv_func_gethrtime = yes; then
1020 AC_DEFINE([HAVE_GETHRTIME], 1,
1021 [Define if you have the `gethrtime(2)' function.])
1022 AC_CACHE_CHECK([whether gethrtime is broken],
1023 [gnupg_cv_func_broken_gethrtime],
1025 #include <sys/times.h>
1031 [gnupg_cv_func_broken_gethrtime=no],
1032 [gnupg_cv_func_broken_gethrtime=yes],
1033 [gnupg_cv_func_broken_gethrtime=assume-no])
1035 if test $gnupg_cv_func_broken_gethrtime = yes; then
1036 AC_DEFINE([HAVE_BROKEN_GETHRTIME], 1,
1037 [Define if `gethrtime(2)' does not work correctly i.e. issues a SIGILL.])
1043 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
1046 dnl Check whether we can use Linux capabilities as requested
1048 if test "$use_capabilities" = "yes" ; then
1052 *** WARNING: using capabilities with GnuPG is experimental code!
1056 AC_CHECK_HEADERS(sys/capability.h)
1057 if test "$ac_cv_header_sys_capability_h" = "yes" ; then
1058 AC_CHECK_LIB(cap, cap_init, ac_need_libcap=1)
1059 if test "$ac_cv_lib_cap_cap_init" = "yes"; then
1060 AC_DEFINE(USE_CAPABILITIES,1,
1061 [define if capabilities should be used])
1062 AC_SUBST(CAPLIBS,"-lcap")
1063 use_capabilities=yes
1066 if test "$use_capabilities" = "no" ; then
1069 *** The use of capabilities on this system is not possible.
1070 *** You need a recent Linux kernel and some patches:
1071 *** fcaps-2.2.9-990610.patch (kernel patch for 2.2.9)
1072 *** fcap-module-990613.tar.gz (kernel module)
1073 *** libcap-1.92.tar.gz (user mode library and utilities)
1074 *** And you have to configure the kernel with CONFIG_VFS_CAP_PLUGIN
1075 *** set (filesystems menu). Be warned: This code is *really* ALPHA.
1082 if test "$ac_cv_header_sys_shm_h" = "yes"; then
1083 AC_DEFINE(USE_SHM_COPROCESSING,1,
1084 [define if the shared memory interface should be made available])
1087 AM_CONDITIONAL(HAVE_SHM, test "$ac_cv_header_sys_shm_h" = yes)
1090 dnl check whether we have a random device
1092 if test "$try_dev_random" = yes ; then
1093 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
1094 [if test -r "$NAME_OF_DEV_RANDOM" && test -r "$NAME_OF_DEV_URANDOM" ; then
1095 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
1096 if test "$ac_cv_have_dev_random" = yes; then
1097 AC_DEFINE(HAVE_DEV_RANDOM,1,
1098 [defined if the system supports a random device] )
1101 AC_MSG_CHECKING(for random device)
1102 ac_cv_have_dev_random=no
1103 AC_MSG_RESULT(has been disabled)
1108 dnl Figure out the default random module.
1111 if test "$use_static_rnd" = default; then
1112 if test "$ac_cv_have_dev_random" = yes; then
1113 random_modules="rndlinux"
1116 *-mingw32*|*-*-cygwin*)
1117 random_modules="rndw32"
1119 i?86-emx-os2|i?86-*-os2*emx)
1120 random_modules="rndos2"
1123 random_modules="rndatari"
1129 random_modules="rndlinux rndegd rndunix"
1130 AC_DEFINE(USE_ALL_RANDOM_MODULES, 1,
1131 [Allow to select random modules at runtime.])
1136 if test "$use_static_rnd" = auto; then
1137 random_modules="rndlinux rndegd rndunix"
1138 AC_DEFINE(USE_ALL_RANDOM_MODULES, 1)
1140 random_modules="rnd$use_static_rnd";
1144 if test -z "$random_modules"; then
1145 AC_MSG_ERROR(no random module available)
1147 print_egd_warning=no
1148 for rndmod in $random_modules "" ; do
1151 AC_DEFINE(USE_RNDLINUX,1,
1152 [Defined if the /dev/random based RNG should be used.])
1156 AC_DEFINE(USE_RNDUNIX,1,
1157 [Defined if the default Unix RNG should be used.])
1158 print_egd_warning=yes
1162 AC_DEFINE(USE_RNDEGD,1,
1163 [Defined if the EGD based RNG should be used.])
1167 AC_DEFINE(USE_RNDW32,1,
1168 [Defined if the Windows specific RNG should be used.])
1174 AM_CONDITIONAL(USE_RNDLINUX, test "$use_rndlinux" = yes)
1175 AM_CONDITIONAL(USE_RNDUNIX, test "$use_rndunix" = yes)
1176 AM_CONDITIONAL(USE_RNDEGD, test "$use_rndegd" = yes)
1177 AM_CONDITIONAL(USE_RNDW32, test "$use_rndw32" = yes)
1179 dnl setup assembler stuff
1180 AC_MSG_CHECKING(for mpi assembler functions)
1181 if test -f $srcdir/mpi/config.links ; then
1182 . $srcdir/mpi/config.links
1183 AC_CONFIG_LINKS("$mpi_ln_list")
1184 ac_cv_mpi_extra_asm_modules="$mpi_extra_modules"
1185 ac_cv_mpi_sflags="$mpi_sflags"
1186 ac_cv_mpi_config_done="yes"
1189 AC_MSG_RESULT(failed)
1190 AC_MSG_ERROR([mpi/config.links missing!])
1192 MPI_EXTRA_ASM_OBJS=""
1194 if test "$ac_cv_mpi_extra_asm_modules" != ""; then
1195 for i in $ac_cv_mpi_extra_asm_modules; do
1196 show_extraasm="$show_extraasm $i"
1197 MPI_EXTRA_ASM_OBJS="$MPI_EXTRA_ASM_OBJS $i.o"
1200 AC_SUBST(MPI_EXTRA_ASM_OBJS)
1201 MPI_SFLAGS="$ac_cv_mpi_sflags"
1202 AC_SUBST(MPI_SFLAGS)
1204 # Sanity check regex. Tests adapted from mutt.
1206 AC_MSG_CHECKING([whether regular expression support is requested])
1207 AC_ARG_ENABLE(regex,
1208 AC_HELP_STRING([--disable-regex],
1209 [do not handle regular expressions in trust signatures]),
1210 use_regex=$enableval, use_regex=yes)
1211 AC_MSG_RESULT($use_regex)
1213 if test "$use_regex" = yes ; then
1214 AC_MSG_CHECKING([whether the included regex lib is requested])
1215 AC_ARG_WITH(included-regex,
1216 AC_HELP_STRING([--with-included-regex],
1217 [use the included GNU regex library]),
1218 [gnupg_cv_included_regex="$withval"],[gnupg_cv_included_regex=no])
1219 AC_MSG_RESULT($gnupg_cv_included_regex)
1221 if test $gnupg_cv_included_regex = no ; then
1222 # Does the system have regex functions at all?
1223 AC_CHECK_FUNC(regcomp,gnupg_cv_included_regex=no,
1224 gnupg_cv_included_regex=yes)
1227 if test $gnupg_cv_included_regex = no ; then
1228 AC_CACHE_CHECK([whether your system's regexp library is broken],
1229 [gnupg_cv_regex_broken],
1233 main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }],
1234 gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
1236 if test $gnupg_cv_regex_broken = yes ; then
1237 AC_MSG_WARN(your regex is broken - using the included GNU regex instead.)
1238 gnupg_cv_included_regex=yes
1242 if test $gnupg_cv_included_regex = yes; then
1243 AC_DEFINE(USE_INTERNAL_REGEX,1,[ Define if you want to use the included regex lib ])
1246 AC_DEFINE(DISABLE_REGEX,1,[ Define to disable regular expression support ])
1249 AM_CONDITIONAL(USE_INTERNAL_REGEX, test x"$gnupg_cv_included_regex" = xyes)
1251 dnl Do we have zlib? Must do it here because Solaris failed
1252 dnl when compiling a conftest (due to the "-lz" from LIBS).
1254 if test "$g10_force_zlib" = "yes"; then
1257 _cppflags="${CPPFLAGS}"
1258 _ldflags="${LDFLAGS}"
1261 AC_HELP_STRING([--with-zlib=DIR],[use libz in DIR]),[
1262 if test -d "$withval"; then
1263 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1264 LDFLAGS="${LDFLAGS} -L$withval/lib"
1268 AC_CHECK_HEADER(zlib.h,
1269 AC_CHECK_LIB(z, deflateInit2_,
1272 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1273 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
1276 if test "$use_local_zlib" = yes ; then
1277 AC_CONFIG_LINKS(zlib.h:zlib/zlib.h zconf.h:zlib/zconf.h )
1278 ZLIBS="../zlib/libzlib.a"
1281 AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, test "$use_local_zlib" = yes)
1283 if test "$use_bzip2" = yes ; then
1284 _cppflags="${CPPFLAGS}"
1285 _ldflags="${LDFLAGS}"
1287 AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
1289 if test -d "$withval" ; then
1290 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1291 LDFLAGS="${LDFLAGS} -L$withval/lib"
1295 # Checking alongside stdio.h as an early version of bzip2 (1.0)
1296 # required stdio.h to be included before bzlib.h, and Solaris 9 is
1297 # woefully out of date.
1299 if test "$withval" != no ; then
1300 AC_CHECK_HEADER(bzlib.h,
1301 AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
1304 ZLIBS="$ZLIBS -lbz2"
1305 AC_DEFINE(HAVE_BZIP2,1,
1306 [Defined if the bz2 compression library is available])
1308 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1309 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>])
1313 AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
1316 # libusb allows us to use the integrated CCID smartcard reader driver.
1317 # We don't need it if we don't have card support though.
1318 if test "$card_support" = yes ; then
1322 # Check for readline support
1323 GNUPG_CHECK_READLINE
1325 # Allow users to append something to the version string without
1326 # flagging it as development version. The user version parts is
1327 # considered everything after a dash.
1328 if test "$development_version" != yes; then
1332 if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
1333 development_version=yes
1336 if test "$development_version" = yes; then
1337 AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
1338 [Defined if this is not a regular release])
1341 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
1344 # add some extra libs here so that previous tests don't fail for
1345 # mysterious reasons - the final link step should bail out.
1348 dnl NETLIBS="$NETLIBS -lwsock32"
1358 # Special options used with gcc.
1359 if test "$GCC" = yes; then
1360 # Note that it is okay to use CFLAGS here because this are just
1361 # warning options and the user should have a chance of overriding
1363 if test "$USE_MAINTAINER_MODE" = "yes"; then
1364 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
1365 CFLAGS="$CFLAGS -Wformat-nonliteral"
1367 CFLAGS="$CFLAGS -Wall"
1370 # This is handy for debugging so the compiler doesn't rearrange
1371 # things and eliminate variables.
1372 AC_ARG_ENABLE(optimization,
1373 AC_HELP_STRING([--disable-optimization],
1374 [disable compiler optimization]),
1375 [if test $enableval = no ; then
1376 CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
1379 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
1381 _gcc_cflags_save=$CFLAGS
1382 CFLAGS="-Wno-pointer-sign"
1384 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1385 AC_MSG_RESULT($_gcc_psign)
1387 CFLAGS=$_gcc_cflags_save;
1389 if test x"$_gcc_psign" = xyes ; then
1390 CFLAGS="$CFLAGS -Wno-pointer-sign"
1396 if test "$print_egd_warning" = yes; then
1399 *** The performance of the UNIX random gatherer module is not very good
1400 *** and it does not keep the entropy pool over multiple invocations of
1401 *** GnuPG. The suggested way to overcome this problem is to use the
1403 *** Entropy Gathering Daemon (EGD)
1405 *** which provides a entropy source for the whole system. It is written
1406 *** in Perl and available at the GnuPG FTP servers. For more information
1407 *** consult the GnuPG webpages:
1409 *** http://www.gnupg.org/download/#EGD
1411 *** You may want to run ./configure with --enable-static-rnd=egd or
1412 *** --enable-static-rnd=auto to use it.
1426 keyserver/gpgkeys_mailto
1427 keyserver/gpgkeys_test
1436 # Give some feedback
1438 echo " Version info: $PACKAGE_STRING"
1439 echo " Configured for: $PRINTABLE_OS_NAME ($host)"
1440 if test -n "$show_extraasm"; then
1441 echo " Extra cpu specific functions:$show_extraasm"
1445 if test x"$use_camellia" = xyes ; then
1446 echo "WARNING: The Camellia cipher is for testing only and is NOT for production use!"