backupninja/configure.ac
Jerome Charaoui 93cd5a3142 assume clean build environment, see DEBBUG-915222
This is part of a fix for reproducible builds where usrmerge may or may
not be in effect on the build system. We need to be able to pass the
BASH envvar to autotools so its able to correctly determine the correct
path for bash. The lines removed here were added to fix DEBBUG-346303
but should not be required on a clean build environment, where BASH
remains unset unless the current shell is actually BASH, and when it is,
should return the correct path to the bash executable and not /bin/sh.
2021-01-23 12:25:07 -05:00

84 lines
2.1 KiB
Plaintext

# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# The maintainer mode is causing me grief with newest versions of autotools
#AM_MAINTAINER_MODE
AC_INIT([backupninja],[1.2.0],[backupninja@lists.riseup.net])
AC_CONFIG_SRCDIR([src/backupninja.in])
AM_INIT_AUTOMAKE([foreign])
# Checks for programs.
AC_PATH_PROGS(BASH, bash, "no", [$PATH:/bin:/usr/bin:/usr/sbin])
if test x$BASH = "xno"; then
AC_MSG_ERROR([bash is required])
fi
AC_PATH_PROGS(SED, sed, "no")
if test x$SED = "xno"; then
AC_MSG_ERROR([sed is required])
else
export SED
fi
AC_PATH_PROGS(AWK, awk, "no")
if test x$AWK = "xno"; then
AC_MSG_ERROR([awk is required])
else
export AWK
fi
AC_PATH_PROGS(MKTEMP, mktemp, "no")
if test x$MKTEMPT = "xno"; then
AC_MSG_ERROR([mktemp is required])
fi
AC_PATH_PROGS(STAT, stat, "no")
if test x$STAT = "xno"; then
AC_MSG_ERROR([stat is required])
else
export STAT
fi
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_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
AC_SUBST([CFGDIR], "${sysconfdir}")
AC_CONFIG_FILES([Makefile
etc/Makefile
examples/Makefile
handlers/Makefile
lib/Makefile
man/Makefile
src/Makefile])
AC_OUTPUT([ backupninja.spec])