]> sourceware.org Git - lvm2.git/commitdiff
configure: autoreconf
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 29 Aug 2024 20:24:27 +0000 (22:24 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 30 Aug 2024 14:51:15 +0000 (16:51 +0200)
aclocal.m4
configure

index a1ba0f473369d1abc3c7e79284309a983ea189e8..3b1894da0e74df9ed4036c8959e51f79a8df3256 100644 (file)
@@ -117,8 +117,8 @@ m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
 ])dnl PKG_PREREQ
 
-dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
-dnl ----------------------------------
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION], [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------
 dnl Since: 0.16
 dnl
 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
@@ -126,6 +126,12 @@ dnl first found in the path. Checks that the version of pkg-config found
 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
 dnl used since that's the first version where most current features of
 dnl pkg-config existed.
+dnl
+dnl If pkg-config is not found or older than specified, it will result
+dnl in an empty PKG_CONFIG variable. To avoid widespread issues with
+dnl scripts not checking it, ACTION-IF-NOT-FOUND defaults to aborting.
+dnl You can specify [PKG_CONFIG=false] as an action instead, which would
+dnl result in pkg-config tests failing, but no bogus error messages.
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@@ -146,6 +152,9 @@ if test -n "$PKG_CONFIG"; then
                AC_MSG_RESULT([no])
                PKG_CONFIG=""
        fi
+fi
+if test -z "$PKG_CONFIG"; then
+       m4_default([$2], [AC_MSG_ERROR([pkg-config not found])])
 fi[]dnl
 ])dnl PKG_PROG_PKG_CONFIG
 
index 6dc60e24f4218f531302ca767fa865fa2a89752e..5147c79109b8a70cc71b4da98ff54ced2462d8ad 100755 (executable)
--- a/configure
+++ b/configure
@@ -10929,7 +10929,7 @@ printf "%s\n" "#define VDO_FORMAT_CMD \"$VDO_FORMAT_CMD\"" >>confdefs.h
 
 #
 # Do we need to use the API??
-# Do we want to link lvm2 with a big library for vdoformatting ?
+# Do we want to link lvm2 with a big library for VDO formatting ?
 #
 #AC_ARG_WITH(vdo-include,
 #          AS_HELP_STRING([--with-vdo-include=PATH],
@@ -11286,6 +11286,9 @@ printf "%s\n" "no" >&6; }
                PKG_CONFIG=""
        fi
 fi
+if test -z "$PKG_CONFIG"; then
+       as_fn_error $? "pkg-config not found" "$LINENO" 5
+fi
 if test "$BUILD_CMIRRORD" = "yes" && test "$HAVE_CPG" != "yes"
 then :
 
This page took 0.049635 seconds and 5 git commands to generate.