[svn] GnuPG - r3949 - in trunk: . cipher

svn author dshaw cvs at cvs.gnupg.org
Tue Dec 6 18:13:46 CET 2005


Author: dshaw
Date: 2005-12-06 18:13:44 +0100 (Tue, 06 Dec 2005)
New Revision: 3949

Modified:
   trunk/ChangeLog
   trunk/cipher/ChangeLog
   trunk/cipher/Makefile.am
   trunk/configure.ac
Log:
* Makefile.am: Some cleanup so we don't build files that are completely
ifdeffed out.  This causes a warning on Sun's cc.  Do sha512.c as well for
consistency.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2005-12-06 16:44:20 UTC (rev 3948)
+++ trunk/ChangeLog	2005-12-06 17:13:44 UTC (rev 3949)
@@ -1,3 +1,9 @@
+2005-12-06  David Shaw  <dshaw at jabberwocky.com>
+
+	* configure.ac: Some cleanup so we don't build files that are
+	completely ifdeffed out.  This causes a warning on Sun's cc.  Do
+	sha512.c as well for consistency.
+
 2005-11-17  David Shaw  <dshaw at jabberwocky.com>
 
 	* NEWS: Note backsigs, the xxxxx-clean options, and the

Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog	2005-12-06 16:44:20 UTC (rev 3948)
+++ trunk/cipher/ChangeLog	2005-12-06 17:13:44 UTC (rev 3949)
@@ -1,3 +1,9 @@
+2005-12-06  David Shaw  <dshaw at jabberwocky.com>
+
+	* Makefile.am: Some cleanup so we don't build files that are
+	completely ifdeffed out.  This causes a warning on Sun's cc.  Do
+	sha512.c as well for consistency.
+
 2005-08-11  Werner Koch  <wk at g10code.com>
 
 	* rijndael.c (rijndael_cfb_encrypt): Experimental code to improve

Modified: trunk/cipher/Makefile.am
===================================================================
--- trunk/cipher/Makefile.am	2005-12-06 16:44:20 UTC (rev 3948)
+++ trunk/cipher/Makefile.am	2005-12-06 17:13:44 UTC (rev 3949)
@@ -1,4 +1,5 @@
-# Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
+#               2005 Free Software Foundation, Inc.
 #
 # This file is part of GnuPG.
 #
@@ -44,16 +45,31 @@
 		 dsa.c		\
 		 smallprime.c	\
 		 algorithms.h   \
-		 rndlinux.c	\
-		 rndunix.c 	\
-		 rndegd.c  	\
-		 rndw32.c  	\
 		 md5.c     	\
 		 rmd160.c  	\
 		 sha1.c         \
 		 sha256.c
 
-EXTRA_libcipher_a_SOURCES = idea-stub.c sha512.c
+if USE_RNDLINUX
+libcipher_a_SOURCES+=rndlinux.c
+endif
 
-libcipher_a_DEPENDENCIES = @IDEA_O@ @SHA512_O@
-libcipher_a_LIBADD = @IDEA_O@ @SHA512_O@
+if USE_RNDUNIX
+libcipher_a_SOURCES+=rndunix.c
+endif
+
+if USE_RNDEGD
+libcipher_a_SOURCES+=rndegd.c
+endif
+
+if USE_RNDW32
+libcipher_a_SOURCES+=rndw32.c
+endif
+
+if USE_SHA512
+libcipher_a_SOURCES+=sha512.c
+endif
+
+EXTRA_libcipher_a_SOURCES=idea-stub.c
+libcipher_a_DEPENDENCIES=@IDEA_O@
+libcipher_a_LIBADD=@IDEA_O@

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2005-12-06 16:44:20 UTC (rev 3948)
+++ trunk/configure.ac	2005-12-06 17:13:44 UTC (rev 3949)
@@ -800,18 +800,21 @@
 fi
 
 dnl Do we have any 64-bit data types?
-if test "$ac_cv_sizeof_unsigned_int" != "8" \
+if test x"$use_sha512" = xyes \
+   && test "$ac_cv_sizeof_unsigned_int" != "8" \
    && 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_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)
-     AC_DEFINE(USE_SHA512,1,[Define to include the SHA-384 and SHA-512 digests])
-  fi
+    use_sha512=no
 fi
 
+if test x"$use_sha512" ; then
+    AC_DEFINE(USE_SHA512,1,[Define to include the SHA-384 and SHA-512 digests])
+fi
+
+AM_CONDITIONAL(USE_SHA512, test x"$use_sha512" = xyes)
+
 dnl Checks for library functions.
 AC_CHECK_DECLS(getpagesize)
 AC_FUNC_FSEEKO
@@ -978,23 +981,32 @@
     rndlinux)
          AC_DEFINE(USE_RNDLINUX,1, 
                   [Defined if the /dev/random based RNG should be used.])
+         use_rndlinux=yes
          ;;
     rndunix)
          AC_DEFINE(USE_RNDUNIX,1, 
                   [Defined if the default Unix RNG should be used.])
          print_egd_warning=yes
+         use_rndunix=yes
           ;;
     rndegd)
          AC_DEFINE(USE_RNDEGD,1, 
                   [Defined if the EGD based RNG should be used.])
+         use_rndegd=yes
          ;;
     rndw32)
          AC_DEFINE(USE_RNDW32,1, 
                   [Defined if the Windows specific RNG should be used.])
+         use_rndw32=yes
         ;;
    esac
 done
 
+AM_CONDITIONAL(USE_RNDLINUX, test "$use_rndlinux" = yes)
+AM_CONDITIONAL(USE_RNDUNIX,  test "$use_rndunix" = yes)
+AM_CONDITIONAL(USE_RNDEGD,   test "$use_rndegd" = yes)
+AM_CONDITIONAL(USE_RNDW32,   test "$use_rndw32" = yes)
+
 dnl setup assembler stuff
 AC_MSG_CHECKING(for mpi assembler functions)
 if test -f $srcdir/mpi/config.links ; then




More information about the Gnupg-commits mailing list