New free counter noise generator, for use if /dev/random is
[u/mdw/catacomb] / configure.in
index 13c0c22..bef9b1b 100644 (file)
@@ -1,6 +1,6 @@
 dnl -*-fundamental-*-
 dnl
-dnl $Id: configure.in,v 1.11 2000/06/17 10:51:23 mdw Exp $
+dnl $Id: configure.in,v 1.12 2000/06/17 12:57:47 mdw Exp $
 dnl
 dnl Autoconfiguration for Catacomb
 dnl
@@ -29,6 +29,10 @@ dnl MA 02111-1307, USA.
 dnl ----- Revision history --------------------------------------------------
 dnl
 dnl $Log: configure.in,v $
+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
@@ -62,7 +66,7 @@ dnl
 dnl --- Boring boilerplate ---
 
 AC_INIT(blkc.h)
-AM_INIT_AUTOMAKE(catacomb, 2.0.0)
+AM_INIT_AUTOMAKE(catacomb, 2.0.0pre1)
 AM_CONFIG_HEADER(config.h)
 
 dnl --- Make sure I can compile and build libraries ---
@@ -91,12 +95,26 @@ 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 --- Can I call `initgroups'? ---
-dnl
-dnl This is used in noise-gathering.
+dnl --- Functions used for noise-gathering ---
 
 AC_CHECK_FUNCS(setgroups)
 
+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)