Force subkeys to be sorted in structured keys.
[u/mdw/catacomb] / configure.in
CommitLineData
2ee993fe 1dnl -*-m4-*-
d03ab969 2dnl
c3caa2fa 3dnl $Id: configure.in,v 1.27 2004/03/21 22:52:06 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 $
c3caa2fa 32dnl Revision 1.27 2004/03/21 22:52:06 mdw
33dnl Merge and close elliptic curve branch.
34dnl
35dnl Revision 1.24.2.1 2003/06/10 13:43:53 mdw
36dnl Simple (non-projective) curves over prime fields now seem to work.
37dnl
2ee993fe 38dnl Revision 1.26 2003/11/29 23:39:36 mdw
39dnl Debianization.
40dnl
6b80b6c4 41dnl Revision 1.25 2003/10/11 21:02:33 mdw
42dnl Import buf stuff from tripe.
43dnl
09fcc485 44dnl Revision 1.24 2003/05/16 00:30:28 mdw
45dnl Version bump.
46dnl
d69eb0bb 47dnl Revision 1.23 2001/03/04 13:09:40 mdw
48dnl Mark dependency on mLib 2.0.0pre4 now.
d8aff488 49dnl
c855281e 50dnl Revision 1.21 2000/10/08 12:01:28 mdw
51dnl Reinstate the `-pedantic' option.
52dnl
8de066ff 53dnl Revision 1.20 2000/08/15 21:45:25 mdw
54dnl New library configuration stuff from `common'.
4992e237 55dnl
d28a0d16 56dnl Revision 1.13 2000/06/17 13:51:03 mdw
57dnl Whoops. Too eager with the mLib version.
58dnl
25f654a7 59dnl Revision 1.12 2000/06/17 12:57:47 mdw
60dnl New free counter noise generator, for use if /dev/random is
61dnl unavailable.
62dnl
93100380 63dnl Revision 1.11 2000/06/17 10:51:23 mdw
64dnl Version number changes. Find maths library for Maurer's test.
65dnl
db2623e1 66dnl Revision 1.10 1999/12/22 16:03:31 mdw
67dnl New mLib version. Find socket functions for pixie.
8582bb3b 68dnl
77783960 69dnl Revision 1.7 1999/11/13 01:55:48 mdw
70dnl Don't be pedantic, because using `long long' as a multiprecision type
71dnl gets complained about.
72dnl
ffc086db 73dnl Revision 1.6 1999/11/11 18:56:14 mdw
74dnl Use `libtool' to generate a shared library.
a094cab7 75dnl
76dnl Revision 1.5 1999/11/11 17:47:34 mdw
77dnl Updates for new configuration system, and `mptypes' generator.
f122f08e 78dnl
79dnl Revision 1.4 1999/11/11 00:58:19 mdw
80dnl Use canned check for `ssize_t'.
748ed8dc 81dnl
f122f08e 82dnl Revision 1.3 1999/10/24 10:20:36 mdw
748ed8dc 83dnl Modify for standalone distribution. The library's getting far too large
84dnl to be sensibly embedded in other programs.
6fcd939f 85dnl
d03ab969 86dnl Revision 1.1 1999/09/03 08:41:11 mdw
87dnl Initial import.
88dnl
89
6fcd939f 90dnl --- Boring boilerplate ---
d03ab969 91
92AC_INIT(blkc.h)
c3caa2fa 93mdw_INIT_LIB(catacomb, Catacomb, 2.1.0)
d03ab969 94AM_CONFIG_HEADER(config.h)
95
96dnl --- Make sure I can compile and build libraries ---
97
98AC_PROG_CC
ffc086db 99AM_PROG_LIBTOOL
c855281e 100mdw_GCC_FLAGS
d03ab969 101
102AC_PROG_YACC
103
104dnl --- Actually, I assume these exist anyway ---
105
106AC_CHECK_HEADERS(unistd.h)
107AC_HEADER_STDC
108
109dnl --- Check for various important system types ---
110
111AC_TYPE_PID_T
f122f08e 112AC_TYPE_SIZE_T
d03ab969 113AC_TYPE_UID_T
114AC_CHECK_TYPE(time_t, long)
115mdw_TYPE_SSIZE_T
116
93100380 117dnl --- The maths library, for Maurer's test ---
118
119mdw_CHECK_MANYLIBS(log, m,,, [#include <math.h>], [2])
120mdw_CHECK_MANYLIBS(sqrt, m,,, [#include <math.h>], [2])
121
25f654a7 122dnl --- Functions used for noise-gathering ---
d03ab969 123
124AC_CHECK_FUNCS(setgroups)
a094cab7 125
25f654a7 126AC_CACHE_CHECK([whether the freewheel noise generator will work],
127[catacomb_cv_freewheel],
128[AC_TRY_LINK([
129#include <setjmp.h>
130#include <sys/time.h>
131],
132[struct itimerval itv = { { 0, 0 }, { 0, 5000 } };
133jmp_buf j;
134setitimer(ITIMER_REAL, &itv, 0);
135sigsetjmp(j, 1);],
136[catacomb_cv_freewheel=yes],
137[catacomb_cv_freewheel=no])])
138if test "$catacomb_cv_freewheel" = "yes"; then
139 AC_DEFINE([USE_FREEWHEEL])
140fi
141
db2623e1 142dnl --- Support for the passphrase pixie ---
143
144mdw_CHECK_MANYLIBS(socket, socket)
145AC_CHECK_FUNCS(mlock)
146
d03ab969 147dnl --- Done ---
148
09fcc485 149mdw_MLIB(2.0.0)
8de066ff 150AC_OUTPUT(Makefile tests/Makefile catacomb-config:lib-config.in qcc,
151 chmod 755 qcc)
d03ab969 152
153dnl ----- That's all, folks -------------------------------------------------