From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - configure.ac: check for blkid when required
Date: Fri, 10 Feb 2023 21:33:26 +0000 (GMT) [thread overview]
Message-ID: <20230210213326.560323858414@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1416bb383719f5d4dde42a9bfb123e0a7c38a36c
Commit: 1416bb383719f5d4dde42a9bfb123e0a7c38a36c
Parent: d1bfa400a18c0223dcc60379dcec8b05b2ef6d5c
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Fri Feb 10 21:31:07 2023 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Feb 10 22:29:33 2023 +0100
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.
---
configure.ac | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3177012e2..1c4d5fd1f 100644
--- a/configure.ac
+++ b/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"])
-PKG_CHECK_MODULES([BLKID], [blkid >= 2.24], [
- HAVE_BLKID=1
+AS_IF([test "$HAVE_BLKID" = "yes"], [
+ PKG_CHECK_MODULES([BLKID], [blkid >= 2.24], [
- 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
@@ -1138,14 +1139,15 @@ PKG_CHECK_MODULES([BLKID], [blkid >= 2.24], [
#endif])],
[ac_cv_have_blkid_sublks_fsinfo="yes"], [ac_cv_have_blkid_sublks_fsinfo="no"])])
- AC_IF_YES(ac_cv_have_blkid_sublks_fsinfo,
- AC_DEFINE(HAVE_BLKID_SUBLKS_FSINFO, 1,
- [Define if blkid.h has BLKID_SUBLKS_FSINFO]))
+ AC_IF_YES(ac_cv_have_blkid_sublks_fsinfo,
+ 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.])
reply other threads:[~2023-02-10 21:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230210213326.560323858414@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.