2 # Process this file with autoconf to produce a configure script.
4 # The maintainer mode is causing me grief with newest versions of autotools
6 AC_INIT([backupninja],[0.9.3],[backupninja@lists.riseup.net])
7 AC_CONFIG_SRCDIR([src/backupninja.in])
10 # Checks for programs.
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.
15 AC_PATH_PROGS([BASH], [bash], [/bin/bash], [$PATH:/bin:/usr/bin:/usr/sbin])
16 if test x$BASH = "x"; then
17 AC_MSG_ERROR([bash is required])
20 AC_CHECK_PROGS(SED, sed)
21 if test x$SED = "x"; then
22 AC_MSG_ERROR([sed is required])
25 AC_CHECK_PROGS(AWK, awk)
26 if test x$AWK = "x"; then
27 AC_MSG_ERROR([awk is required])
29 AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
30 if test "x$ac_cv_have_rpm" = "xyes"; then
31 rpm --define '_topdir /tmp' > /dev/null 2>&1
32 AC_MSG_CHECKING(to see if we can redefine _topdir)
33 if test $? -eq 0 ; then
37 AC_MSG_RESULT(no. You'll have to build packages manually.)
43 AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
44 if test "x$ac_cv_have_rpm" = "xyes"; then
45 rpm --define '_topdir /tmp' > /dev/null 2>&1
46 AC_MSG_CHECKING(to see if we can redefine _topdir)
47 if test $? -eq 0 ; then
51 AC_MSG_RESULT(no. You'll have to build packages manually.)
59 AC_SUBST([CFGDIR], "${sysconfdir}")
61 AC_CONFIG_FILES([Makefile
69 AC_OUTPUT([ backupninja.spec])