443
443
])# PKG_CHECK_MODULES
446
# PKG_INSTALLDIR(DIRECTORY)
447
# -------------------------
448
# Substitutes the variable pkgconfigdir as the location where a module
449
# should install pkg-config .pc files. By default the directory is
450
# $libdir/pkgconfig, but the default can be changed by passing
451
# DIRECTORY. The user can override through the --with-pkgconfigdir
453
AC_DEFUN([PKG_INSTALLDIR],
454
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
455
m4_pushdef([pkg_description],
456
[pkg-config installation directory @<:@]pkg_default[@:>@])
457
AC_ARG_WITH([pkgconfigdir],
458
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
459
[with_pkgconfigdir=]pkg_default)
460
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
461
m4_popdef([pkg_default])
462
m4_popdef([pkg_description])
463
]) dnl PKG_INSTALLDIR
466
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
467
# -------------------------
468
# Substitutes the variable noarch_pkgconfigdir as the location where a
469
# module should install arch-independent pkg-config .pc files. By
470
# default the directory is $datadir/pkgconfig, but the default can be
471
# changed by passing DIRECTORY. The user can override through the
472
# --with-noarch-pkgconfigdir parameter.
473
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
474
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
475
m4_pushdef([pkg_description],
476
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
477
AC_ARG_WITH([noarch-pkgconfigdir],
478
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
479
[with_noarch_pkgconfigdir=]pkg_default)
480
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
481
m4_popdef([pkg_default])
482
m4_popdef([pkg_description])
483
]) dnl PKG_NOARCH_INSTALLDIR
486
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
487
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
488
# -------------------------------------------
489
# Retrieves the value of the pkg-config variable for the given module.
490
AC_DEFUN([PKG_CHECK_VAR],
491
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
492
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
494
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
495
AS_VAR_COPY([$1], [pkg_cv_][$1])
497
AS_VAR_IF([$1], [""], [$5], [$4])dnl
445
500
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
447
502
# This file is free software; the Free Software Foundation