-if ! pkg-config --version >/dev/null 2>&1; then
- cat << EOF
-NOTE: "pkg-config" is missing from your system.
-Many underlying libraries will not be detected.
-==============================================================
-
-EOF
- cat >> m4/private.m4 << EOF
-dnl User does not have pkg-config, so assume package was not found
-AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])])
+if ! "${PKG_CONFIG:-pkg-config}" --version >/dev/null 2>&1; then
+ echo 'Error: "pkg-config" is not installed.' >&2
+ exit 1
+fi