1 dnl Process this file with autoconf 2.52+ to produce a configure script.
3 dnl Copyright (C) 2001 Philipp Rumpf
4 dnl Copyright (C) 2004 Henrique de Moraes Holschuh <hmh@debian.org>
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.
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.
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
20 AC_INIT(rng-tools, 5, [Jeff Garzik <jgarzik@pobox.com>])
22 AC_CONFIG_SRCDIR([rngd.c])
23 AM_INIT_AUTOMAKE([gnu])
24 AC_CONFIG_HEADERS([rng-tools-config.h])
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)]),
32 [with_libgcrypt=check]
35 dnl Make sure anyone changing configure.ac/Makefile.am has a clue
38 dnl Checks for programs
41 AC_PROG_GCC_TRADITIONAL
43 dnl Checks for header files.
45 dnl AC_CHECK_HEADERS(sys/ioctl.h unistd.h)
47 dnl Checks for typedefs, structures, and compiler characteristics.
51 dnl -----------------------------
52 dnl Checks for required libraries
53 dnl -----------------------------
55 dnl -------------------------------------
56 dnl Checks for optional library functions
57 dnl -------------------------------------
59 dnl -------------------------------------
60 dnl Check for libgcrypt support
61 dnl -------------------------------------
64 [test "x$with_libgcrypt" != "xno"],
66 AC_CHECK_HEADER([gcrypt.h],
69 [gcry_check_version], ,
71 if test "x$with_libgcrypt" != "xcheck"; then
72 AC_MSG_FAILURE([libgcrypt not found]); else
73 AC_MSG_NOTICE([libgcrypt support disabled])
77 [if test "x$with_libgcrypt" != "xcheck"; then
78 AC_MSG_FAILURE([libgcrypt headers not found]); else
79 AC_MSG_NOTICE([libgcrypt support disabled])
91 dnl --------------------------
92 dnl autoconf output generation
93 dnl --------------------------
95 AC_CONFIG_FILES([Makefile contrib/Makefile rngd.8 rngtest.1])