1 dnl Configure.ac script for GnuPG
2 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 dnl This file is part of GnuPG.
6 dnl GnuPG is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2 of the License, or
9 dnl (at your option) any later version.
11 dnl GnuPG is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 dnl (Process this file with autoconf to produce a configure script.)
21 dnlAC_REVISION($Revision$)dnl
25 # Please enter the version number here and set development_version to
26 # yes if the minor number is odd or you feel that the default check
27 # for a development version is not sufficient.
28 AC_INIT(gnupg, 1.1.92, bug-gnupg@gnu.org)
29 development_version=yes
31 ALL_LINGUAS="ca cs da de eo el es et fr gl id it ja nl pl pt_BR pt sv tr"
34 VERSION=$PACKAGE_VERSION
36 AC_CONFIG_AUX_DIR(scripts)
37 AC_CONFIG_SRCDIR(g10/g10.c)
39 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
40 AM_CONFIG_HEADER(config.h)
44 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
45 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
46 AC_DEFINE(_GNU_SOURCE,1,[Some tests rely on this (stpcpy) and it should be used for new programs anyway])
49 dnl Check for random module options
51 AC_MSG_CHECKING([which random module to use])
52 AC_ARG_ENABLE(static-rnd,
53 [ --enable-static-rnd=[egd|unix|linux|auto] ],
54 [use_static_rnd=$enableval], [use_static_rnd=default] )
56 if test "$use_static_rnd" = no; then
57 use_static_rnd=default
60 case "$use_static_rnd" in
61 egd | linux | unix | default )
62 AC_MSG_RESULT($use_static_rnd)
65 AC_MSG_RESULT(automagically selected at runtime)
68 AC_MSG_RESULT(invalid argument)
69 AC_MSG_ERROR(there is no random module rnd$use_static_rnd)
73 AC_ARG_WITH(egd-socket,
74 [ --with-egd-socket=NAME use NAME for the EGD socket],
75 egd_socket_name="$withval", egd_socket_name="" )
76 AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name",
77 [Define if you don't want the default EGD socket name.
78 For details see cipher/rndegd.c])
82 dnl See whether the user wants to disable checking for /dev/random
84 AC_MSG_CHECKING([whether use of /dev/random is requested])
85 AC_ARG_ENABLE(dev-random,
86 [ --disable-dev-random disable the use of dev random],
87 try_dev_random=$enableval, try_dev_random=yes)
88 AC_MSG_RESULT($try_dev_random)
92 dnl Check other options
95 # We don't need idea but some people claim that they need it for
96 # research etc., so we allow to place an idea source code into the
97 # cipher directory and statically link it if available, otherwise we
98 # link to a stub. We don't use AC_CHECK_FILE to avoid caching.
99 AC_MSG_CHECKING(for extra cipher modules)
101 if test -f $srcdir/cipher/idea.c; then
111 # if the static idea is present, disable dynload.
112 if test "$IDEA_O" = idea-stub.o ; then
113 AC_MSG_CHECKING([whether use of extensions is requested])
114 AC_ARG_ENABLE(dynload,
115 [ --disable-dynload disable use of extensions],
116 try_dynload=$enableval, try_dynload=yes)
117 AC_MSG_RESULT($try_dynload)
122 AC_MSG_CHECKING([whether assembler modules are requested])
124 [ --disable-asm do not use assembler modules],
125 try_asm_modules=$enableval, try_asm_modules=yes)
126 AC_MSG_RESULT($try_asm_modules)
128 AC_MSG_CHECKING([whether memory guard is requested])
129 AC_ARG_ENABLE(m-guard,
130 [ --enable-m-guard enable memory guard facility],
131 use_m_guard=$enableval, use_m_guard=no)
132 AC_MSG_RESULT($use_m_guard)
133 if test "$use_m_guard" = yes ; then
134 AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature])
137 AC_MSG_CHECKING([whether to enable experimental TIGER digest support])
139 [ --enable-tiger enable experimental TIGER digest support],
140 use_tiger=$enableval, use_tiger=no)
141 AC_MSG_RESULT($use_tiger)
142 if test "$use_tiger" = yes ; then
143 AC_SUBST(TIGER_O,tiger.o)
144 AC_DEFINE(USE_TIGER,1,[Define to include experimental TIGER digest support])
147 AC_MSG_CHECKING([whether to enable external program execution])
149 [ --disable-exec disable all external program execution],
150 use_exec=$enableval, use_exec=yes)
151 AC_MSG_RESULT($use_exec)
152 if test "$use_exec" = no ; then
153 AC_DEFINE(NO_EXEC,1,[Define to disable all external program execution])
156 if test "$use_exec" = yes ; then
157 AC_MSG_CHECKING([whether to enable photo ID viewing])
158 AC_ARG_ENABLE(photo-viewers,
159 [ --disable-photo-viewers disable photo ID viewers],
160 [if test "$enableval" = no ; then
161 AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
163 gnupg_cv_enable_photo_viewers=$enableval
164 AC_MSG_RESULT($enableval)
166 if test "$gnupg_cv_enable_photo_viewers" = yes ; then
167 AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
168 AC_ARG_WITH(photo-viewer,
169 [ --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer],
170 [if test "$withval" = yes ; then
172 elif test "$withval" != no ; then
173 AC_DEFINE_UNQUOTED(FIXED_PHOTO_VIEWER,"$withval",
174 [if set, restrict photo-viewer to this])
176 AC_MSG_RESULT($withval)
179 AC_MSG_CHECKING([whether to enable external keyserver helpers])
180 AC_ARG_ENABLE(keyserver-helpers,
181 [ --disable-keyserver-helpers disable all external keyserver support],
182 [if test "$enableval" = no ; then
183 AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
184 [define to disable keyserver helpers])
186 gnupg_cv_enable_keyserver_helpers=$enableval
187 AC_MSG_RESULT($enableval)
189 if test "$gnupg_cv_enable_keyserver_helpers" = yes ; then
190 AC_MSG_CHECKING([whether LDAP keyserver support is requested])
192 [ --disable-ldap disable LDAP keyserver interface],
193 try_ldap=$enableval, try_ldap=yes)
194 AC_MSG_RESULT($try_ldap)
196 AC_MSG_CHECKING([whether experimental external hkp keyserver support is requested])
197 AC_ARG_ENABLE(external-hkp,
198 [ --enable-external-hkp enable experimental external HKP keyserver interface],
199 try_hkp=$enableval, try_hkp=no)
200 AC_MSG_RESULT($try_hkp)
202 if test "$try_hkp" = yes ; then
203 GPGKEYS_HKP="gpgkeys_hkp"
204 AC_DEFINE(USE_EXTERNAL_HKP,1,[define to use the experimental external HKP keyserver interface])
207 AC_MSG_CHECKING([whether email keyserver support is requested])
208 AC_ARG_ENABLE(mailto,
209 [ --disable-mailto disable email keyserver interface],
210 try_mailto=$enableval, try_mailto=yes)
211 AC_MSG_RESULT($try_mailto)
214 AC_MSG_CHECKING([whether keyserver exec-path is enabled])
215 AC_ARG_ENABLE(keyserver-path,
216 [ --disable-keyserver-path disable the exec-path option for keyserver helpers],
217 [if test "$enableval" = no ; then
218 AC_DEFINE(DISABLE_KEYSERVER_PATH,1,[define to disable exec-path for keyserver helpers])
220 AC_MSG_RESULT($enableval)
223 AC_MSG_CHECKING([whether included zlib is requested])
224 AC_ARG_WITH(included-zlib,
225 [ --with-included-zlib use the zlib code included here],
226 [g10_force_zlib=yes], [g10_force_zlib=no] )
227 AC_MSG_RESULT($g10_force_zlib)
231 dnl Check whether we want to use Linux capabilities
233 AC_MSG_CHECKING([whether use of capabilities is requested])
234 AC_ARG_WITH(capabilities,
235 [ --with-capabilities use linux capabilities [default=no]],
236 [use_capabilities="$withval"],[use_capabilities=no])
237 AC_MSG_RESULT($use_capabilities)
241 #if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
242 #define EXEC_TEMPFILE_ONLY
251 dnl Checks for programs.
255 missing_dir=`cd $ac_aux_dir && pwd`
256 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
257 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
258 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
259 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
260 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
263 AC_PATH_PROG(PERL,"perl")
268 AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no)
269 AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes)
271 GNUPG_CHECK_DOCBOOK_TO_TEXI
278 *-*-mingw32*|*-*-cygwin*)
279 # special stuff for Windoze NT
280 ac_cv_have_dev_random=no
281 AC_DEFINE(USE_ONLY_8DOT3,1,
282 [set this to limit filenames to the 8.3 format])
283 AC_DEFINE(HAVE_DRIVE_LETTERS,1,
284 [defined if we must run on a stupid file system])
285 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
286 [defined if we run on some of the PCDOS like systems
287 (DOS, Windoze. OS/2) with special properties like
289 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
290 [because the Unix gettext has too much overhead on
291 MingW32 systems and these systems lack Posix functions,
292 we use a simplified version of gettext])
295 i?86-emx-os2 | i?86-*-os2*emx )
296 # OS/2 with the EMX environment
297 ac_cv_have_dev_random=no
298 AC_DEFINE(HAVE_DRIVE_LETTERS)
299 AC_DEFINE(HAVE_DOSISH_SYSTEM)
304 # DOS with the DJGPP environment
305 ac_cv_have_dev_random=no
306 AC_DEFINE(HAVE_DRIVE_LETTERS)
307 AC_DEFINE(HAVE_DOSISH_SYSTEM)
313 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
314 LDFLAGS="$LDFLAGS -L/usr/local/lib"
318 if test -z "$GCC" ; then
319 CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
323 if test -z "$GCC" ; then
324 # Suppress all warnings
325 # to get rid of the unsigned/signed char mismatch warnings.
330 if test -z "$GCC" ; then
331 # Use the newer compiler `-msg_disable ptrmismatch' to
332 # get rid of the unsigned/signed char mismatch warnings.
333 # Using this may hide other pointer mismatch warnings, but
334 # it at least lets other warning classes through
335 CFLAGS="$CFLAGS -msg_disable ptrmismatch"
344 AC_SUBST(MPI_OPT_FLAGS)
345 GNUPG_SYS_SYMBOL_UNDERSCORE
347 dnl Must check for network library requirements before doing link tests
348 dnl for ldap, for example. If ldap libs are static (or dynamic and without
349 dnl ELF runtime link paths), then link will fail and LDAP support won't
352 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
353 [NETLIBS="-lnsl $NETLIBS"]))
354 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
355 [NETLIBS="-lsocket $NETLIBS"]))
357 # Try and link a LDAP test program to weed out unusable LDAP
358 # libraries. -lldap -llber [-lresolv] is for OpenLDAP. -lldapssl41
359 # is for Mozilla LDAP.
361 if test "$try_ldap" = yes ; then
362 for LDAPLIBS in "-lldap -llber -lresolv" "-lldap -llber" "-lldapssl41"; do
363 _ldap_save_libs=$LIBS
364 LIBS="$LDAPLIBS $NETLIBS $LIBS"
366 AC_MSG_CHECKING([whether LDAP via \"$LDAPLIBS\" is present and sane])
367 AC_TRY_LINK([#include <ldap.h>],[ldap_open("foobar",1234);],
368 [gnupg_cv_func_ldap_init=yes],[gnupg_cv_func_ldap_init=no])
369 AC_MSG_RESULT([$gnupg_cv_func_ldap_init])
371 if test $gnupg_cv_func_ldap_init = no; then
372 AC_MSG_CHECKING([whether I can make LDAP be sane with lber.h])
373 AC_TRY_LINK([#include <lber.h>
374 #include <ldap.h>],[ldap_open("foobar",1234);],
375 [gnupg_cv_func_ldaplber_init=yes],[gnupg_cv_func_ldaplber_init=no])
376 AC_MSG_RESULT([$gnupg_cv_func_ldaplber_init])
379 if test "$gnupg_cv_func_ldaplber_init" = yes ; then
380 AC_DEFINE(NEED_LBER_H,1,[Define if the LDAP library requires including lber.h before ldap.h])
383 if test "$gnupg_cv_func_ldap_init" = yes || \
384 test "$gnupg_cv_func_ldaplber_init" = yes ; then
385 GPGKEYS_LDAP="gpgkeys_ldap"
388 LIBS=$_ldap_save_libs
390 if test "$GPGKEYS_LDAP" != "" ; then break; fi
394 AC_SUBST(GPGKEYS_LDAP)
397 dnl This isn't necessarily sendmail itself, but anything that gives a
398 dnl sendmail-ish interface to the outside world. That includes qmail,
399 dnl postfix, etc. Basically, anything that can handle "sendmail -t".
401 if test "$try_mailto" = yes ; then
402 AC_ARG_WITH(mailprog,[ --with-mailprog=NAME use "NAME -t" for mail transport],,with_mailprog=yes)
404 if test "$with_mailprog" = yes ; then
405 AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
406 if test "$ac_cv_path_SENDMAIL" ; then
407 GPGKEYS_MAILTO="gpgkeys_mailto"
409 elif test "$with_mailprog" != no ; then
410 AC_MSG_CHECKING([for a mail transport program])
411 AC_SUBST(SENDMAIL,$with_mailprog)
412 AC_MSG_RESULT($with_mailprog)
413 GPGKEYS_MAILTO="gpgkeys_mailto"
417 AC_SUBST(GPGKEYS_MAILTO)
418 AC_SUBST(GPGKEYS_HKP)
422 PRINTABLE_OS_NAME="MingW32"
425 PRINTABLE_OS_NAME="Cygwin32"
427 i?86-emx-os2 | i?86-*-os2*emx )
428 PRINTABLE_OS_NAME="OS/2"
431 PRINTABLE_OS_NAME="MSDOS/DJGPP"
435 PRINTABLE_OS_NAME="GNU/Linux"
437 dnl let that after linux to avoid gnu-linux problems
439 PRINTABLE_OS_NAME="GNU/Hurd"
442 PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
445 AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
446 [A human readable text with the name of the OS])
450 # 1. Set names of random devices
452 NAME_OF_DEV_RANDOM="/dev/random"
453 NAME_OF_DEV_URANDOM="/dev/urandom"
455 *-openbsd* | *-netbsd*)
456 NAME_OF_DEV_RANDOM="/dev/srandom"
457 NAME_OF_DEV_URANDOM="/dev/urandom"
460 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM",
461 [defined to the name of the strong random device])
462 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM",
463 [defined to the name of the weaker random device])
464 AC_SUBST(MPI_OPT_FLAGS)
467 dnl Checks for libraries.
469 if test "$try_gettext" = yes; then
473 USE_INCLUDED_LIBINTL=no
474 BUILD_INCLUDED_LIBINTL=no
476 AC_SUBST(USE_INCLUDED_LIBINTL)
477 AC_SUBST(BUILD_INCLUDED_LIBINTL)
481 if test "$try_dynload" = yes ; then
482 AC_CHECK_LIB(dl,dlopen)
483 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
484 AC_DEFINE(USE_DYNAMIC_LINKING,1,
485 [define to enable the use of extensions])
486 AC_DEFINE(HAVE_DL_DLOPEN,1,
487 [Defined when the dlopen function family is available])
489 AC_CHECK_FUNCS(dlopen)
490 if test "$ac_cv_func_dlopen" = "yes"; then
491 AC_DEFINE(USE_DYNAMIC_LINKING)
492 AC_DEFINE(HAVE_DL_DLOPEN)
496 AC_MSG_CHECKING(for dynamic loading)
499 AC_MSG_RESULT(has been disabled)
502 dnl Checks for header files.
504 AC_CHECK_HEADERS(unistd.h langinfo.h termio.h locale.h)
506 dnl Checks for typedefs, structures, and compiler characteristics.
517 GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
518 GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
519 GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
520 GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
521 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
523 AC_CHECK_SIZEOF(unsigned short, 2)
524 AC_CHECK_SIZEOF(unsigned int, 4)
525 AC_CHECK_SIZEOF(unsigned long, 4)
526 AC_CHECK_SIZEOF(unsigned long long, 0)
528 if test "$ac_cv_sizeof_unsigned_short" = "0" \
529 || test "$ac_cv_sizeof_unsigned_int" = "0" \
530 || test "$ac_cv_sizeof_unsigned_long" = "0"; then
531 AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
534 dnl Checks for library functions.
538 AC_CHECK_FUNCS(strerror stpcpy strsep strlwr tcgetattr strtoul mmap)
539 AC_CHECK_FUNCS(strcasecmp strncasecmp)
540 AC_CHECK_FUNCS(memmove gettimeofday getrusage setrlimit clock_gettime)
541 AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale)
542 AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat)
543 AC_REPLACE_FUNCS(mkdtemp)
546 # check for gethrtime and run a testprogram to see whether
547 # it is broken. It has been reported that some Solaris and HP UX systems
550 AC_CACHE_CHECK([for gethrtime],
551 [gnupg_cv_func_gethrtime],
552 [AC_TRY_LINK([#include <sys/times.h>],[
556 [gnupg_cv_func_gethrtime=yes],
557 [gnupg_cv_func_gethrtime=no])
559 if test $gnupg_cv_func_gethrtime = yes; then
560 AC_DEFINE([HAVE_GETHRTIME], 1,
561 [Define if you have the `gethrtime(2)' function.])
562 AC_CACHE_CHECK([whether gethrtime is broken],
563 [gnupg_cv_func_broken_gethrtime],
565 #include <sys/times.h>
571 [gnupg_cv_func_broken_gethrtime=no],
572 [gnupg_cv_func_broken_gethrtime=yes],
573 [gnupg_cv_func_broken_gethrtime=assume-no])
575 if test $gnupg_cv_func_broken_gethrtime = yes; then
576 AC_DEFINE([HAVE_BROKEN_GETHRTIME], 1,
577 [Define if `gethrtime(2)' does not work correctly i.e. issues a SIGILL.])
583 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
586 dnl Check whether we can use Linux capabilities as requested
588 if test "$use_capabilities" = "yes" ; then
590 AC_CHECK_HEADERS(sys/capability.h)
591 if test "$ac_cv_header_sys_capability_h" = "yes" ; then
592 AC_CHECK_LIB(cap, cap_init, ac_need_libcap=1)
593 if test "$ac_cv_lib_cap_cap_init" = "yes"; then
594 AC_DEFINE(USE_CAPABILITIES,1,
595 [define if capabilities should be used])
600 if test "$use_capabilities" = "no" ; then
603 *** The use of capabilities on this system is not possible.
604 *** You need a recent Linux kernel and some patches:
605 *** fcaps-2.2.9-990610.patch (kernel patch for 2.2.9)
606 *** fcap-module-990613.tar.gz (kernel module)
607 *** libcap-1.92.tar.gz (user mode library and utilities)
608 *** And you have to configure the kernel with CONFIG_VFS_CAP_PLUGIN
609 *** set (filesystems menu). Be warned: This code is *really* ALPHA.
616 if test "$ac_cv_header_sys_shm_h" = "yes"; then
617 AC_DEFINE(USE_SHM_COPROCESSING,1,
618 [define if the shared memory interface should be made available])
622 dnl check whether we have a random device
624 if test "$try_dev_random" = yes ; then
625 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
626 [if test -r "$NAME_OF_DEV_RANDOM" && test -r "$NAME_OF_DEV_URANDOM" ; then
627 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
628 if test "$ac_cv_have_dev_random" = yes; then
629 AC_DEFINE(HAVE_DEV_RANDOM,1,
630 [defined if the system supports a random device] )
633 AC_MSG_CHECKING(for random device)
634 ac_cv_have_dev_random=no
635 AC_MSG_RESULT(has been disabled)
640 dnl Figure out the default random module.
643 if test "$use_static_rnd" = default; then
644 if test "$ac_cv_have_dev_random" = yes; then
645 random_modules="rndlinux"
648 *-*-mingw32*|*-*-cygwin*)
649 random_modules="rndw32"
651 i?86-emx-os2|i?86-*-os2*emx)
652 random_modules="rndos2"
655 random_modules="rndatari"
661 random_modules="rndunix"
666 if test "$use_static_rnd" = auto; then
667 random_modules="rndlinux rndegd rndunix"
668 AC_DEFINE(USE_ALL_RANDOM_MODULES, 1,
669 [Allow to select random modules at runtime.])
671 random_modules="rnd$use_static_rnd";
675 if test -z "$random_modules"; then
676 AC_MSG_ERROR(no random module available)
679 for rndmod in $random_modules "" ; do
682 AC_DEFINE(USE_RNDLINUX,1,
683 [Defined if the /dev/random based RNG should be used.])
686 AC_DEFINE(USE_RNDUNIX,1,
687 [Defined if the default Unix RNG should be used.])
688 print_egd_warning=yes
691 AC_DEFINE(USE_RNDEGD,1,
692 [Defined if the EGD based RNG should be used.])
695 AC_DEFINE(USE_RNDW32,1,
696 [Defined if the Windows specific RNG should be used.])
701 dnl setup assembler stuff
702 AC_MSG_CHECKING(for mpi assembler functions)
703 if test -f $srcdir/mpi/config.links ; then
704 . $srcdir/mpi/config.links
705 AC_CONFIG_LINKS("$mpi_ln_list")
706 ac_cv_mpi_extra_asm_modules="$mpi_extra_modules"
707 ac_cv_mpi_sflags="$mpi_sflags"
708 ac_cv_mpi_config_done="yes"
711 AC_MSG_RESULT(failed)
712 AC_MSG_ERROR([mpi/config.links missing!])
714 MPI_EXTRA_ASM_OBJS=""
716 if test "$ac_cv_mpi_extra_asm_modules" != ""; then
717 for i in $ac_cv_mpi_extra_asm_modules; do
718 show_extraasm="$show_extraasm $i"
719 MPI_EXTRA_ASM_OBJS="$MPI_EXTRA_ASM_OBJS $i.o"
722 AC_SUBST(MPI_EXTRA_ASM_OBJS)
723 MPI_SFLAGS="$ac_cv_mpi_sflags"
726 dnl Do we have zlib? Must do it here because Solaris failed
727 dnl when compiling a conftest (due to the "-lz" from LIBS).
729 if test "$g10_force_zlib" = "yes"; then
732 _cppflags="${CPPFLAGS}"
733 _ldflags="${LDFLAGS}"
736 [ --with-zlib=DIR use libz in DIR],[
737 if test -d "$withval"; then
738 CPPFLAGS="${CPPFLAGS} -I$withval/include"
739 LDFLAGS="${LDFLAGS} -L$withval/lib"
743 AC_CHECK_HEADER(zlib.h,
744 AC_CHECK_LIB(z, deflateInit2_,
747 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
748 CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
751 if test "$use_local_zlib" = yes ; then
752 AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, true)
753 AC_CONFIG_LINKS(zlib.h:zlib/zlib.h zconf.h:zlib/zconf.h )
754 ZLIBS="../zlib/libzlib.a"
756 AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, false)
762 # Allow users to append something to the version string without
763 # flagging it as development version. The user version parts is
764 # considered everything after a dash.
765 if test "$development_version" != yes; then
769 if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
770 development_version=yes
773 if test "$development_version" = yes; then
774 AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
775 [Defined if this is not a regular release])
778 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
782 # add some extra libs here so that previous tests don't fail for
783 # mysterious reasons - the final link step should bail out.
786 LIBS="$LIBS -lwsock32"
793 if test "$GCC" = yes; then
794 if test "$USE_MAINTAINER_MODE" = "yes"; then
795 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
797 CFLAGS="$CFLAGS -Wall"
804 if test "$print_egd_warning" = yes; then
807 *** The performance of the UNIX random gatherer module is not very good
808 *** and it does not keep the entropy pool over multiple invocations of
809 *** GnuPG. The suggested way to overcome this problem is to use the
811 *** Entropy Gathering Daemon (EGD)
813 *** which provides a entropy source for the whole system. It is written
814 *** in Perl and available at the GnuPG FTP servers. For more information
815 *** consult the GnuPG webpages:
817 *** http://www.gnupg.org/download.html#egd
819 *** You may want to run ./configure with --enable-static-rnd=egd to use it.
825 # Note the \\\\ for backslashes. Autoconf eats one layer, leaving \\
827 AC_SUBST(GNUPG_LIBEXECDIR,"${libexecdir}/gnupg")
829 AC_CONFIG_COMMANDS(g10defs.h,[[
830 cat >g10defs.tmp <<G10EOF
831 /* Generated automatically by configure */
832 #ifdef HAVE_DRIVE_LETTERS
833 #define G10_LOCALEDIR "c:\\\\lib\\\\gnupg\\\\locale"
834 #define GNUPG_LIBDIR "c:\\\\lib\\\\gnupg"
835 #define GNUPG_LIBEXECDIR "c:\\\\lib\\\\gnupg"
836 #define GNUPG_DATADIR "c:\\\\lib\\\\gnupg"
837 #define GNUPG_HOMEDIR "c:\\\\gnupg"
839 #define G10_LOCALEDIR "${datadir}/locale"
840 #define GNUPG_LIBDIR "${libdir}/gnupg"
841 #define GNUPG_LIBEXECDIR "${libexecdir}/gnupg"
842 #define GNUPG_DATADIR "${datadir}/gnupg"
844 #define GNUPG_HOMEDIR "/SYS\$LOGIN/gnupg"
846 #define GNUPG_HOMEDIR "~/.gnupg"
849 /* those are here to be redefined by handcrafted g10defs.h.
850 Please note that the string version must not contain more
851 than one character because the using code assumes strlen()==1 */
852 #ifdef HAVE_DOSISH_SYSTEM
853 #define DIRSEP_C '\\\\'
855 #define DIRSEP_S "\\\\"
864 cat mpi/mpi-asm-defs.h >>g10defs.tmp
865 if cmp -s g10defs.h g10defs.tmp 2>/dev/null; then
866 echo "g10defs.h is unchanged"
870 mv g10defs.tmp g10defs.h
871 echo "g10defs.h created"
875 exec_prefix=$exec_prefix
877 libexecdir=$libexecdir
879 DATADIRNAME=$DATADIRNAME
892 keyserver/gpgkeys_mailto
893 keyserver/gpgkeys_test
903 echo " Configured for: $PRINTABLE_OS_NAME ($target)"
904 if test -n "$show_extraasm"; then
905 echo " Extra cpu specific functions:$show_extraasm"