Debian Codegraph @

aclocal.m4

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