1
# configure.ac - for GnuPG 2.0
2
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3
# 2006, 2007, 2008, 2010, 2011 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.17])
28
m4_define([my_issvn], [no])
30
m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
31
| sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
32
m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
33
| awk '/^\* / {printf "%s",$3}']))
35
[my_version[]m4_if(my_issvn,[yes],
36
[m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])],
37
[http://bugs.gnupg.org])
38
# Set development_version to yes if the minor number is odd or you
39
# feel that the default check for a development version is not
41
development_version=no
43
NEED_GPG_ERROR_VERSION=1.7
46
NEED_LIBGCRYPT_VERSION=1.4.0
49
NEED_LIBASSUAN_VERSION=2.0.0
52
NEED_KSBA_VERSION=1.0.7
56
PACKAGE_GT=${PACKAGE_NAME}
57
VERSION=$PACKAGE_VERSION
59
AC_CONFIG_AUX_DIR(scripts)
60
AC_CONFIG_SRCDIR(sm/gpgsm.c)
61
AM_CONFIG_HEADER(config.h)
62
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
68
# Some status variables.
79
disable_keyserver_path=no
81
use_standard_socket=no
83
GNUPG_BUILD_PROGRAM(gpg, yes)
84
GNUPG_BUILD_PROGRAM(gpgsm, yes)
85
GNUPG_BUILD_PROGRAM(agent, yes)
86
GNUPG_BUILD_PROGRAM(scdaemon, yes)
87
GNUPG_BUILD_PROGRAM(tools, yes)
88
GNUPG_BUILD_PROGRAM(doc, yes)
89
GNUPG_BUILD_PROGRAM(symcryptrun, no)
90
GNUPG_BUILD_PROGRAM(gpgtar, no)
96
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
97
AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
98
[Name of this package for gettext])
99
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
100
AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
101
[Bug report address])
102
AC_DEFINE_UNQUOTED(NEED_LIBGCRYPT_VERSION, "$NEED_LIBGCRYPT_VERSION",
103
[Required version of Libgcrypt])
104
AC_DEFINE_UNQUOTED(NEED_KSBA_VERSION, "$NEED_KSBA_VERSION",
105
[Required version of Libksba])
109
# The default is to use the modules from this package and the few
110
# other packages in a standard place; i.e where this package gets
111
# installed. With these options it is possible to override these
112
# ${prefix} depended values with fixed paths, which can't be replaced
113
# at make time. See also am/cmacros.am and the defaults in AH_BOTTOM.
114
AC_ARG_WITH(agent-pgm,
115
[ --with-agent-pgm=PATH Use PATH as the default for the agent)],
116
GNUPG_AGENT_PGM="$withval", GNUPG_AGENT_PGM="" )
117
AC_SUBST(GNUPG_AGENT_PGM)
118
AM_CONDITIONAL(GNUPG_AGENT_PGM, test -n "$GNUPG_AGENT_PGM")
119
show_gnupg_agent_pgm="(default)"
120
test -n "$GNUPG_AGENT_PGM" && show_gnupg_agent_pgm="$GNUPG_AGENT_PGM"
122
AC_ARG_WITH(pinentry-pgm,
123
[ --with-pinentry-pgm=PATH Use PATH as the default for the pinentry)],
124
GNUPG_PINENTRY_PGM="$withval", GNUPG_PINENTRY_PGM="" )
125
AC_SUBST(GNUPG_PINENTRY_PGM)
126
AM_CONDITIONAL(GNUPG_PINENTRY_PGM, test -n "$GNUPG_PINENTRY_PGM")
127
show_gnupg_pinentry_pgm="(default)"
128
test -n "$GNUPG_PINENTRY_PGM" && show_gnupg_pinentry_pgm="$GNUPG_PINENTRY_PGM"
131
AC_ARG_WITH(scdaemon-pgm,
132
[ --with-scdaemon-pgm=PATH Use PATH as the default for the scdaemon)],
133
GNUPG_SCDAEMON_PGM="$withval", GNUPG_SCDAEMON_PGM="" )
134
AC_SUBST(GNUPG_SCDAEMON_PGM)
135
AM_CONDITIONAL(GNUPG_SCDAEMON_PGM, test -n "$GNUPG_SCDAEMON_PGM")
136
show_gnupg_scdaemon_pgm="(default)"
137
test -n "$GNUPG_SCDAEMON_PGM" && show_gnupg_scdaemon_pgm="$GNUPG_SCDAEMON_PGM"
140
AC_ARG_WITH(dirmngr-pgm,
141
[ --with-dirmngr-pgm=PATH Use PATH as the default for the dirmngr)],
142
GNUPG_DIRMNGR_PGM="$withval", GNUPG_DIRMNGR_PGM="" )
143
AC_SUBST(GNUPG_DIRMNGR_PGM)
144
AM_CONDITIONAL(GNUPG_DIRMNGR_PGM, test -n "$GNUPG_DIRMNGR_PGM")
145
show_gnupg_dirmngr_pgm="(default)"
146
test -n "$GNUPG_DIRMNGR_PGM" && show_gnupg_dirmngr_pgm="$GNUPG_DIRMNGR_PGM"
148
AC_ARG_WITH(protect-tool-pgm,
149
[ --with-protect-tool-pgm=PATH Use PATH as the default for the protect-tool)],
150
GNUPG_PROTECT_TOOL_PGM="$withval", GNUPG_PROTECT_TOOL_PGM="" )
151
AC_SUBST(GNUPG_PROTECT_TOOL_PGM)
152
AM_CONDITIONAL(GNUPG_PROTECT_TOOL_PGM, test -n "$GNUPG_PROTECT_TOOL_PGM")
153
show_gnupg_protect_tool_pgm="(default)"
154
test -n "$GNUPG_PROTECT_TOOL_PGM" \
155
&& show_gnupg_protect_tool_pgm="$GNUPG_PROTECT_TOOL_PGM"
158
# Some folks want to use only the agent from this packet. Make it
159
# easier for them by providing the configure option
160
# --enable-only-agent.
161
AC_ARG_ENABLE(agent-only,
162
AC_HELP_STRING([--enable-agent-only],[build only the gpg-agent]),
163
build_agent_only=$enableval)
165
# SELinux support includes tracking of sensitive files to avoid
166
# leaking their contents through processing these files by gpg itself
167
AC_MSG_CHECKING([whether SELinux support is requested])
168
AC_ARG_ENABLE(selinux-support,
169
AC_HELP_STRING([--enable-selinux-support],
170
[enable SELinux support]),
171
selinux_support=$enableval, selinux_support=no)
172
AC_MSG_RESULT($selinux_support)
174
# Allow disabling of bzib2 support.
175
# It is defined only after we confirm the library is available later
176
AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
178
AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
179
use_bzip2=$enableval)
180
AC_MSG_RESULT($use_bzip2)
182
# Configure option to allow or disallow execution of external
183
# programs, like a photo viewer.
184
AC_MSG_CHECKING([whether to enable external program execution])
186
AC_HELP_STRING([--disable-exec],[disable all external program execution]),
188
AC_MSG_RESULT($use_exec)
189
if test "$use_exec" = no ; then
190
AC_DEFINE(NO_EXEC,1,[Define to disable all external program execution])
193
if test "$use_exec" = yes ; then
194
AC_MSG_CHECKING([whether to enable photo ID viewing])
195
AC_ARG_ENABLE(photo-viewers,
196
[ --disable-photo-viewers disable photo ID viewers],
197
[if test "$enableval" = no ; then
198
AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
200
gnupg_cv_enable_photo_viewers=$enableval
201
AC_MSG_RESULT($enableval)
203
if test "$gnupg_cv_enable_photo_viewers" = yes ; then
204
AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
205
AC_ARG_WITH(photo-viewer,
206
[ --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer],
207
[if test "$withval" = yes ; then
209
elif test "$withval" != no ; then
210
AC_DEFINE_UNQUOTED(FIXED_PHOTO_VIEWER,"$withval",
211
[if set, restrict photo-viewer to this])
213
AC_MSG_RESULT($withval)
216
AC_MSG_CHECKING([whether to enable external keyserver helpers])
217
AC_ARG_ENABLE(keyserver-helpers,
218
[ --disable-keyserver-helpers disable all external keyserver support],
219
[if test "$enableval" = no ; then
220
AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
221
[define to disable keyserver helpers])
223
gnupg_cv_enable_keyserver_helpers=$enableval
224
AC_MSG_RESULT($enableval)
226
if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
227
# LDAP is defined only after we confirm the library is available later
228
AC_MSG_CHECKING([whether LDAP keyserver support is requested])
230
AC_HELP_STRING([--disable-ldap],[disable LDAP keyserver interface only]),
231
try_ldap=$enableval, try_ldap=yes)
232
AC_MSG_RESULT($try_ldap)
234
AC_MSG_CHECKING([whether HKP keyserver support is requested])
236
AC_HELP_STRING([--disable-hkp],[disable HKP keyserver interface only]),
237
try_hkp=$enableval, try_hkp=yes)
238
AC_MSG_RESULT($try_hkp)
240
AC_MSG_CHECKING([whether finger key fetching support is requested])
241
AC_ARG_ENABLE(finger,
242
AC_HELP_STRING([--disable-finger],
243
[disable finger key fetching interface only]),
244
try_finger=$enableval, try_finger=yes)
245
AC_MSG_RESULT($try_finger)
247
AC_MSG_CHECKING([whether generic object key fetching support is requested])
248
AC_ARG_ENABLE(generic,
249
AC_HELP_STRING([--disable-generic],
250
[disable generic object key fetching interface only]),
251
try_generic=$enableval, try_generic=yes)
252
AC_MSG_RESULT($try_generic)
254
AC_MSG_CHECKING([whether email keyserver support is requested])
255
AC_ARG_ENABLE(mailto,
256
AC_HELP_STRING([--enable-mailto],
257
[enable email keyserver interface only]),
258
try_mailto=$enableval, try_mailto=no)
259
AC_MSG_RESULT($try_mailto)
262
AC_MSG_CHECKING([whether keyserver exec-path is enabled])
263
AC_ARG_ENABLE(keyserver-path,
264
AC_HELP_STRING([--disable-keyserver-path],
265
[disable the exec-path option for keyserver helpers]),
266
[if test "$enableval" = no ; then
267
disable_keyserver_path=yes
269
AC_MSG_RESULT($enableval)
274
# Check for the key/uid cache size. This can't be zero, but can be
275
# pretty small on embedded systems. This is used for the gpg part.
277
AC_MSG_CHECKING([for the size of the key and uid cache])
278
AC_ARG_ENABLE(key-cache,
279
AC_HELP_STRING([--enable-key-cache=SIZE],
280
[Set key cache to SIZE (default 4096)]),,enableval=4096)
281
if test "$enableval" = "no"; then
283
elif test "$enableval" = "yes" || test "$enableval" = ""; then
287
key_cache_size=`echo "$enableval" | sed 's/[A-Za-z]//g'`
289
if test "$enableval" != "$key_cache_size" || test "$key_cache_size" -lt 5; then
290
AC_MSG_ERROR([invalid key-cache size])
292
AC_MSG_RESULT($key_cache_size)
293
AC_DEFINE_UNQUOTED(PK_UID_CACHE_SIZE,$key_cache_size,
294
[Size of the key and UID caches])
299
# Check whether we want to use Linux capabilities
301
AC_MSG_CHECKING([whether use of capabilities is requested])
302
AC_ARG_WITH(capabilities,
303
[ --with-capabilities use linux capabilities [default=no]],
304
[use_capabilities="$withval"],[use_capabilities=no])
305
AC_MSG_RESULT($use_capabilities)
309
# Allow disabling of internal CCID support.
310
# It is defined only after we confirm the library is available later
312
AC_MSG_CHECKING([whether to enable the internal CCID driver])
313
AC_ARG_ENABLE(ccid-driver,
314
AC_HELP_STRING([--disable-ccid-driver],
315
[disable the internal CCID driver]),
316
use_ccid_driver=$enableval)
317
AC_MSG_RESULT($use_ccid_driver)
321
# To avoid double inclusion of config.h which might happen at some
322
# places, we add the usual double inclusion protection at the top of
326
#ifndef GNUPG_CONFIG_H_INCLUDED
327
#define GNUPG_CONFIG_H_INCLUDED
331
# Stuff which goes at the bottom of config.h.
334
/* This is the major version number of GnuPG so that
335
source included files can test for this. Note, that
336
we use 2 here even for GnuPG 1.9.x. */
337
#define GNUPG_MAJOR_VERSION 2
339
/* Now to separate file name parts.
340
Please note that the string version must not contain more
341
than one character because the code assumes strlen()==1 */
342
#ifdef HAVE_DOSISH_SYSTEM
343
#define DIRSEP_C '\\'
344
#define DIRSEP_S "\\"
347
#define PATHSEP_C ';'
348
#define PATHSEP_S ";"
349
#define EXEEXT_S ".exe"
355
#define PATHSEP_C ':'
356
#define PATHSEP_S ":"
360
/* This is the same as VERSION, but should be overridden if the
361
platform cannot handle things like dots '.' in filenames. Set
362
SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
363
uses for dots and dashes. */
364
#define SAFE_VERSION VERSION
365
#define SAFE_VERSION_DOT '.'
366
#define SAFE_VERSION_DASH '-'
368
/* Some global constants. */
369
#ifdef HAVE_DRIVE_LETTERS
370
#define GNUPG_DEFAULT_HOMEDIR "c:/gnupg"
372
#define GNUPG_DEFAULT_HOMEDIR "/SYS\$LOGIN/gnupg"
374
#define GNUPG_DEFAULT_HOMEDIR "~/.gnupg"
376
#define GNUPG_PRIVATE_KEYS_DIR "private-keys-v1.d"
378
/* For some systems (DOS currently), we hardcode the path here. For
379
POSIX systems the values are constructed by the Makefiles, so that
380
the values may be overridden by the make invocations; this is to
381
comply with the GNU coding standards. */
382
#ifdef HAVE_DRIVE_LETTERS
383
/* FIXME: We need to use a function to determine these values depending
384
on the actual installation directory. */
385
#define GNUPG_BINDIR "c:\\gnupg"
386
#define GNUPG_LIBEXECDIR "c:\\gnupg"
387
#define GNUPG_LIBDIR "c:\\gnupg"
388
#define GNUPG_DATADIR "c:\\gnupg"
389
#define GNUPG_SYSCONFDIR "c:\\gnupg"
392
/* Derive some other constants. */
393
#if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
394
#define EXEC_TEMPFILE_ONLY
398
/* We didn't define endianness above, so get it from OS macros. This
399
is intended for making fat binary builds on OS X. */
400
#if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
401
#if defined(__BIG_ENDIAN__)
402
#define BIG_ENDIAN_HOST 1
403
#elif defined(__LITTLE_ENDIAN__)
404
#define LITTLE_ENDIAN_HOST 1
406
#error "No endianness found"
411
/* Hack used for W32: ldap.m4 also tests for the ASCII version of
412
ldap_start_tls_s because that is the actual symbol used in the
413
library. winldap.h redefines it to our commonly used value,
414
thus we define our usual macro here. */
415
#ifdef HAVE_LDAP_START_TLS_SA
416
# ifndef HAVE_LDAP_START_TLS_S
417
# define HAVE_LDAP_START_TLS_S 1
422
/* Tell libgcrypt not to use its own libgpg-error implementation. */
423
#define USE_LIBGPG_ERROR 1
425
/* We use jnlib, so tell other modules about it. */
426
#define HAVE_JNLIB_LOGGING 1
428
/* Our HTTP code is used in estream mode. */
429
#define HTTP_USE_ESTREAM 1
431
/* Under W32 we do an explicit socket initialization, thus we need to
432
avoid the on-demand initialization which would also install an atexit
434
#define HTTP_NO_WSASTARTUP
436
/* We always include support for the OpenPGP card. */
437
#define ENABLE_CARD_SUPPORT 1
439
/* We don't want the old assuan codes anymore. */
440
#define _ASSUAN_ONLY_GPG_ERRORS 1
442
/* We explicitly need to disable PTH's soft mapping as Debian
443
currently enables it by default for no reason. */
444
#define PTH_SYSCALL_SOFT 0
446
/* We want to use the libgcrypt provided memory allocation for
448
#define _ESTREAM_PRINTF_MALLOC gcry_malloc
449
#define _ESTREAM_PRINTF_FREE gcry_free
450
#define _ESTREAM_PRINTF_EXTRA_INCLUDE "util.h"
452
#endif /*GNUPG_CONFIG_H_INCLUDED*/
458
# Checks for programs.
459
AC_MSG_NOTICE([checking for programs])
462
missing_dir=`cd $ac_aux_dir && pwd`
463
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
464
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
465
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
466
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
467
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
472
if test "x$ac_cv_prog_cc_c89" = "xno" ; then
473
AC_MSG_ERROR([[No C-89 compiler found]])
478
AC_CHECK_TOOL(AR, ar, :)
479
AC_PATH_PROG(PERL,"perl")
480
AC_CHECK_TOOL(WINDRES, windres, :)
487
# We need to compile and run a program on the build machine. A
488
# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
489
# the AC archive is broken for autoconf 2.57. Given that tehre is no
490
# newer version of that macro, we assume that it is also broken for
491
# autoconf 2.61 and thus we use a simple but usually sufficient
493
AC_MSG_CHECKING(for cc for build)
494
if test "$cross_compiling" = "yes"; then
495
CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
497
CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
499
AC_MSG_RESULT($CC_FOR_BUILD)
500
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
505
have_dosish_system=no
507
use_simple_gettext=no
510
# special stuff for Windoze NT
511
ac_cv_have_dev_random=no
512
AC_DEFINE(USE_ONLY_8DOT3,1,
513
[set this to limit filenames to the 8.3 format])
514
AC_DEFINE(HAVE_DRIVE_LETTERS,1,
515
[defined if we must run on a stupid file system])
516
AC_DEFINE(USE_SIMPLE_GETTEXT,1,
517
[because the Unix gettext has too much overhead on
518
MingW32 systems and these systems lack Posix functions,
519
we use a simplified version of gettext])
520
disable_keyserver_path=yes
521
have_dosish_system=yes
524
use_simple_gettext=yes
526
i?86-emx-os2 | i?86-*-os2*emx )
527
# OS/2 with the EMX environment
528
ac_cv_have_dev_random=no
529
AC_DEFINE(HAVE_DRIVE_LETTERS)
530
have_dosish_system=yes
535
# DOS with the DJGPP environment
536
ac_cv_have_dev_random=no
537
AC_DEFINE(HAVE_DRIVE_LETTERS)
538
have_dosish_system=yes
544
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
545
LDFLAGS="$LDFLAGS -L/usr/local/lib"
549
if test -z "$GCC" ; then
550
CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
554
if test -z "$GCC" ; then
555
# Suppress all warnings
556
# to get rid of the unsigned/signed char mismatch warnings.
561
if test -z "$GCC" ; then
562
# Use the newer compiler `-msg_disable ptrmismatch1' to
563
# get rid of the unsigned/signed char mismatch warnings.
564
# Using this may hide other pointer mismatch warnings, but
565
# it at least lets other warning classes through
566
CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
575
if test "$have_dosish_system" = yes; then
576
AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
577
[Defined if we run on some of the PCDOS like systems
578
(DOS, Windoze. OS/2) with special properties like
581
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
583
AM_CONDITIONAL(USE_SIMPLE_GETTEXT, test x"$use_simple_gettext" = xyes)
585
if test "$have_w32_system" = yes; then
586
AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
588
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
590
if test "$disable_keyserver_path" = yes; then
591
AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
592
[Defined to disable exec-path for keyserver helpers])
596
# Allows enabling the use of a standard socket by default This is
597
# gpg-agent's option --[no-]use-standard-socket. For Windows we force
600
AC_MSG_CHECKING([whether to use a standard socket by default])
601
AC_ARG_ENABLE(standard-socket,
602
AC_HELP_STRING([--enable-standard-socket],
603
[use a standard socket for the agent by default]),
604
use_standard_socket=$enableval)
606
if test "$use_standard_socket" != yes; then
607
if test "$have_w32_system" = yes; then
608
use_standard_socket=yes
612
AC_MSG_RESULT($use_standard_socket$tmp)
613
if test "$use_standard_socket" = yes; then
614
AC_DEFINE(USE_STANDARD_SOCKET,1,
615
[Use a standard socket for the agent by default])
619
# (These need to go after AC_PROG_CC so that $EXEEXT is defined)
620
AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[The executable file extension, if any])
622
if test x"$try_hkp" = xyes ; then
623
AC_SUBST(GPGKEYS_HKP,"gpg2keys_hkp$EXEEXT")
626
if test x"$try_finger" = xyes ; then
627
AC_SUBST(GPGKEYS_FINGER,"gpg2keys_finger$EXEEXT")
633
# Checks for libraries.
635
AC_MSG_NOTICE([checking for libraries])
639
# libgpg-error is a library with error codes shared between GnuPG
642
AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
643
have_gpg_error=yes,have_gpg_error=no)
647
# Libgcrypt is our generic crypto library
649
AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
650
have_libgcrypt=yes,have_libgcrypt=no)
654
# libassuan is used for IPC
656
AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
657
have_libassuan=yes,have_libassuan=no)
658
if test "$have_libassuan" = "yes"; then
659
AC_DEFINE_UNQUOTED(GNUPG_LIBASSUAN_VERSION, "$libassuan_version",
660
[version of the libbassuan library])
666
# libksba is our X.509 support library
668
AM_PATH_KSBA("$NEED_KSBA_API:$NEED_KSBA_VERSION",have_ksba=yes,have_ksba=no)
672
# libusb allows us to use the integrated CCID smartcard reader driver.
674
# FiXME: Use GNUPG_CHECK_LIBUSB and modify to use separate AC_SUBSTs.
675
if test "$use_ccid_driver" = yes ; then
676
AC_CHECK_LIB(usb, usb_bulk_write,
677
[ LIBUSB_LIBS="$LIBUSB_LIBS -lusb"
678
AC_DEFINE(HAVE_LIBUSB,1,
679
[defined if libusb is available])
682
AC_CHECK_FUNCS(usb_create_match)
684
AC_SUBST(LIBUSB_LIBS)
687
# Check wether it is necessary to link against libdl.
689
gnupg_dlopen_save_libs="$LIBS"
691
AC_SEARCH_LIBS(dlopen, c dl,,,)
694
LIBS="$gnupg_dlopen_save_libs"
697
# Checks for symcryptrun:
700
# libutil has openpty() and login_tty().
701
AC_CHECK_LIB(util, openpty,
702
[ LIBUTIL_LIBS="$LIBUTIL_LIBS -lutil"
703
AC_DEFINE(HAVE_LIBUTIL,1,
704
[defined if libutil is available])
706
AC_SUBST(LIBUTIL_LIBS)
708
# shred is used to clean temporary plain text files.
709
AC_PATH_PROG(SHRED, shred, /usr/bin/shred)
710
AC_DEFINE_UNQUOTED(SHRED,
711
"${SHRED}", [defines the filename of the shred program])
716
# Check whether the GNU Pth library is available
717
# Note, that we include a Pth emulation for W32.
720
if test "$have_pth" = "yes"; then
721
AC_DEFINE(USE_GNU_PTH, 1,
722
[Defined if the GNU Portable Thread Library should be used])
726
*** To support concurrent access to the gpg-agent and the SCdaemon
727
*** we need the support of the GNU Portable Threads Library.
728
*** Download it from ftp://ftp.gnu.org/gnu/pth/
729
*** On a Debian GNU/Linux system you might want to try
730
*** apt-get install libpth-dev
735
AC_MSG_NOTICE([checking for networking options])
738
# Must check for network library requirements before doing link tests
739
# for ldap, for example. If ldap libs are static (or dynamic and without
740
# ELF runtime link paths), then link will fail and LDAP support won't
743
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
744
[NETLIBS="-lnsl $NETLIBS"]))
745
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
746
[NETLIBS="-lsocket $NETLIBS"]))
752
_cppflags="${CPPFLAGS}"
753
_ldflags="${LDFLAGS}"
755
AC_HELP_STRING([--with-adns=DIR],
756
[look for the adns library in DIR]),
757
[if test -d "$withval"; then
758
CPPFLAGS="${CPPFLAGS} -I$withval/include"
759
LDFLAGS="${LDFLAGS} -L$withval/lib"
761
if test "$with_adns" != "no"; then
762
AC_CHECK_HEADERS(adns.h,
763
AC_CHECK_LIB(adns, adns_init,
765
[CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}]),
766
[CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}])
768
if test "$have_adns" = "yes"; then
772
# Newer adns versions feature a free function to be used under W32.
773
AC_CHECK_FUNCS(adns_free)
777
# Now try for the resolver functions so we can use DNS for SRV, PA and CERT.
779
if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
780
AC_ARG_ENABLE(dns-srv,
781
AC_HELP_STRING([--disable-dns-srv],
782
[disable the use of DNS SRV in HKP and HTTP]),
783
use_dns_srv=$enableval,use_dns_srv=yes)
786
AC_ARG_ENABLE(dns-pka,
787
AC_HELP_STRING([--disable-dns-pka],
788
[disable the use of PKA records in DNS]),
789
use_dns_pka=$enableval,use_dns_pka=yes)
791
AC_ARG_ENABLE(dns-cert,
792
AC_HELP_STRING([--disable-dns-cert],
793
[disable the use of CERT records in DNS]),
794
use_dns_cert=$enableval,use_dns_cert=yes)
796
if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes \
797
|| test x"$use_dns_cert" = xyes; then
800
# the double underscore thing is a glibc-ism?
801
AC_SEARCH_LIBS(res_query,resolv bind,,
802
AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
803
AC_SEARCH_LIBS(dn_expand,resolv bind,,
804
AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
805
AC_SEARCH_LIBS(dn_skipname,resolv bind,,
806
AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
808
if test x"$have_resolver" != xno ; then
810
# Make sure that the BIND 4 resolver interface is workable before
811
# enabling any code that calls it. At some point I'll rewrite the
812
# code to use the BIND 8 resolver API.
813
# We might also want to use adns instead. Problem with ADNS is that
814
# it does not support v6.
816
AC_MSG_CHECKING([whether the resolver is usable])
817
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
818
#include <netinet/in.h>
819
#include <arpa/nameser.h>
820
#include <resolv.h>],
821
[[unsigned char answer[PACKETSZ];
822
res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
824
dn_expand(0,0,0,0,0);
825
]])],have_resolver=yes,have_resolver=no)
826
AC_MSG_RESULT($have_resolver)
828
# This is Apple-specific and somewhat bizarre as they changed the
829
# define in bind 8 for some reason.
831
if test x"$have_resolver" != xyes ; then
833
[whether I can make the resolver usable with BIND_8_COMPAT])
834
AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
835
#include <sys/types.h>
836
#include <netinet/in.h>
837
#include <arpa/nameser.h>
838
#include <resolv.h>],
839
[[unsigned char answer[PACKETSZ];
840
res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
841
dn_skipname(0,0); dn_expand(0,0,0,0,0);
842
]])],[have_resolver=yes ; need_compat=yes])
843
AC_MSG_RESULT($have_resolver)
847
if test x"$have_resolver" = xyes ; then
850
if test x"$use_dns_srv" = xyes ; then
851
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
854
if test x"$use_dns_pka" = xyes ; then
855
AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
858
if test x"$use_dns_cert" = xyes ; then
859
AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
862
if test x"$need_compat" = xyes ; then
863
AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
866
# If we have no resolver library but ADNS (e.g. under W32) enable the
867
# code parts which can be used with ADNS.
868
if test x"$have_adns" = xyes ; then
870
AC_DEFINE(USE_ADNS,1,[Use ADNS as resolver library.])
872
if test x"$use_dns_srv" = xyes ; then
873
AC_DEFINE(USE_DNS_SRV,1)
876
if test x"$use_dns_pka" = xyes ; then
877
AC_DEFINE(USE_DNS_PKA,1)
880
if test x"$use_dns_cert" = xyes ; then
881
AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
895
AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
901
if test "$try_ldap" = yes ; then
902
GNUPG_CHECK_LDAP($NETLIBS)
906
# Check for curl. We fake the curl API if libcurl isn't installed.
907
# We require 7.10 or later as we use curl_version_info().
909
LIBCURL_CHECK_CONFIG([yes],[7.10],,[fake_curl=yes])
910
AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
912
# Generic, for us, means curl
914
if test x"$try_generic" = xyes ; then
915
AC_SUBST(GPGKEYS_CURL,"gpg2keys_curl$EXEEXT")
921
# This isn't necessarily sendmail itself, but anything that gives a
922
# sendmail-ish interface to the outside world. That includes Exim,
923
# Postfix, etc. Basically, anything that can handle "sendmail -t".
924
if test "$try_mailto" = yes ; then
925
AC_ARG_WITH(mailprog,
926
AC_HELP_STRING([--with-mailprog=NAME],
927
[use "NAME -t" for mail transport]),
930
if test x"$with_mailprog" = xyes ; then
931
AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
932
if test "$ac_cv_path_SENDMAIL" ; then
933
GPGKEYS_MAILTO="gpg2keys_mailto"
935
elif test x"$with_mailprog" != xno ; then
936
AC_MSG_CHECKING([for a mail transport program])
937
AC_SUBST(SENDMAIL,$with_mailprog)
938
AC_MSG_RESULT($with_mailprog)
939
GPGKEYS_MAILTO="gpg2keys_mailto"
943
AC_SUBST(GPGKEYS_MAILTO)
946
# Construct a printable name of the OS
950
PRINTABLE_OS_NAME="MingW32"
953
PRINTABLE_OS_NAME="Cygwin"
955
i?86-emx-os2 | i?86-*-os2*emx )
956
PRINTABLE_OS_NAME="OS/2"
959
PRINTABLE_OS_NAME="MSDOS/DJGPP"
963
PRINTABLE_OS_NAME="GNU/Linux"
966
PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
969
AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
970
[A human readable text with the name of the OS])
982
# This is "GNU gnupg" - The project-id script from gettext
985
AC_MSG_NOTICE([checking for gettext])
987
AM_GNU_GETTEXT_VERSION([0.17])
988
if test "$try_gettext" = yes; then
989
AM_GNU_GETTEXT([external],[need-ngettext])
991
# gettext requires some extra checks. These really should be part of
992
# the basic AM_GNU_GETTEXT macro. TODO: move other gettext-specific
993
# function checks to here.
995
AC_CHECK_FUNCS(strchr)
998
USE_INCLUDED_LIBINTL=no
999
BUILD_INCLUDED_LIBINTL=no
1002
AC_SUBST(USE_INCLUDED_LIBINTL)
1003
AC_SUBST(BUILD_INCLUDED_LIBINTL)
1007
# We use HAVE_LANGINFO_CODESET in a couple of places.
1010
# Checks required for our use locales
1017
if test "$selinux_support" = yes ; then
1018
AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support])
1023
# Checks for header files.
1025
AC_MSG_NOTICE([checking for header files])
1027
AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h])
1028
AC_CHECK_HEADERS([pty.h pwd.h inttypes.h])
1033
# Checks for typedefs, structures, and compiler characteristics.
1035
AC_MSG_NOTICE([checking for system characteristics])
1044
gl_HEADER_SYS_SOCKET
1047
AC_ARG_ENABLE(endian-check,
1048
AC_HELP_STRING([--disable-endian-check],
1049
[disable the endian check and trust the OS provided macros]),
1050
endiancheck=$enableval,endiancheck=yes)
1052
if test x"$endiancheck" = xyes ; then
1056
# fixme: we should get rid of the byte type
1057
GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
1058
GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
1059
GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
1060
GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
1061
GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
1063
AC_CHECK_SIZEOF(unsigned short)
1064
AC_CHECK_SIZEOF(unsigned int)
1065
AC_CHECK_SIZEOF(unsigned long)
1066
AC_CHECK_SIZEOF(unsigned long long)
1067
AC_CHECK_SIZEOF(time_t,,[[
1069
#if TIME_WITH_SYS_TIME
1070
# include <sys/time.h>
1073
# if HAVE_SYS_TIME_H
1074
# include <sys/time.h>
1082
# Ensure that we have UINT64_C before we bother to check for uint64_t
1083
# Fixme: really needed in gnupg? I think it is only useful in libcgrypt.
1084
AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works],
1085
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>
1086
uint64_t foo=UINT64_C(42);]),
1087
gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
1088
if test "$gnupg_cv_uint64_c_works" = "yes" ; then
1089
AC_CHECK_SIZEOF(uint64_t)
1092
if test "$ac_cv_sizeof_unsigned_short" = "0" \
1093
|| test "$ac_cv_sizeof_unsigned_int" = "0" \
1094
|| test "$ac_cv_sizeof_unsigned_long" = "0"; then
1095
AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
1100
# Checks for library functions.
1102
AC_MSG_NOTICE([checking for library functions])
1103
AC_CHECK_DECLS(getpagesize)
1107
AC_CHECK_FUNCS([strerror strlwr tcgetattr mmap])
1108
AC_CHECK_FUNCS([strcasecmp strncasecmp ctermid times gmtime_r])
1109
AC_CHECK_FUNCS([unsetenv fcntl ftruncate])
1110
AC_CHECK_FUNCS([gettimeofday getrusage getrlimit setrlimit clock_gettime])
1111
AC_CHECK_FUNCS([atexit raise getpagesize strftime nl_langinfo setlocale])
1112
AC_CHECK_FUNCS([waitpid wait4 sigaction sigprocmask pipe stat getaddrinfo])
1113
AC_CHECK_FUNCS([ttyname rand ftello fsync stat])
1115
AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
1118
# These are needed by libjnlib - fixme: we should use a jnlib.m4
1119
# Note: We already checked pwd.h.
1120
AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol])
1121
AC_CHECK_FUNCS([memrchr isascii timegm getrusage setrlimit stat setlocale])
1122
AC_CHECK_FUNCS([flockfile funlockfile fopencookie funopen getpwnam getpwuid])
1127
gl_SOURCE_BASE([gl])
1129
gl_MODULES([setenv mkdtemp xsize strpbrk])
1136
GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
1139
# Sanity check regex. Tests adapted from mutt.
1141
AC_MSG_CHECKING([whether regular expression support is requested])
1142
AC_ARG_ENABLE(regex,
1143
AC_HELP_STRING([--disable-regex],
1144
[do not handle regular expressions in trust signatures]),
1145
use_regex=$enableval, use_regex=yes)
1146
AC_MSG_RESULT($use_regex)
1148
if test "$use_regex" = yes ; then
1149
_cppflags="${CPPFLAGS}"
1150
_ldflags="${LDFLAGS}"
1152
AC_HELP_STRING([--with-regex=DIR],[look for regex in DIR]),
1154
if test -d "$withval" ; then
1155
CPPFLAGS="${CPPFLAGS} -I$withval/include"
1156
LDFLAGS="${LDFLAGS} -L$withval/lib"
1160
# Does the system have regex functions at all?
1161
AC_SEARCH_LIBS([regcomp], [regex])
1162
AC_CHECK_FUNC(regcomp, gnupg_cv_have_regex=yes, gnupg_cv_have_regex=no)
1164
if test $gnupg_cv_have_regex = no; then
1167
if test x"$cross_compiling" = xyes; then
1168
AC_MSG_WARN([cross compiling; assuming regexp libray is not broken])
1170
AC_CACHE_CHECK([whether your system's regexp library is broken],
1171
[gnupg_cv_regex_broken],
1175
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); }],
1176
gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
1178
if test $gnupg_cv_regex_broken = yes; then
1179
AC_MSG_WARN([your regex is broken - disabling regex use])
1184
CPPFLAGS="${_cppflags}"
1185
LDFLAGS="${_ldflags}"
1188
if test "$use_regex" != yes ; then
1189
AC_DEFINE(DISABLE_REGEX,1, [Define to disable regular expression support])
1191
AM_CONDITIONAL(DISABLE_REGEX, test x"$use_regex" != xyes)
1196
# Do we have zlib? Must do it here because Solaris failed
1197
# when compiling a conftest (due to the "-lz" from LIBS).
1198
# Note that we combine zlib and bzlib2 in ZLIBS.
1200
_cppflags="${CPPFLAGS}"
1201
_ldflags="${LDFLAGS}"
1203
[ --with-zlib=DIR use libz in DIR],[
1204
if test -d "$withval"; then
1205
CPPFLAGS="${CPPFLAGS} -I$withval/include"
1206
LDFLAGS="${LDFLAGS} -L$withval/lib"
1210
AC_CHECK_HEADER(zlib.h,
1211
AC_CHECK_LIB(z, deflateInit2_,
1213
CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1214
CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
1217
# Check whether we can support bzip2
1219
if test "$use_bzip2" = yes ; then
1220
_cppflags="${CPPFLAGS}"
1221
_ldflags="${LDFLAGS}"
1223
AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
1225
if test -d "$withval" ; then
1226
CPPFLAGS="${CPPFLAGS} -I$withval/include"
1227
LDFLAGS="${LDFLAGS} -L$withval/lib"
1231
# Checking alongside stdio.h as an early version of bzip2 (1.0)
1232
# required stdio.h to be included before bzlib.h, and Solaris 9 is
1233
# woefully out of date.
1234
if test "$withval" != no ; then
1235
AC_CHECK_HEADER(bzlib.h,
1236
AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
1239
ZLIBS="$ZLIBS -lbz2"
1240
AC_DEFINE(HAVE_BZIP2,1,
1241
[Defined if the bz2 compression library is available])
1243
CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
1244
CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>])
1247
AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
1251
# Check for readline support
1252
GNUPG_CHECK_READLINE
1255
# Allow users to append something to the version string without
1256
# flagging it as development version. The user version parts is
1257
# considered everything after a dash.
1259
if test "$development_version" != yes; then
1263
if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
1264
development_version=yes
1267
if test "$development_version" = yes; then
1268
AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
1269
[Defined if this is not a regular release])
1272
AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
1276
# Add some extra libs here so that previous tests don't fail for
1277
# mysterious reasons - the final link step should bail out.
1278
# W32SOCKLIBS is also defined so that if can be used for tools not
1279
# requiring any network stuff but linking to code in libcommon which
1280
# tracks in winsock stuff (e.g. init_common_subsystems.
1281
if test "$have_w32_system" = yes; then
1282
W32SOCKLIBS="-lws2_32"
1283
NETLIBS="${NETLIBS} ${W32SOCKLIBS}"
1287
AC_SUBST(W32SOCKLIBS)
1290
# Setup gcc specific options
1292
AC_MSG_NOTICE([checking for cc features])
1293
if test "$GCC" = yes; then
1294
# Note that it is okay to use CFLAGS here because this are just
1295
# warning options and the user should have a chance of overriding
1297
if test "$USE_MAINTAINER_MODE" = "yes"; then
1298
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
1299
CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
1300
AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
1301
_gcc_cflags_save=$CFLAGS
1302
CFLAGS="-Wno-missing-field-initializers"
1303
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
1304
AC_MSG_RESULT($_gcc_wopt)
1305
CFLAGS=$_gcc_cflags_save;
1306
if test x"$_gcc_wopt" = xyes ; then
1307
CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
1309
AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
1310
_gcc_cflags_save=$CFLAGS
1311
CFLAGS="-Wdeclaration-after-statement"
1312
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
1313
AC_MSG_RESULT($_gcc_wopt)
1314
CFLAGS=$_gcc_cflags_save;
1315
if test x"$_gcc_wopt" = xyes ; then
1316
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
1319
CFLAGS="$CFLAGS -Wall"
1322
AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
1323
_gcc_cflags_save=$CFLAGS
1324
CFLAGS="-Wno-pointer-sign"
1325
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1326
AC_MSG_RESULT($_gcc_psign)
1327
CFLAGS=$_gcc_cflags_save;
1328
if test x"$_gcc_psign" = xyes ; then
1329
CFLAGS="$CFLAGS -Wno-pointer-sign"
1332
AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
1333
_gcc_cflags_save=$CFLAGS
1334
CFLAGS="-Wpointer-arith"
1335
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1336
AC_MSG_RESULT($_gcc_psign)
1337
CFLAGS=$_gcc_cflags_save;
1338
if test x"$_gcc_psign" = xyes ; then
1339
CFLAGS="$CFLAGS -Wpointer-arith"
1345
# This is handy for debugging so the compiler doesn't rearrange
1346
# things and eliminate variables.
1348
AC_ARG_ENABLE(optimization,
1349
AC_HELP_STRING([--disable-optimization],
1350
[disable compiler optimization]),
1351
[if test $enableval = no ; then
1352
CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
1356
# Prepare building of estream
1362
# Decide what to build
1364
if test "$have_adns" = "yes"; then
1365
AC_SUBST(GPGKEYS_KDNS, "gpg2keys_kdns$EXEEXT")
1370
if test $have_ksba = no; then
1375
build_agent_threaded=""
1376
if test "$build_agent" = "yes"; then
1377
if test $have_pth = no; then
1378
build_agent_threaded="(not multi-threaded)"
1383
build_scdaemon_extra=""
1384
if test "$build_scdaemon" = "yes"; then
1386
if test $have_pth = no; then
1387
build_scdaemon_extra="not multi-threaded"
1391
if test $have_libusb = no; then
1392
build_scdaemon_extra="${tmp}without internal CCID driver"
1395
if test -n "$build_scdaemon_extra"; then
1396
build_scdaemon_extra="(${build_scdaemon_extra})"
1401
if test "$build_agent_only" = "yes" ; then
1410
AM_CONDITIONAL(BUILD_GPG, test "$build_gpg" = "yes")
1411
AM_CONDITIONAL(BUILD_GPGSM, test "$build_gpgsm" = "yes")
1412
AM_CONDITIONAL(BUILD_AGENT, test "$build_agent" = "yes")
1413
AM_CONDITIONAL(BUILD_SCDAEMON, test "$build_scdaemon" = "yes")
1414
AM_CONDITIONAL(BUILD_TOOLS, test "$build_tools" = "yes")
1415
AM_CONDITIONAL(BUILD_DOC, test "$build_doc" = "yes")
1416
AM_CONDITIONAL(BUILD_SYMCRYPTRUN, test "$build_symcryptrun" = "yes")
1417
AM_CONDITIONAL(BUILD_GPGTAR, test "$build_gpgtar" = "yes")
1419
AM_CONDITIONAL(RUN_GPG_TESTS,
1420
test x$cross_compiling = xno -a "$build_gpg" = yes )
1424
# Print errors here so that they are visible all
1425
# together and the user can acquire them all together.
1428
if test "$have_gpg_error" = "no"; then
1432
*** You need libgpg-error to build this program.
1433
** This library is for example available at
1434
*** ftp://ftp.gnupg.org/gcrypt/libgpg-error
1435
*** (at least version $NEED_GPG_ERROR_VERSION is required.)
1438
if test "$have_libgcrypt" = "no"; then
1442
*** You need libgcrypt to build this program.
1443
** This library is for example available at
1444
*** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
1445
*** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)
1448
if test "$have_libassuan" = "no"; then
1452
*** You need libassuan to build this program.
1453
*** This library is for example available at
1454
*** ftp://ftp.gnupg.org/gcrypt/libassuan/
1455
*** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required).
1458
if test "$have_ksba" = "no"; then
1461
*** You need libksba to build this program.
1462
*** This library is for example available at
1463
*** ftp://ftp.gnupg.org/gcrypt/libksba/
1464
*** (at least version $NEED_KSBA_VERSION using API $NEED_KSBA_API is required).
1467
if test "$missing_pth" = "yes"; then
1470
*** It is now required to build with support for the
1471
*** GNU Portable Threads Library (Pth). Please install this
1472
*** library first. The library is for example available at
1473
*** ftp://ftp.gnu.org/gnu/pth/
1474
*** On a Debian GNU/Linux system you can install it using
1475
*** apt-get install libpth-dev
1476
*** To build GnuPG for Windows you need to use the W32PTH
1477
*** package; available at:
1478
*** ftp://ftp.g10code.com/g10code/w32pth/
1483
if test "$die" = "yes"; then
1486
*** Required libraries not found. Please consult the above messages
1487
*** and install them before running configure again.
1493
AC_CONFIG_FILES([ m4/Makefile
1506
keyserver/gpg2keys_mailto
1507
keyserver/gpg2keys_test
1512
tests/openpgp/Makefile
1513
tests/pkits/Makefile
1519
GnuPG v${VERSION} has been configured as follows:
1521
Platform: $PRINTABLE_OS_NAME ($host)
1524
S/MIME: $build_gpgsm
1525
Agent: $build_agent $build_agent_threaded
1526
Smartcard: $build_scdaemon $build_scdaemon_extra
1527
Gpgtar: $build_gpgtar
1529
Protect tool: $show_gnupg_protect_tool_pgm
1530
Default agent: $show_gnupg_agent_pgm
1531
Default pinentry: $show_gnupg_pinentry_pgm
1532
Default scdaemon: $show_gnupg_scdaemon_pgm
1533
Default dirmngr: $show_gnupg_dirmngr_pgm
1535
if test x"$use_regex" != xyes ; then
1537
Warning: No regular expression support available.
1538
OpenPGP trust signatures won't work.
1539
gpg-check-pattern will not be build.