diff --git a/Makefile.am b/Makefile.am index b71a9e865a14f080788b13e35e3d73acc1e6fa7c..35aa254f85328e4b19394287998408d6cb6f0026 100644 --- a/Makefile.am +++ b/Makefile.am @@ -215,6 +215,13 @@ coverage: cppcheck: cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS +dist-hook: $(top_distdir)/configure + @if grep 'pkg_m4_absent' '$(top_distdir)/configure'; then \ + echo 'configure is generated without pkg.m4. Please supply pkg.m4 and run ./autogen.sh to rebuild the configure script.'>&2; \ + (exit 1); \ + else :; \ + fi + .PHONY: lcov lcov: diff --git a/configure.ac b/configure.ac index de3d04b1e513ed4e4d03d5da026d93bcf213184f..9bbc448b8fcf6af3bc2af69d20ac04142b3276c4 100644 --- a/configure.ac +++ b/configure.ac @@ -342,7 +342,9 @@ then LIBS="$LIBS $LIBNL3_LIBS $LIBNL3GENL_LIBS" AC_DEFINE(HAVE_DELAYACCT, 1, [Define if delay accounting support should be enabled.]) ], [ - AC_MSG_ERROR([htop on Linux requires pkg-config for checking delayacct requirements. Please install pkg-config and run ./autogen.sh to rebuild the configure script.]) + pkg_m4_absent=1 + m4_warning([configure is generated without pkg.m4. 'make dist' target will be disabled.]) + AC_MSG_ERROR([htop on Linux requires pkg-config for checking delayacct requirements. Please install pkg-config and run ./autogen.sh to rebuild the configure script.]) ]) fi