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