1 # generated automatically by aclocal 1.16.5 -*- Autoconf -*-
3 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 # ===============================================================================
16 # https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html
17 # ===============================================================================
21 # AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
25 # Checks the ordering of words within a multi-word float. This check is
26 # necessary because on some systems (e.g. certain ARM systems), the float
27 # word ordering can be different from the byte ordering. In a multi-word
28 # float context, "big-endian" implies that the word containing the sign
29 # bit is found in the memory location with the lowest address. This
30 # implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
32 # The endianness is detected by first compiling C code that contains a
33 # special double float value, then grepping the resulting object file for
34 # certain strings of ASCII values. The double is specially crafted to have
35 # a binary representation that corresponds with a simple string. In this
36 # implementation, the string "noonsees" was selected because the
37 # individual word values ("noon" and "sees") are palindromes, thus making
38 # this test byte-order agnostic. If grep finds the string "noonsees" in
39 # the object file, the target platform stores float words in big-endian
40 # order. If grep finds "seesnoon", float words are in little-endian order.
41 # If neither value is found, the user is instructed to specify the
46 # Copyright (c) 2008 Daniel Amelang <dan@amelang.net>
48 # Copying and distribution of this file, with or without modification, are
49 # permitted in any medium without royalty provided the copyright notice
50 # and this notice are preserved. This file is offered as-is, without any
55 AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
56 [AC_CACHE_CHECK(whether float word ordering is bigendian,
57 ax_cv_c_float_words_bigendian, [
59 ax_cv_c_float_words_bigendian=unknown
60 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
62 double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
66 if grep noonsees conftest.$ac_objext >/dev/null ; then
67 ax_cv_c_float_words_bigendian=yes
69 if grep seesnoon conftest.$ac_objext >/dev/null ; then
70 if test "$ax_cv_c_float_words_bigendian" = unknown; then
71 ax_cv_c_float_words_bigendian=no
73 ax_cv_c_float_words_bigendian=unknown
79 case $ax_cv_c_float_words_bigendian in
82 [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
83 [Define to 1 if your system stores words within floats
84 with the most significant word first])]) ;;
91 Unknown float word ordering. You need to manually preset
92 ax_cv_c_float_words_bigendian=no (or yes) according to your system.
97 ])# AX_C_FLOAT_WORDS_BIGENDIAN
99 # ===========================================================================
100 # https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
101 # ===========================================================================
105 # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
109 # Check whether the given FLAG works with the current language's compiler
110 # or gives an error. (Warnings, however, are ignored)
112 # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
115 # If EXTRA-FLAGS is defined, it is added to the current language's default
116 # flags (e.g. CFLAGS) when the check is done. The check is thus made with
117 # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
118 # force the compiler to issue an error when a bad flag is given.
120 # INPUT gives an alternative input source to AC_COMPILE_IFELSE.
122 # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
123 # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
127 # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
128 # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
130 # Copying and distribution of this file, with or without modification, are
131 # permitted in any medium without royalty provided the copyright notice
132 # and this notice are preserved. This file is offered as-is, without any
137 AC_DEFUN([AX_CHECK_COMPILE_FLAG],
138 [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
139 AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
140 AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
141 ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
142 _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
143 AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
144 [AS_VAR_SET(CACHEVAR,[yes])],
145 [AS_VAR_SET(CACHEVAR,[no])])
146 _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
147 AS_VAR_IF(CACHEVAR,yes,
148 [m4_default([$2], :)],
149 [m4_default([$3], :)])
150 AS_VAR_POPDEF([CACHEVAR])dnl
151 ])dnl AX_CHECK_COMPILE_FLAGS
153 # ===========================================================================
154 # https://www.gnu.org/software/autoconf-archive/ax_check_define.html
155 # ===========================================================================
159 # AC_CHECK_DEFINE([symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
160 # AX_CHECK_DEFINE([includes],[symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
164 # Complements AC_CHECK_FUNC but it does not check for a function but for a
165 # define to exist. Consider a usage like:
167 # AC_CHECK_DEFINE(__STRICT_ANSI__, CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500")
171 # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
173 # Copying and distribution of this file, with or without modification, are
174 # permitted in any medium without royalty provided the copyright notice
175 # and this notice are preserved. This file is offered as-is, without any
180 AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE])
181 AC_DEFUN([AC_CHECK_DEFINE],[
182 AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl
183 AC_CACHE_CHECK([for $1 defined], ac_var,
184 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
191 ]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
192 AS_IF([test AS_VAR_GET(ac_var) != "no"], [$2], [$3])dnl
193 AS_VAR_POPDEF([ac_var])dnl
196 AU_ALIAS([AX_CHECK_DEFINED], [AX_CHECK_DEFINE])
197 AC_DEFUN([AX_CHECK_DEFINE],[
198 AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$2_$1])dnl
199 AC_CACHE_CHECK([for $2 defined in $1], ac_var,
200 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$1>]], [[
207 ]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
208 AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
209 AS_VAR_POPDEF([ac_var])dnl
212 AC_DEFUN([AX_CHECK_FUNC],
213 [AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$2])dnl
214 AC_CACHE_CHECK([for $2], ac_var,
215 dnl AC_LANG_FUNC_LINK_TRY
216 [AC_LINK_IFELSE([AC_LANG_PROGRAM([$1
221 [AS_VAR_SET(ac_var, yes)],
222 [AS_VAR_SET(ac_var, no)])])
223 AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
224 AS_VAR_POPDEF([ac_var])dnl
227 # ===========================================================================
228 # https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
229 # ===========================================================================
233 # AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])
237 # Look for OpenSSL in a number of default spots, or in a user-selected
238 # spot (via --with-openssl). Sets
240 # OPENSSL_INCLUDES to the include directives required
241 # OPENSSL_LIBS to the -l directives required
242 # OPENSSL_LDFLAGS to the -L or -R flags required
244 # and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
246 # This macro sets OPENSSL_INCLUDES such that source files should use the
247 # openssl/ directory in include directives:
249 # #include <openssl/hmac.h>
253 # Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>
254 # Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>
256 # Copying and distribution of this file, with or without modification, are
257 # permitted in any medium without royalty provided the copyright notice
258 # and this notice are preserved. This file is offered as-is, without any
263 AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
264 AC_DEFUN([AX_CHECK_OPENSSL], [
266 AC_ARG_WITH([openssl],
267 [AS_HELP_STRING([--with-openssl=DIR],
268 [root of the OpenSSL directory])],
271 "" | y | ye | yes | n | no)
272 AC_MSG_ERROR([Invalid --with-openssl value])
274 *) ssldirs="$withval"
278 # if pkg-config is installed and openssl has installed a .pc file,
279 # then use that information and don't search ssldirs
280 AC_CHECK_TOOL([PKG_CONFIG], [pkg-config])
281 if test x"$PKG_CONFIG" != x""; then
282 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
284 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
285 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
290 # no such luck; use some default ssldirs
292 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
298 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
299 # an 'openssl' subdirectory
303 for ssldir in $ssldirs; do
304 AC_MSG_CHECKING([for include/openssl/ssl.h in $ssldir])
305 if test -f "$ssldir/include/openssl/ssl.h"; then
306 OPENSSL_INCLUDES="-I$ssldir/include"
307 OPENSSL_LDFLAGS="-L$ssldir/lib"
308 OPENSSL_LIBS="-lssl -lcrypto"
317 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
321 # try the preprocessor and linker with our new flags,
322 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
324 AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
325 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
326 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
329 save_LDFLAGS="$LDFLAGS"
330 save_CPPFLAGS="$CPPFLAGS"
331 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
332 LIBS="$OPENSSL_LIBS $LIBS"
333 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
335 [AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
343 CPPFLAGS="$save_CPPFLAGS"
344 LDFLAGS="$save_LDFLAGS"
347 AC_SUBST([OPENSSL_INCLUDES])
348 AC_SUBST([OPENSSL_LIBS])
349 AC_SUBST([OPENSSL_LDFLAGS])
352 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
353 # serial 12 (pkg-config-0.29.2)
355 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
356 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
358 dnl This program is free software; you can redistribute it and/or modify
359 dnl it under the terms of the GNU General Public License as published by
360 dnl the Free Software Foundation; either version 2 of the License, or
361 dnl (at your option) any later version.
363 dnl This program is distributed in the hope that it will be useful, but
364 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
365 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
366 dnl General Public License for more details.
368 dnl You should have received a copy of the GNU General Public License
369 dnl along with this program; if not, write to the Free Software
370 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
373 dnl As a special exception to the GNU General Public License, if you
374 dnl distribute this file as part of a program that contains a
375 dnl configuration script generated by Autoconf, you may include it under
376 dnl the same distribution terms that you use for the rest of that
379 dnl PKG_PREREQ(MIN-VERSION)
380 dnl -----------------------
383 dnl Verify that the version of the pkg-config macros are at least
384 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
385 dnl installed version of pkg-config, this checks the developer's version
386 dnl of pkg.m4 when generating configure.
388 dnl To ensure that this macro is defined, also add:
389 dnl m4_ifndef([PKG_PREREQ],
390 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
392 dnl See the "Since" comment for each macro you use to see what version
393 dnl of the macros you require.
394 m4_defun([PKG_PREREQ],
395 [m4_define([PKG_MACROS_VERSION], [0.29.2])
396 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
397 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
400 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
401 dnl ----------------------------------
404 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
405 dnl first found in the path. Checks that the version of pkg-config found
406 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
407 dnl used since that's the first version where most current features of
408 dnl pkg-config existed.
409 AC_DEFUN([PKG_PROG_PKG_CONFIG],
410 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
411 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
412 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
413 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
414 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
415 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
417 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
418 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
420 if test -n "$PKG_CONFIG"; then
421 _pkg_min_version=m4_default([$1], [0.9.0])
422 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
423 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
430 ])dnl PKG_PROG_PKG_CONFIG
432 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
433 dnl -------------------------------------------------------------------
436 dnl Check to see whether a particular set of modules exists. Similar to
437 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
439 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
440 dnl only at the first occurence in configure.ac, so if the first place
441 dnl it's called might be skipped (such as if it is within an "if", you
442 dnl have to call PKG_CHECK_EXISTS manually
443 AC_DEFUN([PKG_CHECK_EXISTS],
444 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
445 if test -n "$PKG_CONFIG" && \
446 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
447 m4_default([$2], [:])
448 m4_ifvaln([$3], [else
452 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
453 dnl ---------------------------------------------
454 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
455 dnl pkg_failed based on the result.
456 m4_define([_PKG_CONFIG],
457 [if test -n "$$1"; then
459 elif test -n "$PKG_CONFIG"; then
460 PKG_CHECK_EXISTS([$3],
461 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
462 test "x$?" != "x0" && pkg_failed=yes ],
469 dnl _PKG_SHORT_ERRORS_SUPPORTED
470 dnl ---------------------------
471 dnl Internal check to see if pkg-config supports short errors.
472 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
473 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
474 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
475 _pkg_short_errors_supported=yes
477 _pkg_short_errors_supported=no
479 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
482 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
483 dnl [ACTION-IF-NOT-FOUND])
484 dnl --------------------------------------------------------------
487 dnl Note that if there is a possibility the first call to
488 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
489 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
490 AC_DEFUN([PKG_CHECK_MODULES],
491 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
492 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
493 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
496 AC_MSG_CHECKING([for $2])
498 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
499 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
501 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
502 and $1[]_LIBS to avoid the need to call pkg-config.
503 See the pkg-config man page for more details.])
505 if test $pkg_failed = yes; then
507 _PKG_SHORT_ERRORS_SUPPORTED
508 if test $_pkg_short_errors_supported = yes; then
509 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
511 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
513 # Put the nasty error message in config.log where it belongs
514 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
516 m4_default([$4], [AC_MSG_ERROR(
517 [Package requirements ($2) were not met:
521 Consider adjusting the PKG_CONFIG_PATH environment variable if you
522 installed software in a non-standard prefix.
526 elif test $pkg_failed = untried; then
528 m4_default([$4], [AC_MSG_FAILURE(
529 [The pkg-config script could not be found or is too old. Make sure it
530 is in your PATH or set the PKG_CONFIG environment variable to the full
535 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
538 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
539 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
543 ])dnl PKG_CHECK_MODULES
546 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
547 dnl [ACTION-IF-NOT-FOUND])
548 dnl ---------------------------------------------------------------------
551 dnl Checks for existence of MODULES and gathers its build flags with
552 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
553 dnl and VARIABLE-PREFIX_LIBS from --libs.
555 dnl Note that if there is a possibility the first call to
556 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
557 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
559 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
560 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
561 _save_PKG_CONFIG=$PKG_CONFIG
562 PKG_CONFIG="$PKG_CONFIG --static"
563 PKG_CHECK_MODULES($@)
564 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
565 ])dnl PKG_CHECK_MODULES_STATIC
568 dnl PKG_INSTALLDIR([DIRECTORY])
569 dnl -------------------------
572 dnl Substitutes the variable pkgconfigdir as the location where a module
573 dnl should install pkg-config .pc files. By default the directory is
574 dnl $libdir/pkgconfig, but the default can be changed by passing
575 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
577 AC_DEFUN([PKG_INSTALLDIR],
578 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
579 m4_pushdef([pkg_description],
580 [pkg-config installation directory @<:@]pkg_default[@:>@])
581 AC_ARG_WITH([pkgconfigdir],
582 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
583 [with_pkgconfigdir=]pkg_default)
584 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
585 m4_popdef([pkg_default])
586 m4_popdef([pkg_description])
590 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
591 dnl --------------------------------
594 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
595 dnl module should install arch-independent pkg-config .pc files. By
596 dnl default the directory is $datadir/pkgconfig, but the default can be
597 dnl changed by passing DIRECTORY. The user can override through the
598 dnl --with-noarch-pkgconfigdir parameter.
599 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
600 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
601 m4_pushdef([pkg_description],
602 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
603 AC_ARG_WITH([noarch-pkgconfigdir],
604 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
605 [with_noarch_pkgconfigdir=]pkg_default)
606 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
607 m4_popdef([pkg_default])
608 m4_popdef([pkg_description])
609 ])dnl PKG_NOARCH_INSTALLDIR
612 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
613 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
614 dnl -------------------------------------------
617 dnl Retrieves the value of the pkg-config variable for the given module.
618 AC_DEFUN([PKG_CHECK_VAR],
619 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
620 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
622 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
623 AS_VAR_COPY([$1], [pkg_cv_][$1])
625 AS_VAR_IF([$1], [""], [$5], [$4])dnl
628 # AM_CONDITIONAL -*- Autoconf -*-
630 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
632 # This file is free software; the Free Software Foundation
633 # gives unlimited permission to copy and/or distribute it,
634 # with or without modifications, as long as this notice is preserved.
636 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
637 # -------------------------------------
638 # Define a conditional.
639 AC_DEFUN([AM_CONDITIONAL],
640 [AC_PREREQ([2.52])dnl
641 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
642 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
643 AC_SUBST([$1_TRUE])dnl
644 AC_SUBST([$1_FALSE])dnl
645 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
646 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
647 m4_define([_AM_COND_VALUE_$1], [$2])dnl
655 AC_CONFIG_COMMANDS_PRE(
656 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
657 AC_MSG_ERROR([[conditional "$1" was never defined.
658 Usually this means the macro was only invoked conditionally.]])
661 # Copyright (C) 2006-2021 Free Software Foundation, Inc.
663 # This file is free software; the Free Software Foundation
664 # gives unlimited permission to copy and/or distribute it,
665 # with or without modifications, as long as this notice is preserved.
667 # _AM_SUBST_NOTMAKE(VARIABLE)
668 # ---------------------------
669 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
670 # This macro is traced by Automake.
671 AC_DEFUN([_AM_SUBST_NOTMAKE])
673 # AM_SUBST_NOTMAKE(VARIABLE)
674 # --------------------------
675 # Public sister of _AM_SUBST_NOTMAKE.
676 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])