X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=configure.in;h=b32c8f33289f33adf625f57b08c00fc833ab5fdf;hp=c7ba5997591b90489ce49e561aa07d2fcdb22e3c;hb=28338e91c351bef21a856f4280b762b9ee0dc2aa;hpb=eac987023c4ef155d58a3cb34f9a21d9043f65bb diff --git a/configure.in b/configure.in index c7ba599..b32c8f3 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,8 @@ # -*- 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],[0.9.3],[backupninja@lists.riseup.net]) AC_CONFIG_SRCDIR([src/backupninja.in]) AM_INIT_AUTOMAKE @@ -24,6 +26,35 @@ AC_CHECK_PROGS(AWK, awk) if test x$AWK = "x"; then AC_MSG_ERROR([awk is required]) 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}")