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