2ee993fe |
1 | dnl -*-m4-*- |
d03ab969 |
2 | dnl |
b817bfc6 |
3 | dnl $Id: configure.in,v 1.28 2004/04/08 01:36:15 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 | |
6fcd939f |
29 | dnl --- Boring boilerplate --- |
d03ab969 |
30 | |
31 | AC_INIT(blkc.h) |
c3caa2fa |
32 | mdw_INIT_LIB(catacomb, Catacomb, 2.1.0) |
d03ab969 |
33 | AM_CONFIG_HEADER(config.h) |
34 | |
35 | dnl --- Make sure I can compile and build libraries --- |
36 | |
37 | AC_PROG_CC |
ffc086db |
38 | AM_PROG_LIBTOOL |
c855281e |
39 | mdw_GCC_FLAGS |
d03ab969 |
40 | |
41 | AC_PROG_YACC |
42 | |
43 | dnl --- Actually, I assume these exist anyway --- |
44 | |
45 | AC_CHECK_HEADERS(unistd.h) |
46 | AC_HEADER_STDC |
47 | |
48 | dnl --- Check for various important system types --- |
49 | |
50 | AC_TYPE_PID_T |
f122f08e |
51 | AC_TYPE_SIZE_T |
d03ab969 |
52 | AC_TYPE_UID_T |
53 | AC_CHECK_TYPE(time_t, long) |
54 | mdw_TYPE_SSIZE_T |
55 | |
93100380 |
56 | dnl --- The maths library, for Maurer's test --- |
57 | |
58 | mdw_CHECK_MANYLIBS(log, m,,, [#include <math.h>], [2]) |
59 | mdw_CHECK_MANYLIBS(sqrt, m,,, [#include <math.h>], [2]) |
60 | |
25f654a7 |
61 | dnl --- Functions used for noise-gathering --- |
d03ab969 |
62 | |
63 | AC_CHECK_FUNCS(setgroups) |
a094cab7 |
64 | |
25f654a7 |
65 | AC_CACHE_CHECK([whether the freewheel noise generator will work], |
66 | [catacomb_cv_freewheel], |
67 | [AC_TRY_LINK([ |
68 | #include <setjmp.h> |
69 | #include <sys/time.h> |
70 | ], |
71 | [struct itimerval itv = { { 0, 0 }, { 0, 5000 } }; |
72 | jmp_buf j; |
73 | setitimer(ITIMER_REAL, &itv, 0); |
74 | sigsetjmp(j, 1);], |
75 | [catacomb_cv_freewheel=yes], |
76 | [catacomb_cv_freewheel=no])]) |
77 | if test "$catacomb_cv_freewheel" = "yes"; then |
78 | AC_DEFINE([USE_FREEWHEEL]) |
79 | fi |
80 | |
db2623e1 |
81 | dnl --- Support for the passphrase pixie --- |
82 | |
83 | mdw_CHECK_MANYLIBS(socket, socket) |
84 | AC_CHECK_FUNCS(mlock) |
85 | |
d03ab969 |
86 | dnl --- Done --- |
87 | |
09fcc485 |
88 | mdw_MLIB(2.0.0) |
8de066ff |
89 | AC_OUTPUT(Makefile tests/Makefile catacomb-config:lib-config.in qcc, |
90 | chmod 755 qcc) |
d03ab969 |
91 | |
92 | dnl ----- That's all, folks ------------------------------------------------- |