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.7],[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, "no", [$PATH:/bin:/usr/bin:/usr/sbin])
16 if test x$BASH = "xno"; then
17 AC_MSG_ERROR([bash is required])
20 AC_PATH_PROGS(SED, sed, "no")
21 if test x$SED = "xno"; then
22 AC_MSG_ERROR([sed is required])
27 AC_PATH_PROGS(AWK, awk, "no")
28 if test x$AWK = "xno"; then
29 AC_MSG_ERROR([awk is required])
34 AC_PATH_PROGS(MKTEMP, mktemp, "no")
35 if test x$MKTEMPT = "xno"; then
36 AC_MSG_ERROR([mktemp is required])
39 AC_PATH_PROGS(STAT, stat, "no")
40 if test x$STAT = "xno"; then
41 AC_MSG_ERROR([stat is required])
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
54 AC_MSG_RESULT(no. You'll have to build packages manually.)
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
68 AC_MSG_RESULT(no. You'll have to build packages manually.)
76 AC_SUBST([CFGDIR], "${sysconfdir}")
78 AC_CONFIG_FILES([Makefile
86 AC_OUTPUT([ backupninja.spec])