Added ChangeLog entry for previous commit.
[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.6],[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(MKTEMP, mktemp, "no")
35 if test x$MKTEMPT = "xno"; then
36     AC_MSG_ERROR([mktemp is required])
37 fi
38
39 AC_PATH_PROGS(STAT, stat, "no")
40 if test x$STAT = "xno"; then
41     AC_MSG_ERROR([stat is required])
42 else
43    export STAT
44 fi
45
46 AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
47 if test "x$ac_cv_have_rpm" = "xyes"; then
48         rpm --define '_topdir /tmp' > /dev/null 2>&1
49         AC_MSG_CHECKING(to see if we can redefine _topdir)
50         if test $? -eq 0 ; then
51                 AC_MSG_RESULT(yes)
52                 HAVE_RPM=yes
53         else
54                 AC_MSG_RESULT(no.  You'll have to build packages manually.)
55                 HAVE_RPM=no
56         fi
57 fi
58 AC_SUBST(HAVE_RPM)
59
60 AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
61 if test "x$ac_cv_have_rpm" = "xyes"; then
62         rpm --define '_topdir /tmp' > /dev/null 2>&1
63         AC_MSG_CHECKING(to see if we can redefine _topdir)
64         if test $? -eq 0 ; then
65                 AC_MSG_RESULT(yes)
66                 HAVE_RPM=yes
67         else
68                 AC_MSG_RESULT(no.  You'll have to build packages manually.)
69                 HAVE_RPM=no
70         fi
71 fi
72 AC_SUBST(HAVE_RPM)
73
74 AC_PROG_LN_S
75
76 AC_SUBST([CFGDIR], "${sysconfdir}")
77
78 AC_CONFIG_FILES([Makefile
79                 etc/Makefile
80                 examples/Makefile
81                 handlers/Makefile
82                 lib/Makefile
83                 man/Makefile
84                 src/Makefile])
85
86 AC_OUTPUT([ backupninja.spec])