Added RPM patches submitted by Robert Napier
[matthijs/upstream/backupninja.git] / configure.in
index 5781ce7d0f2be1458cd4203ab5c4368c5382ea53..b32c8f33289f33adf625f57b08c00fc833ab5fdf 100644 (file)
@@ -26,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}")