3 dnl Configuration script for Catacomb
5 dnl (c) 2013 Straylight/Edgeware
8 dnl----- Licensing notice ---------------------------------------------------
10 dnl This file is part of Catacomb.
12 dnl Catacomb is free software; you can redistribute it and/or modify
13 dnl it under the terms of the GNU Library General Public License as
14 dnl published by the Free Software Foundation; either version 2 of the
15 dnl License, or (at your option) any later version.
17 dnl Catacomb is distributed in the hope that it will be useful,
18 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
19 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 dnl GNU Library General Public License for more details.
22 dnl You should have received a copy of the GNU Library General Public
23 dnl License along with Catacomb; if not, write to the Free
24 dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25 dnl MA 02111-1307, USA.
27 dnl--------------------------------------------------------------------------
31 AC_INIT([catacomb], AUTO_VERSION, [mdw@distorted.org.uk])
32 AC_CONFIG_SRCDIR([catacomb.pc.in])
33 AC_CONFIG_AUX_DIR([config])
34 AM_INIT_AUTOMAKE([foreign parallel-tests])
40 mdw_LIBTOOL_VERSION_INFO
46 dnl--------------------------------------------------------------------------
47 dnl C programming environment.
49 dnl Find out if we're cross-compiling.
50 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
52 dnl Various standard types.
53 AC_CHECK_TYPE([pid_t], [int])
55 AC_CHECK_TYPE([ssize_t], [int])
57 dnl The maths library.
59 AC_SEARCH_LIBS([log], [m])
60 AC_SEARCH_LIBS([sqrt], [m])
61 AC_SUBST([CATACOMB_LIBS], [$LIBS])
64 dnl Functions used for noise-gathering.
65 AC_CHECK_FUNCS([setgroups])
66 AC_CACHE_CHECK([whether the freewheel noise generator will work],
67 [catacomb_cv_freewheel],
70 #include <sys/time.h>],
71 [struct itimerval itv = { { 0, 0 }, { 0, 5000 } };
73 setitimer(ITIMER_REAL, &itv, 0);
75 [catacomb_cv_freewheel=yes],
76 [catacomb_cv_freewheel=no])])
77 case $catacomb_cv_freewheel in
79 AC_DEFINE([USE_FREEWHEEL], [1],
80 [Define if you want to use the freewheel noise generator.])
84 dnl Support for the passphrase pixie.
86 AC_SEARCH_LIBS([socket], [socket])
87 AC_SUBST([PIXIE_LIBS], [$LIBS])
90 dnl Memory locking support.
91 AC_CHECK_FUNCS([mlock])
93 dnl Necessary support libraries.
94 PKG_CHECK_MODULES([mLib], [mLib >= 2.0.4])
95 AM_CFLAGS="$AM_CFLAGS $mLib_CFLAGS"
97 dnl--------------------------------------------------------------------------
100 dnl Make sure we have a suitable version.
101 AM_PATH_PYTHON([2.5])
103 dnl--------------------------------------------------------------------------
104 dnl Special debugging options.
107 [AS_HELP_STRING([--enable-mpw], [force small-width mp digits])],
108 [case "$enableval" in
110 AC_DEFINE([FORCE_MPW_SHORT], [1],
111 [Define to force small-width mp digits.])
114 AC_DEFINE([FORCE_MPW_CUSSID], [1],
115 [Define to force strange-width mp digits.])
119 dnl--------------------------------------------------------------------------
122 AC_CONFIG_HEADER([config/config.h])
136 dnl----- That's all, folks --------------------------------------------------