gdsa: Fix the conversion of hashes to integers to conform to the spec.
[u/mdw/catacomb] / configure.in
CommitLineData
2ee993fe 1dnl -*-m4-*-
d03ab969 2dnl
e4fb6b4d 3dnl $Id$
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.
45c0fd36 18dnl
d03ab969 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.
45c0fd36 23dnl
d03ab969 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
6fcd939f 29dnl --- Boring boilerplate ---
d03ab969 30
31AC_INIT(blkc.h)
c3caa2fa 32mdw_INIT_LIB(catacomb, Catacomb, 2.1.0)
d03ab969 33AM_CONFIG_HEADER(config.h)
34
35dnl --- Make sure I can compile and build libraries ---
36
37AC_PROG_CC
ffc086db 38AM_PROG_LIBTOOL
c855281e 39mdw_GCC_FLAGS
d03ab969 40
41AC_PROG_YACC
42
43dnl --- Actually, I assume these exist anyway ---
44
45AC_CHECK_HEADERS(unistd.h)
46AC_HEADER_STDC
47
48dnl --- Check for various important system types ---
49
50AC_TYPE_PID_T
f122f08e 51AC_TYPE_SIZE_T
d03ab969 52AC_TYPE_UID_T
53AC_CHECK_TYPE(time_t, long)
54mdw_TYPE_SSIZE_T
55
93100380 56dnl --- The maths library, for Maurer's test ---
57
58mdw_CHECK_MANYLIBS(log, m,,, [#include <math.h>], [2])
59mdw_CHECK_MANYLIBS(sqrt, m,,, [#include <math.h>], [2])
60
25f654a7 61dnl --- Functions used for noise-gathering ---
d03ab969 62
63AC_CHECK_FUNCS(setgroups)
a094cab7 64
25f654a7 65AC_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 } };
72jmp_buf j;
73setitimer(ITIMER_REAL, &itv, 0);
74sigsetjmp(j, 1);],
75[catacomb_cv_freewheel=yes],
76[catacomb_cv_freewheel=no])])
77if test "$catacomb_cv_freewheel" = "yes"; then
e4fb6b4d 78 AC_DEFINE([USE_FREEWHEEL], [1],
45c0fd36 79 [Define if you want to use the freewheel noise generator.])
25f654a7 80fi
81
db2623e1 82dnl --- Support for the passphrase pixie ---
83
84mdw_CHECK_MANYLIBS(socket, socket)
85AC_CHECK_FUNCS(mlock)
86
c29970a7
MW
87dnl --- Debugging things ---
88
45c0fd36
MW
89AC_ARG_ENABLE([mpw],
90 [AS_HELP_STRING([--enable-mpw],
91 [force small-width mp digits])],
92 [case "$enableval" in
93 y*|t*|short)
94 AC_DEFINE([FORCE_MPW_SHORT], [1],
95 [Define to force small-width mp digits.])
96 ;;
97 cussid)
98 AC_DEFINE([FORCE_MPW_CUSSID], [1],
99 [Define to force strange-width mp digits.])
100 ;;
101 esac])
c29970a7 102
d03ab969 103dnl --- Done ---
104
09fcc485 105mdw_MLIB(2.0.0)
8de066ff 106AC_OUTPUT(Makefile tests/Makefile catacomb-config:lib-config.in qcc,
107 chmod 755 qcc)
d03ab969 108
109dnl ----- That's all, folks -------------------------------------------------