dnl (Process this file with autoconf to produce a configure script.)
dnlAC_REVISION($Revision$)dnl
-AC_PREREQ(2.52)
+AC_PREREQ(2.57)
# 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.3.3-cvs, bug-gnupg@gnu.org)
+AC_INIT(gnupg, 1.3.5-cvs, 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.
development_version=yes
-ALL_LINGUAS="de"
-
AC_CONFIG_AUX_DIR(scripts)
AC_CONFIG_SRCDIR(g10/g10.c)
-AC_CANONICAL_TARGET()
+AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature])
fi
+AC_MSG_CHECKING([whether OpenPGP card support is requested])
+AC_ARG_ENABLE(card-support,
+ [ --enable-card-support enable OpenPGP card support],
+ card_support=$enableval, card_support=no)
+AC_MSG_RESULT($card_support)
+
dnl See if we are disabling any algorithms or features for a smaller
dnl binary
-try_dynload=no
+try_extensions=no
+use_rsa=yes
use_idea=yes
use_cast5=yes
use_blowfish=yes
use_twofish=yes
use_sha256=yes
use_sha512=yes
+use_bzip2=yes
use_exec=yes
AC_ARG_ENABLE(minimal,
AC_HELP_STRING([--enable-minimal],[build the smallest gpg binary possible]),
+ use_rsa=no
use_idea=no
use_cast5=no
use_blowfish=no
use_twofish=no
use_sha256=no
use_sha512=no
+ use_bzip2=no
use_exec=no)
+AC_MSG_CHECKING([whether to enable the RSA public key algorithm])
+AC_ARG_ENABLE(rsa,
+ AC_HELP_STRING([--disable-rsa],[disable the RSA public key algorithm]),
+ use_rsa=$enableval)
+AC_MSG_RESULT($use_rsa)
+if test x"$use_rsa" = xyes ; then
+ AC_DEFINE(USE_RSA,1,[Define to include the RSA public key algorithm])
+fi
+
AC_MSG_CHECKING([whether to enable the IDEA cipher])
AC_ARG_ENABLE(idea,
AC_HELP_STRING([--disable-idea],[disable the IDEA cipher]),
else
IDEA_O=idea-stub.o
tmp=no
- try_dynload=yes
+ try_extensions=yes
fi
AC_SUBST(IDEA_O)
AC_MSG_RESULT($tmp)
use_sha512=$enableval)
AC_MSG_RESULT($use_sha512)
+dnl BZLIB is defined only after we confirm the library is available later
+AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
+AC_ARG_ENABLE(bzip2,
+ AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
+ use_bzip2=$enableval)
+AC_MSG_RESULT($use_bzip2)
+
AC_MSG_CHECKING([whether to enable external program execution])
AC_ARG_ENABLE(exec,
AC_HELP_STRING([--disable-exec],[disable all external program execution]),
#define EXEC_TEMPFILE_ONLY
#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"
])
try_gettext=yes
have_dosish_system=no
+need_dlopen=yes
case "${target}" in
*-*-mingw32*)
# special stuff for Windoze NT
MingW32 systems and these systems lack Posix functions,
we use a simplified version of gettext])
have_dosish_system=yes
+ need_dlopen=no
try_gettext="no"
;;
i?86-emx-os2 | i?86-*-os2*emx )
AC_SEARCH_LIBS(__dn_skipname,resolv bind,,use_dns_srv=no))
if test x"$use_dns_srv" = xyes ; then
+
+ # Make sure that the BIND 4 resolver interface is workable before
+ # enabling SRVs. At some point I'll rewrite the code to use the
+ # BIND 8 resolver API.
+
+ 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);]])],,use_dns_srv=no)
+ fi
+
+ if test x"$use_dns_srv" = xyes ; then
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
SRVLIBS=$LIBS
else
- AC_MSG_WARN([Resolver functions not found. Disabling DNS SRV.])
+ AC_MSG_NOTICE([Resolver functions not found or not usable. Disabling DNS SRV.])
fi
LIBS=$_srv_save_libs
fi
;;
i?86-*-msdosdjgpp*)
PRINTABLE_OS_NAME="MSDOS/DJGPP"
- try_dynload=no
+ try_extensions=no
;;
*-linux*)
PRINTABLE_OS_NAME="GNU/Linux"
;;
-dnl let that after linux to avoid gnu-linux problems
- *-gnu*)
- PRINTABLE_OS_NAME="GNU/Hurd"
- ;;
*)
PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
;;
AC_SUBST(BUILD_INCLUDED_LIBINTL)
fi
-if test "$try_dynload" = yes ; then
- AC_CHECK_FUNC(dlopen,,AC_CHECK_LIB(dl,dlopen,found_dlopen=yes))
- if test x"$found_dlopen" = "xyes" ; then
- AC_DEFINE(USE_DYNAMIC_LINKING,1,[define to enable the use of extensions])
- AC_DEFINE(HAVE_DL_DLOPEN,1,
- [Defined when the dlopen function family is available])
- AC_SUBST(DLLIBS,"-ldl")
+if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
+ if test "$need_dlopen" = yes; then
+ _dl_save_libs=$LIBS
+ LIBS=""
+ AC_SEARCH_LIBS(dlopen,dl,found_dlopen=yes)
+ if test x"$found_dlopen" = "xyes" ; then
+ AC_DEFINE(HAVE_DL_DLOPEN,1,
+ [Defined when the dlopen function family is available])
+ DLLIBS=$LIBS
+ else
+ if test "$try_extensions" = yes ; then
+ AC_MSG_NOTICE([dlopen not found. Disabling extensions.])
+ try_extensions=no
+ fi
+
+ if test "$card_support" = yes ; then
+ AC_MSG_WARN([dlopen not found. Disabling OpenPGP card support.])
+ card_support=no
+ fi
+ fi
+ LIBS=$_dl_save_libs
fi
-else
- AC_MSG_CHECKING(for dynamic loading)
- AC_MSG_RESULT(has been disabled)
fi
+AC_SUBST(DLLIBS)
+
+if test "$card_support" = yes ; then
+ AC_DEFINE(ENABLE_CARD_SUPPORT,1,[Define to include OpenPGP card support])
+fi
+
+if test "$try_extensions" = yes ; then
+ AC_DEFINE(USE_DYNAMIC_LINKING,1,[Define to enable the use of extensions])
+fi
+
+AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes)
dnl Checks for header files.
AC_HEADER_STDC
&& test "$ac_cv_sizeof_unsigned_long" != "8" \
&& test "$ac_cv_sizeof_unsigned_long_long" != "8" \
&& test x"$ac_cv_sizeof_uint64_t" != "x8"; then
- AC_MSG_WARN([No 64-bit types. Disabling SHA-384 and SHA-512])
+ AC_MSG_NOTICE([No 64-bit types. Disabling SHA-384 and SHA-512.])
else
if test x"$use_sha512" = xyes ; then
AC_SUBST(SHA512_O,sha512.o)
else
AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, false)
fi
+
+if test "$use_bzip2" = yes ; then
+ _cppflags="${CPPFLAGS}"
+ _ldflags="${LDFLAGS}"
+ AC_ARG_WITH(bzip2,
+ AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
+ [
+ if test -d "$withval" ; then
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LDFLAGS="${LDFLAGS} -L$withval/lib"
+ fi
+ ],withval="")
+
+ if test "$withval" != no ; then
+ AC_CHECK_HEADER(bzlib.h,
+ AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
+ [
+ have_bz2=yes
+ ZLIBS="$ZLIBS -lbz2"
+ AC_DEFINE(HAVE_BZIP2,1,
+ [Defined if the bz2 compression library is available])
+ ],
+ CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
+ CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
+ fi
+fi
+
+AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
AC_SUBST(ZLIBS)
+#
+# libusb allows us to use the integrated CCID smartcard reader driver.
+#
+# Note, that we need the CVS (unstable) version.
+#
+LIBUSB_LIBS=""
+if test "$card_support" = yes; then
+ AC_CHECK_LIB(usb, usb_find_device,
+ [ LIBUSB_LIBS="$LIBUSB_LIBS -lusb"
+ AC_DEFINE(HAVE_LIBUSB,1,
+ [defined if libusb is available])
+ ])
+fi
+AC_SUBST(LIBUSB_LIBS)
+
+
+
# Allow users to append something to the version string without
# flagging it as development version. The user version parts is
# considered everything after a dash.
#define EXTSEP_S "."
#endif
/* This is the same as VERSION, but should be overridden if the
- platform cannot handle things like dots '.' in filenames. */
-#define SAFE_VERSION VERSION
+ 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
AC_CONFIG_FILES([
Makefile
+m4/Makefile
intl/Makefile
po/Makefile.in
util/Makefile