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:
parent
d1bfa400a1
commit
1416bb3837
10
configure.ac
10
configure.ac
@ -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.])
|
||||
|
Loading…
Reference in New Issue
Block a user