From 0ca438ccb5be259ea4de422a0f2d9aba56490e16 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Thu, 21 Oct 2021 12:41:03 +0200 Subject: [PATCH] Fix #16: explicitely check for pkg-config macros Without this patch, `./bootstrap` fails with the following error if pkgconf/pkg-config is not installed: lib/Makefile.am:76: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined This can be triggered by disinstalling `pkgconf/pkg-config`. The problem here is that the check for `pkg-config` is done at configure level but `automake` fails at bootstrap level because of the above error. This basically "fixes" the issue by changing the way in which `./bootstrap` fails. --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index bd498c51..3df29563 100644 --- a/configure.ac +++ b/configure.ac @@ -38,8 +38,9 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_MACRO_DIR([m4]) AC_PROG_SED -PKG_PROG_PKG_CONFIG -PKG_INSTALLDIR() +m4_ifndef([PKG_INSTALLDIR], [m4_fatal([pkgconf or pkg-config not found or too old (`pkg-config --version` must be >= 0.27)])]) +PKG_PROG_PKG_CONFIG(0.27) +PKG_INSTALLDIR #----------------------------------------------------------------------------- # Global