1997-11-18 15:06:00 +01:00
|
|
|
dnl
|
1998-02-24 19:50:46 +01:00
|
|
|
dnl Configure template for GNUPG
|
1997-11-18 15:06:00 +01:00
|
|
|
dnl
|
|
|
|
dnl (Process this file with autoconf to produce a configure script.)
|
1998-11-10 13:59:59 +01:00
|
|
|
AC_REVISION($Revision$)dnl
|
1997-11-18 15:06:00 +01:00
|
|
|
|
1998-10-21 19:34:36 +02:00
|
|
|
dnl Must reset CDPATH so that bash's cd does not print to stdout
|
|
|
|
CDPATH=
|
|
|
|
|
1997-11-18 15:06:00 +01:00
|
|
|
AC_INIT(g10/g10.c)
|
|
|
|
AC_CONFIG_AUX_DIR(scripts)
|
1998-02-02 15:36:06 +01:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
1997-11-18 15:06:00 +01:00
|
|
|
|
1997-12-23 18:30:18 +01:00
|
|
|
|
1998-01-24 17:32:27 +01:00
|
|
|
VERSION=`cat $srcdir/VERSION`
|
1998-02-24 19:50:46 +01:00
|
|
|
PACKAGE=gnupg
|
1998-12-29 14:47:31 +01:00
|
|
|
ALL_LINGUAS="de es_ES fr it pl pt_BR ru"
|
1999-02-10 17:22:40 +01:00
|
|
|
static_modules="sha1 md5 rmd160"
|
1997-11-18 15:06:00 +01:00
|
|
|
AC_SUBST(VERSION)
|
|
|
|
AC_SUBST(PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
|
|
|
|
1999-02-10 17:22:40 +01:00
|
|
|
MODULES_IN_CIPHER=`awk '/# MODULES: / { for(i=3;i<=NF;i++) print $i}' \
|
|
|
|
$srcdir/cipher/Makefile.am`
|
|
|
|
|
1998-11-20 20:22:58 +01:00
|
|
|
AC_MSG_CHECKING([whether use of /dev/random is requested])
|
1998-05-13 19:53:36 +02:00
|
|
|
AC_ARG_ENABLE(dev-random,
|
|
|
|
[ --disable-dev-random disable the use of dev random],
|
|
|
|
try_dev_random=$enableval, try_dev_random=yes)
|
1998-11-20 20:22:58 +01:00
|
|
|
AC_MSG_RESULT($try_dev_random)
|
1998-05-13 19:53:36 +02:00
|
|
|
|
1998-11-20 20:22:58 +01:00
|
|
|
AC_MSG_CHECKING([whether use of extensions is requested])
|
1998-06-25 12:19:08 +02:00
|
|
|
AC_ARG_ENABLE(dynload,
|
1998-11-20 20:22:58 +01:00
|
|
|
[ --disable-dynload disable use of extensions],
|
1998-06-25 12:19:08 +02:00
|
|
|
try_dynload=$enableval, try_dynload=yes)
|
1998-11-20 20:22:58 +01:00
|
|
|
AC_MSG_RESULT($try_dynload)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether assembler modules are requested])
|
|
|
|
AC_ARG_ENABLE(asm,
|
|
|
|
[ --disable-asm do not use assembler modules],
|
|
|
|
try_asm_modules=$enableval, try_asm_modules=yes)
|
|
|
|
AC_MSG_RESULT($try_asm_modules)
|
1998-06-25 12:19:08 +02:00
|
|
|
|
1998-02-27 18:51:28 +01:00
|
|
|
AC_MSG_CHECKING([whether memory debugging is requested])
|
1997-11-18 15:06:00 +01:00
|
|
|
AC_ARG_ENABLE(m-debug,
|
1998-11-20 20:22:58 +01:00
|
|
|
[ --enable-m-debug enable debugging of memory allocation],
|
1998-02-27 18:51:28 +01:00
|
|
|
use_m_debug=$enableval, use_m_debug=no)
|
|
|
|
AC_MSG_RESULT($use_m_debug)
|
|
|
|
if test "$use_m_debug" = yes; then
|
1997-11-18 15:06:00 +01:00
|
|
|
AC_DEFINE(M_DEBUG)
|
1998-02-27 18:51:28 +01:00
|
|
|
use_m_guard=yes
|
|
|
|
else
|
|
|
|
AC_MSG_CHECKING([whether memory guard is requested])
|
|
|
|
AC_ARG_ENABLE(m-guard,
|
1999-01-21 06:25:29 +01:00
|
|
|
[ --enable-m-guard enable memory guard facility],
|
|
|
|
use_m_guard=$enableval, use_m_guard=no)
|
1998-02-27 18:51:28 +01:00
|
|
|
AC_MSG_RESULT($use_m_guard)
|
|
|
|
fi
|
|
|
|
if test "$use_m_guard" = yes ; then
|
|
|
|
AC_DEFINE(M_GUARD)
|
1998-12-10 20:20:47 +01:00
|
|
|
fi
|
|
|
|
|
1997-12-23 18:30:18 +01:00
|
|
|
|
1998-02-27 18:51:28 +01:00
|
|
|
AC_MSG_CHECKING([whether included zlib is requested])
|
|
|
|
AC_ARG_WITH(included-zlib,
|
|
|
|
[ --with-included-zlib use the zlib code included here],
|
|
|
|
[g10_force_zlib=yes], [g10_force_zlib=no] )
|
|
|
|
AC_MSG_RESULT($g10_force_zlib)
|
1997-12-23 18:30:18 +01:00
|
|
|
|
1997-11-18 15:06:00 +01:00
|
|
|
dnl Checks for programs.
|
|
|
|
|
1998-10-21 19:34:36 +02:00
|
|
|
AC_CANONICAL_SYSTEM
|
1998-02-02 15:36:06 +01:00
|
|
|
AC_ARG_PROGRAM
|
1998-10-21 19:34:36 +02:00
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AM_SANITY_CHECK
|
1998-02-02 15:36:06 +01:00
|
|
|
missing_dir=`cd $ac_aux_dir && pwd`
|
|
|
|
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
|
|
|
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
|
|
|
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
|
|
|
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
|
|
|
dnl AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
1998-09-14 17:49:56 +02:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
1998-02-26 17:56:31 +01:00
|
|
|
AC_ISC_POSIX
|
1998-09-14 17:49:56 +02:00
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_INSTALL
|
1999-01-19 19:37:41 +01:00
|
|
|
dnl AC_CYGWIN32
|
1999-02-19 15:54:00 +01:00
|
|
|
dnl AM_PROG_LIBTOOL
|
1998-01-05 20:13:15 +01:00
|
|
|
|
1999-02-13 12:19:14 +01:00
|
|
|
MPI_OPT_FLAGS=""
|
1999-01-09 18:59:58 +01:00
|
|
|
if test "$GCC" = yes; then
|
1999-02-16 14:16:33 +01:00
|
|
|
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
|
1999-01-09 18:59:58 +01:00
|
|
|
fi
|
|
|
|
|
1999-02-13 12:19:14 +01:00
|
|
|
|
1999-02-10 17:22:40 +01:00
|
|
|
try_gettext=yes
|
|
|
|
try_gdbm=yes
|
1998-01-05 20:13:15 +01:00
|
|
|
case "${target}" in
|
|
|
|
i386--mingw32)
|
1998-11-20 20:22:58 +01:00
|
|
|
# special stuff for Windoze NT
|
|
|
|
cross_compiling=yes
|
|
|
|
CC="i386--mingw32-gcc"
|
|
|
|
CPP="i386--mingw32-gcc -E"
|
|
|
|
RANLIB="i386--mingw32-ranlib"
|
|
|
|
ac_cv_have_dev_random=no
|
1999-01-24 18:16:40 +01:00
|
|
|
AC_DEFINE(USE_ONLY_8DOT3)
|
|
|
|
AC_DEFINE(HAVE_DRIVE_LETTERS)
|
1999-02-10 17:22:40 +01:00
|
|
|
AC_DEFINE(HAVE_DOSISH_SYSTEM)
|
|
|
|
try_gettext="no"
|
|
|
|
try_gdbm="no"
|
|
|
|
;;
|
|
|
|
i386-emx-os2)
|
|
|
|
# OS/2 with the EMX environment
|
|
|
|
ac_cv_have_dev_random=no
|
|
|
|
AC_DEFINE(HAVE_DRIVE_LETTERS)
|
|
|
|
AC_DEFINE(HAVE_DOSISH_SYSTEM)
|
|
|
|
try_gettext="no"
|
|
|
|
try_gdbm="no"
|
1998-11-20 20:22:58 +01:00
|
|
|
;;
|
1998-10-21 19:34:36 +02:00
|
|
|
*-*-hpux*)
|
1998-11-20 20:22:58 +01:00
|
|
|
if test -z "$GCC" ; then
|
|
|
|
CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
|
|
|
|
fi
|
|
|
|
;;
|
1999-02-16 14:16:33 +01:00
|
|
|
*-dec-osf4*)
|
|
|
|
if test -z "$GCC" ; then
|
|
|
|
# Suppress all warnings
|
|
|
|
# to get rid of the unsigned/signed char mismatch warnings.
|
|
|
|
CFLAGS="$CFLAGS -w"
|
|
|
|
fi
|
|
|
|
;;
|
1999-01-07 18:05:48 +01:00
|
|
|
m68k-atari-mint)
|
|
|
|
;;
|
1998-01-05 20:13:15 +01:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
1998-05-13 19:53:36 +02:00
|
|
|
|
1999-02-13 12:19:14 +01:00
|
|
|
AC_SUBST(MPI_OPT_FLAGS)
|
1998-12-10 20:20:47 +01:00
|
|
|
|
|
|
|
GNUPG_CHECK_PIC
|
1999-01-03 15:33:35 +01:00
|
|
|
GNUPG_CHECK_RDYNAMIC
|
1998-12-10 20:20:47 +01:00
|
|
|
if test "$NO_PIC" = yes; then
|
|
|
|
try_dynload=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1998-05-13 19:53:36 +02:00
|
|
|
case "${target}" in
|
|
|
|
i386--mingw32)
|
1998-11-20 20:22:58 +01:00
|
|
|
PRINTABLE_OS_NAME="MingW32"
|
|
|
|
;;
|
1999-02-10 17:22:40 +01:00
|
|
|
i386-emx-os2)
|
|
|
|
PRINTABLE_OS_NAME="OS/2"
|
|
|
|
;;
|
1998-05-13 19:53:36 +02:00
|
|
|
*-linux*)
|
1998-11-20 20:22:58 +01:00
|
|
|
PRINTABLE_OS_NAME="GNU/Linux"
|
|
|
|
;;
|
1998-05-13 19:53:36 +02:00
|
|
|
*)
|
1998-11-20 20:22:58 +01:00
|
|
|
PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
|
|
|
|
;;
|
1998-05-13 19:53:36 +02:00
|
|
|
esac
|
1998-02-16 21:05:02 +01:00
|
|
|
AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME")
|
1997-11-18 15:06:00 +01:00
|
|
|
|
1998-10-16 18:00:17 +02:00
|
|
|
dnl Fixme: Are these the best flags for OpenBSD????
|
|
|
|
case "${target}" in
|
|
|
|
*-openbsd*)
|
1998-11-20 20:22:58 +01:00
|
|
|
NAME_OF_DEV_RANDOM="/dev/srandom"
|
|
|
|
NAME_OF_DEV_URANDOM="/dev/urandom"
|
|
|
|
DYNLINK_MOD_CFLAGS="-shared -rdynamic -fpic -Wl,-Bshareable -Wl,-x"
|
|
|
|
;;
|
1998-10-16 18:00:17 +02:00
|
|
|
*)
|
1998-11-20 20:22:58 +01:00
|
|
|
NAME_OF_DEV_RANDOM="/dev/random"
|
|
|
|
NAME_OF_DEV_URANDOM="/dev/urandom"
|
1998-12-10 20:20:47 +01:00
|
|
|
DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC -lc"
|
1998-11-20 20:22:58 +01:00
|
|
|
;;
|
1998-10-16 18:00:17 +02:00
|
|
|
esac
|
|
|
|
AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM")
|
|
|
|
AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM")
|
1999-02-13 12:19:14 +01:00
|
|
|
AC_SUBST(MPI_OPT_FLAGS)
|
1998-10-16 18:00:17 +02:00
|
|
|
|
|
|
|
|
1997-11-18 15:06:00 +01:00
|
|
|
dnl Checks for libraries.
|
|
|
|
|
1999-02-10 17:22:40 +01:00
|
|
|
if test "$try_gettext" = yes; then
|
1998-10-21 19:34:36 +02:00
|
|
|
AM_GNU_GETTEXT
|
1999-02-10 17:22:40 +01:00
|
|
|
fi
|
1998-10-21 19:34:36 +02:00
|
|
|
|
1999-02-10 17:22:40 +01:00
|
|
|
if test "$try_gdbm" = yes; then
|
1998-10-17 16:47:14 +02:00
|
|
|
AC_CHECK_LIB(gdbm,gdbm_firstkey)
|
1999-02-10 17:22:40 +01:00
|
|
|
fi
|
1998-06-25 12:19:08 +02:00
|
|
|
|
1999-02-16 14:16:33 +01:00
|
|
|
dnl Solaris needs -lsocket and -lnsl
|
|
|
|
AC_CHECK_LIB(socket, socket)
|
|
|
|
AC_CHECK_LIB(nsl, gethostbyname)
|
|
|
|
|
1998-12-10 20:20:47 +01:00
|
|
|
|
1998-06-25 12:19:08 +02:00
|
|
|
if test "$try_dynload" = yes ; then
|
1998-12-12 18:44:34 +01:00
|
|
|
AC_CHECK_LIB(dl,dlopen)
|
|
|
|
if test "$ac_cv_lib_dl_dlopen" = "yes"; then
|
|
|
|
AC_DEFINE(USE_DYNAMIC_LINKING)
|
|
|
|
AC_DEFINE(HAVE_DL_DLOPEN)
|
1999-01-03 15:33:35 +01:00
|
|
|
DYNLINK_LDFLAGS="$CFLAGS_RDYNAMIC"
|
1998-12-12 18:44:34 +01:00
|
|
|
use_gnupg_extensions=yes
|
|
|
|
else
|
|
|
|
AC_CHECK_LIB(c,dlopen)
|
|
|
|
if test "$ac_cv_lib_c_dlopen" = "yes"; then
|
|
|
|
AC_DEFINE(USE_DYNAMIC_LINKING)
|
|
|
|
AC_DEFINE(HAVE_DL_DLOPEN)
|
1999-01-03 15:33:35 +01:00
|
|
|
DYNLINK_LDFLAGS="$CFLAGS_RDYNAMIC"
|
1998-12-12 18:44:34 +01:00
|
|
|
dnl fixme: this is probably false but it should
|
|
|
|
dnl work for freebsd
|
|
|
|
AC_DEFINE(DLSYM_NEEDS_UNDERSCORE)
|
|
|
|
use_gnupg_extensions=yes
|
|
|
|
else
|
|
|
|
AC_CHECK_LIB(dld,dld_link)
|
|
|
|
if test "$ac_cv_lib_dld_dld_link" = "yes"; then
|
|
|
|
AC_DEFINE(USE_DYNAMIC_LINKING)
|
|
|
|
AC_DEFINE(HAVE_DLD_DLD_LINK)
|
1999-01-03 15:33:35 +01:00
|
|
|
DYNLINK_LDFLAGS="$CFLAGS_RDYNAMIC"
|
1998-12-12 18:44:34 +01:00
|
|
|
use_gnupg_extensions=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
1998-06-25 12:19:08 +02:00
|
|
|
else
|
|
|
|
AC_MSG_CHECKING(for dynamic loading)
|
|
|
|
DYNLINK_LDFLAGS=
|
1998-10-16 18:00:17 +02:00
|
|
|
DYNLINK_MOD_CFLAGS=
|
1998-06-25 12:19:08 +02:00
|
|
|
use_gnupg_extensions=no
|
|
|
|
AC_MSG_RESULT(has been disabled)
|
|
|
|
fi
|
1998-06-09 17:14:06 +02:00
|
|
|
|
1998-06-25 12:19:08 +02:00
|
|
|
AM_CONDITIONAL(ENABLE_GNUPG_EXTENSIONS, test "$use_gnupg_extensions" = yes )
|
|
|
|
AC_SUBST(DYNLINK_LDFLAGS)
|
1998-10-16 18:00:17 +02:00
|
|
|
AC_SUBST(DYNLINK_MOD_CFLAGS)
|
|
|
|
|
1998-06-09 17:14:06 +02:00
|
|
|
|
1997-11-18 15:06:00 +01:00
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(unistd.h)
|
1997-11-26 23:02:28 +01:00
|
|
|
|
1998-01-26 23:09:01 +01:00
|
|
|
|
1997-11-18 15:06:00 +01:00
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_SIZE_T
|
1998-03-19 16:27:29 +01:00
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_DECL_SYS_SIGLIST
|
1997-11-18 15:06:00 +01:00
|
|
|
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_CHECK_ENDIAN
|
1997-12-23 18:30:18 +01:00
|
|
|
|
|
|
|
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
|
|
|
|
GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
|
|
|
|
GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
|
|
|
|
GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
|
|
|
|
GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
|
1997-12-23 18:30:18 +01:00
|
|
|
|
1998-01-06 10:17:55 +01:00
|
|
|
AC_CHECK_SIZEOF(unsigned short, 2)
|
|
|
|
AC_CHECK_SIZEOF(unsigned int, 4)
|
|
|
|
AC_CHECK_SIZEOF(unsigned long, 4)
|
1997-12-23 18:30:18 +01:00
|
|
|
|
1998-01-24 17:32:27 +01:00
|
|
|
if test "$ac_cv_sizeof_unsigned_short" = "0" \
|
|
|
|
|| test "$ac_cv_sizeof_unsigned_int" = "0" \
|
|
|
|
|| test "$ac_cv_sizeof_unsigned_long" = "0"; then
|
|
|
|
AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
|
|
|
|
fi
|
1997-12-23 18:30:18 +01:00
|
|
|
|
1997-12-19 12:41:47 +01:00
|
|
|
|
|
|
|
|
1997-11-18 15:06:00 +01:00
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_FUNC_VPRINTF
|
1998-09-18 17:24:53 +02:00
|
|
|
AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr rand strtoul mmap)
|
1998-07-14 19:10:28 +02:00
|
|
|
AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime setrlimit)
|
1998-10-06 14:10:02 +02:00
|
|
|
AC_CHECK_FUNCS(memicmp atexit raise getpagesize strftime)
|
1998-01-24 17:32:27 +01:00
|
|
|
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_CHECK_MLOCK
|
1998-09-18 17:24:53 +02:00
|
|
|
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_CHECK_IPC
|
1998-07-30 19:37:03 +02:00
|
|
|
if test "$ac_cv_header_sys_shm_h" = "yes"; then
|
|
|
|
AC_DEFINE(USE_SHM_COPROCESSING)
|
|
|
|
fi
|
1998-01-05 20:13:15 +01:00
|
|
|
|
1998-04-14 19:51:16 +02:00
|
|
|
dnl check whether we have a random device
|
1998-05-13 19:53:36 +02:00
|
|
|
if test "$try_dev_random" = yes ; then
|
1998-01-05 20:13:15 +01:00
|
|
|
AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
|
1998-10-16 18:00:17 +02:00
|
|
|
[if test -c "$NAME_OF_DEV_RANDOM" && test -c "$NAME_OF_DEV_URANDOM" ; then
|
1998-01-05 20:13:15 +01:00
|
|
|
ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
|
|
|
|
if test "$ac_cv_have_dev_random" = yes; then
|
|
|
|
AC_DEFINE(HAVE_DEV_RANDOM)
|
|
|
|
fi
|
1998-05-13 19:53:36 +02:00
|
|
|
else
|
|
|
|
AC_MSG_CHECKING(for random device)
|
|
|
|
ac_cv_have_dev_random=no
|
|
|
|
AC_MSG_RESULT(has been disabled)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1999-01-09 16:06:59 +01:00
|
|
|
dnl
|
1999-02-10 17:22:40 +01:00
|
|
|
dnl Figure out the default linkage mode for cipher modules
|
1999-01-09 16:06:59 +01:00
|
|
|
dnl
|
1999-02-10 17:22:40 +01:00
|
|
|
dnl (We always need a static rmd160)
|
|
|
|
static_modules="$static_modules rmd160"
|
1999-01-09 16:06:59 +01:00
|
|
|
if test "$ac_cv_have_dev_random" = yes; then
|
1999-02-10 17:22:40 +01:00
|
|
|
static_modules="$static_modules rndlinux"
|
1999-01-09 16:06:59 +01:00
|
|
|
else
|
|
|
|
case "${target}" in
|
|
|
|
i386--mingw32)
|
1999-02-10 17:22:40 +01:00
|
|
|
static_modules="$static_modules rndw32"
|
|
|
|
;;
|
|
|
|
i386-emx-os2)
|
|
|
|
static_modules="$static_modules rndos2"
|
1999-01-09 16:06:59 +01:00
|
|
|
;;
|
|
|
|
m68k-atari-mint)
|
1999-02-10 17:22:40 +01:00
|
|
|
static_modules="$static_modules rndatari"
|
1999-01-09 16:06:59 +01:00
|
|
|
;;
|
|
|
|
*)
|
1999-02-10 17:22:40 +01:00
|
|
|
static_modules="$static_modules rndunix"
|
1999-01-09 16:06:59 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
1999-02-10 17:22:40 +01:00
|
|
|
dnl
|
|
|
|
dnl Parse the modules list and build the list
|
|
|
|
dnl of static and dymically linked modules
|
|
|
|
dnl
|
|
|
|
STATIC_CIPHER_NAMES=""
|
|
|
|
STATIC_CIPHER_OBJS=""
|
|
|
|
DYNAMIC_CIPHER_MODS=""
|
|
|
|
GNUPG_MSG_PRINT([dynamically linked cipher modules:])
|
|
|
|
for name in $MODULES_IN_CIPHER; do
|
|
|
|
x="no"
|
|
|
|
for i in $static_modules; do
|
|
|
|
if test "$name" = "$i" ; then
|
|
|
|
x="yes"
|
|
|
|
fi
|
|
|
|
done;
|
|
|
|
if test $x = yes; then
|
|
|
|
STATIC_CIPHER_NAMES="$STATIC_CIPHER_NAMES $name"
|
|
|
|
STATIC_CIPHER_OBJS="$STATIC_CIPHER_OBJS $name.o"
|
|
|
|
else
|
|
|
|
DYNAMIC_CIPHER_MODS="$DYNAMIC_CIPHER_MODS $name"
|
|
|
|
GNUPG_MSG_PRINT([$name])
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
AC_MSG_RESULT()
|
|
|
|
AC_SUBST(STATIC_CIPHER_OBJS)
|
|
|
|
AC_SUBST(STATIC_CIPHER_NAMES)
|
|
|
|
AC_SUBST(DYNAMIC_CIPHER_MODS)
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl And build the constructor file
|
|
|
|
dnl
|
|
|
|
cat <<EOF >cipher/construct.c
|
|
|
|
/* automatically generated by configure - do not edit */
|
|
|
|
|
|
|
|
EOF
|
|
|
|
GNUPG_MSG_PRINT([statically linked cipher modules:])
|
|
|
|
for name in $STATIC_CIPHER_NAMES; do
|
|
|
|
echo "void ${name}_constructor(void);" >>cipher/construct.c
|
|
|
|
GNUPG_MSG_PRINT([$name])
|
|
|
|
done
|
|
|
|
AC_MSG_RESULT()
|
|
|
|
cat <<EOF >>cipher/construct.c
|
|
|
|
|
|
|
|
void
|
|
|
|
cipher_modules_constructor(void)
|
|
|
|
{
|
|
|
|
static int done = 0;
|
|
|
|
if( done )
|
|
|
|
return;
|
|
|
|
done = 1;
|
|
|
|
|
|
|
|
EOF
|
|
|
|
for name in $STATIC_CIPHER_NAMES; do
|
|
|
|
echo " ${name}_constructor();" >>cipher/construct.c
|
|
|
|
done
|
|
|
|
echo '}' >>cipher/construct.c
|
|
|
|
|
|
|
|
|
1999-01-09 16:06:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Figure how to link the cipher modules
|
|
|
|
dnl
|
|
|
|
dnl (form now these are only dynamic)
|
|
|
|
AC_SUBST(STATIC_CIPHER_OBJS)
|
|
|
|
AC_SUBST(DYNAMIC_CIPHER_MODS)
|
|
|
|
|
|
|
|
|
|
|
|
|
1997-11-26 23:02:28 +01:00
|
|
|
dnl setup assembler stuff
|
1998-01-07 12:07:05 +01:00
|
|
|
AC_MSG_CHECKING(for mpi assembler functions)
|
1998-01-24 17:32:27 +01:00
|
|
|
if test -f $srcdir/mpi/config.links ; then
|
|
|
|
. $srcdir/mpi/config.links
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_LINK_FILES($mpi_ln_src, $mpi_ln_dst)
|
1998-01-07 12:07:05 +01:00
|
|
|
ac_cv_mpi_extra_asm_modules="$mpi_extra_modules"
|
1998-11-10 19:35:11 +01:00
|
|
|
ac_cv_mpi_sflags="$mpi_sflags"
|
1998-01-05 20:13:15 +01:00
|
|
|
ac_cv_mpi_config_done="yes"
|
|
|
|
AC_MSG_RESULT(done)
|
1997-12-16 20:15:09 +01:00
|
|
|
else
|
1998-01-05 20:13:15 +01:00
|
|
|
AC_MSG_RESULT(failed)
|
1997-12-16 20:15:09 +01:00
|
|
|
AC_MSG_ERROR([mpi/config.links missing!])
|
|
|
|
fi
|
1998-01-07 12:07:05 +01:00
|
|
|
MPI_EXTRA_ASM_OBJS=""
|
|
|
|
if test "$ac_cv_mpi_extra_asm_modules" != ""; then
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_MSG_PRINT([mpi extra asm functions:])
|
1998-01-07 12:07:05 +01:00
|
|
|
for i in $ac_cv_mpi_extra_asm_modules; do
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_MSG_PRINT([$i])
|
1998-01-07 12:07:05 +01:00
|
|
|
MPI_EXTRA_ASM_OBJS="$MPI_EXTRA_ASM_OBJS $i.o"
|
|
|
|
done
|
|
|
|
AC_MSG_RESULT()
|
|
|
|
fi
|
|
|
|
AC_SUBST(MPI_EXTRA_ASM_OBJS)
|
1998-11-10 19:35:11 +01:00
|
|
|
MPI_SFLAGS="$ac_cv_mpi_sflags"
|
|
|
|
AC_SUBST(MPI_SFLAGS)
|
1997-11-26 23:02:28 +01:00
|
|
|
|
1998-01-24 17:32:27 +01:00
|
|
|
dnl Do we have zlib? Must do it here because Solaris failed
|
|
|
|
dnl when compiling a conftest (due to the "-lz" from LIBS).
|
1998-02-12 15:39:08 +01:00
|
|
|
if test "$g10_force_zlib" = "yes"; then
|
1998-02-16 21:05:02 +01:00
|
|
|
ZLIBS="../zlib/libzlib.a"
|
1998-02-13 21:58:50 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, true)
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_LINK_FILES(zlib/zlib.h, zlib.h )
|
|
|
|
GNUPG_LINK_FILES(zlib/zconf.h, zconf.h )
|
1998-02-12 15:39:08 +01:00
|
|
|
else
|
|
|
|
AC_CHECK_HEADERS(zlib.h)
|
|
|
|
if test "$ac_cv_header_zlib_h" = yes ; then
|
|
|
|
LIBS="$LIBS -lz"
|
1998-02-13 21:58:50 +01:00
|
|
|
ZLIBS=
|
|
|
|
AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, false)
|
1998-02-12 15:39:08 +01:00
|
|
|
else
|
1998-02-16 21:05:02 +01:00
|
|
|
ZLIBS="../zlib/libzlib.a"
|
1998-02-13 21:58:50 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, true)
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_LINK_FILES(zlib/zlib.h, zlib.h )
|
|
|
|
GNUPG_LINK_FILES(zlib/zconf.h, zconf.h )
|
1998-02-12 15:39:08 +01:00
|
|
|
fi
|
1998-02-03 13:09:20 +01:00
|
|
|
fi
|
1998-02-12 15:39:08 +01:00
|
|
|
AC_SUBST(ZLIBS)
|
1998-02-13 21:58:50 +01:00
|
|
|
|
1999-02-10 17:22:40 +01:00
|
|
|
if echo "$VERSION" | grep '[a-zA-Z]' >/dev/null ; then
|
|
|
|
AC_DEFINE(IS_DEVELOPMENT_VERSION)
|
|
|
|
fi
|
|
|
|
|
1998-12-10 20:20:47 +01:00
|
|
|
GNUPG_DO_LINK_FILES
|
1998-01-26 23:09:01 +01:00
|
|
|
|
1998-09-28 21:25:31 +02:00
|
|
|
|
1998-01-26 23:09:01 +01:00
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
intl/Makefile
|
|
|
|
po/Makefile.in
|
|
|
|
util/Makefile
|
|
|
|
mpi/Makefile
|
|
|
|
cipher/Makefile
|
|
|
|
g10/Makefile
|
1998-02-26 17:56:31 +01:00
|
|
|
doc/Makefile
|
1998-01-26 23:09:01 +01:00
|
|
|
tools/Makefile
|
1998-02-12 15:39:08 +01:00
|
|
|
zlib/Makefile
|
1998-02-18 19:52:59 +01:00
|
|
|
checks/Makefile
|
1998-10-12 22:16:38 +02:00
|
|
|
])
|
1997-11-18 15:06:00 +01:00
|
|
|
|
1998-12-08 13:20:53 +01:00
|
|
|
dnl *-*wedit:notab*-* Please keep this as the last line.
|