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