use autoconf macro to check for pkg-config (closes #15506)
merge 3.4 (#15506)