mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
build: fix parted detection at configure time
* configure.ac (PARTED_FOUND): Issue configure error if --with-storage-disk=yes but no parted is found.
This commit is contained in:
parent
8168285b45
commit
59b34f139d
15
configure.ac
15
configure.ac
@ -1703,17 +1703,18 @@ AC_SUBST([DEVMAPPER_LIBS])
|
|||||||
|
|
||||||
LIBPARTED_CFLAGS=
|
LIBPARTED_CFLAGS=
|
||||||
LIBPARTED_LIBS=
|
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])
|
AC_PATH_PROG([PARTED], [parted], [], [$PATH:/sbin:/usr/sbin])
|
||||||
if test -z "$PARTED" ; then
|
if test -z "$PARTED" ; then
|
||||||
with_storage_disk=no
|
|
||||||
PARTED_FOUND=no
|
PARTED_FOUND=no
|
||||||
else
|
else
|
||||||
PARTED_FOUND=yes
|
PARTED_FOUND=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$with_storage_disk" != "no" && test "x$PKG_CONFIG" != "x" ; then
|
if test "$PARTED_FOUND" = "yes" && test "x$PKG_CONFIG" != "x" ; then
|
||||||
PKG_CHECK_MODULES(LIBPARTED, libparted >= $PARTED_REQUIRED, [], [PARTED_FOUND=no])
|
PKG_CHECK_MODULES([LIBPARTED], [libparted >= $PARTED_REQUIRED], [],
|
||||||
|
[PARTED_FOUND=no])
|
||||||
fi
|
fi
|
||||||
if test "$PARTED_FOUND" = "no"; then
|
if test "$PARTED_FOUND" = "no"; then
|
||||||
# RHEL-5 vintage parted is missing pkg-config files
|
# RHEL-5 vintage parted is missing pkg-config files
|
||||||
@ -1739,8 +1740,10 @@ if test "$with_storage_disk" = "yes" || test "$with_storage_disk" = "check"; the
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$with_storage_disk" = "yes"; then
|
if test "$with_storage_disk" = "yes"; then
|
||||||
AC_DEFINE_UNQUOTED([WITH_STORAGE_DISK], 1, [whether Disk backend for storage driver is enabled])
|
AC_DEFINE_UNQUOTED([WITH_STORAGE_DISK], 1,
|
||||||
AC_DEFINE_UNQUOTED([PARTED],["$PARTED"], [Location or name of the parted program])
|
[whether Disk backend for storage driver is enabled])
|
||||||
|
AC_DEFINE_UNQUOTED([PARTED],["$PARTED"],
|
||||||
|
[Location or name of the parted program])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([WITH_STORAGE_DISK], [test "$with_storage_disk" = "yes"])
|
AM_CONDITIONAL([WITH_STORAGE_DISK], [test "$with_storage_disk" = "yes"])
|
||||||
|
Loading…
Reference in New Issue
Block a user