Allow the entire backup run to be halted by an action (Closes: #455836)
[matthijs/upstream/backupninja.git] / configure.in
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 # The maintainer mode is causing me grief with newest versions of autotools
5 #AM_MAINTAINER_MODE
6 AC_INIT([backupninja],[0.9.5],[backupninja@lists.riseup.net])
7 AC_CONFIG_SRCDIR([src/backupninja.in])
8 AM_INIT_AUTOMAKE
9
10 # Checks for programs.
11
12 # BASH may already be set in the shell, if the admin then changes the
13 # the /bin/sh symlink to a non-bash shell, all hell will break lose.
14 unset BASH
15 AC_PATH_PROGS(BASH, bash, "no", [$PATH:/bin:/usr/bin:/usr/sbin])
16 if test x$BASH = "xno"; then
17     AC_MSG_ERROR([bash is required])
18 fi
19
20 AC_PATH_PROGS(SED, sed, "no")
21 if test x$SED = "xno"; then
22     AC_MSG_ERROR([sed is required])
23 else
24    export SED
25 fi
26
27 AC_PATH_PROGS(AWK, awk, "no")
28 if test x$AWK = "xno"; then
29     AC_MSG_ERROR([awk is required])
30 else
31    export AWK
32 fi
33
34 AC_PATH_PROGS(MD5SUM, md5sum, "no")
35 if test x$MD5SUM = "xno"; then
36     AC_MSG_ERROR([md5sum is required])
37 fi
38
39 AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
40 if test "x$ac_cv_have_rpm" = "xyes"; then
41         rpm --define '_topdir /tmp' > /dev/null 2>&1
42         AC_MSG_CHECKING(to see if we can redefine _topdir)
43         if test $? -eq 0 ; then
44                 AC_MSG_RESULT(yes)
45                 HAVE_RPM=yes
46         else
47                 AC_MSG_RESULT(no.  You'll have to build packages manually.)
48                 HAVE_RPM=no
49         fi
50 fi
51 AC_SUBST(HAVE_RPM)
52
53 AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
54 if test "x$ac_cv_have_rpm" = "xyes"; then
55         rpm --define '_topdir /tmp' > /dev/null 2>&1
56         AC_MSG_CHECKING(to see if we can redefine _topdir)
57         if test $? -eq 0 ; then
58                 AC_MSG_RESULT(yes)
59                 HAVE_RPM=yes
60         else
61                 AC_MSG_RESULT(no.  You'll have to build packages manually.)
62                 HAVE_RPM=no
63         fi
64 fi
65 AC_SUBST(HAVE_RPM)
66
67 AC_PROG_LN_S
68
69 AC_SUBST([CFGDIR], "${sysconfdir}")
70
71 AC_CONFIG_FILES([Makefile
72                 etc/Makefile
73                 examples/Makefile
74                 handlers/Makefile
75                 lib/Makefile
76                 man/Makefile
77                 src/Makefile])
78
79 AC_OUTPUT([ backupninja.spec])