On 01/31/2011 05:10 PM, Eric Blake wrote:
* configure.ac (PARTED_FOUND): Issue configure error if
--with-storage-disk=yes but no parted is found.
---
As pointed out while reviewing Osier's patch, we were
unconditionally nuking with_storage_disk=no if parted
was not found, then trying to issue AC_MSG_ERROR if the
user had passed in yes. Also break some long lines.
configure.ac | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index f310a5e..2873fff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1703,17 +1703,18 @@ AC_SUBST([DEVMAPPER_LIBS])
LIBPARTED_CFLAGS=
LIBPARTED_LIBS=
-if test "$with_storage_disk" = "yes" || test
"$with_storage_disk" = "check"; then
+if test "$with_storage_disk" = "yes" ||
+ test "$with_storage_disk" = "check"; then
AC_PATH_PROG([PARTED], [parted], [], [$PATH:/sbin:/usr/sbin])
if test -z "$PARTED" ; then
- with_storage_disk=no
PARTED_FOUND=no
else
PARTED_FOUND=yes
fi
- if test "$with_storage_disk" != "no"&& test
"x$PKG_CONFIG" != "x" ; then
- PKG_CHECK_MODULES(LIBPARTED, libparted>= $PARTED_REQUIRED, [],
[PARTED_FOUND=no])
+ if test "$PARTED_FOUND" = yes&& test "x$PKG_CONFIG" !=
"x" ; then
Just one small nit - almost everywhere else in configure.ac, the yes or
no is quoted, but here you haven't quoted it. Operationally it makes no
difference, it just looks "different" :-)
At any rate, ACK.