Pollard's rho algorithm for computing discrete logs.
[u/mdw/catacomb] / configure.in
index ef2bf76..f77e6ec 100644 (file)
@@ -1,6 +1,6 @@
 dnl -*-fundamental-*-
 dnl
 dnl -*-fundamental-*-
 dnl
-dnl $Id: configure.in,v 1.3 1999/10/24 10:20:36 mdw Exp $
+dnl $Id: configure.in,v 1.17 2000/07/03 18:14:53 mdw Exp $
 dnl
 dnl Autoconfiguration for Catacomb
 dnl
 dnl
 dnl Autoconfiguration for Catacomb
 dnl
@@ -29,10 +29,36 @@ dnl MA 02111-1307, USA.
 dnl ----- Revision history --------------------------------------------------
 dnl
 dnl $Log: configure.in,v $
 dnl ----- Revision history --------------------------------------------------
 dnl
 dnl $Log: configure.in,v $
-dnl Revision 1.3  1999/10/24 10:20:36  mdw
-dnl Modify for standalone distribution.  The library's getting far too large
-dnl to be sensibly embedded in other programs.
+dnl Revision 1.17  2000/07/03 18:14:53  mdw
+dnl Version bump.
+dnl
+dnl Revision 1.13  2000/06/17 13:51:03  mdw
+dnl Whoops.  Too eager with the mLib version.
+dnl
+dnl Revision 1.12  2000/06/17 12:57:47  mdw
+dnl New free counter noise generator, for use if /dev/random is
+dnl unavailable.
+dnl
+dnl Revision 1.11  2000/06/17 10:51:23  mdw
+dnl Version number changes.  Find maths library for Maurer's test.
+dnl
+dnl Revision 1.10  1999/12/22 16:03:31  mdw
+dnl New mLib version.  Find socket functions for pixie.
+dnl
+dnl Revision 1.7  1999/11/13 01:55:48  mdw
+dnl Don't be pedantic, because using `long long' as a multiprecision type
+dnl gets complained about.
+dnl
+dnl Revision 1.6  1999/11/11 18:56:14  mdw
+dnl Use `libtool' to generate a shared library.
+dnl
+dnl Revision 1.5  1999/11/11 17:47:34  mdw
+dnl Updates for new configuration system, and `mptypes' generator.
+dnl
+dnl Revision 1.4  1999/11/11 00:58:19  mdw
+dnl Use canned check for `ssize_t'.
 dnl
 dnl
+dnl Revision 1.3  1999/10/24 10:20:36  mdw
 dnl Modify for standalone distribution.  The library's getting far too large
 dnl to be sensibly embedded in other programs.
 dnl
 dnl Modify for standalone distribution.  The library's getting far too large
 dnl to be sensibly embedded in other programs.
 dnl
@@ -46,16 +72,14 @@ dnl
 dnl --- Boring boilerplate ---
 
 AC_INIT(blkc.h)
 dnl --- Boring boilerplate ---
 
 AC_INIT(blkc.h)
-AM_INIT_AUTOMAKE(catacomb, 1.0.0pre2)
+AM_INIT_AUTOMAKE(catacomb, 2.0.0pre5)
 AM_CONFIG_HEADER(config.h)
 
 dnl --- Make sure I can compile and build libraries ---
 
 AC_PROG_CC
 AM_CONFIG_HEADER(config.h)
 
 dnl --- Make sure I can compile and build libraries ---
 
 AC_PROG_CC
-AC_CHECK_LIB(mLib, ego)
-AC_CHECK_PROG(AR, ar, ar)
-AC_PROG_RANLIB
-mdw_MLIB
+AM_PROG_LIBTOOL
+mdw_GCC_FLAGS(-Wall)
 
 AC_PROG_YACC
 
 
 AC_PROG_YACC
 
@@ -67,37 +91,44 @@ AC_HEADER_STDC
 dnl --- Check for various important system types ---
 
 AC_TYPE_PID_T
 dnl --- Check for various important system types ---
 
 AC_TYPE_PID_T
-
-dnl --- Tedious check for ssize_t ---
-dnl
-dnl glibc-2 puts ssize_t in a strange place.
-
-AC_CACHE_CHECK(for ssize_t, cat_cv_type_ssize_t,
-[AC_EGREP_CPP(ssize_t,
-[#include <sys/types.h>
-#if HAVE_UNISTD_H
-#inlcude <unistd.h>
-#endif
-#if STDC_HEADERS
-#include <stddef.h>
-#include <stdlib.h>
-#endif],
-cat_cv_type_ssize_t=yes, cat_cv_type_ssize_t=no)])
-if test $cat_cv_type_ssize_t = no; then
-  AC_DEFINE(ssize_t, int)
-fi
+AC_TYPE_SIZE_T
 AC_TYPE_UID_T
 AC_CHECK_TYPE(time_t, long)
 mdw_TYPE_SSIZE_T
 
 AC_TYPE_UID_T
 AC_CHECK_TYPE(time_t, long)
 mdw_TYPE_SSIZE_T
 
-dnl --- Can I call `initgroups'? ---
-dnl
-dnl This is used in noise-gathering.
+dnl --- The maths library, for Maurer's test ---
+
+mdw_CHECK_MANYLIBS(log, m,,, [#include <math.h>], [2])
+mdw_CHECK_MANYLIBS(sqrt, m,,, [#include <math.h>], [2])
+
+dnl --- Functions used for noise-gathering ---
 
 AC_CHECK_FUNCS(setgroups)
 
 AC_CHECK_FUNCS(setgroups)
-AC_OUTPUT(Makefile)
+
+AC_CACHE_CHECK([whether the freewheel noise generator will work],
+[catacomb_cv_freewheel],
+[AC_TRY_LINK([
+#include <setjmp.h>
+#include <sys/time.h>
+],
+[struct itimerval itv = { { 0, 0 }, { 0, 5000 } };
+jmp_buf j;
+setitimer(ITIMER_REAL, &itv, 0);
+sigsetjmp(j, 1);],
+[catacomb_cv_freewheel=yes],
+[catacomb_cv_freewheel=no])])
+if test "$catacomb_cv_freewheel" = "yes"; then
+  AC_DEFINE([USE_FREEWHEEL])
+fi
+
+dnl --- Support for the passphrase pixie ---
+
+mdw_CHECK_MANYLIBS(socket, socket)
+AC_CHECK_FUNCS(mlock)
+
 dnl --- Done ---
 
 dnl --- Done ---
 
-AC_OUTPUT(Makefile catacomb-config)
+mdw_MLIB(2.0.0pre1)
+AC_OUTPUT(Makefile tests/Makefile catacomb-config qcc, chmod 755 qcc)
 
 dnl ----- That's all, folks -------------------------------------------------
 
 dnl ----- That's all, folks -------------------------------------------------