1290001Sglebiusdnl NTP_PKG_CONFIG					-*- Autoconf -*-
2290001Sglebiusdnl
3290001Sglebiusdnl Look for pkg-config, which must be at least
4290001Sglebiusdnl $ntp_pkgconfig_min_version.
5290001Sglebiusdnl
6290001SglebiusAC_DEFUN([NTP_PKG_CONFIG], [
7290001Sglebius
8290001Sglebiusdnl lower the minimum version if you find an earlier one works
9290001Sglebiusntp_pkgconfig_min_version='0.15.0'
10290001SglebiusAC_PATH_TOOL([PKG_CONFIG], [pkg-config])
11290001SglebiusAS_UNSET([ac_cv_path_PKG_CONFIG])
12290001SglebiusAS_UNSET([ac_cv_path_ac_pt_PKG_CONFIG])
13290001Sglebius
14290001Sglebiuscase "$PKG_CONFIG" in
15290001Sglebius /*)
16290001Sglebius    AC_MSG_CHECKING([if pkg-config is at least version $ntp_pkgconfig_min_version])
17290001Sglebius    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
18290001Sglebius	AC_MSG_RESULT([yes])
19290001Sglebius    else
20290001Sglebius	AC_MSG_RESULT([no])
21290001Sglebius	PKG_CONFIG=""
22290001Sglebius    fi
23290001Sglebius    ;;
24290001Sglebiusesac
25290001Sglebius
26290001Sglebius]) dnl NTP_PKG_CONFIG
27290001Sglebius
28