~ubuntu-branches/ubuntu/oneiric/gnupg2/oneiric-updates

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# configure.ac - for GnuPG 1.9
2
 
# Copyright (C) 1998, 1999, 2000, 2001, 2002,
3
 
#               2003, 2004, 2005 Free Software Foundation, Inc.
 
1
# configure.ac - for GnuPG 2.0
 
2
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 
3
#               2006, 2007 Free Software Foundation, Inc.
4
4
5
5
# This file is part of GnuPG.
6
6
7
7
# GnuPG is free software; you can redistribute it and/or modify
8
8
# it under the terms of the GNU General Public License as published by
9
 
# the Free Software Foundation; either version 2 of the License, or
 
9
# the Free Software Foundation; either version 3 of the License, or
10
10
# (at your option) any later version.
11
11
12
12
# GnuPG is distributed in the hope that it will be useful,
15
15
# GNU General Public License for more details.
16
16
17
17
# You should have received a copy of the GNU General Public License
18
 
# along with this program; if not, write to the Free Software
19
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
20
19
 
21
20
# Process this file with autoconf to produce a configure script.
22
 
AC_PREREQ(2.52)
23
 
min_automake_version="1.9.3"
 
21
AC_PREREQ(2.61)
 
22
min_automake_version="1.10"
24
23
 
25
24
# Remember to change the version number immediately *after* a release.
26
 
# Uncomment the my_iscvs macro for non-released code.
27
 
m4_define(my_version, [1.9.20])
28
 
#m4_define(my_iscvs, yes)
29
 
AC_INIT([gnupg], my_version[]m4_ifdef([my_iscvs], [-cvs[]m4_translit(
30
 
                 [$Revision$],[Ra-z $:])]), [gnupg-devel@gnupg.org])
 
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.9])
 
28
m4_define([my_issvn], [no])
 
29
 
 
30
 
 
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;}')]))
 
33
AC_INIT([gnupg], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
 
34
        [bug-gnupg@gnupg.org])
31
35
# Set development_version to yes if the minor number is odd or you
32
36
# feel that the default check for a development version is not
33
37
# sufficient.
34
 
development_version=yes
35
 
NEED_GPG_ERROR_VERSION=1.0
 
38
development_version=no
 
39
 
 
40
NEED_GPG_ERROR_VERSION=1.4
36
41
 
37
42
NEED_LIBGCRYPT_API=1
38
 
NEED_LIBGCRYPT_VERSION=1.1.94
39
 
 
40
 
NEED_LIBASSUAN_VERSION=0.6.10
41
 
 
42
 
NEED_KSBA_VERSION=0.9.13
 
43
NEED_LIBGCRYPT_VERSION=1.2.2
 
44
 
 
45
NEED_LIBASSUAN_API=1
 
46
NEED_LIBASSUAN_VERSION=1.0.4
 
47
 
 
48
NEED_KSBA_API=1
 
49
NEED_KSBA_VERSION=1.0.2
43
50
 
44
51
 
45
52
PACKAGE=$PACKAGE_NAME
49
56
AC_CONFIG_AUX_DIR(scripts)
50
57
AC_CONFIG_SRCDIR(sm/gpgsm.c)
51
58
AM_CONFIG_HEADER(config.h)
52
 
AC_CANONICAL_TARGET()
53
59
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
 
60
AC_CANONICAL_HOST
 
61
AB_INIT
54
62
 
55
63
AC_GNU_SOURCE
56
64
 
57
 
# Some status variables to give feedback at the end of a configure run
 
65
# Some status variables.
58
66
have_gpg_error=no
59
67
have_libgcrypt=no 
60
68
have_libassuan=no
61
69
have_ksba=no
62
70
have_pth=no
63
 
 
64
 
GNUPG_BUILD_PROGRAM(gpg, no)
 
71
have_libusb=no
 
72
 
 
73
use_bzip2=yes
 
74
use_exec=yes
 
75
disable_keyserver_path=no
 
76
use_camellia=no
 
77
 
 
78
 
 
79
GNUPG_BUILD_PROGRAM(gpg, yes)
65
80
GNUPG_BUILD_PROGRAM(gpgsm, yes)
66
81
GNUPG_BUILD_PROGRAM(agent, yes)
67
82
GNUPG_BUILD_PROGRAM(scdaemon, yes)
 
83
GNUPG_BUILD_PROGRAM(tools, yes)
 
84
GNUPG_BUILD_PROGRAM(doc, yes)
68
85
GNUPG_BUILD_PROGRAM(symcryptrun, no)
69
86
 
70
 
 
71
87
AC_SUBST(PACKAGE)
72
88
AC_SUBST(PACKAGE_GT)
73
89
AC_SUBST(VERSION)
133
149
      && show_gnupg_protect_tool_pgm="$GNUPG_PROTECT_TOOL_PGM"
134
150
 
135
151
 
136
 
 
137
 
# Some folks want to use only the agent form this packet.  Make it
 
152
# Some folks want to use only the agent from this packet.  Make it
138
153
# easier for them by providing the configure option
139
154
# --enable-only-agent.
140
155
AC_ARG_ENABLE(agent-only,
141
156
    AC_HELP_STRING([--enable-agent-only],[build only the gpg-agent]),
142
157
    build_agent_only=$enableval)
143
158
 
 
159
# SELinux support includes tracking of sensitive files to avoid
 
160
# leaking their contents through processing these files by gpg itself
 
161
AC_MSG_CHECKING([whether SELinux support is requested])
 
162
AC_ARG_ENABLE(selinux-support,
 
163
              AC_HELP_STRING([--enable-selinux-support],
 
164
                             [enable SELinux support]),
 
165
              selinux_support=$enableval, selinux_support=no)
 
166
AC_MSG_RESULT($selinux_support)
 
167
 
 
168
# Allow disabling of bzib2 support.
 
169
# It is defined only after we confirm the library is available later
 
170
AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
 
171
AC_ARG_ENABLE(bzip2,
 
172
   AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
 
173
   use_bzip2=$enableval)
 
174
AC_MSG_RESULT($use_bzip2)
 
175
 
 
176
# Check whether testing support for Camellia has been requested
 
177
AC_MSG_CHECKING([whether to enable the CAMELLIA cipher for gpg])
 
178
AC_ARG_ENABLE(camellia,
 
179
   AC_HELP_STRING([--enable-camellia],[enable the CAMELLIA cipher for gpg]),
 
180
   use_camellia=$enableval)
 
181
AC_MSG_RESULT($use_camellia)
 
182
if test x"$use_camellia" = xyes ; then
 
183
   AC_DEFINE(USE_CAMELLIA,1,[Define to include the CAMELLIA cipher into gpg])
 
184
   AC_MSG_WARN([[
 
185
***
 
186
*** The Camellia cipher for gpg is for testing only and 
 
187
*** is NOT for production use!
 
188
***]])
 
189
fi
 
190
 
144
191
 
145
192
# Configure option to allow or disallow execution of external
146
193
# programs, like a photo viewer.
187
234
  AC_MSG_RESULT($enableval)
188
235
 
189
236
  if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
 
237
    # LDAP is defined only after we confirm the library is available later
190
238
    AC_MSG_CHECKING([whether LDAP keyserver support is requested])
191
239
    AC_ARG_ENABLE(ldap,
192
 
    [  --disable-ldap          disable LDAP keyserver interface],
193
 
        try_ldap=$enableval, try_ldap=yes)
 
240
      AC_HELP_STRING([--disable-ldap],[disable LDAP keyserver interface only]),
 
241
      try_ldap=$enableval, try_ldap=yes)
194
242
    AC_MSG_RESULT($try_ldap)
195
243
 
196
244
    AC_MSG_CHECKING([whether HKP keyserver support is requested])
197
245
    AC_ARG_ENABLE(hkp,
198
 
    [  --disable-hkp           disable HKP keyserver interface],
199
 
        try_hkp=$enableval, try_hkp=yes)
 
246
      AC_HELP_STRING([--disable-hkp],[disable HKP keyserver interface only]),
 
247
      try_hkp=$enableval, try_hkp=yes)
200
248
    AC_MSG_RESULT($try_hkp)
201
249
 
202
 
    if test "$try_hkp" = yes ; then
203
 
      AC_SUBST(GPGKEYS_HKP,"gpgkeys_hkp$EXEEXT")
204
 
    fi
 
250
    AC_MSG_CHECKING([whether finger key fetching support is requested])
 
251
    AC_ARG_ENABLE(finger,
 
252
      AC_HELP_STRING([--disable-finger],
 
253
        [disable finger key fetching interface only]),
 
254
      try_finger=$enableval, try_finger=yes)
 
255
    AC_MSG_RESULT($try_finger)
 
256
 
 
257
    AC_MSG_CHECKING([whether generic object key fetching support is requested])
 
258
    AC_ARG_ENABLE(generic,
 
259
      AC_HELP_STRING([--disable-generic],
 
260
        [disable generic object key fetching interface only]),
 
261
      try_generic=$enableval, try_generic=yes)
 
262
    AC_MSG_RESULT($try_generic)
205
263
 
206
264
    AC_MSG_CHECKING([whether email keyserver support is requested])
207
265
    AC_ARG_ENABLE(mailto,
208
 
    [  --disable-mailto        disable email keyserver interface],
209
 
        try_mailto=$enableval, try_mailto=yes)
 
266
      AC_HELP_STRING([--enable-mailto],
 
267
        [enable email keyserver interface only]),
 
268
      try_mailto=$enableval, try_mailto=no)
210
269
    AC_MSG_RESULT($try_mailto)
211
270
    fi
212
271
 
213
272
    AC_MSG_CHECKING([whether keyserver exec-path is enabled])
214
273
    AC_ARG_ENABLE(keyserver-path,
215
 
        [  --disable-keyserver-path disable the exec-path option for keyserver helpers],
216
 
        [if test "$enableval" = no ; then
217
 
         AC_DEFINE(DISABLE_KEYSERVER_PATH,1,[define to disable exec-path for keyserver helpers])
218
 
        fi],enableval=yes)
 
274
      AC_HELP_STRING([--disable-keyserver-path],
 
275
        [disable the exec-path option for keyserver helpers]),
 
276
      [if test "$enableval" = no ; then
 
277
         disable_keyserver_path=yes
 
278
      fi],enableval=yes)
219
279
    AC_MSG_RESULT($enableval)
220
280
  fi
221
281
 
222
 
dnl
223
 
dnl Check whether we want to use Linux capabilities
224
 
dnl
 
282
 
 
283
#
 
284
# Check for the key/uid cache size.  This can't be zero, but can be
 
285
# pretty small on embedded systems.  This is used for the gpg part.
 
286
#
 
287
AC_MSG_CHECKING([for the size of the key and uid cache])
 
288
AC_ARG_ENABLE(key-cache,
 
289
        AC_HELP_STRING([--enable-key-cache=SIZE],
 
290
                       [Set key cache to SIZE (default 4096)]),,enableval=4096)
 
291
if test "$enableval" = "no"; then
 
292
   enableval=5
 
293
elif test "$enableval" = "yes" || test "$enableval" = ""; then
 
294
   enableval=4096
 
295
fi
 
296
changequote(,)dnl
 
297
key_cache_size=`echo "$enableval" | sed 's/[A-Za-z]//g'`
 
298
changequote([,])dnl
 
299
if test "$enableval" != "$key_cache_size" || test "$key_cache_size" -lt 5; then
 
300
   AC_MSG_ERROR([invalid key-cache size])
 
301
fi
 
302
AC_MSG_RESULT($key_cache_size)
 
303
AC_DEFINE_UNQUOTED(PK_UID_CACHE_SIZE,$key_cache_size,
 
304
                  [Size of the key and UID caches])
 
305
 
 
306
 
 
307
 
 
308
#
 
309
# Check whether we want to use Linux capabilities
 
310
#
225
311
AC_MSG_CHECKING([whether use of capabilities is requested])
226
312
AC_ARG_WITH(capabilities,
227
313
    [  --with-capabilities     use linux capabilities [default=no]],
228
314
[use_capabilities="$withval"],[use_capabilities=no])
229
315
AC_MSG_RESULT($use_capabilities)
230
316
 
 
317
#
 
318
# To avoid double inclusion of config.h which might happen at some
 
319
# places, we add the usual double inclusion protection at the top of
 
320
# config.h.
 
321
#
 
322
AH_TOP([
 
323
#ifndef GNUPG_CONFIG_H_INCLUDED
 
324
#define GNUPG_CONFIG_H_INCLUDED
 
325
])
231
326
 
 
327
#
 
328
# Stuff which goes at the bottom of config.h.
 
329
#
232
330
AH_BOTTOM([
233
 
/* Some global constants. */
234
 
#ifdef HAVE_DRIVE_LETTERS
235
 
#define GNUPG_DEFAULT_HOMEDIR "c:/gnupg"
236
 
#elif defined(__VMS)
237
 
#define GNUPG_DEFAULT_HOMEDIR "/SYS\$LOGIN/gnupg" 
238
 
#else
239
 
#define GNUPG_DEFAULT_HOMEDIR "~/.gnupg"
240
 
#endif 
241
 
#define GNUPG_PRIVATE_KEYS_DIR "private-keys-v1.d"
242
 
 
243
 
/* Tell libgcrypt not to use its own libgpg-error implementation. */
244
 
#define USE_LIBGPG_ERROR 1
245
 
 
246
331
/* This is the major version number of GnuPG so that
247
 
   source included files can test for this.  Note, that\
 
332
   source included files can test for this.  Note, that
248
333
   we use 2 here even for GnuPG 1.9.x. */
249
334
#define GNUPG_MAJOR_VERSION 2
250
335
 
277
362
#define SAFE_VERSION_DOT  '.'
278
363
#define SAFE_VERSION_DASH '-'
279
364
 
 
365
/* Some global constants. */
 
366
#ifdef HAVE_DRIVE_LETTERS
 
367
#define GNUPG_DEFAULT_HOMEDIR "c:/gnupg"
 
368
#elif defined(__VMS)
 
369
#define GNUPG_DEFAULT_HOMEDIR "/SYS\$LOGIN/gnupg" 
 
370
#else
 
371
#define GNUPG_DEFAULT_HOMEDIR "~/.gnupg"
 
372
#endif 
 
373
#define GNUPG_PRIVATE_KEYS_DIR "private-keys-v1.d"
 
374
 
280
375
/* For some systems (DOS currently), we hardcode the path here.  For
281
376
   POSIX systems the values are constructed by the Makefiles, so that
282
377
   the values may be overridden by the make invocations; this is to
283
378
   comply with the GNU coding standards. */
284
379
#ifdef HAVE_DRIVE_LETTERS
 
380
 /* FIXME: We need to use a function to determine these values depending 
 
381
    on the actual installation directory. */
285
382
#define GNUPG_BINDIR      "c:\\gnupg"
286
383
#define GNUPG_LIBEXECDIR  "c:\\gnupg"
287
384
#define GNUPG_LIBDIR      "c:\\gnupg"
288
385
#define GNUPG_DATADIR     "c:\\gnupg"
289
 
#endif
290
 
 
291
 
/* Setup the hardwired names of modules. */
292
 
#ifndef GNUPG_DEFAULT_AGENT
293
 
#define GNUPG_DEFAULT_AGENT    ( GNUPG_BINDIR DIRSEP_S "gpg-agent" EXEEXT_S )
294
 
#endif
295
 
#ifndef GNUPG_DEFAULT_PINENTRY
296
 
#define GNUPG_DEFAULT_PINENTRY ( GNUPG_BINDIR DIRSEP_S "pinentry" EXEEXT_S )
297
 
#endif
298
 
#ifndef GNUPG_DEFAULT_SCDAEMON
299
 
#define GNUPG_DEFAULT_SCDAEMON ( GNUPG_BINDIR DIRSEP_S "scdaemon" EXEEXT_S )
300
 
#endif
301
 
#ifndef GNUPG_DEFAULT_DIRMNGR
302
 
#define GNUPG_DEFAULT_DIRMNGR  ( GNUPG_BINDIR DIRSEP_S "dirmngr" EXEEXT_S )
303
 
#endif
304
 
#ifndef GNUPG_DEFAULT_PROTECT_TOOL
305
 
#define GNUPG_DEFAULT_PROTECT_TOOL \
306
 
                    ( GNUPG_LIBEXECDIR DIRSEP_S "gpg-protect-tool" EXEEXT_S )
307
 
#endif
308
 
 
 
386
#define GNUPG_SYSCONFDIR  "c:\\gnupg"
 
387
#endif
309
388
 
310
389
/* Derive some other constants. */
311
390
#if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
312
391
#define EXEC_TEMPFILE_ONLY
313
392
#endif
314
393
 
315
 
/* Temporary hacks to avoid requring a libgpg-error update. */
316
 
#if !HAVE_DECL_GPG_ERR_LOCKED
317
 
#define GPG_ERR_LOCKED  173
318
 
#endif
319
 
 
 
394
 
 
395
/* We didn't define endianness above, so get it from OS macros.  This
 
396
   is intended for making fat binary builds on OS X. */
 
397
#if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
 
398
#if defined(__BIG_ENDIAN__)
 
399
#define BIG_ENDIAN_HOST 1
 
400
#elif defined(__LITTLE_ENDIAN__)
 
401
#define LITTLE_ENDIAN_HOST 1
 
402
#else
 
403
#error "No endianness found"
 
404
#endif
 
405
#endif
 
406
 
 
407
 
 
408
/* Hack used for W32: ldap.m4 also tests for the ASCII version of
 
409
   ldap_start_tls_s because that is the actual symbol used in the
 
410
   library.  winldap.h redefines it to our commonly used value,
 
411
   thus we define our usual macro here.  */
 
412
#ifdef HAVE_LDAP_START_TLS_SA
 
413
# ifndef HAVE_LDAP_START_TLS_S
 
414
#  define HAVE_LDAP_START_TLS_S 1
 
415
# endif
 
416
#endif
 
417
 
 
418
 
 
419
/* Tell libgcrypt not to use its own libgpg-error implementation. */
 
420
#define USE_LIBGPG_ERROR 1
 
421
 
 
422
/* We use jnlib, so tell other modules about it.  */
 
423
#define HAVE_JNLIB_LOGGING 1
 
424
 
 
425
/* Our HTTP code is used in estream mode.  */
 
426
#define HTTP_USE_ESTREAM 1
 
427
 
 
428
/* Under W32 we do an explicit socket initialization, thus we need to
 
429
   avoid the on-demand initialization which would also install an atexit
 
430
   handler.  */
 
431
#define HTTP_NO_WSASTARTUP
 
432
 
 
433
/* We always include support for the OpenPGP card.  */
 
434
#define ENABLE_CARD_SUPPORT 1
 
435
 
 
436
/* We don't want the old assuan codes anymore. */
 
437
#define _ASSUAN_ONLY_GPG_ERRORS 1
 
438
 
 
439
/* We explicitly need to disable PTH's soft mapping as Debian
 
440
   currently enables it by default for no reason. */
 
441
#define PTH_SYSCALL_SOFT 0
 
442
 
 
443
/* We want to use the libgcrypt provided memory allocation for
 
444
   asprintf.  */
 
445
#define _ESTREAM_PRINTF_MALLOC        gcry_malloc
 
446
#define _ESTREAM_PRINTF_FREE          gcry_free
 
447
#define _ESTREAM_PRINTF_EXTRA_INCLUDE "util.h"
 
448
 
 
449
#endif /*GNUPG_CONFIG_H_INCLUDED*/
320
450
])
321
451
 
 
452
 
322
453
AM_MAINTAINER_MODE
323
454
 
324
455
# Checks for programs.
 
456
AC_MSG_NOTICE([checking for programs])
325
457
AC_PROG_MAKE_SET
326
458
AM_SANITY_CHECK
327
459
missing_dir=`cd $ac_aux_dir && pwd`
333
465
AC_PROG_AWK
334
466
AC_PROG_CC
335
467
AC_PROG_CPP
 
468
AM_PROG_CC_C_O
 
469
if test "x$ac_cv_prog_cc_c89" = "xno" ; then
 
470
  AC_MSG_ERROR([[No C-89 compiler found]])
 
471
fi
336
472
AC_PROG_INSTALL
337
473
AC_PROG_LN_S
338
 
AC_PROG_MAKE_SET
339
474
AC_PROG_RANLIB
340
475
AC_CHECK_TOOL(AR, ar, :)
341
476
AC_PATH_PROG(PERL,"perl")
 
477
AC_CHECK_TOOL(WINDRES, windres, :)
342
478
AC_ISC_POSIX
343
479
gl_EARLY
344
480
AC_SYS_LARGEFILE
345
 
AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no)
346
 
AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes)
347
481
GNUPG_CHECK_FAQPROG
348
 
GNUPG_CHECK_DOCBOOK_TO_TEXI
 
482
GNUPG_CHECK_USTAR
 
483
 
 
484
# We need to compile and run a program on the build machine.  A
 
485
# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
 
486
# the AC archive is broken for autoconf 2.57.  Given that tehre is no
 
487
# newer version of that macro, we assume that it is also broken for
 
488
# autoconf 2.61 and thus we use a simple but usually sufficient
 
489
# approach.
 
490
AC_MSG_CHECKING(for cc for build)
 
491
if test "$cross_compiling" = "yes"; then
 
492
  CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
 
493
else
 
494
  CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
 
495
fi
 
496
AC_MSG_RESULT($CC_FOR_BUILD)
 
497
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
 
498
 
349
499
 
350
500
 
351
501
try_gettext=yes
352
502
have_dosish_system=no
353
503
have_w32_system=no
 
504
use_simple_gettext=no
354
505
case "${host}" in
355
506
    *-mingw32*)
356
507
        # special stuff for Windoze NT
363
514
                  [because the Unix gettext has too much overhead on
364
515
                   MingW32 systems and these systems lack Posix functions,
365
516
                   we use a simplified version of gettext])
 
517
        disable_keyserver_path=yes
366
518
        have_dosish_system=yes
367
519
        have_w32_system=yes
368
520
        try_gettext="no"
 
521
        use_simple_gettext=yes
369
522
        ;;
370
523
    i?86-emx-os2 | i?86-*-os2*emx )
371
524
        # OS/2 with the EMX environment
403
556
        ;;
404
557
    *-dec-osf5*)
405
558
        if test -z "$GCC" ; then
406
 
            # Use the newer compiler `-msg_disable ptrmismatch' to
 
559
            # Use the newer compiler `-msg_disable ptrmismatch1' to
407
560
            # get rid of the unsigned/signed char mismatch warnings.
408
561
            # Using this may hide other pointer mismatch warnings, but
409
562
            # it at least lets other warning classes through
410
 
            CFLAGS="$CFLAGS -msg_disable ptrmismatch"
 
563
            CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
411
564
        fi
412
565
        ;;
413
566
    m68k-atari-mint)
424
577
fi
425
578
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
426
579
 
 
580
AM_CONDITIONAL(USE_SIMPLE_GETTEXT, test x"$use_simple_gettext" = xyes)
 
581
 
427
582
if test "$have_w32_system" = yes; then
428
583
   AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
429
584
fi
430
585
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
431
586
 
 
587
if test "$disable_keyserver_path" = yes; then
 
588
    AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
 
589
              [Defined to disable exec-path for keyserver helpers])
 
590
fi
 
591
 
 
592
# (These need to go after AC_PROG_CC so that $EXEEXT is defined)
 
593
AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[The executable file extension, if any])
 
594
 
 
595
if test x"$try_hkp" = xyes ; then
 
596
  AC_SUBST(GPGKEYS_HKP,"gpg2keys_hkp$EXEEXT")
 
597
fi
 
598
 
 
599
if test x"$try_finger" = xyes ; then
 
600
  AC_SUBST(GPGKEYS_FINGER,"gpg2keys_finger$EXEEXT")
 
601
fi
 
602
 
432
603
 
433
604
 
434
605
#
435
606
# Checks for libraries.
436
607
#
 
608
AC_MSG_NOTICE([checking for libraries])
437
609
 
438
610
 
439
611
#
442
614
#
443
615
AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
444
616
                  have_gpg_error=yes,have_gpg_error=no)
445
 
_tmp_gpg_error_save_cflags="$CFLAGS"
446
 
CFLAGS="$CFLAGS $GPG_ERROR_CFLAGS"
447
 
AC_CHECK_DECLS(GPG_ERR_LOCKED,,,[#include <gpg-error.h>])
448
 
CFLAGS="${_tmp_gpg_error_save_cflags}"
449
617
 
450
618
 
451
619
#
458
626
#
459
627
# libassuan is used for IPC
460
628
#
461
 
AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_VERSION",
 
629
AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
462
630
                  have_libassuan=yes,have_libassuan=no)
 
631
if test "$have_libassuan" = "yes"; then
 
632
  have_libassuan=no
 
633
  AM_PATH_LIBASSUAN_PTH("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
 
634
                        have_libassuan=yes,have_libassuan=no)
 
635
  AM_CHECK_LIBASSUAN("$NEED_LIBASSUAN_API:1.0.1",
 
636
       [AC_DEFINE(HAVE_ASSUAN_SET_IO_MONITOR, 1,
 
637
         [Define to 1 if you have the `assuan_set_io_monitor' function.])],)  
 
638
  AC_DEFINE_UNQUOTED(GNUPG_LIBASSUAN_VERSION, "$libassuan_version",
 
639
            [version of the libbassuan library])
 
640
fi
 
641
 
463
642
 
464
643
 
465
644
#
466
645
# libksba is our X.509 support library
467
646
#
468
 
AM_PATH_KSBA("$NEED_KSBA_VERSION",have_ksba=yes,have_ksba=no)
 
647
AM_PATH_KSBA("$NEED_KSBA_API:$NEED_KSBA_VERSION",have_ksba=yes,have_ksba=no)
 
648
 
469
649
 
470
650
#
471
651
# libusb allows us to use the integrated CCID smartcard reader driver.
472
652
#
 
653
# FiXME: Use GNUPG_CHECK_LIBUSB and modify to use separate AC_SUBSTs.
473
654
AC_CHECK_LIB(usb, usb_bulk_write,
474
655
              [ LIBUSB_LIBS="$LIBUSB_LIBS -lusb"
475
656
                AC_DEFINE(HAVE_LIBUSB,1,
476
657
                         [defined if libusb is available])
 
658
                have_libusb=yes
477
659
             ])
478
660
AC_SUBST(LIBUSB_LIBS)
479
661
AC_CHECK_FUNCS(usb_create_match)
481
663
#
482
664
# Check wether it is necessary to link against libdl.
483
665
#
 
666
gnupg_dlopen_save_libs="$LIBS"
484
667
LIBS=""
485
668
AC_SEARCH_LIBS(dlopen, c dl,,,)
486
669
DL_LIBS=$LIBS
487
670
AC_SUBST(DL_LIBS)
 
671
LIBS="$gnupg_dlopen_save_libs"
488
672
 
489
673
#
490
674
# Checks for symcryptrun:
504
688
        "${SHRED}", [defines the filename of the shred program])
505
689
 
506
690
 
 
691
 
507
692
#
508
 
# Check whether the (highly desirable) GNU Pth library is available
 
693
# Check whether the GNU Pth library is available
509
694
# Note, that we include a Pth emulation for W32.
510
695
#
511
 
AC_ARG_WITH(pth-prefix,
512
 
            AC_HELP_STRING([--with-pth-prefix=PFX],
513
 
                           [prefix where GNU Pth is installed (optional)]),
514
 
     pth_config_prefix="$withval", pth_config_prefix="")
515
 
if test x$pth_config_prefix != x ; then
516
 
   PTH_CONFIG="$pth_config_prefix/bin/pth-config"
517
 
fi
518
 
AC_PATH_PROG(PTH_CONFIG, pth-config, no)
519
 
if test "$have_w32_system" = no; then
520
 
 if test "$PTH_CONFIG" = "no"; then
521
 
    AC_MSG_WARN([[
 
696
GNUPG_PATH_PTH
 
697
if test "$have_pth" = "yes"; then
 
698
  AC_DEFINE(USE_GNU_PTH, 1,
 
699
              [Defined if the GNU Portable Thread Library should be used])
 
700
else
 
701
  AC_MSG_WARN([[
522
702
***
523
703
*** To support concurrent access to the gpg-agent and the SCdaemon
524
704
*** we need the support of the GNU Portable Threads Library.
526
706
*** On a Debian GNU/Linux system you might want to try 
527
707
***   apt-get install libpth-dev
528
708
***]])
529
 
 else
530
 
  GNUPG_PTH_VERSION_CHECK(1.3.7)
531
 
  if test $have_pth = yes; then      
532
 
     PTH_CFLAGS=`$PTH_CONFIG --cflags`
533
 
     PTH_LIBS=`$PTH_CONFIG --ldflags`
534
 
     PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs`"
535
 
     AC_DEFINE(USE_GNU_PTH, 1,
536
 
              [Defined if the GNU Portable Thread Library should be used])
537
 
     AC_DEFINE(HAVE_PTH, 1,
538
 
              [Defined if the GNU Pth is available])
539
 
  fi
540
 
 fi
541
 
else 
542
 
 have_pth=yes
543
 
 PTH_CFLAGS=""
544
 
 PTH_LIBS=""
545
 
 AC_DEFINE(USE_GNU_PTH, 1)
546
 
 AC_DEFINE(HAVE_PTH, 1)
547
709
fi
548
 
AC_SUBST(PTH_CFLAGS)
549
 
AC_SUBST(PTH_LIBS)
550
 
 
551
 
 
552
 
dnl Must check for network library requirements before doing link tests
553
 
dnl for ldap, for example. If ldap libs are static (or dynamic and without
554
 
dnl ELF runtime link paths), then link will fail and LDAP support won't
555
 
dnl be detected.
556
 
 
 
710
 
 
711
 
 
712
AC_MSG_NOTICE([checking for networking options])
 
713
 
 
714
#
 
715
# Must check for network library requirements before doing link tests
 
716
# for ldap, for example. If ldap libs are static (or dynamic and without
 
717
# ELF runtime link paths), then link will fail and LDAP support won't
 
718
# be detected.
 
719
#
557
720
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
558
721
        [NETLIBS="-lnsl $NETLIBS"]))
559
722
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
560
723
        [NETLIBS="-lsocket $NETLIBS"]))
561
724
 
562
 
dnl Now try for the resolver functions so we can use DNS SRV
563
 
 
564
 
AC_ARG_ENABLE(dns-srv,
565
 
   AC_HELP_STRING([--disable-dns-srv],[disable the use of DNS SRV in HKP]),
566
 
   use_dns_srv=$enableval,use_dns_srv=yes)
567
 
 
568
 
if test x"$try_hkp" = xyes && test x"$use_dns_srv" = xyes ; then
569
 
  _srv_save_libs=$LIBS
 
725
#
 
726
# Now try for the resolver functions so we can use DNS for SRV, PA and CERT.
 
727
#
 
728
if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
 
729
  AC_ARG_ENABLE(dns-srv,
 
730
     AC_HELP_STRING([--disable-dns-srv],
 
731
                    [disable the use of DNS SRV in HKP and HTTP]),
 
732
                use_dns_srv=$enableval,use_dns_srv=yes)
 
733
fi
 
734
 
 
735
AC_ARG_ENABLE(dns-pka,
 
736
   AC_HELP_STRING([--disable-dns-pka],
 
737
        [disable the use of PKA records in DNS]),
 
738
   use_dns_pka=$enableval,use_dns_pka=yes)
 
739
 
 
740
AC_ARG_ENABLE(dns-cert,
 
741
   AC_HELP_STRING([--disable-dns-cert],
 
742
        [disable the use of CERT records in DNS]),
 
743
   use_dns_cert=$enableval,use_dns_cert=yes)
 
744
 
 
745
if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes \
 
746
   || test x"$use_dns_cert" = xyes; then
 
747
  _dns_save_libs=$LIBS
570
748
  LIBS=""
571
749
  # the double underscore thing is a glibc-ism?
572
750
  AC_SEARCH_LIBS(res_query,resolv bind,,
573
 
                 AC_SEARCH_LIBS(__res_query,resolv bind,,use_dns_srv=no))
 
751
                 AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
574
752
  AC_SEARCH_LIBS(dn_expand,resolv bind,,
575
 
                 AC_SEARCH_LIBS(__dn_expand,resolv bind,,use_dns_srv=no))
 
753
                 AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
576
754
  AC_SEARCH_LIBS(dn_skipname,resolv bind,,
577
 
                 AC_SEARCH_LIBS(__dn_skipname,resolv bind,,use_dns_srv=no))
578
 
 
579
 
  if test x"$use_dns_srv" = xyes ; then
580
 
     AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
581
 
     SRVLIBS=$LIBS
 
755
                 AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
 
756
 
 
757
  if test x"$have_resolver" != xno ; then
 
758
 
 
759
    # Make sure that the BIND 4 resolver interface is workable before
 
760
    # enabling any code that calls it.  At some point I'll rewrite the
 
761
    # code to use the BIND 8 resolver API.
 
762
 
 
763
    AC_MSG_CHECKING([whether the resolver is usable])
 
764
    AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 
765
#include <netinet/in.h>
 
766
#include <arpa/nameser.h>
 
767
#include <resolv.h>],
 
768
[[unsigned char answer[PACKETSZ];
 
769
  res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
 
770
  dn_skipname(0,0); 
 
771
  dn_expand(0,0,0,0,0);
 
772
]])],have_resolver=yes,have_resolver=no)
 
773
    AC_MSG_RESULT($have_resolver)
 
774
 
 
775
    # This is Apple-specific and somewhat bizarre as they changed the
 
776
    # define in bind 8 for some reason.
 
777
 
 
778
    if test x"$have_resolver" != xyes ; then
 
779
       AC_MSG_CHECKING(
 
780
             [whether I can make the resolver usable with BIND_8_COMPAT])
 
781
       AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
 
782
#include <sys/types.h>
 
783
#include <netinet/in.h>
 
784
#include <arpa/nameser.h>
 
785
#include <resolv.h>],
 
786
[[unsigned char answer[PACKETSZ];
 
787
  res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);
 
788
  dn_skipname(0,0); dn_expand(0,0,0,0,0);
 
789
]])],[have_resolver=yes ; need_compat=yes])
 
790
       AC_MSG_RESULT($have_resolver)
 
791
    fi
 
792
  fi
 
793
 
 
794
  if test x"$have_resolver" = xyes ; then
 
795
     DNSLIBS=$LIBS
 
796
 
 
797
     if test x"$use_dns_srv" = xyes ; then
 
798
        AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
 
799
     fi
 
800
 
 
801
     if test x"$use_dns_pka" = xyes ; then
 
802
        AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
 
803
     fi
 
804
 
 
805
     if test x"$use_dns_cert" = xyes ; then
 
806
        AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
 
807
     fi
 
808
 
 
809
     if test x"$need_compat" = xyes ; then
 
810
        AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
 
811
     fi
582
812
  else
583
 
     AC_MSG_WARN([Resolver functions not found.  Disabling DNS SRV.])
 
813
     use_dns_srv=no
 
814
     use_dns_pka=no
 
815
     use_dns_cert=no
584
816
  fi
585
 
  LIBS=$_srv_save_libs
 
817
 
 
818
  LIBS=$_dns_save_libs
586
819
fi
587
820
 
588
 
AC_SUBST(SRVLIBS)
589
 
 
590
 
# Try and link a LDAP test program to weed out unusable LDAP
591
 
# libraries.  -lldap [-llber [-lresolv]] is for OpenLDAP.  OpenLDAP in
592
 
# general is terrible with creating weird dependencies.  If all else
593
 
# fails, the user can play guess-the-dependency by using something
594
 
# like ./configure LDAPLIBS="-Lfoo -lbar"
595
 
 
 
821
AC_SUBST(DNSLIBS)
 
822
 
 
823
AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
 
824
 
 
825
#
 
826
# Check for LDAP
 
827
#
596
828
if test "$try_ldap" = yes ; then
597
 
  for MY_LDAPLIBS in ${LDAPLIBS+"$LDAPLIBS"} "-lldap" "-lldap -llber" "-lldap -llber -lresolv"; do
598
 
    _ldap_save_libs=$LIBS
599
 
    LIBS="$MY_LDAPLIBS $NETLIBS $LIBS"
600
 
 
601
 
    AC_MSG_CHECKING([whether LDAP via \"$MY_LDAPLIBS\" is present and sane])
602
 
    AC_TRY_LINK([#include <ldap.h>],[ldap_open("foobar",1234);],
603
 
                [gnupg_cv_func_ldap_init=yes],[gnupg_cv_func_ldap_init=no])
604
 
    AC_MSG_RESULT([$gnupg_cv_func_ldap_init])
605
 
 
606
 
    if test $gnupg_cv_func_ldap_init = no; then
607
 
      AC_MSG_CHECKING([whether I can make LDAP be sane with lber.h])
608
 
      AC_TRY_LINK([#include <lber.h>
609
 
#include <ldap.h>],[ldap_open("foobar",1234);],
610
 
         [gnupg_cv_func_ldaplber_init=yes],[gnupg_cv_func_ldaplber_init=no])
611
 
      AC_MSG_RESULT([$gnupg_cv_func_ldaplber_init])
612
 
    fi
613
 
 
614
 
    if test "$gnupg_cv_func_ldaplber_init" = yes ; then
615
 
       AC_DEFINE(NEED_LBER_H,1,[Define if the LDAP library requires including lber.h before ldap.h])
616
 
    fi
617
 
 
618
 
    if test "$gnupg_cv_func_ldap_init" = yes || \
619
 
        test "$gnupg_cv_func_ldaplber_init" = yes ; then
620
 
       LDAPLIBS=$MY_LDAPLIBS
621
 
       GPGKEYS_LDAP="gpgkeys_ldap$EXEEXT"
622
 
 
623
 
       AC_MSG_CHECKING([whether LDAP supports ldap_get_option])
624
 
 
625
 
       if test "$gnupg_cv_func_ldap_init" = yes ; then
626
 
          AC_TRY_LINK([#include <ldap.h>],
627
 
             [ldap_get_option((void *)0,0,(void *)0);],
628
 
             [gnupg_cv_func_ldap_get_option=yes],
629
 
             [gnupg_cv_func_ldap_get_option=no])
630
 
        else
631
 
          AC_TRY_LINK([#include <lber.h>
632
 
#include <ldap.h>],[ldap_get_option((void *)0,0,(void *)0);],
633
 
             [gnupg_cv_func_ldap_get_option=yes],
634
 
             [gnupg_cv_func_ldap_get_option=no])
635
 
       fi
636
 
 
637
 
       AC_MSG_RESULT([$gnupg_cv_func_ldap_get_option])
638
 
 
639
 
       if test "$gnupg_cv_func_ldap_get_option" = yes ; then
640
 
          AC_DEFINE(HAVE_LDAP_GET_OPTION,1,[Define if the LDAP library has ldap_get_option])
641
 
       else
642
 
          AC_MSG_CHECKING([whether LDAP supports ld_errno])
643
 
 
644
 
          if test "$gnupg_cv_func_ldap_init" = yes ; then
645
 
            AC_TRY_COMPILE([#include <ldap.h>],
646
 
               [LDAP *ldap; ldap->ld_errno;],
647
 
               [gnupg_cv_func_ldap_ld_errno=yes],
648
 
               [gnupg_cv_func_ldap_ld_errno=no])
649
 
           else
650
 
            AC_TRY_LINK([#include <lber.h>
651
 
#include <ldap.h>],[LDAP *ldap; ldap->ld_errno;],
652
 
               [gnupg_cv_func_ldap_ld_errno=yes],
653
 
               [gnupg_cv_func_ldap_ld_errno=no])
654
 
          fi
655
 
 
656
 
          AC_MSG_RESULT([$gnupg_cv_func_ldap_ld_errno])
657
 
 
658
 
          if test "$gnupg_cv_func_ldap_ld_errno" = yes ; then
659
 
             AC_DEFINE(HAVE_LDAP_LD_ERRNO,1,[Define if the LDAP library supports ld_errno])
660
 
          fi
661
 
       fi
662
 
    fi
663
 
 
664
 
    LIBS=$_ldap_save_libs
665
 
 
666
 
    if test "$GPGKEYS_LDAP" != "" ; then break; fi
667
 
  done
668
 
fi
669
 
 
670
 
AC_SUBST(GPGKEYS_LDAP)
671
 
AC_SUBST(LDAPLIBS)
672
 
 
673
 
dnl This isn't necessarily sendmail itself, but anything that gives a
674
 
dnl sendmail-ish interface to the outside world.  That includes qmail,
675
 
dnl postfix, etc.  Basically, anything that can handle "sendmail -t".
676
 
 
 
829
   GNUPG_CHECK_LDAP($NETLIBS)
 
830
fi
 
831
 
 
832
#
 
833
# Check for curl.  We fake the curl API if libcurl isn't installed.
 
834
#
 
835
LIBCURL_CHECK_CONFIG([yes],,,[fake_curl=yes])
 
836
AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
 
837
 
 
838
# Generic, for us, means curl
 
839
 
 
840
if test x"$try_generic" = xyes ; then
 
841
   AC_SUBST(GPGKEYS_CURL,"gpg2keys_curl$EXEEXT")
 
842
fi
 
843
 
 
844
#
 
845
# Check for sendmail
 
846
#
 
847
# This isn't necessarily sendmail itself, but anything that gives a
 
848
# sendmail-ish interface to the outside world.  That includes Exim,
 
849
# Postfix, etc.  Basically, anything that can handle "sendmail -t".
677
850
if test "$try_mailto" = yes ; then
678
 
  AC_ARG_WITH(mailprog,[  --with-mailprog=NAME    use "NAME -t" for mail transport],,with_mailprog=yes)
 
851
  AC_ARG_WITH(mailprog,
 
852
      AC_HELP_STRING([--with-mailprog=NAME],
 
853
                     [use "NAME -t" for mail transport]),
 
854
             ,with_mailprog=yes)
679
855
 
680
 
  if test "$with_mailprog" = yes ; then
 
856
  if test x"$with_mailprog" = xyes ; then
681
857
    AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
682
858
    if test "$ac_cv_path_SENDMAIL" ; then
683
 
      GPGKEYS_MAILTO="gpgkeys_mailto"
 
859
      GPGKEYS_MAILTO="gpg2keys_mailto"
684
860
    fi
685
 
  elif test "$with_mailprog" != no ; then
 
861
  elif test x"$with_mailprog" != xno ; then
686
862
    AC_MSG_CHECKING([for a mail transport program])
687
863
    AC_SUBST(SENDMAIL,$with_mailprog)
688
864
    AC_MSG_RESULT($with_mailprog)
689
 
    GPGKEYS_MAILTO="gpgkeys_mailto"
 
865
    GPGKEYS_MAILTO="gpg2keys_mailto"
690
866
  fi
691
867
fi
692
868
 
693
869
AC_SUBST(GPGKEYS_MAILTO)
694
870
 
 
871
#
 
872
# Construct a printable name of the OS
 
873
#
695
874
case "${host}" in
696
875
    *-mingw32*)
697
876
        PRINTABLE_OS_NAME="MingW32"
717
896
                   [A human readable text with the name of the OS])
718
897
 
719
898
 
720
 
AM_GNU_GETTEXT_VERSION(0.14.1)
 
899
#
 
900
# Checking for iconv
 
901
#
 
902
AM_ICONV
 
903
 
 
904
 
 
905
#
 
906
# Check for gettext
 
907
#
 
908
AC_MSG_NOTICE([checking for gettext])
 
909
AM_PO_SUBDIRS
 
910
AM_GNU_GETTEXT_VERSION([0.17])
721
911
if test "$try_gettext" = yes; then
722
 
  AM_GNU_GETTEXT(,[need-ngettext])
 
912
  AM_GNU_GETTEXT([external],[need-ngettext])
723
913
 
724
914
  # gettext requires some extra checks.  These really should be part of
725
915
  # the basic AM_GNU_GETTEXT macro.  TODO: move other gettext-specific
730
920
  USE_NLS=no
731
921
  USE_INCLUDED_LIBINTL=no
732
922
  BUILD_INCLUDED_LIBINTL=no
 
923
  POSUB=po
733
924
  AC_SUBST(USE_NLS)
734
925
  AC_SUBST(USE_INCLUDED_LIBINTL)
735
926
  AC_SUBST(BUILD_INCLUDED_LIBINTL)
736
 
fi
737
 
 
 
927
  AC_SUBST(POSUB)
 
928
fi
 
929
 
 
930
# We use HAVE_LANGINFO_CODESET in a couple of places.
 
931
AM_LANGINFO_CODESET
 
932
 
 
933
# Checks required for our use locales
 
934
gt_LC_MESSAGES
 
935
 
 
936
 
 
937
#
 
938
# SELinux support
 
939
#
 
940
if test "$selinux_support" = yes ; then
 
941
  AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support])
 
942
fi
 
943
 
 
944
 
 
945
#
738
946
# Checks for header files.
 
947
#
 
948
AC_MSG_NOTICE([checking for header files])
739
949
AC_HEADER_STDC
740
 
AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h dlfcn.h)
741
 
 
 
950
AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h])
 
951
AC_CHECK_HEADERS([pty.h pwd.h inttypes.h])
 
952
AC_HEADER_TIME
 
953
 
 
954
 
 
955
#
742
956
# Checks for typedefs, structures, and compiler characteristics.
 
957
#
 
958
AC_MSG_NOTICE([checking for system characteristics])
743
959
AC_C_CONST
744
960
AC_C_INLINE
 
961
AC_C_VOLATILE
745
962
AC_TYPE_SIZE_T
 
963
AC_TYPE_MODE_T
746
964
AC_TYPE_SIGNAL
747
965
AC_DECL_SYS_SIGLIST
748
966
 
749
 
GNUPG_CHECK_ENDIAN
750
 
 
 
967
AC_ARG_ENABLE(endian-check,
 
968
              AC_HELP_STRING([--disable-endian-check],
 
969
              [disable the endian check and trust the OS provided macros]),
 
970
              endiancheck=$enableval,endiancheck=yes)
 
971
 
 
972
if test x"$endiancheck" = xyes ; then
 
973
  GNUPG_CHECK_ENDIAN
 
974
fi
 
975
 
 
976
# fixme: we should get rid of the byte type
751
977
GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
752
978
GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
753
979
GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
758
984
AC_CHECK_SIZEOF(unsigned int)
759
985
AC_CHECK_SIZEOF(unsigned long)
760
986
AC_CHECK_SIZEOF(unsigned long long)
 
987
AC_CHECK_SIZEOF(time_t,,[[
 
988
#include <stdio.h>
 
989
#if TIME_WITH_SYS_TIME
 
990
# include <sys/time.h>
 
991
# include <time.h>
 
992
#else
 
993
# if HAVE_SYS_TIME_H
 
994
#  include <sys/time.h>
 
995
# else
 
996
#  include <time.h>
 
997
# endif
 
998
#endif
 
999
]])
 
1000
 
 
1001
 
761
1002
# Ensure that we have UINT64_C before we bother to check for uint64_t
762
 
# fixme: really needed in gnupg?  I think it is only useful in libcgrypt.
 
1003
# Fixme: really needed in gnupg?  I think it is only useful in libcgrypt.
763
1004
AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works],
764
1005
   AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <inttypes.h>
765
 
uint64_t foo=UINT64_C(42);]),gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
 
1006
       uint64_t foo=UINT64_C(42);]),
 
1007
     gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
766
1008
if test "$gnupg_cv_uint64_c_works" = "yes" ; then
767
1009
   AC_CHECK_SIZEOF(uint64_t)
768
1010
fi
769
 
 
770
 
 
771
 
 
772
1011
 
773
1012
if test "$ac_cv_sizeof_unsigned_short" = "0" \
774
1013
   || test "$ac_cv_sizeof_unsigned_int" = "0" \
776
1015
    AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
777
1016
fi
778
1017
 
779
 
dnl Do we have any 64-bit data types?
780
 
if test "$ac_cv_sizeof_unsigned_int" != "8" \
781
 
   && test "$ac_cv_sizeof_unsigned_long" != "8" \
782
 
   && test "$ac_cv_sizeof_unsigned_long_long" != "8" \
783
 
   && test "$ac_cv_sizeof_uint64_t" != "8"; then
784
 
    AC_MSG_WARN([No 64-bit types.  Disabling SHA-384, and SHA-512])
785
 
else
786
 
  if test x"$use_sha512" = xyes ; then
787
 
     AC_SUBST(SHA512_O,sha512.o)
788
 
     AC_DEFINE(USE_SHA512,1,[Define to include the SHA-384 and SHA-512 digests])
789
 
  fi
790
 
fi
791
 
 
792
 
# fixme: do we really need this - it should be encapsulated in libassuan
793
 
GNUPG_SYS_SO_PEERCRED
794
 
 
 
1018
 
 
1019
#
795
1020
# Checks for library functions.
 
1021
#
 
1022
AC_MSG_NOTICE([checking for library functions])
 
1023
AC_CHECK_DECLS(getpagesize)
796
1024
AC_FUNC_FSEEKO
797
1025
AC_FUNC_VPRINTF
798
1026
AC_FUNC_FORK
799
 
AC_CHECK_FUNCS(strerror stpcpy strsep strlwr tcgetattr strtoul mmap)
800
 
AC_CHECK_FUNCS(strcasecmp strncasecmp ctermid times gmtime_r)
801
 
AC_CHECK_FUNCS(memmove gettimeofday getrusage setrlimit clock_gettime)
802
 
AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale)
803
 
AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat getaddrinfo)
804
 
AC_CHECK_FUNCS(fseeko ftello ttyname isascii)
 
1027
AC_CHECK_FUNCS([strerror strlwr tcgetattr mmap])
 
1028
AC_CHECK_FUNCS([strcasecmp strncasecmp ctermid times gmtime_r])
 
1029
AC_CHECK_FUNCS([unsetenv getpwnam getpwuid fcntl ftruncate])
 
1030
AC_CHECK_FUNCS([gettimeofday getrusage setrlimit clock_gettime])
 
1031
AC_CHECK_FUNCS([atexit raise getpagesize strftime nl_langinfo setlocale])
 
1032
AC_CHECK_FUNCS([waitpid wait4 sigaction sigprocmask pipe stat getaddrinfo])
 
1033
AC_CHECK_FUNCS([ttyname rand ftello])
805
1034
 
806
1035
AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
807
1036
 
 
1037
#
 
1038
# These are needed by libjnlib - fixme: we should use a jnlib.m4
 
1039
#
 
1040
AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol])
 
1041
AC_CHECK_FUNCS([memrchr isascii timegm getrusage setrlimit stat setlocale])
 
1042
AC_CHECK_FUNCS([flockfile funlockfile fopencookie funopen])
 
1043
 
 
1044
#
808
1045
# gnulib checks
809
 
gl_SOURCE_BASE(gl)
810
 
gl_M4_BASE(gl/m4)
811
 
gl_MODULES(setenv strsep mkdtemp vasprintf xsize)
 
1046
#
 
1047
gl_SOURCE_BASE([gl])
 
1048
gl_M4_BASE([gl/m4])
 
1049
gl_MODULES([setenv mkdtemp xsize strpbrk])
812
1050
gl_INIT
813
1051
 
814
 
# These are needed by libjnlib - fixme: we should have macros for them
815
 
AC_CHECK_FUNCS(memicmp stpcpy strlwr strtoul memmove stricmp strtol)
816
 
AC_CHECK_FUNCS(getrusage setrlimit stat setlocale)
817
 
AC_CHECK_FUNCS(flockfile funlockfile fopencookie funopen)
818
 
 
819
 
 
820
 
#
821
 
# check for gethrtime and run a testprogram to see whether
822
 
# it is broken.  It has been reported that some Solaris and HP UX systems 
823
 
# raise an SIGILL
824
 
#
825
 
#  fixme: Do we need this - iirc, this is only used by libgcrypt.
826
 
#
827
 
AC_CACHE_CHECK([for gethrtime], 
828
 
               [gnupg_cv_func_gethrtime],
829
 
               [AC_TRY_LINK([#include <sys/times.h>],[
830
 
                   hrtime_t tv;
831
 
                   tv = gethrtime();
832
 
                 ],
833
 
                 [gnupg_cv_func_gethrtime=yes],
834
 
                 [gnupg_cv_func_gethrtime=no])
835
 
               ])
836
 
if test $gnupg_cv_func_gethrtime = yes; then
837
 
     AC_DEFINE([HAVE_GETHRTIME], 1,
838
 
               [Define if you have the `gethrtime(2)' function.])
839
 
     AC_CACHE_CHECK([whether gethrtime is broken], 
840
 
               [gnupg_cv_func_broken_gethrtime],
841
 
               [AC_TRY_RUN([
842
 
                   #include <sys/times.h>
843
 
                   int main () {
844
 
                   hrtime_t tv;
845
 
                   tv = gethrtime(); 
846
 
                 }
847
 
                 ],
848
 
                 [gnupg_cv_func_broken_gethrtime=no],
849
 
                 [gnupg_cv_func_broken_gethrtime=yes],
850
 
                 [gnupg_cv_func_broken_gethrtime=assume-no])
851
 
                ])
852
 
    if test $gnupg_cv_func_broken_gethrtime = yes; then
853
 
      AC_DEFINE([HAVE_BROKEN_GETHRTIME], 1,
854
 
      [Define if `gethrtime(2)' does not work correctly i.e. issues a SIGILL.])
855
 
    fi
856
 
fi
857
 
     
858
 
 
859
 
GNUPG_CHECK_MLOCK
 
1052
 
 
1053
#
 
1054
# W32 specific test
 
1055
#
860
1056
GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
861
1057
 
862
 
dnl
863
 
dnl Check whether we can use Linux capabilities as requested
864
 
dnl
865
 
#  fixme: Still required?
866
1058
#
867
 
if test "$use_capabilities" = "yes" ; then
868
 
use_capabilities=no
869
 
AC_CHECK_HEADERS(sys/capability.h)
870
 
if test "$ac_cv_header_sys_capability_h" = "yes" ; then
871
 
  AC_CHECK_LIB(cap, cap_init, ac_need_libcap=1)
872
 
  if test "$ac_cv_lib_cap_cap_init" = "yes"; then
873
 
     AC_DEFINE(USE_CAPABILITIES,1,
874
 
               [define if capabilities should be used])
875
 
     AC_SUBST(CAPLIBS,"-lcap")
876
 
     use_capabilities=yes
877
 
  fi
878
 
fi
879
 
if test "$use_capabilities" = "no" ; then
880
 
    AC_MSG_WARN([[
881
 
***
882
 
*** The use of capabilities on this system is not possible.
883
 
*** You need a recent Linux kernel and some patches:
884
 
***   fcaps-2.2.9-990610.patch      (kernel patch for 2.2.9)
885
 
***   fcap-module-990613.tar.gz     (kernel module)
886
 
***   libcap-1.92.tar.gz            (user mode library and utilities)
887
 
*** And you have to configure the kernel with CONFIG_VFS_CAP_PLUGIN
888
 
*** set (filesystems menu). Be warned: This code is *really* ALPHA.
889
 
***]])
890
 
fi
891
 
fi
892
 
 
893
 
 
894
1059
# Sanity check regex.  Tests adapted from mutt.
895
 
 
 
1060
#
896
1061
AC_MSG_CHECKING([whether regular expression support is requested])
897
1062
AC_ARG_ENABLE(regex,
898
 
[  --disable-regex         do not handle regular expressions in trust sigs],
899
 
     use_regex=$enableval, use_regex=yes)
 
1063
  AC_HELP_STRING([--disable-regex],
 
1064
    [do not handle regular expressions in trust signatures]),
 
1065
  use_regex=$enableval, use_regex=yes)
900
1066
AC_MSG_RESULT($use_regex)
901
1067
 
902
1068
if test "$use_regex" = yes ; then
903
 
  AC_MSG_CHECKING([whether the included regex lib is requested])
904
 
  AC_ARG_WITH(included-regex,
905
 
      [  --with-included-regex   use the included GNU regex library],
906
 
      [gnupg_cv_included_regex="$withval"],[gnupg_cv_included_regex=no])
907
 
  AC_MSG_RESULT($gnupg_cv_included_regex)
908
 
 
909
 
  if test $gnupg_cv_included_regex = no ; then
910
 
     # Does the system have regex functions at all?
911
 
     AC_CHECK_FUNC(regcomp,gnupg_cv_included_regex=no,
912
 
                           gnupg_cv_included_regex=yes)
913
 
  fi
914
 
 
915
 
  if test $gnupg_cv_included_regex = no ; then
916
 
     AC_CACHE_CHECK([whether your system's regexp library is broken],
 
1069
  _cppflags="${CPPFLAGS}"
 
1070
  _ldflags="${LDFLAGS}"
 
1071
  AC_ARG_WITH(regex,
 
1072
     AC_HELP_STRING([--with-regex=DIR],[look for regex in DIR]),
 
1073
      [
 
1074
      if test -d "$withval" ; then
 
1075
        CPPFLAGS="${CPPFLAGS} -I$withval/include"
 
1076
        LDFLAGS="${LDFLAGS} -L$withval/lib"
 
1077
      fi
 
1078
      ],withval="")     
 
1079
 
 
1080
  # Does the system have regex functions at all?
 
1081
  AC_SEARCH_LIBS([regcomp], [regex])
 
1082
  AC_CHECK_FUNC(regcomp, gnupg_cv_have_regex=yes, gnupg_cv_have_regex=no)
 
1083
 
 
1084
  if test $gnupg_cv_have_regex = no; then
 
1085
    use_regex=no
 
1086
  else
 
1087
    if test x"$cross_compiling" = xyes; then
 
1088
      AC_MSG_WARN([cross compiling; assuming regexp libray is not broken])
 
1089
    else
 
1090
      AC_CACHE_CHECK([whether your system's regexp library is broken],
917
1091
       [gnupg_cv_regex_broken],
918
1092
       AC_TRY_RUN([
919
1093
#include <unistd.h>
921
1095
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); }],
922
1096
       gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
923
1097
 
924
 
     if test $gnupg_cv_regex_broken = yes ; then
925
 
      AC_MSG_WARN(your regex is broken - using the included GNU regex instead.)
926
 
      gnupg_cv_included_regex=yes
927
 
     fi
928
 
  fi
929
 
 
930
 
  if test $gnupg_cv_included_regex = yes; then
931
 
     AC_DEFINE(USE_GNU_REGEX,1,[ Define if you want to use the included regex lib ])
932
 
     AC_SUBST(REGEX_O,regex.o)
933
 
  fi
934
 
else
935
 
 
936
 
  AC_DEFINE(DISABLE_REGEX,1,[ Define to disable regular expression support ])
937
 
fi
938
 
 
939
 
dnl Do we have zlib? Must do it here because Solaris failed
940
 
dnl when compiling a conftest (due to the "-lz" from LIBS).
 
1098
      if test $gnupg_cv_regex_broken = yes; then
 
1099
        AC_MSG_WARN([your regex is broken - disabling regex use])
 
1100
        use_regex=no
 
1101
      fi
 
1102
    fi
 
1103
  fi
 
1104
  CPPFLAGS="${_cppflags}"
 
1105
  LDFLAGS="${_ldflags}"
 
1106
fi
 
1107
 
 
1108
if test "$use_regex" != yes ; then
 
1109
  AC_DEFINE(DISABLE_REGEX,1, [Define to disable regular expression support])
 
1110
fi
 
1111
AM_CONDITIONAL(DISABLE_REGEX, test x"$use_regex" != xyes)
 
1112
 
 
1113
 
 
1114
 
 
1115
#
 
1116
# Do we have zlib? Must do it here because Solaris failed
 
1117
# when compiling a conftest (due to the "-lz" from LIBS).
 
1118
# Note that we combine zlib and bzlib2 in ZLIBS.
 
1119
#
941
1120
_cppflags="${CPPFLAGS}"
942
1121
_ldflags="${LDFLAGS}"
943
 
 
944
1122
AC_ARG_WITH(zlib,
945
1123
  [  --with-zlib=DIR         use libz in DIR],[
946
1124
    if test -d "$withval"; then
951
1129
 
952
1130
AC_CHECK_HEADER(zlib.h,
953
1131
      AC_CHECK_LIB(z, deflateInit2_,
954
 
       LIBS="$LIBS -lz",
 
1132
       ZLIBS="-lz",
955
1133
       CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
956
1134
       CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
957
 
 
958
 
 
959
 
 
960
 
# See wether we want to run the long test suite.
961
 
AC_ARG_WITH(pkits-tests,
962
 
    AC_HELP_STRING([--with-pkits-tests],[run the PKITS based tests]),
963
 
    [run_pkits_tests=$withval], [run_pkits_tests=no])
964
 
AM_CONDITIONAL(RUN_PKITS_TESTS, test "$run_pkits_tests" = "yes")
965
 
 
966
 
 
 
1135
 
 
1136
#
 
1137
# Check whether we can support bzip2
 
1138
 
1139
if test "$use_bzip2" = yes ; then
 
1140
  _cppflags="${CPPFLAGS}"
 
1141
  _ldflags="${LDFLAGS}"
 
1142
  AC_ARG_WITH(bzip2,
 
1143
     AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
 
1144
      [
 
1145
      if test -d "$withval" ; then
 
1146
        CPPFLAGS="${CPPFLAGS} -I$withval/include"
 
1147
        LDFLAGS="${LDFLAGS} -L$withval/lib"
 
1148
      fi
 
1149
      ],withval="")
 
1150
 
 
1151
  # Checking alongside stdio.h as an early version of bzip2 (1.0)
 
1152
  # required stdio.h to be included before bzlib.h, and Solaris 9 is 
 
1153
  # woefully out of date.
 
1154
  if test "$withval" != no ; then
 
1155
     AC_CHECK_HEADER(bzlib.h,
 
1156
        AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
 
1157
          [
 
1158
          have_bz2=yes
 
1159
          ZLIBS="$ZLIBS -lbz2"
 
1160
          AC_DEFINE(HAVE_BZIP2,1,
 
1161
                  [Defined if the bz2 compression library is available])
 
1162
          ],
 
1163
          CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
 
1164
          CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>])
 
1165
  fi
 
1166
fi
 
1167
AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
 
1168
AC_SUBST(ZLIBS)
 
1169
 
 
1170
 
 
1171
# Check for readline support
 
1172
GNUPG_CHECK_READLINE
 
1173
 
 
1174
#
967
1175
# Allow users to append something to the version string without
968
1176
# flagging it as development version.  The user version parts is
969
1177
# considered everything after a dash. 
 
1178
#
970
1179
if test "$development_version" != yes; then
971
1180
  changequote(,)dnl
972
1181
  tmp_pat='[a-zA-Z]'
985
1194
GNUPG_CHECK_GNUMAKE
986
1195
 
987
1196
# Add some extra libs here so that previous tests don't fail for
988
 
# mysterious reasons - the final link step should bail out. 
 
1197
# mysterious reasons - the final link step should bail out.
 
1198
# W32SOCKLIBS is also defined so that if can be used for tools not
 
1199
# requiring any network stuff but linking to code in libcommon which
 
1200
# tracks in winsock stuff (e.g. init_common_subsystems.
989
1201
if test "$have_w32_system" = yes; then
990
 
   W32LIBS="-lwsock32"
 
1202
   W32SOCKLIBS="-lws2_32"
 
1203
   NETLIBS="${NETLIBS} ${W32SOCKLIBS}"
991
1204
fi
992
1205
 
 
1206
AC_SUBST(NETLIBS)
 
1207
AC_SUBST(W32SOCKLIBS)
993
1208
 
 
1209
#
 
1210
# Setup gcc specific options
 
1211
#
 
1212
AC_MSG_NOTICE([checking for cc features])
994
1213
if test "$GCC" = yes; then
 
1214
    # Note that it is okay to use CFLAGS here because this are just
 
1215
    # warning options and the user should have a chance of overriding
 
1216
    # them.
995
1217
    if test "$USE_MAINTAINER_MODE" = "yes"; then
996
1218
        CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
997
 
        CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security"
 
1219
        CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
998
1220
    else
999
1221
        CFLAGS="$CFLAGS -Wall"
1000
1222
    fi
1001
 
fi
1002
 
 
1003
 
AC_SUBST(NETLIBS)
1004
 
AC_SUBST(W32LIBS)
1005
 
 
1006
 
 
1007
 
# We use jnlib, so tell other modules about it
1008
 
AC_DEFINE(HAVE_JNLIB_LOGGING, 1,
1009
 
          [Defined if jnlib style logging functions are available])
1010
 
 
1011
 
# For W32 we need to use our Pth emulation code
1012
 
if test "$have_w32_system" = yes; then
1013
 
  AC_CONFIG_LINKS(pth.h:jnlib/w32-pth.h)
1014
 
fi
 
1223
 
 
1224
    AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
 
1225
    _gcc_cflags_save=$CFLAGS
 
1226
    CFLAGS="-Wno-pointer-sign"
 
1227
    AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
 
1228
    AC_MSG_RESULT($_gcc_psign)
 
1229
    CFLAGS=$_gcc_cflags_save;
 
1230
    if test x"$_gcc_psign" = xyes ; then
 
1231
       CFLAGS="$CFLAGS -Wno-pointer-sign"
 
1232
    fi
 
1233
 
 
1234
    AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
 
1235
    _gcc_cflags_save=$CFLAGS
 
1236
    CFLAGS="-Wpointer-arith"
 
1237
    AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
 
1238
    AC_MSG_RESULT($_gcc_psign)
 
1239
    CFLAGS=$_gcc_cflags_save;
 
1240
    if test x"$_gcc_psign" = xyes ; then
 
1241
       CFLAGS="$CFLAGS -Wpointer-arith"
 
1242
    fi
 
1243
fi
 
1244
 
 
1245
 
 
1246
#
 
1247
# This is handy for debugging so the compiler doesn't rearrange
 
1248
# things and eliminate variables.
 
1249
#
 
1250
AC_ARG_ENABLE(optimization,
 
1251
   AC_HELP_STRING([--disable-optimization],
 
1252
                  [disable compiler optimization]),
 
1253
                  [if test $enableval = no ; then
 
1254
                      CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
 
1255
                   fi])
 
1256
 
 
1257
#
 
1258
# Prepare building of estream
 
1259
#
 
1260
estream_INIT
1015
1261
 
1016
1262
 
1017
1263
#
1039
1285
     tmp=", "
1040
1286
     missing_pth=yes
1041
1287
  fi
 
1288
  if test $have_libusb = no; then
 
1289
     build_scdaemon_extra="${tmp}without internal CCID driver"
 
1290
     tmp=", "
 
1291
  fi
1042
1292
  if test -n "$build_scdaemon_extra"; then
1043
1293
     build_scdaemon_extra="(${build_scdaemon_extra})"
1044
1294
  fi
1049
1299
  build_gpg=no
1050
1300
  build_gpgsm=no
1051
1301
  build_scdaemon=no
 
1302
  build_tools=no
 
1303
  build_doc=no
1052
1304
fi
1053
1305
 
1054
1306
 
1056
1308
AM_CONDITIONAL(BUILD_GPGSM, test "$build_gpgsm" = "yes")
1057
1309
AM_CONDITIONAL(BUILD_AGENT, test "$build_agent" = "yes")
1058
1310
AM_CONDITIONAL(BUILD_SCDAEMON, test "$build_scdaemon" = "yes")
 
1311
AM_CONDITIONAL(BUILD_TOOLS, test "$build_tools" = "yes")
 
1312
AM_CONDITIONAL(BUILD_DOC,   test "$build_doc" = "yes")
1059
1313
AM_CONDITIONAL(BUILD_SYMCRYPTRUN, test "$build_symcryptrun" = "yes")
1060
1314
 
 
1315
AM_CONDITIONAL(RUN_GPG_TESTS,
 
1316
        test x$cross_compiling = xno -a "$build_gpg" = yes )
1061
1317
 
1062
1318
 
1063
1319
#
1082
1338
*** You need libgcrypt to build this program.
1083
1339
**  This library is for example available at
1084
1340
***   ftp://ftp.gnupg.org/gcrypt/libgcrypt/
1085
 
*** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API) is required.)
 
1341
*** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)
1086
1342
***]])
1087
1343
fi
1088
1344
if test "$have_libassuan" = "no"; then
1089
1345
   die=yes
1090
1346
   AC_MSG_NOTICE([[
1091
1347
***
1092
 
*** You need libassuan to build this program.
 
1348
*** You need libassuan with Pth support to build this program.
1093
1349
*** This library is for example available at
1094
 
***   ftp://ftp.gnupg.org/gcrypt/alpha/libassuan/
1095
 
*** (at least version $NEED_LIBASSUAN_VERSION is required).
 
1350
***   ftp://ftp.gnupg.org/gcrypt/libassuan/
 
1351
*** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required).
1096
1352
***]])
1097
1353
fi
1098
1354
if test "$have_ksba" = "no"; then
1100
1356
***
1101
1357
*** You need libksba to build this program.
1102
1358
*** This library is for example available at
1103
 
***   ftp://ftp.gnupg.org/gcrypt/alpha/libksba/
1104
 
*** (at least version $NEED_KSBA_VERSION is required).
 
1359
***   ftp://ftp.gnupg.org/gcrypt/libksba/
 
1360
*** (at least version $NEED_KSBA_VERSION using API $NEED_KSBA_API is required).
1105
1361
***]])
1106
1362
fi
1107
1363
if test "$missing_pth" = "yes"; then
1113
1369
***   ftp://ftp.gnu.org/gnu/pth/
1114
1370
*** On a Debian GNU/Linux system you can install it using 
1115
1371
***   apt-get install libpth-dev
 
1372
*** To build GnuPG for Windows you need to use the W32PTH
 
1373
*** package; available at:
 
1374
***   ftp://ftp.g10code.com/g10code/w32pth/
1116
1375
***]])
1117
1376
   die=yes
1118
1377
fi
1130
1389
AC_CONFIG_FILES([ m4/Makefile 
1131
1390
Makefile
1132
1391
po/Makefile.in
1133
 
intl/Makefile
1134
1392
gl/Makefile
 
1393
include/Makefile
1135
1394
jnlib/Makefile
1136
1395
common/Makefile
1137
1396
kbx/Makefile
1139
1398
sm/Makefile
1140
1399
agent/Makefile
1141
1400
scd/Makefile
 
1401
keyserver/Makefile
 
1402
keyserver/gpg2keys_mailto
 
1403
keyserver/gpg2keys_test
 
1404
tools/gpg-zip
1142
1405
tools/Makefile
1143
1406
doc/Makefile
1144
1407
tests/Makefile
 
1408
tests/openpgp/Makefile
 
1409
tests/pkits/Makefile
1145
1410
])
1146
1411
AC_OUTPUT
1147
1412
 
1148
 
#tests/pkits/Makefile
1149
 
 
1150
 
 
1151
 
 
1152
1413
 
1153
1414
echo "
1154
1415
        GnuPG v${VERSION} has been configured as follows:
1165
1426
        Default pinentry:  $show_gnupg_pinentry_pgm
1166
1427
        Default scdaemon:  $show_gnupg_scdaemon_pgm
1167
1428
        Default dirmngr:   $show_gnupg_dirmngr_pgm
1168
 
 
1169
 
        PKITS based tests: $run_pkits_tests
1170
 
"
 
1429
"
 
1430
if test x"$use_regex" != xyes ; then
 
1431
echo "
 
1432
        Warning: No regular expression support available.
 
1433
                 OpenPGP trust signatures won't work.
 
1434
                 gpg-check-pattern will not be build.
 
1435
"
 
1436
fi
 
1437
if test  x"$use_camellia" = xyes ; then
 
1438
  echo
 
1439
  echo "WARNING: The Camellia cipher for gpg is for testing only"
 
1440
  echo "         and is NOT for production use!"
 
1441
  echo
 
1442
fi
1171
1443