X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=configure.in;h=26e95be3041089b0cf80a6ae044b109a6bbfcf98;hp=64b72d0f4625b6b980d1aacd3828f880fc512971;hb=d404d8b754758dd3ac27c0be280f3ef9187ffce4;hpb=d076494a6ea20754841582d0903b13eb6a973cfd diff --git a/configure.in b/configure.in index 64b72d0..26e95be 100644 --- a/configure.in +++ b/configure.in @@ -1,32 +1,78 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT([backupninja],[0.9.0],[micah@riseup.net]) +# The maintainer mode is causing me grief with newest versions of autotools +#AM_MAINTAINER_MODE +AC_INIT([backupninja],[0.9.6],[backupninja@lists.riseup.net]) AC_CONFIG_SRCDIR([src/backupninja.in]) -#AC_CONFIG_HEADERS([config.sh]) AM_INIT_AUTOMAKE # Checks for programs. -AC_PATH_PROGS([BASH], [bash]) -#AC_PATH_PROGS([PERL], [perl]) -#AC_DEFINE([MYVERSION], [5.6]) -#AC_DEFINE_UNQUOTED([MYDIR], "${sysconfdir}") -#AC_DEFINE([SYSCONFDIR], [$sysconfdir], [System config dir]) -AC_SUBST([CFGDIR], "${sysconfdir}") +# 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 +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 -# Checks for libraries. +AC_PATH_PROGS(MKTEMP, mktemp, "no") +if test x$MKTEMPT = "xno"; then + AC_MSG_ERROR([mktemp is required]) +fi -# Checks for header files. +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) -# Checks for typedefs, structures, and compiler characteristics. +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) -# Checks for library functions. +AC_PROG_LN_S + +AC_SUBST([CFGDIR], "${sysconfdir}") AC_CONFIG_FILES([Makefile etc/Makefile examples/Makefile handlers/Makefile + lib/Makefile man/Makefile src/Makefile])