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])
30 m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
31 | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
33 [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"
484 /* Hack used for W32: ldap.m4 also tests for the ASCII version of
485 ldap_start_tls_s because that is the actual symbol used in the
486 library. winldap.h redefines it to our commonly used value,
487 thus we define our usual macro here. */
488 #ifdef HAVE_LDAP_START_TLS_SA
489 # ifndef HAVE_LDAP_START_TLS_S
490 # define HAVE_LDAP_START_TLS_S 1
494 /* This is the major version number of GnuPG so that
495 source included files can test for this. */
496 #define GNUPG_MAJOR_VERSION 1
498 /* This is the same as VERSION, but should be overridden if the
499 platform cannot handle things like dots'.' in filenames. Set
500 SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
501 uses for dots and dashes. */
502 #define SAFE_VERSION VERSION
503 #define SAFE_VERSION_DOT '.'
504 #define SAFE_VERSION_DASH '-'
506 #endif /*GNUPG_CONFIG_H_INCLUDED*/
511 dnl Checks for programs.
515 missing_dir=`cd $ac_aux_dir && pwd`
516 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
517 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
518 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
519 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
520 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
525 AC_CHECK_TOOL(AR, ar, :)
526 AC_PATH_PROG(PERL,"perl")
531 AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no)
532 AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes)
537 # According to a comment by Marcus Brinkman in libgpg-error, the
538 # AC_PROG_CC_FOR_BUILD macro in the AC archive is broken for autoconf
539 # 2.57. Thus we use a simply use "cc" if we are cross-compiling.
540 AC_MSG_CHECKING(for cc for build)
541 if test "$cross_compiling" = "yes"; then
542 CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
544 CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
546 AC_MSG_RESULT($CC_FOR_BUILD)
547 AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
553 have_dosish_system=no
557 # special stuff for Windoze NT
558 ac_cv_have_dev_random=no
559 AC_DEFINE(USE_ONLY_8DOT3,1,
560 [set this to limit filenames to the 8.3 format])
561 AC_DEFINE(HAVE_DRIVE_LETTERS,1,
562 [defined if we must run on a stupid file system])
563 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
564 [because the Unix gettext has too much overhead on
565 MingW32 systems and these systems lack Posix functions,
566 we use a simplified version of gettext])
567 AC_DEFINE(HAVE_W32_SYSTEM,1,
568 [Defined if we run on a W32 API based system])
569 disable_keyserver_path=yes
570 have_dosish_system=yes
574 use_simple_gettext=yes
577 i?86-emx-os2 | i?86-*-os2*emx )
578 # OS/2 with the EMX environment
579 ac_cv_have_dev_random=no
580 AC_DEFINE(HAVE_DRIVE_LETTERS)
581 have_dosish_system=yes
587 # DOS with the DJGPP environment
588 ac_cv_have_dev_random=no
589 AC_DEFINE(HAVE_DRIVE_LETTERS)
590 have_dosish_system=yes
596 if test -z "$GCC" ; then
597 CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
601 if test -z "$GCC" ; then
602 # Suppress all warnings
603 # to get rid of the unsigned/signed char mismatch warnings.
608 if test -z "$GCC" ; then
609 # Use the newer compiler `-msg_disable ptrmismatch1' to
610 # get rid of the unsigned/signed char mismatch warnings.
611 # Using this may hide other pointer mismatch warnings, but
612 # it at least lets other warning classes through
613 CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
622 if test "$have_dosish_system" = yes; then
623 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
624 [defined if we run on some of the PCDOS like systems
625 (DOS, Windoze. OS/2) with special properties like
628 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
630 AM_CONDITIONAL(USE_SIMPLE_GETTEXT, test x"$use_simple_gettext" = xyes)
631 AM_CONDITIONAL(HAVE_W32_SYSTEM, test x"$have_w32_system" = xyes)
633 if test "$disable_keyserver_path" = yes; then
634 AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
635 [define to disable exec-path for keyserver helpers])
638 AC_SUBST(MPI_OPT_FLAGS)
639 GNUPG_SYS_SYMBOL_UNDERSCORE
641 dnl These need to go after AC_PROG_CC so that $EXEEXT is defined
643 AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[The executable file extension, if any])
645 if test x"$try_hkp" = xyes ; then
646 AC_SUBST(GPGKEYS_HKP,"gpgkeys_hkp$EXEEXT")
649 if test x"$try_finger" = xyes ; then
650 AC_SUBST(GPGKEYS_FINGER,"gpgkeys_finger$EXEEXT")
653 dnl Must check for network library requirements before doing link tests
654 dnl for ldap, for example. If ldap libs are static (or dynamic and without
655 dnl ELF runtime link paths), then link will fail and LDAP support won't
658 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
659 [NETLIBS="-lnsl $NETLIBS"]))
660 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
661 [NETLIBS="-lsocket $NETLIBS"]))
663 dnl Now try for the resolver functions so we can use DNS for SRV, PKA,
666 if test x"$try_dns" = xyes ; then
667 if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
668 AC_ARG_ENABLE(dns-srv,
669 AC_HELP_STRING([--disable-dns-srv],
670 [disable the use of DNS SRV in HKP and HTTP]),
671 use_dns_srv=$enableval,use_dns_srv=yes)
674 AC_ARG_ENABLE(dns-pka,
675 AC_HELP_STRING([--disable-dns-pka],
676 [disable the use of PKA records in DNS]),
677 use_dns_pka=$enableval,use_dns_pka=yes)
679 AC_ARG_ENABLE(dns-cert,
680 AC_HELP_STRING([--disable-dns-cert],
681 [disable the use of CERT records in DNS]),
682 use_dns_cert=$enableval,use_dns_cert=yes)
685 if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns_cert" = xyes; then
688 # the double underscore thing is a glibc-ism?
689 AC_SEARCH_LIBS(res_query,resolv bind socket,,
690 AC_SEARCH_LIBS(__res_query,resolv bind socket,,have_resolver=no))
691 AC_SEARCH_LIBS(dn_expand,resolv bind socket,,
692 AC_SEARCH_LIBS(__dn_expand,resolv bind socket,,have_resolver=no))
693 AC_SEARCH_LIBS(dn_skipname,resolv bind socket,,
694 AC_SEARCH_LIBS(__dn_skipname,resolv bind socket,,have_resolver=no))
696 if test x"$have_resolver" != xno ; then
698 # Make sure that the BIND 4 resolver interface is workable before
699 # enabling any code that calls it. At some point I'll rewrite the
700 # code to use the BIND 8 resolver API.
702 AC_MSG_CHECKING([whether the resolver is usable])
703 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
704 #include <netinet/in.h>
705 #include <arpa/nameser.h>
706 #include <resolv.h>],
707 [[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)
708 AC_MSG_RESULT($have_resolver)
710 # This is Apple-specific and somewhat bizarre as they changed the
711 # define in bind 8 for some reason.
713 if test x"$have_resolver" != xyes ; then
714 AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
715 AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
716 #include <sys/types.h>
717 #include <netinet/in.h>
718 #include <arpa/nameser.h>
719 #include <resolv.h>],
720 [[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])
721 AC_MSG_RESULT($have_resolver)
725 if test x"$have_resolver" = xyes ; then
728 if test x"$use_dns_srv" = xyes ; then
729 AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
732 if test x"$use_dns_pka" = xyes ; then
733 AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
736 if test x"$use_dns_cert" = xyes ; then
737 AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
740 if test x"$need_compat" = xyes ; then
741 AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
754 AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
758 if test "$try_ldap" = yes ; then
759 GNUPG_CHECK_LDAP($NETLIBS)
762 # Check for curl. We fake the curl API if libcurl isn't installed.
763 # We require 7.10 or better as we use curl_version_info().
765 LIBCURL_CHECK_CONFIG([yes],[7.10],,[fake_curl=yes])
766 AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
768 # Generic, for us, means curl
770 if test x"$try_generic" = xyes ; then
771 AC_SUBST(GPGKEYS_CURL,"gpgkeys_curl$EXEEXT")
774 dnl This isn't necessarily sendmail itself, but anything that gives a
775 dnl sendmail-ish interface to the outside world. That includes qmail,
776 dnl postfix, etc. Basically, anything that can handle "sendmail -t".
778 if test "$try_mailto" = yes ; then
779 AC_ARG_WITH(mailprog,
780 AC_HELP_STRING([--with-mailprog=NAME],
781 [use "NAME -t" for mail transport]),,with_mailprog=yes)
783 if test "$with_mailprog" = yes ; then
784 AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
785 if test "$ac_cv_path_SENDMAIL" ; then
786 GPGKEYS_MAILTO="gpgkeys_mailto"
788 elif test "$with_mailprog" != no ; then
789 AC_MSG_CHECKING([for a mail transport program])
790 AC_SUBST(SENDMAIL,$with_mailprog)
791 AC_MSG_RESULT($with_mailprog)
792 GPGKEYS_MAILTO="gpgkeys_mailto"
796 AC_SUBST(GPGKEYS_MAILTO)
800 PRINTABLE_OS_NAME="MingW32"
803 PRINTABLE_OS_NAME="Cygwin"
805 i?86-emx-os2 | i?86-*-os2*emx )
806 PRINTABLE_OS_NAME="OS/2"
809 PRINTABLE_OS_NAME="MSDOS/DJGPP"
813 PRINTABLE_OS_NAME="GNU/Linux"
816 PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
819 AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
820 [A human readable text with the name of the OS])
824 # 1. Set names of random devices
826 NAME_OF_DEV_RANDOM="/dev/random"
827 NAME_OF_DEV_URANDOM="/dev/urandom"
830 NAME_OF_DEV_RANDOM="/dev/srandom"
831 NAME_OF_DEV_URANDOM="/dev/urandom"
834 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM",
835 [defined to the name of the strong random device])
836 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM",
837 [defined to the name of the weaker random device])
838 AC_SUBST(MPI_OPT_FLAGS)
841 dnl Checks for libraries.
844 AM_GNU_GETTEXT_VERSION([0.16.1])
845 if test "$try_gettext" = yes; then
846 AM_GNU_GETTEXT(,[need-ngettext])
847 # gettext requires some extra checks. These really should be part of
848 # the basic AM_GNU_GETTEXT macro. TODO: move other gettext-specific
849 # function checks to here.
850 AC_CHECK_FUNCS(strchr)
854 USE_INCLUDED_LIBINTL=no
855 BUILD_INCLUDED_LIBINTL=no
858 AC_SUBST(USE_INCLUDED_LIBINTL)
859 AC_SUBST(BUILD_INCLUDED_LIBINTL)
864 if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
865 if test "$need_dlopen" = yes; then
868 AC_SEARCH_LIBS(dlopen,dl,found_dlopen=yes)
869 if test x"$found_dlopen" = "xyes" ; then
870 AC_DEFINE(HAVE_DL_DLOPEN,1,
871 [Defined when the dlopen function family is available])
874 if test "$try_extensions" = yes ; then
875 AC_MSG_NOTICE([dlopen not found. Disabling extensions.])
879 if test "$card_support" = yes ; then
880 AC_MSG_WARN([dlopen not found. Disabling OpenPGP card support.])
890 if test "$card_support" = yes ; then
891 AC_DEFINE(ENABLE_CARD_SUPPORT,1,[Define to include OpenPGP card support])
894 if test "$agent_support" = yes ; then
895 AC_DEFINE(ENABLE_AGENT_SUPPORT,1,[Define to include gpg-agent support])
898 if test "$try_extensions" = yes ; then
899 AC_DEFINE(USE_DYNAMIC_LINKING,1,[Define to enable the use of extensions])
902 if test "$selinux_support" = yes ; then
903 AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support])
906 if test "$gnupg_use_iconv" = yes ; then
907 AC_DEFINE(USE_GNUPG_ICONV,1,[Define to use the new iconv based code])
910 AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes)
911 AM_CONDITIONAL(ENABLE_AGENT_SUPPORT, test "$agent_support" = yes)
913 dnl Checks for header files.
915 AC_CHECK_HEADERS([unistd.h langinfo.h termio.h locale.h getopt.h pwd.h])
917 # Note that we do not check for iconv here because this is done anyway
918 # by the gettext checks and thus it allows us to disable the use of
919 # iconv by using --disable-nls.
921 dnl Checks for typedefs, structures, and compiler characteristics.
930 AC_ARG_ENABLE(endian-check,
931 AC_HELP_STRING([--disable-endian-check],
932 [disable the endian check and trust the OS provided macros]),
933 endiancheck=$enableval,endiancheck=yes)
935 if test x"$endiancheck" = xyes ; then
939 GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
940 GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
941 GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
942 GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
943 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
945 AC_CHECK_SIZEOF(unsigned short)
946 AC_CHECK_SIZEOF(unsigned int)
947 AC_CHECK_SIZEOF(unsigned long)
948 AC_CHECK_SIZEOF(unsigned long long)
949 AC_CHECK_SIZEOF(time_t,,[[
951 #if TIME_WITH_SYS_TIME
952 # include <sys/time.h>
956 # include <sys/time.h>
963 # Ensure that we have UINT64_C before we bother to check for uint64_t
964 AC_CHECK_HEADERS([inttypes.h])
965 AC_CACHE_CHECK([for UINT64_C], [gnupg_cv_uint64_c_works],
966 AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>],[
967 uint64_t foo=UINT64_C(42);]),gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
969 if test "$gnupg_cv_uint64_c_works" = "yes" ; then
970 AC_CHECK_SIZEOF(uint64_t)
973 if test "$ac_cv_sizeof_unsigned_short" = "0" \
974 || test "$ac_cv_sizeof_unsigned_int" = "0" \
975 || test "$ac_cv_sizeof_unsigned_long" = "0"; then
976 AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
979 dnl Do we have any 64-bit data types?
980 if test x"$use_sha512" = xyes \
981 && test "$ac_cv_sizeof_unsigned_int" != "8" \
982 && test "$ac_cv_sizeof_unsigned_long" != "8" \
983 && test "$ac_cv_sizeof_unsigned_long_long" != "8" \
984 && test x"$ac_cv_sizeof_uint64_t" != "x8"; then
985 AC_MSG_NOTICE([No 64-bit types. Disabling SHA-384 and SHA-512.])
989 if test x"$use_sha512" = xyes ; then
990 AC_DEFINE(USE_SHA512,1,[Define to include the SHA-384 and SHA-512 digests])
993 AM_CONDITIONAL(USE_SHA512, test x"$use_sha512" = xyes)
995 dnl Checks for library functions.
996 AC_CHECK_DECLS(getpagesize)
1000 AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr strtoul mmap sysconf)
1001 AC_CHECK_FUNCS(strcasecmp strncasecmp ctermid times unsetenv getpwnam getpwuid)
1002 AC_CHECK_FUNCS(memmove gettimeofday getrusage setrlimit clock_gettime)
1003 AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale)
1004 AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat getaddrinfo)
1005 AC_CHECK_FUNCS(fcntl ftruncate)
1006 AC_REPLACE_FUNCS(mkdtemp timegm isascii memrchr strsep)
1008 AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
1010 # See if getopt is in libiberty. This is of course not optimal since
1011 # it might be somewhere other than libiberty, but does cover the
1014 AC_CHECK_FUNC(getopt,,AC_CHECK_LIB(iberty,getopt,AC_SUBST(GETOPT,"-liberty")))
1017 # check for gethrtime and run a testprogram to see whether
1018 # it is broken. It has been reported that some Solaris and HP UX systems
1021 AC_CACHE_CHECK([for gethrtime],
1022 [gnupg_cv_func_gethrtime],
1023 [AC_TRY_LINK([#include <sys/times.h>],[
1027 [gnupg_cv_func_gethrtime=yes],
1028 [gnupg_cv_func_gethrtime=no])
1030 if test $gnupg_cv_func_gethrtime = yes; then
1031 AC_DEFINE([HAVE_GETHRTIME], 1,
1032 [Define if you have the `gethrtime(2)' function.])
1033 AC_CACHE_CHECK([whether gethrtime is broken],
1034 [gnupg_cv_func_broken_gethrtime],
1036 #include <sys/times.h>
1042 [gnupg_cv_func_broken_gethrtime=no],
1043 [gnupg_cv_func_broken_gethrtime=yes],
1044 [gnupg_cv_func_broken_gethrtime=assume-no])
1046 if test $gnupg_cv_func_broken_gethrtime = yes; then
1047 AC_DEFINE([HAVE_BROKEN_GETHRTIME], 1,
1048 [Define if `gethrtime(2)' does not work correctly i.e. issues a SIGILL.])
1054 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
1057 dnl Check whether we can use Linux capabilities as requested
1059 if test "$use_capabilities" = "yes" ; then
1063 *** WARNING: using capabilities with GnuPG is experimental code!
1067 AC_CHECK_HEADERS(sys/capability.h)
1068 if test "$ac_cv_header_sys_capability_h" = "yes" ; then
1069 AC_CHECK_LIB(cap, cap_init, ac_need_libcap=1)
1070 if test "$ac_cv_lib_cap_cap_init" = "yes"; then
1071 AC_DEFINE(USE_CAPABILITIES,1,
1072 [define if capabilities should be used])
1073 AC_SUBST(CAPLIBS,"-lcap")
1074 use_capabilities=yes
1077 if test "$use_capabilities" = "no" ; then
1080 *** The use of capabilities on this system is not possible.
1081 *** You need a recent Linux kernel and some patches:
1082 *** fcaps-2.2.9-990610.patch (kernel patch for 2.2.9)
1083 *** fcap-module-990613.tar.gz (kernel module)
1084 *** libcap-1.92.tar.gz (user mode library and utilities)
1085 *** And you have to configure the kernel with CONFIG_VFS_CAP_PLUGIN
1086 *** set (filesystems menu). Be warned: This code is *really* ALPHA.
1093 if test "$ac_cv_header_sys_shm_h" = "yes"; then
1094 AC_DEFINE(USE_SHM_COPROCESSING,1,
1095 [define if the shared memory interface should be made available])
1098 AM_CONDITIONAL(HAVE_SHM, test "$ac_cv_header_sys_shm_h" = yes)
1101 dnl check whether we have a random device
1103 if test "$try_dev_random" = yes ; then
1104 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
1105 [if test -r "$NAME_OF_DEV_RANDOM" && test -r "$NAME_OF_DEV_URANDOM" ; then
1106 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
1107 if test "$ac_cv_have_dev_random" = yes; then
1108 AC_DEFINE(HAVE_DEV_RANDOM,1,
1109 [defined if the system supports a random device] )
1112 AC_MSG_CHECKING(for random device)
1113 ac_cv_have_dev_random=no
1114 AC_MSG_RESULT(has been disabled)
1119 dnl Figure out the default random module.
1122 if test "$use_static_rnd" = default; then
1123 if test "$ac_cv_have_dev_random" = yes; then
1124 random_modules="rndlinux"
1127 *-mingw32*|*-*-cygwin*)
1128 random_modules="rndw32"
1130 i?86-emx-os2|i?86-*-os2*emx)
1131 random_modules="rndos2"
1134 random_modules="rndatari"
1140 random_modules="rndlinux rndegd rndunix"
1141 AC_DEFINE(USE_ALL_RANDOM_MODULES, 1,
1142 [Allow to select random modules at runtime.])
1147 if test "$use_static_rnd" = auto; then
1148 random_modules="rndlinux rndegd rndunix"
1149 AC_DEFINE(USE_ALL_RANDOM_MODULES, 1)
1151 random_modules="rnd$use_static_rnd";
1155 if test -z "$random_modules"; then
1156 AC_MSG_ERROR(no random module available)
1158 print_egd_warning=no
1159 for rndmod in $random_modules "" ; do
1162 AC_DEFINE(USE_RNDLINUX,1,
1163 [Defined if the /dev/random based RNG should be used.])
1167 AC_DEFINE(USE_RNDUNIX,1,
1168 [Defined if the default Unix RNG should be used.])
1169 print_egd_warning=yes
1173 AC_DEFINE(USE_RNDEGD,1,
1174 [Defined if the EGD based RNG should be used.])
1178 AC_DEFINE(USE_RNDW32,1,
1179 [Defined if the Windows specific RNG should be used.])
1185 AM_CONDITIONAL(USE_RNDLINUX, test "$use_rndlinux" = yes)
1186 AM_CONDITIONAL(USE_RNDUNIX, test "$use_rndunix" = yes)
1187 AM_CONDITIONAL(USE_RNDEGD, test "$use_rndegd" = yes)
1188 AM_CONDITIONAL(USE_RNDW32, test "$use_rndw32" = yes)
1190 dnl setup assembler stuff
1191 AC_MSG_CHECKING(for mpi assembler functions)
1192 if test -f $srcdir/mpi/config.links ; then
1193 . $srcdir/mpi/config.links
1194 AC_CONFIG_LINKS("$mpi_ln_list")
1195 ac_cv_mpi_extra_asm_modules="$mpi_extra_modules"
1196 ac_cv_mpi_sflags="$mpi_sflags"
1197 ac_cv_mpi_config_done="yes"
1200 AC_MSG_RESULT(failed)
1201 AC_MSG_ERROR([mpi/config.links missing!])
1203 MPI_EXTRA_ASM_OBJS=""
1205 if test "$ac_cv_mpi_extra_asm_modules" != ""; then
1206 for i in $ac_cv_mpi_extra_asm_modules; do
1207 show_extraasm="$show_extraasm $i"
1208 MPI_EXTRA_ASM_OBJS="$MPI_EXTRA_ASM_OBJS $i.o"
1211 AC_SUBST(MPI_EXTRA_ASM_OBJS)
1212 MPI_SFLAGS="$ac_cv_mpi_sflags"
1213 AC_SUBST(MPI_SFLAGS)
1215 # Sanity check regex. Tests adapted from mutt.
1217 AC_MSG_CHECKING([whether regular expression support is requested])
1218 AC_ARG_ENABLE(regex,
1219 AC_HELP_STRING([--disable-regex],
1220 [do not handle regular expressions in trust signatures]),
1221 use_regex=$enableval, use_regex=yes)
1222 AC_MSG_RESULT($use_regex)
1224 if test "$use_regex" = yes ; then
1225 AC_MSG_CHECKING([whether the included regex lib is requested])
1226 AC_ARG_WITH(included-regex,
1227 AC_HELP_STRING([--with-included-regex],
1228 [use the included GNU regex library]),
1229 [gnupg_cv_included_regex="$withval"],[gnupg_cv_included_regex=no])
1230 AC_MSG_RESULT($gnupg_cv_included_regex)
1232 if test $gnupg_cv_included_regex = no ; then
1233 # Does the system have regex functions at all?
1234 AC_CHECK_FUNC(regcomp,gnupg_cv_included_regex=no,
1235 gnupg_cv_included_regex=yes)
1238 if test $gnupg_cv_included_regex = no ; then
1239 AC_CACHE_CHECK([whether your system's regexp library is broken],
1240 [gnupg_cv_regex_broken],
1244 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); }],
1245 gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
1247 if test $gnupg_cv_regex_broken = yes ; then
1248 AC_MSG_WARN(your regex is broken - using the included GNU regex instead.)
1249 gnupg_cv_included_regex=yes
1253 if test $gnupg_cv_included_regex = yes; then
1254 AC_DEFINE(USE_INTERNAL_REGEX,1,[ Define if you want to use the included regex lib ])
1257 AC_DEFINE(DISABLE_REGEX,1,[ Define to disable regular expression support ])
1260 AM_CONDITIONAL(USE_INTERNAL_REGEX, test x"$gnupg_cv_included_regex" = xyes)
1262 dnl Do we have zlib? Must do it here because Solaris failed
1263 dnl when compiling a conftest (due to the "-lz" from LIBS).
1265 if test "$g10_force_zlib" = "yes"; then
1268 _cppflags="${CPPFLAGS}"
1269 _ldflags="${LDFLAGS}"
1272 AC_HELP_STRING([--with-zlib=DIR],[use libz in DIR]),[
1273 if test -d "$withval"; then
1274 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1275 LDFLAGS="${LDFLAGS} -L$withval/lib"
1279 AC_CHECK_HEADER(zlib.h,
1280 AC_CHECK_LIB(z, deflateInit2_,
1283 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1284 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
1287 if test "$use_local_zlib" = yes ; then
1288 AC_CONFIG_LINKS(zlib.h:zlib/zlib.h zconf.h:zlib/zconf.h )
1289 ZLIBS="../zlib/libzlib.a"
1292 AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, test "$use_local_zlib" = yes)
1294 if test "$use_bzip2" = yes ; then
1295 _cppflags="${CPPFLAGS}"
1296 _ldflags="${LDFLAGS}"
1298 AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
1300 if test -d "$withval" ; then
1301 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1302 LDFLAGS="${LDFLAGS} -L$withval/lib"
1306 # Checking alongside stdio.h as an early version of bzip2 (1.0)
1307 # required stdio.h to be included before bzlib.h, and Solaris 9 is
1308 # woefully out of date.
1310 if test "$withval" != no ; then
1311 AC_CHECK_HEADER(bzlib.h,
1312 AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
1315 ZLIBS="$ZLIBS -lbz2"
1316 AC_DEFINE(HAVE_BZIP2,1,
1317 [Defined if the bz2 compression library is available])
1319 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1320 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>])
1324 AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
1327 # libusb allows us to use the integrated CCID smartcard reader driver.
1328 # We don't need it if we don't have card support though.
1329 if test "$card_support" = yes ; then
1333 # Check for readline support
1334 GNUPG_CHECK_READLINE
1336 # Allow users to append something to the version string without
1337 # flagging it as development version. The user version parts is
1338 # considered everything after a dash.
1339 if test "$development_version" != yes; then
1343 if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
1344 development_version=yes
1347 if test "$development_version" = yes; then
1348 AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
1349 [Defined if this is not a regular release])
1352 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
1355 # add some extra libs here so that previous tests don't fail for
1356 # mysterious reasons - the final link step should bail out.
1359 dnl NETLIBS="$NETLIBS -lwsock32"
1369 # Special options used with gcc.
1370 if test "$GCC" = yes; then
1371 # Note that it is okay to use CFLAGS here because this are just
1372 # warning options and the user should have a chance of overriding
1374 if test "$USE_MAINTAINER_MODE" = "yes"; then
1375 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
1376 CFLAGS="$CFLAGS -Wformat-nonliteral"
1378 CFLAGS="$CFLAGS -Wall"
1381 # This is handy for debugging so the compiler doesn't rearrange
1382 # things and eliminate variables.
1383 AC_ARG_ENABLE(optimization,
1384 AC_HELP_STRING([--disable-optimization],
1385 [disable compiler optimization]),
1386 [if test $enableval = no ; then
1387 CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
1390 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
1392 _gcc_cflags_save=$CFLAGS
1393 CFLAGS="-Wno-pointer-sign"
1395 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1396 AC_MSG_RESULT($_gcc_psign)
1398 CFLAGS=$_gcc_cflags_save;
1400 if test x"$_gcc_psign" = xyes ; then
1401 CFLAGS="$CFLAGS -Wno-pointer-sign"
1407 if test "$print_egd_warning" = yes; then
1410 *** The performance of the UNIX random gatherer module is not very good
1411 *** and it does not keep the entropy pool over multiple invocations of
1412 *** GnuPG. The suggested way to overcome this problem is to use the
1414 *** Entropy Gathering Daemon (EGD)
1416 *** which provides a entropy source for the whole system. It is written
1417 *** in Perl and available at the GnuPG FTP servers. For more information
1418 *** consult the GnuPG webpages:
1420 *** http://www.gnupg.org/download/#EGD
1422 *** You may want to run ./configure with --enable-static-rnd=egd or
1423 *** --enable-static-rnd=auto to use it.
1437 keyserver/gpgkeys_mailto
1438 keyserver/gpgkeys_test
1447 # Give some feedback
1449 echo " Version info: $PACKAGE_STRING"
1450 echo " Configured for: $PRINTABLE_OS_NAME ($host)"
1451 if test -n "$show_extraasm"; then
1452 echo " Extra cpu specific functions:$show_extraasm"
1456 if test x"$use_camellia" = xyes ; then
1457 echo "WARNING: The Camellia cipher is for testing only and is NOT for production use!"