1 # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 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'.])])
23 # po.m4 serial 24 (gettext-0.19)
24 dnl Copyright (C) 1995-2014, 2016 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.
29 dnl This file can be used in projects which are not available under
30 dnl the GNU General Public License or the GNU Library General Public
31 dnl License but which still want to provide support for the GNU gettext
33 dnl Please note that the actual code of the GNU gettext library is covered
34 dnl by the GNU Library 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.
39 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
40 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
44 dnl Checks for all prerequisites of the po subdirectory.
45 AC_DEFUN([AM_PO_SUBDIRS],
47 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
48 AC_REQUIRE([AC_PROG_INSTALL])dnl
49 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
50 AC_REQUIRE([AC_PROG_SED])dnl
51 AC_REQUIRE([AM_NLS])dnl
53 dnl Release version of the gettext macros. This is used to ensure that
54 dnl the gettext macros and po/Makefile.in.in are in sync.
55 AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
57 dnl Perform the following tests also if --disable-nls has been given,
58 dnl because they are needed for "make dist" to work.
60 dnl Search for GNU msgfmt in the PATH.
61 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
62 dnl The second test excludes FreeBSD msgfmt.
63 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
64 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
65 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
67 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
69 dnl Test whether it is GNU msgfmt >= 0.15.
71 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
72 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
73 *) MSGFMT_015=$MSGFMT ;;
76 AC_SUBST([MSGFMT_015])
78 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
79 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
80 *) GMSGFMT_015=$GMSGFMT ;;
83 AC_SUBST([GMSGFMT_015])
85 dnl Search for GNU xgettext 0.12 or newer in the PATH.
86 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
87 dnl The second test excludes FreeBSD xgettext.
88 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
89 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
90 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
92 dnl Remove leftover from FreeBSD xgettext call.
95 dnl Test whether it is GNU xgettext >= 0.15.
97 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
98 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
99 *) XGETTEXT_015=$XGETTEXT ;;
102 AC_SUBST([XGETTEXT_015])
104 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
105 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
106 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
108 dnl Installation directories.
109 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
110 dnl have to define it here, so that it can be used in po/Makefile.
111 test -n "$localedir" || localedir='${datadir}/locale'
112 AC_SUBST([localedir])
114 dnl Support for AM_XGETTEXT_OPTION.
115 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
116 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
118 AC_CONFIG_COMMANDS([po-directories], [[
119 for ac_file in $CONFIG_FILES; do
120 # Support "outfile[:infile[:infile...]]"
122 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
124 # PO directories have a Makefile.in generated from Makefile.in.in.
125 case "$ac_file" in */Makefile.in)
126 # Adjust a relative srcdir.
127 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
128 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
129 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
130 # In autoconf-2.13 it is called $ac_given_srcdir.
131 # In autoconf-2.50 it is called $srcdir.
132 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
133 case "$ac_given_srcdir" in
134 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
135 /*) top_srcdir="$ac_given_srcdir" ;;
136 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
138 # Treat a directory as a PO directory if and only if it has a
139 # POTFILES.in file. This allows packages to have multiple PO
140 # directories under different names or in different locations.
141 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
142 rm -f "$ac_dir/POTFILES"
143 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
145 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
146 POMAKEFILEDEPS="POTFILES.in"
147 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
148 # on $ac_dir but don't depend on user-specified configuration
150 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
151 # The LINGUAS file contains the set of available languages.
152 if test -n "$OBSOLETE_ALL_LINGUAS"; then
153 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
155 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
156 # Hide the ALL_LINGUAS assignment from automake < 1.5.
157 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
158 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
160 # The set of available languages was given in configure.in.
161 # Hide the ALL_LINGUAS assignment from automake < 1.5.
162 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
165 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
166 # Compute UPDATEPOFILES
167 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
168 # Compute DUMMYPOFILES
169 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
171 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
172 case "$ac_given_srcdir" in
174 *) srcdirpre='$(srcdir)/' ;;
180 for lang in $ALL_LINGUAS; do
181 POFILES="$POFILES $srcdirpre$lang.po"
182 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
183 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
184 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
186 # CATALOGS depends on both $ac_dir and the user's LINGUAS
187 # environment variable.
189 if test -n "$ALL_LINGUAS"; then
190 for presentlang in $ALL_LINGUAS; do
192 if test "%UNSET%" != "$LINGUAS"; then
193 desiredlanguages="$LINGUAS"
195 desiredlanguages="$ALL_LINGUAS"
197 for desiredlang in $desiredlanguages; do
198 # Use the presentlang catalog if desiredlang is
199 # a. equal to presentlang, or
200 # b. a variant of presentlang (because in this case,
201 # presentlang can be used as a fallback for messages
202 # which are not translated in the desiredlang catalog).
203 case "$desiredlang" in
204 "$presentlang"*) useit=yes;;
207 if test $useit = yes; then
208 INST_LINGUAS="$INST_LINGUAS $presentlang"
213 if test -n "$INST_LINGUAS"; then
214 for lang in $INST_LINGUAS; do
215 CATALOGS="$CATALOGS $lang.gmo"
218 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
219 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
220 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
221 if test -f "$f"; then
223 *.orig | *.bak | *~) ;;
224 *) cat "$f" >> "$ac_dir/Makefile" ;;
232 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
233 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
234 # from automake < 1.5.
235 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
236 # Capture the value of LINGUAS because we need it to compute CATALOGS.
237 LINGUAS="${LINGUAS-%UNSET%}"
241 dnl Postprocesses a Makefile in a directory containing PO files.
242 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
244 # When this code is run, in config.status, two variables have already been
246 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
247 # - LINGUAS is the value of the environment variable LINGUAS at configure
251 # Adjust a relative srcdir.
252 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
253 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
254 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
255 # In autoconf-2.13 it is called $ac_given_srcdir.
256 # In autoconf-2.50 it is called $srcdir.
257 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
258 case "$ac_given_srcdir" in
259 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
260 /*) top_srcdir="$ac_given_srcdir" ;;
261 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
264 # Find a way to echo strings without interpreting backslash.
265 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
268 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
269 gt_echo='printf %s\n'
280 # A sed script that extracts the value of VARIABLE from a Makefile.
283 # Test if the hold space is empty.
288 # Yes it was empty. Look if we have the expected variable definition.
289 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
290 # Seen the first line of the variable definition.
291 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
296 # Here we are processing a line from the variable definition.
297 # Remove comment, more precisely replace it with a space.
299 # See if the line ends in a backslash.
303 # Print the line, without the trailing backslash.
306 # There was no trailing backslash. The end of the variable definition is
307 # reached. Clear the hold space.
312 # A trailing backslash means that the variable definition continues in the
313 # next line. Put a nonempty string into the hold space to indicate this.
320 # Set POTFILES to the value of the Makefile variable POTFILES.
321 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
322 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
323 # Compute POTFILES_DEPS as
324 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
326 for file in $POTFILES; do
327 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
331 if test -n "$OBSOLETE_ALL_LINGUAS"; then
332 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
334 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
335 # The LINGUAS file contains the set of available languages.
336 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
337 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
339 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
340 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
341 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
343 # Hide the ALL_LINGUAS assignment from automake < 1.5.
344 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
346 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
347 # Compute UPDATEPOFILES
348 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
349 # Compute DUMMYPOFILES
350 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
352 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
353 # Compute PROPERTIESFILES
354 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
356 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
358 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
360 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
361 # Compute RESOURCESDLLFILES
362 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
363 case "$ac_given_srcdir" in
365 *) srcdirpre='$(srcdir)/' ;;
376 for lang in $ALL_LINGUAS; do
377 POFILES="$POFILES $srcdirpre$lang.po"
378 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
379 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
380 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
381 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
382 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
383 QMFILES="$QMFILES $srcdirpre$lang.qm"
384 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
385 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
386 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
387 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
389 # CATALOGS depends on both $ac_dir and the user's LINGUAS
390 # environment variable.
392 if test -n "$ALL_LINGUAS"; then
393 for presentlang in $ALL_LINGUAS; do
395 if test "%UNSET%" != "$LINGUAS"; then
396 desiredlanguages="$LINGUAS"
398 desiredlanguages="$ALL_LINGUAS"
400 for desiredlang in $desiredlanguages; do
401 # Use the presentlang catalog if desiredlang is
402 # a. equal to presentlang, or
403 # b. a variant of presentlang (because in this case,
404 # presentlang can be used as a fallback for messages
405 # which are not translated in the desiredlang catalog).
406 case "$desiredlang" in
407 "$presentlang"*) useit=yes;;
410 if test $useit = yes; then
411 INST_LINGUAS="$INST_LINGUAS $presentlang"
420 if test -n "$INST_LINGUAS"; then
421 for lang in $INST_LINGUAS; do
422 CATALOGS="$CATALOGS $lang.gmo"
423 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
424 QTCATALOGS="$QTCATALOGS $lang.qm"
425 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
426 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
427 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
428 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
432 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
434 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
435 # Add dependencies that cannot be formulated as a simple suffix rule.
436 for lang in $ALL_LINGUAS; do
437 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
438 cat >> "$ac_file.tmp" <<EOF
439 $frobbedlang.msg: $lang.po
440 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
441 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
445 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
446 # Add dependencies that cannot be formulated as a simple suffix rule.
447 for lang in $ALL_LINGUAS; do
448 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
449 cat >> "$ac_file.tmp" <<EOF
450 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
451 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
452 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
456 if test -n "$POMAKEFILEDEPS"; then
457 cat >> "$ac_file.tmp" <<EOF
458 Makefile: $POMAKEFILEDEPS
461 mv "$ac_file.tmp" "$ac_file"
464 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
465 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
467 XGETTEXT_EXTRA_OPTIONS=
470 dnl Registers an option to be passed to xgettext in the po subdirectory.
471 AC_DEFUN([AM_XGETTEXT_OPTION],
473 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
474 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
477 # Copyright (C) 2002-2017 Free Software Foundation, Inc.
479 # This file is free software; the Free Software Foundation
480 # gives unlimited permission to copy and/or distribute it,
481 # with or without modifications, as long as this notice is preserved.
483 # AM_AUTOMAKE_VERSION(VERSION)
484 # ----------------------------
485 # Automake X.Y traces this macro to ensure aclocal.m4 has been
486 # generated from the m4 files accompanying Automake X.Y.
487 # (This private macro should not be called outside this file.)
488 AC_DEFUN([AM_AUTOMAKE_VERSION],
489 [am__api_version='1.15'
490 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
491 dnl require some minimum version. Point them to the right macro.
492 m4_if([$1], [1.15.1], [],
493 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
496 # _AM_AUTOCONF_VERSION(VERSION)
497 # -----------------------------
498 # aclocal traces this macro to find the Autoconf version.
499 # This is a private macro too. Using m4_define simplifies
500 # the logic in aclocal, which can simply ignore this definition.
501 m4_define([_AM_AUTOCONF_VERSION], [])
503 # AM_SET_CURRENT_AUTOMAKE_VERSION
504 # -------------------------------
505 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
506 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
507 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
508 [AM_AUTOMAKE_VERSION([1.15.1])dnl
509 m4_ifndef([AC_AUTOCONF_VERSION],
510 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
511 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
513 # Copyright (C) 2011-2017 Free Software Foundation, Inc.
515 # This file is free software; the Free Software Foundation
516 # gives unlimited permission to copy and/or distribute it,
517 # with or without modifications, as long as this notice is preserved.
519 # AM_PROG_AR([ACT-IF-FAIL])
520 # -------------------------
521 # Try to determine the archiver interface, and trigger the ar-lib wrapper
522 # if it is needed. If the detection of archiver interface fails, run
523 # ACT-IF-FAIL (default is to abort configure with a proper error message).
524 AC_DEFUN([AM_PROG_AR],
525 [AC_BEFORE([$0], [LT_INIT])dnl
526 AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
527 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
528 AC_REQUIRE_AUX_FILE([ar-lib])dnl
529 AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
532 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
534 am_cv_ar_interface=ar
535 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
536 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
537 AC_TRY_EVAL([am_ar_try])
538 if test "$ac_status" -eq 0; then
539 am_cv_ar_interface=ar
541 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
542 AC_TRY_EVAL([am_ar_try])
543 if test "$ac_status" -eq 0; then
544 am_cv_ar_interface=lib
546 am_cv_ar_interface=unknown
549 rm -f conftest.lib libconftest.a
553 case $am_cv_ar_interface in
557 # Microsoft lib, so override with the ar-lib wrapper script.
558 # FIXME: It is wrong to rewrite AR.
559 # But if we don't then we get into trouble of one sort or another.
560 # A longer-term fix would be to have automake use am__AR in this case,
561 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
563 AR="$am_aux_dir/ar-lib $AR"
567 [AC_MSG_ERROR([could not determine $AR interface])])
573 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
575 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
577 # This file is free software; the Free Software Foundation
578 # gives unlimited permission to copy and/or distribute it,
579 # with or without modifications, as long as this notice is preserved.
581 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
582 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
583 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
585 # Of course, Automake must honor this variable whenever it calls a
586 # tool from the auxiliary directory. The problem is that $srcdir (and
587 # therefore $ac_aux_dir as well) can be either absolute or relative,
588 # depending on how configure is run. This is pretty annoying, since
589 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
590 # source directory, any form will work fine, but in subdirectories a
591 # relative path needs to be adjusted first.
593 # $ac_aux_dir/missing
594 # fails when called from a subdirectory if $ac_aux_dir is relative
595 # $top_srcdir/$ac_aux_dir/missing
596 # fails if $ac_aux_dir is absolute,
597 # fails when called from a subdirectory in a VPATH build with
598 # a relative $ac_aux_dir
600 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
601 # are both prefixed by $srcdir. In an in-source build this is usually
602 # harmless because $srcdir is '.', but things will broke when you
603 # start a VPATH build or use an absolute $srcdir.
605 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
606 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
607 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
608 # and then we would define $MISSING as
609 # MISSING="\${SHELL} $am_aux_dir/missing"
610 # This will work as long as MISSING is not called from configure, because
611 # unfortunately $(top_srcdir) has no meaning in configure.
612 # However there are other variables, like CC, which are often used in
613 # configure, and could therefore not use this "fixed" $ac_aux_dir.
615 # Another solution, used here, is to always expand $ac_aux_dir to an
616 # absolute PATH. The drawback is that using absolute paths prevent a
617 # configured tree to be moved without reconfiguration.
619 AC_DEFUN([AM_AUX_DIR_EXPAND],
620 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
621 # Expand $ac_aux_dir to an absolute path.
622 am_aux_dir=`cd "$ac_aux_dir" && pwd`
625 # AM_CONDITIONAL -*- Autoconf -*-
627 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
629 # This file is free software; the Free Software Foundation
630 # gives unlimited permission to copy and/or distribute it,
631 # with or without modifications, as long as this notice is preserved.
633 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
634 # -------------------------------------
635 # Define a conditional.
636 AC_DEFUN([AM_CONDITIONAL],
637 [AC_PREREQ([2.52])dnl
638 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
639 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
640 AC_SUBST([$1_TRUE])dnl
641 AC_SUBST([$1_FALSE])dnl
642 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
643 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
644 m4_define([_AM_COND_VALUE_$1], [$2])dnl
652 AC_CONFIG_COMMANDS_PRE(
653 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
654 AC_MSG_ERROR([[conditional "$1" was never defined.
655 Usually this means the macro was only invoked conditionally.]])
658 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
660 # This file is free software; the Free Software Foundation
661 # gives unlimited permission to copy and/or distribute it,
662 # with or without modifications, as long as this notice is preserved.
665 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
666 # written in clear, in which case automake, when reading aclocal.m4,
667 # will think it sees a *use*, and therefore will trigger all it's
668 # C support machinery. Also note that it means that autoscan, seeing
669 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
672 # _AM_DEPENDENCIES(NAME)
673 # ----------------------
674 # See how the compiler implements dependency checking.
675 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
676 # We try a few techniques and use that to set a single cache variable.
678 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
679 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
680 # dependency, and given that the user is not expected to run this macro,
681 # just rely on AC_PROG_CC.
682 AC_DEFUN([_AM_DEPENDENCIES],
683 [AC_REQUIRE([AM_SET_DEPDIR])dnl
684 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
685 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
686 AC_REQUIRE([AM_DEP_TRACK])dnl
688 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
689 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
690 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
691 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
692 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
693 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
694 [depcc="$$1" am_compiler_list=])
696 AC_CACHE_CHECK([dependency style of $depcc],
697 [am_cv_$1_dependencies_compiler_type],
698 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
699 # We make a subdir and do the tests there. Otherwise we can end up
700 # making bogus files that we don't know about and never remove. For
701 # instance it was reported that on HP-UX the gcc test will end up
702 # making a dummy file named 'D' -- because '-MD' means "put the output
706 # Copy depcomp to subdir because otherwise we won't find it if we're
707 # using a relative directory.
708 cp "$am_depcomp" conftest.dir
710 # We will build objects and dependencies in a subdirectory because
711 # it helps to detect inapplicable dependency modes. For instance
712 # both Tru64's cc and ICC support -MD to output dependencies as a
713 # side effect of compilation, but ICC will put the dependencies in
714 # the current directory while Tru64 will put them in the object
718 am_cv_$1_dependencies_compiler_type=none
719 if test "$am_compiler_list" = ""; then
720 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
724 [case " $depcc " in #(
725 *\ -arch\ *\ -arch\ *) am__universal=true ;;
728 [case " $depcc " in #(
729 *\ -arch\ *\ -arch\ *) am__universal=true ;;
732 for depmode in $am_compiler_list; do
733 # Setup a source with many dependencies, because some compilers
734 # like to wrap large dependency lists on column 80 (with \), and
735 # we should not choose a depcomp mode which is confused by this.
737 # We need to recreate these files for each test, as the compiler may
738 # overwrite some of them when testing with obscure command lines.
739 # This happens at least with the AIX C compiler.
741 for i in 1 2 3 4 5 6; do
742 echo '#include "conftst'$i'.h"' >> sub/conftest.c
743 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
744 # Solaris 10 /bin/sh.
745 echo '/* dummy */' > sub/conftst$i.h
747 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
749 # We check with '-c' and '-o' for the sake of the "dashmstdout"
750 # mode. It turns out that the SunPro C++ compiler does not properly
751 # handle '-M -o', and we need to detect this. Also, some Intel
752 # versions had trouble with output in subdirs.
753 am__obj=sub/conftest.${OBJEXT-o}
754 am__minus_obj="-o $am__obj"
757 # This depmode causes a compiler race in universal mode.
758 test "$am__universal" = false || continue
761 # After this tag, mechanisms are not by side-effect, so they'll
762 # only be used when explicitly requested.
763 if test "x$enable_dependency_tracking" = xyes; then
769 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
770 # This compiler won't grok '-c -o', but also, the minuso test has
771 # not run yet. These depmodes are late enough in the game, and
772 # so weak that their functioning should not be impacted.
773 am__obj=conftest.${OBJEXT-o}
778 if depmode=$depmode \
779 source=sub/conftest.c object=$am__obj \
780 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
781 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
782 >/dev/null 2>conftest.err &&
783 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
784 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
785 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
786 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
787 # icc doesn't choke on unknown options, it will just issue warnings
788 # or remarks (even with -Werror). So we grep stderr for any message
789 # that says an option was ignored or not supported.
790 # When given -MP, icc 7.0 and 7.1 complain thusly:
791 # icc: Command line warning: ignoring option '-M'; no argument required
792 # The diagnosis changed in icc 8.0:
793 # icc: Command line remark: option '-MP' not supported
794 if (grep 'ignoring option' conftest.err ||
795 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
796 am_cv_$1_dependencies_compiler_type=$depmode
805 am_cv_$1_dependencies_compiler_type=none
808 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
809 AM_CONDITIONAL([am__fastdep$1], [
810 test "x$enable_dependency_tracking" != xno \
811 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
817 # Choose a directory name for dependency files.
818 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
819 AC_DEFUN([AM_SET_DEPDIR],
820 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
821 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
827 AC_DEFUN([AM_DEP_TRACK],
828 [AC_ARG_ENABLE([dependency-tracking], [dnl
830 [--enable-dependency-tracking],
831 [do not reject slow dependency extractors])
833 [--disable-dependency-tracking],
834 [speeds up one-time build])])
835 if test "x$enable_dependency_tracking" != xno; then
836 am_depcomp="$ac_aux_dir/depcomp"
840 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
841 AC_SUBST([AMDEPBACKSLASH])dnl
842 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
843 AC_SUBST([am__nodep])dnl
844 _AM_SUBST_NOTMAKE([am__nodep])dnl
847 # Generate code to set up dependency tracking. -*- Autoconf -*-
849 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
851 # This file is free software; the Free Software Foundation
852 # gives unlimited permission to copy and/or distribute it,
853 # with or without modifications, as long as this notice is preserved.
856 # _AM_OUTPUT_DEPENDENCY_COMMANDS
857 # ------------------------------
858 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
860 # Older Autoconf quotes --file arguments for eval, but not when files
861 # are listed without --file. Let's play safe and only enable the eval
862 # if we detect the quoting.
863 case $CONFIG_FILES in
864 *\'*) eval set x "$CONFIG_FILES" ;;
865 *) set x $CONFIG_FILES ;;
870 # Strip MF so we end up with the name of the file.
871 mf=`echo "$mf" | sed -e 's/:.*$//'`
872 # Check whether this is an Automake generated Makefile or not.
873 # We used to match only the files named 'Makefile.in', but
874 # some people rename them; so instead we look at the file content.
875 # Grep'ing the first line is not enough: some people post-process
876 # each Makefile.in and add a new line on top of each file to say so.
877 # Grep'ing the whole file is not good either: AIX grep has a line
878 # limit of 2048, but all sed's we know have understand at least 4000.
879 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
880 dirpart=`AS_DIRNAME("$mf")`
884 # Extract the definition of DEPDIR, am__include, and am__quote
885 # from the Makefile without running 'make'.
886 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
887 test -z "$DEPDIR" && continue
888 am__include=`sed -n 's/^am__include = //p' < "$mf"`
889 test -z "$am__include" && continue
890 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
891 # Find all dependency output files, they are included files with
892 # $(DEPDIR) in their names. We invoke sed twice because it is the
893 # simplest approach to changing $(DEPDIR) to its actual value in the
895 for file in `sed -n "
896 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
897 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
898 # Make sure the directory exists.
899 test -f "$dirpart/$file" && continue
900 fdir=`AS_DIRNAME(["$file"])`
901 AS_MKDIR_P([$dirpart/$fdir])
902 # echo "creating $dirpart/$file"
903 echo '# dummy' > "$dirpart/$file"
907 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
910 # AM_OUTPUT_DEPENDENCY_COMMANDS
911 # -----------------------------
912 # This macro should only be invoked once -- use via AC_REQUIRE.
914 # This code is only required when automatic dependency tracking
915 # is enabled. FIXME. This creates each '.P' file that we will
916 # need in order to bootstrap the dependency handling code.
917 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
918 [AC_CONFIG_COMMANDS([depfiles],
919 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
920 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
923 # Do all the work for Automake. -*- Autoconf -*-
925 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
927 # This file is free software; the Free Software Foundation
928 # gives unlimited permission to copy and/or distribute it,
929 # with or without modifications, as long as this notice is preserved.
931 # This macro actually does too much. Some checks are only needed if
932 # your package does certain things. But this isn't really a big deal.
934 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
935 m4_define([AC_PROG_CC],
936 m4_defn([AC_PROG_CC])
940 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
941 # AM_INIT_AUTOMAKE([OPTIONS])
942 # -----------------------------------------------
943 # The call with PACKAGE and VERSION arguments is the old style
944 # call (pre autoconf-2.50), which is being phased out. PACKAGE
945 # and VERSION should now be passed to AC_INIT and removed from
946 # the call to AM_INIT_AUTOMAKE.
947 # We support both call styles for the transition. After
948 # the next Automake release, Autoconf can make the AC_INIT
949 # arguments mandatory, and then we can depend on a new Autoconf
950 # release and drop the old call support.
951 AC_DEFUN([AM_INIT_AUTOMAKE],
952 [AC_PREREQ([2.65])dnl
953 dnl Autoconf wants to disallow AM_ names. We explicitly allow
954 dnl the ones we care about.
955 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
956 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
957 AC_REQUIRE([AC_PROG_INSTALL])dnl
958 if test "`cd $srcdir && pwd`" != "`pwd`"; then
959 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
960 # is not polluted with repeated "-I."
961 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
962 # test to see if srcdir already configured
963 if test -f $srcdir/config.status; then
964 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
968 # test whether we have cygpath
969 if test -z "$CYGPATH_W"; then
970 if (cygpath --version) >/dev/null 2>/dev/null; then
971 CYGPATH_W='cygpath -w'
976 AC_SUBST([CYGPATH_W])
978 # Define the identity of the package.
979 dnl Distinguish between old-style and new-style calls.
981 [AC_DIAGNOSE([obsolete],
982 [$0: two- and three-arguments forms are deprecated.])
983 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
984 AC_SUBST([PACKAGE], [$1])dnl
985 AC_SUBST([VERSION], [$2])],
986 [_AM_SET_OPTIONS([$1])dnl
987 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
989 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
991 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
992 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
993 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
995 _AM_IF_OPTION([no-define],,
996 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
997 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
999 # Some tools Automake needs.
1000 AC_REQUIRE([AM_SANITY_CHECK])dnl
1001 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1002 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1003 AM_MISSING_PROG([AUTOCONF], [autoconf])
1004 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1005 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1006 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1007 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1008 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1009 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1010 # For better backward compatibility. To be removed once Automake 1.9.x
1011 # dies out for good. For more background, see:
1012 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1013 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1014 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1015 # We need awk for the "check" target (and possibly the TAP driver). The
1016 # system "awk" is bad on some platforms.
1017 AC_REQUIRE([AC_PROG_AWK])dnl
1018 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1019 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1020 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1021 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1022 [_AM_PROG_TAR([v7])])])
1023 _AM_IF_OPTION([no-dependencies],,
1024 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1025 [_AM_DEPENDENCIES([CC])],
1026 [m4_define([AC_PROG_CC],
1027 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1028 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1029 [_AM_DEPENDENCIES([CXX])],
1030 [m4_define([AC_PROG_CXX],
1031 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1032 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1033 [_AM_DEPENDENCIES([OBJC])],
1034 [m4_define([AC_PROG_OBJC],
1035 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1036 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1037 [_AM_DEPENDENCIES([OBJCXX])],
1038 [m4_define([AC_PROG_OBJCXX],
1039 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1041 AC_REQUIRE([AM_SILENT_RULES])dnl
1042 dnl The testsuite driver may need to know about EXEEXT, so add the
1043 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1044 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1045 AC_CONFIG_COMMANDS_PRE(dnl
1046 [m4_provide_if([_AM_COMPILER_EXEEXT],
1047 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1049 # POSIX will say in a future version that running "rm -f" with no argument
1050 # is OK; and we want to be able to make that assumption in our Makefile
1051 # recipes. So use an aggressive probe to check that the usage we want is
1052 # actually supported "in the wild" to an acceptable degree.
1053 # See automake bug#10828.
1054 # To make any issue more visible, cause the running configure to be aborted
1055 # by default if the 'rm' program in use doesn't match our expectations; the
1056 # user can still override this though.
1057 if rm -f && rm -fr && rm -rf; then : OK; else
1061 Your 'rm' program seems unable to run without file operands specified
1062 on the command line, even when the '-f' option is present. This is contrary
1063 to the behaviour of most rm programs out there, and not conforming with
1064 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1066 Please tell bug-automake@gnu.org about your system, including the value
1067 of your $PATH and any error possibly output before this message. This
1068 can help us improve future automake versions.
1071 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1072 echo 'Configuration will proceed anyway, since you have set the' >&2
1073 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1077 Aborting the configuration process, to ensure you take notice of the issue.
1079 You can download and install GNU coreutils to get an 'rm' implementation
1080 that behaves properly: <http://www.gnu.org/software/coreutils/>.
1082 If you want to complete the configuration process using your problematic
1083 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1084 to "yes", and re-run configure.
1087 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1090 dnl The trailing newline in this macro's definition is deliberate, for
1091 dnl backward compatibility and to allow trailing 'dnl'-style comments
1092 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1095 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1096 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1097 dnl mangled by Autoconf and run in a shell conditional statement.
1098 m4_define([_AC_COMPILER_EXEEXT],
1099 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1101 # When config.status generates a header, we must update the stamp-h file.
1102 # This file resides in the same directory as the config header
1103 # that is generated. The stamp files are numbered to have different names.
1105 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1106 # loop where config.status creates the headers, so we can generate
1107 # our stamp files there.
1108 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1109 [# Compute $1's index in $config_headers.
1112 for _am_header in $config_headers :; do
1114 $_am_arg | $_am_arg:* )
1117 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1120 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1122 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1124 # This file is free software; the Free Software Foundation
1125 # gives unlimited permission to copy and/or distribute it,
1126 # with or without modifications, as long as this notice is preserved.
1128 # AM_PROG_INSTALL_SH
1129 # ------------------
1130 # Define $install_sh.
1131 AC_DEFUN([AM_PROG_INSTALL_SH],
1132 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1133 if test x"${install_sh+set}" != xset; then
1136 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1138 install_sh="\${SHELL} $am_aux_dir/install-sh"
1141 AC_SUBST([install_sh])])
1143 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1146 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
1148 # This file is free software; the Free Software Foundation
1149 # gives unlimited permission to copy and/or distribute it,
1150 # with or without modifications, as long as this notice is preserved.
1152 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1153 # ----------------------------------
1154 # Control maintainer-specific portions of Makefiles.
1155 # Default is to disable them, unless 'enable' is passed literally.
1156 # For symmetry, 'disable' may be passed as well. Anyway, the user
1157 # can override the default with the --enable/--disable switch.
1158 AC_DEFUN([AM_MAINTAINER_MODE],
1159 [m4_case(m4_default([$1], [disable]),
1160 [enable], [m4_define([am_maintainer_other], [disable])],
1161 [disable], [m4_define([am_maintainer_other], [enable])],
1162 [m4_define([am_maintainer_other], [enable])
1163 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1164 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1165 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1166 AC_ARG_ENABLE([maintainer-mode],
1167 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1168 am_maintainer_other[ make rules and dependencies not useful
1169 (and sometimes confusing) to the casual installer])],
1170 [USE_MAINTAINER_MODE=$enableval],
1171 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1172 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1173 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1174 MAINT=$MAINTAINER_MODE_TRUE
1175 AC_SUBST([MAINT])dnl
1179 # Check to see how 'make' treats includes. -*- Autoconf -*-
1181 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1183 # This file is free software; the Free Software Foundation
1184 # gives unlimited permission to copy and/or distribute it,
1185 # with or without modifications, as long as this notice is preserved.
1189 # Check to see how make treats includes.
1190 AC_DEFUN([AM_MAKE_INCLUDE],
1191 [am_make=${MAKE-make}
1192 cat > confinc << 'END'
1194 @echo this is the am__doit target
1197 # If we don't find an include directive, just comment out the code.
1198 AC_MSG_CHECKING([for style of include used by $am_make])
1202 # First try GNU make style include.
1203 echo "include confinc" > confmf
1204 # Ignore all kinds of additional output from 'make'.
1205 case `$am_make -s -f confmf 2> /dev/null` in #(
1206 *the\ am__doit\ target*)
1212 # Now try BSD make style include.
1213 if test "$am__include" = "#"; then
1214 echo '.include "confinc"' > confmf
1215 case `$am_make -s -f confmf 2> /dev/null` in #(
1216 *the\ am__doit\ target*)
1217 am__include=.include
1223 AC_SUBST([am__include])
1224 AC_SUBST([am__quote])
1225 AC_MSG_RESULT([$_am_result])
1226 rm -f confinc confmf
1229 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1231 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
1233 # This file is free software; the Free Software Foundation
1234 # gives unlimited permission to copy and/or distribute it,
1235 # with or without modifications, as long as this notice is preserved.
1237 # AM_MISSING_PROG(NAME, PROGRAM)
1238 # ------------------------------
1239 AC_DEFUN([AM_MISSING_PROG],
1240 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1241 $1=${$1-"${am_missing_run}$2"}
1244 # AM_MISSING_HAS_RUN
1245 # ------------------
1246 # Define MISSING if not defined so far and test if it is modern enough.
1247 # If it is, set am_missing_run to use it, otherwise, to nothing.
1248 AC_DEFUN([AM_MISSING_HAS_RUN],
1249 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1250 AC_REQUIRE_AUX_FILE([missing])dnl
1251 if test x"${MISSING+set}" != xset; then
1254 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1256 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1259 # Use eval to expand $SHELL
1260 if eval "$MISSING --is-lightweight"; then
1261 am_missing_run="$MISSING "
1264 AC_MSG_WARN(['missing' script is too old or missing])
1269 # Obsolete and "removed" macros, that must however still report explicit
1270 # error messages when used, to smooth transition.
1272 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
1274 # This file is free software; the Free Software Foundation
1275 # gives unlimited permission to copy and/or distribute it,
1276 # with or without modifications, as long as this notice is preserved.
1278 AC_DEFUN([AM_CONFIG_HEADER],
1279 [AC_DIAGNOSE([obsolete],
1280 ['$0': this macro is obsolete.
1281 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
1282 AC_CONFIG_HEADERS($@)])
1284 AC_DEFUN([AM_PROG_CC_STDC],
1286 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
1287 AC_DIAGNOSE([obsolete],
1288 ['$0': this macro is obsolete.
1289 You should simply use the 'AC][_PROG_CC' macro instead.
1290 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
1291 but upon 'ac_cv_prog_cc_stdc'.])])
1293 AC_DEFUN([AM_C_PROTOTYPES],
1294 [AC_FATAL([automatic de-ANSI-fication support has been removed])])
1295 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
1297 # Helper functions for option handling. -*- Autoconf -*-
1299 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1301 # This file is free software; the Free Software Foundation
1302 # gives unlimited permission to copy and/or distribute it,
1303 # with or without modifications, as long as this notice is preserved.
1305 # _AM_MANGLE_OPTION(NAME)
1306 # -----------------------
1307 AC_DEFUN([_AM_MANGLE_OPTION],
1308 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1310 # _AM_SET_OPTION(NAME)
1311 # --------------------
1312 # Set option NAME. Presently that only means defining a flag for this option.
1313 AC_DEFUN([_AM_SET_OPTION],
1314 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1316 # _AM_SET_OPTIONS(OPTIONS)
1317 # ------------------------
1318 # OPTIONS is a space-separated list of Automake options.
1319 AC_DEFUN([_AM_SET_OPTIONS],
1320 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1322 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1323 # -------------------------------------------
1324 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1325 AC_DEFUN([_AM_IF_OPTION],
1326 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1328 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
1330 # This file is free software; the Free Software Foundation
1331 # gives unlimited permission to copy and/or distribute it,
1332 # with or without modifications, as long as this notice is preserved.
1336 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1337 # to automatically call this.
1338 AC_DEFUN([_AM_PROG_CC_C_O],
1339 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1340 AC_REQUIRE_AUX_FILE([compile])dnl
1341 AC_LANG_PUSH([C])dnl
1343 [whether $CC understands -c and -o together],
1344 [am_cv_prog_cc_c_o],
1345 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1346 # Make sure it works both with $CC and with simple cc.
1347 # Following AC_PROG_CC_C_O, we do the test twice because some
1348 # compilers refuse to overwrite an existing .o file with -o,
1349 # though they will create one.
1350 am_cv_prog_cc_c_o=yes
1352 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1353 && test -f conftest2.$ac_objext; then
1356 am_cv_prog_cc_c_o=no
1360 rm -f core conftest*
1362 if test "$am_cv_prog_cc_c_o" != yes; then
1363 # Losing compiler, so override with the script.
1364 # FIXME: It is wrong to rewrite CC.
1365 # But if we don't then we get into trouble of one sort or another.
1366 # A longer-term fix would be to have automake use am__CC in this case,
1367 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1368 CC="$am_aux_dir/compile $CC"
1372 # For backward compatibility.
1373 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1375 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1377 # This file is free software; the Free Software Foundation
1378 # gives unlimited permission to copy and/or distribute it,
1379 # with or without modifications, as long as this notice is preserved.
1381 # AM_RUN_LOG(COMMAND)
1382 # -------------------
1383 # Run COMMAND, save the exit status in ac_status, and log it.
1384 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1385 AC_DEFUN([AM_RUN_LOG],
1386 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1387 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1389 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1390 (exit $ac_status); }])
1392 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1394 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
1396 # This file is free software; the Free Software Foundation
1397 # gives unlimited permission to copy and/or distribute it,
1398 # with or without modifications, as long as this notice is preserved.
1402 AC_DEFUN([AM_SANITY_CHECK],
1403 [AC_MSG_CHECKING([whether build environment is sane])
1404 # Reject unsafe characters in $srcdir or the absolute working directory
1405 # name. Accept space and tab only in the latter.
1409 *[[\\\"\#\$\&\'\`$am_lf]]*)
1410 AC_MSG_ERROR([unsafe absolute working directory name]);;
1413 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1414 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1417 # Do 'set' in a subshell so we don't clobber the current shell's
1418 # arguments. Must try -L first in case configure is actually a
1419 # symlink; some systems play weird games with the mod time of symlinks
1420 # (eg FreeBSD returns the mod time of the symlink's containing
1424 for am_try in 1 2; do
1425 echo "timestamp, slept: $am_has_slept" > conftest.file
1426 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1427 if test "$[*]" = "X"; then
1429 set X `ls -t "$srcdir/configure" conftest.file`
1431 if test "$[*]" != "X $srcdir/configure conftest.file" \
1432 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1434 # If neither matched, then we have a broken ls. This can happen
1435 # if, for instance, CONFIG_SHELL is bash and it inherits a
1436 # broken ls alias from the environment. This has actually
1437 # happened. Such a system could not be considered "sane".
1438 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1439 alias in your environment])
1441 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1448 test "$[2]" = conftest.file
1454 AC_MSG_ERROR([newly created file is older than distributed files!
1455 Check your system clock])
1457 AC_MSG_RESULT([yes])
1458 # If we didn't sleep, we still need to ensure time stamps of config.status and
1459 # generated files are strictly newer.
1461 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1465 AC_CONFIG_COMMANDS_PRE(
1466 [AC_MSG_CHECKING([that generated files are newer than configure])
1467 if test -n "$am_sleep_pid"; then
1468 # Hide warnings about reused PIDs.
1469 wait $am_sleep_pid 2>/dev/null
1471 AC_MSG_RESULT([done])])
1475 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
1477 # This file is free software; the Free Software Foundation
1478 # gives unlimited permission to copy and/or distribute it,
1479 # with or without modifications, as long as this notice is preserved.
1481 # AM_SILENT_RULES([DEFAULT])
1482 # --------------------------
1483 # Enable less verbose build rules; with the default set to DEFAULT
1484 # ("yes" being less verbose, "no" or empty being verbose).
1485 AC_DEFUN([AM_SILENT_RULES],
1486 [AC_ARG_ENABLE([silent-rules], [dnl
1488 [--enable-silent-rules],
1489 [less verbose build output (undo: "make V=1")])
1491 [--disable-silent-rules],
1492 [verbose build output (undo: "make V=0")])dnl
1494 case $enable_silent_rules in @%:@ (((
1495 yes) AM_DEFAULT_VERBOSITY=0;;
1496 no) AM_DEFAULT_VERBOSITY=1;;
1497 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1500 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1501 dnl do not support nested variable expansions.
1502 dnl See automake bug#9928 and bug#10237.
1503 am_make=${MAKE-make}
1504 AC_CACHE_CHECK([whether $am_make supports nested variables],
1505 [am_cv_make_support_nested_variables],
1506 [if AS_ECHO([['TRUE=$(BAR$(V))
1512 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1513 am_cv_make_support_nested_variables=yes
1515 am_cv_make_support_nested_variables=no
1517 if test $am_cv_make_support_nested_variables = yes; then
1518 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1520 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1522 AM_V=$AM_DEFAULT_VERBOSITY
1523 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1526 AM_SUBST_NOTMAKE([AM_V])dnl
1527 AC_SUBST([AM_DEFAULT_V])dnl
1528 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1529 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1531 AC_SUBST([AM_BACKSLASH])dnl
1532 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1535 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1537 # This file is free software; the Free Software Foundation
1538 # gives unlimited permission to copy and/or distribute it,
1539 # with or without modifications, as long as this notice is preserved.
1541 # AM_PROG_INSTALL_STRIP
1542 # ---------------------
1543 # One issue with vendor 'install' (even GNU) is that you can't
1544 # specify the program used to strip binaries. This is especially
1545 # annoying in cross-compiling environments, where the build's strip
1546 # is unlikely to handle the host's binaries.
1547 # Fortunately install-sh will honor a STRIPPROG variable, so we
1548 # always use install-sh in "make install-strip", and initialize
1549 # STRIPPROG with the value of the STRIP variable (set by the user).
1550 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1551 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1552 # Installed binaries are usually stripped using 'strip' when the user
1553 # run "make install-strip". However 'strip' might not be the right
1554 # tool to use in cross-compilation environments, therefore Automake
1555 # will honor the 'STRIP' environment variable to overrule this program.
1556 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1557 if test "$cross_compiling" != no; then
1558 AC_CHECK_TOOL([STRIP], [strip], :)
1560 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1561 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1563 # Copyright (C) 2006-2017 Free Software Foundation, Inc.
1565 # This file is free software; the Free Software Foundation
1566 # gives unlimited permission to copy and/or distribute it,
1567 # with or without modifications, as long as this notice is preserved.
1569 # _AM_SUBST_NOTMAKE(VARIABLE)
1570 # ---------------------------
1571 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1572 # This macro is traced by Automake.
1573 AC_DEFUN([_AM_SUBST_NOTMAKE])
1575 # AM_SUBST_NOTMAKE(VARIABLE)
1576 # --------------------------
1577 # Public sister of _AM_SUBST_NOTMAKE.
1578 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1580 # Check how to create a tarball. -*- Autoconf -*-
1582 # Copyright (C) 2004-2017 Free Software Foundation, Inc.
1584 # This file is free software; the Free Software Foundation
1585 # gives unlimited permission to copy and/or distribute it,
1586 # with or without modifications, as long as this notice is preserved.
1588 # _AM_PROG_TAR(FORMAT)
1589 # --------------------
1590 # Check how to create a tarball in format FORMAT.
1591 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1593 # Substitute a variable $(am__tar) that is a command
1594 # writing to stdout a FORMAT-tarball containing the directory
1596 # tardir=directory && $(am__tar) > result.tar
1598 # Substitute a variable $(am__untar) that extract such
1599 # a tarball read from stdin.
1600 # $(am__untar) < result.tar
1602 AC_DEFUN([_AM_PROG_TAR],
1603 [# Always define AMTAR for backward compatibility. Yes, it's still used
1604 # in the wild :-( We should find a proper way to deprecate it ...
1605 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1607 # We'll loop over all known methods to create a tar archive until one works.
1608 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1611 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1615 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1616 # There is notably a 21 bits limit for the UID and the GID. In fact,
1617 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1619 am_max_uid=2097151 # 2^21 - 1
1620 am_max_gid=$am_max_uid
1621 # The $UID and $GID variables are not portable, so we need to resort
1622 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1623 # below are definitely unexpected, so allow the users to see them
1624 # (that is, avoid stderr redirection).
1625 am_uid=`id -u || echo unknown`
1626 am_gid=`id -g || echo unknown`
1627 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1628 if test $am_uid -le $am_max_uid; then
1629 AC_MSG_RESULT([yes])
1634 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1635 if test $am_gid -le $am_max_gid; then
1636 AC_MSG_RESULT([yes])
1645 [m4_fatal([Unknown tar format])])
1647 AC_MSG_CHECKING([how to create a $1 tar archive])
1649 # Go ahead even if we have the value already cached. We do so because we
1650 # need to set the values for the 'am__tar' and 'am__untar' variables.
1651 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1653 for _am_tool in $_am_tools; do
1656 for _am_tar in tar gnutar gtar; do
1657 AM_RUN_LOG([$_am_tar --version]) && break
1659 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1660 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1661 am__untar="$_am_tar -xf -"
1664 # Must skip GNU tar: if it does not support --format= it doesn't create
1665 # ustar tarball either.
1666 (tar --version) >/dev/null 2>&1 && continue
1667 am__tar='tar chf - "$$tardir"'
1668 am__tar_='tar chf - "$tardir"'
1669 am__untar='tar xf -'
1672 am__tar='pax -L -x $1 -w "$$tardir"'
1673 am__tar_='pax -L -x $1 -w "$tardir"'
1677 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1678 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1679 am__untar='cpio -i -H $1 -d'
1688 # If the value was cached, stop now. We just wanted to have am__tar
1689 # and am__untar set.
1690 test -n "${am_cv_prog_tar_$1}" && break
1692 # tar/untar a dummy directory, and stop if the command works.
1695 echo GrepMe > conftest.dir/file
1696 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1698 if test -s conftest.tar; then
1699 AM_RUN_LOG([$am__untar <conftest.tar])
1700 AM_RUN_LOG([cat conftest.dir/file])
1701 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1706 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1707 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1710 AC_SUBST([am__untar])
1713 m4_include([../config/depstand.m4])
1714 m4_include([../config/largefile.m4])
1715 m4_include([../config/lead-dot.m4])
1716 m4_include([../config/override.m4])
1717 m4_include([../config/plugins.m4])
1718 m4_include([import/m4/00gnulib.m4])
1719 m4_include([import/m4/absolute-header.m4])
1720 m4_include([import/m4/alloca.m4])
1721 m4_include([import/m4/arpa_inet_h.m4])
1722 m4_include([import/m4/canonicalize.m4])
1723 m4_include([import/m4/chdir-long.m4])
1724 m4_include([import/m4/close.m4])
1725 m4_include([import/m4/closedir.m4])
1726 m4_include([import/m4/codeset.m4])
1727 m4_include([import/m4/configmake.m4])
1728 m4_include([import/m4/d-ino.m4])
1729 m4_include([import/m4/d-type.m4])
1730 m4_include([import/m4/dirent_h.m4])
1731 m4_include([import/m4/dirfd.m4])
1732 m4_include([import/m4/dirname.m4])
1733 m4_include([import/m4/double-slash-root.m4])
1734 m4_include([import/m4/dup.m4])
1735 m4_include([import/m4/dup2.m4])
1736 m4_include([import/m4/eealloc.m4])
1737 m4_include([import/m4/environ.m4])
1738 m4_include([import/m4/errno_h.m4])
1739 m4_include([import/m4/error.m4])
1740 m4_include([import/m4/exponentd.m4])
1741 m4_include([import/m4/exponentl.m4])
1742 m4_include([import/m4/extensions.m4])
1743 m4_include([import/m4/extern-inline.m4])
1744 m4_include([import/m4/fchdir.m4])
1745 m4_include([import/m4/fcntl-o.m4])
1746 m4_include([import/m4/fcntl.m4])
1747 m4_include([import/m4/fcntl_h.m4])
1748 m4_include([import/m4/fdopendir.m4])
1749 m4_include([import/m4/filenamecat.m4])
1750 m4_include([import/m4/flexmember.m4])
1751 m4_include([import/m4/float_h.m4])
1752 m4_include([import/m4/fnmatch.m4])
1753 m4_include([import/m4/fpieee.m4])
1754 m4_include([import/m4/frexp.m4])
1755 m4_include([import/m4/frexpl.m4])
1756 m4_include([import/m4/fstat.m4])
1757 m4_include([import/m4/fstatat.m4])
1758 m4_include([import/m4/getcwd-abort-bug.m4])
1759 m4_include([import/m4/getcwd-path-max.m4])
1760 m4_include([import/m4/getcwd.m4])
1761 m4_include([import/m4/getdtablesize.m4])
1762 m4_include([import/m4/getlogin_r.m4])
1763 m4_include([import/m4/getprogname.m4])
1764 m4_include([import/m4/gettimeofday.m4])
1765 m4_include([import/m4/glibc21.m4])
1766 m4_include([import/m4/glob.m4])
1767 m4_include([import/m4/gnulib-common.m4])
1768 m4_include([import/m4/gnulib-comp.m4])
1769 m4_include([import/m4/hard-locale.m4])
1770 m4_include([import/m4/include_next.m4])
1771 m4_include([import/m4/inet_ntop.m4])
1772 m4_include([import/m4/inttypes-pri.m4])
1773 m4_include([import/m4/inttypes.m4])
1774 m4_include([import/m4/isnand.m4])
1775 m4_include([import/m4/isnanl.m4])
1776 m4_include([import/m4/largefile.m4])
1777 m4_include([import/m4/limits-h.m4])
1778 m4_include([import/m4/localcharset.m4])
1779 m4_include([import/m4/locale-fr.m4])
1780 m4_include([import/m4/locale-ja.m4])
1781 m4_include([import/m4/locale-zh.m4])
1782 m4_include([import/m4/longlong.m4])
1783 m4_include([import/m4/lstat.m4])
1784 m4_include([import/m4/malloc.m4])
1785 m4_include([import/m4/malloca.m4])
1786 m4_include([import/m4/math_h.m4])
1787 m4_include([import/m4/mbrtowc.m4])
1788 m4_include([import/m4/mbsinit.m4])
1789 m4_include([import/m4/mbsrtowcs.m4])
1790 m4_include([import/m4/mbstate_t.m4])
1791 m4_include([import/m4/memchr.m4])
1792 m4_include([import/m4/memmem.m4])
1793 m4_include([import/m4/mempcpy.m4])
1794 m4_include([import/m4/memrchr.m4])
1795 m4_include([import/m4/mkdir.m4])
1796 m4_include([import/m4/mkdtemp.m4])
1797 m4_include([import/m4/mkostemp.m4])
1798 m4_include([import/m4/mmap-anon.m4])
1799 m4_include([import/m4/mode_t.m4])
1800 m4_include([import/m4/msvc-inval.m4])
1801 m4_include([import/m4/msvc-nothrow.m4])
1802 m4_include([import/m4/multiarch.m4])
1803 m4_include([import/m4/netinet_in_h.m4])
1804 m4_include([import/m4/nocrash.m4])
1805 m4_include([import/m4/off_t.m4])
1806 m4_include([import/m4/onceonly.m4])
1807 m4_include([import/m4/open.m4])
1808 m4_include([import/m4/openat.m4])
1809 m4_include([import/m4/opendir.m4])
1810 m4_include([import/m4/pathmax.m4])
1811 m4_include([import/m4/rawmemchr.m4])
1812 m4_include([import/m4/readdir.m4])
1813 m4_include([import/m4/readlink.m4])
1814 m4_include([import/m4/realloc.m4])
1815 m4_include([import/m4/rename.m4])
1816 m4_include([import/m4/rewinddir.m4])
1817 m4_include([import/m4/rmdir.m4])
1818 m4_include([import/m4/save-cwd.m4])
1819 m4_include([import/m4/secure_getenv.m4])
1820 m4_include([import/m4/setenv.m4])
1821 m4_include([import/m4/signal_h.m4])
1822 m4_include([import/m4/socklen.m4])
1823 m4_include([import/m4/sockpfaf.m4])
1824 m4_include([import/m4/ssize_t.m4])
1825 m4_include([import/m4/stat.m4])
1826 m4_include([import/m4/stdalign.m4])
1827 m4_include([import/m4/stdbool.m4])
1828 m4_include([import/m4/stddef_h.m4])
1829 m4_include([import/m4/stdint.m4])
1830 m4_include([import/m4/stdio_h.m4])
1831 m4_include([import/m4/stdlib_h.m4])
1832 m4_include([import/m4/strchrnul.m4])
1833 m4_include([import/m4/strdup.m4])
1834 m4_include([import/m4/strerror.m4])
1835 m4_include([import/m4/string_h.m4])
1836 m4_include([import/m4/strstr.m4])
1837 m4_include([import/m4/strtok_r.m4])
1838 m4_include([import/m4/sys_socket_h.m4])
1839 m4_include([import/m4/sys_stat_h.m4])
1840 m4_include([import/m4/sys_time_h.m4])
1841 m4_include([import/m4/sys_types_h.m4])
1842 m4_include([import/m4/sys_uio_h.m4])
1843 m4_include([import/m4/tempname.m4])
1844 m4_include([import/m4/time_h.m4])
1845 m4_include([import/m4/unistd-safer.m4])
1846 m4_include([import/m4/unistd_h.m4])
1847 m4_include([import/m4/warn-on-use.m4])
1848 m4_include([import/m4/wchar_h.m4])
1849 m4_include([import/m4/wchar_t.m4])
1850 m4_include([import/m4/wctype_h.m4])
1851 m4_include([import/m4/wint_t.m4])