From a8e139ce6214fe072ef9e91d6792f33f9d13f872 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 12 Feb 2003 04:59:07 +0000 Subject: [PATCH] * configure.ac: Do not set GNUPG_LIBEXECDIR in ./configure, so that makefiles can override it. Verify that we have a 64-bit type before building tiger.c or sha512.c. Add uint64_t as a possible 64-bit type. --- ChangeLog | 7 +++++++ configure.ac | 44 ++++++++++++++++++++++++++------------------ 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c52770c2..66209b69f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-02-11 David Shaw + + * configure.ac: Do not set GNUPG_LIBEXECDIR in ./configure, so + that makefiles can override it. Verify that we have a 64-bit type + before building tiger.c or sha512.c. Add uint64_t as a possible + 64-bit type. + 2003-02-02 David Shaw * NEWS: Add notes about disabled keys, trustdb tweaks, and diff --git a/configure.ac b/configure.ac index c58140e56..20c452030 100644 --- a/configure.ac +++ b/configure.ac @@ -136,15 +136,6 @@ if test "$use_m_guard" = yes ; then AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature]) fi -AC_MSG_CHECKING([whether to enable old-style TIGER digest support]) -AC_ARG_ENABLE(old-tiger, - [ --enable-old-tiger enable old-style TIGER digest support], - old_tiger=$enableval, old_tiger=no) -AC_MSG_RESULT($old_tiger) -if test "$old_tiger" = yes ; then - AC_DEFINE(USE_OLD_TIGER,1,[Define to use the old fake OID for TIGER digest support]) -fi - AC_MSG_CHECKING([whether to enable external program execution]) AC_ARG_ENABLE(exec, [ --disable-exec disable all external program execution], @@ -561,10 +552,11 @@ GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF) GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF) GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF) -AC_CHECK_SIZEOF(unsigned short, 2) -AC_CHECK_SIZEOF(unsigned int, 4) -AC_CHECK_SIZEOF(unsigned long, 4) -AC_CHECK_SIZEOF(unsigned long long, 0) +AC_CHECK_SIZEOF(unsigned short) +AC_CHECK_SIZEOF(unsigned int) +AC_CHECK_SIZEOF(unsigned long) +AC_CHECK_SIZEOF(unsigned long long) +AC_CHECK_SIZEOF(uint64_t) if test "$ac_cv_sizeof_unsigned_short" = "0" \ || test "$ac_cv_sizeof_unsigned_int" = "0" \ @@ -572,6 +564,27 @@ if test "$ac_cv_sizeof_unsigned_short" = "0" \ AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]); fi +dnl Do we have any 64-bit data types? +if test "$ac_cv_sizeof_unsigned_int" != "8" \ + && test "$ac_cv_sizeof_unsigned_long" != "8" \ + && test "$ac_cv_sizeof_unsigned_long_long" != "8" \ + && test "$ac_cv_sizeof_uint64_t" != "8"; then + AC_MSG_WARN([No 64-bit types. Disabling TIGER/192, SHA-384, and SHA-512]) +else + AC_SUBST(TIGER_O,tiger.o) + AC_DEFINE(USE_TIGER,1,[Define to include TIGER/192 digest support]) + AC_SUBST(SHA512_O,sha512.o) + AC_DEFINE(USE_SHA512,1,[Define to include SHA-384 and SHA-512 digest support]) + AC_MSG_CHECKING([whether to enable old-style TIGER/192 digest support]) + AC_ARG_ENABLE(old-tiger, + [ --enable-old-tiger enable old-style TIGER/192 digest support], + old_tiger=$enableval, old_tiger=no) + AC_MSG_RESULT($old_tiger) + if test "$old_tiger" = yes ; then + AC_DEFINE(USE_OLD_TIGER,1,[Define to use the old fake OID for TIGER/192 digest support]) + fi +fi + dnl Checks for library functions. AC_FUNC_FSEEKO AC_FUNC_VPRINTF @@ -909,12 +922,8 @@ if test "$print_egd_warning" = yes; then ***]]) fi - - # Note the \\\\ for backslashes. Autoconf eats one layer, leaving \\ -AC_SUBST(GNUPG_LIBEXECDIR,"${libexecdir}/gnupg") - AC_CONFIG_COMMANDS(g10defs.h,[[ cat >g10defs.tmp <g10defs.tmp <