40
40
dnl ******************************
42
42
AC_ARG_ENABLE(compile-warnings,
43
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
43
AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
44
44
[Turn on compiler warnings]),,
45
45
[enable_compile_warnings="m4_default([$1],[yes])"])
492
489
])# PKG_CHECK_MODULES
492
# PKG_INSTALLDIR(DIRECTORY)
493
# -------------------------
494
# Substitutes the variable pkgconfigdir as the location where a module
495
# should install pkg-config .pc files. By default the directory is
496
# $libdir/pkgconfig, but the default can be changed by passing
497
# DIRECTORY. The user can override through the --with-pkgconfigdir
499
AC_DEFUN([PKG_INSTALLDIR],
500
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
501
m4_pushdef([pkg_description],
502
[pkg-config installation directory @<:@]pkg_default[@:>@])
503
AC_ARG_WITH([pkgconfigdir],
504
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
505
[with_pkgconfigdir=]pkg_default)
506
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
507
m4_popdef([pkg_default])
508
m4_popdef([pkg_description])
509
]) dnl PKG_INSTALLDIR
512
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
513
# -------------------------
514
# Substitutes the variable noarch_pkgconfigdir as the location where a
515
# module should install arch-independent pkg-config .pc files. By
516
# default the directory is $datadir/pkgconfig, but the default can be
517
# changed by passing DIRECTORY. The user can override through the
518
# --with-noarch-pkgconfigdir parameter.
519
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
520
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
521
m4_pushdef([pkg_description],
522
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
523
AC_ARG_WITH([noarch-pkgconfigdir],
524
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
525
[with_noarch_pkgconfigdir=]pkg_default)
526
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
527
m4_popdef([pkg_default])
528
m4_popdef([pkg_description])
529
]) dnl PKG_NOARCH_INSTALLDIR
532
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
533
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
534
# -------------------------------------------
535
# Retrieves the value of the pkg-config variable for the given module.
536
AC_DEFUN([PKG_CHECK_VAR],
537
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
538
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
540
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
541
AS_VAR_COPY([$1], [pkg_cv_][$1])
543
AS_VAR_IF([$1], [""], [$5], [$4])dnl
494
546
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
496
548
# This file is free software; the Free Software Foundation