14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
[m4_warning([this file was generated for autoconf 2.68.
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],,
17
[m4_warning([this file was generated for autoconf 2.66.
18
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23
# serial 1 (pkg-config-0.24)
25
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
27
# This program is free software; you can redistribute it and/or modify
28
# it under the terms of the GNU General Public License as published by
29
# the Free Software Foundation; either version 2 of the License, or
30
# (at your option) any later version.
32
# This program is distributed in the hope that it will be useful, but
33
# WITHOUT ANY WARRANTY; without even the implied warranty of
34
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35
# General Public License for more details.
37
# You should have received a copy of the GNU General Public License
38
# along with this program; if not, write to the Free Software
39
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
41
# As a special exception to the GNU General Public License, if you
42
# distribute this file as part of a program that contains a
43
# configuration script generated by Autoconf, you may include it under
44
# the same distribution terms that you use for the rest of that program.
46
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
47
# ----------------------------------
48
AC_DEFUN([PKG_PROG_PKG_CONFIG],
49
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
50
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
51
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
52
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
53
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
55
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
56
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
58
if test -n "$PKG_CONFIG"; then
59
_pkg_min_version=m4_default([$1], [0.9.0])
60
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
61
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
68
])# PKG_PROG_PKG_CONFIG
70
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
72
# Check to see whether a particular set of modules exists. Similar
73
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
75
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
76
# only at the first occurence in configure.ac, so if the first place
77
# it's called might be skipped (such as if it is within an "if", you
78
# have to call PKG_CHECK_EXISTS manually
79
# --------------------------------------------------------------
80
AC_DEFUN([PKG_CHECK_EXISTS],
81
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
82
if test -n "$PKG_CONFIG" && \
83
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
89
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
90
# ---------------------------------------------
91
m4_define([_PKG_CONFIG],
92
[if test -n "$$1"; then
94
elif test -n "$PKG_CONFIG"; then
95
PKG_CHECK_EXISTS([$3],
96
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
103
# _PKG_SHORT_ERRORS_SUPPORTED
104
# -----------------------------
105
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
106
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
107
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
108
_pkg_short_errors_supported=yes
110
_pkg_short_errors_supported=no
112
])# _PKG_SHORT_ERRORS_SUPPORTED
115
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
116
# [ACTION-IF-NOT-FOUND])
119
# Note that if there is a possibility the first call to
120
# PKG_CHECK_MODULES might not happen, you should be sure to include an
121
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
124
# --------------------------------------------------------------
125
AC_DEFUN([PKG_CHECK_MODULES],
126
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
127
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
128
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
131
AC_MSG_CHECKING([for $1])
133
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
134
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
136
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
137
and $1[]_LIBS to avoid the need to call pkg-config.
138
See the pkg-config man page for more details.])
140
if test $pkg_failed = yes; then
142
_PKG_SHORT_ERRORS_SUPPORTED
143
if test $_pkg_short_errors_supported = yes; then
144
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
146
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
148
# Put the nasty error message in config.log where it belongs
149
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
151
m4_default([$4], [AC_MSG_ERROR(
152
[Package requirements ($2) were not met:
156
Consider adjusting the PKG_CONFIG_PATH environment variable if you
157
installed software in a non-standard prefix.
161
elif test $pkg_failed = untried; then
163
m4_default([$4], [AC_MSG_FAILURE(
164
[The pkg-config script could not be found or is too old. Make sure it
165
is in your PATH or set the PKG_CONFIG environment variable to the full
170
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
173
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
174
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
178
])# PKG_CHECK_MODULES
22
180
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
24
182
# This file is free software; the Free Software Foundation
1450
1609
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1451
1610
]) # XORG_WITH_XMLTO
1612
# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
1613
# --------------------------------------------
1614
# Minimum version: 1.12.0
1615
# Minimum version for optional DEFAULT argument: 1.12.0
1617
# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
1618
# XML-based language used for the transformation of XML documents.
1619
# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
1620
# It is used under the cover by xmlto to generate html files from DocBook/XML.
1621
# The XSLT processor is often used as a standalone tool for transformations.
1622
# It should not be assumed that this tool is used only to work with documnetation.
1623
# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
1625
# Interface to module:
1626
# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
1627
# XSLTPROC: returns the path of the xsltproc program found
1628
# returns the path set by the user in the environment
1629
# --with-xsltproc: 'yes' user instructs the module to use xsltproc
1630
# 'no' user instructs the module not to use xsltproc
1631
# have_xsltproc: returns yes if xsltproc found in PATH or no
1633
# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
1635
AC_DEFUN([XORG_WITH_XSLTPROC],[
1636
AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
1637
m4_define([_defopt], m4_default([$2], [auto]))
1638
AC_ARG_WITH(xsltproc,
1639
AS_HELP_STRING([--with-xsltproc],
1640
[Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
1641
[use_xsltproc=$withval], [use_xsltproc=]_defopt)
1642
m4_undefine([_defopt])
1644
if test "x$use_xsltproc" = x"auto"; then
1645
AC_PATH_PROG([XSLTPROC], [xsltproc])
1646
if test "x$XSLTPROC" = "x"; then
1647
AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
1652
elif test "x$use_xsltproc" = x"yes" ; then
1653
AC_PATH_PROG([XSLTPROC], [xsltproc])
1654
if test "x$XSLTPROC" = "x"; then
1655
AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
1658
elif test "x$use_xsltproc" = x"no" ; then
1659
if test "x$XSLTPROC" != "x"; then
1660
AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
1664
AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
1667
# Checking for minimum version is not implemented
1668
# but we want to keep the interface consistent with other commands
1669
m4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)])
1671
AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
1672
]) # XORG_WITH_XSLTPROC
1453
1675
# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
1454
1676
# ----------------
1455
1677
# Minimum version: 1.5.0
1906
2128
AC_MSG_RESULT([$build_specs])
1907
2129
]) # XORG_ENABLE_SPECS
2131
# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
2132
# ----------------------------------------------
2133
# Minimum version: 1.13.0
2135
# This macro enables a builder to enable/disable unit testing
2136
# It makes no assumption about the test cases implementation
2137
# Test cases may or may not use Automake "Support for test suites"
2138
# They may or may not use the software utility library GLib
2140
# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
2141
# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
2142
# The variable enable_unit_tests is used by other macros in this file.
2144
# Interface to module:
2145
# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
2146
# enable_unit_tests: used in configure.ac for additional configuration
2147
# --enable-unit-tests: 'yes' user instructs the module to build tests
2148
# 'no' user instructs the module not to build tests
2149
# parm1: specify the default value, yes or no.
2151
AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
2152
AC_BEFORE([$0], [XORG_WITH_GLIB])
2153
AC_BEFORE([$0], [XORG_LD_WRAP])
2154
m4_define([_defopt], m4_default([$1], [auto]))
2155
AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
2156
[Enable building unit test cases (default: ]_defopt[)]),
2157
[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
2158
m4_undefine([_defopt])
2159
AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
2160
AC_MSG_CHECKING([whether to build unit test cases])
2161
AC_MSG_RESULT([$enable_unit_tests])
2162
]) # XORG_ENABLE_UNIT_TESTS
2164
# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
2165
# ----------------------------------------
2166
# Minimum version: 1.13.0
2168
# GLib is a library which provides advanced data structures and functions.
2169
# This macro enables a module to test for the presence of Glib.
2171
# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
2172
# Otherwise the value of $enable_unit_tests is blank.
2174
# Interface to module:
2175
# HAVE_GLIB: used in makefiles to conditionally build targets
2176
# with_glib: used in configure.ac to know if GLib has been found
2177
# --with-glib: 'yes' user instructs the module to use glib
2178
# 'no' user instructs the module not to use glib
2180
AC_DEFUN([XORG_WITH_GLIB],[
2181
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2182
m4_define([_defopt], m4_default([$2], [auto]))
2183
AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
2184
[Use GLib library for unit testing (default: ]_defopt[)]),
2185
[with_glib=$withval], [with_glib=]_defopt)
2186
m4_undefine([_defopt])
2189
# Do not probe GLib if user explicitly disabled unit testing
2190
if test "x$enable_unit_tests" != x"no"; then
2191
# Do not probe GLib if user explicitly disabled it
2192
if test "x$with_glib" != x"no"; then
2195
[PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
2196
[PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
2201
# Not having GLib when unit testing has been explicitly requested is an error
2202
if test "x$enable_unit_tests" = x"yes"; then
2203
if test "x$have_glib" = x"no"; then
2204
AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
2208
# Having unit testing disabled when GLib has been explicitly requested is an error
2209
if test "x$enable_unit_tests" = x"no"; then
2210
if test "x$with_glib" = x"yes"; then
2211
AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
2215
# Not having GLib when it has been explicitly requested is an error
2216
if test "x$with_glib" = x"yes"; then
2217
if test "x$have_glib" = x"no"; then
2218
AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
2222
AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
2227
# Minimum version: 1.13.0
2229
# Check if linker supports -wrap, passed via compiler flags
2231
# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
2232
# Otherwise the value of $enable_unit_tests is blank.
2234
AC_DEFUN([XORG_LD_WRAP],[
2235
XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no])
2236
# Not having ld wrap when unit testing has been explicitly requested is an error
2237
if test "x$enable_unit_tests" = x"yes"; then
2238
if test "x$have_ld_wrap" = x"no"; then
2239
AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
2242
AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
2246
# XORG_CHECK_LINKER_FLAGS
2247
# -----------------------
2250
# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
2254
# Check whether the given linker FLAGS work with the current language's
2255
# linker, or whether they give an error.
2257
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
2260
# NOTE: Based on AX_CHECK_COMPILER_FLAGS.
2264
# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
2265
# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
2266
# Copyright (c) 2009 Matteo Frigo
2268
# This program is free software: you can redistribute it and/or modify it
2269
# under the terms of the GNU General Public License as published by the
2270
# Free Software Foundation, either version 3 of the License, or (at your
2271
# option) any later version.
2273
# This program is distributed in the hope that it will be useful, but
2274
# WITHOUT ANY WARRANTY; without even the implied warranty of
2275
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
2276
# Public License for more details.
2278
# You should have received a copy of the GNU General Public License along
2279
# with this program. If not, see <http://www.gnu.org/licenses/>.
2281
# As a special exception, the respective Autoconf Macro's copyright owner
2282
# gives unlimited permission to copy, distribute and modify the configure
2283
# scripts that are the output of Autoconf when processing the Macro. You
2284
# need not follow the terms of the GNU General Public License when using
2285
# or distributing such scripts, even though portions of the text of the
2286
# Macro appear in them. The GNU General Public License (GPL) does govern
2287
# all other use of the material that constitutes the Autoconf Macro.
2289
# This special exception to the GPL applies to versions of the Autoconf
2290
# Macro released by the Autoconf Archive. When you make and distribute a
2291
# modified version of the Autoconf Macro, you may extend this special
2292
# exception to the GPL to apply to your modified version as well.#
2293
AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
2294
[AC_MSG_CHECKING([whether the linker accepts $1])
2295
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
2297
[AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
2298
ax_save_FLAGS=$LDFLAGS
2300
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
2301
AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
2302
AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
2303
LDFLAGS=$ax_save_FLAGS])],
2304
[ax_save_FLAGS=$LDFLAGS
2306
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
2307
eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
2308
eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
2309
LDFLAGS=$ax_save_FLAGS])
2310
eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
2311
AC_MSG_RESULT($xorg_check_linker_flags)
2312
if test "x$xorg_check_linker_flags" = xyes; then
2317
]) # XORG_CHECK_LINKER_FLAGS
1909
2319
# XORG_CHECK_MALLOC_ZERO
1910
2320
# ----------------------
1911
2321
# Minimum version: 1.0.0
2211
2621
AC_SUBST([CHANGELOG_CMD])
2212
2622
]) # XORG_CHANGELOG
2214
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2216
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2218
# This program is free software; you can redistribute it and/or modify
2219
# it under the terms of the GNU General Public License as published by
2220
# the Free Software Foundation; either version 2 of the License, or
2221
# (at your option) any later version.
2223
# This program is distributed in the hope that it will be useful, but
2224
# WITHOUT ANY WARRANTY; without even the implied warranty of
2225
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2226
# General Public License for more details.
2228
# You should have received a copy of the GNU General Public License
2229
# along with this program; if not, write to the Free Software
2230
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2232
# As a special exception to the GNU General Public License, if you
2233
# distribute this file as part of a program that contains a
2234
# configuration script generated by Autoconf, you may include it under
2235
# the same distribution terms that you use for the rest of that program.
2237
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2238
# ----------------------------------
2239
AC_DEFUN([PKG_PROG_PKG_CONFIG],
2240
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2241
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2242
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2243
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2244
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2246
if test -n "$PKG_CONFIG"; then
2247
_pkg_min_version=m4_default([$1], [0.9.0])
2248
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2249
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2250
AC_MSG_RESULT([yes])
2257
])# PKG_PROG_PKG_CONFIG
2259
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2261
# Check to see whether a particular set of modules exists. Similar
2262
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2265
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2266
# this or PKG_CHECK_MODULES is called, or make sure to call
2267
# PKG_CHECK_EXISTS manually
2268
# --------------------------------------------------------------
2269
AC_DEFUN([PKG_CHECK_EXISTS],
2270
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2271
if test -n "$PKG_CONFIG" && \
2272
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2273
m4_ifval([$2], [$2], [:])
2274
m4_ifvaln([$3], [else
2279
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2280
# ---------------------------------------------
2281
m4_define([_PKG_CONFIG],
2282
[if test -n "$$1"; then
2284
elif test -n "$PKG_CONFIG"; then
2285
PKG_CHECK_EXISTS([$3],
2286
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2293
# _PKG_SHORT_ERRORS_SUPPORTED
2294
# -----------------------------
2295
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2296
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2297
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2298
_pkg_short_errors_supported=yes
2300
_pkg_short_errors_supported=no
2302
])# _PKG_SHORT_ERRORS_SUPPORTED
2305
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2306
# [ACTION-IF-NOT-FOUND])
2309
# Note that if there is a possibility the first call to
2310
# PKG_CHECK_MODULES might not happen, you should be sure to include an
2311
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2314
# --------------------------------------------------------------
2315
AC_DEFUN([PKG_CHECK_MODULES],
2316
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2317
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2318
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2321
AC_MSG_CHECKING([for $1])
2323
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2324
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2326
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2327
and $1[]_LIBS to avoid the need to call pkg-config.
2328
See the pkg-config man page for more details.])
2330
if test $pkg_failed = yes; then
2331
_PKG_SHORT_ERRORS_SUPPORTED
2332
if test $_pkg_short_errors_supported = yes; then
2333
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2335
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2337
# Put the nasty error message in config.log where it belongs
2338
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2340
ifelse([$4], , [AC_MSG_ERROR(dnl
2341
[Package requirements ($2) were not met:
2345
Consider adjusting the PKG_CONFIG_PATH environment variable if you
2346
installed software in a non-standard prefix.
2350
[AC_MSG_RESULT([no])
2352
elif test $pkg_failed = untried; then
2353
ifelse([$4], , [AC_MSG_FAILURE(dnl
2354
[The pkg-config script could not be found or is too old. Make sure it
2355
is in your PATH or set the PKG_CONFIG environment variable to the full
2360
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2363
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2364
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2365
AC_MSG_RESULT([yes])
2366
ifelse([$3], , :, [$3])
2368
])# PKG_CHECK_MODULES