diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-05-01 10:11:12 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-05-01 10:11:12 +0100 |
commit | 65f77271f290eca1d8b91d16fc6e123037f86229 (patch) | |
tree | 625b1cefd061c80860f4d5c324b27bf9997aa2ed | |
parent | 62fa13411d4eac94473fd2fdcb8f4fade36cf0d0 (diff) | |
download | libguestfs-65f77271f290eca1d8b91d16fc6e123037f86229.tar.gz libguestfs-65f77271f290eca1d8b91d16fc6e123037f86229.tar.xz libguestfs-65f77271f290eca1d8b91d16fc6e123037f86229.zip |
Check fakechroot >= 2.9
-rw-r--r-- | configure.ac | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 42cb661c..7c485aaa 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,28 @@ AC_CHECK_PROG([FEBOOTSTRAP_TO_INITRAMFS], test "x$FEBOOTSTRAP_TO_INITRAMFS" = "xno" && \ AC_MSG_ERROR([febootstrap-to-initramfs must be installed]) +dnl Check we have fakechroot >= 2.9 (it's an indirect requirement +dnl of febootstrap, but old versions will fail with yum). +AC_CHECK_PROG([FAKECHROOT], + [fakechroot],[fakechroot],[no]) +test "x$FAKECHROOT" = "xno" && \ + AC_MSG_ERROR([fakechroot must be installed]) + +AC_MSG_CHECKING([fakechroot version]) +fakechroot_version=`$FAKECHROOT --version | awk '{print $3}'` +if test -z "$fakechroot_version"; then + AC_MSG_RESULT([failed]) + AC_MSG_WARN([fakechroot --version command failed, proceeding anyway]) +else + AC_MSG_RESULT([$fakechroot_version]) + fakechroot_major=`echo $fakechroot_version | awk -F. '{print $1}'` + fakechroot_minor=`echo $fakechroot_version | awk -F. '{print $2}'` + if test "$fakechroot_major" -lt 2 -o \ + \( "$fakechroot_major" -eq 2 -a "$fakechroot_minor" -lt 9 \); then + AC_MSG_ERROR([fakechroot version must be >= 2.9]) + fi +fi + dnl --with-repo to specify a Fedora repository. AC_ARG_WITH([repo], [AS_HELP_STRING([--with-repo], |