diff --git a/Makefile.am b/Makefile.am index e1e866b0a..386506c92 100644 --- a/Makefile.am +++ b/Makefile.am @@ -508,8 +508,9 @@ cppcheck: cppcheck -q -v . --enable=all -DHAVE_OPENVZ dist-hook: $(top_distdir)/configure - @if grep 'pkg_m4_absent' '$(top_distdir)/configure'; then \ - echo 'ERROR: configure is generated without pkg.m4. Please supply pkg.m4 and run ./autogen.sh to rebuild the configure script.'>&2; \ + @if test "x$$FORCE_MAKE_DIST" = x && \ + grep 'pkg_m4_absent' '$(top_distdir)/configure' >/dev/null; then \ + echo 'ERROR: This distribution would have incomplete pkg-config support. Rebuilding the configure script is advised. Set FORCE_MAKE_DIST=1 to ignore this warning.'>&2; \ (exit 1); \ else :; \ fi diff --git a/configure.ac b/configure.ac index f0bf7e9f6..5e5a5e801 100644 --- a/configure.ac +++ b/configure.ac @@ -384,6 +384,11 @@ dnl If the macro is not called, some pkg-config checks might be skipped dnl and $PKG_CONFIG might be unset. m4_ifdef([PKG_PROG_PKG_CONFIG], [ PKG_PROG_PKG_CONFIG() +], [ + pkg_m4_absent=1 # Makefile might grep this keyword. Don't remove. + m4_warn( + [syntax], + [pkg.m4 is absent or older than version 0.16; this 'configure' would have incomplete pkg-config support]) ]) # HTOP_CHECK_SCRIPT(LIBNAME, FUNCTION, DEFINE, CONFIG_SCRIPT, ELSE_PART)