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.12])
28 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])],
34 [bug-gnupg@gnupg.org])
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 NEED_GPG_ERROR_VERSION=1.4
43 NEED_LIBGCRYPT_VERSION=1.4.0
46 NEED_LIBASSUAN_VERSION=1.0.4
49 NEED_KSBA_VERSION=1.0.2
53 PACKAGE_GT=${PACKAGE_NAME}2
54 VERSION=$PACKAGE_VERSION
56 AC_CONFIG_AUX_DIR(scripts)
57 AC_CONFIG_SRCDIR(sm/gpgsm.c)
58 AM_CONFIG_HEADER(config.h)
59 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
65 # Some status variables.
76 disable_keyserver_path=no
80 GNUPG_BUILD_PROGRAM(gpg, yes)
81 GNUPG_BUILD_PROGRAM(gpgsm, yes)
82 GNUPG_BUILD_PROGRAM(agent, yes)
83 GNUPG_BUILD_PROGRAM(scdaemon, yes)
84 GNUPG_BUILD_PROGRAM(tools, yes)
85 GNUPG_BUILD_PROGRAM(doc, yes)
86 GNUPG_BUILD_PROGRAM(symcryptrun, no)
91 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
92 AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
93 [Name of this package for gettext])
94 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
95 AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
97 AC_DEFINE_UNQUOTED(NEED_LIBGCRYPT_VERSION, "$NEED_LIBGCRYPT_VERSION",
98 [Required version of Libgcrypt])
99 AC_DEFINE_UNQUOTED(NEED_KSBA_VERSION, "$NEED_KSBA_VERSION",
100 [Required version of Libksba])
104 # The default is to use the modules from this package and the few
105 # other packages in a standard place; i.e where this package gets
106 # installed. With these options it is possible to override these
107 # ${prefix} depended values with fixed paths, which can't be replaced
108 # at make time. See also am/cmacros.am and the defaults in AH_BOTTOM.
109 AC_ARG_WITH(agent-pgm,
110 [ --with-agent-pgm=PATH Use PATH as the default for the agent)],
111 GNUPG_AGENT_PGM="$withval", GNUPG_AGENT_PGM="" )
112 AC_SUBST(GNUPG_AGENT_PGM)
113 AM_CONDITIONAL(GNUPG_AGENT_PGM, test -n "$GNUPG_AGENT_PGM")
114 show_gnupg_agent_pgm="(default)"
115 test -n "$GNUPG_AGENT_PGM" && show_gnupg_agent_pgm="$GNUPG_AGENT_PGM"
117 AC_ARG_WITH(pinentry-pgm,
118 [ --with-pinentry-pgm=PATH Use PATH as the default for the pinentry)],
119 GNUPG_PINENTRY_PGM="$withval", GNUPG_PINENTRY_PGM="" )
120 AC_SUBST(GNUPG_PINENTRY_PGM)
121 AM_CONDITIONAL(GNUPG_PINENTRY_PGM, test -n "$GNUPG_PINENTRY_PGM")
122 show_gnupg_pinentry_pgm="(default)"
123 test -n "$GNUPG_PINENTRY_PGM" && show_gnupg_pinentry_pgm="$GNUPG_PINENTRY_PGM"
126 AC_ARG_WITH(scdaemon-pgm,
127 [ --with-scdaemon-pgm=PATH Use PATH as the default for the scdaemon)],
128 GNUPG_SCDAEMON_PGM="$withval", GNUPG_SCDAEMON_PGM="" )
129 AC_SUBST(GNUPG_SCDAEMON_PGM)
130 AM_CONDITIONAL(GNUPG_SCDAEMON_PGM, test -n "$GNUPG_SCDAEMON_PGM")
131 show_gnupg_scdaemon_pgm="(default)"
132 test -n "$GNUPG_SCDAEMON_PGM" && show_gnupg_scdaemon_pgm="$GNUPG_SCDAEMON_PGM"
135 AC_ARG_WITH(dirmngr-pgm,
136 [ --with-dirmngr-pgm=PATH Use PATH as the default for the dirmngr)],
137 GNUPG_DIRMNGR_PGM="$withval", GNUPG_DIRMNGR_PGM="" )
138 AC_SUBST(GNUPG_DIRMNGR_PGM)
139 AM_CONDITIONAL(GNUPG_DIRMNGR_PGM, test -n "$GNUPG_DIRMNGR_PGM")
140 show_gnupg_dirmngr_pgm="(default)"
141 test -n "$GNUPG_DIRMNGR_PGM" && show_gnupg_dirmngr_pgm="$GNUPG_DIRMNGR_PGM"
143 AC_ARG_WITH(protect-tool-pgm,
144 [ --with-protect-tool-pgm=PATH Use PATH as the default for the protect-tool)],
145 GNUPG_PROTECT_TOOL_PGM="$withval", GNUPG_PROTECT_TOOL_PGM="" )
146 AC_SUBST(GNUPG_PROTECT_TOOL_PGM)
147 AM_CONDITIONAL(GNUPG_PROTECT_TOOL_PGM, test -n "$GNUPG_PROTECT_TOOL_PGM")
148 show_gnupg_protect_tool_pgm="(default)"
149 test -n "$GNUPG_PROTECT_TOOL_PGM" \
150 && show_gnupg_protect_tool_pgm="$GNUPG_PROTECT_TOOL_PGM"
153 # Some folks want to use only the agent from this packet. Make it
154 # easier for them by providing the configure option
155 # --enable-only-agent.
156 AC_ARG_ENABLE(agent-only,
157 AC_HELP_STRING([--enable-agent-only],[build only the gpg-agent]),
158 build_agent_only=$enableval)
160 # SELinux support includes tracking of sensitive files to avoid
161 # leaking their contents through processing these files by gpg itself
162 AC_MSG_CHECKING([whether SELinux support is requested])
163 AC_ARG_ENABLE(selinux-support,
164 AC_HELP_STRING([--enable-selinux-support],
165 [enable SELinux support]),
166 selinux_support=$enableval, selinux_support=no)
167 AC_MSG_RESULT($selinux_support)
169 # Allow disabling of bzib2 support.
170 # It is defined only after we confirm the library is available later
171 AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
173 AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
174 use_bzip2=$enableval)
175 AC_MSG_RESULT($use_bzip2)
177 # Check whether testing support for Camellia has been requested
178 AC_MSG_CHECKING([whether to enable the CAMELLIA cipher for gpg])
179 AC_ARG_ENABLE(camellia,
180 AC_HELP_STRING([--enable-camellia],[enable the CAMELLIA cipher for gpg]),
181 use_camellia=$enableval)
182 AC_MSG_RESULT($use_camellia)
183 if test x"$use_camellia" = xyes ; then
184 AC_DEFINE(USE_CAMELLIA,1,[Define to include the CAMELLIA cipher into gpg])
187 *** The Camellia cipher for gpg is for testing only and
188 *** is NOT for production use!
193 # Configure option to allow or disallow execution of external
194 # programs, like a photo viewer.
195 AC_MSG_CHECKING([whether to enable external program execution])
197 AC_HELP_STRING([--disable-exec],[disable all external program execution]),
199 AC_MSG_RESULT($use_exec)
200 if test "$use_exec" = no ; then
201 AC_DEFINE(NO_EXEC,1,[Define to disable all external program execution])
204 if test "$use_exec" = yes ; then
205 AC_MSG_CHECKING([whether to enable photo ID viewing])
206 AC_ARG_ENABLE(photo-viewers,
207 [ --disable-photo-viewers disable photo ID viewers],
208 [if test "$enableval" = no ; then
209 AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
211 gnupg_cv_enable_photo_viewers=$enableval
212 AC_MSG_RESULT($enableval)
214 if test "$gnupg_cv_enable_photo_viewers" = yes ; then
215 AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
216 AC_ARG_WITH(photo-viewer,
217 [ --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer],
218 [if test "$withval" = yes ; then
220 elif test "$withval" != no ; then
221 AC_DEFINE_UNQUOTED(FIXED_PHOTO_VIEWER,"$withval",
222 [if set, restrict photo-viewer to this])
224 AC_MSG_RESULT($withval)
227 AC_MSG_CHECKING([whether to enable external keyserver helpers])
228 AC_ARG_ENABLE(keyserver-helpers,
229 [ --disable-keyserver-helpers disable all external keyserver support],
230 [if test "$enableval" = no ; then
231 AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
232 [define to disable keyserver helpers])
234 gnupg_cv_enable_keyserver_helpers=$enableval
235 AC_MSG_RESULT($enableval)
237 if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
238 # LDAP is defined only after we confirm the library is available later
239 AC_MSG_CHECKING([whether LDAP keyserver support is requested])
241 AC_HELP_STRING([--disable-ldap],[disable LDAP keyserver interface only]),
242 try_ldap=$enableval, try_ldap=yes)
243 AC_MSG_RESULT($try_ldap)
245 AC_MSG_CHECKING([whether HKP keyserver support is requested])
247 AC_HELP_STRING([--disable-hkp],[disable HKP keyserver interface only]),
248 try_hkp=$enableval, try_hkp=yes)
249 AC_MSG_RESULT($try_hkp)
251 AC_MSG_CHECKING([whether finger key fetching support is requested])
252 AC_ARG_ENABLE(finger,
253 AC_HELP_STRING([--disable-finger],
254 [disable finger key fetching interface only]),
255 try_finger=$enableval, try_finger=yes)
256 AC_MSG_RESULT($try_finger)
258 AC_MSG_CHECKING([whether generic object key fetching support is requested])
259 AC_ARG_ENABLE(generic,
260 AC_HELP_STRING([--disable-generic],
261 [disable generic object key fetching interface only]),
262 try_generic=$enableval, try_generic=yes)
263 AC_MSG_RESULT($try_generic)
265 AC_MSG_CHECKING([whether email keyserver support is requested])
266 AC_ARG_ENABLE(mailto,
267 AC_HELP_STRING([--enable-mailto],
268 [enable email keyserver interface only]),
269 try_mailto=$enableval, try_mailto=no)
270 AC_MSG_RESULT($try_mailto)
273 AC_MSG_CHECKING([whether keyserver exec-path is enabled])
274 AC_ARG_ENABLE(keyserver-path,
275 AC_HELP_STRING([--disable-keyserver-path],
276 [disable the exec-path option for keyserver helpers]),
277 [if test "$enableval" = no ; then
278 disable_keyserver_path=yes
280 AC_MSG_RESULT($enableval)
285 # Check for the key/uid cache size. This can't be zero, but can be
286 # pretty small on embedded systems. This is used for the gpg part.
288 AC_MSG_CHECKING([for the size of the key and uid cache])
289 AC_ARG_ENABLE(key-cache,
290 AC_HELP_STRING([--enable-key-cache=SIZE],
291 [Set key cache to SIZE (default 4096)]),,enableval=4096)
292 if test "$enableval" = "no"; then
294 elif test "$enableval" = "yes" || test "$enableval" = ""; then
298 key_cache_size=`echo "$enableval" | sed 's/[A-Za-z]//g'`
300 if test "$enableval" != "$key_cache_size" || test "$key_cache_size" -lt 5; then
301 AC_MSG_ERROR([invalid key-cache size])
303 AC_MSG_RESULT($key_cache_size)
304 AC_DEFINE_UNQUOTED(PK_UID_CACHE_SIZE,$key_cache_size,
305 [Size of the key and UID caches])
310 # Check whether we want to use Linux capabilities
312 AC_MSG_CHECKING([whether use of capabilities is requested])
313 AC_ARG_WITH(capabilities,
314 [ --with-capabilities use linux capabilities [default=no]],
315 [use_capabilities="$withval"],[use_capabilities=no])
316 AC_MSG_RESULT($use_capabilities)
319 # To avoid double inclusion of config.h which might happen at some
320 # places, we add the usual double inclusion protection at the top of
324 #ifndef GNUPG_CONFIG_H_INCLUDED
325 #define GNUPG_CONFIG_H_INCLUDED
329 # Stuff which goes at the bottom of config.h.
332 /* This is the major version number of GnuPG so that
333 source included files can test for this. Note, that
334 we use 2 here even for GnuPG 1.9.x. */
335 #define GNUPG_MAJOR_VERSION 2
337 /* Now to separate file name parts.
338 Please note that the string version must not contain more
339 than one character because the code assumes strlen()==1 */
340 #ifdef HAVE_DOSISH_SYSTEM
341 #define DIRSEP_C '\\'
342 #define DIRSEP_S "\\"
345 #define PATHSEP_C ';'
346 #define PATHSEP_S ";"
347 #define EXEEXT_S ".exe"
353 #define PATHSEP_C ':'
354 #define PATHSEP_S ":"
358 /* This is the same as VERSION, but should be overridden if the
359 platform cannot handle things like dots '.' in filenames. Set
360 SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
361 uses for dots and dashes. */
362 #define SAFE_VERSION VERSION
363 #define SAFE_VERSION_DOT '.'
364 #define SAFE_VERSION_DASH '-'
366 /* Some global constants. */
367 #ifdef HAVE_DRIVE_LETTERS
368 #define GNUPG_DEFAULT_HOMEDIR "c:/gnupg"
370 #define GNUPG_DEFAULT_HOMEDIR "/SYS\$LOGIN/gnupg"
372 #define GNUPG_DEFAULT_HOMEDIR "~/.gnupg"
374 #define GNUPG_PRIVATE_KEYS_DIR "private-keys-v1.d"
376 /* For some systems (DOS currently), we hardcode the path here. For
377 POSIX systems the values are constructed by the Makefiles, so that
378 the values may be overridden by the make invocations; this is to
379 comply with the GNU coding standards. */
380 #ifdef HAVE_DRIVE_LETTERS
381 /* FIXME: We need to use a function to determine these values depending
382 on the actual installation directory. */
383 #define GNUPG_BINDIR "c:\\gnupg"
384 #define GNUPG_LIBEXECDIR "c:\\gnupg"
385 #define GNUPG_LIBDIR "c:\\gnupg"
386 #define GNUPG_DATADIR "c:\\gnupg"
387 #define GNUPG_SYSCONFDIR "c:\\gnupg"
390 /* Derive some other constants. */
391 #if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
392 #define EXEC_TEMPFILE_ONLY
396 /* We didn't define endianness above, so get it from OS macros. This
397 is intended for making fat binary builds on OS X. */
398 #if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
399 #if defined(__BIG_ENDIAN__)
400 #define BIG_ENDIAN_HOST 1
401 #elif defined(__LITTLE_ENDIAN__)
402 #define LITTLE_ENDIAN_HOST 1
404 #error "No endianness found"
409 /* Hack used for W32: ldap.m4 also tests for the ASCII version of
410 ldap_start_tls_s because that is the actual symbol used in the
411 library. winldap.h redefines it to our commonly used value,
412 thus we define our usual macro here. */
413 #ifdef HAVE_LDAP_START_TLS_SA
414 # ifndef HAVE_LDAP_START_TLS_S
415 # define HAVE_LDAP_START_TLS_S 1
420 /* Tell libgcrypt not to use its own libgpg-error implementation. */
421 #define USE_LIBGPG_ERROR 1
423 /* We use jnlib, so tell other modules about it. */
424 #define HAVE_JNLIB_LOGGING 1
426 /* Our HTTP code is used in estream mode. */
427 #define HTTP_USE_ESTREAM 1
429 /* Under W32 we do an explicit socket initialization, thus we need to
430 avoid the on-demand initialization which would also install an atexit
432 #define HTTP_NO_WSASTARTUP
434 /* We always include support for the OpenPGP card. */
435 #define ENABLE_CARD_SUPPORT 1
437 /* We don't want the old assuan codes anymore. */
438 #define _ASSUAN_ONLY_GPG_ERRORS 1
440 /* We explicitly need to disable PTH's soft mapping as Debian
441 currently enables it by default for no reason. */
442 #define PTH_SYSCALL_SOFT 0
444 /* We want to use the libgcrypt provided memory allocation for
446 #define _ESTREAM_PRINTF_MALLOC gcry_malloc
447 #define _ESTREAM_PRINTF_FREE gcry_free
448 #define _ESTREAM_PRINTF_EXTRA_INCLUDE "util.h"
450 #endif /*GNUPG_CONFIG_H_INCLUDED*/
456 # Checks for programs.
457 AC_MSG_NOTICE([checking for programs])
460 missing_dir=`cd $ac_aux_dir && pwd`
461 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
462 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
463 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
464 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
465 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
470 if test "x$ac_cv_prog_cc_c89" = "xno" ; then
471 AC_MSG_ERROR([[No C-89 compiler found]])
476 AC_CHECK_TOOL(AR, ar, :)
477 AC_PATH_PROG(PERL,"perl")
478 AC_CHECK_TOOL(WINDRES, windres, :)
485 # We need to compile and run a program on the build machine. A
486 # comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
487 # the AC archive is broken for autoconf 2.57. Given that tehre is no
488 # newer version of that macro, we assume that it is also broken for
489 # autoconf 2.61 and thus we use a simple but usually sufficient
491 AC_MSG_CHECKING(for cc for build)
492 if test "$cross_compiling" = "yes"; then
493 CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
495 CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
497 AC_MSG_RESULT($CC_FOR_BUILD)
498 AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
503 have_dosish_system=no
505 use_simple_gettext=no
508 # special stuff for Windoze NT
509 ac_cv_have_dev_random=no
510 AC_DEFINE(USE_ONLY_8DOT3,1,
511 [set this to limit filenames to the 8.3 format])
512 AC_DEFINE(HAVE_DRIVE_LETTERS,1,
513 [defined if we must run on a stupid file system])
514 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
515 [because the Unix gettext has too much overhead on
516 MingW32 systems and these systems lack Posix functions,
517 we use a simplified version of gettext])
518 disable_keyserver_path=yes
519 have_dosish_system=yes
522 use_simple_gettext=yes
524 i?86-emx-os2 | i?86-*-os2*emx )
525 # OS/2 with the EMX environment
526 ac_cv_have_dev_random=no
527 AC_DEFINE(HAVE_DRIVE_LETTERS)
528 have_dosish_system=yes
533 # DOS with the DJGPP environment
534 ac_cv_have_dev_random=no
535 AC_DEFINE(HAVE_DRIVE_LETTERS)
536 have_dosish_system=yes
542 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
543 LDFLAGS="$LDFLAGS -L/usr/local/lib"
547 if test -z "$GCC" ; then
548 CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
552 if test -z "$GCC" ; then
553 # Suppress all warnings
554 # to get rid of the unsigned/signed char mismatch warnings.
559 if test -z "$GCC" ; then
560 # Use the newer compiler `-msg_disable ptrmismatch1' to
561 # get rid of the unsigned/signed char mismatch warnings.
562 # Using this may hide other pointer mismatch warnings, but
563 # it at least lets other warning classes through
564 CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
573 if test "$have_dosish_system" = yes; then
574 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
575 [Defined if we run on some of the PCDOS like systems
576 (DOS, Windoze. OS/2) with special properties like
579 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
581 AM_CONDITIONAL(USE_SIMPLE_GETTEXT, test x"$use_simple_gettext" = xyes)
583 if test "$have_w32_system" = yes; then
584 AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
586 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
588 if test "$disable_keyserver_path" = yes; then
589 AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
590 [Defined to disable exec-path for keyserver helpers])
593 # (These need to go after AC_PROG_CC so that $EXEEXT is defined)
594 AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[The executable file extension, if any])
596 if test x"$try_hkp" = xyes ; then
597 AC_SUBST(GPGKEYS_HKP,"gpg2keys_hkp$EXEEXT")
600 if test x"$try_finger" = xyes ; then
601 AC_SUBST(GPGKEYS_FINGER,"gpg2keys_finger$EXEEXT")
607 # Checks for libraries.
609 AC_MSG_NOTICE([checking for libraries])
613 # libgpg-error is a library with error codes shared between GnuPG
616 AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
617 have_gpg_error=yes,have_gpg_error=no)
621 # Libgcrypt is our generic crypto library
623 AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
624 have_libgcrypt=yes,have_libgcrypt=no)
628 # libassuan is used for IPC
630 AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
631 have_libassuan=yes,have_libassuan=no)
632 if test "$have_libassuan" = "yes"; then
634 AM_PATH_LIBASSUAN_PTH("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
635 have_libassuan=yes,have_libassuan=no)
636 AM_CHECK_LIBASSUAN("$NEED_LIBASSUAN_API:1.0.1",
637 [AC_DEFINE(HAVE_ASSUAN_SET_IO_MONITOR, 1,
638 [Define to 1 if you have the `assuan_set_io_monitor' function.])],)
639 AC_DEFINE_UNQUOTED(GNUPG_LIBASSUAN_VERSION, "$libassuan_version",
640 [version of the libbassuan library])
646 # libksba is our X.509 support library
648 AM_PATH_KSBA("$NEED_KSBA_API:$NEED_KSBA_VERSION",have_ksba=yes,have_ksba=no)
652 # libusb allows us to use the integrated CCID smartcard reader driver.
654 # FiXME: Use GNUPG_CHECK_LIBUSB and modify to use separate AC_SUBSTs.
655 AC_CHECK_LIB(usb, usb_bulk_write,
656 [ LIBUSB_LIBS="$LIBUSB_LIBS -lusb"
657 AC_DEFINE(HAVE_LIBUSB,1,
658 [defined if libusb is available])
661 AC_SUBST(LIBUSB_LIBS)
662 AC_CHECK_FUNCS(usb_create_match)
665 # Check wether it is necessary to link against libdl.
667 gnupg_dlopen_save_libs="$LIBS"
669 AC_SEARCH_LIBS(dlopen, c dl,,,)
672 LIBS="$gnupg_dlopen_save_libs"
675 # Checks for symcryptrun:
678 # libutil has openpty() and login_tty().
679 AC_CHECK_LIB(util, openpty,
680 [ LIBUTIL_LIBS="$LIBUTIL_LIBS -lutil"
681 AC_DEFINE(HAVE_LIBUTIL,1,
682 [defined if libutil is available])
684 AC_SUBST(LIBUTIL_LIBS)
686 # shred is used to clean temporary plain text files.
687 AC_PATH_PROG(SHRED, shred, /usr/bin/shred)
688 AC_DEFINE_UNQUOTED(SHRED,
689 "${SHRED}", [defines the filename of the shred program])
694 # Check whether the GNU Pth library is available
695 # Note, that we include a Pth emulation for W32.
698 if test "$have_pth" = "yes"; then
699 AC_DEFINE(USE_GNU_PTH, 1,
700 [Defined if the GNU Portable Thread Library should be used])
704 *** To support concurrent access to the gpg-agent and the SCdaemon
705 *** we need the support of the GNU Portable Threads Library.
706 *** Download it from ftp://ftp.gnu.org/gnu/pth/
707 *** On a Debian GNU/Linux system you might want to try
708 *** apt-get install libpth-dev
713 AC_MSG_NOTICE([checking for networking options])
716 # Must check for network library requirements before doing link tests
717 # for ldap, for example. If ldap libs are static (or dynamic and without
718 # ELF runtime link paths), then link will fail and LDAP support won't
721 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
722 [NETLIBS="-lnsl $NETLIBS"]))
723 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
724 [NETLIBS="-lsocket $NETLIBS"]))
727 # Now try for the resolver functions so we can use DNS for SRV, PA and CERT.
729 if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
730 AC_ARG_ENABLE(dns-srv,
731 AC_HELP_STRING([--disable-dns-srv],
732 [disable the use of DNS SRV in HKP and HTTP]),
733 use_dns_srv=$enableval,use_dns_srv=yes)
736 AC_ARG_ENABLE(dns-pka,
737 AC_HELP_STRING([--disable-dns-pka],
738 [disable the use of PKA records in DNS]),
739 use_dns_pka=$enableval,use_dns_pka=yes)
741 AC_ARG_ENABLE(dns-cert,
742 AC_HELP_STRING([--disable-dns-cert],
743 [disable the use of CERT records in DNS]),
744 use_dns_cert=$enableval,use_dns_cert=yes)
746 if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes \
747 || test x"$use_dns_cert" = xyes; then
750 # the double underscore thing is a glibc-ism?
751 AC_SEARCH_LIBS(res_query,resolv bind,,
752 AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
753 AC_SEARCH_LIBS(dn_expand,resolv bind,,
754 AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
755 AC_SEARCH_LIBS(dn_skipname,resolv bind,,
756 AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
758 if test x"$have_resolver" != xno ; then
760 # Make sure that the BIND 4 resolver interface is workable before
761 # enabling any code that calls it. At some point I'll rewrite the
762 # code to use the BIND 8 resolver API.
763 # We might also want to use adns instead.
765 AC_MSG_CHECKING([whether the resolver is usable])
766 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
767 #include <netinet/in.h>
768 #include <arpa/nameser.h>
769 #include <resolv.h>],
770 [[unsigned char answer[PACKETSZ];
771 res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
773 dn_expand(0,0,0,0,0);
774 ]])],have_resolver=yes,have_resolver=no)
775 AC_MSG_RESULT($have_resolver)
777 # This is Apple-specific and somewhat bizarre as they changed the
778 # define in bind 8 for some reason.
780 if test x"$have_resolver" != xyes ; then
782 [whether I can make the resolver usable with BIND_8_COMPAT])
783 AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
784 #include <sys/types.h>
785 #include <netinet/in.h>
786 #include <arpa/nameser.h>
787 #include <resolv.h>],
788 [[unsigned char answer[PACKETSZ];
789 res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
790 dn_skipname(0,0); dn_expand(0,0,0,0,0);
791 ]])],[have_resolver=yes ; need_compat=yes])
792 AC_MSG_RESULT($have_resolver)
796 if test x"$have_resolver" = xyes ; then
799 if test x"$use_dns_srv" = xyes ; then
800 AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
803 if test x"$use_dns_pka" = xyes ; then
804 AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
807 if test x"$use_dns_cert" = xyes ; then
808 AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
811 if test x"$need_compat" = xyes ; then
812 AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
825 AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
831 _cppflags="${CPPFLAGS}"
832 _ldflags="${LDFLAGS}"
834 AC_HELP_STRING([--with-adns=DIR],
835 [look for the adns library in DIR]),
836 [if test -d "$withval"; then
837 CPPFLAGS="${CPPFLAGS} -I$withval/include"
838 LDFLAGS="${LDFLAGS} -L$withval/lib"
840 AC_CHECK_HEADERS(adns.h,
841 AC_CHECK_LIB(adns, adns_init,
843 [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}]),
844 [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}])
845 if test "$have_adns" = "yes"; then
849 # Newer adns versions feature a free function to be used under W32.
850 AC_CHECK_FUNCS(adns_free)
856 if test "$try_ldap" = yes ; then
857 GNUPG_CHECK_LDAP($NETLIBS)
861 # Check for curl. We fake the curl API if libcurl isn't installed.
862 # We require 7.10 or later as we use curl_version_info().
864 LIBCURL_CHECK_CONFIG([yes],[7.10],,[fake_curl=yes])
865 AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
867 # Generic, for us, means curl
869 if test x"$try_generic" = xyes ; then
870 AC_SUBST(GPGKEYS_CURL,"gpg2keys_curl$EXEEXT")
876 # This isn't necessarily sendmail itself, but anything that gives a
877 # sendmail-ish interface to the outside world. That includes Exim,
878 # Postfix, etc. Basically, anything that can handle "sendmail -t".
879 if test "$try_mailto" = yes ; then
880 AC_ARG_WITH(mailprog,
881 AC_HELP_STRING([--with-mailprog=NAME],
882 [use "NAME -t" for mail transport]),
885 if test x"$with_mailprog" = xyes ; then
886 AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
887 if test "$ac_cv_path_SENDMAIL" ; then
888 GPGKEYS_MAILTO="gpg2keys_mailto"
890 elif test x"$with_mailprog" != xno ; then
891 AC_MSG_CHECKING([for a mail transport program])
892 AC_SUBST(SENDMAIL,$with_mailprog)
893 AC_MSG_RESULT($with_mailprog)
894 GPGKEYS_MAILTO="gpg2keys_mailto"
898 AC_SUBST(GPGKEYS_MAILTO)
901 # Construct a printable name of the OS
905 PRINTABLE_OS_NAME="MingW32"
908 PRINTABLE_OS_NAME="Cygwin"
910 i?86-emx-os2 | i?86-*-os2*emx )
911 PRINTABLE_OS_NAME="OS/2"
914 PRINTABLE_OS_NAME="MSDOS/DJGPP"
918 PRINTABLE_OS_NAME="GNU/Linux"
921 PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
924 AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
925 [A human readable text with the name of the OS])
937 AC_MSG_NOTICE([checking for gettext])
939 AM_GNU_GETTEXT_VERSION([0.17])
940 if test "$try_gettext" = yes; then
941 AM_GNU_GETTEXT([external],[need-ngettext])
943 # gettext requires some extra checks. These really should be part of
944 # the basic AM_GNU_GETTEXT macro. TODO: move other gettext-specific
945 # function checks to here.
947 AC_CHECK_FUNCS(strchr)
950 USE_INCLUDED_LIBINTL=no
951 BUILD_INCLUDED_LIBINTL=no
954 AC_SUBST(USE_INCLUDED_LIBINTL)
955 AC_SUBST(BUILD_INCLUDED_LIBINTL)
959 # We use HAVE_LANGINFO_CODESET in a couple of places.
962 # Checks required for our use locales
969 if test "$selinux_support" = yes ; then
970 AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support])
975 # Checks for header files.
977 AC_MSG_NOTICE([checking for header files])
979 AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h])
980 AC_CHECK_HEADERS([pty.h pwd.h inttypes.h])
985 # Checks for typedefs, structures, and compiler characteristics.
987 AC_MSG_NOTICE([checking for system characteristics])
999 AC_ARG_ENABLE(endian-check,
1000 AC_HELP_STRING([--disable-endian-check],
1001 [disable the endian check and trust the OS provided macros]),
1002 endiancheck=$enableval,endiancheck=yes)
1004 if test x"$endiancheck" = xyes ; then
1008 # fixme: we should get rid of the byte type
1009 GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
1010 GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
1011 GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
1012 GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
1013 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
1015 AC_CHECK_SIZEOF(unsigned short)
1016 AC_CHECK_SIZEOF(unsigned int)
1017 AC_CHECK_SIZEOF(unsigned long)
1018 AC_CHECK_SIZEOF(unsigned long long)
1019 AC_CHECK_SIZEOF(time_t,,[[
1021 #if TIME_WITH_SYS_TIME
1022 # include <sys/time.h>
1025 # if HAVE_SYS_TIME_H
1026 # include <sys/time.h>
1034 # Ensure that we have UINT64_C before we bother to check for uint64_t
1035 # Fixme: really needed in gnupg? I think it is only useful in libcgrypt.
1036 AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works],
1037 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>
1038 uint64_t foo=UINT64_C(42);]),
1039 gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
1040 if test "$gnupg_cv_uint64_c_works" = "yes" ; then
1041 AC_CHECK_SIZEOF(uint64_t)
1044 if test "$ac_cv_sizeof_unsigned_short" = "0" \
1045 || test "$ac_cv_sizeof_unsigned_int" = "0" \
1046 || test "$ac_cv_sizeof_unsigned_long" = "0"; then
1047 AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
1052 # Checks for library functions.
1054 AC_MSG_NOTICE([checking for library functions])
1055 AC_CHECK_DECLS(getpagesize)
1059 AC_CHECK_FUNCS([strerror strlwr tcgetattr mmap])
1060 AC_CHECK_FUNCS([strcasecmp strncasecmp ctermid times gmtime_r])
1061 AC_CHECK_FUNCS([unsetenv getpwnam getpwuid fcntl ftruncate])
1062 AC_CHECK_FUNCS([gettimeofday getrusage getrlimit setrlimit clock_gettime])
1063 AC_CHECK_FUNCS([atexit raise getpagesize strftime nl_langinfo setlocale])
1064 AC_CHECK_FUNCS([waitpid wait4 sigaction sigprocmask pipe stat getaddrinfo])
1065 AC_CHECK_FUNCS([ttyname rand ftello fsync])
1067 AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
1070 # These are needed by libjnlib - fixme: we should use a jnlib.m4
1072 AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol])
1073 AC_CHECK_FUNCS([memrchr isascii timegm getrusage setrlimit stat setlocale])
1074 AC_CHECK_FUNCS([flockfile funlockfile fopencookie funopen])
1079 gl_SOURCE_BASE([gl])
1081 gl_MODULES([setenv mkdtemp xsize strpbrk])
1088 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
1091 # Sanity check regex. Tests adapted from mutt.
1093 AC_MSG_CHECKING([whether regular expression support is requested])
1094 AC_ARG_ENABLE(regex,
1095 AC_HELP_STRING([--disable-regex],
1096 [do not handle regular expressions in trust signatures]),
1097 use_regex=$enableval, use_regex=yes)
1098 AC_MSG_RESULT($use_regex)
1100 if test "$use_regex" = yes ; then
1101 _cppflags="${CPPFLAGS}"
1102 _ldflags="${LDFLAGS}"
1104 AC_HELP_STRING([--with-regex=DIR],[look for regex in DIR]),
1106 if test -d "$withval" ; then
1107 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1108 LDFLAGS="${LDFLAGS} -L$withval/lib"
1112 # Does the system have regex functions at all?
1113 AC_SEARCH_LIBS([regcomp], [regex])
1114 AC_CHECK_FUNC(regcomp, gnupg_cv_have_regex=yes, gnupg_cv_have_regex=no)
1116 if test $gnupg_cv_have_regex = no; then
1119 if test x"$cross_compiling" = xyes; then
1120 AC_MSG_WARN([cross compiling; assuming regexp libray is not broken])
1122 AC_CACHE_CHECK([whether your system's regexp library is broken],
1123 [gnupg_cv_regex_broken],
1127 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); }],
1128 gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
1130 if test $gnupg_cv_regex_broken = yes; then
1131 AC_MSG_WARN([your regex is broken - disabling regex use])
1136 CPPFLAGS="${_cppflags}"
1137 LDFLAGS="${_ldflags}"
1140 if test "$use_regex" != yes ; then
1141 AC_DEFINE(DISABLE_REGEX,1, [Define to disable regular expression support])
1143 AM_CONDITIONAL(DISABLE_REGEX, test x"$use_regex" != xyes)
1148 # Do we have zlib? Must do it here because Solaris failed
1149 # when compiling a conftest (due to the "-lz" from LIBS).
1150 # Note that we combine zlib and bzlib2 in ZLIBS.
1152 _cppflags="${CPPFLAGS}"
1153 _ldflags="${LDFLAGS}"
1155 [ --with-zlib=DIR use libz in DIR],[
1156 if test -d "$withval"; then
1157 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1158 LDFLAGS="${LDFLAGS} -L$withval/lib"
1162 AC_CHECK_HEADER(zlib.h,
1163 AC_CHECK_LIB(z, deflateInit2_,
1165 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1166 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
1169 # Check whether we can support bzip2
1171 if test "$use_bzip2" = yes ; then
1172 _cppflags="${CPPFLAGS}"
1173 _ldflags="${LDFLAGS}"
1175 AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
1177 if test -d "$withval" ; then
1178 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1179 LDFLAGS="${LDFLAGS} -L$withval/lib"
1183 # Checking alongside stdio.h as an early version of bzip2 (1.0)
1184 # required stdio.h to be included before bzlib.h, and Solaris 9 is
1185 # woefully out of date.
1186 if test "$withval" != no ; then
1187 AC_CHECK_HEADER(bzlib.h,
1188 AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
1191 ZLIBS="$ZLIBS -lbz2"
1192 AC_DEFINE(HAVE_BZIP2,1,
1193 [Defined if the bz2 compression library is available])
1195 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1196 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>])
1199 AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
1203 # Check for readline support
1204 GNUPG_CHECK_READLINE
1207 # Allow users to append something to the version string without
1208 # flagging it as development version. The user version parts is
1209 # considered everything after a dash.
1211 if test "$development_version" != yes; then
1215 if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
1216 development_version=yes
1219 if test "$development_version" = yes; then
1220 AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
1221 [Defined if this is not a regular release])
1224 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
1228 # Add some extra libs here so that previous tests don't fail for
1229 # mysterious reasons - the final link step should bail out.
1230 # W32SOCKLIBS is also defined so that if can be used for tools not
1231 # requiring any network stuff but linking to code in libcommon which
1232 # tracks in winsock stuff (e.g. init_common_subsystems.
1233 if test "$have_w32_system" = yes; then
1234 W32SOCKLIBS="-lws2_32"
1235 NETLIBS="${NETLIBS} ${W32SOCKLIBS}"
1239 AC_SUBST(W32SOCKLIBS)
1242 # Setup gcc specific options
1244 AC_MSG_NOTICE([checking for cc features])
1245 if test "$GCC" = yes; then
1246 # Note that it is okay to use CFLAGS here because this are just
1247 # warning options and the user should have a chance of overriding
1249 if test "$USE_MAINTAINER_MODE" = "yes"; then
1250 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
1251 CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
1252 AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
1253 _gcc_cflags_save=$CFLAGS
1254 CFLAGS="-Wno-missing-field-initializers"
1255 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
1256 AC_MSG_RESULT($_gcc_wopt)
1257 CFLAGS=$_gcc_cflags_save;
1258 if test x"$_gcc_wopt" = xyes ; then
1259 CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
1261 AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
1262 _gcc_cflags_save=$CFLAGS
1263 CFLAGS="-Wdeclaration-after-statement"
1264 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
1265 AC_MSG_RESULT($_gcc_wopt)
1266 CFLAGS=$_gcc_cflags_save;
1267 if test x"$_gcc_wopt" = xyes ; then
1268 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
1271 CFLAGS="$CFLAGS -Wall"
1274 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
1275 _gcc_cflags_save=$CFLAGS
1276 CFLAGS="-Wno-pointer-sign"
1277 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1278 AC_MSG_RESULT($_gcc_psign)
1279 CFLAGS=$_gcc_cflags_save;
1280 if test x"$_gcc_psign" = xyes ; then
1281 CFLAGS="$CFLAGS -Wno-pointer-sign"
1284 AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
1285 _gcc_cflags_save=$CFLAGS
1286 CFLAGS="-Wpointer-arith"
1287 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1288 AC_MSG_RESULT($_gcc_psign)
1289 CFLAGS=$_gcc_cflags_save;
1290 if test x"$_gcc_psign" = xyes ; then
1291 CFLAGS="$CFLAGS -Wpointer-arith"
1297 # This is handy for debugging so the compiler doesn't rearrange
1298 # things and eliminate variables.
1300 AC_ARG_ENABLE(optimization,
1301 AC_HELP_STRING([--disable-optimization],
1302 [disable compiler optimization]),
1303 [if test $enableval = no ; then
1304 CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
1308 # Prepare building of estream
1314 # Decide what to build
1316 if test "$have_adns" = "yes"; then
1317 AC_SUBST(GPGKEYS_KDNS, "gpg2keys_kdns$EXEEXT")
1322 if test $have_ksba = no; then
1327 build_agent_threaded=""
1328 if test "$build_agent" = "yes"; then
1329 if test $have_pth = no; then
1330 build_agent_threaded="(not multi-threaded)"
1335 build_scdaemon_extra=""
1336 if test "$build_scdaemon" = "yes"; then
1338 if test $have_pth = no; then
1339 build_scdaemon_extra="not multi-threaded"
1343 if test $have_libusb = no; then
1344 build_scdaemon_extra="${tmp}without internal CCID driver"
1347 if test -n "$build_scdaemon_extra"; then
1348 build_scdaemon_extra="(${build_scdaemon_extra})"
1353 if test "$build_agent_only" = "yes" ; then
1362 AM_CONDITIONAL(BUILD_GPG, test "$build_gpg" = "yes")
1363 AM_CONDITIONAL(BUILD_GPGSM, test "$build_gpgsm" = "yes")
1364 AM_CONDITIONAL(BUILD_AGENT, test "$build_agent" = "yes")
1365 AM_CONDITIONAL(BUILD_SCDAEMON, test "$build_scdaemon" = "yes")
1366 AM_CONDITIONAL(BUILD_TOOLS, test "$build_tools" = "yes")
1367 AM_CONDITIONAL(BUILD_DOC, test "$build_doc" = "yes")
1368 AM_CONDITIONAL(BUILD_SYMCRYPTRUN, test "$build_symcryptrun" = "yes")
1370 AM_CONDITIONAL(RUN_GPG_TESTS,
1371 test x$cross_compiling = xno -a "$build_gpg" = yes )
1375 # Print errors here so that they are visible all
1376 # together and the user can acquire them all together.
1379 if test "$have_gpg_error" = "no"; then
1383 *** You need libgpg-error to build this program.
1384 ** This library is for example available at
1385 *** ftp://ftp.gnupg.org/gcrypt/libgpg-error
1386 *** (at least version $NEED_GPG_ERROR_VERSION is required.)
1389 if test "$have_libgcrypt" = "no"; then
1393 *** You need libgcrypt to build this program.
1394 ** This library is for example available at
1395 *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
1396 *** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)
1399 if test "$have_libassuan" = "no"; then
1403 *** You need libassuan with Pth support to build this program.
1404 *** This library is for example available at
1405 *** ftp://ftp.gnupg.org/gcrypt/libassuan/
1406 *** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required).
1409 if test "$have_ksba" = "no"; then
1412 *** You need libksba to build this program.
1413 *** This library is for example available at
1414 *** ftp://ftp.gnupg.org/gcrypt/libksba/
1415 *** (at least version $NEED_KSBA_VERSION using API $NEED_KSBA_API is required).
1418 if test "$missing_pth" = "yes"; then
1421 *** It is now required to build with support for the
1422 *** GNU Portable Threads Library (Pth). Please install this
1423 *** library first. The library is for example available at
1424 *** ftp://ftp.gnu.org/gnu/pth/
1425 *** On a Debian GNU/Linux system you can install it using
1426 *** apt-get install libpth-dev
1427 *** To build GnuPG for Windows you need to use the W32PTH
1428 *** package; available at:
1429 *** ftp://ftp.g10code.com/g10code/w32pth/
1434 if test "$die" = "yes"; then
1437 *** Required libraries not found. Please consult the above messages
1438 *** and install them before running configure again.
1444 AC_CONFIG_FILES([ m4/Makefile
1457 keyserver/gpg2keys_mailto
1458 keyserver/gpg2keys_test
1463 tests/openpgp/Makefile
1464 tests/pkits/Makefile
1470 GnuPG v${VERSION} has been configured as follows:
1472 Platform: $PRINTABLE_OS_NAME ($host)
1475 S/MIME: $build_gpgsm
1476 Agent: $build_agent $build_agent_threaded
1477 Smartcard: $build_scdaemon $build_scdaemon_extra
1479 Protect tool: $show_gnupg_protect_tool_pgm
1480 Default agent: $show_gnupg_agent_pgm
1481 Default pinentry: $show_gnupg_pinentry_pgm
1482 Default scdaemon: $show_gnupg_scdaemon_pgm
1483 Default dirmngr: $show_gnupg_dirmngr_pgm
1485 if test x"$use_regex" != xyes ; then
1487 Warning: No regular expression support available.
1488 OpenPGP trust signatures won't work.
1489 gpg-check-pattern will not be build.
1492 if test x"$use_camellia" = xyes ; then
1494 echo "WARNING: The Camellia cipher for gpg is for testing only"
1495 echo " and is NOT for production use!"