1 # configure.ac script for GnuPG
2 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
3 # 2007 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" right before creating a distribution.
28 m4_define([my_version], [1.4.8rc2])
29 m4_define([my_issvn], [no])
31 m4_define([svn_revision], m4_esyscmd([echo -n $((svn info 2>/dev/null \
32 || echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
33 AC_INIT([gnupg], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
35 # Set development_version to yes if the minor number is odd or you
36 # feel that the default check for a development version is not
38 development_version=no
40 AC_CONFIG_AUX_DIR(scripts)
41 AC_CONFIG_SRCDIR(g10/gpg.c)
43 AM_INIT_AUTOMAKE([std-options])
45 AM_CONFIG_HEADER(config.h)
50 dnl Check for random module options
52 AC_MSG_CHECKING([which random module to use])
53 AC_ARG_ENABLE(static-rnd,
54 AC_HELP_STRING([[--enable-static-rnd=[egd|unix|linux|auto]]],
55 [specify a random number source]),
56 [use_static_rnd=$enableval], [use_static_rnd=default])
58 if test "$use_static_rnd" = no; then
59 use_static_rnd=default
62 case "$use_static_rnd" in
63 egd | linux | unix | default )
64 AC_MSG_RESULT($use_static_rnd)
67 AC_MSG_RESULT(automagically selected at runtime)
70 AC_MSG_RESULT(invalid argument)
71 AC_MSG_ERROR(there is no random module rnd$use_static_rnd)
75 AC_ARG_WITH(egd-socket,
76 AC_HELP_STRING([--with-egd-socket=NAME],[use NAME for the EGD socket]),
77 egd_socket_name="$withval", egd_socket_name="" )
78 AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name",
79 [Define if you don't want the default EGD socket name.
80 For details see cipher/rndegd.c])
84 dnl See whether the user wants to disable checking for /dev/random
86 AC_MSG_CHECKING([whether use of /dev/random is requested])
87 AC_ARG_ENABLE(dev-random,
88 AC_HELP_STRING([--disable-dev-random],[disable the use of dev random]),
89 try_dev_random=$enableval, try_dev_random=yes)
90 AC_MSG_RESULT($try_dev_random)
94 dnl Check other options
97 AC_MSG_CHECKING([whether assembler modules are requested])
99 AC_HELP_STRING([--disable-asm],[do not use assembler modules]),
100 try_asm_modules=$enableval, try_asm_modules=yes)
101 AC_MSG_RESULT($try_asm_modules)
103 dnl AC_MSG_CHECKING([whether memory guard is requested])
104 dnl AC_ARG_ENABLE(m-guard,
105 dnl [ --enable-m-guard enable memory guard facility],
106 dnl use_m_guard=$enableval, use_m_guard=no)
107 dnl AC_MSG_RESULT($use_m_guard)
108 dnl if test "$use_m_guard" = yes ; then
109 dnl AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature])
112 # SELinux support includes tracking of sensitive files to avoid
113 # leaking their contents through processing these files by gpg itself
114 AC_MSG_CHECKING([whether SELinux support is requested])
115 AC_ARG_ENABLE(selinux-support,
116 AC_HELP_STRING([--enable-selinux-support],
117 [enable SELinux support]),
118 selinux_support=$enableval, selinux_support=no)
119 AC_MSG_RESULT($selinux_support)
122 AC_MSG_CHECKING([whether the new iconv based code is requested])
123 AC_ARG_ENABLE(gnupg-iconv,
124 AC_HELP_STRING([--disable-gnupg-iconv],
125 [disable the new iconv code]),
126 gnupg_use_iconv=$enableval, gnupg_use_iconv=yes)
127 AC_MSG_RESULT($gnupg_use_iconv)
129 dnl See if we are disabling any algorithms or features for a smaller
149 disable_keyserver_path=no
151 AC_ARG_ENABLE(minimal,
152 AC_HELP_STRING([--enable-minimal],[build the smallest gpg binary possible]),
170 AC_MSG_CHECKING([whether OpenPGP card support is requested])
171 AC_ARG_ENABLE(card-support,
172 AC_HELP_STRING([--disable-card-support],
173 [disable OpenPGP card support]),
174 card_support=$enableval)
175 AC_MSG_RESULT($card_support)
178 # Note that we may later disable the agent support based on the platform.
179 AC_MSG_CHECKING([whether gpg-agent support is requested])
180 AC_ARG_ENABLE(agent-support,
181 AC_HELP_STRING([--disable-agent-support],
182 [disable gpg-agent support]),
183 agent_support=$enableval)
184 AC_MSG_RESULT($agent_support)
187 AC_MSG_CHECKING([whether to enable the RSA public key algorithm])
189 AC_HELP_STRING([--disable-rsa],[disable the RSA public key algorithm]),
191 AC_MSG_RESULT($use_rsa)
192 if test x"$use_rsa" = xyes ; then
193 AC_DEFINE(USE_RSA,1,[Define to include the RSA public key algorithm])
196 AC_MSG_CHECKING([whether to enable the IDEA cipher])
198 AC_HELP_STRING([--disable-idea],[disable the IDEA cipher]),
200 AC_MSG_RESULT($use_idea)
201 if test x"$use_idea" = xyes ; then
202 AC_DEFINE(USE_IDEA,1,[Define to include the IDEA cipher])
204 # We don't need idea but some people claim that they need it for
205 # research etc., so we allow to place an idea source code into the
206 # cipher directory and statically link it if available, otherwise we
207 # link to a stub. We don't use AC_CHECK_FILE to avoid caching.
209 AC_MSG_CHECKING([for idea cipher module])
211 if test -f $srcdir/cipher/idea.c; then
223 AC_MSG_CHECKING([whether to enable the CAST5 cipher])
225 AC_HELP_STRING([--disable-cast5],[disable the CAST5 cipher]),
226 use_cast5=$enableval)
227 AC_MSG_RESULT($use_cast5)
228 if test x"$use_cast5" = xyes ; then
229 AC_DEFINE(USE_CAST5,1,[Define to include the CAST5 cipher])
232 AC_MSG_CHECKING([whether to enable the BLOWFISH cipher])
233 AC_ARG_ENABLE(blowfish,
234 AC_HELP_STRING([--disable-blowfish],[disable the BLOWFISH cipher]),
235 use_blowfish=$enableval)
236 AC_MSG_RESULT($use_blowfish)
237 if test x"$use_blowfish" = xyes ; then
238 AC_DEFINE(USE_BLOWFISH,1,[Define to include the BLOWFISH cipher])
241 AC_MSG_CHECKING([whether to enable the AES ciphers])
243 AC_HELP_STRING([--disable-aes],[disable the AES, AES192, and AES256 ciphers]),
245 AC_MSG_RESULT($use_aes)
246 if test x"$use_aes" = xyes ; then
247 AC_DEFINE(USE_AES,1,[Define to include the AES, AES192, and AES256 ciphers])
250 AC_MSG_CHECKING([whether to enable the TWOFISH cipher])
251 AC_ARG_ENABLE(twofish,
252 AC_HELP_STRING([--disable-twofish],[disable the TWOFISH cipher]),
253 use_twofish=$enableval)
254 AC_MSG_RESULT($use_twofish)
255 if test x"$use_twofish" = xyes ; then
256 AC_DEFINE(USE_TWOFISH,1,[Define to include the TWOFISH cipher])
259 AC_MSG_CHECKING([whether to enable the CAMELLIA cipher])
260 AC_ARG_ENABLE(camellia,
261 AC_HELP_STRING([--enable-camellia],[enable the CAMELLIA cipher]),
262 use_camellia=$enableval)
263 AC_MSG_RESULT($use_camellia)
264 if test x"$use_camellia" = xyes ; then
265 AC_DEFINE(USE_CAMELLIA,1,[Define to include the CAMELLIA cipher])
268 *** The Camellia cipher is for testing only and is NOT for production use!
272 AC_MSG_CHECKING([whether to enable the SHA-224 and SHA-256 digests])
273 AC_ARG_ENABLE(sha256,
274 AC_HELP_STRING([--disable-sha256],[disable the SHA-224 and SHA-256 digests]),
275 use_sha256=$enableval)
276 AC_MSG_RESULT($use_sha256)
277 if test x"$use_sha256" = xyes ; then
278 AC_DEFINE(USE_SHA256,1,[Define to include the SHA-224 and SHA-256 digests])
281 dnl SHA512 is defined only after we confirm 64-bit support later
282 AC_MSG_CHECKING([whether to enable the SHA-384 and SHA-512 digests])
283 AC_ARG_ENABLE(sha512,
284 AC_HELP_STRING([--disable-sha512],[disable the SHA-384 and SHA-512 digests]),
285 use_sha512=$enableval)
286 AC_MSG_RESULT($use_sha512)
288 dnl BZLIB is defined only after we confirm the library is available later
289 AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
291 AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
292 use_bzip2=$enableval)
293 AC_MSG_RESULT($use_bzip2)
295 AC_MSG_CHECKING([whether to enable external program execution])
297 AC_HELP_STRING([--disable-exec],[disable all external program execution]),
299 AC_MSG_RESULT($use_exec)
300 if test "$use_exec" = no ; then
301 AC_DEFINE(NO_EXEC,1,[Define to disable all external program execution])
304 if test "$use_exec" = yes ; then
305 AC_MSG_CHECKING([whether to enable photo ID viewing])
306 AC_ARG_ENABLE(photo-viewers,
307 AC_HELP_STRING([--disable-photo-viewers],[disable photo ID viewers]),
308 [if test "$enableval" = no ; then
309 AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
311 gnupg_cv_enable_photo_viewers=$enableval
312 AC_MSG_RESULT($enableval)
314 if test "$gnupg_cv_enable_photo_viewers" = yes ; then
315 AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
316 AC_ARG_WITH(photo-viewer,
317 AC_HELP_STRING([--with-photo-viewer=FIXED_VIEWER],
318 [set a fixed photo ID viewer]),
319 [if test "$withval" = yes ; then
321 elif test "$withval" != no ; then
322 AC_DEFINE_UNQUOTED(FIXED_PHOTO_VIEWER,"$withval",
323 [if set, restrict photo-viewer to this])
325 AC_MSG_RESULT($withval)
328 AC_MSG_CHECKING([whether to enable external keyserver helpers])
329 AC_ARG_ENABLE(keyserver-helpers,
330 AC_HELP_STRING([--disable-keyserver-helpers],
331 [disable all external keyserver support]),
332 [if test "$enableval" = no ; then
333 AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
334 [define to disable keyserver helpers])
336 gnupg_cv_enable_keyserver_helpers=$enableval
337 AC_MSG_RESULT($enableval)
339 if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
340 dnl LDAP is defined only after we confirm the library is available later
341 AC_MSG_CHECKING([whether LDAP keyserver support is requested])
343 AC_HELP_STRING([--disable-ldap],[disable LDAP keyserver interface only]),
344 try_ldap=$enableval, try_ldap=yes)
345 AC_MSG_RESULT($try_ldap)
347 AC_MSG_CHECKING([whether HKP keyserver support is requested])
349 AC_HELP_STRING([--disable-hkp],[disable HKP keyserver interface only]),
350 try_hkp=$enableval, try_hkp=yes)
351 AC_MSG_RESULT($try_hkp)
353 AC_MSG_CHECKING([whether finger key fetching support is requested])
354 AC_ARG_ENABLE(finger,
355 AC_HELP_STRING([--disable-finger],
356 [disable finger key fetching interface only]),
357 try_finger=$enableval, try_finger=yes)
358 AC_MSG_RESULT($try_finger)
360 AC_MSG_CHECKING([whether generic object key fetching support is requested])
361 AC_ARG_ENABLE(generic,
362 AC_HELP_STRING([--disable-generic],
363 [disable generic object key fetching interface only]),
364 try_generic=$enableval, try_generic=yes)
365 AC_MSG_RESULT($try_generic)
367 AC_MSG_CHECKING([whether email keyserver support is requested])
368 AC_ARG_ENABLE(mailto,
369 AC_HELP_STRING([--enable-mailto],
370 [enable email keyserver interface only]),
371 try_mailto=$enableval, try_mailto=no)
372 AC_MSG_RESULT($try_mailto)
375 AC_MSG_CHECKING([whether keyserver exec-path is enabled])
376 AC_ARG_ENABLE(keyserver-path,
377 AC_HELP_STRING([--disable-keyserver-path],
378 [disable the exec-path option for keyserver helpers]),
379 [if test "$enableval" = no ; then
380 disable_keyserver_path=yes
382 AC_MSG_RESULT($enableval)
385 AC_MSG_CHECKING([whether the included zlib is requested])
386 AC_ARG_WITH(included-zlib,
387 AC_HELP_STRING([--with-included-zlib],[use the zlib code included here]),
388 [g10_force_zlib="$withval"], [g10_force_zlib=no] )
389 AC_MSG_RESULT($g10_force_zlib)
392 dnl Check for the key/uid cache size. This can't be zero, but can be
393 dnl pretty small on embedded systems.
395 AC_MSG_CHECKING([for the size of the key and uid cache])
396 AC_ARG_ENABLE(key-cache,
397 AC_HELP_STRING([--enable-key-cache=SIZE],[Set key cache to SIZE (default 4096)]),,enableval=4096)
399 if test "$enableval" = "no"; then
401 elif test "$enableval" = "yes" || test "$enableval" = ""; then
406 key_cache_size=`echo "$enableval" | sed 's/[A-Za-z]//g'`
409 if test "$enableval" != "$key_cache_size" || test "$key_cache_size" -lt 5; then
410 AC_MSG_ERROR([invalid key-cache size])
413 AC_MSG_RESULT($key_cache_size)
414 AC_DEFINE_UNQUOTED(PK_UID_CACHE_SIZE,$key_cache_size,[Size of the key and UID caches])
417 dnl Check whether we want to use Linux capabilities
419 AC_MSG_CHECKING([whether use of capabilities is requested])
420 AC_ARG_WITH(capabilities,
421 AC_HELP_STRING([--with-capabilities],
422 [use linux capabilities [default=no]]),
423 [use_capabilities="$withval"],[use_capabilities=no])
424 AC_MSG_RESULT($use_capabilities)
426 # To avoid double inclusion of config.h which might happen at some
427 # places, we add the usual double inclusion protection.
429 #ifndef GNUPG_CONFIG_H_INCLUDED
430 #define GNUPG_CONFIG_H_INCLUDED
434 /* We didn't define endianness above, so get it from OS macros. This
435 is intended for making fat binary builds on OS X. */
436 #if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
437 # if defined(__BIG_ENDIAN__)
438 # define BIG_ENDIAN_HOST 1
439 # elif defined(__LITTLE_ENDIAN__)
440 # define LITTLE_ENDIAN_HOST 1
442 # error "No endianness found"
446 #if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
447 # define EXEC_TEMPFILE_ONLY
450 /* Please note that the string version must not contain more
451 than one character because the using code assumes strlen()==1 */
452 #ifdef HAVE_DOSISH_SYSTEM
453 # define DIRSEP_C '\\'
454 # define EXTSEP_C '.'
455 # define DIRSEP_S "\\"
456 # define EXTSEP_S "."
457 # define PATHSEP_C ';'
458 # define PATHSEP_S ";"
460 # define DIRSEP_C '/'
461 # define EXTSEP_C '.'
462 # define DIRSEP_S "/"
463 # define EXTSEP_S "."
464 # define PATHSEP_C ':'
465 # define PATHSEP_S ":"
469 /* For some OSes we need to use fixed strings for certain directories. */
470 #ifdef HAVE_DRIVE_LETTERS
471 # define LOCALEDIR "c:\\\\lib\\\\gnupg\\\\locale"
472 # define GNUPG_LIBDIR "c:\\\\lib\\\\gnupg"
473 # define GNUPG_LIBEXECDIR "c:\\\\lib\\\\gnupg"
474 # define GNUPG_DATADIR "c:\\\\lib\\\\gnupg"
475 # define GNUPG_HOMEDIR "c:\\\\gnupg"
478 # define GNUPG_HOMEDIR "/SYS\$LOGIN/gnupg"
480 # define GNUPG_HOMEDIR "~/.gnupg"
485 /* This is the major version number of GnuPG so that
486 source included files can test for this. */
487 #define GNUPG_MAJOR_VERSION 1
489 /* This is the same as VERSION, but should be overridden if the
490 platform cannot handle things like dots'.' in filenames. Set
491 SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
492 uses for dots and dashes. */
493 #define SAFE_VERSION VERSION
494 #define SAFE_VERSION_DOT '.'
495 #define SAFE_VERSION_DASH '-'
497 #endif /*GNUPG_CONFIG_H_INCLUDED*/
502 dnl Checks for programs.
506 missing_dir=`cd $ac_aux_dir && pwd`
507 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
508 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
509 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
510 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
511 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
516 AC_CHECK_TOOL(AR, ar, :)
517 AC_PATH_PROG(PERL,"perl")
522 AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no)
523 AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes)
525 GNUPG_CHECK_DOCBOOK_TO_TEXI
529 # According to a comment by Marcus Brinkman in libgpg-error, the
530 # AC_PROG_CC_FOR_BUILD macro in the AC archive is broken for autoconf
531 # 2.57. Thus we use a simply use "cc" if we are cross-compiling.
532 AC_MSG_CHECKING(for cc for build)
533 if test "$cross_compiling" = "yes"; then
534 CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
536 CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
538 AC_MSG_RESULT($CC_FOR_BUILD)
539 AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
545 have_dosish_system=no
549 # special stuff for Windoze NT
550 ac_cv_have_dev_random=no
551 AC_DEFINE(USE_ONLY_8DOT3,1,
552 [set this to limit filenames to the 8.3 format])
553 AC_DEFINE(HAVE_DRIVE_LETTERS,1,
554 [defined if we must run on a stupid file system])
555 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
556 [because the Unix gettext has too much overhead on
557 MingW32 systems and these systems lack Posix functions,
558 we use a simplified version of gettext])
559 AC_DEFINE(HAVE_W32_SYSTEM,1,
560 [Defined if we run on a W32 API based system])
561 disable_keyserver_path=yes
562 have_dosish_system=yes
566 use_simple_gettext=yes
569 i?86-emx-os2 | i?86-*-os2*emx )
570 # OS/2 with the EMX environment
571 ac_cv_have_dev_random=no
572 AC_DEFINE(HAVE_DRIVE_LETTERS)
573 have_dosish_system=yes
579 # DOS with the DJGPP environment
580 ac_cv_have_dev_random=no
581 AC_DEFINE(HAVE_DRIVE_LETTERS)
582 have_dosish_system=yes
588 if test -z "$GCC" ; then
589 CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
593 if test -z "$GCC" ; then
594 # Suppress all warnings
595 # to get rid of the unsigned/signed char mismatch warnings.
600 if test -z "$GCC" ; then
601 # Use the newer compiler `-msg_disable ptrmismatch1' to
602 # get rid of the unsigned/signed char mismatch warnings.
603 # Using this may hide other pointer mismatch warnings, but
604 # it at least lets other warning classes through
605 CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
614 if test "$have_dosish_system" = yes; then
615 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
616 [defined if we run on some of the PCDOS like systems
617 (DOS, Windoze. OS/2) with special properties like
620 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
622 AM_CONDITIONAL(USE_SIMPLE_GETTEXT, test x"$use_simple_gettext" = xyes)
623 AM_CONDITIONAL(HAVE_W32_SYSTEM, test x"$have_w32_system" = xyes)
625 if test "$disable_keyserver_path" = yes; then
626 AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
627 [define to disable exec-path for keyserver helpers])
630 AC_SUBST(MPI_OPT_FLAGS)
631 GNUPG_SYS_SYMBOL_UNDERSCORE
633 dnl These need to go after AC_PROG_CC so that $EXEEXT is defined
635 AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[The executable file extension, if any])
637 if test x"$try_hkp" = xyes ; then
638 AC_SUBST(GPGKEYS_HKP,"gpgkeys_hkp$EXEEXT")
641 if test x"$try_finger" = xyes ; then
642 AC_SUBST(GPGKEYS_FINGER,"gpgkeys_finger$EXEEXT")
645 dnl Must check for network library requirements before doing link tests
646 dnl for ldap, for example. If ldap libs are static (or dynamic and without
647 dnl ELF runtime link paths), then link will fail and LDAP support won't
650 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
651 [NETLIBS="-lnsl $NETLIBS"]))
652 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
653 [NETLIBS="-lsocket $NETLIBS"]))
655 dnl Now try for the resolver functions so we can use DNS for SRV, PKA,
658 if test x"$try_dns" = xyes ; then
659 if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
660 AC_ARG_ENABLE(dns-srv,
661 AC_HELP_STRING([--disable-dns-srv],
662 [disable the use of DNS SRV in HKP and HTTP]),
663 use_dns_srv=$enableval,use_dns_srv=yes)
666 AC_ARG_ENABLE(dns-pka,
667 AC_HELP_STRING([--disable-dns-pka],
668 [disable the use of PKA records in DNS]),
669 use_dns_pka=$enableval,use_dns_pka=yes)
671 AC_ARG_ENABLE(dns-cert,
672 AC_HELP_STRING([--disable-dns-cert],
673 [disable the use of CERT records in DNS]),
674 use_dns_cert=$enableval,use_dns_cert=yes)
677 if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns_cert" = xyes; then
680 # the double underscore thing is a glibc-ism?
681 AC_SEARCH_LIBS(res_query,resolv bind socket,,
682 AC_SEARCH_LIBS(__res_query,resolv bind socket,,have_resolver=no))
683 AC_SEARCH_LIBS(dn_expand,resolv bind socket,,
684 AC_SEARCH_LIBS(__dn_expand,resolv bind socket,,have_resolver=no))
685 AC_SEARCH_LIBS(dn_skipname,resolv bind socket,,
686 AC_SEARCH_LIBS(__dn_skipname,resolv bind socket,,have_resolver=no))
688 if test x"$have_resolver" != xno ; then
690 # Make sure that the BIND 4 resolver interface is workable before
691 # enabling any code that calls it. At some point I'll rewrite the
692 # code to use the BIND 8 resolver API.
694 AC_MSG_CHECKING([whether the resolver is usable])
695 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
696 #include <netinet/in.h>
697 #include <arpa/nameser.h>
698 #include <resolv.h>],
699 [[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)
700 AC_MSG_RESULT($have_resolver)
702 # This is Apple-specific and somewhat bizarre as they changed the
703 # define in bind 8 for some reason.
705 if test x"$have_resolver" != xyes ; then
706 AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
707 AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
708 #include <sys/types.h>
709 #include <netinet/in.h>
710 #include <arpa/nameser.h>
711 #include <resolv.h>],
712 [[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])
713 AC_MSG_RESULT($have_resolver)
717 if test x"$have_resolver" = xyes ; then
720 if test x"$use_dns_srv" = xyes ; then
721 AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
724 if test x"$use_dns_pka" = xyes ; then
725 AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
728 if test x"$use_dns_cert" = xyes ; then
729 AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
732 if test x"$need_compat" = xyes ; then
733 AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
746 AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
750 if test "$try_ldap" = yes ; then
751 GNUPG_CHECK_LDAP($NETLIBS)
754 # Check for curl. We fake the curl API if libcurl isn't installed.
756 LIBCURL_CHECK_CONFIG([yes],,,[fake_curl=yes])
757 AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
759 # Generic, for us, means curl
761 if test x"$try_generic" = xyes ; then
762 AC_SUBST(GPGKEYS_CURL,"gpgkeys_curl$EXEEXT")
765 dnl This isn't necessarily sendmail itself, but anything that gives a
766 dnl sendmail-ish interface to the outside world. That includes qmail,
767 dnl postfix, etc. Basically, anything that can handle "sendmail -t".
769 if test "$try_mailto" = yes ; then
770 AC_ARG_WITH(mailprog,
771 AC_HELP_STRING([--with-mailprog=NAME],
772 [use "NAME -t" for mail transport]),,with_mailprog=yes)
774 if test "$with_mailprog" = yes ; then
775 AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
776 if test "$ac_cv_path_SENDMAIL" ; then
777 GPGKEYS_MAILTO="gpgkeys_mailto"
779 elif test "$with_mailprog" != no ; then
780 AC_MSG_CHECKING([for a mail transport program])
781 AC_SUBST(SENDMAIL,$with_mailprog)
782 AC_MSG_RESULT($with_mailprog)
783 GPGKEYS_MAILTO="gpgkeys_mailto"
787 AC_SUBST(GPGKEYS_MAILTO)
791 PRINTABLE_OS_NAME="MingW32"
794 PRINTABLE_OS_NAME="Cygwin"
796 i?86-emx-os2 | i?86-*-os2*emx )
797 PRINTABLE_OS_NAME="OS/2"
800 PRINTABLE_OS_NAME="MSDOS/DJGPP"
804 PRINTABLE_OS_NAME="GNU/Linux"
807 PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
810 AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
811 [A human readable text with the name of the OS])
815 # 1. Set names of random devices
817 NAME_OF_DEV_RANDOM="/dev/random"
818 NAME_OF_DEV_URANDOM="/dev/urandom"
821 NAME_OF_DEV_RANDOM="/dev/srandom"
822 NAME_OF_DEV_URANDOM="/dev/urandom"
825 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM",
826 [defined to the name of the strong random device])
827 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM",
828 [defined to the name of the weaker random device])
829 AC_SUBST(MPI_OPT_FLAGS)
832 dnl Checks for libraries.
835 AM_GNU_GETTEXT_VERSION([0.16.1])
836 if test "$try_gettext" = yes; then
837 AM_GNU_GETTEXT(,[need-ngettext])
838 # gettext requires some extra checks. These really should be part of
839 # the basic AM_GNU_GETTEXT macro. TODO: move other gettext-specific
840 # function checks to here.
841 AC_CHECK_FUNCS(strchr)
845 USE_INCLUDED_LIBINTL=no
846 BUILD_INCLUDED_LIBINTL=no
849 AC_SUBST(USE_INCLUDED_LIBINTL)
850 AC_SUBST(BUILD_INCLUDED_LIBINTL)
855 if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
856 if test "$need_dlopen" = yes; then
859 AC_SEARCH_LIBS(dlopen,dl,found_dlopen=yes)
860 if test x"$found_dlopen" = "xyes" ; then
861 AC_DEFINE(HAVE_DL_DLOPEN,1,
862 [Defined when the dlopen function family is available])
865 if test "$try_extensions" = yes ; then
866 AC_MSG_NOTICE([dlopen not found. Disabling extensions.])
870 if test "$card_support" = yes ; then
871 AC_MSG_WARN([dlopen not found. Disabling OpenPGP card support.])
881 if test "$card_support" = yes ; then
882 AC_DEFINE(ENABLE_CARD_SUPPORT,1,[Define to include OpenPGP card support])
885 if test "$agent_support" = yes ; then
886 AC_DEFINE(ENABLE_AGENT_SUPPORT,1,[Define to include gpg-agent support])
889 if test "$try_extensions" = yes ; then
890 AC_DEFINE(USE_DYNAMIC_LINKING,1,[Define to enable the use of extensions])
893 if test "$selinux_support" = yes ; then
894 AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support])
897 if test "$gnupg_use_iconv" = yes ; then
898 AC_DEFINE(USE_GNUPG_ICONV,1,[Define to use the new iconv based code])
901 AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes)
902 AM_CONDITIONAL(ENABLE_AGENT_SUPPORT, test "$agent_support" = yes)
904 dnl Checks for header files.
906 AC_CHECK_HEADERS([unistd.h langinfo.h termio.h locale.h getopt.h pwd.h])
908 # Note that we do not check for iconv here because this is done anyway
909 # by the gettext checks and thus it allows us to disable the use of
910 # iconv by using --disable-nls.
912 dnl Checks for typedefs, structures, and compiler characteristics.
921 AC_ARG_ENABLE(endian-check,
922 AC_HELP_STRING([--disable-endian-check],
923 [disable the endian check and trust the OS provided macros]),
924 endiancheck=$enableval,endiancheck=yes)
926 if test x"$endiancheck" = xyes ; then
930 GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
931 GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
932 GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
933 GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
934 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
936 AC_CHECK_SIZEOF(unsigned short)
937 AC_CHECK_SIZEOF(unsigned int)
938 AC_CHECK_SIZEOF(unsigned long)
939 AC_CHECK_SIZEOF(unsigned long long)
941 # Ensure that we have UINT64_C before we bother to check for uint64_t
942 AC_CHECK_HEADERS([inttypes.h])
943 AC_CACHE_CHECK([for UINT64_C], [gnupg_cv_uint64_c_works],
944 AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>],[
945 uint64_t foo=UINT64_C(42);]),gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
947 if test "$gnupg_cv_uint64_c_works" = "yes" ; then
948 AC_CHECK_SIZEOF(uint64_t)
951 if test "$ac_cv_sizeof_unsigned_short" = "0" \
952 || test "$ac_cv_sizeof_unsigned_int" = "0" \
953 || test "$ac_cv_sizeof_unsigned_long" = "0"; then
954 AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
957 dnl Do we have any 64-bit data types?
958 if test x"$use_sha512" = xyes \
959 && test "$ac_cv_sizeof_unsigned_int" != "8" \
960 && test "$ac_cv_sizeof_unsigned_long" != "8" \
961 && test "$ac_cv_sizeof_unsigned_long_long" != "8" \
962 && test x"$ac_cv_sizeof_uint64_t" != "x8"; then
963 AC_MSG_NOTICE([No 64-bit types. Disabling SHA-384 and SHA-512.])
967 if test x"$use_sha512" = xyes ; then
968 AC_DEFINE(USE_SHA512,1,[Define to include the SHA-384 and SHA-512 digests])
971 AM_CONDITIONAL(USE_SHA512, test x"$use_sha512" = xyes)
973 dnl Checks for library functions.
974 AC_CHECK_DECLS(getpagesize)
978 AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr strtoul mmap sysconf)
979 AC_CHECK_FUNCS(strcasecmp strncasecmp ctermid times unsetenv getpwnam getpwuid)
980 AC_CHECK_FUNCS(memmove gettimeofday getrusage setrlimit clock_gettime)
981 AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale)
982 AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat getaddrinfo)
983 AC_CHECK_FUNCS(fcntl ftruncate)
984 AC_REPLACE_FUNCS(mkdtemp timegm isascii memrchr strsep)
986 AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
988 # See if getopt is in libiberty. This is of course not optimal since
989 # it might be somewhere other than libiberty, but does cover the
992 AC_CHECK_FUNC(getopt,,AC_CHECK_LIB(iberty,getopt,AC_SUBST(GETOPT,"-liberty")))
995 # check for gethrtime and run a testprogram to see whether
996 # it is broken. It has been reported that some Solaris and HP UX systems
999 AC_CACHE_CHECK([for gethrtime],
1000 [gnupg_cv_func_gethrtime],
1001 [AC_TRY_LINK([#include <sys/times.h>],[
1005 [gnupg_cv_func_gethrtime=yes],
1006 [gnupg_cv_func_gethrtime=no])
1008 if test $gnupg_cv_func_gethrtime = yes; then
1009 AC_DEFINE([HAVE_GETHRTIME], 1,
1010 [Define if you have the `gethrtime(2)' function.])
1011 AC_CACHE_CHECK([whether gethrtime is broken],
1012 [gnupg_cv_func_broken_gethrtime],
1014 #include <sys/times.h>
1020 [gnupg_cv_func_broken_gethrtime=no],
1021 [gnupg_cv_func_broken_gethrtime=yes],
1022 [gnupg_cv_func_broken_gethrtime=assume-no])
1024 if test $gnupg_cv_func_broken_gethrtime = yes; then
1025 AC_DEFINE([HAVE_BROKEN_GETHRTIME], 1,
1026 [Define if `gethrtime(2)' does not work correctly i.e. issues a SIGILL.])
1032 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
1035 dnl Check whether we can use Linux capabilities as requested
1037 if test "$use_capabilities" = "yes" ; then
1041 *** WARNING: using capabilities with GnuPG is experimental code!
1045 AC_CHECK_HEADERS(sys/capability.h)
1046 if test "$ac_cv_header_sys_capability_h" = "yes" ; then
1047 AC_CHECK_LIB(cap, cap_init, ac_need_libcap=1)
1048 if test "$ac_cv_lib_cap_cap_init" = "yes"; then
1049 AC_DEFINE(USE_CAPABILITIES,1,
1050 [define if capabilities should be used])
1051 AC_SUBST(CAPLIBS,"-lcap")
1052 use_capabilities=yes
1055 if test "$use_capabilities" = "no" ; then
1058 *** The use of capabilities on this system is not possible.
1059 *** You need a recent Linux kernel and some patches:
1060 *** fcaps-2.2.9-990610.patch (kernel patch for 2.2.9)
1061 *** fcap-module-990613.tar.gz (kernel module)
1062 *** libcap-1.92.tar.gz (user mode library and utilities)
1063 *** And you have to configure the kernel with CONFIG_VFS_CAP_PLUGIN
1064 *** set (filesystems menu). Be warned: This code is *really* ALPHA.
1071 if test "$ac_cv_header_sys_shm_h" = "yes"; then
1072 AC_DEFINE(USE_SHM_COPROCESSING,1,
1073 [define if the shared memory interface should be made available])
1076 AM_CONDITIONAL(HAVE_SHM, test "$ac_cv_header_sys_shm_h" = yes)
1079 dnl check whether we have a random device
1081 if test "$try_dev_random" = yes ; then
1082 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
1083 [if test -r "$NAME_OF_DEV_RANDOM" && test -r "$NAME_OF_DEV_URANDOM" ; then
1084 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
1085 if test "$ac_cv_have_dev_random" = yes; then
1086 AC_DEFINE(HAVE_DEV_RANDOM,1,
1087 [defined if the system supports a random device] )
1090 AC_MSG_CHECKING(for random device)
1091 ac_cv_have_dev_random=no
1092 AC_MSG_RESULT(has been disabled)
1097 dnl Figure out the default random module.
1100 if test "$use_static_rnd" = default; then
1101 if test "$ac_cv_have_dev_random" = yes; then
1102 random_modules="rndlinux"
1105 *-mingw32*|*-*-cygwin*)
1106 random_modules="rndw32"
1108 i?86-emx-os2|i?86-*-os2*emx)
1109 random_modules="rndos2"
1112 random_modules="rndatari"
1118 random_modules="rndlinux rndegd rndunix"
1119 AC_DEFINE(USE_ALL_RANDOM_MODULES, 1,
1120 [Allow to select random modules at runtime.])
1125 if test "$use_static_rnd" = auto; then
1126 random_modules="rndlinux rndegd rndunix"
1127 AC_DEFINE(USE_ALL_RANDOM_MODULES, 1)
1129 random_modules="rnd$use_static_rnd";
1133 if test -z "$random_modules"; then
1134 AC_MSG_ERROR(no random module available)
1136 print_egd_warning=no
1137 for rndmod in $random_modules "" ; do
1140 AC_DEFINE(USE_RNDLINUX,1,
1141 [Defined if the /dev/random based RNG should be used.])
1145 AC_DEFINE(USE_RNDUNIX,1,
1146 [Defined if the default Unix RNG should be used.])
1147 print_egd_warning=yes
1151 AC_DEFINE(USE_RNDEGD,1,
1152 [Defined if the EGD based RNG should be used.])
1156 AC_DEFINE(USE_RNDW32,1,
1157 [Defined if the Windows specific RNG should be used.])
1163 AM_CONDITIONAL(USE_RNDLINUX, test "$use_rndlinux" = yes)
1164 AM_CONDITIONAL(USE_RNDUNIX, test "$use_rndunix" = yes)
1165 AM_CONDITIONAL(USE_RNDEGD, test "$use_rndegd" = yes)
1166 AM_CONDITIONAL(USE_RNDW32, test "$use_rndw32" = yes)
1168 dnl setup assembler stuff
1169 AC_MSG_CHECKING(for mpi assembler functions)
1170 if test -f $srcdir/mpi/config.links ; then
1171 . $srcdir/mpi/config.links
1172 AC_CONFIG_LINKS("$mpi_ln_list")
1173 ac_cv_mpi_extra_asm_modules="$mpi_extra_modules"
1174 ac_cv_mpi_sflags="$mpi_sflags"
1175 ac_cv_mpi_config_done="yes"
1178 AC_MSG_RESULT(failed)
1179 AC_MSG_ERROR([mpi/config.links missing!])
1181 MPI_EXTRA_ASM_OBJS=""
1183 if test "$ac_cv_mpi_extra_asm_modules" != ""; then
1184 for i in $ac_cv_mpi_extra_asm_modules; do
1185 show_extraasm="$show_extraasm $i"
1186 MPI_EXTRA_ASM_OBJS="$MPI_EXTRA_ASM_OBJS $i.o"
1189 AC_SUBST(MPI_EXTRA_ASM_OBJS)
1190 MPI_SFLAGS="$ac_cv_mpi_sflags"
1191 AC_SUBST(MPI_SFLAGS)
1193 # Sanity check regex. Tests adapted from mutt.
1195 AC_MSG_CHECKING([whether regular expression support is requested])
1196 AC_ARG_ENABLE(regex,
1197 AC_HELP_STRING([--disable-regex],
1198 [do not handle regular expressions in trust signatures]),
1199 use_regex=$enableval, use_regex=yes)
1200 AC_MSG_RESULT($use_regex)
1202 if test "$use_regex" = yes ; then
1203 AC_MSG_CHECKING([whether the included regex lib is requested])
1204 AC_ARG_WITH(included-regex,
1205 AC_HELP_STRING([--with-included-regex],
1206 [use the included GNU regex library]),
1207 [gnupg_cv_included_regex="$withval"],[gnupg_cv_included_regex=no])
1208 AC_MSG_RESULT($gnupg_cv_included_regex)
1210 if test $gnupg_cv_included_regex = no ; then
1211 # Does the system have regex functions at all?
1212 AC_CHECK_FUNC(regcomp,gnupg_cv_included_regex=no,
1213 gnupg_cv_included_regex=yes)
1216 if test $gnupg_cv_included_regex = no ; then
1217 AC_CACHE_CHECK([whether your system's regexp library is broken],
1218 [gnupg_cv_regex_broken],
1222 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); }],
1223 gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
1225 if test $gnupg_cv_regex_broken = yes ; then
1226 AC_MSG_WARN(your regex is broken - using the included GNU regex instead.)
1227 gnupg_cv_included_regex=yes
1231 if test $gnupg_cv_included_regex = yes; then
1232 AC_DEFINE(USE_INTERNAL_REGEX,1,[ Define if you want to use the included regex lib ])
1235 AC_DEFINE(DISABLE_REGEX,1,[ Define to disable regular expression support ])
1238 AM_CONDITIONAL(USE_INTERNAL_REGEX, test x"$gnupg_cv_included_regex" = xyes)
1240 dnl Do we have zlib? Must do it here because Solaris failed
1241 dnl when compiling a conftest (due to the "-lz" from LIBS).
1243 if test "$g10_force_zlib" = "yes"; then
1246 _cppflags="${CPPFLAGS}"
1247 _ldflags="${LDFLAGS}"
1250 AC_HELP_STRING([--with-zlib=DIR],[use libz in DIR]),[
1251 if test -d "$withval"; then
1252 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1253 LDFLAGS="${LDFLAGS} -L$withval/lib"
1257 AC_CHECK_HEADER(zlib.h,
1258 AC_CHECK_LIB(z, deflateInit2_,
1261 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1262 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
1265 if test "$use_local_zlib" = yes ; then
1266 AC_CONFIG_LINKS(zlib.h:zlib/zlib.h zconf.h:zlib/zconf.h )
1267 ZLIBS="../zlib/libzlib.a"
1270 AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, test "$use_local_zlib" = yes)
1272 if test "$use_bzip2" = yes ; then
1273 _cppflags="${CPPFLAGS}"
1274 _ldflags="${LDFLAGS}"
1276 AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
1278 if test -d "$withval" ; then
1279 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1280 LDFLAGS="${LDFLAGS} -L$withval/lib"
1284 # Checking alongside stdio.h as an early version of bzip2 (1.0)
1285 # required stdio.h to be included before bzlib.h, and Solaris 9 is
1286 # woefully out of date.
1288 if test "$withval" != no ; then
1289 AC_CHECK_HEADER(bzlib.h,
1290 AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
1293 ZLIBS="$ZLIBS -lbz2"
1294 AC_DEFINE(HAVE_BZIP2,1,
1295 [Defined if the bz2 compression library is available])
1297 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1298 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>])
1302 AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
1305 # libusb allows us to use the integrated CCID smartcard reader driver.
1306 # We don't need it if we don't have card support though.
1307 if test "$card_support" = yes ; then
1311 # Check for readline support
1312 GNUPG_CHECK_READLINE
1314 # Allow users to append something to the version string without
1315 # flagging it as development version. The user version parts is
1316 # considered everything after a dash.
1317 if test "$development_version" != yes; then
1321 if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
1322 development_version=yes
1325 if test "$development_version" = yes; then
1326 AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
1327 [Defined if this is not a regular release])
1330 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
1333 # add some extra libs here so that previous tests don't fail for
1334 # mysterious reasons - the final link step should bail out.
1337 dnl NETLIBS="$NETLIBS -lwsock32"
1347 # Special options used with gcc.
1348 if test "$GCC" = yes; then
1349 # Note that it is okay to use CFLAGS here because this are just
1350 # warning options and the user should have a chance of overriding
1352 if test "$USE_MAINTAINER_MODE" = "yes"; then
1353 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
1354 CFLAGS="$CFLAGS -Wformat-nonliteral"
1356 CFLAGS="$CFLAGS -Wall"
1359 # This is handy for debugging so the compiler doesn't rearrange
1360 # things and eliminate variables.
1361 AC_ARG_ENABLE(optimization,
1362 AC_HELP_STRING([--disable-optimization],
1363 [disable compiler optimization]),
1364 [if test $enableval = no ; then
1365 CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
1368 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
1370 _gcc_cflags_save=$CFLAGS
1371 CFLAGS="-Wno-pointer-sign"
1373 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1374 AC_MSG_RESULT($_gcc_psign)
1376 CFLAGS=$_gcc_cflags_save;
1378 if test x"$_gcc_psign" = xyes ; then
1379 CFLAGS="$CFLAGS -Wno-pointer-sign"
1385 if test "$print_egd_warning" = yes; then
1388 *** The performance of the UNIX random gatherer module is not very good
1389 *** and it does not keep the entropy pool over multiple invocations of
1390 *** GnuPG. The suggested way to overcome this problem is to use the
1392 *** Entropy Gathering Daemon (EGD)
1394 *** which provides a entropy source for the whole system. It is written
1395 *** in Perl and available at the GnuPG FTP servers. For more information
1396 *** consult the GnuPG webpages:
1398 *** http://www.gnupg.org/download/#EGD
1400 *** You may want to run ./configure with --enable-static-rnd=egd or
1401 *** --enable-static-rnd=auto to use it.
1415 keyserver/gpgkeys_mailto
1416 keyserver/gpgkeys_test
1425 # Give some feedback
1427 echo " Version info: $PACKAGE_STRING"
1428 echo " Configured for: $PRINTABLE_OS_NAME ($host)"
1429 if test -n "$show_extraasm"; then
1430 echo " Extra cpu specific functions:$show_extraasm"
1434 if test x"$use_camellia" = xyes ; then
1435 echo "WARNING: The Camellia cipher is for testing only and is NOT for production use!"