1# generated automatically by aclocal 1.16.4 -*- Autoconf -*-
2
3# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4
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.
8
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
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# -*- mode: autoconf -*-
24#
25# gtk-doc.m4 - configure macro to check for gtk-doc
26# Copyright (C) 2003 James Henstridge
27#               2007-2017  Stefan Sauer
28#
29# This program is free software: you can redistribute it and/or modify
30# it under the terms of the GNU General Public License as published by
31# the Free Software Foundation, either version 3 of the License, or
32# (at your option) any later version.
33#
34# This program is distributed in the hope that it will be useful,
35# but WITHOUT ANY WARRANTY; without even the implied warranty of
36# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
37# GNU General Public License for more details.
38#
39# You should have received a copy of the GNU General Public License
40# along with this program.  If not, see <http://www.gnu.org/licenses/>.
41#
42# As a special exception, the above copyright owner gives unlimited
43# permission to copy, distribute and modify the configure scripts that
44# are the output of Autoconf when processing the Macro. You need not
45# follow the terms of the GNU General Public License when using or
46# distributing such scripts, even though portions of the text of the
47# Macro appear in them. The GNU General Public License (GPL) does govern
48# all other use of the material that constitutes the Autoconf Macro.
49
50# serial 2
51
52dnl Usage:
53dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
54AC_DEFUN([GTK_DOC_CHECK],
55[
56  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
57  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
58  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
59
60  ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
61  AC_MSG_CHECKING([for gtk-doc])
62  PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
63  AC_MSG_RESULT($have_gtk_doc)
64
65  if test "$have_gtk_doc" = "no"; then
66      AC_MSG_WARN([
67  You will not be able to create source packages with 'make dist'
68  because $gtk_doc_requires is not found.])
69  fi
70
71  dnl check for tools we added during development
72  dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
73  dnl may not be writable by the user. Currently, automake requires that the
74  dnl test name must end in '.test'.
75  dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
76  AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
77  AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
78  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
79  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
80
81  dnl for overriding the documentation installation directory
82  AC_ARG_WITH([html-dir],
83    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
84    [with_html_dir='${datadir}/gtk-doc/html'])
85  HTML_DIR="$with_html_dir"
86  AC_SUBST([HTML_DIR])
87
88  dnl enable/disable documentation building
89  AC_ARG_ENABLE([gtk-doc],
90    AS_HELP_STRING([--enable-gtk-doc],
91                   [use gtk-doc to build documentation [[default=no]]]),,
92    [enable_gtk_doc=no])
93
94  AC_MSG_CHECKING([whether to build gtk-doc documentation])
95  AC_MSG_RESULT($enable_gtk_doc)
96
97  if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
98    AC_MSG_ERROR([
99  You must have $gtk_doc_requires installed to build documentation for
100  $PACKAGE_NAME. Please install gtk-doc or disable building the
101  documentation by adding '--disable-gtk-doc' to '[$]0'.])
102  fi
103
104  dnl don't check for glib if we build glib
105  if test "x$PACKAGE_NAME" != "xglib"; then
106    dnl don't fail if someone does not have glib
107    PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
108  fi
109
110  dnl enable/disable output formats
111  AC_ARG_ENABLE([gtk-doc-html],
112    AS_HELP_STRING([--enable-gtk-doc-html],
113                   [build documentation in html format [[default=yes]]]),,
114    [enable_gtk_doc_html=yes])
115    AC_ARG_ENABLE([gtk-doc-pdf],
116      AS_HELP_STRING([--enable-gtk-doc-pdf],
117                     [build documentation in pdf format [[default=no]]]),,
118      [enable_gtk_doc_pdf=no])
119
120  if test -z "$GTKDOC_MKPDF"; then
121    enable_gtk_doc_pdf=no
122  fi
123
124  if test -z "$AM_DEFAULT_VERBOSITY"; then
125    AM_DEFAULT_VERBOSITY=1
126  fi
127  AC_SUBST([AM_DEFAULT_VERBOSITY])
128
129  AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
130  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
131  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
132  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
133  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
134  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
135])
136
137dnl -*- mode: autoconf -*-
138dnl Copyright 2009 Johan Dahlin
139dnl
140dnl This file is free software; the author(s) gives unlimited
141dnl permission to copy and/or distribute it, with or without
142dnl modifications, as long as this notice is preserved.
143dnl
144
145# serial 1
146
147dnl This is a copy of AS_AC_EXPAND
148dnl
149dnl (C) 2003, 2004, 2005 Thomas Vander Stichele <thomas at apestaart dot org>
150dnl Copying and distribution of this file, with or without modification,
151dnl are permitted in any medium without royalty provided the copyright
152dnl notice and this notice are preserved.
153m4_define([_GOBJECT_INTROSPECTION_AS_AC_EXPAND],
154[
155  EXP_VAR=[$1]
156  FROM_VAR=[$2]
157
158  dnl first expand prefix and exec_prefix if necessary
159  prefix_save=$prefix
160  exec_prefix_save=$exec_prefix
161
162  dnl if no prefix given, then use /usr/local, the default prefix
163  if test "x$prefix" = "xNONE"; then
164    prefix="$ac_default_prefix"
165  fi
166  dnl if no exec_prefix given, then use prefix
167  if test "x$exec_prefix" = "xNONE"; then
168    exec_prefix=$prefix
169  fi
170
171  full_var="$FROM_VAR"
172  dnl loop until it doesn't change anymore
173  while true; do
174    new_full_var="`eval echo $full_var`"
175    if test "x$new_full_var" = "x$full_var"; then break; fi
176    full_var=$new_full_var
177  done
178
179  dnl clean up
180  full_var=$new_full_var
181  AC_SUBST([$1], "$full_var")
182
183  dnl restore prefix and exec_prefix
184  prefix=$prefix_save
185  exec_prefix=$exec_prefix_save
186])
187
188m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
189[
190    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
191    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
192    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
193
194    dnl enable/disable introspection
195    m4_if([$2], [require],
196    [dnl
197        enable_introspection=yes
198    ],[dnl
199        AC_ARG_ENABLE(introspection,
200                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
201                                 [Enable introspection for this build]),,
202                                 [enable_introspection=auto])
203    ])dnl
204
205    AC_MSG_CHECKING([for gobject-introspection])
206
207    dnl presence/version checking
208    AS_CASE([$enable_introspection],
209    [no], [dnl
210        found_introspection="no (disabled, use --enable-introspection to enable)"
211    ],dnl
212    [yes],[dnl
213        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
214                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
215        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
216                         found_introspection=yes,
217                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
218    ],dnl
219    [auto],[dnl
220        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
221	dnl Canonicalize enable_introspection
222	enable_introspection=$found_introspection
223    ],dnl
224    [dnl
225        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
226    ])dnl
227
228    AC_MSG_RESULT([$found_introspection])
229
230    dnl expand datadir/libdir so we can pass them to pkg-config
231    dnl and get paths relative to our target directories
232    _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_DATADIR, "$datadir")
233    _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_LIBDIR, "$libdir")
234
235    INTROSPECTION_SCANNER=
236    INTROSPECTION_COMPILER=
237    INTROSPECTION_GENERATE=
238    INTROSPECTION_GIRDIR=
239    INTROSPECTION_TYPELIBDIR=
240    if test "x$found_introspection" = "xyes"; then
241       INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
242       INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
243       INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
244       INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir="${_GI_EXP_DATADIR}" --variable=girdir gobject-introspection-1.0`
245       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --define-variable=libdir="${_GI_EXP_LIBDIR}" --variable=typelibdir gobject-introspection-1.0)"
246       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
247       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
248       INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
249    fi
250    AC_SUBST(INTROSPECTION_SCANNER)
251    AC_SUBST(INTROSPECTION_COMPILER)
252    AC_SUBST(INTROSPECTION_GENERATE)
253    AC_SUBST(INTROSPECTION_GIRDIR)
254    AC_SUBST(INTROSPECTION_TYPELIBDIR)
255    AC_SUBST(INTROSPECTION_CFLAGS)
256    AC_SUBST(INTROSPECTION_LIBS)
257    AC_SUBST(INTROSPECTION_MAKEFILE)
258
259    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
260])
261
262
263dnl Usage:
264dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
265
266AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
267[
268  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
269])
270
271dnl Usage:
272dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
273
274
275AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
276[
277  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
278])
279
280# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
281# serial 12 (pkg-config-0.29.2)
282
283dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
284dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
285dnl
286dnl This program is free software; you can redistribute it and/or modify
287dnl it under the terms of the GNU General Public License as published by
288dnl the Free Software Foundation; either version 2 of the License, or
289dnl (at your option) any later version.
290dnl
291dnl This program is distributed in the hope that it will be useful, but
292dnl WITHOUT ANY WARRANTY; without even the implied warranty of
293dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
294dnl General Public License for more details.
295dnl
296dnl You should have received a copy of the GNU General Public License
297dnl along with this program; if not, write to the Free Software
298dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
299dnl 02111-1307, USA.
300dnl
301dnl As a special exception to the GNU General Public License, if you
302dnl distribute this file as part of a program that contains a
303dnl configuration script generated by Autoconf, you may include it under
304dnl the same distribution terms that you use for the rest of that
305dnl program.
306
307dnl PKG_PREREQ(MIN-VERSION)
308dnl -----------------------
309dnl Since: 0.29
310dnl
311dnl Verify that the version of the pkg-config macros are at least
312dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
313dnl installed version of pkg-config, this checks the developer's version
314dnl of pkg.m4 when generating configure.
315dnl
316dnl To ensure that this macro is defined, also add:
317dnl m4_ifndef([PKG_PREREQ],
318dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
319dnl
320dnl See the "Since" comment for each macro you use to see what version
321dnl of the macros you require.
322m4_defun([PKG_PREREQ],
323[m4_define([PKG_MACROS_VERSION], [0.29.2])
324m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
325    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
326])dnl PKG_PREREQ
327
328dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
329dnl ----------------------------------
330dnl Since: 0.16
331dnl
332dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
333dnl first found in the path. Checks that the version of pkg-config found
334dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
335dnl used since that's the first version where most current features of
336dnl pkg-config existed.
337AC_DEFUN([PKG_PROG_PKG_CONFIG],
338[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
339m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
340m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
341AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
342AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
343AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
344
345if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
346	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
347fi
348if test -n "$PKG_CONFIG"; then
349	_pkg_min_version=m4_default([$1], [0.9.0])
350	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
351	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
352		AC_MSG_RESULT([yes])
353	else
354		AC_MSG_RESULT([no])
355		PKG_CONFIG=""
356	fi
357fi[]dnl
358])dnl PKG_PROG_PKG_CONFIG
359
360dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
361dnl -------------------------------------------------------------------
362dnl Since: 0.18
363dnl
364dnl Check to see whether a particular set of modules exists. Similar to
365dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
366dnl
367dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
368dnl only at the first occurence in configure.ac, so if the first place
369dnl it's called might be skipped (such as if it is within an "if", you
370dnl have to call PKG_CHECK_EXISTS manually
371AC_DEFUN([PKG_CHECK_EXISTS],
372[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
373if test -n "$PKG_CONFIG" && \
374    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
375  m4_default([$2], [:])
376m4_ifvaln([$3], [else
377  $3])dnl
378fi])
379
380dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
381dnl ---------------------------------------------
382dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
383dnl pkg_failed based on the result.
384m4_define([_PKG_CONFIG],
385[if test -n "$$1"; then
386    pkg_cv_[]$1="$$1"
387 elif test -n "$PKG_CONFIG"; then
388    PKG_CHECK_EXISTS([$3],
389                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
390		      test "x$?" != "x0" && pkg_failed=yes ],
391		     [pkg_failed=yes])
392 else
393    pkg_failed=untried
394fi[]dnl
395])dnl _PKG_CONFIG
396
397dnl _PKG_SHORT_ERRORS_SUPPORTED
398dnl ---------------------------
399dnl Internal check to see if pkg-config supports short errors.
400AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
401[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
402if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
403        _pkg_short_errors_supported=yes
404else
405        _pkg_short_errors_supported=no
406fi[]dnl
407])dnl _PKG_SHORT_ERRORS_SUPPORTED
408
409
410dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
411dnl   [ACTION-IF-NOT-FOUND])
412dnl --------------------------------------------------------------
413dnl Since: 0.4.0
414dnl
415dnl Note that if there is a possibility the first call to
416dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
417dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
418AC_DEFUN([PKG_CHECK_MODULES],
419[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
420AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
421AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
422
423pkg_failed=no
424AC_MSG_CHECKING([for $2])
425
426_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
427_PKG_CONFIG([$1][_LIBS], [libs], [$2])
428
429m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
430and $1[]_LIBS to avoid the need to call pkg-config.
431See the pkg-config man page for more details.])
432
433if test $pkg_failed = yes; then
434        AC_MSG_RESULT([no])
435        _PKG_SHORT_ERRORS_SUPPORTED
436        if test $_pkg_short_errors_supported = yes; then
437	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
438        else
439	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
440        fi
441	# Put the nasty error message in config.log where it belongs
442	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
443
444	m4_default([$4], [AC_MSG_ERROR(
445[Package requirements ($2) were not met:
446
447$$1_PKG_ERRORS
448
449Consider adjusting the PKG_CONFIG_PATH environment variable if you
450installed software in a non-standard prefix.
451
452_PKG_TEXT])[]dnl
453        ])
454elif test $pkg_failed = untried; then
455        AC_MSG_RESULT([no])
456	m4_default([$4], [AC_MSG_FAILURE(
457[The pkg-config script could not be found or is too old.  Make sure it
458is in your PATH or set the PKG_CONFIG environment variable to the full
459path to pkg-config.
460
461_PKG_TEXT
462
463To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
464        ])
465else
466	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
467	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
468        AC_MSG_RESULT([yes])
469	$3
470fi[]dnl
471])dnl PKG_CHECK_MODULES
472
473
474dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
475dnl   [ACTION-IF-NOT-FOUND])
476dnl ---------------------------------------------------------------------
477dnl Since: 0.29
478dnl
479dnl Checks for existence of MODULES and gathers its build flags with
480dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
481dnl and VARIABLE-PREFIX_LIBS from --libs.
482dnl
483dnl Note that if there is a possibility the first call to
484dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
485dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
486dnl configure.ac.
487AC_DEFUN([PKG_CHECK_MODULES_STATIC],
488[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
489_save_PKG_CONFIG=$PKG_CONFIG
490PKG_CONFIG="$PKG_CONFIG --static"
491PKG_CHECK_MODULES($@)
492PKG_CONFIG=$_save_PKG_CONFIG[]dnl
493])dnl PKG_CHECK_MODULES_STATIC
494
495
496dnl PKG_INSTALLDIR([DIRECTORY])
497dnl -------------------------
498dnl Since: 0.27
499dnl
500dnl Substitutes the variable pkgconfigdir as the location where a module
501dnl should install pkg-config .pc files. By default the directory is
502dnl $libdir/pkgconfig, but the default can be changed by passing
503dnl DIRECTORY. The user can override through the --with-pkgconfigdir
504dnl parameter.
505AC_DEFUN([PKG_INSTALLDIR],
506[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
507m4_pushdef([pkg_description],
508    [pkg-config installation directory @<:@]pkg_default[@:>@])
509AC_ARG_WITH([pkgconfigdir],
510    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
511    [with_pkgconfigdir=]pkg_default)
512AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
513m4_popdef([pkg_default])
514m4_popdef([pkg_description])
515])dnl PKG_INSTALLDIR
516
517
518dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
519dnl --------------------------------
520dnl Since: 0.27
521dnl
522dnl Substitutes the variable noarch_pkgconfigdir as the location where a
523dnl module should install arch-independent pkg-config .pc files. By
524dnl default the directory is $datadir/pkgconfig, but the default can be
525dnl changed by passing DIRECTORY. The user can override through the
526dnl --with-noarch-pkgconfigdir parameter.
527AC_DEFUN([PKG_NOARCH_INSTALLDIR],
528[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
529m4_pushdef([pkg_description],
530    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
531AC_ARG_WITH([noarch-pkgconfigdir],
532    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
533    [with_noarch_pkgconfigdir=]pkg_default)
534AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
535m4_popdef([pkg_default])
536m4_popdef([pkg_description])
537])dnl PKG_NOARCH_INSTALLDIR
538
539
540dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
541dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
542dnl -------------------------------------------
543dnl Since: 0.28
544dnl
545dnl Retrieves the value of the pkg-config variable for the given module.
546AC_DEFUN([PKG_CHECK_VAR],
547[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
548AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
549
550_PKG_CONFIG([$1], [variable="][$3]["], [$2])
551AS_VAR_COPY([$1], [pkg_cv_][$1])
552
553AS_VAR_IF([$1], [""], [$5], [$4])dnl
554])dnl PKG_CHECK_VAR
555
556# Copyright (C) 2002-2021 Free Software Foundation, Inc.
557#
558# This file is free software; the Free Software Foundation
559# gives unlimited permission to copy and/or distribute it,
560# with or without modifications, as long as this notice is preserved.
561
562# AM_AUTOMAKE_VERSION(VERSION)
563# ----------------------------
564# Automake X.Y traces this macro to ensure aclocal.m4 has been
565# generated from the m4 files accompanying Automake X.Y.
566# (This private macro should not be called outside this file.)
567AC_DEFUN([AM_AUTOMAKE_VERSION],
568[am__api_version='1.16'
569dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
570dnl require some minimum version.  Point them to the right macro.
571m4_if([$1], [1.16.4], [],
572      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
573])
574
575# _AM_AUTOCONF_VERSION(VERSION)
576# -----------------------------
577# aclocal traces this macro to find the Autoconf version.
578# This is a private macro too.  Using m4_define simplifies
579# the logic in aclocal, which can simply ignore this definition.
580m4_define([_AM_AUTOCONF_VERSION], [])
581
582# AM_SET_CURRENT_AUTOMAKE_VERSION
583# -------------------------------
584# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
585# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
586AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
587[AM_AUTOMAKE_VERSION([1.16.4])dnl
588m4_ifndef([AC_AUTOCONF_VERSION],
589  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
590_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
591
592# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
593
594# Copyright (C) 2001-2021 Free Software Foundation, Inc.
595#
596# This file is free software; the Free Software Foundation
597# gives unlimited permission to copy and/or distribute it,
598# with or without modifications, as long as this notice is preserved.
599
600# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
601# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
602# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
603#
604# Of course, Automake must honor this variable whenever it calls a
605# tool from the auxiliary directory.  The problem is that $srcdir (and
606# therefore $ac_aux_dir as well) can be either absolute or relative,
607# depending on how configure is run.  This is pretty annoying, since
608# it makes $ac_aux_dir quite unusable in subdirectories: in the top
609# source directory, any form will work fine, but in subdirectories a
610# relative path needs to be adjusted first.
611#
612# $ac_aux_dir/missing
613#    fails when called from a subdirectory if $ac_aux_dir is relative
614# $top_srcdir/$ac_aux_dir/missing
615#    fails if $ac_aux_dir is absolute,
616#    fails when called from a subdirectory in a VPATH build with
617#          a relative $ac_aux_dir
618#
619# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
620# are both prefixed by $srcdir.  In an in-source build this is usually
621# harmless because $srcdir is '.', but things will broke when you
622# start a VPATH build or use an absolute $srcdir.
623#
624# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
625# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
626#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
627# and then we would define $MISSING as
628#   MISSING="\${SHELL} $am_aux_dir/missing"
629# This will work as long as MISSING is not called from configure, because
630# unfortunately $(top_srcdir) has no meaning in configure.
631# However there are other variables, like CC, which are often used in
632# configure, and could therefore not use this "fixed" $ac_aux_dir.
633#
634# Another solution, used here, is to always expand $ac_aux_dir to an
635# absolute PATH.  The drawback is that using absolute paths prevent a
636# configured tree to be moved without reconfiguration.
637
638AC_DEFUN([AM_AUX_DIR_EXPAND],
639[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
640# Expand $ac_aux_dir to an absolute path.
641am_aux_dir=`cd "$ac_aux_dir" && pwd`
642])
643
644# AM_CONDITIONAL                                            -*- Autoconf -*-
645
646# Copyright (C) 1997-2021 Free Software Foundation, Inc.
647#
648# This file is free software; the Free Software Foundation
649# gives unlimited permission to copy and/or distribute it,
650# with or without modifications, as long as this notice is preserved.
651
652# AM_CONDITIONAL(NAME, SHELL-CONDITION)
653# -------------------------------------
654# Define a conditional.
655AC_DEFUN([AM_CONDITIONAL],
656[AC_PREREQ([2.52])dnl
657 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
658       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
659AC_SUBST([$1_TRUE])dnl
660AC_SUBST([$1_FALSE])dnl
661_AM_SUBST_NOTMAKE([$1_TRUE])dnl
662_AM_SUBST_NOTMAKE([$1_FALSE])dnl
663m4_define([_AM_COND_VALUE_$1], [$2])dnl
664if $2; then
665  $1_TRUE=
666  $1_FALSE='#'
667else
668  $1_TRUE='#'
669  $1_FALSE=
670fi
671AC_CONFIG_COMMANDS_PRE(
672[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
673  AC_MSG_ERROR([[conditional "$1" was never defined.
674Usually this means the macro was only invoked conditionally.]])
675fi])])
676
677# Copyright (C) 1999-2021 Free Software Foundation, Inc.
678#
679# This file is free software; the Free Software Foundation
680# gives unlimited permission to copy and/or distribute it,
681# with or without modifications, as long as this notice is preserved.
682
683
684# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
685# written in clear, in which case automake, when reading aclocal.m4,
686# will think it sees a *use*, and therefore will trigger all it's
687# C support machinery.  Also note that it means that autoscan, seeing
688# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
689
690
691# _AM_DEPENDENCIES(NAME)
692# ----------------------
693# See how the compiler implements dependency checking.
694# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
695# We try a few techniques and use that to set a single cache variable.
696#
697# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
698# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
699# dependency, and given that the user is not expected to run this macro,
700# just rely on AC_PROG_CC.
701AC_DEFUN([_AM_DEPENDENCIES],
702[AC_REQUIRE([AM_SET_DEPDIR])dnl
703AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
704AC_REQUIRE([AM_MAKE_INCLUDE])dnl
705AC_REQUIRE([AM_DEP_TRACK])dnl
706
707m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
708      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
709      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
710      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
711      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
712      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
713                    [depcc="$$1"   am_compiler_list=])
714
715AC_CACHE_CHECK([dependency style of $depcc],
716               [am_cv_$1_dependencies_compiler_type],
717[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
718  # We make a subdir and do the tests there.  Otherwise we can end up
719  # making bogus files that we don't know about and never remove.  For
720  # instance it was reported that on HP-UX the gcc test will end up
721  # making a dummy file named 'D' -- because '-MD' means "put the output
722  # in D".
723  rm -rf conftest.dir
724  mkdir conftest.dir
725  # Copy depcomp to subdir because otherwise we won't find it if we're
726  # using a relative directory.
727  cp "$am_depcomp" conftest.dir
728  cd conftest.dir
729  # We will build objects and dependencies in a subdirectory because
730  # it helps to detect inapplicable dependency modes.  For instance
731  # both Tru64's cc and ICC support -MD to output dependencies as a
732  # side effect of compilation, but ICC will put the dependencies in
733  # the current directory while Tru64 will put them in the object
734  # directory.
735  mkdir sub
736
737  am_cv_$1_dependencies_compiler_type=none
738  if test "$am_compiler_list" = ""; then
739     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
740  fi
741  am__universal=false
742  m4_case([$1], [CC],
743    [case " $depcc " in #(
744     *\ -arch\ *\ -arch\ *) am__universal=true ;;
745     esac],
746    [CXX],
747    [case " $depcc " in #(
748     *\ -arch\ *\ -arch\ *) am__universal=true ;;
749     esac])
750
751  for depmode in $am_compiler_list; do
752    # Setup a source with many dependencies, because some compilers
753    # like to wrap large dependency lists on column 80 (with \), and
754    # we should not choose a depcomp mode which is confused by this.
755    #
756    # We need to recreate these files for each test, as the compiler may
757    # overwrite some of them when testing with obscure command lines.
758    # This happens at least with the AIX C compiler.
759    : > sub/conftest.c
760    for i in 1 2 3 4 5 6; do
761      echo '#include "conftst'$i'.h"' >> sub/conftest.c
762      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
763      # Solaris 10 /bin/sh.
764      echo '/* dummy */' > sub/conftst$i.h
765    done
766    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
767
768    # We check with '-c' and '-o' for the sake of the "dashmstdout"
769    # mode.  It turns out that the SunPro C++ compiler does not properly
770    # handle '-M -o', and we need to detect this.  Also, some Intel
771    # versions had trouble with output in subdirs.
772    am__obj=sub/conftest.${OBJEXT-o}
773    am__minus_obj="-o $am__obj"
774    case $depmode in
775    gcc)
776      # This depmode causes a compiler race in universal mode.
777      test "$am__universal" = false || continue
778      ;;
779    nosideeffect)
780      # After this tag, mechanisms are not by side-effect, so they'll
781      # only be used when explicitly requested.
782      if test "x$enable_dependency_tracking" = xyes; then
783	continue
784      else
785	break
786      fi
787      ;;
788    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
789      # This compiler won't grok '-c -o', but also, the minuso test has
790      # not run yet.  These depmodes are late enough in the game, and
791      # so weak that their functioning should not be impacted.
792      am__obj=conftest.${OBJEXT-o}
793      am__minus_obj=
794      ;;
795    none) break ;;
796    esac
797    if depmode=$depmode \
798       source=sub/conftest.c object=$am__obj \
799       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
800       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
801         >/dev/null 2>conftest.err &&
802       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
803       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
804       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
805       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
806      # icc doesn't choke on unknown options, it will just issue warnings
807      # or remarks (even with -Werror).  So we grep stderr for any message
808      # that says an option was ignored or not supported.
809      # When given -MP, icc 7.0 and 7.1 complain thusly:
810      #   icc: Command line warning: ignoring option '-M'; no argument required
811      # The diagnosis changed in icc 8.0:
812      #   icc: Command line remark: option '-MP' not supported
813      if (grep 'ignoring option' conftest.err ||
814          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
815        am_cv_$1_dependencies_compiler_type=$depmode
816        break
817      fi
818    fi
819  done
820
821  cd ..
822  rm -rf conftest.dir
823else
824  am_cv_$1_dependencies_compiler_type=none
825fi
826])
827AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
828AM_CONDITIONAL([am__fastdep$1], [
829  test "x$enable_dependency_tracking" != xno \
830  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
831])
832
833
834# AM_SET_DEPDIR
835# -------------
836# Choose a directory name for dependency files.
837# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
838AC_DEFUN([AM_SET_DEPDIR],
839[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
840AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
841])
842
843
844# AM_DEP_TRACK
845# ------------
846AC_DEFUN([AM_DEP_TRACK],
847[AC_ARG_ENABLE([dependency-tracking], [dnl
848AS_HELP_STRING(
849  [--enable-dependency-tracking],
850  [do not reject slow dependency extractors])
851AS_HELP_STRING(
852  [--disable-dependency-tracking],
853  [speeds up one-time build])])
854if test "x$enable_dependency_tracking" != xno; then
855  am_depcomp="$ac_aux_dir/depcomp"
856  AMDEPBACKSLASH='\'
857  am__nodep='_no'
858fi
859AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
860AC_SUBST([AMDEPBACKSLASH])dnl
861_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
862AC_SUBST([am__nodep])dnl
863_AM_SUBST_NOTMAKE([am__nodep])dnl
864])
865
866# Generate code to set up dependency tracking.              -*- Autoconf -*-
867
868# Copyright (C) 1999-2021 Free Software Foundation, Inc.
869#
870# This file is free software; the Free Software Foundation
871# gives unlimited permission to copy and/or distribute it,
872# with or without modifications, as long as this notice is preserved.
873
874# _AM_OUTPUT_DEPENDENCY_COMMANDS
875# ------------------------------
876AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
877[{
878  # Older Autoconf quotes --file arguments for eval, but not when files
879  # are listed without --file.  Let's play safe and only enable the eval
880  # if we detect the quoting.
881  # TODO: see whether this extra hack can be removed once we start
882  # requiring Autoconf 2.70 or later.
883  AS_CASE([$CONFIG_FILES],
884          [*\'*], [eval set x "$CONFIG_FILES"],
885          [*], [set x $CONFIG_FILES])
886  shift
887  # Used to flag and report bootstrapping failures.
888  am_rc=0
889  for am_mf
890  do
891    # Strip MF so we end up with the name of the file.
892    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
893    # Check whether this is an Automake generated Makefile which includes
894    # dependency-tracking related rules and includes.
895    # Grep'ing the whole file directly is not great: AIX grep has a line
896    # limit of 2048, but all sed's we know have understand at least 4000.
897    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
898      || continue
899    am_dirpart=`AS_DIRNAME(["$am_mf"])`
900    am_filepart=`AS_BASENAME(["$am_mf"])`
901    AM_RUN_LOG([cd "$am_dirpart" \
902      && sed -e '/# am--include-marker/d' "$am_filepart" \
903        | $MAKE -f - am--depfiles]) || am_rc=$?
904  done
905  if test $am_rc -ne 0; then
906    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
907    for automatic dependency tracking.  If GNU make was not used, consider
908    re-running the configure script with MAKE="gmake" (or whatever is
909    necessary).  You can also try re-running configure with the
910    '--disable-dependency-tracking' option to at least be able to build
911    the package (albeit without support for automatic dependency tracking).])
912  fi
913  AS_UNSET([am_dirpart])
914  AS_UNSET([am_filepart])
915  AS_UNSET([am_mf])
916  AS_UNSET([am_rc])
917  rm -f conftest-deps.mk
918}
919])# _AM_OUTPUT_DEPENDENCY_COMMANDS
920
921
922# AM_OUTPUT_DEPENDENCY_COMMANDS
923# -----------------------------
924# This macro should only be invoked once -- use via AC_REQUIRE.
925#
926# This code is only required when automatic dependency tracking is enabled.
927# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
928# order to bootstrap the dependency handling code.
929AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
930[AC_CONFIG_COMMANDS([depfiles],
931     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
932     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
933
934# AM_EXTRA_RECURSIVE_TARGETS                                -*- Autoconf -*-
935
936# Copyright (C) 2012-2021 Free Software Foundation, Inc.
937#
938# This file is free software; the Free Software Foundation
939# gives unlimited permission to copy and/or distribute it,
940# with or without modifications, as long as this notice is preserved.
941
942# AM_EXTRA_RECURSIVE_TARGETS
943# --------------------------
944# Define the list of user recursive targets.  This macro exists only to
945# be traced by Automake, which will ensure that a proper definition of
946# user-defined recursive targets (and associated rules) is propagated
947# into all the generated Makefiles.
948# TODO: We should really reject non-literal arguments here...
949AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], [])
950
951# Do all the work for Automake.                             -*- Autoconf -*-
952
953# Copyright (C) 1996-2021 Free Software Foundation, Inc.
954#
955# This file is free software; the Free Software Foundation
956# gives unlimited permission to copy and/or distribute it,
957# with or without modifications, as long as this notice is preserved.
958
959# This macro actually does too much.  Some checks are only needed if
960# your package does certain things.  But this isn't really a big deal.
961
962dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
963m4_define([AC_PROG_CC],
964m4_defn([AC_PROG_CC])
965[_AM_PROG_CC_C_O
966])
967
968# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
969# AM_INIT_AUTOMAKE([OPTIONS])
970# -----------------------------------------------
971# The call with PACKAGE and VERSION arguments is the old style
972# call (pre autoconf-2.50), which is being phased out.  PACKAGE
973# and VERSION should now be passed to AC_INIT and removed from
974# the call to AM_INIT_AUTOMAKE.
975# We support both call styles for the transition.  After
976# the next Automake release, Autoconf can make the AC_INIT
977# arguments mandatory, and then we can depend on a new Autoconf
978# release and drop the old call support.
979AC_DEFUN([AM_INIT_AUTOMAKE],
980[AC_PREREQ([2.65])dnl
981dnl Autoconf wants to disallow AM_ names.  We explicitly allow
982dnl the ones we care about.
983m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
984AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
985AC_REQUIRE([AC_PROG_INSTALL])dnl
986if test "`cd $srcdir && pwd`" != "`pwd`"; then
987  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
988  # is not polluted with repeated "-I."
989  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
990  # test to see if srcdir already configured
991  if test -f $srcdir/config.status; then
992    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
993  fi
994fi
995
996# test whether we have cygpath
997if test -z "$CYGPATH_W"; then
998  if (cygpath --version) >/dev/null 2>/dev/null; then
999    CYGPATH_W='cygpath -w'
1000  else
1001    CYGPATH_W=echo
1002  fi
1003fi
1004AC_SUBST([CYGPATH_W])
1005
1006# Define the identity of the package.
1007dnl Distinguish between old-style and new-style calls.
1008m4_ifval([$2],
1009[AC_DIAGNOSE([obsolete],
1010             [$0: two- and three-arguments forms are deprecated.])
1011m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1012 AC_SUBST([PACKAGE], [$1])dnl
1013 AC_SUBST([VERSION], [$2])],
1014[_AM_SET_OPTIONS([$1])dnl
1015dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1016m4_if(
1017  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
1018  [ok:ok],,
1019  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1020 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1021 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1022
1023_AM_IF_OPTION([no-define],,
1024[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1025 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1026
1027# Some tools Automake needs.
1028AC_REQUIRE([AM_SANITY_CHECK])dnl
1029AC_REQUIRE([AC_ARG_PROGRAM])dnl
1030AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1031AM_MISSING_PROG([AUTOCONF], [autoconf])
1032AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1033AM_MISSING_PROG([AUTOHEADER], [autoheader])
1034AM_MISSING_PROG([MAKEINFO], [makeinfo])
1035AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1036AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1037AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1038# For better backward compatibility.  To be removed once Automake 1.9.x
1039# dies out for good.  For more background, see:
1040# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1041# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1042AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1043# We need awk for the "check" target (and possibly the TAP driver).  The
1044# system "awk" is bad on some platforms.
1045AC_REQUIRE([AC_PROG_AWK])dnl
1046AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1047AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1048_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1049	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1050			     [_AM_PROG_TAR([v7])])])
1051_AM_IF_OPTION([no-dependencies],,
1052[AC_PROVIDE_IFELSE([AC_PROG_CC],
1053		  [_AM_DEPENDENCIES([CC])],
1054		  [m4_define([AC_PROG_CC],
1055			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1056AC_PROVIDE_IFELSE([AC_PROG_CXX],
1057		  [_AM_DEPENDENCIES([CXX])],
1058		  [m4_define([AC_PROG_CXX],
1059			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1060AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1061		  [_AM_DEPENDENCIES([OBJC])],
1062		  [m4_define([AC_PROG_OBJC],
1063			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1064AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1065		  [_AM_DEPENDENCIES([OBJCXX])],
1066		  [m4_define([AC_PROG_OBJCXX],
1067			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1068])
1069# Variables for tags utilities; see am/tags.am
1070if test -z "$CTAGS"; then
1071  CTAGS=ctags
1072fi
1073AC_SUBST([CTAGS])
1074if test -z "$ETAGS"; then
1075  ETAGS=etags
1076fi
1077AC_SUBST([ETAGS])
1078if test -z "$CSCOPE"; then
1079  CSCOPE=cscope
1080fi
1081AC_SUBST([CSCOPE])
1082
1083AC_REQUIRE([AM_SILENT_RULES])dnl
1084dnl The testsuite driver may need to know about EXEEXT, so add the
1085dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1086dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1087AC_CONFIG_COMMANDS_PRE(dnl
1088[m4_provide_if([_AM_COMPILER_EXEEXT],
1089  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1090
1091# POSIX will say in a future version that running "rm -f" with no argument
1092# is OK; and we want to be able to make that assumption in our Makefile
1093# recipes.  So use an aggressive probe to check that the usage we want is
1094# actually supported "in the wild" to an acceptable degree.
1095# See automake bug#10828.
1096# To make any issue more visible, cause the running configure to be aborted
1097# by default if the 'rm' program in use doesn't match our expectations; the
1098# user can still override this though.
1099if rm -f && rm -fr && rm -rf; then : OK; else
1100  cat >&2 <<'END'
1101Oops!
1102
1103Your 'rm' program seems unable to run without file operands specified
1104on the command line, even when the '-f' option is present.  This is contrary
1105to the behaviour of most rm programs out there, and not conforming with
1106the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1107
1108Please tell bug-automake@gnu.org about your system, including the value
1109of your $PATH and any error possibly output before this message.  This
1110can help us improve future automake versions.
1111
1112END
1113  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1114    echo 'Configuration will proceed anyway, since you have set the' >&2
1115    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1116    echo >&2
1117  else
1118    cat >&2 <<'END'
1119Aborting the configuration process, to ensure you take notice of the issue.
1120
1121You can download and install GNU coreutils to get an 'rm' implementation
1122that behaves properly: <https://www.gnu.org/software/coreutils/>.
1123
1124If you want to complete the configuration process using your problematic
1125'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1126to "yes", and re-run configure.
1127
1128END
1129    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1130  fi
1131fi
1132dnl The trailing newline in this macro's definition is deliberate, for
1133dnl backward compatibility and to allow trailing 'dnl'-style comments
1134dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1135])
1136
1137dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1138dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1139dnl mangled by Autoconf and run in a shell conditional statement.
1140m4_define([_AC_COMPILER_EXEEXT],
1141m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1142
1143# When config.status generates a header, we must update the stamp-h file.
1144# This file resides in the same directory as the config header
1145# that is generated.  The stamp files are numbered to have different names.
1146
1147# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1148# loop where config.status creates the headers, so we can generate
1149# our stamp files there.
1150AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1151[# Compute $1's index in $config_headers.
1152_am_arg=$1
1153_am_stamp_count=1
1154for _am_header in $config_headers :; do
1155  case $_am_header in
1156    $_am_arg | $_am_arg:* )
1157      break ;;
1158    * )
1159      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1160  esac
1161done
1162echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1163
1164# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1165#
1166# This file is free software; the Free Software Foundation
1167# gives unlimited permission to copy and/or distribute it,
1168# with or without modifications, as long as this notice is preserved.
1169
1170# AM_PROG_INSTALL_SH
1171# ------------------
1172# Define $install_sh.
1173AC_DEFUN([AM_PROG_INSTALL_SH],
1174[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1175if test x"${install_sh+set}" != xset; then
1176  case $am_aux_dir in
1177  *\ * | *\	*)
1178    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1179  *)
1180    install_sh="\${SHELL} $am_aux_dir/install-sh"
1181  esac
1182fi
1183AC_SUBST([install_sh])])
1184
1185# Copyright (C) 2003-2021 Free Software Foundation, Inc.
1186#
1187# This file is free software; the Free Software Foundation
1188# gives unlimited permission to copy and/or distribute it,
1189# with or without modifications, as long as this notice is preserved.
1190
1191# Check whether the underlying file-system supports filenames
1192# with a leading dot.  For instance MS-DOS doesn't.
1193AC_DEFUN([AM_SET_LEADING_DOT],
1194[rm -rf .tst 2>/dev/null
1195mkdir .tst 2>/dev/null
1196if test -d .tst; then
1197  am__leading_dot=.
1198else
1199  am__leading_dot=_
1200fi
1201rmdir .tst 2>/dev/null
1202AC_SUBST([am__leading_dot])])
1203
1204# Check to see how 'make' treats includes.	            -*- Autoconf -*-
1205
1206# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1207#
1208# This file is free software; the Free Software Foundation
1209# gives unlimited permission to copy and/or distribute it,
1210# with or without modifications, as long as this notice is preserved.
1211
1212# AM_MAKE_INCLUDE()
1213# -----------------
1214# Check whether make has an 'include' directive that can support all
1215# the idioms we need for our automatic dependency tracking code.
1216AC_DEFUN([AM_MAKE_INCLUDE],
1217[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
1218cat > confinc.mk << 'END'
1219am__doit:
1220	@echo this is the am__doit target >confinc.out
1221.PHONY: am__doit
1222END
1223am__include="#"
1224am__quote=
1225# BSD make does it like this.
1226echo '.include "confinc.mk" # ignored' > confmf.BSD
1227# Other make implementations (GNU, Solaris 10, AIX) do it like this.
1228echo 'include confinc.mk # ignored' > confmf.GNU
1229_am_result=no
1230for s in GNU BSD; do
1231  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
1232  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
1233      ['0:this is the am__doit target'],
1234      [AS_CASE([$s],
1235          [BSD], [am__include='.include' am__quote='"'],
1236          [am__include='include' am__quote=''])])
1237  if test "$am__include" != "#"; then
1238    _am_result="yes ($s style)"
1239    break
1240  fi
1241done
1242rm -f confinc.* confmf.*
1243AC_MSG_RESULT([${_am_result}])
1244AC_SUBST([am__include])])
1245AC_SUBST([am__quote])])
1246
1247# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1248
1249# Copyright (C) 1997-2021 Free Software Foundation, Inc.
1250#
1251# This file is free software; the Free Software Foundation
1252# gives unlimited permission to copy and/or distribute it,
1253# with or without modifications, as long as this notice is preserved.
1254
1255# AM_MISSING_PROG(NAME, PROGRAM)
1256# ------------------------------
1257AC_DEFUN([AM_MISSING_PROG],
1258[AC_REQUIRE([AM_MISSING_HAS_RUN])
1259$1=${$1-"${am_missing_run}$2"}
1260AC_SUBST($1)])
1261
1262# AM_MISSING_HAS_RUN
1263# ------------------
1264# Define MISSING if not defined so far and test if it is modern enough.
1265# If it is, set am_missing_run to use it, otherwise, to nothing.
1266AC_DEFUN([AM_MISSING_HAS_RUN],
1267[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1268AC_REQUIRE_AUX_FILE([missing])dnl
1269if test x"${MISSING+set}" != xset; then
1270  MISSING="\${SHELL} '$am_aux_dir/missing'"
1271fi
1272# Use eval to expand $SHELL
1273if eval "$MISSING --is-lightweight"; then
1274  am_missing_run="$MISSING "
1275else
1276  am_missing_run=
1277  AC_MSG_WARN(['missing' script is too old or missing])
1278fi
1279])
1280
1281# Helper functions for option handling.                     -*- Autoconf -*-
1282
1283# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1284#
1285# This file is free software; the Free Software Foundation
1286# gives unlimited permission to copy and/or distribute it,
1287# with or without modifications, as long as this notice is preserved.
1288
1289# _AM_MANGLE_OPTION(NAME)
1290# -----------------------
1291AC_DEFUN([_AM_MANGLE_OPTION],
1292[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1293
1294# _AM_SET_OPTION(NAME)
1295# --------------------
1296# Set option NAME.  Presently that only means defining a flag for this option.
1297AC_DEFUN([_AM_SET_OPTION],
1298[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1299
1300# _AM_SET_OPTIONS(OPTIONS)
1301# ------------------------
1302# OPTIONS is a space-separated list of Automake options.
1303AC_DEFUN([_AM_SET_OPTIONS],
1304[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1305
1306# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1307# -------------------------------------------
1308# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1309AC_DEFUN([_AM_IF_OPTION],
1310[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1311
1312# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1313#
1314# This file is free software; the Free Software Foundation
1315# gives unlimited permission to copy and/or distribute it,
1316# with or without modifications, as long as this notice is preserved.
1317
1318# _AM_PROG_CC_C_O
1319# ---------------
1320# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
1321# to automatically call this.
1322AC_DEFUN([_AM_PROG_CC_C_O],
1323[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1324AC_REQUIRE_AUX_FILE([compile])dnl
1325AC_LANG_PUSH([C])dnl
1326AC_CACHE_CHECK(
1327  [whether $CC understands -c and -o together],
1328  [am_cv_prog_cc_c_o],
1329  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1330  # Make sure it works both with $CC and with simple cc.
1331  # Following AC_PROG_CC_C_O, we do the test twice because some
1332  # compilers refuse to overwrite an existing .o file with -o,
1333  # though they will create one.
1334  am_cv_prog_cc_c_o=yes
1335  for am_i in 1 2; do
1336    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1337         && test -f conftest2.$ac_objext; then
1338      : OK
1339    else
1340      am_cv_prog_cc_c_o=no
1341      break
1342    fi
1343  done
1344  rm -f core conftest*
1345  unset am_i])
1346if test "$am_cv_prog_cc_c_o" != yes; then
1347   # Losing compiler, so override with the script.
1348   # FIXME: It is wrong to rewrite CC.
1349   # But if we don't then we get into trouble of one sort or another.
1350   # A longer-term fix would be to have automake use am__CC in this case,
1351   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1352   CC="$am_aux_dir/compile $CC"
1353fi
1354AC_LANG_POP([C])])
1355
1356# For backward compatibility.
1357AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1358
1359# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1360#
1361# This file is free software; the Free Software Foundation
1362# gives unlimited permission to copy and/or distribute it,
1363# with or without modifications, as long as this notice is preserved.
1364
1365# AM_RUN_LOG(COMMAND)
1366# -------------------
1367# Run COMMAND, save the exit status in ac_status, and log it.
1368# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1369AC_DEFUN([AM_RUN_LOG],
1370[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1371   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1372   ac_status=$?
1373   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1374   (exit $ac_status); }])
1375
1376# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1377
1378# Copyright (C) 1996-2021 Free Software Foundation, Inc.
1379#
1380# This file is free software; the Free Software Foundation
1381# gives unlimited permission to copy and/or distribute it,
1382# with or without modifications, as long as this notice is preserved.
1383
1384# AM_SANITY_CHECK
1385# ---------------
1386AC_DEFUN([AM_SANITY_CHECK],
1387[AC_MSG_CHECKING([whether build environment is sane])
1388# Reject unsafe characters in $srcdir or the absolute working directory
1389# name.  Accept space and tab only in the latter.
1390am_lf='
1391'
1392case `pwd` in
1393  *[[\\\"\#\$\&\'\`$am_lf]]*)
1394    AC_MSG_ERROR([unsafe absolute working directory name]);;
1395esac
1396case $srcdir in
1397  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1398    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1399esac
1400
1401# Do 'set' in a subshell so we don't clobber the current shell's
1402# arguments.  Must try -L first in case configure is actually a
1403# symlink; some systems play weird games with the mod time of symlinks
1404# (eg FreeBSD returns the mod time of the symlink's containing
1405# directory).
1406if (
1407   am_has_slept=no
1408   for am_try in 1 2; do
1409     echo "timestamp, slept: $am_has_slept" > conftest.file
1410     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1411     if test "$[*]" = "X"; then
1412	# -L didn't work.
1413	set X `ls -t "$srcdir/configure" conftest.file`
1414     fi
1415     if test "$[*]" != "X $srcdir/configure conftest.file" \
1416	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1417
1418	# If neither matched, then we have a broken ls.  This can happen
1419	# if, for instance, CONFIG_SHELL is bash and it inherits a
1420	# broken ls alias from the environment.  This has actually
1421	# happened.  Such a system could not be considered "sane".
1422	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1423  alias in your environment])
1424     fi
1425     if test "$[2]" = conftest.file || test $am_try -eq 2; then
1426       break
1427     fi
1428     # Just in case.
1429     sleep 1
1430     am_has_slept=yes
1431   done
1432   test "$[2]" = conftest.file
1433   )
1434then
1435   # Ok.
1436   :
1437else
1438   AC_MSG_ERROR([newly created file is older than distributed files!
1439Check your system clock])
1440fi
1441AC_MSG_RESULT([yes])
1442# If we didn't sleep, we still need to ensure time stamps of config.status and
1443# generated files are strictly newer.
1444am_sleep_pid=
1445if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1446  ( sleep 1 ) &
1447  am_sleep_pid=$!
1448fi
1449AC_CONFIG_COMMANDS_PRE(
1450  [AC_MSG_CHECKING([that generated files are newer than configure])
1451   if test -n "$am_sleep_pid"; then
1452     # Hide warnings about reused PIDs.
1453     wait $am_sleep_pid 2>/dev/null
1454   fi
1455   AC_MSG_RESULT([done])])
1456rm -f conftest.file
1457])
1458
1459# Copyright (C) 2009-2021 Free Software Foundation, Inc.
1460#
1461# This file is free software; the Free Software Foundation
1462# gives unlimited permission to copy and/or distribute it,
1463# with or without modifications, as long as this notice is preserved.
1464
1465# AM_SILENT_RULES([DEFAULT])
1466# --------------------------
1467# Enable less verbose build rules; with the default set to DEFAULT
1468# ("yes" being less verbose, "no" or empty being verbose).
1469AC_DEFUN([AM_SILENT_RULES],
1470[AC_ARG_ENABLE([silent-rules], [dnl
1471AS_HELP_STRING(
1472  [--enable-silent-rules],
1473  [less verbose build output (undo: "make V=1")])
1474AS_HELP_STRING(
1475  [--disable-silent-rules],
1476  [verbose build output (undo: "make V=0")])dnl
1477])
1478case $enable_silent_rules in @%:@ (((
1479  yes) AM_DEFAULT_VERBOSITY=0;;
1480   no) AM_DEFAULT_VERBOSITY=1;;
1481    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1482esac
1483dnl
1484dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1485dnl do not support nested variable expansions.
1486dnl See automake bug#9928 and bug#10237.
1487am_make=${MAKE-make}
1488AC_CACHE_CHECK([whether $am_make supports nested variables],
1489   [am_cv_make_support_nested_variables],
1490   [if AS_ECHO([['TRUE=$(BAR$(V))
1491BAR0=false
1492BAR1=true
1493V=1
1494am__doit:
1495	@$(TRUE)
1496.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1497  am_cv_make_support_nested_variables=yes
1498else
1499  am_cv_make_support_nested_variables=no
1500fi])
1501if test $am_cv_make_support_nested_variables = yes; then
1502  dnl Using '$V' instead of '$(V)' breaks IRIX make.
1503  AM_V='$(V)'
1504  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1505else
1506  AM_V=$AM_DEFAULT_VERBOSITY
1507  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1508fi
1509AC_SUBST([AM_V])dnl
1510AM_SUBST_NOTMAKE([AM_V])dnl
1511AC_SUBST([AM_DEFAULT_V])dnl
1512AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1513AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1514AM_BACKSLASH='\'
1515AC_SUBST([AM_BACKSLASH])dnl
1516_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1517])
1518
1519# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1520#
1521# This file is free software; the Free Software Foundation
1522# gives unlimited permission to copy and/or distribute it,
1523# with or without modifications, as long as this notice is preserved.
1524
1525# AM_PROG_INSTALL_STRIP
1526# ---------------------
1527# One issue with vendor 'install' (even GNU) is that you can't
1528# specify the program used to strip binaries.  This is especially
1529# annoying in cross-compiling environments, where the build's strip
1530# is unlikely to handle the host's binaries.
1531# Fortunately install-sh will honor a STRIPPROG variable, so we
1532# always use install-sh in "make install-strip", and initialize
1533# STRIPPROG with the value of the STRIP variable (set by the user).
1534AC_DEFUN([AM_PROG_INSTALL_STRIP],
1535[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1536# Installed binaries are usually stripped using 'strip' when the user
1537# run "make install-strip".  However 'strip' might not be the right
1538# tool to use in cross-compilation environments, therefore Automake
1539# will honor the 'STRIP' environment variable to overrule this program.
1540dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1541if test "$cross_compiling" != no; then
1542  AC_CHECK_TOOL([STRIP], [strip], :)
1543fi
1544INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1545AC_SUBST([INSTALL_STRIP_PROGRAM])])
1546
1547# Copyright (C) 2006-2021 Free Software Foundation, Inc.
1548#
1549# This file is free software; the Free Software Foundation
1550# gives unlimited permission to copy and/or distribute it,
1551# with or without modifications, as long as this notice is preserved.
1552
1553# _AM_SUBST_NOTMAKE(VARIABLE)
1554# ---------------------------
1555# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1556# This macro is traced by Automake.
1557AC_DEFUN([_AM_SUBST_NOTMAKE])
1558
1559# AM_SUBST_NOTMAKE(VARIABLE)
1560# --------------------------
1561# Public sister of _AM_SUBST_NOTMAKE.
1562AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1563
1564# Check how to create a tarball.                            -*- Autoconf -*-
1565
1566# Copyright (C) 2004-2021 Free Software Foundation, Inc.
1567#
1568# This file is free software; the Free Software Foundation
1569# gives unlimited permission to copy and/or distribute it,
1570# with or without modifications, as long as this notice is preserved.
1571
1572# _AM_PROG_TAR(FORMAT)
1573# --------------------
1574# Check how to create a tarball in format FORMAT.
1575# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1576#
1577# Substitute a variable $(am__tar) that is a command
1578# writing to stdout a FORMAT-tarball containing the directory
1579# $tardir.
1580#     tardir=directory && $(am__tar) > result.tar
1581#
1582# Substitute a variable $(am__untar) that extract such
1583# a tarball read from stdin.
1584#     $(am__untar) < result.tar
1585#
1586AC_DEFUN([_AM_PROG_TAR],
1587[# Always define AMTAR for backward compatibility.  Yes, it's still used
1588# in the wild :-(  We should find a proper way to deprecate it ...
1589AC_SUBST([AMTAR], ['$${TAR-tar}'])
1590
1591# We'll loop over all known methods to create a tar archive until one works.
1592_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1593
1594m4_if([$1], [v7],
1595  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1596
1597  [m4_case([$1],
1598    [ustar],
1599     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1600      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1601      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1602      # and bug#13588).
1603      am_max_uid=2097151 # 2^21 - 1
1604      am_max_gid=$am_max_uid
1605      # The $UID and $GID variables are not portable, so we need to resort
1606      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1607      # below are definitely unexpected, so allow the users to see them
1608      # (that is, avoid stderr redirection).
1609      am_uid=`id -u || echo unknown`
1610      am_gid=`id -g || echo unknown`
1611      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1612      if test $am_uid -le $am_max_uid; then
1613         AC_MSG_RESULT([yes])
1614      else
1615         AC_MSG_RESULT([no])
1616         _am_tools=none
1617      fi
1618      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1619      if test $am_gid -le $am_max_gid; then
1620         AC_MSG_RESULT([yes])
1621      else
1622        AC_MSG_RESULT([no])
1623        _am_tools=none
1624      fi],
1625
1626  [pax],
1627    [],
1628
1629  [m4_fatal([Unknown tar format])])
1630
1631  AC_MSG_CHECKING([how to create a $1 tar archive])
1632
1633  # Go ahead even if we have the value already cached.  We do so because we
1634  # need to set the values for the 'am__tar' and 'am__untar' variables.
1635  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1636
1637  for _am_tool in $_am_tools; do
1638    case $_am_tool in
1639    gnutar)
1640      for _am_tar in tar gnutar gtar; do
1641        AM_RUN_LOG([$_am_tar --version]) && break
1642      done
1643      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1644      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1645      am__untar="$_am_tar -xf -"
1646      ;;
1647    plaintar)
1648      # Must skip GNU tar: if it does not support --format= it doesn't create
1649      # ustar tarball either.
1650      (tar --version) >/dev/null 2>&1 && continue
1651      am__tar='tar chf - "$$tardir"'
1652      am__tar_='tar chf - "$tardir"'
1653      am__untar='tar xf -'
1654      ;;
1655    pax)
1656      am__tar='pax -L -x $1 -w "$$tardir"'
1657      am__tar_='pax -L -x $1 -w "$tardir"'
1658      am__untar='pax -r'
1659      ;;
1660    cpio)
1661      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1662      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1663      am__untar='cpio -i -H $1 -d'
1664      ;;
1665    none)
1666      am__tar=false
1667      am__tar_=false
1668      am__untar=false
1669      ;;
1670    esac
1671
1672    # If the value was cached, stop now.  We just wanted to have am__tar
1673    # and am__untar set.
1674    test -n "${am_cv_prog_tar_$1}" && break
1675
1676    # tar/untar a dummy directory, and stop if the command works.
1677    rm -rf conftest.dir
1678    mkdir conftest.dir
1679    echo GrepMe > conftest.dir/file
1680    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1681    rm -rf conftest.dir
1682    if test -s conftest.tar; then
1683      AM_RUN_LOG([$am__untar <conftest.tar])
1684      AM_RUN_LOG([cat conftest.dir/file])
1685      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1686    fi
1687  done
1688  rm -rf conftest.dir
1689
1690  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1691  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1692
1693AC_SUBST([am__tar])
1694AC_SUBST([am__untar])
1695]) # _AM_PROG_TAR
1696
1697m4_include([m4/ags-docs-api.m4])
1698m4_include([m4/ags-docs-books.m4])
1699m4_include([m4/ags-listings.m4])
1700m4_include([m4/ags-marshallers.m4])
1701m4_include([m4/ags-potfiles.m4])
1702m4_include([m4/ags-symbols.m4])
1703m4_include([m4/gettext.m4])
1704m4_include([m4/gnulib-comp.m4])
1705m4_include([m4/iconv.m4])
1706m4_include([m4/intlmacosx.m4])
1707m4_include([m4/lib-ld.m4])
1708m4_include([m4/lib-link.m4])
1709m4_include([m4/lib-prefix.m4])
1710m4_include([m4/libtool.m4])
1711m4_include([m4/ltoptions.m4])
1712m4_include([m4/ltsugar.m4])
1713m4_include([m4/ltversion.m4])
1714m4_include([m4/lt~obsolete.m4])
1715m4_include([m4/nls.m4])
1716m4_include([m4/po.m4])
1717m4_include([m4/progtest.m4])
1718