xref: /freebsd/contrib/libevent/m4/ntp_pkg_config.m4 (revision 3078531de10dcae44b253a35125c949ff4235284)
1dnl NTP_PKG_CONFIG					-*- Autoconf -*-
2dnl
3dnl Look for pkg-config, which must be at least
4dnl $ntp_pkgconfig_min_version.
5dnl
6AC_DEFUN([NTP_PKG_CONFIG], [
7
8dnl lower the minimum version if you find an earlier one works
9ntp_pkgconfig_min_version='0.15.0'
10AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
11AS_UNSET([ac_cv_path_PKG_CONFIG])
12AS_UNSET([ac_cv_path_ac_pt_PKG_CONFIG])
13
14case "$PKG_CONFIG" in
15 /*)
16    AC_MSG_CHECKING([if pkg-config is at least version $ntp_pkgconfig_min_version])
17    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
18	AC_MSG_RESULT([yes])
19    else
20	AC_MSG_RESULT([no])
21	PKG_CONFIG=""
22    fi
23    ;;
24esac
25
26]) dnl NTP_PKG_CONFIG
27
28