configure.ac: Don't let the LIBS setting leak out.
[distorted-backup] / configure.ac
1 dnl -*-autoconf-*-
2 dnl
3 dnl Configure script for distorted.org.uk backup software
4 dnl
5 dnl (c) 2011 Mark Wooding
6 dnl
7
8 dnl----- Licensing notice ---------------------------------------------------
9 dnl
10 dnl This file is part of the distorted.org.uk backup suite.
11 dnl
12 dnl distorted-backup is free software; you can redistribute it and/or modify
13 dnl it under the terms of the GNU General Public License as published by
14 dnl the Free Software Foundation; either version 2 of the License, or
15 dnl (at your option) any later version.
16 dnl
17 dnl distorted-backup 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 General Public License for more details.
21 dnl
22 dnl You should have received a copy of the GNU General Public License along
23 dnl with distorted-backup; if not, write to the Free Software Foundation,
24 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26 dnl--------------------------------------------------------------------------
27 dnl Initialization.
28
29 mdw_AUTO_VERSION
30 AC_INIT([distorted-backup], AUTO_VERSION, [mdw@distorted.org.uk])
31 AC_CONFIG_SRCDIR([bkpadmin.in])
32 AC_CONFIG_AUX_DIR([config])
33 AM_INIT_AUTOMAKE([foreign])
34 mdw_SILENT_RULES
35
36 AC_PROG_CC
37
38 dnl--------------------------------------------------------------------------
39 dnl C programming environment.
40
41 PKG_CHECK_MODULES([mLib], [mLib >= 2.1.0])
42 PKG_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 save_LIBS=$LIBS
47 AC_CHECK_HEADER([nettle/sha.h], [], [nettlep=nil])
48 AC_CHECK_LIB([nettle], [nettle_sha256_init], [], [nettlep=nil])
49 case $nettlep in
50 nil) AC_MSG_ERROR([Failed to find Nettle library.]) ;;
51 esac
52 nettle_CFLAGS= nettle_LIBS=-lnettle LIBS=$save_LIBS])
53
54 dnl--------------------------------------------------------------------------
55 dnl Perl programming environment.
56
57 AC_ARG_VAR([PERL], [Path to your favourite Perl binary.])
58 AC_PATH_PROGS([PERL], [perl perl5], [false])
59 AX_PROG_PERL_VERSION([5.10],,
60 [AC_MSG_ERROR([Failed to find suitable Perl.])])
61
62 dnl--------------------------------------------------------------------------
63 dnl Output.
64
65 AC_CONFIG_FILES(
66 [Makefile])
67 AC_OUTPUT
68
69 dnl----- That's all, folks --------------------------------------------------