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