Lines Matching +full:pkg +full:- +full:config
1 # generated automatically by aclocal 1.16.2 -*- Autoconf -*-
3 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
15 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
16 # serial 11 (pkg-config-0.29.1)
19 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
33 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 dnl 02111-1307, USA.
42 dnl PKG_PREREQ(MIN-VERSION)
43 dnl -----------------------
46 dnl Verify that the version of the pkg-config macros are at least
47 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
48 dnl installed version of pkg-config, this checks the developer's version
49 dnl of pkg.m4 when generating configure.
53 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
59 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
60 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
63 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
64 dnl ----------------------------------
67 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
68 dnl first found in the path. Checks that the version of pkg-config found
69 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
71 dnl pkg-config existed.
73 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
76 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
77 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
78 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
81 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
83 if test -n "$PKG_CONFIG"; then
85 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
86 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
95 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
96 dnl -------------------------------------------------------------------
108 if test -n "$PKG_CONFIG" && \
109 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
116 dnl ---------------------------------------------
117 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
120 [if test -n "$$1"; then
122 elif test -n "$PKG_CONFIG"; then
124 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
133 dnl ---------------------------
134 dnl Internal check to see if pkg-config supports short errors.
137 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
145 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
146 dnl [ACTION-IF-NOT-FOUND])
147 dnl --------------------------------------------------------------
155 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
156 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
165 and $1[]_LIBS to avoid the need to call pkg-config.
166 See the pkg-config man page for more details.])
172 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
174 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
176 # Put the nasty error message in config.log where it belongs
185 installed software in a non-standard prefix.
192 [The pkg-config script could not be found or is too old. Make sure it
194 path to pkg-config.
198 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
209 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
210 dnl [ACTION-IF-NOT-FOUND])
211 dnl ---------------------------------------------------------------------
215 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
216 dnl and VARIABLE-PREFIX_LIBS from --libs.
225 PKG_CONFIG="$PKG_CONFIG --static"
232 dnl -------------------------
236 dnl should install pkg-config .pc files. By default the directory is
238 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
243 [pkg-config installation directory @<:@]pkg_default[@:>@])
245 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
254 dnl --------------------------------
258 dnl module should install arch-independent pkg-config .pc files. By
261 dnl --with-noarch-pkgconfigdir parameter.
265 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
266 AC_ARG_WITH([noarch-pkgconfigdir],
267 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
275 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
276 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
277 dnl -------------------------------------------
280 dnl Retrieves the value of the pkg-config variable for the given module.
283 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
291 dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
292 dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
294 dnl ------------------------------------------
296 dnl Prepare a "--with-" configure option using the lowercase
297 dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
311 [yes],[m4_pushdef([with_without], [--without-]with_arg)],
312 [m4_pushdef([with_without],[--with-]with_arg)])
330 dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
332 dnl -----------------------------------------------
335 dnl check._[VARIABLE-PREFIX] is exported as make variable.
344 dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
346 dnl ------------------------------------------------------
349 dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make