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
|
2021-01-25 16:28:06 +01:00
|
|
|
AC_INIT([backupninja],[1.2.1],[backupninja@lists.riseup.net])
|
2005-10-27 01:05:26 +02:00
|
|
|
AC_CONFIG_SRCDIR([src/backupninja.in])
|
2017-09-05 13:20:00 +02:00
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
2005-10-27 01:05:26 +02:00
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
|
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])
|