]> git.ipfire.org Git - thirdparty/rng-tools.git/blob - configure.ac
Provide support for RDRAND capable systems that don't have AES-NI.
[thirdparty/rng-tools.git] / configure.ac
1 dnl Process this file with autoconf 2.52+ to produce a configure script.
2 dnl
3 dnl Copyright (C) 2001 Philipp Rumpf
4 dnl Copyright (C) 2004 Henrique de Moraes Holschuh <hmh@debian.org>
5 dnl
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2 of the License, or
9 dnl (at your option) any later version.
10 dnl
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
19
20 AC_INIT(rng-tools, 4, [Jeff Garzik <jgarzik@pobox.com>])
21 AC_PREREQ(2.52)
22 AC_CONFIG_SRCDIR([rngd.c])
23 AM_INIT_AUTOMAKE([gnu])
24 AC_CONFIG_HEADERS([rng-tools-config.h])
25
26 dnl Parse options
27
28 AC_ARG_WITH([libgcrypt],
29 AS_HELP_STRING([--without-libgcrypt],
30 [Disable libgcrypt support. Systems that support RDRAND but not AES-NI will require libgcrypt in order to use RDRAND as an entropy source. (Default: --with-libgcrypt)]),
31 [],
32 [with_libgcrypt=check]
33 )
34
35 dnl Make sure anyone changing configure.ac/Makefile.am has a clue
36 AM_MAINTAINER_MODE
37
38 dnl Checks for programs
39 AC_PROG_CC
40 AC_PROG_RANLIB
41 AC_PROG_GCC_TRADITIONAL
42
43 dnl Checks for header files.
44 dnl AC_HEADER_STDC
45 dnl AC_CHECK_HEADERS(sys/ioctl.h unistd.h)
46
47 dnl Checks for typedefs, structures, and compiler characteristics.
48 dnl AC_TYPE_SIZE_T
49 dnl AC_TYPE_PID_T
50
51 dnl -----------------------------
52 dnl Checks for required libraries
53 dnl -----------------------------
54
55 dnl -------------------------------------
56 dnl Checks for optional library functions
57 dnl -------------------------------------
58
59 dnl -------------------------------------
60 dnl Check for libgcrypt support
61 dnl -------------------------------------
62
63 AS_IF(
64 [test "x$with_libgcrypt" != "xno"],
65 [
66 AC_CHECK_HEADER([gcrypt.h],
67 AC_CHECK_LIB(
68 [gcrypt],
69 [gcry_check_version], ,
70 [
71 if test "x$with_libgcrypt" != "xcheck"; then
72 AC_MSG_FAILURE([libgcrypt not found]); else
73 AC_MSG_NOTICE([libgcrypt support disabled])
74 fi
75 ]
76 ),
77 [if test "x$with_libgcrypt" != "xcheck"; then
78 AC_MSG_FAILURE([libgcrypt headers not found]); else
79 AC_MSG_NOTICE([libgcrypt support disabled])
80 fi]
81 )
82 ]
83 )
84
85 dnl -----------------
86 dnl Configure options
87 dnl -----------------
88
89 AM_PROG_AS
90
91 dnl --------------------------
92 dnl autoconf output generation
93 dnl --------------------------
94
95 AC_CONFIG_FILES([Makefile contrib/Makefile rngd.8 rngtest.1])
96 AC_OUTPUT