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])
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;q;}')]))
34 [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
35 [bug-gnupg@gnupg.org])
36 # Set development_version to yes if the minor number is odd or you
37 # feel that the default check for a development version is not
39 development_version=no
41 NEED_GPG_ERROR_VERSION=1.4
44 NEED_LIBGCRYPT_VERSION=1.2.2
47 NEED_LIBASSUAN_VERSION=1.0.4
50 NEED_KSBA_VERSION=1.0.2
54 PACKAGE_GT=${PACKAGE_NAME}2
55 VERSION=$PACKAGE_VERSION
57 AC_CONFIG_AUX_DIR(scripts)
58 AC_CONFIG_SRCDIR(sm/gpgsm.c)
59 AM_CONFIG_HEADER(config.h)
60 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
66 # Some status variables.
77 disable_keyserver_path=no
81 GNUPG_BUILD_PROGRAM(gpg, yes)
82 GNUPG_BUILD_PROGRAM(gpgsm, yes)
83 GNUPG_BUILD_PROGRAM(agent, yes)
84 GNUPG_BUILD_PROGRAM(scdaemon, yes)
85 GNUPG_BUILD_PROGRAM(tools, yes)
86 GNUPG_BUILD_PROGRAM(doc, yes)
87 GNUPG_BUILD_PROGRAM(symcryptrun, no)
92 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
93 AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
94 [Name of this package for gettext])
95 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
96 AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
98 AC_DEFINE_UNQUOTED(NEED_LIBGCRYPT_VERSION, "$NEED_LIBGCRYPT_VERSION",
99 [Required version of Libgcrypt])
100 AC_DEFINE_UNQUOTED(NEED_KSBA_VERSION, "$NEED_KSBA_VERSION",
101 [Required version of Libksba])
105 # The default is to use the modules from this package and the few
106 # other packages in a standard place; i.e where this package gets
107 # installed. With these options it is possible to override these
108 # ${prefix} depended values with fixed paths, which can't be replaced
109 # at make time. See also am/cmacros.am and the defaults in AH_BOTTOM.
110 AC_ARG_WITH(agent-pgm,
111 [ --with-agent-pgm=PATH Use PATH as the default for the agent)],
112 GNUPG_AGENT_PGM="$withval", GNUPG_AGENT_PGM="" )
113 AC_SUBST(GNUPG_AGENT_PGM)
114 AM_CONDITIONAL(GNUPG_AGENT_PGM, test -n "$GNUPG_AGENT_PGM")
115 show_gnupg_agent_pgm="(default)"
116 test -n "$GNUPG_AGENT_PGM" && show_gnupg_agent_pgm="$GNUPG_AGENT_PGM"
118 AC_ARG_WITH(pinentry-pgm,
119 [ --with-pinentry-pgm=PATH Use PATH as the default for the pinentry)],
120 GNUPG_PINENTRY_PGM="$withval", GNUPG_PINENTRY_PGM="" )
121 AC_SUBST(GNUPG_PINENTRY_PGM)
122 AM_CONDITIONAL(GNUPG_PINENTRY_PGM, test -n "$GNUPG_PINENTRY_PGM")
123 show_gnupg_pinentry_pgm="(default)"
124 test -n "$GNUPG_PINENTRY_PGM" && show_gnupg_pinentry_pgm="$GNUPG_PINENTRY_PGM"
127 AC_ARG_WITH(scdaemon-pgm,
128 [ --with-scdaemon-pgm=PATH Use PATH as the default for the scdaemon)],
129 GNUPG_SCDAEMON_PGM="$withval", GNUPG_SCDAEMON_PGM="" )
130 AC_SUBST(GNUPG_SCDAEMON_PGM)
131 AM_CONDITIONAL(GNUPG_SCDAEMON_PGM, test -n "$GNUPG_SCDAEMON_PGM")
132 show_gnupg_scdaemon_pgm="(default)"
133 test -n "$GNUPG_SCDAEMON_PGM" && show_gnupg_scdaemon_pgm="$GNUPG_SCDAEMON_PGM"
136 AC_ARG_WITH(dirmngr-pgm,
137 [ --with-dirmngr-pgm=PATH Use PATH as the default for the dirmngr)],
138 GNUPG_DIRMNGR_PGM="$withval", GNUPG_DIRMNGR_PGM="" )
139 AC_SUBST(GNUPG_DIRMNGR_PGM)
140 AM_CONDITIONAL(GNUPG_DIRMNGR_PGM, test -n "$GNUPG_DIRMNGR_PGM")
141 show_gnupg_dirmngr_pgm="(default)"
142 test -n "$GNUPG_DIRMNGR_PGM" && show_gnupg_dirmngr_pgm="$GNUPG_DIRMNGR_PGM"
144 AC_ARG_WITH(protect-tool-pgm,
145 [ --with-protect-tool-pgm=PATH Use PATH as the default for the protect-tool)],
146 GNUPG_PROTECT_TOOL_PGM="$withval", GNUPG_PROTECT_TOOL_PGM="" )
147 AC_SUBST(GNUPG_PROTECT_TOOL_PGM)
148 AM_CONDITIONAL(GNUPG_PROTECT_TOOL_PGM, test -n "$GNUPG_PROTECT_TOOL_PGM")
149 show_gnupg_protect_tool_pgm="(default)"
150 test -n "$GNUPG_PROTECT_TOOL_PGM" \
151 && show_gnupg_protect_tool_pgm="$GNUPG_PROTECT_TOOL_PGM"
154 # Some folks want to use only the agent from this packet. Make it
155 # easier for them by providing the configure option
156 # --enable-only-agent.
157 AC_ARG_ENABLE(agent-only,
158 AC_HELP_STRING([--enable-agent-only],[build only the gpg-agent]),
159 build_agent_only=$enableval)
161 # SELinux support includes tracking of sensitive files to avoid
162 # leaking their contents through processing these files by gpg itself
163 AC_MSG_CHECKING([whether SELinux support is requested])
164 AC_ARG_ENABLE(selinux-support,
165 AC_HELP_STRING([--enable-selinux-support],
166 [enable SELinux support]),
167 selinux_support=$enableval, selinux_support=no)
168 AC_MSG_RESULT($selinux_support)
170 # Allow disabling of bzib2 support.
171 # It is defined only after we confirm the library is available later
172 AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
174 AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
175 use_bzip2=$enableval)
176 AC_MSG_RESULT($use_bzip2)
178 # Check whether testing support for Camellia has been requested
179 AC_MSG_CHECKING([whether to enable the CAMELLIA cipher for gpg])
180 AC_ARG_ENABLE(camellia,
181 AC_HELP_STRING([--enable-camellia],[enable the CAMELLIA cipher for gpg]),
182 use_camellia=$enableval)
183 AC_MSG_RESULT($use_camellia)
184 if test x"$use_camellia" = xyes ; then
185 AC_DEFINE(USE_CAMELLIA,1,[Define to include the CAMELLIA cipher into gpg])
188 *** The Camellia cipher for gpg is for testing only and
189 *** is NOT for production use!
194 # Configure option to allow or disallow execution of external
195 # programs, like a photo viewer.
196 AC_MSG_CHECKING([whether to enable external program execution])
198 AC_HELP_STRING([--disable-exec],[disable all external program execution]),
200 AC_MSG_RESULT($use_exec)
201 if test "$use_exec" = no ; then
202 AC_DEFINE(NO_EXEC,1,[Define to disable all external program execution])
205 if test "$use_exec" = yes ; then
206 AC_MSG_CHECKING([whether to enable photo ID viewing])
207 AC_ARG_ENABLE(photo-viewers,
208 [ --disable-photo-viewers disable photo ID viewers],
209 [if test "$enableval" = no ; then
210 AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
212 gnupg_cv_enable_photo_viewers=$enableval
213 AC_MSG_RESULT($enableval)
215 if test "$gnupg_cv_enable_photo_viewers" = yes ; then
216 AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
217 AC_ARG_WITH(photo-viewer,
218 [ --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer],
219 [if test "$withval" = yes ; then
221 elif test "$withval" != no ; then
222 AC_DEFINE_UNQUOTED(FIXED_PHOTO_VIEWER,"$withval",
223 [if set, restrict photo-viewer to this])
225 AC_MSG_RESULT($withval)
228 AC_MSG_CHECKING([whether to enable external keyserver helpers])
229 AC_ARG_ENABLE(keyserver-helpers,
230 [ --disable-keyserver-helpers disable all external keyserver support],
231 [if test "$enableval" = no ; then
232 AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
233 [define to disable keyserver helpers])
235 gnupg_cv_enable_keyserver_helpers=$enableval
236 AC_MSG_RESULT($enableval)
238 if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
239 # LDAP is defined only after we confirm the library is available later
240 AC_MSG_CHECKING([whether LDAP keyserver support is requested])
242 AC_HELP_STRING([--disable-ldap],[disable LDAP keyserver interface only]),
243 try_ldap=$enableval, try_ldap=yes)
244 AC_MSG_RESULT($try_ldap)
246 AC_MSG_CHECKING([whether HKP keyserver support is requested])
248 AC_HELP_STRING([--disable-hkp],[disable HKP keyserver interface only]),
249 try_hkp=$enableval, try_hkp=yes)
250 AC_MSG_RESULT($try_hkp)
252 AC_MSG_CHECKING([whether finger key fetching support is requested])
253 AC_ARG_ENABLE(finger,
254 AC_HELP_STRING([--disable-finger],
255 [disable finger key fetching interface only]),
256 try_finger=$enableval, try_finger=yes)
257 AC_MSG_RESULT($try_finger)
259 AC_MSG_CHECKING([whether generic object key fetching support is requested])
260 AC_ARG_ENABLE(generic,
261 AC_HELP_STRING([--disable-generic],
262 [disable generic object key fetching interface only]),
263 try_generic=$enableval, try_generic=yes)
264 AC_MSG_RESULT($try_generic)
266 AC_MSG_CHECKING([whether email keyserver support is requested])
267 AC_ARG_ENABLE(mailto,
268 AC_HELP_STRING([--enable-mailto],
269 [enable email keyserver interface only]),
270 try_mailto=$enableval, try_mailto=no)
271 AC_MSG_RESULT($try_mailto)
274 AC_MSG_CHECKING([whether keyserver exec-path is enabled])
275 AC_ARG_ENABLE(keyserver-path,
276 AC_HELP_STRING([--disable-keyserver-path],
277 [disable the exec-path option for keyserver helpers]),
278 [if test "$enableval" = no ; then
279 disable_keyserver_path=yes
281 AC_MSG_RESULT($enableval)
286 # Check for the key/uid cache size. This can't be zero, but can be
287 # pretty small on embedded systems. This is used for the gpg part.
289 AC_MSG_CHECKING([for the size of the key and uid cache])
290 AC_ARG_ENABLE(key-cache,
291 AC_HELP_STRING([--enable-key-cache=SIZE],
292 [Set key cache to SIZE (default 4096)]),,enableval=4096)
293 if test "$enableval" = "no"; then
295 elif test "$enableval" = "yes" || test "$enableval" = ""; then
299 key_cache_size=`echo "$enableval" | sed 's/[A-Za-z]//g'`
301 if test "$enableval" != "$key_cache_size" || test "$key_cache_size" -lt 5; then
302 AC_MSG_ERROR([invalid key-cache size])
304 AC_MSG_RESULT($key_cache_size)
305 AC_DEFINE_UNQUOTED(PK_UID_CACHE_SIZE,$key_cache_size,
306 [Size of the key and UID caches])
311 # Check whether we want to use Linux capabilities
313 AC_MSG_CHECKING([whether use of capabilities is requested])
314 AC_ARG_WITH(capabilities,
315 [ --with-capabilities use linux capabilities [default=no]],
316 [use_capabilities="$withval"],[use_capabilities=no])
317 AC_MSG_RESULT($use_capabilities)
320 # To avoid double inclusion of config.h which might happen at some
321 # places, we add the usual double inclusion protection at the top of
325 #ifndef GNUPG_CONFIG_H_INCLUDED
326 #define GNUPG_CONFIG_H_INCLUDED
330 # Stuff which goes at the bottom of config.h.
333 /* This is the major version number of GnuPG so that
334 source included files can test for this. Note, that
335 we use 2 here even for GnuPG 1.9.x. */
336 #define GNUPG_MAJOR_VERSION 2
338 /* Now to separate file name parts.
339 Please note that the string version must not contain more
340 than one character because the code assumes strlen()==1 */
341 #ifdef HAVE_DOSISH_SYSTEM
342 #define DIRSEP_C '\\'
343 #define DIRSEP_S "\\"
346 #define PATHSEP_C ';'
347 #define PATHSEP_S ";"
348 #define EXEEXT_S ".exe"
354 #define PATHSEP_C ':'
355 #define PATHSEP_S ":"
359 /* This is the same as VERSION, but should be overridden if the
360 platform cannot handle things like dots '.' in filenames. Set
361 SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
362 uses for dots and dashes. */
363 #define SAFE_VERSION VERSION
364 #define SAFE_VERSION_DOT '.'
365 #define SAFE_VERSION_DASH '-'
367 /* Some global constants. */
368 #ifdef HAVE_DRIVE_LETTERS
369 #define GNUPG_DEFAULT_HOMEDIR "c:/gnupg"
371 #define GNUPG_DEFAULT_HOMEDIR "/SYS\$LOGIN/gnupg"
373 #define GNUPG_DEFAULT_HOMEDIR "~/.gnupg"
375 #define GNUPG_PRIVATE_KEYS_DIR "private-keys-v1.d"
377 /* For some systems (DOS currently), we hardcode the path here. For
378 POSIX systems the values are constructed by the Makefiles, so that
379 the values may be overridden by the make invocations; this is to
380 comply with the GNU coding standards. */
381 #ifdef HAVE_DRIVE_LETTERS
382 /* FIXME: We need to use a function to determine these values depending
383 on the actual installation directory. */
384 #define GNUPG_BINDIR "c:\\gnupg"
385 #define GNUPG_LIBEXECDIR "c:\\gnupg"
386 #define GNUPG_LIBDIR "c:\\gnupg"
387 #define GNUPG_DATADIR "c:\\gnupg"
388 #define GNUPG_SYSCONFDIR "c:\\gnupg"
391 /* Derive some other constants. */
392 #if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
393 #define EXEC_TEMPFILE_ONLY
397 /* We didn't define endianness above, so get it from OS macros. This
398 is intended for making fat binary builds on OS X. */
399 #if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
400 #if defined(__BIG_ENDIAN__)
401 #define BIG_ENDIAN_HOST 1
402 #elif defined(__LITTLE_ENDIAN__)
403 #define LITTLE_ENDIAN_HOST 1
405 #error "No endianness found"
410 /* Hack used for W32: ldap.m4 also tests for the ASCII version of
411 ldap_start_tls_s because that is the actual symbol used in the
412 library. winldap.h redefines it to our commonly used value,
413 thus we define our usual macro here. */
414 #ifdef HAVE_LDAP_START_TLS_SA
415 # ifndef HAVE_LDAP_START_TLS_S
416 # define HAVE_LDAP_START_TLS_S 1
421 /* Tell libgcrypt not to use its own libgpg-error implementation. */
422 #define USE_LIBGPG_ERROR 1
424 /* We use jnlib, so tell other modules about it. */
425 #define HAVE_JNLIB_LOGGING 1
427 /* Our HTTP code is used in estream mode. */
428 #define HTTP_USE_ESTREAM 1
430 /* Under W32 we do an explicit socket initialization, thus we need to
431 avoid the on-demand initialization which would also install an atexit
433 #define HTTP_NO_WSASTARTUP
435 /* We always include support for the OpenPGP card. */
436 #define ENABLE_CARD_SUPPORT 1
438 /* We don't want the old assuan codes anymore. */
439 #define _ASSUAN_ONLY_GPG_ERRORS 1
441 /* We explicitly need to disable PTH's soft mapping as Debian
442 currently enables it by default for no reason. */
443 #define PTH_SYSCALL_SOFT 0
445 /* We want to use the libgcrypt provided memory allocation for
447 #define _ESTREAM_PRINTF_MALLOC gcry_malloc
448 #define _ESTREAM_PRINTF_FREE gcry_free
449 #define _ESTREAM_PRINTF_EXTRA_INCLUDE "util.h"
451 #endif /*GNUPG_CONFIG_H_INCLUDED*/
457 # Checks for programs.
458 AC_MSG_NOTICE([checking for programs])
461 missing_dir=`cd $ac_aux_dir && pwd`
462 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
463 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
464 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
465 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
466 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
471 if test "x$ac_cv_prog_cc_c89" = "xno" ; then
472 AC_MSG_ERROR([[No C-89 compiler found]])
477 AC_CHECK_TOOL(AR, ar, :)
478 AC_PATH_PROG(PERL,"perl")
479 AC_CHECK_TOOL(WINDRES, windres, :)
486 # We need to compile and run a program on the build machine. A
487 # comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
488 # the AC archive is broken for autoconf 2.57. Given that tehre is no
489 # newer version of that macro, we assume that it is also broken for
490 # autoconf 2.61 and thus we use a simple but usually sufficient
492 AC_MSG_CHECKING(for cc for build)
493 if test "$cross_compiling" = "yes"; then
494 CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
496 CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
498 AC_MSG_RESULT($CC_FOR_BUILD)
499 AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
504 have_dosish_system=no
506 use_simple_gettext=no
509 # special stuff for Windoze NT
510 ac_cv_have_dev_random=no
511 AC_DEFINE(USE_ONLY_8DOT3,1,
512 [set this to limit filenames to the 8.3 format])
513 AC_DEFINE(HAVE_DRIVE_LETTERS,1,
514 [defined if we must run on a stupid file system])
515 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
516 [because the Unix gettext has too much overhead on
517 MingW32 systems and these systems lack Posix functions,
518 we use a simplified version of gettext])
519 disable_keyserver_path=yes
520 have_dosish_system=yes
523 use_simple_gettext=yes
525 i?86-emx-os2 | i?86-*-os2*emx )
526 # OS/2 with the EMX environment
527 ac_cv_have_dev_random=no
528 AC_DEFINE(HAVE_DRIVE_LETTERS)
529 have_dosish_system=yes
534 # DOS with the DJGPP environment
535 ac_cv_have_dev_random=no
536 AC_DEFINE(HAVE_DRIVE_LETTERS)
537 have_dosish_system=yes
543 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
544 LDFLAGS="$LDFLAGS -L/usr/local/lib"
548 if test -z "$GCC" ; then
549 CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
553 if test -z "$GCC" ; then
554 # Suppress all warnings
555 # to get rid of the unsigned/signed char mismatch warnings.
560 if test -z "$GCC" ; then
561 # Use the newer compiler `-msg_disable ptrmismatch1' to
562 # get rid of the unsigned/signed char mismatch warnings.
563 # Using this may hide other pointer mismatch warnings, but
564 # it at least lets other warning classes through
565 CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
574 if test "$have_dosish_system" = yes; then
575 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
576 [Defined if we run on some of the PCDOS like systems
577 (DOS, Windoze. OS/2) with special properties like
580 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
582 AM_CONDITIONAL(USE_SIMPLE_GETTEXT, test x"$use_simple_gettext" = xyes)
584 if test "$have_w32_system" = yes; then
585 AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
587 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
589 if test "$disable_keyserver_path" = yes; then
590 AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
591 [Defined to disable exec-path for keyserver helpers])
594 # (These need to go after AC_PROG_CC so that $EXEEXT is defined)
595 AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[The executable file extension, if any])
597 if test x"$try_hkp" = xyes ; then
598 AC_SUBST(GPGKEYS_HKP,"gpg2keys_hkp$EXEEXT")
601 if test x"$try_finger" = xyes ; then
602 AC_SUBST(GPGKEYS_FINGER,"gpg2keys_finger$EXEEXT")
608 # Checks for libraries.
610 AC_MSG_NOTICE([checking for libraries])
614 # libgpg-error is a library with error codes shared between GnuPG
617 AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
618 have_gpg_error=yes,have_gpg_error=no)
622 # Libgcrypt is our generic crypto library
624 AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
625 have_libgcrypt=yes,have_libgcrypt=no)
629 # libassuan is used for IPC
631 AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
632 have_libassuan=yes,have_libassuan=no)
633 if test "$have_libassuan" = "yes"; then
635 AM_PATH_LIBASSUAN_PTH("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
636 have_libassuan=yes,have_libassuan=no)
637 AM_CHECK_LIBASSUAN("$NEED_LIBASSUAN_API:1.0.1",
638 [AC_DEFINE(HAVE_ASSUAN_SET_IO_MONITOR, 1,
639 [Define to 1 if you have the `assuan_set_io_monitor' function.])],)
640 AC_DEFINE_UNQUOTED(GNUPG_LIBASSUAN_VERSION, "$libassuan_version",
641 [version of the libbassuan library])
647 # libksba is our X.509 support library
649 AM_PATH_KSBA("$NEED_KSBA_API:$NEED_KSBA_VERSION",have_ksba=yes,have_ksba=no)
653 # libusb allows us to use the integrated CCID smartcard reader driver.
655 # FiXME: Use GNUPG_CHECK_LIBUSB and modify to use separate AC_SUBSTs.
656 AC_CHECK_LIB(usb, usb_bulk_write,
657 [ LIBUSB_LIBS="$LIBUSB_LIBS -lusb"
658 AC_DEFINE(HAVE_LIBUSB,1,
659 [defined if libusb is available])
662 AC_SUBST(LIBUSB_LIBS)
663 AC_CHECK_FUNCS(usb_create_match)
666 # Check wether it is necessary to link against libdl.
668 gnupg_dlopen_save_libs="$LIBS"
670 AC_SEARCH_LIBS(dlopen, c dl,,,)
673 LIBS="$gnupg_dlopen_save_libs"
676 # Checks for symcryptrun:
679 # libutil has openpty() and login_tty().
680 AC_CHECK_LIB(util, openpty,
681 [ LIBUTIL_LIBS="$LIBUTIL_LIBS -lutil"
682 AC_DEFINE(HAVE_LIBUTIL,1,
683 [defined if libutil is available])
685 AC_SUBST(LIBUTIL_LIBS)
687 # shred is used to clean temporary plain text files.
688 AC_PATH_PROG(SHRED, shred, /usr/bin/shred)
689 AC_DEFINE_UNQUOTED(SHRED,
690 "${SHRED}", [defines the filename of the shred program])
695 # Check whether the GNU Pth library is available
696 # Note, that we include a Pth emulation for W32.
699 if test "$have_pth" = "yes"; then
700 AC_DEFINE(USE_GNU_PTH, 1,
701 [Defined if the GNU Portable Thread Library should be used])
705 *** To support concurrent access to the gpg-agent and the SCdaemon
706 *** we need the support of the GNU Portable Threads Library.
707 *** Download it from ftp://ftp.gnu.org/gnu/pth/
708 *** On a Debian GNU/Linux system you might want to try
709 *** apt-get install libpth-dev
714 AC_MSG_NOTICE([checking for networking options])
717 # Must check for network library requirements before doing link tests
718 # for ldap, for example. If ldap libs are static (or dynamic and without
719 # ELF runtime link paths), then link will fail and LDAP support won't
722 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
723 [NETLIBS="-lnsl $NETLIBS"]))
724 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
725 [NETLIBS="-lsocket $NETLIBS"]))
728 # Now try for the resolver functions so we can use DNS for SRV, PA and CERT.
730 if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
731 AC_ARG_ENABLE(dns-srv,
732 AC_HELP_STRING([--disable-dns-srv],
733 [disable the use of DNS SRV in HKP and HTTP]),
734 use_dns_srv=$enableval,use_dns_srv=yes)
737 AC_ARG_ENABLE(dns-pka,
738 AC_HELP_STRING([--disable-dns-pka],
739 [disable the use of PKA records in DNS]),
740 use_dns_pka=$enableval,use_dns_pka=yes)
742 AC_ARG_ENABLE(dns-cert,
743 AC_HELP_STRING([--disable-dns-cert],
744 [disable the use of CERT records in DNS]),
745 use_dns_cert=$enableval,use_dns_cert=yes)
747 if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes \
748 || test x"$use_dns_cert" = xyes; then
751 # the double underscore thing is a glibc-ism?
752 AC_SEARCH_LIBS(res_query,resolv bind,,
753 AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
754 AC_SEARCH_LIBS(dn_expand,resolv bind,,
755 AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
756 AC_SEARCH_LIBS(dn_skipname,resolv bind,,
757 AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
759 if test x"$have_resolver" != xno ; then
761 # Make sure that the BIND 4 resolver interface is workable before
762 # enabling any code that calls it. At some point I'll rewrite the
763 # code to use the BIND 8 resolver API.
764 # We might also want to use adns instead.
766 AC_MSG_CHECKING([whether the resolver is usable])
767 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
768 #include <netinet/in.h>
769 #include <arpa/nameser.h>
770 #include <resolv.h>],
771 [[unsigned char answer[PACKETSZ];
772 res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
774 dn_expand(0,0,0,0,0);
775 ]])],have_resolver=yes,have_resolver=no)
776 AC_MSG_RESULT($have_resolver)
778 # This is Apple-specific and somewhat bizarre as they changed the
779 # define in bind 8 for some reason.
781 if test x"$have_resolver" != xyes ; then
783 [whether I can make the resolver usable with BIND_8_COMPAT])
784 AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
785 #include <sys/types.h>
786 #include <netinet/in.h>
787 #include <arpa/nameser.h>
788 #include <resolv.h>],
789 [[unsigned char answer[PACKETSZ];
790 res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
791 dn_skipname(0,0); dn_expand(0,0,0,0,0);
792 ]])],[have_resolver=yes ; need_compat=yes])
793 AC_MSG_RESULT($have_resolver)
797 if test x"$have_resolver" = xyes ; then
800 if test x"$use_dns_srv" = xyes ; then
801 AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
804 if test x"$use_dns_pka" = xyes ; then
805 AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
808 if test x"$use_dns_cert" = xyes ; then
809 AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
812 if test x"$need_compat" = xyes ; then
813 AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
826 AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
832 _cppflags="${CPPFLAGS}"
833 _ldflags="${LDFLAGS}"
835 AC_HELP_STRING([--with-adns=DIR],
836 [look for the adns library in DIR]),
837 [if test -d "$withval"; then
838 CPPFLAGS="${CPPFLAGS} -I$withval/include"
839 LDFLAGS="${LDFLAGS} -L$withval/lib"
841 AC_CHECK_HEADERS(adns.h,
842 AC_CHECK_LIB(adns, adns_init,
844 [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}]),
845 [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}])
846 if test "$have_adns" = "yes"; then
850 # Newer adns versions feature a free function to be used under W32.
851 AC_CHECK_FUNCS(adns_free)
857 if test "$try_ldap" = yes ; then
858 GNUPG_CHECK_LDAP($NETLIBS)
862 # Check for curl. We fake the curl API if libcurl isn't installed.
863 # We require 7.10 or later as we use curl_version_info().
865 LIBCURL_CHECK_CONFIG([yes],[7.10],,[fake_curl=yes])
866 AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
868 # Generic, for us, means curl
870 if test x"$try_generic" = xyes ; then
871 AC_SUBST(GPGKEYS_CURL,"gpg2keys_curl$EXEEXT")
877 # This isn't necessarily sendmail itself, but anything that gives a
878 # sendmail-ish interface to the outside world. That includes Exim,
879 # Postfix, etc. Basically, anything that can handle "sendmail -t".
880 if test "$try_mailto" = yes ; then
881 AC_ARG_WITH(mailprog,
882 AC_HELP_STRING([--with-mailprog=NAME],
883 [use "NAME -t" for mail transport]),
886 if test x"$with_mailprog" = xyes ; then
887 AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
888 if test "$ac_cv_path_SENDMAIL" ; then
889 GPGKEYS_MAILTO="gpg2keys_mailto"
891 elif test x"$with_mailprog" != xno ; then
892 AC_MSG_CHECKING([for a mail transport program])
893 AC_SUBST(SENDMAIL,$with_mailprog)
894 AC_MSG_RESULT($with_mailprog)
895 GPGKEYS_MAILTO="gpg2keys_mailto"
899 AC_SUBST(GPGKEYS_MAILTO)
902 # Construct a printable name of the OS
906 PRINTABLE_OS_NAME="MingW32"
909 PRINTABLE_OS_NAME="Cygwin"
911 i?86-emx-os2 | i?86-*-os2*emx )
912 PRINTABLE_OS_NAME="OS/2"
915 PRINTABLE_OS_NAME="MSDOS/DJGPP"
919 PRINTABLE_OS_NAME="GNU/Linux"
922 PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
925 AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
926 [A human readable text with the name of the OS])
938 AC_MSG_NOTICE([checking for gettext])
940 AM_GNU_GETTEXT_VERSION([0.17])
941 if test "$try_gettext" = yes; then
942 AM_GNU_GETTEXT([external],[need-ngettext])
944 # gettext requires some extra checks. These really should be part of
945 # the basic AM_GNU_GETTEXT macro. TODO: move other gettext-specific
946 # function checks to here.
948 AC_CHECK_FUNCS(strchr)
951 USE_INCLUDED_LIBINTL=no
952 BUILD_INCLUDED_LIBINTL=no
955 AC_SUBST(USE_INCLUDED_LIBINTL)
956 AC_SUBST(BUILD_INCLUDED_LIBINTL)
960 # We use HAVE_LANGINFO_CODESET in a couple of places.
963 # Checks required for our use locales
970 if test "$selinux_support" = yes ; then
971 AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support])
976 # Checks for header files.
978 AC_MSG_NOTICE([checking for header files])
980 AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h])
981 AC_CHECK_HEADERS([pty.h pwd.h inttypes.h])
986 # Checks for typedefs, structures, and compiler characteristics.
988 AC_MSG_NOTICE([checking for system characteristics])
1000 AC_ARG_ENABLE(endian-check,
1001 AC_HELP_STRING([--disable-endian-check],
1002 [disable the endian check and trust the OS provided macros]),
1003 endiancheck=$enableval,endiancheck=yes)
1005 if test x"$endiancheck" = xyes ; then
1009 # fixme: we should get rid of the byte type
1010 GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
1011 GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
1012 GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
1013 GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
1014 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
1016 AC_CHECK_SIZEOF(unsigned short)
1017 AC_CHECK_SIZEOF(unsigned int)
1018 AC_CHECK_SIZEOF(unsigned long)
1019 AC_CHECK_SIZEOF(unsigned long long)
1020 AC_CHECK_SIZEOF(time_t,,[[
1022 #if TIME_WITH_SYS_TIME
1023 # include <sys/time.h>
1026 # if HAVE_SYS_TIME_H
1027 # include <sys/time.h>
1035 # Ensure that we have UINT64_C before we bother to check for uint64_t
1036 # Fixme: really needed in gnupg? I think it is only useful in libcgrypt.
1037 AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works],
1038 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>
1039 uint64_t foo=UINT64_C(42);]),
1040 gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
1041 if test "$gnupg_cv_uint64_c_works" = "yes" ; then
1042 AC_CHECK_SIZEOF(uint64_t)
1045 if test "$ac_cv_sizeof_unsigned_short" = "0" \
1046 || test "$ac_cv_sizeof_unsigned_int" = "0" \
1047 || test "$ac_cv_sizeof_unsigned_long" = "0"; then
1048 AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
1053 # Checks for library functions.
1055 AC_MSG_NOTICE([checking for library functions])
1056 AC_CHECK_DECLS(getpagesize)
1060 AC_CHECK_FUNCS([strerror strlwr tcgetattr mmap])
1061 AC_CHECK_FUNCS([strcasecmp strncasecmp ctermid times gmtime_r])
1062 AC_CHECK_FUNCS([unsetenv getpwnam getpwuid fcntl ftruncate])
1063 AC_CHECK_FUNCS([gettimeofday getrusage setrlimit clock_gettime])
1064 AC_CHECK_FUNCS([atexit raise getpagesize strftime nl_langinfo setlocale])
1065 AC_CHECK_FUNCS([waitpid wait4 sigaction sigprocmask pipe stat getaddrinfo])
1066 AC_CHECK_FUNCS([ttyname rand ftello])
1068 AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
1071 # These are needed by libjnlib - fixme: we should use a jnlib.m4
1073 AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol])
1074 AC_CHECK_FUNCS([memrchr isascii timegm getrusage setrlimit stat setlocale])
1075 AC_CHECK_FUNCS([flockfile funlockfile fopencookie funopen])
1080 gl_SOURCE_BASE([gl])
1082 gl_MODULES([setenv mkdtemp xsize strpbrk])
1089 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
1092 # Sanity check regex. Tests adapted from mutt.
1094 AC_MSG_CHECKING([whether regular expression support is requested])
1095 AC_ARG_ENABLE(regex,
1096 AC_HELP_STRING([--disable-regex],
1097 [do not handle regular expressions in trust signatures]),
1098 use_regex=$enableval, use_regex=yes)
1099 AC_MSG_RESULT($use_regex)
1101 if test "$use_regex" = yes ; then
1102 _cppflags="${CPPFLAGS}"
1103 _ldflags="${LDFLAGS}"
1105 AC_HELP_STRING([--with-regex=DIR],[look for regex in DIR]),
1107 if test -d "$withval" ; then
1108 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1109 LDFLAGS="${LDFLAGS} -L$withval/lib"
1113 # Does the system have regex functions at all?
1114 AC_SEARCH_LIBS([regcomp], [regex])
1115 AC_CHECK_FUNC(regcomp, gnupg_cv_have_regex=yes, gnupg_cv_have_regex=no)
1117 if test $gnupg_cv_have_regex = no; then
1120 if test x"$cross_compiling" = xyes; then
1121 AC_MSG_WARN([cross compiling; assuming regexp libray is not broken])
1123 AC_CACHE_CHECK([whether your system's regexp library is broken],
1124 [gnupg_cv_regex_broken],
1128 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); }],
1129 gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
1131 if test $gnupg_cv_regex_broken = yes; then
1132 AC_MSG_WARN([your regex is broken - disabling regex use])
1137 CPPFLAGS="${_cppflags}"
1138 LDFLAGS="${_ldflags}"
1141 if test "$use_regex" != yes ; then
1142 AC_DEFINE(DISABLE_REGEX,1, [Define to disable regular expression support])
1144 AM_CONDITIONAL(DISABLE_REGEX, test x"$use_regex" != xyes)
1149 # Do we have zlib? Must do it here because Solaris failed
1150 # when compiling a conftest (due to the "-lz" from LIBS).
1151 # Note that we combine zlib and bzlib2 in ZLIBS.
1153 _cppflags="${CPPFLAGS}"
1154 _ldflags="${LDFLAGS}"
1156 [ --with-zlib=DIR use libz in DIR],[
1157 if test -d "$withval"; then
1158 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1159 LDFLAGS="${LDFLAGS} -L$withval/lib"
1163 AC_CHECK_HEADER(zlib.h,
1164 AC_CHECK_LIB(z, deflateInit2_,
1166 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1167 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
1170 # Check whether we can support bzip2
1172 if test "$use_bzip2" = yes ; then
1173 _cppflags="${CPPFLAGS}"
1174 _ldflags="${LDFLAGS}"
1176 AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
1178 if test -d "$withval" ; then
1179 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1180 LDFLAGS="${LDFLAGS} -L$withval/lib"
1184 # Checking alongside stdio.h as an early version of bzip2 (1.0)
1185 # required stdio.h to be included before bzlib.h, and Solaris 9 is
1186 # woefully out of date.
1187 if test "$withval" != no ; then
1188 AC_CHECK_HEADER(bzlib.h,
1189 AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
1192 ZLIBS="$ZLIBS -lbz2"
1193 AC_DEFINE(HAVE_BZIP2,1,
1194 [Defined if the bz2 compression library is available])
1196 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1197 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>])
1200 AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
1204 # Check for readline support
1205 GNUPG_CHECK_READLINE
1208 # Allow users to append something to the version string without
1209 # flagging it as development version. The user version parts is
1210 # considered everything after a dash.
1212 if test "$development_version" != yes; then
1216 if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
1217 development_version=yes
1220 if test "$development_version" = yes; then
1221 AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
1222 [Defined if this is not a regular release])
1225 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
1229 # Add some extra libs here so that previous tests don't fail for
1230 # mysterious reasons - the final link step should bail out.
1231 # W32SOCKLIBS is also defined so that if can be used for tools not
1232 # requiring any network stuff but linking to code in libcommon which
1233 # tracks in winsock stuff (e.g. init_common_subsystems.
1234 if test "$have_w32_system" = yes; then
1235 W32SOCKLIBS="-lws2_32"
1236 NETLIBS="${NETLIBS} ${W32SOCKLIBS}"
1240 AC_SUBST(W32SOCKLIBS)
1243 # Setup gcc specific options
1245 AC_MSG_NOTICE([checking for cc features])
1246 if test "$GCC" = yes; then
1247 # Note that it is okay to use CFLAGS here because this are just
1248 # warning options and the user should have a chance of overriding
1250 if test "$USE_MAINTAINER_MODE" = "yes"; then
1251 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
1252 CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
1254 CFLAGS="$CFLAGS -Wall"
1257 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
1258 _gcc_cflags_save=$CFLAGS
1259 CFLAGS="-Wno-pointer-sign"
1260 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1261 AC_MSG_RESULT($_gcc_psign)
1262 CFLAGS=$_gcc_cflags_save;
1263 if test x"$_gcc_psign" = xyes ; then
1264 CFLAGS="$CFLAGS -Wno-pointer-sign"
1267 AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
1268 _gcc_cflags_save=$CFLAGS
1269 CFLAGS="-Wpointer-arith"
1270 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1271 AC_MSG_RESULT($_gcc_psign)
1272 CFLAGS=$_gcc_cflags_save;
1273 if test x"$_gcc_psign" = xyes ; then
1274 CFLAGS="$CFLAGS -Wpointer-arith"
1280 # This is handy for debugging so the compiler doesn't rearrange
1281 # things and eliminate variables.
1283 AC_ARG_ENABLE(optimization,
1284 AC_HELP_STRING([--disable-optimization],
1285 [disable compiler optimization]),
1286 [if test $enableval = no ; then
1287 CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
1291 # Prepare building of estream
1297 # Decide what to build
1299 if test "$have_adns" = "yes"; then
1300 AC_SUBST(GPGKEYS_KDNS, "gpg2keys_kdns$EXEEXT")
1305 if test $have_ksba = no; then
1310 build_agent_threaded=""
1311 if test "$build_agent" = "yes"; then
1312 if test $have_pth = no; then
1313 build_agent_threaded="(not multi-threaded)"
1318 build_scdaemon_extra=""
1319 if test "$build_scdaemon" = "yes"; then
1321 if test $have_pth = no; then
1322 build_scdaemon_extra="not multi-threaded"
1326 if test $have_libusb = no; then
1327 build_scdaemon_extra="${tmp}without internal CCID driver"
1330 if test -n "$build_scdaemon_extra"; then
1331 build_scdaemon_extra="(${build_scdaemon_extra})"
1336 if test "$build_agent_only" = "yes" ; then
1345 AM_CONDITIONAL(BUILD_GPG, test "$build_gpg" = "yes")
1346 AM_CONDITIONAL(BUILD_GPGSM, test "$build_gpgsm" = "yes")
1347 AM_CONDITIONAL(BUILD_AGENT, test "$build_agent" = "yes")
1348 AM_CONDITIONAL(BUILD_SCDAEMON, test "$build_scdaemon" = "yes")
1349 AM_CONDITIONAL(BUILD_TOOLS, test "$build_tools" = "yes")
1350 AM_CONDITIONAL(BUILD_DOC, test "$build_doc" = "yes")
1351 AM_CONDITIONAL(BUILD_SYMCRYPTRUN, test "$build_symcryptrun" = "yes")
1353 AM_CONDITIONAL(RUN_GPG_TESTS,
1354 test x$cross_compiling = xno -a "$build_gpg" = yes )
1358 # Print errors here so that they are visible all
1359 # together and the user can acquire them all together.
1362 if test "$have_gpg_error" = "no"; then
1366 *** You need libgpg-error to build this program.
1367 ** This library is for example available at
1368 *** ftp://ftp.gnupg.org/gcrypt/libgpg-error
1369 *** (at least version $NEED_GPG_ERROR_VERSION is required.)
1372 if test "$have_libgcrypt" = "no"; then
1376 *** You need libgcrypt to build this program.
1377 ** This library is for example available at
1378 *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
1379 *** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)
1382 if test "$have_libassuan" = "no"; then
1386 *** You need libassuan with Pth support to build this program.
1387 *** This library is for example available at
1388 *** ftp://ftp.gnupg.org/gcrypt/libassuan/
1389 *** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required).
1392 if test "$have_ksba" = "no"; then
1395 *** You need libksba to build this program.
1396 *** This library is for example available at
1397 *** ftp://ftp.gnupg.org/gcrypt/libksba/
1398 *** (at least version $NEED_KSBA_VERSION using API $NEED_KSBA_API is required).
1401 if test "$missing_pth" = "yes"; then
1404 *** It is now required to build with support for the
1405 *** GNU Portable Threads Library (Pth). Please install this
1406 *** library first. The library is for example available at
1407 *** ftp://ftp.gnu.org/gnu/pth/
1408 *** On a Debian GNU/Linux system you can install it using
1409 *** apt-get install libpth-dev
1410 *** To build GnuPG for Windows you need to use the W32PTH
1411 *** package; available at:
1412 *** ftp://ftp.g10code.com/g10code/w32pth/
1417 if test "$die" = "yes"; then
1420 *** Required libraries not found. Please consult the above messages
1421 *** and install them before running configure again.
1427 AC_CONFIG_FILES([ m4/Makefile
1440 keyserver/gpg2keys_mailto
1441 keyserver/gpg2keys_test
1446 tests/openpgp/Makefile
1447 tests/pkits/Makefile
1453 GnuPG v${VERSION} has been configured as follows:
1455 Platform: $PRINTABLE_OS_NAME ($host)
1458 S/MIME: $build_gpgsm
1459 Agent: $build_agent $build_agent_threaded
1460 Smartcard: $build_scdaemon $build_scdaemon_extra
1462 Protect tool: $show_gnupg_protect_tool_pgm
1463 Default agent: $show_gnupg_agent_pgm
1464 Default pinentry: $show_gnupg_pinentry_pgm
1465 Default scdaemon: $show_gnupg_scdaemon_pgm
1466 Default dirmngr: $show_gnupg_dirmngr_pgm
1468 if test x"$use_regex" != xyes ; then
1470 Warning: No regular expression support available.
1471 OpenPGP trust signatures won't work.
1472 gpg-check-pattern will not be build.
1475 if test x"$use_camellia" = xyes ; then
1477 echo "WARNING: The Camellia cipher for gpg is for testing only"
1478 echo " and is NOT for production use!"