diff --git a/acinclude.m4 b/acinclude.m4 index 4ac611dd2..47fdd59c3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -62,6 +62,24 @@ AC_DEFUN([AC_TRY_LDFLAGS], fi ]) + +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR + + # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_gcc_builtin.html # ===========================================================================