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