mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
m4/virt-devmapper: use LIBVIRT_CHECK_(PKG|LIB)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
f1a7a624d0
commit
60af91ca85
@ -26,7 +26,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef LIBVIRT_SETUID_RPC_CLIENT
|
#ifdef LIBVIRT_SETUID_RPC_CLIENT
|
||||||
# undef HAVE_LIBDEVMAPPER_H
|
|
||||||
# undef HAVE_LIBNL
|
# undef HAVE_LIBNL
|
||||||
# undef HAVE_LIBNL3
|
# undef HAVE_LIBNL3
|
||||||
# undef HAVE_LIBSASL2
|
# undef HAVE_LIBSASL2
|
||||||
@ -34,6 +33,7 @@
|
|||||||
# undef WITH_CAPNG
|
# undef WITH_CAPNG
|
||||||
# undef WITH_CURL
|
# undef WITH_CURL
|
||||||
# undef WITH_DBUS
|
# undef WITH_DBUS
|
||||||
|
# undef WITH_DEVMAPPER
|
||||||
# undef WITH_DTRACE_PROBES
|
# undef WITH_DTRACE_PROBES
|
||||||
# undef WITH_GNUTLS
|
# undef WITH_GNUTLS
|
||||||
# undef WITH_GNUTLS_GCRYPT
|
# undef WITH_GNUTLS_GCRYPT
|
||||||
@ -53,13 +53,13 @@
|
|||||||
* explanation above.
|
* explanation above.
|
||||||
*/
|
*/
|
||||||
#ifdef LIBVIRT_NSS
|
#ifdef LIBVIRT_NSS
|
||||||
# undef HAVE_LIBDEVMAPPER_H
|
|
||||||
# undef HAVE_LIBNL
|
# undef HAVE_LIBNL
|
||||||
# undef HAVE_LIBNL3
|
# undef HAVE_LIBNL3
|
||||||
# undef HAVE_LIBSASL2
|
# undef HAVE_LIBSASL2
|
||||||
# undef HAVE_SYS_ACL_H
|
# undef HAVE_SYS_ACL_H
|
||||||
# undef WITH_CAPNG
|
# undef WITH_CAPNG
|
||||||
# undef WITH_CURL
|
# undef WITH_CURL
|
||||||
|
# undef WITH_DEVMAPPER
|
||||||
# undef WITH_DTRACE_PROBES
|
# undef WITH_DTRACE_PROBES
|
||||||
# undef WITH_GNUTLS
|
# undef WITH_GNUTLS
|
||||||
# undef WITH_GNUTLS_GCRYPT
|
# undef WITH_GNUTLS_GCRYPT
|
||||||
|
@ -1420,7 +1420,7 @@ LIBVIRT_CHECK_DEVMAPPER
|
|||||||
|
|
||||||
if test "$with_storage_mpath" = "yes" ||
|
if test "$with_storage_mpath" = "yes" ||
|
||||||
test "$with_storage_disk" = "yes"; then
|
test "$with_storage_disk" = "yes"; then
|
||||||
if test "$DEVMAPPER_FOUND" = "no" ; then
|
if test "$with_devmapper" = "no" ; then
|
||||||
AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt])
|
AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -19,24 +19,14 @@ dnl
|
|||||||
|
|
||||||
AC_DEFUN([LIBVIRT_CHECK_DEVMAPPER], [
|
AC_DEFUN([LIBVIRT_CHECK_DEVMAPPER], [
|
||||||
DEVMAPPER_REQUIRED=1.0.0
|
DEVMAPPER_REQUIRED=1.0.0
|
||||||
DEVMAPPER_CFLAGS=
|
|
||||||
DEVMAPPER_LIBS=
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= $DEVMAPPER_REQUIRED], [], [DEVMAPPER_FOUND=no])
|
with_devmapper=check
|
||||||
|
|
||||||
if test "$DEVMAPPER_FOUND" = "no"; then
|
LIBVIRT_CHECK_PKG([DEVMAPPER], [devmapper], [$DEVMAPPER_REQUIRED], [])
|
||||||
|
|
||||||
|
if test "x$with_devmapper" = "xno"; then
|
||||||
# devmapper is missing pkg-config files in ubuntu, suse, etc
|
# devmapper is missing pkg-config files in ubuntu, suse, etc
|
||||||
save_LIBS="$LIBS"
|
with_devmapper=check
|
||||||
save_CFLAGS="$CFLAGS"
|
LIBVIRT_CHECK_LIB([DEVMAPPER], [devmapper], [dm_task_run], [libdevmapper.h])
|
||||||
DEVMAPPER_FOUND=yes
|
|
||||||
AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no])
|
|
||||||
DEVMAPPER_LIBS="-ldevmapper"
|
|
||||||
LIBS="$save_LIBS"
|
|
||||||
CFLAGS="$save_CFLAGS"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_HEADERS([libdevmapper.h],,[DEVMAPPER_FOUND=no])
|
|
||||||
|
|
||||||
AC_SUBST([DEVMAPPER_CFLAGS])
|
|
||||||
AC_SUBST([DEVMAPPER_LIBS])
|
|
||||||
])
|
])
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#if HAVE_LIBDEVMAPPER_H
|
#if WITH_DEVMAPPER
|
||||||
# include <libdevmapper.h>
|
# include <libdevmapper.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1608,7 +1608,7 @@ void virFileWaitForDevices(void)
|
|||||||
{}
|
{}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_LIBDEVMAPPER_H
|
#if WITH_DEVMAPPER
|
||||||
bool
|
bool
|
||||||
virIsDevMapperDevice(const char *dev_name)
|
virIsDevMapperDevice(const char *dev_name)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user