Update of /cvsroot/netrek/res-rsa In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5281 Modified Files: CMakeLists.txt INSTALL configure configure.in mkkey.c Log Message: * Add support for GMP3. * Up rev. Index: mkkey.c =================================================================== RCS file: /cvsroot/netrek/res-rsa/mkkey.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mkkey.c 10 Jun 2009 03:05:47 -0000 1.2 +++ mkkey.c 10 Jun 2009 03:31:26 -0000 1.3 @@ -65,7 +65,7 @@ * static char version[] = "[atm: July 4, 1993] based on [sls: June 7, 1993]"; */ -static char version[] = "[RES-RSA 2.9.2: Mar. 13, 2000][GMP]"; +static char version[] = "[RES-RSA 2.9.3: June 9, 2009][GMP]"; #include "config.h" #include <stdio.h> Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/netrek/res-rsa/CMakeLists.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CMakeLists.txt 10 Jun 2009 03:05:47 -0000 1.1 +++ CMakeLists.txt 10 Jun 2009 03:31:26 -0000 1.2 @@ -20,7 +20,7 @@ set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) project(res-rsa C) -set(VERSION "2.9.2") +set(VERSION "2.9.3") OPTION(WITH_ANSI "enforce strict ISO C++ conforming" ON) OPTION(VERBOSE "show cmake command line" OFF) Index: configure =================================================================== RCS file: /cvsroot/netrek/res-rsa/configure,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure 17 Feb 2000 05:57:22 -0000 1.1 +++ configure 10 Jun 2009 03:31:26 -0000 1.2 @@ -1,29 +1,691 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.61. # +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. [...5898 lines suppressed...] +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi Index: INSTALL =================================================================== RCS file: /cvsroot/netrek/res-rsa/INSTALL,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- INSTALL 14 Mar 2000 00:28:47 -0000 1.2 +++ INSTALL 10 Jun 2009 03:31:26 -0000 1.3 @@ -14,7 +14,7 @@ change the RSA_* defines in the server's system.mk to use "-lrsa-gmp" instead of "-lrsa". If GMP is installed in a non-standard location, specify the directory to configure with the "--with-gmp=dir" option, -e.g. "--with-gmp=/usr/gnu" or "--with-gmp="../gmp-2.0.2". +e.g. "--with-gmp="../gmp-2.0.2". For Netrek clients, untar this package into a temporary directory, then type './configure; make mkkey' to create the client key generator @@ -25,10 +25,16 @@ the appropriate arguments. It will create rsa_box*.c files and the RSA keypair needed to build an RSA-enabled client. +Alternatively, CMake is also now supported: + mkdir build + cd build + cmake .. + make + If you need the GMP package, get it from the GNU archives at ftp://ftp.gnu.org/pub/gnu/gmp/ or from - ftp://ftp.netrek.org/pub/netrek/gmp/ + http://ftp.netrek.org/pub/netrek/gmp/ Both gmp-1.3.2 and gmp-2.0.2 have been tested to work. Index: configure.in =================================================================== RCS file: /cvsroot/netrek/res-rsa/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure.in 17 Feb 2000 05:57:22 -0000 1.1 +++ configure.in 10 Jun 2009 03:31:26 -0000 1.2 @@ -15,7 +15,7 @@ # Check to see if GMP exists. # -GMP_VER=0 +GMP_VER=-1 GMP_INC="" GMP_LIB="" GMP_DIR="" @@ -24,11 +24,11 @@ AC_ARG_WITH(gmp, [ --with-gmp[=DIR] enable gmp support [DIR=yes, no, or gmp dir]] - [ (e.g. ../gmp-1.3.2, /usr/gnu /usr/local/gnu)], + [ (e.g. ../gmp-1.3.2, ../gmp-2.0.2)], [ case "$withval" in no) - GMP_VER=-1 + GMP_VER=-2 ;; yes) ;; @@ -44,12 +44,11 @@ # both "/usr/gnu/include" and "/usr/gnu/lib" GMP_PATH="$srcdir/gmp $srcdir/gmp-1.3.2 $srcdir/gmp-2.0.2 $srcdir/../gmp \ - $srcdir/../gmp-1.3.2 $srcdir/../gmp-2.0.2 /usr/gnu /usr/local \ - /usr/unsupported /usr/local/gnu" + $srcdir/../gmp-1.3.2 $srcdir/../gmp-2.0.2" # If GMP is not disabled... -if test $GMP_VER != -1; then +if test $GMP_VER != -2; then # If GMP directory was specified, do some smart checking if test "$GMP_DIR" != ""; then @@ -62,27 +61,24 @@ for path in $GMP_PATH; do if test -r $path/gmp.h; then - GMP_VER=1 + GMP_VER=0 GMP_INC="-I$path" break - fi - if test -r $path/include/gmp.h; then - GMP_VER=1 + elif test -r $path/include/gmp.h; then + GMP_VER=0 GMP_INC="-I$path/include" break fi done - if test $GMP_VER = 1; then + if test $GMP_VER = 0; then AC_MSG_RESULT(found in $GMP_INC) else AC_MSG_RESULT(not found) fi # search for the library file only if header was found - if test $GMP_VER = 1; then - - GMP_VER=0 + if test $GMP_VER = 0; then AC_MSG_CHECKING(for local libgmp.a) @@ -119,19 +115,24 @@ # If no GMP found yet, search the default system locations for it # We want any local copy of GMP to override the system GMP - if test $GMP_VER = 0; then + if test $GMP_VER = -1; then - AC_CHECK_HEADER(gmp.h, AC_DEFINE(HAVE_GMP_H) GMP_VER=1) + AC_CHECK_HEADER(gmp.h, AC_DEFINE(HAVE_GMP_H) GMP_VER=0) - if test $GMP_VER = 1; then - AC_CHECK_LIB(gmp, mpz_init, AC_DEFINE(HAVE_LIB_GMP), GMP_VER=0) + if test $GMP_VER = 0; then + AC_CHECK_LIB(gmp, mpz_init, AC_DEFINE(HAVE_LIB_GMP) GMP_VER=1) fi # Check for GMP2 - if test $GMP_VER = 1; then + if test $GMP_VER = 0; then AC_CHECK_LIB(gmp, mpz_fdiv_q_ui, AC_DEFINE(HAVE_LIB_GMP2) GMP_VER=2) fi + # Check for GMP3 + if test $GMP_VER = 0; then + AC_CHECK_LIB(gmp, __gmpz_init, AC_DEFINE(HAVE_LIB_GMP3) GMP_VER=3) + fi + fi fi @@ -153,6 +154,10 @@ echo GMP 2.x found, building librsa.a, librsa-gmp.a, mkkey. GMP_TARGETS="librsa-gmp.a mkkey" ;; + 3) + echo GMP 3.x found, building librsa.a, librsa-gmp.a, mkkey. + GMP_TARGETS="librsa-gmp.a mkkey" + ;; *) echo Unknown GMP configuration. ;;