Minor tidying and fixing.
[u/mdw/catacomb] / configure.in
CommitLineData
d03ab969 1dnl -*-fundamental-*-
2dnl
25f654a7 3dnl $Id: configure.in,v 1.12 2000/06/17 12:57:47 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 $
25f654a7 32dnl Revision 1.12 2000/06/17 12:57:47 mdw
33dnl New free counter noise generator, for use if /dev/random is
34dnl unavailable.
35dnl
93100380 36dnl Revision 1.11 2000/06/17 10:51:23 mdw
37dnl Version number changes. Find maths library for Maurer's test.
38dnl
db2623e1 39dnl Revision 1.10 1999/12/22 16:03:31 mdw
40dnl New mLib version. Find socket functions for pixie.
8582bb3b 41dnl
77783960 42dnl Revision 1.7 1999/11/13 01:55:48 mdw
43dnl Don't be pedantic, because using `long long' as a multiprecision type
44dnl gets complained about.
45dnl
ffc086db 46dnl Revision 1.6 1999/11/11 18:56:14 mdw
47dnl Use `libtool' to generate a shared library.
a094cab7 48dnl
49dnl Revision 1.5 1999/11/11 17:47:34 mdw
50dnl Updates for new configuration system, and `mptypes' generator.
f122f08e 51dnl
52dnl Revision 1.4 1999/11/11 00:58:19 mdw
53dnl Use canned check for `ssize_t'.
748ed8dc 54dnl
f122f08e 55dnl Revision 1.3 1999/10/24 10:20:36 mdw
748ed8dc 56dnl Modify for standalone distribution. The library's getting far too large
57dnl to be sensibly embedded in other programs.
6fcd939f 58dnl
59dnl Revision 1.2 1999/10/23 12:56:25 mdw
60dnl Version number change.
d03ab969 61dnl
62dnl Revision 1.1 1999/09/03 08:41:11 mdw
63dnl Initial import.
64dnl
65
6fcd939f 66dnl --- Boring boilerplate ---
d03ab969 67
68AC_INIT(blkc.h)
25f654a7 69AM_INIT_AUTOMAKE(catacomb, 2.0.0pre1)
d03ab969 70AM_CONFIG_HEADER(config.h)
71
72dnl --- Make sure I can compile and build libraries ---
73
74AC_PROG_CC
ffc086db 75AM_PROG_LIBTOOL
77783960 76mdw_GCC_FLAGS(-Wall)
d03ab969 77
78AC_PROG_YACC
79
80dnl --- Actually, I assume these exist anyway ---
81
82AC_CHECK_HEADERS(unistd.h)
83AC_HEADER_STDC
84
85dnl --- Check for various important system types ---
86
87AC_TYPE_PID_T
f122f08e 88AC_TYPE_SIZE_T
d03ab969 89AC_TYPE_UID_T
90AC_CHECK_TYPE(time_t, long)
91mdw_TYPE_SSIZE_T
92
93100380 93dnl --- The maths library, for Maurer's test ---
94
95mdw_CHECK_MANYLIBS(log, m,,, [#include <math.h>], [2])
96mdw_CHECK_MANYLIBS(sqrt, m,,, [#include <math.h>], [2])
97
25f654a7 98dnl --- Functions used for noise-gathering ---
d03ab969 99
100AC_CHECK_FUNCS(setgroups)
a094cab7 101
25f654a7 102AC_CACHE_CHECK([whether the freewheel noise generator will work],
103[catacomb_cv_freewheel],
104[AC_TRY_LINK([
105#include <setjmp.h>
106#include <sys/time.h>
107],
108[struct itimerval itv = { { 0, 0 }, { 0, 5000 } };
109jmp_buf j;
110setitimer(ITIMER_REAL, &itv, 0);
111sigsetjmp(j, 1);],
112[catacomb_cv_freewheel=yes],
113[catacomb_cv_freewheel=no])])
114if test "$catacomb_cv_freewheel" = "yes"; then
115 AC_DEFINE([USE_FREEWHEEL])
116fi
117
db2623e1 118dnl --- Support for the passphrase pixie ---
119
120mdw_CHECK_MANYLIBS(socket, socket)
121AC_CHECK_FUNCS(mlock)
122
d03ab969 123dnl --- Done ---
124
93100380 125mdw_MLIB(2.0.0)
126AC_OUTPUT(Makefile tests/Makefile catacomb-config qcc, chmod 755 qcc)
d03ab969 127
128dnl ----- That's all, folks -------------------------------------------------