Include PKG_CHECK_VAR macro for reading variables in .pc files
Freedesktop #48098 (https://bugs.freedesktop.org/show_bug.cgi?id=48098)pull/48/head
parent
7b322d73e8
commit
f8a2519d1b
15
pkg.m4
15
pkg.m4
|
@ -197,6 +197,21 @@ m4_popdef([pkg_default])
|
|||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
|
||||
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# -------------------------------------------
|
||||
# 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
|
||||
])# PKG_CHECK_VAR
|
||||
|
||||
# PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
|
||||
# [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
|
||||
# [DESCRIPTION], [DEFAULT])
|
||||
|
|
Loading…
Reference in New Issue