> it seems openSuSE 11.1 does not come with a pkgconfig for the > device-mapper-devel package. I created a bug [1] for opensuse but was > also told to mention it here so configure.in could be patched once the > bug was fixed. Hi All, Just fixed this for ubuntu (should work now for suse as well) with some help from danpb and DV. The patch is attached below. Regards, Pritesh
diff --git a/configure.in b/configure.in index cb5ce55..d1711fd 100644 --- a/configure.in +++ b/configure.in @@ -1227,11 +1227,22 @@ if test "$with_storage_mpath" = "yes"; then DEVMAPPER_REQUIRED=0.0 DEVMAPPER_CFLAGS= DEVMAPPER_LIBS= - PKG_CHECK_MODULES(DEVMAPPER, devmapper >= $DEVMAPPER_REQUIRED, - [], [ - AC_MSG_ERROR( - [You must install device-mapper-devel >= $DEVMAPPER_REQUIRED to compile libvirt]) - ]) + PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= $DEVMAPPER_REQUIRED], [], [DEVMAPPER_FOUND=no]) + 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_HEADER([libdevmapper.h],,[DEVMAPPER_FOUND=no]) + AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no]) + DEVMAPPER_LIBS="-ldevmapper" + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + fi + if test "$DEVMAPPER_FOUND" = "no" ; then + AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt]) + fi + fi AC_SUBST([DEVMAPPER_CFLAGS]) AC_SUBST([DEVMAPPER_LIBS])
-- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list