1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

configure.ac: check for blkid when required

We still need to support build without any blkid present,
so use PKG_CHECK_EXISTS() instead of direct failure
from PKG_CHECK_MODULES for too old version.
This commit is contained in:
Zdenek Kabelac 2023-02-10 21:31:07 +01:00
parent d1bfa400a1
commit 1416bb3837

View File

@ -1126,11 +1126,12 @@ AC_ARG_ENABLE(blkid_wiping,
# so lvresize can check detected flag here
#
DEFAULT_USE_BLKID_WIPING=0
PKG_CHECK_EXISTS([blkid >= 2.24], [HAVE_BLKID="yes"], [HAVE_BLKID="no"])
AS_IF([test "$HAVE_BLKID" = "yes"], [
PKG_CHECK_MODULES([BLKID], [blkid >= 2.24], [
HAVE_BLKID=1
AC_CACHE_CHECK([for blkdid.h defines BLKID_SUBLKS_FSINFO.],
AC_CACHE_CHECK([for blkid.h defines BLKID_SUBLKS_FSINFO.],
[ac_cv_have_blkid_sublks_fsinfo],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <blkid/blkid.h>
#ifndef BLKID_SUBLKS_FSINFO
@ -1142,10 +1143,11 @@ PKG_CHECK_MODULES([BLKID], [blkid >= 2.24], [
AC_DEFINE(HAVE_BLKID_SUBLKS_FSINFO, 1,
[Define if blkid.h has BLKID_SUBLKS_FSINFO]))
])
])
AS_IF([test "$BLKID_WIPING" != "no"], [
AS_IF([test "$HAVE_BLKID" = 1], [
BLKID_WIPING=yes
AS_IF([test "$HAVE_BLKID" = "yes"], [
BLKID_WIPING="yes"
BLKID_PC="blkid"
DEFAULT_USE_BLKID_WIPING=1
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])