RSA & IDEA

Juergen A. Erhard jae at ilk.de
Sat Jan 23 00:31:03 CET 1999


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In theory, the following patch would make installation of RSA and IDEA
simpler.  For RSA, it works to just copy rsa.c to the cipher directory
before ./configure-ing.

It could be made better two different ways:

   + make all add-on modules have some lines specially marked (like
     rsa.c has a tab in front of the gcc line) OR

   + simply have the same compile line for all modules.

The best would probably be some `Makefile:' line(s) in the .c file,
which configure.in could stuff verbatim into an autoconf
substitution... which would get inserted into the Makefile.

What do y'all think?

Bye, J


Index: configure.in
===================================================================
RCS file: /home/koch/cvs/gnupg/configure.in,v
retrieving revision 1.69
diff -u -r1.69 configure.in
- --- configure.in	1999/01/21 05:25:11	1.69
+++ configure.in	1999/01/22 23:19:05
@@ -4,7 +4,7 @@
 dnl (Process this file with autoconf to produce a configure script.)
 AC_REVISION($Revision: 1.69 $)dnl
 
- -dnl Must reset CDPATH so that bash's cd does not print to stdout
+dnl #Must reset CDPATH so that bash's cd does not print to stdout
 CDPATH=
 
 AC_INIT(g10/g10.c)
@@ -195,6 +195,30 @@
 AM_CONDITIONAL(ENABLE_GNUPG_EXTENSIONS, test "$use_gnupg_extensions" = yes )
 AC_SUBST(DYNLINK_LDFLAGS)
 AC_SUBST(DYNLINK_MOD_CFLAGS)
+
+if test "$use_gnupg_extensions" = "yes"; then
+    AC_MSG_CHECKING(for presence of RSA module)
+    if test -f cipher/rsa.c; then
+	RSA=rsa
+	AC_MSG_RESULT(present)
+    else
+	RSA=
+	AC_MSG_RESULT(not present)
+    fi
+
+    AC_SUBST(RSA)
+
+    AC_MSG_CHECKING(for presence of IDEA module)
+    if test -f cipher/idea.c; then
+	IDEA=idea
+	AC_MSG_RESULT(present)
+    else
+	IDEA=
+	AC_MSG_RESULT(not present)
+    fi
+
+    AC_SUBST(IDEA)
+fi
 
 
 dnl Checks for header files.
Index: cipher/Makefile.am
===================================================================
RCS file: /home/koch/cvs/gnupg/cipher/Makefile.am,v
retrieving revision 1.39
diff -u -r1.39 Makefile.am
- --- Makefile.am	1999/01/09 15:06:46	1.39
+++ Makefile.am	1999/01/22 23:19:06
@@ -6,7 +6,7 @@
 
 EXTRA_PROGRAMS	 = tiger twofish rndunix rndlinux
 if ENABLE_GNUPG_EXTENSIONS
- -pkglib_PROGRAMS  = @DYNAMIC_CIPHER_MODS@ @DYNAMIC_RANDOM_MODS@
+pkglib_PROGRAMS  = @DYNAMIC_CIPHER_MODS@ @DYNAMIC_RANDOM_MODS@ @RSA@ @IDEA@
 else
 pkglib_PROGRAMS  =
 endif
@@ -59,6 +59,11 @@
 	`echo $(COMPILE) $(DYNLINK_MOD_CFLAGS) -o twofish $(srcdir)/twofish.c | \
 	    sed -e 's/-O[0-9]*/  /' `
 
+rsa: $(srcdir)/rsa.c
+	`grep '^	' rsa.c | head -1`
+
+idea: $(srcdir)/idea.c
+	`grep '^	' idea.c | head -1`
 
 rndunix: $(srcdir)/rndunix.c
 	$(COMPILE) $(DYNLINK_MOD_CFLAGS) -o rndunix $(srcdir)/rndunix.c


- -- 
Jürgen A. Erhard      eMail: jae at ilk.de      phone: (GERMANY) 0721 27326
	 My WebHome: http://members.tripod.com/~Juergen_Erhard
	       GTK - Free X Toolkit (http://www.gtk.org)
   "No matter how cynical I get, I can't keep up."  -- Bruce Schneier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjapCjcACgkQ+EdE6uFQHp+L1QCgs76lV3oDBwRWY52xiR9dkDzD
oToAn29sLhSJ+hTdVrNnt0Ze4WPHruoF
=9Prl
-----END PGP SIGNATURE-----




More information about the Gnupg-devel mailing list