[PATCH 2/2] m4: provide additional pkg-config macros
Luca Barbato
lu_zero at gentoo.org
Sun Apr 29 23:52:13 PDT 2012
On 29/04/12 22:28, Tollef Fog Heen wrote:
> ]] Luca Barbato
>
>> Macros to prepare a --with-variable-prefix triggered check for module.
>
> These lack documentation, and what's a --with-variable-prefix triggered
> check? It needs a better name.
I copypasted the first line of the documentation. variable-prefix is one
of the arguments.
> (I'm not opposed to this in principle, but I'd like to see the docs
> explaining properly what the point is.)
The set of macros let you declare optional support for libraries
providing pkg-config using a compact macro instead the usual boilerplate
to have --with-libfoo:
AC_ARG_WITH(with_arg,
AS_HELP_STRING(--with-libfoo, enable libfoo support[
@<:@default=]no[@:>@]),,
[with_libfoo=no])
followed by some logic around a PKG_CHECK_MODULES
AS_CASE([$with_libfoo]),
[yes],[PKG_CHECK_MODULES(....)],
[auto],[...]
and the usual way to set HAVE_LIBFOO
AS_IF([test "$with_libfoo" = "yes"],
[AC_DEFINE([HAVE_LIBFOO], 1, [Enable libfoo support])])
And such.
I hope that explains better what the macros do.
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
More information about the pkg-config
mailing list