-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.
# Set my_issvn to "yes" for non-released code. Remember to run an
-# "svn up" and "autogen.sh" right before creating a distribution.
-m4_define([my_version], [1.4.7])
-m4_define([my_issvn], [yes])
-
-m4_define([svn_revision], m4_esyscmd([echo -n $((svn info 2>/dev/null \
- || echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
-AC_INIT([gnupg], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
+# "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
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)
use_blowfish=yes
use_aes=yes
use_twofish=yes
+use_camellia=yes
use_sha256=yes
use_sha512=yes
use_bzip2=yes
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-224 and SHA-256 digests]),
use_sha256=$enableval)
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])
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)
# endif
#endif
+/* 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 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
_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,,have_resolver=no))
- AC_SEARCH_LIBS(dn_expand,resolv bind,,
- AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
- AC_SEARCH_LIBS(dn_skipname,resolv bind,,
- AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
+ 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
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],,,[fake_curl=yes])
+LIBCURL_CHECK_CONFIG([yes],[7.10],,[fake_curl=yes])
AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
# Generic, for us, means curl
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 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)
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"