New stepper interface for constructing Lim-Lee primes.
[u/mdw/catacomb] / configure.in
CommitLineData
d03ab969 1dnl -*-fundamental-*-
2dnl
8de066ff 3dnl $Id: configure.in,v 1.20 2000/08/15 21:45:25 mdw Exp $
d03ab969 4dnl
5dnl Autoconfiguration for Catacomb
6dnl
7dnl (c) 1999 Straylight/Edgeware
8dnl
9
10dnl ----- Licensing notice --------------------------------------------------
11dnl
12dnl This file is part of Catacomb.
13dnl
14dnl Catacomb is free software; you can redistribute it and/or modify
15dnl it under the terms of the GNU Library General Public License as
16dnl published by the Free Software Foundation; either version 2 of the
17dnl License, or (at your option) any later version.
18dnl
19dnl Catacomb is distributed in the hope that it will be useful,
20dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22dnl GNU Library General Public License for more details.
23dnl
24dnl You should have received a copy of the GNU Library General Public
25dnl License along with Catacomb; if not, write to the Free
26dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27dnl MA 02111-1307, USA.
28
29dnl ----- Revision history --------------------------------------------------
30dnl
31dnl $Log: configure.in,v $
8de066ff 32dnl Revision 1.20 2000/08/15 21:45:25 mdw
33dnl New library configuration stuff from `common'.
4992e237 34dnl
d28a0d16 35dnl Revision 1.13 2000/06/17 13:51:03 mdw
36dnl Whoops. Too eager with the mLib version.
37dnl
25f654a7 38dnl Revision 1.12 2000/06/17 12:57:47 mdw
39dnl New free counter noise generator, for use if /dev/random is
40dnl unavailable.
41dnl
93100380 42dnl Revision 1.11 2000/06/17 10:51:23 mdw
43dnl Version number changes. Find maths library for Maurer's test.
44dnl
db2623e1 45dnl Revision 1.10 1999/12/22 16:03:31 mdw
46dnl New mLib version. Find socket functions for pixie.
8582bb3b 47dnl
77783960 48dnl Revision 1.7 1999/11/13 01:55:48 mdw
49dnl Don't be pedantic, because using `long long' as a multiprecision type
50dnl gets complained about.
51dnl
ffc086db 52dnl Revision 1.6 1999/11/11 18:56:14 mdw
53dnl Use `libtool' to generate a shared library.
a094cab7 54dnl
55dnl Revision 1.5 1999/11/11 17:47:34 mdw
56dnl Updates for new configuration system, and `mptypes' generator.
f122f08e 57dnl
58dnl Revision 1.4 1999/11/11 00:58:19 mdw
59dnl Use canned check for `ssize_t'.
748ed8dc 60dnl
f122f08e 61dnl Revision 1.3 1999/10/24 10:20:36 mdw
748ed8dc 62dnl Modify for standalone distribution. The library's getting far too large
63dnl to be sensibly embedded in other programs.
6fcd939f 64dnl
65dnl Revision 1.2 1999/10/23 12:56:25 mdw
66dnl Version number change.
d03ab969 67dnl
68dnl Revision 1.1 1999/09/03 08:41:11 mdw
69dnl Initial import.
70dnl
71
6fcd939f 72dnl --- Boring boilerplate ---
d03ab969 73
74AC_INIT(blkc.h)
8de066ff 75mdw_INIT_LIB(catacomb, Catacomb, 2.0.0pre7)
d03ab969 76AM_CONFIG_HEADER(config.h)
77
78dnl --- Make sure I can compile and build libraries ---
79
80AC_PROG_CC
ffc086db 81AM_PROG_LIBTOOL
77783960 82mdw_GCC_FLAGS(-Wall)
d03ab969 83
84AC_PROG_YACC
85
86dnl --- Actually, I assume these exist anyway ---
87
88AC_CHECK_HEADERS(unistd.h)
89AC_HEADER_STDC
90
91dnl --- Check for various important system types ---
92
93AC_TYPE_PID_T
f122f08e 94AC_TYPE_SIZE_T
d03ab969 95AC_TYPE_UID_T
96AC_CHECK_TYPE(time_t, long)
97mdw_TYPE_SSIZE_T
98
93100380 99dnl --- The maths library, for Maurer's test ---
100
101mdw_CHECK_MANYLIBS(log, m,,, [#include <math.h>], [2])
102mdw_CHECK_MANYLIBS(sqrt, m,,, [#include <math.h>], [2])
103
25f654a7 104dnl --- Functions used for noise-gathering ---
d03ab969 105
106AC_CHECK_FUNCS(setgroups)
a094cab7 107
25f654a7 108AC_CACHE_CHECK([whether the freewheel noise generator will work],
109[catacomb_cv_freewheel],
110[AC_TRY_LINK([
111#include <setjmp.h>
112#include <sys/time.h>
113],
114[struct itimerval itv = { { 0, 0 }, { 0, 5000 } };
115jmp_buf j;
116setitimer(ITIMER_REAL, &itv, 0);
117sigsetjmp(j, 1);],
118[catacomb_cv_freewheel=yes],
119[catacomb_cv_freewheel=no])])
120if test "$catacomb_cv_freewheel" = "yes"; then
121 AC_DEFINE([USE_FREEWHEEL])
122fi
123
db2623e1 124dnl --- Support for the passphrase pixie ---
125
126mdw_CHECK_MANYLIBS(socket, socket)
127AC_CHECK_FUNCS(mlock)
128
d03ab969 129dnl --- Done ---
130
5d822ae1 131mdw_MLIB(2.0.0pre3)
8de066ff 132AC_OUTPUT(Makefile tests/Makefile catacomb-config:lib-config.in qcc,
133 chmod 755 qcc)
d03ab969 134
135dnl ----- That's all, folks -------------------------------------------------