-dnl -*-fundamental-*-
+dnl -*-m4-*-
dnl
-dnl $Id: configure.in,v 1.11 2000/06/17 10:51:23 mdw Exp $
+dnl $Id: configure.in,v 1.27 2004/03/21 22:52:06 mdw Exp $
dnl
dnl Autoconfiguration for Catacomb
dnl
dnl ----- Revision history --------------------------------------------------
dnl
dnl $Log: configure.in,v $
+dnl Revision 1.27 2004/03/21 22:52:06 mdw
+dnl Merge and close elliptic curve branch.
+dnl
+dnl Revision 1.24.2.1 2003/06/10 13:43:53 mdw
+dnl Simple (non-projective) curves over prime fields now seem to work.
+dnl
+dnl Revision 1.26 2003/11/29 23:39:36 mdw
+dnl Debianization.
+dnl
+dnl Revision 1.25 2003/10/11 21:02:33 mdw
+dnl Import buf stuff from tripe.
+dnl
+dnl Revision 1.24 2003/05/16 00:30:28 mdw
+dnl Version bump.
+dnl
+dnl Revision 1.23 2001/03/04 13:09:40 mdw
+dnl Mark dependency on mLib 2.0.0pre4 now.
+dnl
+dnl Revision 1.21 2000/10/08 12:01:28 mdw
+dnl Reinstate the `-pedantic' option.
+dnl
+dnl Revision 1.20 2000/08/15 21:45:25 mdw
+dnl New library configuration stuff from `common'.
+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 Modify for standalone distribution. The library's getting far too large
dnl to be sensibly embedded in other programs.
dnl
-dnl Revision 1.2 1999/10/23 12:56:25 mdw
-dnl Version number change.
-dnl
dnl Revision 1.1 1999/09/03 08:41:11 mdw
dnl Initial import.
dnl
dnl --- Boring boilerplate ---
AC_INIT(blkc.h)
-AM_INIT_AUTOMAKE(catacomb, 2.0.0)
+mdw_INIT_LIB(catacomb, Catacomb, 2.1.0)
AM_CONFIG_HEADER(config.h)
dnl --- Make sure I can compile and build libraries ---
AC_PROG_CC
AM_PROG_LIBTOOL
-mdw_GCC_FLAGS(-Wall)
+mdw_GCC_FLAGS
AC_PROG_YACC
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)
dnl --- Done ---
mdw_MLIB(2.0.0)
-AC_OUTPUT(Makefile tests/Makefile catacomb-config qcc, chmod 755 qcc)
+AC_OUTPUT(Makefile tests/Makefile catacomb-config:lib-config.in qcc,
+ chmod 755 qcc)
dnl ----- That's all, folks -------------------------------------------------