-dnl configure.ac script for GnuPG
-dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-dnl 2006 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GnuPG.
-dnl
-dnl GnuPG is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl GnuPG is distributed in the hope that it will be useful,g
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-dnl MA 02110-1301, USA
-dnl
-dnl (Process this file with autoconf to produce a configure script.)
+# configure.ac script for GnuPG
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+# 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is part of GnuPG.
+#
+# GnuPG is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GnuPG is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# (Process this file with autoconf to produce a configure script.)
AC_PREREQ(2.59)
min_automake_version="1.9.3"
-# Remember to change the version number immediately *after* a release
-# and remove the "-cvs" or "rc" suffix immediately *before* a release.
-AC_INIT(gnupg, 1.4.3-cvs, bug-gnupg@gnu.org)
+# Remember to change the version number immediately *after* a release.
+# Set my_issvn to "yes" for non-released code. Remember to run an
+# "svn up" and "autogen.sh --force" right before creating a distribution.
+m4_define([my_version], [1.4.10rc1])
+m4_define([my_issvn], [no])
+m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
+ | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
+AC_INIT([gnupg],
+ [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
+ [bug-gnupg@gnu.org])
# Set development_version to yes if the minor number is odd or you
# feel that the default check for a development version is not
# sufficient.
AC_CONFIG_SRCDIR(g10/gpg.c)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([std-options])
+AB_INIT
AM_CONFIG_HEADER(config.h)
AC_GNU_SOURCE
dnl
AC_MSG_CHECKING([which random module to use])
AC_ARG_ENABLE(static-rnd,
- [ --enable-static-rnd=[egd|unix|linux|auto] ],
-[use_static_rnd=$enableval], [use_static_rnd=default] )
+ AC_HELP_STRING([[--enable-static-rnd=[egd|unix|linux|auto]]],
+ [specify a random number source]),
+ [use_static_rnd=$enableval], [use_static_rnd=default])
if test "$use_static_rnd" = no; then
use_static_rnd=default
esac
AC_ARG_WITH(egd-socket,
- [ --with-egd-socket=NAME use NAME for the EGD socket],
+ AC_HELP_STRING([--with-egd-socket=NAME],[use NAME for the EGD socket]),
egd_socket_name="$withval", egd_socket_name="" )
AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name",
[Define if you don't want the default EGD socket name.
AC_MSG_CHECKING([whether use of /dev/random is requested])
AC_ARG_ENABLE(dev-random,
-[ --disable-dev-random disable the use of dev random],
- try_dev_random=$enableval, try_dev_random=yes)
+ AC_HELP_STRING([--disable-dev-random],[disable the use of dev random]),
+ try_dev_random=$enableval, try_dev_random=yes)
AC_MSG_RESULT($try_dev_random)
AC_MSG_CHECKING([whether assembler modules are requested])
AC_ARG_ENABLE(asm,
-[ --disable-asm do not use assembler modules],
+ AC_HELP_STRING([--disable-asm],[do not use assembler modules]),
try_asm_modules=$enableval, try_asm_modules=yes)
AC_MSG_RESULT($try_asm_modules)
-AC_MSG_CHECKING([whether memory guard is requested])
-AC_ARG_ENABLE(m-guard,
- [ --enable-m-guard enable memory guard facility],
- use_m_guard=$enableval, use_m_guard=no)
-AC_MSG_RESULT($use_m_guard)
-if test "$use_m_guard" = yes ; then
- AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature])
-fi
-
-# We don't have a test to check whether as(1) knows about the
-# non executable stack option. Thus we provide an option to enable
-# it.
-AC_MSG_CHECKING([whether non excutable stack support is requested])
-AC_ARG_ENABLE(noexecstack,
- AC_HELP_STRING([--enable-noexecstack],
- [enable non executable stack support (gcc only)]),
- noexecstack_support=$enableval, noexecstack_support=no)
-AC_MSG_RESULT($noexecstack_support)
+dnl AC_MSG_CHECKING([whether memory guard is requested])
+dnl AC_ARG_ENABLE(m-guard,
+dnl [ --enable-m-guard enable memory guard facility],
+dnl use_m_guard=$enableval, use_m_guard=no)
+dnl AC_MSG_RESULT($use_m_guard)
+dnl if test "$use_m_guard" = yes ; then
+dnl AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature])
+dnl fi
# SELinux support includes tracking of sensitive files to avoid
# leaking their contents through processing these files by gpg itself
try_extensions=no
+try_gettext=yes
+try_dns=yes
use_rsa=yes
use_idea=yes
use_cast5=yes
use_blowfish=yes
use_aes=yes
use_twofish=yes
+use_camellia=yes
use_sha256=yes
use_sha512=yes
use_bzip2=yes
AC_ARG_ENABLE(minimal,
AC_HELP_STRING([--enable-minimal],[build the smallest gpg binary possible]),
+ try_gettext=no
+ try_dns=no
use_rsa=no
use_idea=no
use_cast5=no
use_blowfish=no
use_aes=no
use_twofish=no
+ use_camellia=no
use_sha256=no
use_sha512=no
use_bzip2=no
AC_DEFINE(USE_TWOFISH,1,[Define to include the TWOFISH cipher])
fi
-AC_MSG_CHECKING([whether to enable the SHA-256 digest])
+AC_MSG_CHECKING([whether to enable the CAMELLIA cipher])
+AC_ARG_ENABLE(camellia,
+ AC_HELP_STRING([--enable-camellia],[enable the CAMELLIA cipher]),
+ use_camellia=$enableval)
+AC_MSG_RESULT($use_camellia)
+if test x"$use_camellia" = xyes ; then
+ AC_DEFINE(USE_CAMELLIA,1,[Define to include the CAMELLIA cipher])
+fi
+
+AC_MSG_CHECKING([whether to enable the SHA-224 and SHA-256 digests])
AC_ARG_ENABLE(sha256,
- AC_HELP_STRING([--disable-sha256],[disable the SHA-256 digest]),
+ AC_HELP_STRING([--disable-sha256],[disable the SHA-224 and SHA-256 digests]),
use_sha256=$enableval)
AC_MSG_RESULT($use_sha256)
if test x"$use_sha256" = xyes ; then
- AC_DEFINE(USE_SHA256,1,[Define to include the SHA-256 digest])
+ AC_DEFINE(USE_SHA256,1,[Define to include the SHA-224 and SHA-256 digests])
fi
dnl SHA512 is defined only after we confirm 64-bit support later
if test "$use_exec" = yes ; then
AC_MSG_CHECKING([whether to enable photo ID viewing])
AC_ARG_ENABLE(photo-viewers,
- [ --disable-photo-viewers disable photo ID viewers],
+ AC_HELP_STRING([--disable-photo-viewers],[disable photo ID viewers]),
[if test "$enableval" = no ; then
AC_DEFINE(DISABLE_PHOTO_VIEWER,1,[define to disable photo viewing])
fi],enableval=yes)
if test "$gnupg_cv_enable_photo_viewers" = yes ; then
AC_MSG_CHECKING([whether to use a fixed photo ID viewer])
AC_ARG_WITH(photo-viewer,
- [ --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer],
+ AC_HELP_STRING([--with-photo-viewer=FIXED_VIEWER],
+ [set a fixed photo ID viewer]),
[if test "$withval" = yes ; then
withval=no
elif test "$withval" != no ; then
AC_MSG_CHECKING([whether to enable external keyserver helpers])
AC_ARG_ENABLE(keyserver-helpers,
- [ --disable-keyserver-helpers disable all external keyserver support],
+ AC_HELP_STRING([--disable-keyserver-helpers],
+ [disable all external keyserver support]),
[if test "$enableval" = no ; then
AC_DEFINE(DISABLE_KEYSERVER_HELPERS,1,
[define to disable keyserver helpers])
try_finger=$enableval, try_finger=yes)
AC_MSG_RESULT($try_finger)
+ AC_MSG_CHECKING([whether generic object key fetching support is requested])
+ AC_ARG_ENABLE(generic,
+ AC_HELP_STRING([--disable-generic],
+ [disable generic object key fetching interface only]),
+ try_generic=$enableval, try_generic=yes)
+ AC_MSG_RESULT($try_generic)
+
AC_MSG_CHECKING([whether email keyserver support is requested])
AC_ARG_ENABLE(mailto,
AC_HELP_STRING([--enable-mailto],
[enable email keyserver interface only]),
try_mailto=$enableval, try_mailto=no)
AC_MSG_RESULT($try_mailto)
- fi
-
- AC_MSG_CHECKING([whether keyserver exec-path is enabled])
- AC_ARG_ENABLE(keyserver-path,
- AC_HELP_STRING([--disable-keyserver-path],
- [disable the exec-path option for keyserver helpers]),
- [if test "$enableval" = no ; then
- disable_keyserver_path=yes
- fi],enableval=yes)
- AC_MSG_RESULT($enableval)
fi
+ AC_MSG_CHECKING([whether keyserver exec-path is enabled])
+ AC_ARG_ENABLE(keyserver-path,
+ AC_HELP_STRING([--disable-keyserver-path],
+ [disable the exec-path option for keyserver helpers]),
+ [if test "$enableval" = no ; then
+ disable_keyserver_path=yes
+ fi],enableval=yes)
+ AC_MSG_RESULT($enableval)
+fi
+
AC_MSG_CHECKING([whether the included zlib is requested])
AC_ARG_WITH(included-zlib,
- [ --with-included-zlib use the zlib code included here],
+ AC_HELP_STRING([--with-included-zlib],[use the zlib code included here]),
[g10_force_zlib="$withval"], [g10_force_zlib=no] )
AC_MSG_RESULT($g10_force_zlib)
dnl
AC_MSG_CHECKING([whether use of capabilities is requested])
AC_ARG_WITH(capabilities,
- [ --with-capabilities use linux capabilities [default=no]],
+ AC_HELP_STRING([--with-capabilities],
+ [use linux capabilities [default=no]]),
[use_capabilities="$withval"],[use_capabilities=no])
AC_MSG_RESULT($use_capabilities)
/* We didn't define endianness above, so get it from OS macros. This
is intended for making fat binary builds on OS X. */
#if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
-#if defined(__BIG_ENDIAN__)
-#define BIG_ENDIAN_HOST 1
-#elif defined(__LITTLE_ENDIAN__)
-#define LITTLE_ENDIAN_HOST 1
+# if defined(__BIG_ENDIAN__)
+# define BIG_ENDIAN_HOST 1
+# elif defined(__LITTLE_ENDIAN__)
+# define LITTLE_ENDIAN_HOST 1
+# else
+# error "No endianness found"
+# endif
+#endif
+
+#if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
+# define EXEC_TEMPFILE_ONLY
+#endif
+
+/* Please note that the string version must not contain more
+ than one character because the using code assumes strlen()==1 */
+#ifdef HAVE_DOSISH_SYSTEM
+# define DIRSEP_C '\\'
+# define EXTSEP_C '.'
+# define DIRSEP_S "\\"
+# define EXTSEP_S "."
+# define PATHSEP_C ';'
+# define PATHSEP_S ";"
#else
-#error "No endianness found"
+# define DIRSEP_C '/'
+# define EXTSEP_C '.'
+# define DIRSEP_S "/"
+# define EXTSEP_S "."
+# define PATHSEP_C ':'
+# define PATHSEP_S ":"
#endif
+
+
+/* For some OSes we need to use fixed strings for certain directories. */
+#ifdef HAVE_DRIVE_LETTERS
+# define LOCALEDIR "c:\\\\lib\\\\gnupg\\\\locale"
+# define GNUPG_LIBDIR "c:\\\\lib\\\\gnupg"
+# define GNUPG_LIBEXECDIR "c:\\\\lib\\\\gnupg"
+# define GNUPG_DATADIR "c:\\\\lib\\\\gnupg"
+# define GNUPG_HOMEDIR "c:\\\\gnupg"
+#else
+# ifdef __VMS
+# define GNUPG_HOMEDIR "/SYS\$LOGIN/gnupg"
+# else
+# define GNUPG_HOMEDIR "~/.gnupg"
+# endif
#endif
-#if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
-#define EXEC_TEMPFILE_ONLY
+/* Hack used for W32: ldap.m4 also tests for the ASCII version of
+ ldap_start_tls_s because that is the actual symbol used in the
+ library. winldap.h redefines it to our commonly used value,
+ thus we define our usual macro here. */
+#ifdef HAVE_LDAP_START_TLS_SA
+# ifndef HAVE_LDAP_START_TLS_S
+# define HAVE_LDAP_START_TLS_S 1
+# endif
#endif
/* This is the major version number of GnuPG so that
source included files can test for this. */
#define GNUPG_MAJOR_VERSION 1
-#include "g10defs.h"
+/* This is the same as VERSION, but should be overridden if the
+ platform cannot handle things like dots'.' in filenames. Set
+ SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
+ uses for dots and dashes. */
+#define SAFE_VERSION VERSION
+#define SAFE_VERSION_DOT '.'
+#define SAFE_VERSION_DASH '-'
+
+/* We want to use our memory allocator for estream-printf. */
+#define _ESTREAM_PRINTF_MALLOC xtrymalloc
+#define _ESTREAM_PRINTF_FREE xfree
+#define _ESTREAM_PRINTF_EXTRA_INCLUDE "memory.h"
#endif /*GNUPG_CONFIG_H_INCLUDED*/
])
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_PROG_CC
+AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_RANLIB
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no)
AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes)
GNUPG_CHECK_FAQPROG
-GNUPG_CHECK_DOCBOOK_TO_TEXI
GNUPG_CHECK_USTAR
+
+# According to a comment by Marcus Brinkman in libgpg-error, the
+# AC_PROG_CC_FOR_BUILD macro in the AC archive is broken for autoconf
+# 2.57. Thus we use a simply use "cc" if we are cross-compiling.
+AC_MSG_CHECKING(for cc for build)
+if test "$cross_compiling" = "yes"; then
+ CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
+else
+ CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
+fi
+AC_MSG_RESULT($CC_FOR_BUILD)
+AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
+
+
+
MPI_OPT_FLAGS=""
-try_gettext=yes
have_dosish_system=no
need_dlopen=yes
case "${host}" in
;;
*-dec-osf5*)
if test -z "$GCC" ; then
- # Use the newer compiler `-msg_disable ptrmismatch' to
+ # Use the newer compiler `-msg_disable ptrmismatch1' to
# get rid of the unsigned/signed char mismatch warnings.
# Using this may hide other pointer mismatch warnings, but
# it at least lets other warning classes through
- CFLAGS="$CFLAGS -msg_disable ptrmismatch"
+ CFLAGS="$CFLAGS -msg_disable ptrmismatch1"
fi
;;
m68k-atari-mint)
dnl Now try for the resolver functions so we can use DNS for SRV, PKA,
dnl and CERT.
-if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
- AC_ARG_ENABLE(dns-srv,
- AC_HELP_STRING([--disable-dns-srv],
- [disable the use of DNS SRV in HKP and HTTP]),
- use_dns_srv=$enableval,use_dns_srv=yes)
-fi
+if test x"$try_dns" = xyes ; then
+ if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
+ AC_ARG_ENABLE(dns-srv,
+ AC_HELP_STRING([--disable-dns-srv],
+ [disable the use of DNS SRV in HKP and HTTP]),
+ use_dns_srv=$enableval,use_dns_srv=yes)
+ fi
-AC_ARG_ENABLE(dns-pka,
- AC_HELP_STRING([--disable-dns-pka],
- [disable the use of PKA records in DNS]),
- use_dns_pka=$enableval,use_dns_pka=yes)
+ AC_ARG_ENABLE(dns-pka,
+ AC_HELP_STRING([--disable-dns-pka],
+ [disable the use of PKA records in DNS]),
+ use_dns_pka=$enableval,use_dns_pka=yes)
-AC_ARG_ENABLE(dns-cert,
- AC_HELP_STRING([--disable-dns-cert],
- [disable the use of CERT records in DNS]),
- use_dns_cert=$enableval,use_dns_cert=yes)
+ AC_ARG_ENABLE(dns-cert,
+ AC_HELP_STRING([--disable-dns-cert],
+ [disable the use of CERT records in DNS]),
+ use_dns_cert=$enableval,use_dns_cert=yes)
+fi
if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns_cert" = xyes; then
- _srv_save_libs=$LIBS
+ _dns_save_libs=$LIBS
LIBS=""
# the double underscore thing is a glibc-ism?
- AC_SEARCH_LIBS(res_query,resolv bind,,
- AC_SEARCH_LIBS(__res_query,resolv bind,,use_dns_srv=no))
- AC_SEARCH_LIBS(dn_expand,resolv bind,,
- AC_SEARCH_LIBS(__dn_expand,resolv bind,,use_dns_srv=no))
- AC_SEARCH_LIBS(dn_skipname,resolv bind,,
- AC_SEARCH_LIBS(__dn_skipname,resolv bind,,use_dns_srv=no))
-
- # Make sure that the BIND 4 resolver interface is workable before
- # enabling any code that calls it. At some point I'll rewrite the
- # code to use the BIND 8 resolver API.
-
- AC_MSG_CHECKING([whether the resolver is usable])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
+ AC_SEARCH_LIBS(res_query,resolv bind socket,,
+ AC_SEARCH_LIBS(__res_query,resolv bind socket,,have_resolver=no))
+ AC_SEARCH_LIBS(dn_expand,resolv bind socket,,
+ AC_SEARCH_LIBS(__dn_expand,resolv bind socket,,have_resolver=no))
+ AC_SEARCH_LIBS(dn_skipname,resolv bind socket,,
+ AC_SEARCH_LIBS(__dn_skipname,resolv bind socket,,have_resolver=no))
+
+ if test x"$have_resolver" != xno ; then
+
+ # Make sure that the BIND 4 resolver interface is workable before
+ # enabling any code that calls it. At some point I'll rewrite the
+ # code to use the BIND 8 resolver API.
+
+ AC_MSG_CHECKING([whether the resolver is usable])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>],
-[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);]])],have_resolver=yes,have_resolver=no)
- AC_MSG_RESULT($have_resolver)
+[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],have_resolver=yes,have_resolver=no)
+ AC_MSG_RESULT($have_resolver)
-# This is Apple-specific and somewhat bizarre as they changed the
-# define in bind 8 for some reason.
+ # This is Apple-specific and somewhat bizarre as they changed the
+ # define in bind 8 for some reason.
- if test x"$have_resolver" != xyes ; then
- AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
+ if test x"$have_resolver" != xyes ; then
+ AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>],
-[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);]])],[have_resolver=yes ; need_compat=yes])
- AC_MSG_RESULT($have_resolver)
+[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],[have_resolver=yes ; need_compat=yes])
+ AC_MSG_RESULT($have_resolver)
+ fi
fi
if test x"$have_resolver" = xyes ; then
- SRVLIBS=$LIBS
+ DNSLIBS=$LIBS
if test x"$use_dns_srv" = xyes ; then
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
fi
if test x"$need_compat" = xyes ; then
- AC_DEFINE(BIND_8_COMPAT,1,[an Appleism])
+ AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
fi
else
use_dns_srv=no
use_dns_cert=no
fi
- LIBS=$_srv_save_libs
+ LIBS=$_dns_save_libs
fi
-AC_SUBST(SRVLIBS)
+AC_SUBST(DNSLIBS)
AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
GNUPG_CHECK_LDAP($NETLIBS)
fi
-# Which keyserver helpers are we building?
-
-AC_ARG_ENABLE(old-keyserver-helpers,
- AC_HELP_STRING([--enable-old-keyserver-helpers],[enable old keyserver helpers]),old_ks=$enableval,old_ks=no)
-
-if test "$old_ks" = yes ; then
- AC_SUBST(GPGKEYS_HTTP,"gpgkeys_http$EXEEXT")
-else
- LIBCURL_CHECK_CONFIG([yes],,[with_curl=yes],[fake_curl=yes])
- AC_SUBST(GPGKEYS_CURL,"gpgkeys_curl$EXEEXT")
-fi
+# Check for curl. We fake the curl API if libcurl isn't installed.
+# We require 7.10 or better as we use curl_version_info().
+LIBCURL_CHECK_CONFIG([yes],[7.10],,[fake_curl=yes])
AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
-AM_CONDITIONAL(WITH_CURL,test x"$with_curl" = xyes || test x"$fake_curl" = xyes)
-if test x"$fake_curl" = xyes ; then
- AC_DEFINE(FAKE_CURL,1,[define to fake the libcurl API internally])
+# Generic, for us, means curl
+
+if test x"$try_generic" = xyes ; then
+ AC_SUBST(GPGKEYS_CURL,"gpgkeys_curl$EXEEXT")
fi
dnl This isn't necessarily sendmail itself, but anything that gives a
dnl postfix, etc. Basically, anything that can handle "sendmail -t".
if test "$try_mailto" = yes ; then
- AC_ARG_WITH(mailprog,[ --with-mailprog=NAME use "NAME -t" for mail transport],,with_mailprog=yes)
+ AC_ARG_WITH(mailprog,
+ AC_HELP_STRING([--with-mailprog=NAME],
+ [use "NAME -t" for mail transport]),,with_mailprog=yes)
if test "$with_mailprog" = yes ; then
AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
dnl Checks for libraries.
-AM_GNU_GETTEXT_VERSION(0.14.1)
+AM_PO_SUBDIRS
+AM_GNU_GETTEXT_VERSION([0.16.1])
if test "$try_gettext" = yes; then
AM_GNU_GETTEXT(,[need-ngettext])
-
# gettext requires some extra checks. These really should be part of
# the basic AM_GNU_GETTEXT macro. TODO: move other gettext-specific
# function checks to here.
-
AC_CHECK_FUNCS(strchr)
else
+ enable_nls=no
USE_NLS=no
USE_INCLUDED_LIBINTL=no
BUILD_INCLUDED_LIBINTL=no
+ POSUB=po
AC_SUBST(USE_NLS)
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(BUILD_INCLUDED_LIBINTL)
- AM_PO_SUBDIRS
+ AC_SUBST(POSUB)
fi
+
if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
if test "$need_dlopen" = yes; then
_dl_save_libs=$LIBS
AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_SIZEOF(unsigned long long)
+AC_CHECK_SIZEOF(time_t,,[[
+#include <stdio.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+]])
# Ensure that we have UINT64_C before we bother to check for uint64_t
AC_CHECK_HEADERS([inttypes.h])
AC_FUNC_FSEEKO
AC_FUNC_VPRINTF
AC_FUNC_FORK
-AC_CHECK_FUNCS(strerror stpcpy strsep strlwr tcgetattr strtoul mmap)
+AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr strtoul mmap sysconf)
AC_CHECK_FUNCS(strcasecmp strncasecmp ctermid times unsetenv getpwnam getpwuid)
AC_CHECK_FUNCS(memmove gettimeofday getrusage setrlimit clock_gettime)
AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale)
AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat getaddrinfo)
AC_CHECK_FUNCS(fcntl ftruncate)
-AC_REPLACE_FUNCS(mkdtemp timegm isascii memrchr)
+AC_REPLACE_FUNCS(mkdtemp timegm isascii memrchr strsep)
AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
GNUPG_CHECK_MLOCK
GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
+#
+# Prepare building of estream-printf
+#
+estream_PRINTF_INIT
+
+
dnl
dnl Check whether we can use Linux capabilities as requested
dnl
[define if the shared memory interface should be made available])
fi
+AM_CONDITIONAL(HAVE_SHM, test "$ac_cv_header_sys_shm_h" = yes)
+
dnl
dnl check whether we have a random device
dnl
if test "$use_regex" = yes ; then
AC_MSG_CHECKING([whether the included regex lib is requested])
AC_ARG_WITH(included-regex,
- [ --with-included-regex use the included GNU regex library],
+ AC_HELP_STRING([--with-included-regex],
+ [use the included GNU regex library]),
[gnupg_cv_included_regex="$withval"],[gnupg_cv_included_regex=no])
AC_MSG_RESULT($gnupg_cv_included_regex)
_ldflags="${LDFLAGS}"
AC_ARG_WITH(zlib,
- [ --with-zlib=DIR use libz in DIR],[
+ AC_HELP_STRING([--with-zlib=DIR],[use libz in DIR]),[
if test -d "$withval"; then
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
if test "$use_local_zlib" = yes ; then
- AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, true)
AC_CONFIG_LINKS(zlib.h:zlib/zlib.h zconf.h:zlib/zconf.h )
ZLIBS="../zlib/libzlib.a"
-else
- AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, false)
fi
+AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, test "$use_local_zlib" = yes)
+
if test "$use_bzip2" = yes ; then
_cppflags="${CPPFLAGS}"
_ldflags="${LDFLAGS}"
AC_SUBST(ZLIBS)
# libusb allows us to use the integrated CCID smartcard reader driver.
-GNUPG_CHECK_LIBUSB
+# We don't need it if we don't have card support though.
+if test "$card_support" = yes ; then
+ GNUPG_CHECK_LIBUSB
+fi
# Check for readline support
GNUPG_CHECK_READLINE
CFLAGS="$CFLAGS -Wall"
fi
+ # This is handy for debugging so the compiler doesn't rearrange
+ # things and eliminate variables.
+ AC_ARG_ENABLE(optimization,
+ AC_HELP_STRING([--disable-optimization],
+ [disable compiler optimization]),
+ [if test $enableval = no ; then
+ CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
+ fi])
+
AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
_gcc_cflags_save=$CFLAGS
if test x"$_gcc_psign" = xyes ; then
CFLAGS="$CFLAGS -Wno-pointer-sign"
fi
-
- # Non exec stack hack. Fixme: Write a test to check whether as
- # can cope with it and use the enable-noexecstack option only to
- # disable it in case it is required on sime platforms.
- if test "$noexecstack_support" = yes; then
- NOEXECSTACK_FLAGS="-Wa,--noexecstack"
- fi
fi
-AC_SUBST(NOEXECSTACK_FLAGS)
+CL_AS_NOEXECSTACK
if test "$print_egd_warning" = yes; then
AC_MSG_WARN([[
***]])
fi
-# Note the \\\\ for backslashes. Autoconf eats one layer, leaving \\
-
-AC_CONFIG_COMMANDS(g10defs.h,[[
-cat >g10defs.tmp <<G10EOF
-/* Generated automatically by configure */
-#ifdef HAVE_DRIVE_LETTERS
-#define G10_LOCALEDIR "c:\\\\lib\\\\gnupg\\\\locale"
-#define GNUPG_LIBDIR "c:\\\\lib\\\\gnupg"
-#define GNUPG_LIBEXECDIR "c:\\\\lib\\\\gnupg"
-#define GNUPG_DATADIR "c:\\\\lib\\\\gnupg"
-#define GNUPG_HOMEDIR "c:\\\\gnupg"
-#else
-#define G10_LOCALEDIR "${datadir}/locale"
-#define GNUPG_LIBDIR "${libdir}/gnupg"
-#define GNUPG_DATADIR "${datadir}/gnupg"
-#ifdef __VMS
-#define GNUPG_HOMEDIR "/SYS\$LOGIN/gnupg"
-#else
-#define GNUPG_HOMEDIR "~/.gnupg"
-#endif
-#endif
-/* those are here to be redefined by handcrafted g10defs.h.
- Please note that the string version must not contain more
- than one character because the using code assumes strlen()==1 */
-#ifdef HAVE_DOSISH_SYSTEM
-#define DIRSEP_C '\\\\'
-#define EXTSEP_C '.'
-#define DIRSEP_S "\\\\"
-#define EXTSEP_S "."
-#define PATHSEP_C ';'
-#define PATHSEP_S ";"
-#else
-#define DIRSEP_C '/'
-#define EXTSEP_C '.'
-#define DIRSEP_S "/"
-#define EXTSEP_S "."
-#define PATHSEP_C ':'
-#define PATHSEP_S ":"
-#endif
-/* This is the same as VERSION, but should be overridden if the
- platform cannot handle things like dots'.' in filenames. Set
- SAFE_VERSION_DOT and SAFE_VERSION_DASH to whatever SAFE_VERSION
- uses for dots and dashes. */
-#define SAFE_VERSION VERSION
-#define SAFE_VERSION_DOT '.'
-#define SAFE_VERSION_DASH '-'
-G10EOF
-cat mpi/mpi-asm-defs.h >>g10defs.tmp
-if cmp -s g10defs.h g10defs.tmp 2>/dev/null; then
- echo "g10defs.h is unchanged"
- rm -f g10defs.tmp
-else
- rm -f g10defs.h
- mv g10defs.tmp g10defs.h
- echo "g10defs.h created"
-fi
-]],[[
-prefix=$prefix
-exec_prefix=$exec_prefix
-libdir=$libdir
-libexecdir=$libexecdir
-datadir=$datadir
-DATADIRNAME=$DATADIRNAME
-]])
-
-
AC_CONFIG_FILES([
Makefile
m4/Makefile
# Give some feedback
echo
+echo " Version info: $PACKAGE_STRING"
echo " Configured for: $PRINTABLE_OS_NAME ($host)"
if test -n "$show_extraasm"; then
echo " Extra cpu specific functions:$show_extraasm"