diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | INSTALL | 15 | ||||
-rw-r--r-- | acconfig.h | 1 | ||||
-rw-r--r-- | acinclude.m4 | 318 | ||||
-rw-r--r-- | cipher/ChangeLog | 4 | ||||
-rw-r--r-- | cipher/md.c | 9 | ||||
-rw-r--r-- | configure.in | 30 |
7 files changed, 207 insertions, 174 deletions
@@ -1,3 +1,7 @@ +Fri Feb 27 13:14:17 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (--disable-m-guard): New. + Thu Feb 26 17:09:27 1998 Werner Koch (wk@isil.d.shuttle.de) * configure.in, acinclude.m4, intl/, po/: New macros taken @@ -4,10 +4,10 @@ Please read the Basic Installation section somewhere below. Configure options for GNUPG =========================== ---with-zlib Forces usage of the local zlib sources. Default is - to use the (sahred) library of the system. +--with-included-zlib Forces usage of the local zlib sources. Default is + to use the (shared) library of the system. ---disable-nls Disable NLS support +--disable-nls Disable NLS support (See ABOUT-NLS) --enable-m-debug Compile with the integrated malloc debugging stuff. This makes the program slower but is checks every @@ -18,13 +18,18 @@ Configure options for GNUPG option "--debug 128" displays a memory statistic after the program run. +--disable-m-guard Disable the integrated malloc checking code. As a + side-effect, this removes all debugging code and uses + the -O2 flag for all C files. + + Problems ======== If you have compile problems, use the configure options "--with-zlib" and -"--disable-nls". +"--disable-nls" (See ABOUT-NLS). -I cant check alls assembles files; so if you have problems assembling them +I cant check all assembler files; so if you have problems assembling them (or the program crashes), simply delete the files in the mpi/<cpu> directory. The configure scripts may consider several subdirectories to get all available assembler files; be sure to delete the correct ones. The @@ -28,6 +28,7 @@ @TOP@ #undef M_DEBUG +#undef M_GUARD #undef VERSION #undef PACKAGE #undef G10_LOCALEDIR diff --git a/acinclude.m4 b/acinclude.m4 index ff4baad0..444899fe 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -22,7 +22,7 @@ AC_DEFUN(WK_CHECK_TYPEDEF, ], wk_cv_typedef_$1=yes, wk_cv_typedef_$1=no )]) AC_MSG_RESULT($wk_cv_typedef_$1) if test "$wk_cv_typedef_$1" = yes; then - AC_DEFINE($2) + AC_DEFINE($2) fi ]) @@ -37,11 +37,11 @@ dnl correct when using a caching scheme dnl define(WK_LINK_FILES, [ if test "x$wk_link_files_src" = "x"; then - wk_link_files_src="$1" - wk_link_files_dst="$2" + wk_link_files_src="$1" + wk_link_files_dst="$2" else - wk_link_files_src="$wk_link_files_src $1" - wk_link_files_dst="$wk_link_files_dst $2" + wk_link_files_src="$wk_link_files_src $1" + wk_link_files_dst="$wk_link_files_dst $2" fi ]) define(WK_DO_LINK_FILES, @@ -54,38 +54,38 @@ dnl define either LITTLE_ENDIAN_HOST or BIG_ENDIAN_HOST dnl define(WK_CHECK_ENDIAN, [ if test "$cross_compiling" = yes; then - AC_MSG_WARN(cross compiling; assuming little endianess) + AC_MSG_WARN(cross compiling; assuming little endianess) fi AC_MSG_CHECKING(endianess) AC_CACHE_VAL(wk_cv_c_endian, [ wk_cv_c_endian=unknown - # See if sys/param.h defines the BYTE_ORDER macro. - AC_TRY_COMPILE([#include <sys/types.h> - #include <sys/param.h>], [ - #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros - #endif], [# It does; now see whether it defined to BIG_ENDIAN or not. - AC_TRY_COMPILE([#include <sys/types.h> - #include <sys/param.h>], [ - #if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif], wk_cv_c_endian=big, wk_cv_c_endian=little)]) - if test "$wk_cv_c_endian" = unknown; then - AC_TRY_RUN([main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); - }], - wk_cv_c_endian=little, - wk_cv_c_endian=big, - wk_cv_c_endian=little - ) - fi + # See if sys/param.h defines the BYTE_ORDER macro. + AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/param.h>], [ + #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros + #endif], [# It does; now see whether it defined to BIG_ENDIAN or not. + AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/param.h>], [ + #if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif], wk_cv_c_endian=big, wk_cv_c_endian=little)]) + if test "$wk_cv_c_endian" = unknown; then + AC_TRY_RUN([main () { + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); + }], + wk_cv_c_endian=little, + wk_cv_c_endian=big, + wk_cv_c_endian=little + ) + fi ]) AC_MSG_RESULT([$wk_cv_c_endian]) if test "$wk_cv_c_endian" = little; then @@ -102,12 +102,12 @@ define(WK_CHECK_CACHE, wk_hostcheck="$target" AC_CACHE_VAL(wk_cv_hostcheck, [ wk_cv_hostcheck="$wk_hostcheck" ]) if test "$wk_cv_hostcheck" != "$wk_hostcheck"; then - AC_MSG_RESULT(changed) - AC_MSG_WARN(config.cache exists!) - AC_MSG_ERROR(you must do 'make distclean' first to compile for - different target or different parameters.) + AC_MSG_RESULT(changed) + AC_MSG_WARN(config.cache exists!) + AC_MSG_ERROR(you must do 'make distclean' first to compile for + different target or different parameters.) else - AC_MSG_RESULT(ok) + AC_MSG_RESULT(ok) fi ]) @@ -142,8 +142,8 @@ AC_CACHE_VAL(ac_cv_path_$1, test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word" - break + ac_cv_path_$1="$ac_dir/$ac_word" + break fi fi done @@ -206,7 +206,7 @@ AC_DEFUN(AM_WITH_NLS, [AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], + [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) @@ -218,129 +218,129 @@ AC_DEFUN(AM_WITH_NLS, AC_DEFINE(ENABLE_NLS) AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_TRY_LINK([], [return (int) gettext ("")], - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)])]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - ]) - - if test "$CATOBJEXT" = "NONE"; then - AC_MSG_CHECKING([whether catgets can be used]) - AC_ARG_WITH(catgets, - [ --with-catgets use catgets functions if available], - nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) - AC_MSG_RESULT($nls_cv_use_catgets) - - if test "$nls_cv_use_catgets" = "yes"; then - dnl No gettext in C library. Try catgets next. - AC_CHECK_LIB(i, main) - AC_CHECK_FUNC(catgets, - [AC_DEFINE(HAVE_CATGETS) - INTLOBJS="\$(CATOBJS)" - AC_PATH_PROG(GENCAT, gencat, no)dnl - if test "$GENCAT" != "no"; then - AC_PATH_PROG(GMSGFMT, gmsgfmt, no) - if test "$GMSGFMT" = "no"; then - AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) - fi - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.cat - INSTOBJEXT=.cat - DATADIRNAME=lib - INTLDEPS='$(top_builddir)/intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=intl/libintl.h - nls_cv_header_libgt=intl/libgettext.h - fi]) - fi - fi - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If gettext or catgets are available (in this order) we + dnl use this. Else we have to fall back to GNU NLS library. + dnl catgets is only used if permitted by option --with-catgets. + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, + [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], + gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) + + if test "$gt_cv_func_gettext_libc" != "yes"; then + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CACHE_CHECK([for gettext in libintl], + gt_cv_func_gettext_libintl, + [AC_TRY_LINK([], [return (int) gettext ("")], + gt_cv_func_gettext_libintl=yes, + gt_cv_func_gettext_libintl=no)])]) + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + AC_DEFINE(HAVE_GETTEXT) + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + INSTOBJEXT=.mo + fi + fi + ]) + + if test "$CATOBJEXT" = "NONE"; then + AC_MSG_CHECKING([whether catgets can be used]) + AC_ARG_WITH(catgets, + [ --with-catgets use catgets functions if available], + nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) + AC_MSG_RESULT($nls_cv_use_catgets) + + if test "$nls_cv_use_catgets" = "yes"; then + dnl No gettext in C library. Try catgets next. + AC_CHECK_LIB(i, main) + AC_CHECK_FUNC(catgets, + [AC_DEFINE(HAVE_CATGETS) + INTLOBJS="\$(CATOBJS)" + AC_PATH_PROG(GENCAT, gencat, no)dnl + if test "$GENCAT" != "no"; then + AC_PATH_PROG(GMSGFMT, gmsgfmt, no) + if test "$GMSGFMT" = "no"; then + AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) + fi + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi]) + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + dnl Neither gettext nor catgets in included in the C library. + dnl Fall back on GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - INTLOBJS="\$(GETTOBJS)" - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_SUBST(MSGFMT) - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.gmo - INSTOBJEXT=.mo - DATADIRNAME=share - INTLDEPS='$(top_builddir)/intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=intl/libintl.h - nls_cv_header_libgt=intl/libgettext.h + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_SUBST(MSGFMT) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext programs is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext programs is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi fi # We need to process the po/ directory. @@ -415,9 +415,9 @@ __argz_count __argz_stringify __argz_next]) AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) @@ -442,7 +442,7 @@ __argz_count __argz_stringify __argz_next]) dnl Determine which catalog format we have (if any is needed) dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format + dnl Linux libc-5 and the normal X/Open format test -d intl || mkdir intl if test "$CATOBJEXT" = ".cat"; then AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) @@ -456,7 +456,7 @@ __argz_count __argz_stringify __argz_next]) $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext + dnl only sense for gettext. We comment this out for non-gettext dnl packages. if test "$PACKAGE" = "gettext"; then GT_NO="#NO#" @@ -498,7 +498,7 @@ __argz_count __argz_stringify __argz_next]) fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES + < $srcdir/po/POTFILES.in > po/POTFILES ]) diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 088d53e3..333547cd 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,7 @@ +Fri Feb 27 16:39:34 1998 Werner Koch (wk@isil.d.shuttle.de) + + * md.c (md_enable): No init if called twice. + Thu Feb 26 07:57:02 1998 Werner Koch (wk@isil.d.shuttle.de) * primegen.c (generate_elg_prime): Changed the progress printing. diff --git a/cipher/md.c b/cipher/md.c index dd40136a..a9a56669 100644 --- a/cipher/md.c +++ b/cipher/md.c @@ -49,15 +49,18 @@ void md_enable( MD_HANDLE h, int algo ) { if( algo == DIGEST_ALGO_MD5 ) { - md5_init( &h->md5 ); + if( !h->use_md5 ) + md5_init( &h->md5 ); h->use_md5 = 1; } else if( algo == DIGEST_ALGO_RMD160 ) { - rmd160_init( &h->rmd160 ); + if( !h->use_rmd160 ) + rmd160_init( &h->rmd160 ); h->use_rmd160 = 1; } else if( algo == DIGEST_ALGO_SHA1 ) { - sha1_init( &h->sha1 ); + if( !h->use_sha1 ) + sha1_init( &h->sha1 ); h->use_sha1 = 1; } else diff --git a/configure.in b/configure.in index b40fc41c..660f5414 100644 --- a/configure.in +++ b/configure.in @@ -27,18 +27,34 @@ AC_SUBST(PACKAGE) AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") +AC_MSG_CHECKING([whether memory debugging is requested]) AC_ARG_ENABLE(m-debug, -[ --enable-m-debug Enable debugging of memory allocation]) -if test "$enableval" = y || test "$enableval" = yes; then +[ --enable-m-debug enable debugging of memory allocation], +use_m_debug=$enableval, use_m_debug=no) +AC_MSG_RESULT($use_m_debug) +if test "$use_m_debug" = yes; then AC_DEFINE(M_DEBUG) + use_m_guard=yes +else + AC_MSG_CHECKING([whether memory guard is requested]) + AC_ARG_ENABLE(m-guard, + [ --disable-m-guard disable memory guard facility], + use_m_guard=$enableval, use_m_guard=yes) + AC_MSG_RESULT($use_m_guard) +fi +if test "$use_m_guard" = yes ; then + AC_DEFINE(M_GUARD) + CFLAGS="-g -Wall" +else + CFLAGS="-O2 -Wall" fi -AC_ARG_WITH(zlib, -[ --with-zlib link against static zlib], -[g10_force_zlib=yes], [g10_force_zlib=no] ) - -CFLAGS="-g -Wall" +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) AC_CANONICAL_SYSTEM |