chiark / gitweb /
configure.ac: Set the correct build variables for Nettle.
[distorted-backup] / configure.ac
CommitLineData
99248ed2
MW
1dnl -*-autoconf-*-
2dnl
3dnl Configure script for distorted.org.uk backup software
4dnl
5dnl (c) 2011 Mark Wooding
6dnl
7
8dnl----- Licensing notice ---------------------------------------------------
9dnl
13678d88
MW
10dnl This file is part of the distorted.org.uk backup suite.
11dnl
12dnl distorted-backup is free software; you can redistribute it and/or modify
99248ed2
MW
13dnl it under the terms of the GNU General Public License as published by
14dnl the Free Software Foundation; either version 2 of the License, or
15dnl (at your option) any later version.
16dnl
13678d88 17dnl distorted-backup is distributed in the hope that it will be useful,
99248ed2
MW
18dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
19dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20dnl GNU General Public License for more details.
21dnl
13678d88
MW
22dnl You should have received a copy of the GNU General Public License along
23dnl with distorted-backup; if not, write to the Free Software Foundation,
99248ed2
MW
24dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26dnl--------------------------------------------------------------------------
27dnl Initialization.
28
29mdw_AUTO_VERSION
30AC_INIT([distorted-backup], AUTO_VERSION, [mdw@distorted.org.uk])
31AC_CONFIG_SRCDIR([bkpadmin.in])
32AC_CONFIG_AUX_DIR([config])
33AM_INIT_AUTOMAKE([foreign])
34mdw_SILENT_RULES
35
36AC_PROG_CC
37
38dnl--------------------------------------------------------------------------
39dnl C programming environment.
40
41PKG_CHECK_MODULES([mLib], [mLib >= 2.1.0])
49027c04
MW
42PKG_CHECK_MODULES([nettle], [nettle >= 2.4], [], [
43 ## That didn't work; unfortunately older Nettle packages don't have a
44 ## pkg-config dropping. Let's see whether it will work anyway.
45 nettlep=t
46 AC_CHECK_HEADER([nettle/sha.h], [], [nettlep=nil])
47 AC_CHECK_LIB([nettle], [nettle_sha256_init], [], [nettlep=nil])
48 case $nettlep in
49 nil) AC_MSG_ERROR([Failed to find Nettle library.]) ;;
50 esac
0f4a962c 51 nettle_CFLAGS= nettle_LIBS=-lnettle])
99248ed2
MW
52
53dnl--------------------------------------------------------------------------
54dnl Perl programming environment.
55
56AC_ARG_VAR([PERL], [Path to your favourite Perl binary.])
57AC_PATH_PROGS([PERL], [perl perl5], [false])
58AX_PROG_PERL_VERSION([5.10],,
59 [AC_MSG_ERROR([Failed to find suitable Perl.])])
60
61dnl--------------------------------------------------------------------------
62dnl Output.
63
64AC_CONFIG_FILES(
65 [Makefile])
66AC_OUTPUT
67
68dnl----- That's all, folks --------------------------------------------------