Update ax_pkg_config macros from upstream.

This commit is contained in:
Dag-Erling Smørgrav 2017-09-04 22:50:10 +02:00
parent df8521f768
commit e4cde94086

View file

@ -34,7 +34,7 @@ dnl
dnl AX_PROG_PKG_CONFIG([min-version]) dnl AX_PROG_PKG_CONFIG([min-version])
dnl --------------------------------- dnl ---------------------------------
dnl dnl
dnl Verify that pkg-config or pkgconf are present. dnl Verify that pkgconf or pkg-config are present.
dnl dnl
AC_DEFUN([AX_PROG_PKG_CONFIG], [ AC_DEFUN([AX_PROG_PKG_CONFIG], [
m4_pattern_forbid([^AX_PKG_CONFIG_[A-Z_]+$]) m4_pattern_forbid([^AX_PKG_CONFIG_[A-Z_]+$])
@ -42,23 +42,25 @@ AC_DEFUN([AX_PROG_PKG_CONFIG], [
AC_ARG_VAR([PKG_CONFIG_PATH], [list of directories to prepend to default search path]) AC_ARG_VAR([PKG_CONFIG_PATH], [list of directories to prepend to default search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [list of directories to search instead of default search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [list of directories to search instead of default search path])
if test x"${PKG_CONFIG}" = x"" ; then if test x"${PKG_CONFIG}" = x"" ; then
AC_PATH_PROGS([PKG_CONFIG], [pkg-config pkgconf]) >/dev/null AC_PATH_PROGS([PKG_CONFIG], [pkgconf pkg-config]) >/dev/null
else
AC_PATH_PROG([PKG_CONFIG], [${PKG_CONFIG}])
fi fi
AC_MSG_CHECKING([for pkg-config or pkgconf]) AC_MSG_CHECKING([for pkg-config or pkgconf])
if test -x "${PKG_CONFIG}" ; then if test -x "${PKG_CONFIG}" ; then
AC_MSG_RESULT([${PKG_CONFIG}]) AC_MSG_RESULT([${PKG_CONFIG}])
case "${PKG_CONFIG}" in case "${PKG_CONFIG}" in
*pkg-config)
_min_version="m4_default([$1], [0.23])"
;;
*pkgconf) *pkgconf)
_min_version="m4_default([$1], [1.3.0])" _min_version="m4_default([$1], [1.3.0])"
;; ;;
*pkg-config)
_min_version="m4_default([$1], [0.23])"
;;
*) *)
_min_version="9.9.error" _min_version="9.9.error"
;; ;;
esac esac
AC_MSG_CHECKING([that pkg-config is at least version ${_min_version}]) AC_MSG_CHECKING([that ${PKG_CONFIG} is at least version ${_min_version}])
_act_version=`"${PKG_CONFIG}" --version` _act_version=`"${PKG_CONFIG}" --version`
if ! "${PKG_CONFIG}" --atleast-pkgconfig-version="${_min_version}" ; then if ! "${PKG_CONFIG}" --atleast-pkgconfig-version="${_min_version}" ; then
PKG_CONFIG="" PKG_CONFIG=""