-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])
[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
_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"
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
***]])
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