
On Fri, Dec 16, 2016 at 10:11:06 +0100, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- config-post.h | 4 ++-- configure.ac | 2 +- m4/virt-devmapper.m4 | 23 ++++++----------------- src/util/virutil.c | 4 ++-- 4 files changed, 11 insertions(+), 22 deletions(-) ... diff --git a/m4/virt-devmapper.m4 b/m4/virt-devmapper.m4 index f0316ac434..2737b3eb2c 100644 --- a/m4/virt-devmapper.m4 +++ b/m4/virt-devmapper.m4 @@ -19,24 +19,13 @@ dnl
AC_DEFUN([LIBVIRT_CHECK_DEVMAPPER], [ 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 - # devmapper is missing pkg-config files in ubuntu, suse, etc - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - DEVMAPPER_FOUND=yes - AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no]) - DEVMAPPER_LIBS="-ldevmapper" - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - fi - - AC_CHECK_HEADERS([libdevmapper.h],,[DEVMAPPER_FOUND=no]) + LIBVIRT_CHECK_PKG([DEVMAPPER], [devmapper], [$DEVMAPPER_REQUIRED], [])
- AC_SUBST([DEVMAPPER_CFLAGS]) - AC_SUBST([DEVMAPPER_LIBS]) + if test "x$with_devmapper" = "xno"; then
I think you should keep the "devmapper is missing pkg-config files in ubuntu, suse, etc" comment here.
+ with_devmapper=check + LIBVIRT_CHECK_LIB([DEVMAPPER], [devmapper], [dm_task_run], [libdevmapper.h]) + fi ])
ACK Jirka