1 # configure.ac - for GnuPG 2.0
2 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3 # 2006, 2007, 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.
22 min_automake_version="1.10"
24 # Remember to change the version number immediately *after* a release.
25 # Set my_issvn to "yes" for non-released code. Remember to run an
26 # "svn up" and "autogen.sh" right before creating a distribution.
27 m4_define([my_version], [2.0.10])
28 m4_define([my_issvn], [yes])
29 m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
30 | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
32 [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
33 [bug-gnupg@gnupg.org])
34 # Set development_version to yes if the minor number is odd or you
35 # feel that the default check for a development version is not
37 development_version=no
39 NEED_GPG_ERROR_VERSION=1.4
42 NEED_LIBGCRYPT_VERSION=1.4.0
45 NEED_LIBASSUAN_VERSION=1.0.4
48 NEED_KSBA_VERSION=1.0.2
52 PACKAGE_GT=${PACKAGE_NAME}2
53 VERSION=$PACKAGE_VERSION
55 AC_CONFIG_AUX_DIR(scripts)
56 AC_CONFIG_SRCDIR(sm/gpgsm.c)
57 AM_CONFIG_HEADER(config.h)
58 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
64 # Some status variables.
75 disable_keyserver_path=no
79 GNUPG_BUILD_PROGRAM(gpg, yes)
80 GNUPG_BUILD_PROGRAM(gpgsm, yes)
81 GNUPG_BUILD_PROGRAM(agent, yes)
82 GNUPG_BUILD_PROGRAM(scdaemon, yes)
83 GNUPG_BUILD_PROGRAM(tools, yes)
84 GNUPG_BUILD_PROGRAM(doc, yes)
85 GNUPG_BUILD_PROGRAM(symcryptrun, no)
90 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
91 AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
92 [Name of this package for gettext])
93 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
94 AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
96 AC_DEFINE_UNQUOTED(NEED_LIBGCRYPT_VERSION, "$NEED_LIBGCRYPT_VERSION",
97 [Required version of Libgcrypt])
98 AC_DEFINE_UNQUOTED(NEED_KSBA_VERSION, "$NEED_KSBA_VERSION",
99 [Required version of Libksba])
103 # The default is to use the modules from this package and the few
104 # other packages in a standard place; i.e where this package gets
105 # installed. With these options it is possible to override these
106 # ${prefix} depended values with fixed paths, which can't be replaced
107 # at make time. See also am/cmacros.am and the defaults in AH_BOTTOM.
108 AC_ARG_WITH(agent-pgm,
109 [ --with-agent-pgm=PATH Use PATH as the default for the agent)],
110 GNUPG_AGENT_PGM="$withval", GNUPG_AGENT_PGM="" )
111 AC_SUBST(GNUPG_AGENT_PGM)
112 AM_CONDITIONAL(GNUPG_AGENT_PGM, test -n "$GNUPG_AGENT_PGM")
113 show_gnupg_agent_pgm="(default)"
114 test -n "$GNUPG_AGENT_PGM" && show_gnupg_agent_pgm="$GNUPG_AGENT_PGM"
116 AC_ARG_WITH(pinentry-pgm,
117 [ --with-pinentry-pgm=PATH Use PATH as the default for the pinentry)],
118 GNUPG_PINENTRY_PGM="$withval", GNUPG_PINENTRY_PGM="" )
119 AC_SUBST(GNUPG_PINENTRY_PGM)
120 AM_CONDITIONAL(GNUPG_PINENTRY_PGM, test -n "$GNUPG_PINENTRY_PGM")
121 show_gnupg_pinentry_pgm="(default)"
122 test -n "$GNUPG_PINENTRY_PGM" && show_gnupg_pinentry_pgm="$GNUPG_PINENTRY_PGM"
125 AC_ARG_WITH(scdaemon-pgm,
126 [ --with-scdaemon-pgm=PATH Use PATH as the default for the scdaemon)],
127 GNUPG_SCDAEMON_PGM="$withval", GNUPG_SCDAEMON_PGM="" )
128 AC_SUBST(GNUPG_SCDAEMON_PGM)
129 AM_CONDITIONAL(GNUPG_SCDAEMON_PGM, test -n "$GNUPG_SCDAEMON_PGM")
130 show_gnupg_scdaemon_pgm="(default)"
131 test -n "$GNUPG_SCDAEMON_PGM" && show_gnupg_scdaemon_pgm="$GNUPG_SCDAEMON_PGM"
134 AC_ARG_WITH(dirmngr-pgm,
135 [ --with-dirmngr-pgm=PATH Use PATH as the default for the dirmngr)],
136 GNUPG_DIRMNGR_PGM="$withval", GNUPG_DIRMNGR_PGM="" )
137 AC_SUBST(GNUPG_DIRMNGR_PGM)
138 AM_CONDITIONAL(GNUPG_DIRMNGR_PGM, test -n "$GNUPG_DIRMNGR_PGM")
139 show_gnupg_dirmngr_pgm="(default)"
140 test -n "$GNUPG_DIRMNGR_PGM" && show_gnupg_dirmngr_pgm="$GNUPG_DIRMNGR_PGM"
142 AC_ARG_WITH(protect-tool-pgm,
143 [ --with-protect-tool-pgm=PATH Use PATH as the default for the protect-tool)],
144 GNUPG_PROTECT_TOOL_PGM="$withval", GNUPG_PROTECT_TOOL_PGM="" )
145 AC_SUBST(GNUPG_PROTECT_TOOL_PGM)
146 AM_CONDITIONAL(GNUPG_PROTECT_TOOL_PGM, test -n "$GNUPG_PROTECT_TOOL_PGM")
147 show_gnupg_protect_tool_pgm="(default)"
148 test -n "$GNUPG_PROTECT_TOOL_PGM" \
149 && show_gnupg_protect_tool_pgm="$GNUPG_PROTECT_TOOL_PGM"
152 # Some folks want to use only the agent from this packet. Make it
153 # easier for them by providing the configure option
154 # --enable-only-agent.
155 AC_ARG_ENABLE(agent-only,
156 AC_HELP_STRING([--enable-agent-only],[build only the gpg-agent]),
157 build_agent_only=$enableval)
159 # SELinux support includes tracking of sensitive files to avoid
160 # leaking their contents through processing these files by gpg itself
161 AC_MSG_CHECKING([whether SELinux support is requested])
162 AC_ARG_ENABLE(selinux-support,
163 AC_HELP_STRING([--enable-selinux-support],
164 [enable SELinux support]),
165 selinux_support=$enableval, selinux_support=no)
166 AC_MSG_RESULT($selinux_support)
168 # Allow disabling of bzib2 support.
169 # It is defined only after we confirm the library is available later
170 AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
172 AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
173 use_bzip2=$enableval)
174 AC_MSG_RESULT($use_bzip2)
176 # Check whether testing support for Camellia has been requested
177 AC_MSG_CHECKING([whether to enable the CAMELLIA cipher for gpg])
178 AC_ARG_ENABLE(camellia,
179 AC_HELP_STRING([--enable-camellia],[enable the CAMELLIA cipher for gpg]),
180 use_camellia=$enableval)
181 AC_MSG_RESULT($use_camellia)
182 if test x"$use_camellia" = xyes ; then
183 AC_DEFINE(USE_CAMELLIA,1,[Define to include the CAMELLIA cipher into gpg])
186 *** The Camellia cipher for gpg is for testing only and
187 *** is NOT for production use!
192 # Configure option to allow or disallow execution of external
193 # programs, like a photo viewer.
194 AC_MSG_CHECKING([whether to enable external program execution])
196 AC_HELP_STRING([--disable-exec],[disable all external program execution]),
198 AC_MSG_RESULT($use_exec)
199 if test "$use_exec" = no ; then
200 AC_DEFINE(NO_EXEC,1,[Define to disable all external program execution])
203 if test "$use_exec" = yes ; then
204 AC_MSG_CHECKING([whether to enable photo ID viewing])
205 AC_ARG_ENABLE(photo-viewers,
206 [ --disable-photo-viewers disable photo ID viewers],
207 [if test "$enableval" = no ; then
208 AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
210 gnupg_cv_enable_photo_viewers=$enableval
211 AC_MSG_RESULT($enableval)
213 if test "$gnupg_cv_enable_photo_viewers" = yes ; then
214 AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
215 AC_ARG_WITH(photo-viewer,
216 [ --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer],
217 [if test "$withval" = yes ; then
219 elif test "$withval" != no ; then
220 AC_DEFINE_UNQUOTED(FIXED_PHOTO_VIEWER,"$withval",
221 [if set, restrict photo-viewer to this])
223 AC_MSG_RESULT($withval)
226 AC_MSG_CHECKING([whether to enable external keyserver helpers])
227 AC_ARG_ENABLE(keyserver-helpers,
228 [ --disable-keyserver-helpers disable all external keyserver support],
229 [if test "$enableval" = no ; then
230 AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
231 [define to disable keyserver helpers])
233 gnupg_cv_enable_keyserver_helpers=$enableval
234 AC_MSG_RESULT($enableval)
236 if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
237 # LDAP is defined only after we confirm the library is available later
238 AC_MSG_CHECKING([whether LDAP keyserver support is requested])
240 AC_HELP_STRING([--disable-ldap],[disable LDAP keyserver interface only]),
241 try_ldap=$enableval, try_ldap=yes)
242 AC_MSG_RESULT($try_ldap)
244 AC_MSG_CHECKING([whether HKP keyserver support is requested])
246 AC_HELP_STRING([--disable-hkp],[disable HKP keyserver interface only]),
247 try_hkp=$enableval, try_hkp=yes)
248 AC_MSG_RESULT($try_hkp)
250 AC_MSG_CHECKING([whether finger key fetching support is requested])
251 AC_ARG_ENABLE(finger,
252 AC_HELP_STRING([--disable-finger],
253 [disable finger key fetching interface only]),
254 try_finger=$enableval, try_finger=yes)
255 AC_MSG_RESULT($try_finger)
257 AC_MSG_CHECKING([whether generic object key fetching support is requested])
258 AC_ARG_ENABLE(generic,
259 AC_HELP_STRING([--disable-generic],
260 [disable generic object key fetching interface only]),
261 try_generic=$enableval, try_generic=yes)
262 AC_MSG_RESULT($try_generic)
264 AC_MSG_CHECKING([whether email keyserver support is requested])
265 AC_ARG_ENABLE(mailto,
266 AC_HELP_STRING([--enable-mailto],
267 [enable email keyserver interface only]),
268 try_mailto=$enableval, try_mailto=no)
269 AC_MSG_RESULT($try_mailto)
272 AC_MSG_CHECKING([whether keyserver exec-path is enabled])
273 AC_ARG_ENABLE(keyserver-path,
274 AC_HELP_STRING([--disable-keyserver-path],
275 [disable the exec-path option for keyserver helpers]),
276 [if test "$enableval" = no ; then
277 disable_keyserver_path=yes
279 AC_MSG_RESULT($enableval)
284 # Check for the key/uid cache size. This can't be zero, but can be
285 # pretty small on embedded systems. This is used for the gpg part.
287 AC_MSG_CHECKING([for the size of the key and uid cache])
288 AC_ARG_ENABLE(key-cache,
289 AC_HELP_STRING([--enable-key-cache=SIZE],
290 [Set key cache to SIZE (default 4096)]),,enableval=4096)
291 if test "$enableval" = "no"; then
293 elif test "$enableval" = "yes" || test "$enableval" = ""; then
297 key_cache_size=`echo "$enableval" | sed 's/[A-Za-z]//g'`
299 if test "$enableval" != "$key_cache_size" || test "$key_cache_size" -lt 5; then
300 AC_MSG_ERROR([invalid key-cache size])
302 AC_MSG_RESULT($key_cache_size)
303 AC_DEFINE_UNQUOTED(PK_UID_CACHE_SIZE,$key_cache_size,
304 [Size of the key and UID caches])
309 # Check whether we want to use Linux capabilities
311 AC_MSG_CHECKING([whether use of capabilities is requested])
312 AC_ARG_WITH(capabilities,
313 [ --with-capabilities use linux capabilities [default=no]],
314 [use_capabilities="$withval"],[use_capabilities=no])
315 AC_MSG_RESULT($use_capabilities)
318 # To avoid double inclusion of config.h which might happen at some
319 # places, we add the usual double inclusion protection at the top of
323 #ifndef GNUPG_CONFIG_H_INCLUDED
324 #define GNUPG_CONFIG_H_INCLUDED
328 # Stuff which goes at the bottom of config.h.
331 /* This is the major version number of GnuPG so that
332 source included files can test for this. Note, that
333 we use 2 here even for GnuPG 1.9.x. */
334 #define GNUPG_MAJOR_VERSION 2
336 /* Now to separate file name parts.
337 Please note that the string version must not contain more
338 than one character because the code assumes strlen()==1 */
339 #ifdef HAVE_DOSISH_SYSTEM
340 #define DIRSEP_C '\\'
341 #define DIRSEP_S "\\"
344 #define PATHSEP_C ';'
345 #define PATHSEP_S ";"
346 #define EXEEXT_S ".exe"
352 #define PATHSEP_C ':'
353 #define PATHSEP_S ":"
357 /* This is the same as VERSION, but should be overridden if the
358 platform cannot handle things like dots '.' in filenames. Set
359 SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
360 uses for dots and dashes. */
361 #define SAFE_VERSION VERSION
362 #define SAFE_VERSION_DOT '.'
363 #define SAFE_VERSION_DASH '-'
365 /* Some global constants. */
366 #ifdef HAVE_DRIVE_LETTERS
367 #define GNUPG_DEFAULT_HOMEDIR "c:/gnupg"
369 #define GNUPG_DEFAULT_HOMEDIR "/SYS\$LOGIN/gnupg"
371 #define GNUPG_DEFAULT_HOMEDIR "~/.gnupg"
373 #define GNUPG_PRIVATE_KEYS_DIR "private-keys-v1.d"
375 /* For some systems (DOS currently), we hardcode the path here. For
376 POSIX systems the values are constructed by the Makefiles, so that
377 the values may be overridden by the make invocations; this is to
378 comply with the GNU coding standards. */
379 #ifdef HAVE_DRIVE_LETTERS
380 /* FIXME: We need to use a function to determine these values depending
381 on the actual installation directory. */
382 #define GNUPG_BINDIR "c:\\gnupg"
383 #define GNUPG_LIBEXECDIR "c:\\gnupg"
384 #define GNUPG_LIBDIR "c:\\gnupg"
385 #define GNUPG_DATADIR "c:\\gnupg"
386 #define GNUPG_SYSCONFDIR "c:\\gnupg"
389 /* Derive some other constants. */
390 #if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
391 #define EXEC_TEMPFILE_ONLY
395 /* We didn't define endianness above, so get it from OS macros. This
396 is intended for making fat binary builds on OS X. */
397 #if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
398 #if defined(__BIG_ENDIAN__)
399 #define BIG_ENDIAN_HOST 1
400 #elif defined(__LITTLE_ENDIAN__)
401 #define LITTLE_ENDIAN_HOST 1
403 #error "No endianness found"
408 /* Hack used for W32: ldap.m4 also tests for the ASCII version of
409 ldap_start_tls_s because that is the actual symbol used in the
410 library. winldap.h redefines it to our commonly used value,
411 thus we define our usual macro here. */
412 #ifdef HAVE_LDAP_START_TLS_SA
413 # ifndef HAVE_LDAP_START_TLS_S
414 # define HAVE_LDAP_START_TLS_S 1
419 /* Tell libgcrypt not to use its own libgpg-error implementation. */
420 #define USE_LIBGPG_ERROR 1
422 /* We use jnlib, so tell other modules about it. */
423 #define HAVE_JNLIB_LOGGING 1
425 /* Our HTTP code is used in estream mode. */
426 #define HTTP_USE_ESTREAM 1
428 /* Under W32 we do an explicit socket initialization, thus we need to
429 avoid the on-demand initialization which would also install an atexit
431 #define HTTP_NO_WSASTARTUP
433 /* We always include support for the OpenPGP card. */
434 #define ENABLE_CARD_SUPPORT 1
436 /* We don't want the old assuan codes anymore. */
437 #define _ASSUAN_ONLY_GPG_ERRORS 1
439 /* We explicitly need to disable PTH's soft mapping as Debian
440 currently enables it by default for no reason. */
441 #define PTH_SYSCALL_SOFT 0
443 /* We want to use the libgcrypt provided memory allocation for
445 #define _ESTREAM_PRINTF_MALLOC gcry_malloc
446 #define _ESTREAM_PRINTF_FREE gcry_free
447 #define _ESTREAM_PRINTF_EXTRA_INCLUDE "util.h"
449 #endif /*GNUPG_CONFIG_H_INCLUDED*/
455 # Checks for programs.
456 AC_MSG_NOTICE([checking for programs])
459 missing_dir=`cd $ac_aux_dir && pwd`
460 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
461 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
462 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
463 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
464 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
469 if test "x$ac_cv_prog_cc_c89" = "xno" ; then
470 AC_MSG_ERROR([[No C-89 compiler found]])
475 AC_CHECK_TOOL(AR, ar, :)
476 AC_PATH_PROG(PERL,"perl")
477 AC_CHECK_TOOL(WINDRES, windres, :)
484 # We need to compile and run a program on the build machine. A
485 # comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
486 # the AC archive is broken for autoconf 2.57. Given that tehre is no
487 # newer version of that macro, we assume that it is also broken for
488 # autoconf 2.61 and thus we use a simple but usually sufficient
490 AC_MSG_CHECKING(for cc for build)
491 if test "$cross_compiling" = "yes"; then
492 CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
494 CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
496 AC_MSG_RESULT($CC_FOR_BUILD)
497 AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
502 have_dosish_system=no
504 use_simple_gettext=no
507 # special stuff for Windoze NT
508 ac_cv_have_dev_random=no
509 AC_DEFINE(USE_ONLY_8DOT3,1,
510 [set this to limit filenames to the 8.3 format])
511 AC_DEFINE(HAVE_DRIVE_LETTERS,1,
512 [defined if we must run on a stupid file system])
513 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
514 [because the Unix gettext has too much overhead on
515 MingW32 systems and these systems lack Posix functions,
516 we use a simplified version of gettext])
517 disable_keyserver_path=yes
518 have_dosish_system=yes
521 use_simple_gettext=yes
523 i?86-emx-os2 | i?86-*-os2*emx )
524 # OS/2 with the EMX environment
525 ac_cv_have_dev_random=no
526 AC_DEFINE(HAVE_DRIVE_LETTERS)
527 have_dosish_system=yes
532 # DOS with the DJGPP environment
533 ac_cv_have_dev_random=no
534 AC_DEFINE(HAVE_DRIVE_LETTERS)
535 have_dosish_system=yes
541 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
542 LDFLAGS="$LDFLAGS -L/usr/local/lib"
546 if test -z "$GCC" ; then
547 CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
551 if test -z "$GCC" ; then
552 # Suppress all warnings
553 # to get rid of the unsigned/signed char mismatch warnings.
558 if test -z "$GCC" ; then
559 # Use the newer compiler `-msg_disable ptrmismatch1' to
560 # get rid of the unsigned/signed char mismatch warnings.
561 # Using this may hide other pointer mismatch warnings, but
562 # it at least lets other warning classes through
563 CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
572 if test "$have_dosish_system" = yes; then
573 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
574 [Defined if we run on some of the PCDOS like systems
575 (DOS, Windoze. OS/2) with special properties like
578 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
580 AM_CONDITIONAL(USE_SIMPLE_GETTEXT, test x"$use_simple_gettext" = xyes)
582 if test "$have_w32_system" = yes; then
583 AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
585 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
587 if test "$disable_keyserver_path" = yes; then
588 AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
589 [Defined to disable exec-path for keyserver helpers])
592 # (These need to go after AC_PROG_CC so that $EXEEXT is defined)
593 AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[The executable file extension, if any])
595 if test x"$try_hkp" = xyes ; then
596 AC_SUBST(GPGKEYS_HKP,"gpg2keys_hkp$EXEEXT")
599 if test x"$try_finger" = xyes ; then
600 AC_SUBST(GPGKEYS_FINGER,"gpg2keys_finger$EXEEXT")
606 # Checks for libraries.
608 AC_MSG_NOTICE([checking for libraries])
612 # libgpg-error is a library with error codes shared between GnuPG
615 AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
616 have_gpg_error=yes,have_gpg_error=no)
620 # Libgcrypt is our generic crypto library
622 AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
623 have_libgcrypt=yes,have_libgcrypt=no)
627 # libassuan is used for IPC
629 AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
630 have_libassuan=yes,have_libassuan=no)
631 if test "$have_libassuan" = "yes"; then
633 AM_PATH_LIBASSUAN_PTH("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
634 have_libassuan=yes,have_libassuan=no)
635 AM_CHECK_LIBASSUAN("$NEED_LIBASSUAN_API:1.0.1",
636 [AC_DEFINE(HAVE_ASSUAN_SET_IO_MONITOR, 1,
637 [Define to 1 if you have the `assuan_set_io_monitor' function.])],)
638 AC_DEFINE_UNQUOTED(GNUPG_LIBASSUAN_VERSION, "$libassuan_version",
639 [version of the libbassuan library])
645 # libksba is our X.509 support library
647 AM_PATH_KSBA("$NEED_KSBA_API:$NEED_KSBA_VERSION",have_ksba=yes,have_ksba=no)
651 # libusb allows us to use the integrated CCID smartcard reader driver.
653 # FiXME: Use GNUPG_CHECK_LIBUSB and modify to use separate AC_SUBSTs.
654 AC_CHECK_LIB(usb, usb_bulk_write,
655 [ LIBUSB_LIBS="$LIBUSB_LIBS -lusb"
656 AC_DEFINE(HAVE_LIBUSB,1,
657 [defined if libusb is available])
660 AC_SUBST(LIBUSB_LIBS)
661 AC_CHECK_FUNCS(usb_create_match)
664 # Check wether it is necessary to link against libdl.
666 gnupg_dlopen_save_libs="$LIBS"
668 AC_SEARCH_LIBS(dlopen, c dl,,,)
671 LIBS="$gnupg_dlopen_save_libs"
674 # Checks for symcryptrun:
677 # libutil has openpty() and login_tty().
678 AC_CHECK_LIB(util, openpty,
679 [ LIBUTIL_LIBS="$LIBUTIL_LIBS -lutil"
680 AC_DEFINE(HAVE_LIBUTIL,1,
681 [defined if libutil is available])
683 AC_SUBST(LIBUTIL_LIBS)
685 # shred is used to clean temporary plain text files.
686 AC_PATH_PROG(SHRED, shred, /usr/bin/shred)
687 AC_DEFINE_UNQUOTED(SHRED,
688 "${SHRED}", [defines the filename of the shred program])
693 # Check whether the GNU Pth library is available
694 # Note, that we include a Pth emulation for W32.
697 if test "$have_pth" = "yes"; then
698 AC_DEFINE(USE_GNU_PTH, 1,
699 [Defined if the GNU Portable Thread Library should be used])
703 *** To support concurrent access to the gpg-agent and the SCdaemon
704 *** we need the support of the GNU Portable Threads Library.
705 *** Download it from ftp://ftp.gnu.org/gnu/pth/
706 *** On a Debian GNU/Linux system you might want to try
707 *** apt-get install libpth-dev
712 AC_MSG_NOTICE([checking for networking options])
715 # Must check for network library requirements before doing link tests
716 # for ldap, for example. If ldap libs are static (or dynamic and without
717 # ELF runtime link paths), then link will fail and LDAP support won't
720 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
721 [NETLIBS="-lnsl $NETLIBS"]))
722 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
723 [NETLIBS="-lsocket $NETLIBS"]))
726 # Now try for the resolver functions so we can use DNS for SRV, PA and CERT.
728 if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
729 AC_ARG_ENABLE(dns-srv,
730 AC_HELP_STRING([--disable-dns-srv],
731 [disable the use of DNS SRV in HKP and HTTP]),
732 use_dns_srv=$enableval,use_dns_srv=yes)
735 AC_ARG_ENABLE(dns-pka,
736 AC_HELP_STRING([--disable-dns-pka],
737 [disable the use of PKA records in DNS]),
738 use_dns_pka=$enableval,use_dns_pka=yes)
740 AC_ARG_ENABLE(dns-cert,
741 AC_HELP_STRING([--disable-dns-cert],
742 [disable the use of CERT records in DNS]),
743 use_dns_cert=$enableval,use_dns_cert=yes)
745 if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes \
746 || test x"$use_dns_cert" = xyes; then
749 # the double underscore thing is a glibc-ism?
750 AC_SEARCH_LIBS(res_query,resolv bind,,
751 AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
752 AC_SEARCH_LIBS(dn_expand,resolv bind,,
753 AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
754 AC_SEARCH_LIBS(dn_skipname,resolv bind,,
755 AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
757 if test x"$have_resolver" != xno ; then
759 # Make sure that the BIND 4 resolver interface is workable before
760 # enabling any code that calls it. At some point I'll rewrite the
761 # code to use the BIND 8 resolver API.
762 # We might also want to use adns instead.
764 AC_MSG_CHECKING([whether the resolver is usable])
765 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
766 #include <netinet/in.h>
767 #include <arpa/nameser.h>
768 #include <resolv.h>],
769 [[unsigned char answer[PACKETSZ];
770 res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
772 dn_expand(0,0,0,0,0);
773 ]])],have_resolver=yes,have_resolver=no)
774 AC_MSG_RESULT($have_resolver)
776 # This is Apple-specific and somewhat bizarre as they changed the
777 # define in bind 8 for some reason.
779 if test x"$have_resolver" != xyes ; then
781 [whether I can make the resolver usable with BIND_8_COMPAT])
782 AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
783 #include <sys/types.h>
784 #include <netinet/in.h>
785 #include <arpa/nameser.h>
786 #include <resolv.h>],
787 [[unsigned char answer[PACKETSZ];
788 res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
789 dn_skipname(0,0); dn_expand(0,0,0,0,0);
790 ]])],[have_resolver=yes ; need_compat=yes])
791 AC_MSG_RESULT($have_resolver)
795 if test x"$have_resolver" = xyes ; then
798 if test x"$use_dns_srv" = xyes ; then
799 AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
802 if test x"$use_dns_pka" = xyes ; then
803 AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
806 if test x"$use_dns_cert" = xyes ; then
807 AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
810 if test x"$need_compat" = xyes ; then
811 AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
824 AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
830 _cppflags="${CPPFLAGS}"
831 _ldflags="${LDFLAGS}"
833 AC_HELP_STRING([--with-adns=DIR],
834 [look for the adns library in DIR]),
835 [if test -d "$withval"; then
836 CPPFLAGS="${CPPFLAGS} -I$withval/include"
837 LDFLAGS="${LDFLAGS} -L$withval/lib"
839 AC_CHECK_HEADERS(adns.h,
840 AC_CHECK_LIB(adns, adns_init,
842 [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}]),
843 [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}])
844 if test "$have_adns" = "yes"; then
848 # Newer adns versions feature a free function to be used under W32.
849 AC_CHECK_FUNCS(adns_free)
855 if test "$try_ldap" = yes ; then
856 GNUPG_CHECK_LDAP($NETLIBS)
860 # Check for curl. We fake the curl API if libcurl isn't installed.
861 # We require 7.10 or later as we use curl_version_info().
863 LIBCURL_CHECK_CONFIG([yes],[7.10],,[fake_curl=yes])
864 AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
866 # Generic, for us, means curl
868 if test x"$try_generic" = xyes ; then
869 AC_SUBST(GPGKEYS_CURL,"gpg2keys_curl$EXEEXT")
875 # This isn't necessarily sendmail itself, but anything that gives a
876 # sendmail-ish interface to the outside world. That includes Exim,
877 # Postfix, etc. Basically, anything that can handle "sendmail -t".
878 if test "$try_mailto" = yes ; then
879 AC_ARG_WITH(mailprog,
880 AC_HELP_STRING([--with-mailprog=NAME],
881 [use "NAME -t" for mail transport]),
884 if test x"$with_mailprog" = xyes ; then
885 AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
886 if test "$ac_cv_path_SENDMAIL" ; then
887 GPGKEYS_MAILTO="gpg2keys_mailto"
889 elif test x"$with_mailprog" != xno ; then
890 AC_MSG_CHECKING([for a mail transport program])
891 AC_SUBST(SENDMAIL,$with_mailprog)
892 AC_MSG_RESULT($with_mailprog)
893 GPGKEYS_MAILTO="gpg2keys_mailto"
897 AC_SUBST(GPGKEYS_MAILTO)
900 # Construct a printable name of the OS
904 PRINTABLE_OS_NAME="MingW32"
907 PRINTABLE_OS_NAME="Cygwin"
909 i?86-emx-os2 | i?86-*-os2*emx )
910 PRINTABLE_OS_NAME="OS/2"
913 PRINTABLE_OS_NAME="MSDOS/DJGPP"
917 PRINTABLE_OS_NAME="GNU/Linux"
920 PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
923 AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
924 [A human readable text with the name of the OS])
936 AC_MSG_NOTICE([checking for gettext])
938 AM_GNU_GETTEXT_VERSION([0.17])
939 if test "$try_gettext" = yes; then
940 AM_GNU_GETTEXT([external],[need-ngettext])
942 # gettext requires some extra checks. These really should be part of
943 # the basic AM_GNU_GETTEXT macro. TODO: move other gettext-specific
944 # function checks to here.
946 AC_CHECK_FUNCS(strchr)
949 USE_INCLUDED_LIBINTL=no
950 BUILD_INCLUDED_LIBINTL=no
953 AC_SUBST(USE_INCLUDED_LIBINTL)
954 AC_SUBST(BUILD_INCLUDED_LIBINTL)
958 # We use HAVE_LANGINFO_CODESET in a couple of places.
961 # Checks required for our use locales
968 if test "$selinux_support" = yes ; then
969 AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support])
974 # Checks for header files.
976 AC_MSG_NOTICE([checking for header files])
978 AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h])
979 AC_CHECK_HEADERS([pty.h pwd.h inttypes.h])
984 # Checks for typedefs, structures, and compiler characteristics.
986 AC_MSG_NOTICE([checking for system characteristics])
998 AC_ARG_ENABLE(endian-check,
999 AC_HELP_STRING([--disable-endian-check],
1000 [disable the endian check and trust the OS provided macros]),
1001 endiancheck=$enableval,endiancheck=yes)
1003 if test x"$endiancheck" = xyes ; then
1007 # fixme: we should get rid of the byte type
1008 GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
1009 GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
1010 GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
1011 GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
1012 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
1014 AC_CHECK_SIZEOF(unsigned short)
1015 AC_CHECK_SIZEOF(unsigned int)
1016 AC_CHECK_SIZEOF(unsigned long)
1017 AC_CHECK_SIZEOF(unsigned long long)
1018 AC_CHECK_SIZEOF(time_t,,[[
1020 #if TIME_WITH_SYS_TIME
1021 # include <sys/time.h>
1024 # if HAVE_SYS_TIME_H
1025 # include <sys/time.h>
1033 # Ensure that we have UINT64_C before we bother to check for uint64_t
1034 # Fixme: really needed in gnupg? I think it is only useful in libcgrypt.
1035 AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works],
1036 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>
1037 uint64_t foo=UINT64_C(42);]),
1038 gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
1039 if test "$gnupg_cv_uint64_c_works" = "yes" ; then
1040 AC_CHECK_SIZEOF(uint64_t)
1043 if test "$ac_cv_sizeof_unsigned_short" = "0" \
1044 || test "$ac_cv_sizeof_unsigned_int" = "0" \
1045 || test "$ac_cv_sizeof_unsigned_long" = "0"; then
1046 AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
1051 # Checks for library functions.
1053 AC_MSG_NOTICE([checking for library functions])
1054 AC_CHECK_DECLS(getpagesize)
1058 AC_CHECK_FUNCS([strerror strlwr tcgetattr mmap])
1059 AC_CHECK_FUNCS([strcasecmp strncasecmp ctermid times gmtime_r])
1060 AC_CHECK_FUNCS([unsetenv getpwnam getpwuid fcntl ftruncate])
1061 AC_CHECK_FUNCS([gettimeofday getrusage setrlimit clock_gettime])
1062 AC_CHECK_FUNCS([atexit raise getpagesize strftime nl_langinfo setlocale])
1063 AC_CHECK_FUNCS([waitpid wait4 sigaction sigprocmask pipe stat getaddrinfo])
1064 AC_CHECK_FUNCS([ttyname rand ftello])
1066 AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
1069 # These are needed by libjnlib - fixme: we should use a jnlib.m4
1071 AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol])
1072 AC_CHECK_FUNCS([memrchr isascii timegm getrusage setrlimit stat setlocale])
1073 AC_CHECK_FUNCS([flockfile funlockfile fopencookie funopen])
1078 gl_SOURCE_BASE([gl])
1080 gl_MODULES([setenv mkdtemp xsize strpbrk])
1087 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
1090 # Sanity check regex. Tests adapted from mutt.
1092 AC_MSG_CHECKING([whether regular expression support is requested])
1093 AC_ARG_ENABLE(regex,
1094 AC_HELP_STRING([--disable-regex],
1095 [do not handle regular expressions in trust signatures]),
1096 use_regex=$enableval, use_regex=yes)
1097 AC_MSG_RESULT($use_regex)
1099 if test "$use_regex" = yes ; then
1100 _cppflags="${CPPFLAGS}"
1101 _ldflags="${LDFLAGS}"
1103 AC_HELP_STRING([--with-regex=DIR],[look for regex in DIR]),
1105 if test -d "$withval" ; then
1106 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1107 LDFLAGS="${LDFLAGS} -L$withval/lib"
1111 # Does the system have regex functions at all?
1112 AC_SEARCH_LIBS([regcomp], [regex])
1113 AC_CHECK_FUNC(regcomp, gnupg_cv_have_regex=yes, gnupg_cv_have_regex=no)
1115 if test $gnupg_cv_have_regex = no; then
1118 if test x"$cross_compiling" = xyes; then
1119 AC_MSG_WARN([cross compiling; assuming regexp libray is not broken])
1121 AC_CACHE_CHECK([whether your system's regexp library is broken],
1122 [gnupg_cv_regex_broken],
1126 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); }],
1127 gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
1129 if test $gnupg_cv_regex_broken = yes; then
1130 AC_MSG_WARN([your regex is broken - disabling regex use])
1135 CPPFLAGS="${_cppflags}"
1136 LDFLAGS="${_ldflags}"
1139 if test "$use_regex" != yes ; then
1140 AC_DEFINE(DISABLE_REGEX,1, [Define to disable regular expression support])
1142 AM_CONDITIONAL(DISABLE_REGEX, test x"$use_regex" != xyes)
1147 # Do we have zlib? Must do it here because Solaris failed
1148 # when compiling a conftest (due to the "-lz" from LIBS).
1149 # Note that we combine zlib and bzlib2 in ZLIBS.
1151 _cppflags="${CPPFLAGS}"
1152 _ldflags="${LDFLAGS}"
1154 [ --with-zlib=DIR use libz in DIR],[
1155 if test -d "$withval"; then
1156 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1157 LDFLAGS="${LDFLAGS} -L$withval/lib"
1161 AC_CHECK_HEADER(zlib.h,
1162 AC_CHECK_LIB(z, deflateInit2_,
1164 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1165 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
1168 # Check whether we can support bzip2
1170 if test "$use_bzip2" = yes ; then
1171 _cppflags="${CPPFLAGS}"
1172 _ldflags="${LDFLAGS}"
1174 AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
1176 if test -d "$withval" ; then
1177 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1178 LDFLAGS="${LDFLAGS} -L$withval/lib"
1182 # Checking alongside stdio.h as an early version of bzip2 (1.0)
1183 # required stdio.h to be included before bzlib.h, and Solaris 9 is
1184 # woefully out of date.
1185 if test "$withval" != no ; then
1186 AC_CHECK_HEADER(bzlib.h,
1187 AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
1190 ZLIBS="$ZLIBS -lbz2"
1191 AC_DEFINE(HAVE_BZIP2,1,
1192 [Defined if the bz2 compression library is available])
1194 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1195 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>])
1198 AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
1202 # Check for readline support
1203 GNUPG_CHECK_READLINE
1206 # Allow users to append something to the version string without
1207 # flagging it as development version. The user version parts is
1208 # considered everything after a dash.
1210 if test "$development_version" != yes; then
1214 if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
1215 development_version=yes
1218 if test "$development_version" = yes; then
1219 AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
1220 [Defined if this is not a regular release])
1223 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
1227 # Add some extra libs here so that previous tests don't fail for
1228 # mysterious reasons - the final link step should bail out.
1229 # W32SOCKLIBS is also defined so that if can be used for tools not
1230 # requiring any network stuff but linking to code in libcommon which
1231 # tracks in winsock stuff (e.g. init_common_subsystems.
1232 if test "$have_w32_system" = yes; then
1233 W32SOCKLIBS="-lws2_32"
1234 NETLIBS="${NETLIBS} ${W32SOCKLIBS}"
1238 AC_SUBST(W32SOCKLIBS)
1241 # Setup gcc specific options
1243 AC_MSG_NOTICE([checking for cc features])
1244 if test "$GCC" = yes; then
1245 # Note that it is okay to use CFLAGS here because this are just
1246 # warning options and the user should have a chance of overriding
1248 if test "$USE_MAINTAINER_MODE" = "yes"; then
1249 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
1250 CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
1251 AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
1252 _gcc_cflags_save=$CFLAGS
1253 CFLAGS="-Wno-missing-field-initializers"
1254 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
1255 AC_MSG_RESULT($_gcc_wopt)
1256 CFLAGS=$_gcc_cflags_save;
1257 if test x"$_gcc_wopt" = xyes ; then
1258 CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
1260 AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
1261 _gcc_cflags_save=$CFLAGS
1262 CFLAGS="-Wdeclaration-after-statement"
1263 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
1264 AC_MSG_RESULT($_gcc_wopt)
1265 CFLAGS=$_gcc_cflags_save;
1266 if test x"$_gcc_wopt" = xyes ; then
1267 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
1270 CFLAGS="$CFLAGS -Wall"
1273 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
1274 _gcc_cflags_save=$CFLAGS
1275 CFLAGS="-Wno-pointer-sign"
1276 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1277 AC_MSG_RESULT($_gcc_psign)
1278 CFLAGS=$_gcc_cflags_save;
1279 if test x"$_gcc_psign" = xyes ; then
1280 CFLAGS="$CFLAGS -Wno-pointer-sign"
1283 AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
1284 _gcc_cflags_save=$CFLAGS
1285 CFLAGS="-Wpointer-arith"
1286 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1287 AC_MSG_RESULT($_gcc_psign)
1288 CFLAGS=$_gcc_cflags_save;
1289 if test x"$_gcc_psign" = xyes ; then
1290 CFLAGS="$CFLAGS -Wpointer-arith"
1296 # This is handy for debugging so the compiler doesn't rearrange
1297 # things and eliminate variables.
1299 AC_ARG_ENABLE(optimization,
1300 AC_HELP_STRING([--disable-optimization],
1301 [disable compiler optimization]),
1302 [if test $enableval = no ; then
1303 CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
1307 # Prepare building of estream
1313 # Decide what to build
1315 if test "$have_adns" = "yes"; then
1316 AC_SUBST(GPGKEYS_KDNS, "gpg2keys_kdns$EXEEXT")
1321 if test $have_ksba = no; then
1326 build_agent_threaded=""
1327 if test "$build_agent" = "yes"; then
1328 if test $have_pth = no; then
1329 build_agent_threaded="(not multi-threaded)"
1334 build_scdaemon_extra=""
1335 if test "$build_scdaemon" = "yes"; then
1337 if test $have_pth = no; then
1338 build_scdaemon_extra="not multi-threaded"
1342 if test $have_libusb = no; then
1343 build_scdaemon_extra="${tmp}without internal CCID driver"
1346 if test -n "$build_scdaemon_extra"; then
1347 build_scdaemon_extra="(${build_scdaemon_extra})"
1352 if test "$build_agent_only" = "yes" ; then
1361 AM_CONDITIONAL(BUILD_GPG, test "$build_gpg" = "yes")
1362 AM_CONDITIONAL(BUILD_GPGSM, test "$build_gpgsm" = "yes")
1363 AM_CONDITIONAL(BUILD_AGENT, test "$build_agent" = "yes")
1364 AM_CONDITIONAL(BUILD_SCDAEMON, test "$build_scdaemon" = "yes")
1365 AM_CONDITIONAL(BUILD_TOOLS, test "$build_tools" = "yes")
1366 AM_CONDITIONAL(BUILD_DOC, test "$build_doc" = "yes")
1367 AM_CONDITIONAL(BUILD_SYMCRYPTRUN, test "$build_symcryptrun" = "yes")
1369 AM_CONDITIONAL(RUN_GPG_TESTS,
1370 test x$cross_compiling = xno -a "$build_gpg" = yes )
1374 # Print errors here so that they are visible all
1375 # together and the user can acquire them all together.
1378 if test "$have_gpg_error" = "no"; then
1382 *** You need libgpg-error to build this program.
1383 ** This library is for example available at
1384 *** ftp://ftp.gnupg.org/gcrypt/libgpg-error
1385 *** (at least version $NEED_GPG_ERROR_VERSION is required.)
1388 if test "$have_libgcrypt" = "no"; then
1392 *** You need libgcrypt to build this program.
1393 ** This library is for example available at
1394 *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
1395 *** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)
1398 if test "$have_libassuan" = "no"; then
1402 *** You need libassuan with Pth support to build this program.
1403 *** This library is for example available at
1404 *** ftp://ftp.gnupg.org/gcrypt/libassuan/
1405 *** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required).
1408 if test "$have_ksba" = "no"; then
1411 *** You need libksba to build this program.
1412 *** This library is for example available at
1413 *** ftp://ftp.gnupg.org/gcrypt/libksba/
1414 *** (at least version $NEED_KSBA_VERSION using API $NEED_KSBA_API is required).
1417 if test "$missing_pth" = "yes"; then
1420 *** It is now required to build with support for the
1421 *** GNU Portable Threads Library (Pth). Please install this
1422 *** library first. The library is for example available at
1423 *** ftp://ftp.gnu.org/gnu/pth/
1424 *** On a Debian GNU/Linux system you can install it using
1425 *** apt-get install libpth-dev
1426 *** To build GnuPG for Windows you need to use the W32PTH
1427 *** package; available at:
1428 *** ftp://ftp.g10code.com/g10code/w32pth/
1433 if test "$die" = "yes"; then
1436 *** Required libraries not found. Please consult the above messages
1437 *** and install them before running configure again.
1443 AC_CONFIG_FILES([ m4/Makefile
1456 keyserver/gpg2keys_mailto
1457 keyserver/gpg2keys_test
1462 tests/openpgp/Makefile
1463 tests/pkits/Makefile
1469 GnuPG v${VERSION} has been configured as follows:
1471 Platform: $PRINTABLE_OS_NAME ($host)
1474 S/MIME: $build_gpgsm
1475 Agent: $build_agent $build_agent_threaded
1476 Smartcard: $build_scdaemon $build_scdaemon_extra
1478 Protect tool: $show_gnupg_protect_tool_pgm
1479 Default agent: $show_gnupg_agent_pgm
1480 Default pinentry: $show_gnupg_pinentry_pgm
1481 Default scdaemon: $show_gnupg_scdaemon_pgm
1482 Default dirmngr: $show_gnupg_dirmngr_pgm
1484 if test x"$use_regex" != xyes ; then
1486 Warning: No regular expression support available.
1487 OpenPGP trust signatures won't work.
1488 gpg-check-pattern will not be build.
1491 if test x"$use_camellia" = xyes ; then
1493 echo "WARNING: The Camellia cipher for gpg is for testing only"
1494 echo " and is NOT for production use!"