2005-10-27 01:05:26 +02:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2006-03-25 18:54:22 +01:00
|
|
|
# The maintainer mode is causing me grief with newest versions of autotools
|
|
|
|
#AM_MAINTAINER_MODE
|
2011-09-23 16:41:21 +02:00
|
|
|
AC_INIT([backupninja],[0.9.10],[backupninja@lists.riseup.net])
|
2005-10-27 01:05:26 +02:00
|
|
|
AC_CONFIG_SRCDIR([src/backupninja.in])
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
|
2006-01-20 01:10:58 +01:00
|
|
|
# BASH may already be set in the shell, if the admin then changes the
|
|
|
|
# the /bin/sh symlink to a non-bash shell, all hell will break lose.
|
|
|
|
unset BASH
|
2007-02-23 19:04:04 +01:00
|
|
|
AC_PATH_PROGS(BASH, bash, "no", [$PATH:/bin:/usr/bin:/usr/sbin])
|
|
|
|
if test x$BASH = "xno"; then
|
2006-01-20 01:10:58 +01:00
|
|
|
AC_MSG_ERROR([bash is required])
|
|
|
|
fi
|
2005-10-27 01:05:26 +02:00
|
|
|
|
2007-02-23 19:04:04 +01:00
|
|
|
AC_PATH_PROGS(SED, sed, "no")
|
|
|
|
if test x$SED = "xno"; then
|
2006-01-20 01:10:58 +01:00
|
|
|
AC_MSG_ERROR([sed is required])
|
2007-02-23 19:04:04 +01:00
|
|
|
else
|
|
|
|
export SED
|
2006-01-20 01:10:58 +01:00
|
|
|
fi
|
2005-10-27 01:05:26 +02:00
|
|
|
|
2007-02-23 19:04:04 +01:00
|
|
|
AC_PATH_PROGS(AWK, awk, "no")
|
|
|
|
if test x$AWK = "xno"; then
|
2006-01-20 01:10:58 +01:00
|
|
|
AC_MSG_ERROR([awk is required])
|
2007-02-23 19:04:04 +01:00
|
|
|
else
|
|
|
|
export AWK
|
2006-01-20 01:10:58 +01:00
|
|
|
fi
|
2007-02-23 19:04:04 +01:00
|
|
|
|
2008-06-24 20:02:23 +02:00
|
|
|
AC_PATH_PROGS(MKTEMP, mktemp, "no")
|
|
|
|
if test x$MKTEMPT = "xno"; then
|
|
|
|
AC_MSG_ERROR([mktemp is required])
|
|
|
|
fi
|
|
|
|
|
2009-12-25 04:09:29 +01:00
|
|
|
AC_PATH_PROGS(STAT, stat, "no")
|
|
|
|
if test x$STAT = "xno"; then
|
|
|
|
AC_MSG_ERROR([stat is required])
|
|
|
|
else
|
|
|
|
export STAT
|
|
|
|
fi
|
|
|
|
|
2006-08-06 20:01:28 +02:00
|
|
|
AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
|
|
|
|
if test "x$ac_cv_have_rpm" = "xyes"; then
|
|
|
|
rpm --define '_topdir /tmp' > /dev/null 2>&1
|
|
|
|
AC_MSG_CHECKING(to see if we can redefine _topdir)
|
|
|
|
if test $? -eq 0 ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
HAVE_RPM=yes
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no. You'll have to build packages manually.)
|
|
|
|
HAVE_RPM=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(HAVE_RPM)
|
2005-10-27 01:05:26 +02:00
|
|
|
|
2006-08-11 15:46:57 +02:00
|
|
|
AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
|
|
|
|
if test "x$ac_cv_have_rpm" = "xyes"; then
|
|
|
|
rpm --define '_topdir /tmp' > /dev/null 2>&1
|
|
|
|
AC_MSG_CHECKING(to see if we can redefine _topdir)
|
|
|
|
if test $? -eq 0 ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
HAVE_RPM=yes
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no. You'll have to build packages manually.)
|
|
|
|
HAVE_RPM=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(HAVE_RPM)
|
|
|
|
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
2006-01-20 01:10:58 +01:00
|
|
|
AC_SUBST([CFGDIR], "${sysconfdir}")
|
2005-10-27 01:05:26 +02:00
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
etc/Makefile
|
|
|
|
examples/Makefile
|
|
|
|
handlers/Makefile
|
2005-11-29 11:08:41 +01:00
|
|
|
lib/Makefile
|
2005-10-27 01:05:26 +02:00
|
|
|
man/Makefile
|
|
|
|
src/Makefile])
|
|
|
|
|
|
|
|
AC_OUTPUT([ backupninja.spec])
|