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.4],[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(MD5SUM, md5sum, "no")
35 if test x$MD5SUM = "xno"; then
36 AC_MSG_ERROR([md5sum is required])
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
47 AC_MSG_RESULT(no. You'll have to build packages manually.)
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
61 AC_MSG_RESULT(no. You'll have to build packages manually.)
69 AC_SUBST([CFGDIR], "${sysconfdir}")
71 AC_CONFIG_FILES([Makefile
79 AC_OUTPUT([ backupninja.spec])