1# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
2
3# Copyright (C) 1996-2020 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# appstream-xml.m4
24#
25# serial 6
26
27dnl APPSTREAM_XML
28dnl Installs and validates AppData XML files.
29dnl
30dnl Call APPSTREAM_XML in configure.ac to check for the appstream-util tool.
31dnl Add @APPSTREAM_XML_RULES@ to a Makefile.am to substitute the make rules. Add
32dnl .appdata.xml files to appstream_XML in Makefile.am and they will be validated
33dnl at make check time, if appstream-util is installed, as well as installed
34dnl to the correct location automatically. Add --enable-appstream-util to
35dnl AM_DISTCHECK_CONFIGURE_FLAGS in Makefile.am to require valid AppData XML when
36dnl doing a distcheck.
37dnl
38dnl Adding files to appstream_XML does not distribute them automatically.
39
40AC_DEFUN([APPSTREAM_XML],
41[
42  m4_pattern_allow([AM_V_GEN])
43  AC_ARG_ENABLE([appstream-util],
44                [AS_HELP_STRING([--disable-appstream-util],
45                                [Disable validating AppData XML files during check phase])])
46
47  AS_IF([test "x$enable_appstream_validate" != "xno"],
48        [AC_PATH_PROG([APPSTREAM_UTIL], [appstream-util])
49         AS_IF([test "x$APPSTREAM_UTIL" = "x"],
50               [have_appstream_validate=no],
51               [have_appstream_validate=yes
52                AC_SUBST([APPSTREAM_UTIL])])],
53        [have_appstream_validate=no])
54
55  AS_IF([test "x$have_appstream_validate" != "xno"],
56        [appstream_validate=yes],
57        [appstream_validate=no
58         AS_IF([test "x$enable_appstream_validate" = "xyes"],
59               [AC_MSG_ERROR([AppData validation was requested but appstream-util was not found])])])
60
61  AC_SUBST([appstreamxmldir], [${datadir}/metainfo])
62
63  APPSTREAM_XML_RULES='
64.PHONY : uninstall-appstream-xml install-appstream-xml clean-appstream-xml
65
66mostlyclean-am: clean-appstream-xml
67
68%.appdata.valid: %.appdata.xml
69	$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; \
70		if test -n "$(APPSTREAM_UTIL)"; \
71			then $(APPSTREAM_UTIL) --nonet validate $${d}$<; fi \
72		&& touch [$]@
73
74check-am: $(appstream_XML:.appdata.xml=.appdata.valid)
75uninstall-am: uninstall-appstream-xml
76install-data-am: install-appstream-xml
77
78.SECONDARY: $(appstream_XML)
79
80install-appstream-xml: $(appstream_XML)
81	@$(NORMAL_INSTALL)
82	if test -n "$^"; then \
83		test -z "$(appstreamxmldir)" || $(MKDIR_P) "$(DESTDIR)$(appstreamxmldir)"; \
84		$(INSTALL_DATA) $^ "$(DESTDIR)$(appstreamxmldir)"; \
85	fi
86
87uninstall-appstream-xml:
88	@$(NORMAL_UNINSTALL)
89	@list='\''$(appstream_XML)'\''; test -n "$(appstreamxmldir)" || list=; \
90	files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
91	test -n "$$files" || exit 0; \
92	echo " ( cd '\''$(DESTDIR)$(appstreamxmldir)'\'' && rm -f" $$files ")"; \
93	cd "$(DESTDIR)$(appstreamxmldir)" && rm -f $$files
94
95clean-appstream-xml:
96	rm -f $(appstream_XML:.appdata.xml=.appdata.valid)
97'
98  _APPSTREAM_XML_SUBST(APPSTREAM_XML_RULES)
99])
100
101dnl _APPSTREAM_XML_SUBST(VARIABLE)
102dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
103AC_DEFUN([_APPSTREAM_XML_SUBST],
104[
105AC_SUBST([$1])
106m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
107]
108)
109
110# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
111# serial 12 (pkg-config-0.29.2)
112
113dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
114dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
115dnl
116dnl This program is free software; you can redistribute it and/or modify
117dnl it under the terms of the GNU General Public License as published by
118dnl the Free Software Foundation; either version 2 of the License, or
119dnl (at your option) any later version.
120dnl
121dnl This program is distributed in the hope that it will be useful, but
122dnl WITHOUT ANY WARRANTY; without even the implied warranty of
123dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
124dnl General Public License for more details.
125dnl
126dnl You should have received a copy of the GNU General Public License
127dnl along with this program; if not, write to the Free Software
128dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
129dnl 02111-1307, USA.
130dnl
131dnl As a special exception to the GNU General Public License, if you
132dnl distribute this file as part of a program that contains a
133dnl configuration script generated by Autoconf, you may include it under
134dnl the same distribution terms that you use for the rest of that
135dnl program.
136
137dnl PKG_PREREQ(MIN-VERSION)
138dnl -----------------------
139dnl Since: 0.29
140dnl
141dnl Verify that the version of the pkg-config macros are at least
142dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
143dnl installed version of pkg-config, this checks the developer's version
144dnl of pkg.m4 when generating configure.
145dnl
146dnl To ensure that this macro is defined, also add:
147dnl m4_ifndef([PKG_PREREQ],
148dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
149dnl
150dnl See the "Since" comment for each macro you use to see what version
151dnl of the macros you require.
152m4_defun([PKG_PREREQ],
153[m4_define([PKG_MACROS_VERSION], [0.29.2])
154m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
155    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
156])dnl PKG_PREREQ
157
158dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
159dnl ----------------------------------
160dnl Since: 0.16
161dnl
162dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
163dnl first found in the path. Checks that the version of pkg-config found
164dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
165dnl used since that's the first version where most current features of
166dnl pkg-config existed.
167AC_DEFUN([PKG_PROG_PKG_CONFIG],
168[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
169m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
170m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
171AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
172AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
173AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
174
175if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
176	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
177fi
178if test -n "$PKG_CONFIG"; then
179	_pkg_min_version=m4_default([$1], [0.9.0])
180	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
181	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
182		AC_MSG_RESULT([yes])
183	else
184		AC_MSG_RESULT([no])
185		PKG_CONFIG=""
186	fi
187fi[]dnl
188])dnl PKG_PROG_PKG_CONFIG
189
190dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
191dnl -------------------------------------------------------------------
192dnl Since: 0.18
193dnl
194dnl Check to see whether a particular set of modules exists. Similar to
195dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
196dnl
197dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
198dnl only at the first occurence in configure.ac, so if the first place
199dnl it's called might be skipped (such as if it is within an "if", you
200dnl have to call PKG_CHECK_EXISTS manually
201AC_DEFUN([PKG_CHECK_EXISTS],
202[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
203if test -n "$PKG_CONFIG" && \
204    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
205  m4_default([$2], [:])
206m4_ifvaln([$3], [else
207  $3])dnl
208fi])
209
210dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
211dnl ---------------------------------------------
212dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
213dnl pkg_failed based on the result.
214m4_define([_PKG_CONFIG],
215[if test -n "$$1"; then
216    pkg_cv_[]$1="$$1"
217 elif test -n "$PKG_CONFIG"; then
218    PKG_CHECK_EXISTS([$3],
219                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
220		      test "x$?" != "x0" && pkg_failed=yes ],
221		     [pkg_failed=yes])
222 else
223    pkg_failed=untried
224fi[]dnl
225])dnl _PKG_CONFIG
226
227dnl _PKG_SHORT_ERRORS_SUPPORTED
228dnl ---------------------------
229dnl Internal check to see if pkg-config supports short errors.
230AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
231[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
232if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
233        _pkg_short_errors_supported=yes
234else
235        _pkg_short_errors_supported=no
236fi[]dnl
237])dnl _PKG_SHORT_ERRORS_SUPPORTED
238
239
240dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
241dnl   [ACTION-IF-NOT-FOUND])
242dnl --------------------------------------------------------------
243dnl Since: 0.4.0
244dnl
245dnl Note that if there is a possibility the first call to
246dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
247dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
248AC_DEFUN([PKG_CHECK_MODULES],
249[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
250AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
251AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
252
253pkg_failed=no
254AC_MSG_CHECKING([for $2])
255
256_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
257_PKG_CONFIG([$1][_LIBS], [libs], [$2])
258
259m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
260and $1[]_LIBS to avoid the need to call pkg-config.
261See the pkg-config man page for more details.])
262
263if test $pkg_failed = yes; then
264        AC_MSG_RESULT([no])
265        _PKG_SHORT_ERRORS_SUPPORTED
266        if test $_pkg_short_errors_supported = yes; then
267	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
268        else
269	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
270        fi
271	# Put the nasty error message in config.log where it belongs
272	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
273
274	m4_default([$4], [AC_MSG_ERROR(
275[Package requirements ($2) were not met:
276
277$$1_PKG_ERRORS
278
279Consider adjusting the PKG_CONFIG_PATH environment variable if you
280installed software in a non-standard prefix.
281
282_PKG_TEXT])[]dnl
283        ])
284elif test $pkg_failed = untried; then
285        AC_MSG_RESULT([no])
286	m4_default([$4], [AC_MSG_FAILURE(
287[The pkg-config script could not be found or is too old.  Make sure it
288is in your PATH or set the PKG_CONFIG environment variable to the full
289path to pkg-config.
290
291_PKG_TEXT
292
293To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
294        ])
295else
296	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
297	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
298        AC_MSG_RESULT([yes])
299	$3
300fi[]dnl
301])dnl PKG_CHECK_MODULES
302
303
304dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
305dnl   [ACTION-IF-NOT-FOUND])
306dnl ---------------------------------------------------------------------
307dnl Since: 0.29
308dnl
309dnl Checks for existence of MODULES and gathers its build flags with
310dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
311dnl and VARIABLE-PREFIX_LIBS from --libs.
312dnl
313dnl Note that if there is a possibility the first call to
314dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
315dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
316dnl configure.ac.
317AC_DEFUN([PKG_CHECK_MODULES_STATIC],
318[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
319_save_PKG_CONFIG=$PKG_CONFIG
320PKG_CONFIG="$PKG_CONFIG --static"
321PKG_CHECK_MODULES($@)
322PKG_CONFIG=$_save_PKG_CONFIG[]dnl
323])dnl PKG_CHECK_MODULES_STATIC
324
325
326dnl PKG_INSTALLDIR([DIRECTORY])
327dnl -------------------------
328dnl Since: 0.27
329dnl
330dnl Substitutes the variable pkgconfigdir as the location where a module
331dnl should install pkg-config .pc files. By default the directory is
332dnl $libdir/pkgconfig, but the default can be changed by passing
333dnl DIRECTORY. The user can override through the --with-pkgconfigdir
334dnl parameter.
335AC_DEFUN([PKG_INSTALLDIR],
336[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
337m4_pushdef([pkg_description],
338    [pkg-config installation directory @<:@]pkg_default[@:>@])
339AC_ARG_WITH([pkgconfigdir],
340    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
341    [with_pkgconfigdir=]pkg_default)
342AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
343m4_popdef([pkg_default])
344m4_popdef([pkg_description])
345])dnl PKG_INSTALLDIR
346
347
348dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
349dnl --------------------------------
350dnl Since: 0.27
351dnl
352dnl Substitutes the variable noarch_pkgconfigdir as the location where a
353dnl module should install arch-independent pkg-config .pc files. By
354dnl default the directory is $datadir/pkgconfig, but the default can be
355dnl changed by passing DIRECTORY. The user can override through the
356dnl --with-noarch-pkgconfigdir parameter.
357AC_DEFUN([PKG_NOARCH_INSTALLDIR],
358[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
359m4_pushdef([pkg_description],
360    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
361AC_ARG_WITH([noarch-pkgconfigdir],
362    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
363    [with_noarch_pkgconfigdir=]pkg_default)
364AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
365m4_popdef([pkg_default])
366m4_popdef([pkg_description])
367])dnl PKG_NOARCH_INSTALLDIR
368
369
370dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
371dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
372dnl -------------------------------------------
373dnl Since: 0.28
374dnl
375dnl Retrieves the value of the pkg-config variable for the given module.
376AC_DEFUN([PKG_CHECK_VAR],
377[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
378AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
379
380_PKG_CONFIG([$1], [variable="][$3]["], [$2])
381AS_VAR_COPY([$1], [pkg_cv_][$1])
382
383AS_VAR_IF([$1], [""], [$5], [$4])dnl
384])dnl PKG_CHECK_VAR
385
386# gettext.m4 serial 68 (gettext-0.19.8)
387dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
388dnl This file is free software; the Free Software Foundation
389dnl gives unlimited permission to copy and/or distribute it,
390dnl with or without modifications, as long as this notice is preserved.
391dnl
392dnl This file can be used in projects which are not available under
393dnl the GNU General Public License or the GNU Library General Public
394dnl License but which still want to provide support for the GNU gettext
395dnl functionality.
396dnl Please note that the actual code of the GNU gettext library is covered
397dnl by the GNU Library General Public License, and the rest of the GNU
398dnl gettext package is covered by the GNU General Public License.
399dnl They are *not* in the public domain.
400
401dnl Authors:
402dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
403dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
404
405dnl Macro to add for using GNU gettext.
406
407dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
408dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
409dnl    default (if it is not specified or empty) is 'no-libtool'.
410dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
411dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
412dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
413dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
414dnl    depending on --{enable,disable}-{shared,static} and on the presence of
415dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
416dnl    $(top_builddir)/intl/libintl.a will be created.
417dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
418dnl    implementations (in libc or libintl) without the ngettext() function
419dnl    will be ignored.  If NEEDSYMBOL is specified and is
420dnl    'need-formatstring-macros', then GNU gettext implementations that don't
421dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
422dnl INTLDIR is used to find the intl libraries.  If empty,
423dnl    the value '$(top_builddir)/intl/' is used.
424dnl
425dnl The result of the configuration is one of three cases:
426dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
427dnl    and used.
428dnl    Catalog format: GNU --> install in $(datadir)
429dnl    Catalog extension: .mo after installation, .gmo in source tree
430dnl 2) GNU gettext has been found in the system's C library.
431dnl    Catalog format: GNU --> install in $(datadir)
432dnl    Catalog extension: .mo after installation, .gmo in source tree
433dnl 3) No internationalization, always use English msgid.
434dnl    Catalog format: none
435dnl    Catalog extension: none
436dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
437dnl The use of .gmo is historical (it was needed to avoid overwriting the
438dnl GNU format catalogs when building on a platform with an X/Open gettext),
439dnl but we keep it in order not to force irrelevant filename changes on the
440dnl maintainers.
441dnl
442AC_DEFUN([AM_GNU_GETTEXT],
443[
444  dnl Argument checking.
445  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
446    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
447])])])])])
448  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
449    [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
450  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
451    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
452])])])])
453  define([gt_included_intl],
454    ifelse([$1], [external],
455      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
456      [yes]))
457  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
458  gt_NEEDS_INIT
459  AM_GNU_GETTEXT_NEED([$2])
460
461  AC_REQUIRE([AM_PO_SUBDIRS])dnl
462  ifelse(gt_included_intl, yes, [
463    AC_REQUIRE([AM_INTL_SUBDIR])dnl
464  ])
465
466  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
467  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
468  AC_REQUIRE([AC_LIB_RPATH])
469
470  dnl Sometimes libintl requires libiconv, so first search for libiconv.
471  dnl Ideally we would do this search only after the
472  dnl      if test "$USE_NLS" = "yes"; then
473  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
474  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
475  dnl the configure script would need to contain the same shell code
476  dnl again, outside any 'if'. There are two solutions:
477  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
478  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
479  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
480  dnl documented, we avoid it.
481  ifelse(gt_included_intl, yes, , [
482    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
483  ])
484
485  dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
486  gt_INTL_MACOSX
487
488  dnl Set USE_NLS.
489  AC_REQUIRE([AM_NLS])
490
491  ifelse(gt_included_intl, yes, [
492    BUILD_INCLUDED_LIBINTL=no
493    USE_INCLUDED_LIBINTL=no
494  ])
495  LIBINTL=
496  LTLIBINTL=
497  POSUB=
498
499  dnl Add a version number to the cache macros.
500  case " $gt_needs " in
501    *" need-formatstring-macros "*) gt_api_version=3 ;;
502    *" need-ngettext "*) gt_api_version=2 ;;
503    *) gt_api_version=1 ;;
504  esac
505  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
506  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
507
508  dnl If we use NLS figure out what method
509  if test "$USE_NLS" = "yes"; then
510    gt_use_preinstalled_gnugettext=no
511    ifelse(gt_included_intl, yes, [
512      AC_MSG_CHECKING([whether included gettext is requested])
513      AC_ARG_WITH([included-gettext],
514        [  --with-included-gettext use the GNU gettext library included here],
515        nls_cv_force_use_gnu_gettext=$withval,
516        nls_cv_force_use_gnu_gettext=no)
517      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
518
519      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
520      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
521    ])
522        dnl User does not insist on using GNU NLS library.  Figure out what
523        dnl to use.  If GNU gettext is available we use this.  Else we have
524        dnl to fall back to GNU NLS library.
525
526        if test $gt_api_version -ge 3; then
527          gt_revision_test_code='
528#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
529#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
530#endif
531changequote(,)dnl
532typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
533changequote([,])dnl
534'
535        else
536          gt_revision_test_code=
537        fi
538        if test $gt_api_version -ge 2; then
539          gt_expression_test_code=' + * ngettext ("", "", 0)'
540        else
541          gt_expression_test_code=
542        fi
543
544        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
545         [AC_LINK_IFELSE(
546            [AC_LANG_PROGRAM(
547               [[
548#include <libintl.h>
549#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
550extern int _nl_msg_cat_cntr;
551extern int *_nl_domain_bindings;
552#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
553#else
554#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
555#endif
556$gt_revision_test_code
557               ]],
558               [[
559bindtextdomain ("", "");
560return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
561               ]])],
562            [eval "$gt_func_gnugettext_libc=yes"],
563            [eval "$gt_func_gnugettext_libc=no"])])
564
565        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
566          dnl Sometimes libintl requires libiconv, so first search for libiconv.
567          ifelse(gt_included_intl, yes, , [
568            AM_ICONV_LINK
569          ])
570          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
571          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
572          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
573          dnl even if libiconv doesn't exist.
574          AC_LIB_LINKFLAGS_BODY([intl])
575          AC_CACHE_CHECK([for GNU gettext in libintl],
576            [$gt_func_gnugettext_libintl],
577           [gt_save_CPPFLAGS="$CPPFLAGS"
578            CPPFLAGS="$CPPFLAGS $INCINTL"
579            gt_save_LIBS="$LIBS"
580            LIBS="$LIBS $LIBINTL"
581            dnl Now see whether libintl exists and does not depend on libiconv.
582            AC_LINK_IFELSE(
583              [AC_LANG_PROGRAM(
584                 [[
585#include <libintl.h>
586#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
587extern int _nl_msg_cat_cntr;
588extern
589#ifdef __cplusplus
590"C"
591#endif
592const char *_nl_expand_alias (const char *);
593#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
594#else
595#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
596#endif
597$gt_revision_test_code
598                 ]],
599                 [[
600bindtextdomain ("", "");
601return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
602                 ]])],
603              [eval "$gt_func_gnugettext_libintl=yes"],
604              [eval "$gt_func_gnugettext_libintl=no"])
605            dnl Now see whether libintl exists and depends on libiconv.
606            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
607              LIBS="$LIBS $LIBICONV"
608              AC_LINK_IFELSE(
609                [AC_LANG_PROGRAM(
610                   [[
611#include <libintl.h>
612#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
613extern int _nl_msg_cat_cntr;
614extern
615#ifdef __cplusplus
616"C"
617#endif
618const char *_nl_expand_alias (const char *);
619#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
620#else
621#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
622#endif
623$gt_revision_test_code
624                   ]],
625                   [[
626bindtextdomain ("", "");
627return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
628                   ]])],
629                [LIBINTL="$LIBINTL $LIBICONV"
630                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
631                 eval "$gt_func_gnugettext_libintl=yes"
632                ])
633            fi
634            CPPFLAGS="$gt_save_CPPFLAGS"
635            LIBS="$gt_save_LIBS"])
636        fi
637
638        dnl If an already present or preinstalled GNU gettext() is found,
639        dnl use it.  But if this macro is used in GNU gettext, and GNU
640        dnl gettext is already preinstalled in libintl, we update this
641        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
642        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
643           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
644                && test "$PACKAGE" != gettext-runtime \
645                && test "$PACKAGE" != gettext-tools; }; then
646          gt_use_preinstalled_gnugettext=yes
647        else
648          dnl Reset the values set by searching for libintl.
649          LIBINTL=
650          LTLIBINTL=
651          INCINTL=
652        fi
653
654    ifelse(gt_included_intl, yes, [
655        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
656          dnl GNU gettext is not found in the C library.
657          dnl Fall back on included GNU gettext library.
658          nls_cv_use_gnu_gettext=yes
659        fi
660      fi
661
662      if test "$nls_cv_use_gnu_gettext" = "yes"; then
663        dnl Mark actions used to generate GNU NLS library.
664        BUILD_INCLUDED_LIBINTL=yes
665        USE_INCLUDED_LIBINTL=yes
666        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
667        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
668        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
669      fi
670
671      CATOBJEXT=
672      if test "$gt_use_preinstalled_gnugettext" = "yes" \
673         || test "$nls_cv_use_gnu_gettext" = "yes"; then
674        dnl Mark actions to use GNU gettext tools.
675        CATOBJEXT=.gmo
676      fi
677    ])
678
679    if test -n "$INTL_MACOSX_LIBS"; then
680      if test "$gt_use_preinstalled_gnugettext" = "yes" \
681         || test "$nls_cv_use_gnu_gettext" = "yes"; then
682        dnl Some extra flags are needed during linking.
683        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
684        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
685      fi
686    fi
687
688    if test "$gt_use_preinstalled_gnugettext" = "yes" \
689       || test "$nls_cv_use_gnu_gettext" = "yes"; then
690      AC_DEFINE([ENABLE_NLS], [1],
691        [Define to 1 if translation of program messages to the user's native language
692   is requested.])
693    else
694      USE_NLS=no
695    fi
696  fi
697
698  AC_MSG_CHECKING([whether to use NLS])
699  AC_MSG_RESULT([$USE_NLS])
700  if test "$USE_NLS" = "yes"; then
701    AC_MSG_CHECKING([where the gettext function comes from])
702    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
703      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
704        gt_source="external libintl"
705      else
706        gt_source="libc"
707      fi
708    else
709      gt_source="included intl directory"
710    fi
711    AC_MSG_RESULT([$gt_source])
712  fi
713
714  if test "$USE_NLS" = "yes"; then
715
716    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
717      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
718        AC_MSG_CHECKING([how to link with libintl])
719        AC_MSG_RESULT([$LIBINTL])
720        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
721      fi
722
723      dnl For backward compatibility. Some packages may be using this.
724      AC_DEFINE([HAVE_GETTEXT], [1],
725       [Define if the GNU gettext() function is already present or preinstalled.])
726      AC_DEFINE([HAVE_DCGETTEXT], [1],
727       [Define if the GNU dcgettext() function is already present or preinstalled.])
728    fi
729
730    dnl We need to process the po/ directory.
731    POSUB=po
732  fi
733
734  ifelse(gt_included_intl, yes, [
735    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
736    dnl to 'yes' because some of the testsuite requires it.
737    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
738      BUILD_INCLUDED_LIBINTL=yes
739    fi
740
741    dnl Make all variables we use known to autoconf.
742    AC_SUBST([BUILD_INCLUDED_LIBINTL])
743    AC_SUBST([USE_INCLUDED_LIBINTL])
744    AC_SUBST([CATOBJEXT])
745
746    dnl For backward compatibility. Some configure.ins may be using this.
747    nls_cv_header_intl=
748    nls_cv_header_libgt=
749
750    dnl For backward compatibility. Some Makefiles may be using this.
751    DATADIRNAME=share
752    AC_SUBST([DATADIRNAME])
753
754    dnl For backward compatibility. Some Makefiles may be using this.
755    INSTOBJEXT=.mo
756    AC_SUBST([INSTOBJEXT])
757
758    dnl For backward compatibility. Some Makefiles may be using this.
759    GENCAT=gencat
760    AC_SUBST([GENCAT])
761
762    dnl For backward compatibility. Some Makefiles may be using this.
763    INTLOBJS=
764    if test "$USE_INCLUDED_LIBINTL" = yes; then
765      INTLOBJS="\$(GETTOBJS)"
766    fi
767    AC_SUBST([INTLOBJS])
768
769    dnl Enable libtool support if the surrounding package wishes it.
770    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
771    AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
772  ])
773
774  dnl For backward compatibility. Some Makefiles may be using this.
775  INTLLIBS="$LIBINTL"
776  AC_SUBST([INTLLIBS])
777
778  dnl Make all documented variables known to autoconf.
779  AC_SUBST([LIBINTL])
780  AC_SUBST([LTLIBINTL])
781  AC_SUBST([POSUB])
782])
783
784
785dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
786m4_define([gt_NEEDS_INIT],
787[
788  m4_divert_text([DEFAULTS], [gt_needs=])
789  m4_define([gt_NEEDS_INIT], [])
790])
791
792
793dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
794AC_DEFUN([AM_GNU_GETTEXT_NEED],
795[
796  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
797])
798
799
800dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
801AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
802
803
804dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
805AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
806
807# Increment this whenever this file is changed.
808#serial 2
809
810dnl GLIB_GSETTINGS
811dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
812dnl the schema should be compiled
813dnl
814
815AC_DEFUN([GLIB_GSETTINGS],
816[
817  dnl We can't use PKG_PREREQ because that needs 0.29.
818  m4_ifndef([PKG_PROG_PKG_CONFIG],
819            [pkg.m4 version 0.28 or later is required])
820
821  m4_pattern_allow([AM_V_GEN])
822  AC_ARG_ENABLE(schemas-compile,
823                AS_HELP_STRING([--disable-schemas-compile],
824                               [Disable regeneration of gschemas.compiled on install]),
825                [case ${enableval} in
826                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
827                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
828                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
829                 esac])
830  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
831  PKG_PROG_PKG_CONFIG([0.16])
832  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
833  AS_IF([test x$cross_compiling != xyes],
834        [PKG_CHECK_VAR([GLIB_COMPILE_SCHEMAS], [gio-2.0], [glib_compile_schemas])],
835        [AC_PATH_PROG([GLIB_COMPILE_SCHEMAS], [glib-compile-schemas])])
836  AC_SUBST(GLIB_COMPILE_SCHEMAS)
837  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
838    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
839  else
840    ifelse([$1],,[:],[$1])
841  fi
842
843  GSETTINGS_RULES='
844.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
845
846mostlyclean-am: clean-gsettings-schemas
847
848gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
849
850%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
851	$(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
852
853all-am: $(gsettings_SCHEMAS:.xml=.valid)
854uninstall-am: uninstall-gsettings-schemas
855install-data-am: install-gsettings-schemas
856
857.SECONDARY: $(gsettings_SCHEMAS)
858
859install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
860	@$(NORMAL_INSTALL)
861	if test -n "$^"; then \
862		test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
863		$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
864		test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
865	fi
866
867uninstall-gsettings-schemas:
868	@$(NORMAL_UNINSTALL)
869	@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
870	files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
871	test -n "$$files" || exit 0; \
872	echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
873	cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
874	test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
875
876clean-gsettings-schemas:
877	rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
878
879ifdef gsettings_ENUM_NAMESPACE
880$(gsettings__enum_file): $(gsettings_ENUM_FILES)
881	$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
882endif
883'
884  _GSETTINGS_SUBST(GSETTINGS_RULES)
885])
886
887dnl _GSETTINGS_SUBST(VARIABLE)
888dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
889AC_DEFUN([_GSETTINGS_SUBST],
890[
891AC_SUBST([$1])
892m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
893]
894)
895
896# iconv.m4 serial 19 (gettext-0.18.2)
897dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
898dnl This file is free software; the Free Software Foundation
899dnl gives unlimited permission to copy and/or distribute it,
900dnl with or without modifications, as long as this notice is preserved.
901
902dnl From Bruno Haible.
903
904AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
905[
906  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
907  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
908  AC_REQUIRE([AC_LIB_RPATH])
909
910  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
911  dnl accordingly.
912  AC_LIB_LINKFLAGS_BODY([iconv])
913])
914
915AC_DEFUN([AM_ICONV_LINK],
916[
917  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
918  dnl those with the standalone portable GNU libiconv installed).
919  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
920
921  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
922  dnl accordingly.
923  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
924
925  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
926  dnl because if the user has installed libiconv and not disabled its use
927  dnl via --without-libiconv-prefix, he wants to use it. The first
928  dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
929  am_save_CPPFLAGS="$CPPFLAGS"
930  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
931
932  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
933    am_cv_func_iconv="no, consider installing GNU libiconv"
934    am_cv_lib_iconv=no
935    AC_LINK_IFELSE(
936      [AC_LANG_PROGRAM(
937         [[
938#include <stdlib.h>
939#include <iconv.h>
940         ]],
941         [[iconv_t cd = iconv_open("","");
942           iconv(cd,NULL,NULL,NULL,NULL);
943           iconv_close(cd);]])],
944      [am_cv_func_iconv=yes])
945    if test "$am_cv_func_iconv" != yes; then
946      am_save_LIBS="$LIBS"
947      LIBS="$LIBS $LIBICONV"
948      AC_LINK_IFELSE(
949        [AC_LANG_PROGRAM(
950           [[
951#include <stdlib.h>
952#include <iconv.h>
953           ]],
954           [[iconv_t cd = iconv_open("","");
955             iconv(cd,NULL,NULL,NULL,NULL);
956             iconv_close(cd);]])],
957        [am_cv_lib_iconv=yes]
958        [am_cv_func_iconv=yes])
959      LIBS="$am_save_LIBS"
960    fi
961  ])
962  if test "$am_cv_func_iconv" = yes; then
963    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
964      dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
965      dnl Solaris 10.
966      am_save_LIBS="$LIBS"
967      if test $am_cv_lib_iconv = yes; then
968        LIBS="$LIBS $LIBICONV"
969      fi
970      am_cv_func_iconv_works=no
971      for ac_iconv_const in '' 'const'; do
972        AC_RUN_IFELSE(
973          [AC_LANG_PROGRAM(
974             [[
975#include <iconv.h>
976#include <string.h>
977
978#ifndef ICONV_CONST
979# define ICONV_CONST $ac_iconv_const
980#endif
981             ]],
982             [[int result = 0;
983  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
984     returns.  */
985  {
986    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
987    if (cd_utf8_to_88591 != (iconv_t)(-1))
988      {
989        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
990        char buf[10];
991        ICONV_CONST char *inptr = input;
992        size_t inbytesleft = strlen (input);
993        char *outptr = buf;
994        size_t outbytesleft = sizeof (buf);
995        size_t res = iconv (cd_utf8_to_88591,
996                            &inptr, &inbytesleft,
997                            &outptr, &outbytesleft);
998        if (res == 0)
999          result |= 1;
1000        iconv_close (cd_utf8_to_88591);
1001      }
1002  }
1003  /* Test against Solaris 10 bug: Failures are not distinguishable from
1004     successful returns.  */
1005  {
1006    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
1007    if (cd_ascii_to_88591 != (iconv_t)(-1))
1008      {
1009        static ICONV_CONST char input[] = "\263";
1010        char buf[10];
1011        ICONV_CONST char *inptr = input;
1012        size_t inbytesleft = strlen (input);
1013        char *outptr = buf;
1014        size_t outbytesleft = sizeof (buf);
1015        size_t res = iconv (cd_ascii_to_88591,
1016                            &inptr, &inbytesleft,
1017                            &outptr, &outbytesleft);
1018        if (res == 0)
1019          result |= 2;
1020        iconv_close (cd_ascii_to_88591);
1021      }
1022  }
1023  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
1024  {
1025    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
1026    if (cd_88591_to_utf8 != (iconv_t)(-1))
1027      {
1028        static ICONV_CONST char input[] = "\304";
1029        static char buf[2] = { (char)0xDE, (char)0xAD };
1030        ICONV_CONST char *inptr = input;
1031        size_t inbytesleft = 1;
1032        char *outptr = buf;
1033        size_t outbytesleft = 1;
1034        size_t res = iconv (cd_88591_to_utf8,
1035                            &inptr, &inbytesleft,
1036                            &outptr, &outbytesleft);
1037        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
1038          result |= 4;
1039        iconv_close (cd_88591_to_utf8);
1040      }
1041  }
1042#if 0 /* This bug could be worked around by the caller.  */
1043  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
1044  {
1045    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
1046    if (cd_88591_to_utf8 != (iconv_t)(-1))
1047      {
1048        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
1049        char buf[50];
1050        ICONV_CONST char *inptr = input;
1051        size_t inbytesleft = strlen (input);
1052        char *outptr = buf;
1053        size_t outbytesleft = sizeof (buf);
1054        size_t res = iconv (cd_88591_to_utf8,
1055                            &inptr, &inbytesleft,
1056                            &outptr, &outbytesleft);
1057        if ((int)res > 0)
1058          result |= 8;
1059        iconv_close (cd_88591_to_utf8);
1060      }
1061  }
1062#endif
1063  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
1064     provided.  */
1065  if (/* Try standardized names.  */
1066      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
1067      /* Try IRIX, OSF/1 names.  */
1068      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
1069      /* Try AIX names.  */
1070      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
1071      /* Try HP-UX names.  */
1072      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
1073    result |= 16;
1074  return result;
1075]])],
1076          [am_cv_func_iconv_works=yes], ,
1077          [case "$host_os" in
1078             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
1079             *)            am_cv_func_iconv_works="guessing yes" ;;
1080           esac])
1081        test "$am_cv_func_iconv_works" = no || break
1082      done
1083      LIBS="$am_save_LIBS"
1084    ])
1085    case "$am_cv_func_iconv_works" in
1086      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
1087      *)   am_func_iconv=yes ;;
1088    esac
1089  else
1090    am_func_iconv=no am_cv_lib_iconv=no
1091  fi
1092  if test "$am_func_iconv" = yes; then
1093    AC_DEFINE([HAVE_ICONV], [1],
1094      [Define if you have the iconv() function and it works.])
1095  fi
1096  if test "$am_cv_lib_iconv" = yes; then
1097    AC_MSG_CHECKING([how to link with libiconv])
1098    AC_MSG_RESULT([$LIBICONV])
1099  else
1100    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
1101    dnl either.
1102    CPPFLAGS="$am_save_CPPFLAGS"
1103    LIBICONV=
1104    LTLIBICONV=
1105  fi
1106  AC_SUBST([LIBICONV])
1107  AC_SUBST([LTLIBICONV])
1108])
1109
1110dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
1111dnl avoid warnings like
1112dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
1113dnl This is tricky because of the way 'aclocal' is implemented:
1114dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
1115dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
1116dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
1117dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
1118dnl   warnings.
1119m4_define([gl_iconv_AC_DEFUN],
1120  m4_version_prereq([2.64],
1121    [[AC_DEFUN_ONCE(
1122        [$1], [$2])]],
1123    [m4_ifdef([gl_00GNULIB],
1124       [[AC_DEFUN_ONCE(
1125           [$1], [$2])]],
1126       [[AC_DEFUN(
1127           [$1], [$2])]])]))
1128gl_iconv_AC_DEFUN([AM_ICONV],
1129[
1130  AM_ICONV_LINK
1131  if test "$am_cv_func_iconv" = yes; then
1132    AC_MSG_CHECKING([for iconv declaration])
1133    AC_CACHE_VAL([am_cv_proto_iconv], [
1134      AC_COMPILE_IFELSE(
1135        [AC_LANG_PROGRAM(
1136           [[
1137#include <stdlib.h>
1138#include <iconv.h>
1139extern
1140#ifdef __cplusplus
1141"C"
1142#endif
1143#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
1144size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1145#else
1146size_t iconv();
1147#endif
1148           ]],
1149           [[]])],
1150        [am_cv_proto_iconv_arg1=""],
1151        [am_cv_proto_iconv_arg1="const"])
1152      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
1153    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1154    AC_MSG_RESULT([
1155         $am_cv_proto_iconv])
1156    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
1157      [Define as const if the declaration of iconv() needs const.])
1158    dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
1159    m4_ifdef([gl_ICONV_H_DEFAULTS],
1160      [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
1161       if test -n "$am_cv_proto_iconv_arg1"; then
1162         ICONV_CONST="const"
1163       fi
1164      ])
1165  fi
1166])
1167
1168# intlmacosx.m4 serial 5 (gettext-0.18.2)
1169dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
1170dnl This file is free software; the Free Software Foundation
1171dnl gives unlimited permission to copy and/or distribute it,
1172dnl with or without modifications, as long as this notice is preserved.
1173dnl
1174dnl This file can be used in projects which are not available under
1175dnl the GNU General Public License or the GNU Library General Public
1176dnl License but which still want to provide support for the GNU gettext
1177dnl functionality.
1178dnl Please note that the actual code of the GNU gettext library is covered
1179dnl by the GNU Library General Public License, and the rest of the GNU
1180dnl gettext package is covered by the GNU General Public License.
1181dnl They are *not* in the public domain.
1182
1183dnl Checks for special options needed on Mac OS X.
1184dnl Defines INTL_MACOSX_LIBS.
1185AC_DEFUN([gt_INTL_MACOSX],
1186[
1187  dnl Check for API introduced in Mac OS X 10.2.
1188  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
1189    [gt_cv_func_CFPreferencesCopyAppValue],
1190    [gt_save_LIBS="$LIBS"
1191     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1192     AC_LINK_IFELSE(
1193       [AC_LANG_PROGRAM(
1194          [[#include <CoreFoundation/CFPreferences.h>]],
1195          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
1196       [gt_cv_func_CFPreferencesCopyAppValue=yes],
1197       [gt_cv_func_CFPreferencesCopyAppValue=no])
1198     LIBS="$gt_save_LIBS"])
1199  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
1200    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
1201      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
1202  fi
1203  dnl Check for API introduced in Mac OS X 10.3.
1204  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
1205    [gt_save_LIBS="$LIBS"
1206     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1207     AC_LINK_IFELSE(
1208       [AC_LANG_PROGRAM(
1209          [[#include <CoreFoundation/CFLocale.h>]],
1210          [[CFLocaleCopyCurrent();]])],
1211       [gt_cv_func_CFLocaleCopyCurrent=yes],
1212       [gt_cv_func_CFLocaleCopyCurrent=no])
1213     LIBS="$gt_save_LIBS"])
1214  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1215    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
1216      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
1217  fi
1218  INTL_MACOSX_LIBS=
1219  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1220    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
1221  fi
1222  AC_SUBST([INTL_MACOSX_LIBS])
1223])
1224
1225# lib-ld.m4 serial 6
1226dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
1227dnl This file is free software; the Free Software Foundation
1228dnl gives unlimited permission to copy and/or distribute it,
1229dnl with or without modifications, as long as this notice is preserved.
1230
1231dnl Subroutines of libtool.m4,
1232dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
1233dnl collision with libtool.m4.
1234
1235dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
1236AC_DEFUN([AC_LIB_PROG_LD_GNU],
1237[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
1238[# I'd rather use --version here, but apparently some GNU lds only accept -v.
1239case `$LD -v 2>&1 </dev/null` in
1240*GNU* | *'with BFD'*)
1241  acl_cv_prog_gnu_ld=yes
1242  ;;
1243*)
1244  acl_cv_prog_gnu_ld=no
1245  ;;
1246esac])
1247with_gnu_ld=$acl_cv_prog_gnu_ld
1248])
1249
1250dnl From libtool-2.4. Sets the variable LD.
1251AC_DEFUN([AC_LIB_PROG_LD],
1252[AC_REQUIRE([AC_PROG_CC])dnl
1253AC_REQUIRE([AC_CANONICAL_HOST])dnl
1254
1255AC_ARG_WITH([gnu-ld],
1256    [AS_HELP_STRING([--with-gnu-ld],
1257        [assume the C compiler uses GNU ld [default=no]])],
1258    [test "$withval" = no || with_gnu_ld=yes],
1259    [with_gnu_ld=no])dnl
1260
1261# Prepare PATH_SEPARATOR.
1262# The user is always right.
1263if test "${PATH_SEPARATOR+set}" != set; then
1264  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
1265  # contains only /bin. Note that ksh looks also at the FPATH variable,
1266  # so we have to set that as well for the test.
1267  PATH_SEPARATOR=:
1268  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
1269    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
1270           || PATH_SEPARATOR=';'
1271       }
1272fi
1273
1274ac_prog=ld
1275if test "$GCC" = yes; then
1276  # Check if gcc -print-prog-name=ld gives a path.
1277  AC_MSG_CHECKING([for ld used by $CC])
1278  case $host in
1279  *-*-mingw*)
1280    # gcc leaves a trailing carriage return which upsets mingw
1281    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1282  *)
1283    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1284  esac
1285  case $ac_prog in
1286    # Accept absolute paths.
1287    [[\\/]]* | ?:[[\\/]]*)
1288      re_direlt='/[[^/]][[^/]]*/\.\./'
1289      # Canonicalize the pathname of ld
1290      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
1291      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
1292        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1293      done
1294      test -z "$LD" && LD="$ac_prog"
1295      ;;
1296  "")
1297    # If it fails, then pretend we aren't using GCC.
1298    ac_prog=ld
1299    ;;
1300  *)
1301    # If it is relative, then search for the first ld in PATH.
1302    with_gnu_ld=unknown
1303    ;;
1304  esac
1305elif test "$with_gnu_ld" = yes; then
1306  AC_MSG_CHECKING([for GNU ld])
1307else
1308  AC_MSG_CHECKING([for non-GNU ld])
1309fi
1310AC_CACHE_VAL([acl_cv_path_LD],
1311[if test -z "$LD"; then
1312  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1313  for ac_dir in $PATH; do
1314    IFS="$acl_save_ifs"
1315    test -z "$ac_dir" && ac_dir=.
1316    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1317      acl_cv_path_LD="$ac_dir/$ac_prog"
1318      # Check to see if the program is GNU ld.  I'd rather use --version,
1319      # but apparently some variants of GNU ld only accept -v.
1320      # Break only if it was the GNU/non-GNU ld that we prefer.
1321      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
1322      *GNU* | *'with BFD'*)
1323        test "$with_gnu_ld" != no && break
1324        ;;
1325      *)
1326        test "$with_gnu_ld" != yes && break
1327        ;;
1328      esac
1329    fi
1330  done
1331  IFS="$acl_save_ifs"
1332else
1333  acl_cv_path_LD="$LD" # Let the user override the test with a path.
1334fi])
1335LD="$acl_cv_path_LD"
1336if test -n "$LD"; then
1337  AC_MSG_RESULT([$LD])
1338else
1339  AC_MSG_RESULT([no])
1340fi
1341test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1342AC_LIB_PROG_LD_GNU
1343])
1344
1345# lib-link.m4 serial 26 (gettext-0.18.2)
1346dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
1347dnl This file is free software; the Free Software Foundation
1348dnl gives unlimited permission to copy and/or distribute it,
1349dnl with or without modifications, as long as this notice is preserved.
1350
1351dnl From Bruno Haible.
1352
1353AC_PREREQ([2.54])
1354
1355dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1356dnl the libraries corresponding to explicit and implicit dependencies.
1357dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1358dnl augments the CPPFLAGS variable.
1359dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1360dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1361AC_DEFUN([AC_LIB_LINKFLAGS],
1362[
1363  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1364  AC_REQUIRE([AC_LIB_RPATH])
1365  pushdef([Name],[m4_translit([$1],[./+-], [____])])
1366  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1367                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1368  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1369    AC_LIB_LINKFLAGS_BODY([$1], [$2])
1370    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1371    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1372    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1373    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1374  ])
1375  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1376  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1377  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1378  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1379  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1380  AC_SUBST([LIB]NAME)
1381  AC_SUBST([LTLIB]NAME)
1382  AC_SUBST([LIB]NAME[_PREFIX])
1383  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1384  dnl results of this search when this library appears as a dependency.
1385  HAVE_LIB[]NAME=yes
1386  popdef([NAME])
1387  popdef([Name])
1388])
1389
1390dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1391dnl searches for libname and the libraries corresponding to explicit and
1392dnl implicit dependencies, together with the specified include files and
1393dnl the ability to compile and link the specified testcode. The missing-message
1394dnl defaults to 'no' and may contain additional hints for the user.
1395dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1396dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1397dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1398dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1399dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1400dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1401AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1402[
1403  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1404  AC_REQUIRE([AC_LIB_RPATH])
1405  pushdef([Name],[m4_translit([$1],[./+-], [____])])
1406  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1407                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1408
1409  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1410  dnl accordingly.
1411  AC_LIB_LINKFLAGS_BODY([$1], [$2])
1412
1413  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1414  dnl because if the user has installed lib[]Name and not disabled its use
1415  dnl via --without-lib[]Name-prefix, he wants to use it.
1416  ac_save_CPPFLAGS="$CPPFLAGS"
1417  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1418
1419  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1420    ac_save_LIBS="$LIBS"
1421    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1422    dnl because these -l options might require -L options that are present in
1423    dnl LIBS. -l options benefit only from the -L options listed before it.
1424    dnl Otherwise, add it to the front of LIBS, because it may be a static
1425    dnl library that depends on another static library that is present in LIBS.
1426    dnl Static libraries benefit only from the static libraries listed after
1427    dnl it.
1428    case " $LIB[]NAME" in
1429      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1430      *)       LIBS="$LIB[]NAME $LIBS" ;;
1431    esac
1432    AC_LINK_IFELSE(
1433      [AC_LANG_PROGRAM([[$3]], [[$4]])],
1434      [ac_cv_lib[]Name=yes],
1435      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1436    LIBS="$ac_save_LIBS"
1437  ])
1438  if test "$ac_cv_lib[]Name" = yes; then
1439    HAVE_LIB[]NAME=yes
1440    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1441    AC_MSG_CHECKING([how to link with lib[]$1])
1442    AC_MSG_RESULT([$LIB[]NAME])
1443  else
1444    HAVE_LIB[]NAME=no
1445    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1446    dnl $INC[]NAME either.
1447    CPPFLAGS="$ac_save_CPPFLAGS"
1448    LIB[]NAME=
1449    LTLIB[]NAME=
1450    LIB[]NAME[]_PREFIX=
1451  fi
1452  AC_SUBST([HAVE_LIB]NAME)
1453  AC_SUBST([LIB]NAME)
1454  AC_SUBST([LTLIB]NAME)
1455  AC_SUBST([LIB]NAME[_PREFIX])
1456  popdef([NAME])
1457  popdef([Name])
1458])
1459
1460dnl Determine the platform dependent parameters needed to use rpath:
1461dnl   acl_libext,
1462dnl   acl_shlibext,
1463dnl   acl_libname_spec,
1464dnl   acl_library_names_spec,
1465dnl   acl_hardcode_libdir_flag_spec,
1466dnl   acl_hardcode_libdir_separator,
1467dnl   acl_hardcode_direct,
1468dnl   acl_hardcode_minus_L.
1469AC_DEFUN([AC_LIB_RPATH],
1470[
1471  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1472  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1473  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
1474  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
1475  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
1476  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1477  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1478    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1479    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1480    . ./conftest.sh
1481    rm -f ./conftest.sh
1482    acl_cv_rpath=done
1483  ])
1484  wl="$acl_cv_wl"
1485  acl_libext="$acl_cv_libext"
1486  acl_shlibext="$acl_cv_shlibext"
1487  acl_libname_spec="$acl_cv_libname_spec"
1488  acl_library_names_spec="$acl_cv_library_names_spec"
1489  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1490  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1491  acl_hardcode_direct="$acl_cv_hardcode_direct"
1492  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1493  dnl Determine whether the user wants rpath handling at all.
1494  AC_ARG_ENABLE([rpath],
1495    [  --disable-rpath         do not hardcode runtime library paths],
1496    :, enable_rpath=yes)
1497])
1498
1499dnl AC_LIB_FROMPACKAGE(name, package)
1500dnl declares that libname comes from the given package. The configure file
1501dnl will then not have a --with-libname-prefix option but a
1502dnl --with-package-prefix option. Several libraries can come from the same
1503dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1504dnl macro call that searches for libname.
1505AC_DEFUN([AC_LIB_FROMPACKAGE],
1506[
1507  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1508                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1509  define([acl_frompackage_]NAME, [$2])
1510  popdef([NAME])
1511  pushdef([PACK],[$2])
1512  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1513                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1514  define([acl_libsinpackage_]PACKUP,
1515    m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
1516  popdef([PACKUP])
1517  popdef([PACK])
1518])
1519
1520dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1521dnl the libraries corresponding to explicit and implicit dependencies.
1522dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1523dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1524dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1525AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1526[
1527  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1528  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1529                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1530  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1531  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1532                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1533  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1534  dnl Autoconf >= 2.61 supports dots in --with options.
1535  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
1536  dnl By default, look in $includedir and $libdir.
1537  use_additional=yes
1538  AC_LIB_WITH_FINAL_PREFIX([
1539    eval additional_includedir=\"$includedir\"
1540    eval additional_libdir=\"$libdir\"
1541  ])
1542  AC_ARG_WITH(P_A_C_K[-prefix],
1543[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
1544  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
1545[
1546    if test "X$withval" = "Xno"; then
1547      use_additional=no
1548    else
1549      if test "X$withval" = "X"; then
1550        AC_LIB_WITH_FINAL_PREFIX([
1551          eval additional_includedir=\"$includedir\"
1552          eval additional_libdir=\"$libdir\"
1553        ])
1554      else
1555        additional_includedir="$withval/include"
1556        additional_libdir="$withval/$acl_libdirstem"
1557        if test "$acl_libdirstem2" != "$acl_libdirstem" \
1558           && ! test -d "$withval/$acl_libdirstem"; then
1559          additional_libdir="$withval/$acl_libdirstem2"
1560        fi
1561      fi
1562    fi
1563])
1564  dnl Search the library and its dependencies in $additional_libdir and
1565  dnl $LDFLAGS. Using breadth-first-seach.
1566  LIB[]NAME=
1567  LTLIB[]NAME=
1568  INC[]NAME=
1569  LIB[]NAME[]_PREFIX=
1570  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1571  dnl computed. So it has to be reset here.
1572  HAVE_LIB[]NAME=
1573  rpathdirs=
1574  ltrpathdirs=
1575  names_already_handled=
1576  names_next_round='$1 $2'
1577  while test -n "$names_next_round"; do
1578    names_this_round="$names_next_round"
1579    names_next_round=
1580    for name in $names_this_round; do
1581      already_handled=
1582      for n in $names_already_handled; do
1583        if test "$n" = "$name"; then
1584          already_handled=yes
1585          break
1586        fi
1587      done
1588      if test -z "$already_handled"; then
1589        names_already_handled="$names_already_handled $name"
1590        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1591        dnl or AC_LIB_HAVE_LINKFLAGS call.
1592        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
1593        eval value=\"\$HAVE_LIB$uppername\"
1594        if test -n "$value"; then
1595          if test "$value" = yes; then
1596            eval value=\"\$LIB$uppername\"
1597            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1598            eval value=\"\$LTLIB$uppername\"
1599            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1600          else
1601            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1602            dnl that this library doesn't exist. So just drop it.
1603            :
1604          fi
1605        else
1606          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1607          dnl and the already constructed $LIBNAME/$LTLIBNAME.
1608          found_dir=
1609          found_la=
1610          found_so=
1611          found_a=
1612          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
1613          if test -n "$acl_shlibext"; then
1614            shrext=".$acl_shlibext"             # typically: shrext=.so
1615          else
1616            shrext=
1617          fi
1618          if test $use_additional = yes; then
1619            dir="$additional_libdir"
1620            dnl The same code as in the loop below:
1621            dnl First look for a shared library.
1622            if test -n "$acl_shlibext"; then
1623              if test -f "$dir/$libname$shrext"; then
1624                found_dir="$dir"
1625                found_so="$dir/$libname$shrext"
1626              else
1627                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1628                  ver=`(cd "$dir" && \
1629                        for f in "$libname$shrext".*; do echo "$f"; done \
1630                        | sed -e "s,^$libname$shrext\\\\.,," \
1631                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1632                        | sed 1q ) 2>/dev/null`
1633                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1634                    found_dir="$dir"
1635                    found_so="$dir/$libname$shrext.$ver"
1636                  fi
1637                else
1638                  eval library_names=\"$acl_library_names_spec\"
1639                  for f in $library_names; do
1640                    if test -f "$dir/$f"; then
1641                      found_dir="$dir"
1642                      found_so="$dir/$f"
1643                      break
1644                    fi
1645                  done
1646                fi
1647              fi
1648            fi
1649            dnl Then look for a static library.
1650            if test "X$found_dir" = "X"; then
1651              if test -f "$dir/$libname.$acl_libext"; then
1652                found_dir="$dir"
1653                found_a="$dir/$libname.$acl_libext"
1654              fi
1655            fi
1656            if test "X$found_dir" != "X"; then
1657              if test -f "$dir/$libname.la"; then
1658                found_la="$dir/$libname.la"
1659              fi
1660            fi
1661          fi
1662          if test "X$found_dir" = "X"; then
1663            for x in $LDFLAGS $LTLIB[]NAME; do
1664              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1665              case "$x" in
1666                -L*)
1667                  dir=`echo "X$x" | sed -e 's/^X-L//'`
1668                  dnl First look for a shared library.
1669                  if test -n "$acl_shlibext"; then
1670                    if test -f "$dir/$libname$shrext"; then
1671                      found_dir="$dir"
1672                      found_so="$dir/$libname$shrext"
1673                    else
1674                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1675                        ver=`(cd "$dir" && \
1676                              for f in "$libname$shrext".*; do echo "$f"; done \
1677                              | sed -e "s,^$libname$shrext\\\\.,," \
1678                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1679                              | sed 1q ) 2>/dev/null`
1680                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1681                          found_dir="$dir"
1682                          found_so="$dir/$libname$shrext.$ver"
1683                        fi
1684                      else
1685                        eval library_names=\"$acl_library_names_spec\"
1686                        for f in $library_names; do
1687                          if test -f "$dir/$f"; then
1688                            found_dir="$dir"
1689                            found_so="$dir/$f"
1690                            break
1691                          fi
1692                        done
1693                      fi
1694                    fi
1695                  fi
1696                  dnl Then look for a static library.
1697                  if test "X$found_dir" = "X"; then
1698                    if test -f "$dir/$libname.$acl_libext"; then
1699                      found_dir="$dir"
1700                      found_a="$dir/$libname.$acl_libext"
1701                    fi
1702                  fi
1703                  if test "X$found_dir" != "X"; then
1704                    if test -f "$dir/$libname.la"; then
1705                      found_la="$dir/$libname.la"
1706                    fi
1707                  fi
1708                  ;;
1709              esac
1710              if test "X$found_dir" != "X"; then
1711                break
1712              fi
1713            done
1714          fi
1715          if test "X$found_dir" != "X"; then
1716            dnl Found the library.
1717            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1718            if test "X$found_so" != "X"; then
1719              dnl Linking with a shared library. We attempt to hardcode its
1720              dnl directory into the executable's runpath, unless it's the
1721              dnl standard /usr/lib.
1722              if test "$enable_rpath" = no \
1723                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1724                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1725                dnl No hardcoding is needed.
1726                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1727              else
1728                dnl Use an explicit option to hardcode DIR into the resulting
1729                dnl binary.
1730                dnl Potentially add DIR to ltrpathdirs.
1731                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1732                haveit=
1733                for x in $ltrpathdirs; do
1734                  if test "X$x" = "X$found_dir"; then
1735                    haveit=yes
1736                    break
1737                  fi
1738                done
1739                if test -z "$haveit"; then
1740                  ltrpathdirs="$ltrpathdirs $found_dir"
1741                fi
1742                dnl The hardcoding into $LIBNAME is system dependent.
1743                if test "$acl_hardcode_direct" = yes; then
1744                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1745                  dnl resulting binary.
1746                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1747                else
1748                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1749                    dnl Use an explicit option to hardcode DIR into the resulting
1750                    dnl binary.
1751                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1752                    dnl Potentially add DIR to rpathdirs.
1753                    dnl The rpathdirs will be appended to $LIBNAME at the end.
1754                    haveit=
1755                    for x in $rpathdirs; do
1756                      if test "X$x" = "X$found_dir"; then
1757                        haveit=yes
1758                        break
1759                      fi
1760                    done
1761                    if test -z "$haveit"; then
1762                      rpathdirs="$rpathdirs $found_dir"
1763                    fi
1764                  else
1765                    dnl Rely on "-L$found_dir".
1766                    dnl But don't add it if it's already contained in the LDFLAGS
1767                    dnl or the already constructed $LIBNAME
1768                    haveit=
1769                    for x in $LDFLAGS $LIB[]NAME; do
1770                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1771                      if test "X$x" = "X-L$found_dir"; then
1772                        haveit=yes
1773                        break
1774                      fi
1775                    done
1776                    if test -z "$haveit"; then
1777                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1778                    fi
1779                    if test "$acl_hardcode_minus_L" != no; then
1780                      dnl FIXME: Not sure whether we should use
1781                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1782                      dnl here.
1783                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1784                    else
1785                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1786                      dnl here, because this doesn't fit in flags passed to the
1787                      dnl compiler. So give up. No hardcoding. This affects only
1788                      dnl very old systems.
1789                      dnl FIXME: Not sure whether we should use
1790                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1791                      dnl here.
1792                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1793                    fi
1794                  fi
1795                fi
1796              fi
1797            else
1798              if test "X$found_a" != "X"; then
1799                dnl Linking with a static library.
1800                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1801              else
1802                dnl We shouldn't come here, but anyway it's good to have a
1803                dnl fallback.
1804                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1805              fi
1806            fi
1807            dnl Assume the include files are nearby.
1808            additional_includedir=
1809            case "$found_dir" in
1810              */$acl_libdirstem | */$acl_libdirstem/)
1811                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1812                if test "$name" = '$1'; then
1813                  LIB[]NAME[]_PREFIX="$basedir"
1814                fi
1815                additional_includedir="$basedir/include"
1816                ;;
1817              */$acl_libdirstem2 | */$acl_libdirstem2/)
1818                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1819                if test "$name" = '$1'; then
1820                  LIB[]NAME[]_PREFIX="$basedir"
1821                fi
1822                additional_includedir="$basedir/include"
1823                ;;
1824            esac
1825            if test "X$additional_includedir" != "X"; then
1826              dnl Potentially add $additional_includedir to $INCNAME.
1827              dnl But don't add it
1828              dnl   1. if it's the standard /usr/include,
1829              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1830              dnl   3. if it's already present in $CPPFLAGS or the already
1831              dnl      constructed $INCNAME,
1832              dnl   4. if it doesn't exist as a directory.
1833              if test "X$additional_includedir" != "X/usr/include"; then
1834                haveit=
1835                if test "X$additional_includedir" = "X/usr/local/include"; then
1836                  if test -n "$GCC"; then
1837                    case $host_os in
1838                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1839                    esac
1840                  fi
1841                fi
1842                if test -z "$haveit"; then
1843                  for x in $CPPFLAGS $INC[]NAME; do
1844                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1845                    if test "X$x" = "X-I$additional_includedir"; then
1846                      haveit=yes
1847                      break
1848                    fi
1849                  done
1850                  if test -z "$haveit"; then
1851                    if test -d "$additional_includedir"; then
1852                      dnl Really add $additional_includedir to $INCNAME.
1853                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1854                    fi
1855                  fi
1856                fi
1857              fi
1858            fi
1859            dnl Look for dependencies.
1860            if test -n "$found_la"; then
1861              dnl Read the .la file. It defines the variables
1862              dnl dlname, library_names, old_library, dependency_libs, current,
1863              dnl age, revision, installed, dlopen, dlpreopen, libdir.
1864              save_libdir="$libdir"
1865              case "$found_la" in
1866                */* | *\\*) . "$found_la" ;;
1867                *) . "./$found_la" ;;
1868              esac
1869              libdir="$save_libdir"
1870              dnl We use only dependency_libs.
1871              for dep in $dependency_libs; do
1872                case "$dep" in
1873                  -L*)
1874                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1875                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1876                    dnl But don't add it
1877                    dnl   1. if it's the standard /usr/lib,
1878                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1879                    dnl   3. if it's already present in $LDFLAGS or the already
1880                    dnl      constructed $LIBNAME,
1881                    dnl   4. if it doesn't exist as a directory.
1882                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1883                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1884                      haveit=
1885                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1886                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1887                        if test -n "$GCC"; then
1888                          case $host_os in
1889                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1890                          esac
1891                        fi
1892                      fi
1893                      if test -z "$haveit"; then
1894                        haveit=
1895                        for x in $LDFLAGS $LIB[]NAME; do
1896                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1897                          if test "X$x" = "X-L$additional_libdir"; then
1898                            haveit=yes
1899                            break
1900                          fi
1901                        done
1902                        if test -z "$haveit"; then
1903                          if test -d "$additional_libdir"; then
1904                            dnl Really add $additional_libdir to $LIBNAME.
1905                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1906                          fi
1907                        fi
1908                        haveit=
1909                        for x in $LDFLAGS $LTLIB[]NAME; do
1910                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1911                          if test "X$x" = "X-L$additional_libdir"; then
1912                            haveit=yes
1913                            break
1914                          fi
1915                        done
1916                        if test -z "$haveit"; then
1917                          if test -d "$additional_libdir"; then
1918                            dnl Really add $additional_libdir to $LTLIBNAME.
1919                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1920                          fi
1921                        fi
1922                      fi
1923                    fi
1924                    ;;
1925                  -R*)
1926                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
1927                    if test "$enable_rpath" != no; then
1928                      dnl Potentially add DIR to rpathdirs.
1929                      dnl The rpathdirs will be appended to $LIBNAME at the end.
1930                      haveit=
1931                      for x in $rpathdirs; do
1932                        if test "X$x" = "X$dir"; then
1933                          haveit=yes
1934                          break
1935                        fi
1936                      done
1937                      if test -z "$haveit"; then
1938                        rpathdirs="$rpathdirs $dir"
1939                      fi
1940                      dnl Potentially add DIR to ltrpathdirs.
1941                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1942                      haveit=
1943                      for x in $ltrpathdirs; do
1944                        if test "X$x" = "X$dir"; then
1945                          haveit=yes
1946                          break
1947                        fi
1948                      done
1949                      if test -z "$haveit"; then
1950                        ltrpathdirs="$ltrpathdirs $dir"
1951                      fi
1952                    fi
1953                    ;;
1954                  -l*)
1955                    dnl Handle this in the next round.
1956                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1957                    ;;
1958                  *.la)
1959                    dnl Handle this in the next round. Throw away the .la's
1960                    dnl directory; it is already contained in a preceding -L
1961                    dnl option.
1962                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1963                    ;;
1964                  *)
1965                    dnl Most likely an immediate library name.
1966                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1967                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1968                    ;;
1969                esac
1970              done
1971            fi
1972          else
1973            dnl Didn't find the library; assume it is in the system directories
1974            dnl known to the linker and runtime loader. (All the system
1975            dnl directories known to the linker should also be known to the
1976            dnl runtime loader, otherwise the system is severely misconfigured.)
1977            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1978            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1979          fi
1980        fi
1981      fi
1982    done
1983  done
1984  if test "X$rpathdirs" != "X"; then
1985    if test -n "$acl_hardcode_libdir_separator"; then
1986      dnl Weird platform: only the last -rpath option counts, the user must
1987      dnl pass all path elements in one option. We can arrange that for a
1988      dnl single library, but not when more than one $LIBNAMEs are used.
1989      alldirs=
1990      for found_dir in $rpathdirs; do
1991        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1992      done
1993      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1994      acl_save_libdir="$libdir"
1995      libdir="$alldirs"
1996      eval flag=\"$acl_hardcode_libdir_flag_spec\"
1997      libdir="$acl_save_libdir"
1998      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1999    else
2000      dnl The -rpath options are cumulative.
2001      for found_dir in $rpathdirs; do
2002        acl_save_libdir="$libdir"
2003        libdir="$found_dir"
2004        eval flag=\"$acl_hardcode_libdir_flag_spec\"
2005        libdir="$acl_save_libdir"
2006        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2007      done
2008    fi
2009  fi
2010  if test "X$ltrpathdirs" != "X"; then
2011    dnl When using libtool, the option that works for both libraries and
2012    dnl executables is -R. The -R options are cumulative.
2013    for found_dir in $ltrpathdirs; do
2014      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2015    done
2016  fi
2017  popdef([P_A_C_K])
2018  popdef([PACKLIBS])
2019  popdef([PACKUP])
2020  popdef([PACK])
2021  popdef([NAME])
2022])
2023
2024dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2025dnl unless already present in VAR.
2026dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2027dnl contains two or three consecutive elements that belong together.
2028AC_DEFUN([AC_LIB_APPENDTOVAR],
2029[
2030  for element in [$2]; do
2031    haveit=
2032    for x in $[$1]; do
2033      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2034      if test "X$x" = "X$element"; then
2035        haveit=yes
2036        break
2037      fi
2038    done
2039    if test -z "$haveit"; then
2040      [$1]="${[$1]}${[$1]:+ }$element"
2041    fi
2042  done
2043])
2044
2045dnl For those cases where a variable contains several -L and -l options
2046dnl referring to unknown libraries and directories, this macro determines the
2047dnl necessary additional linker options for the runtime path.
2048dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
2049dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
2050dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
2051dnl otherwise linking without libtool is assumed.
2052AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
2053[
2054  AC_REQUIRE([AC_LIB_RPATH])
2055  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2056  $1=
2057  if test "$enable_rpath" != no; then
2058    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
2059      dnl Use an explicit option to hardcode directories into the resulting
2060      dnl binary.
2061      rpathdirs=
2062      next=
2063      for opt in $2; do
2064        if test -n "$next"; then
2065          dir="$next"
2066          dnl No need to hardcode the standard /usr/lib.
2067          if test "X$dir" != "X/usr/$acl_libdirstem" \
2068             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
2069            rpathdirs="$rpathdirs $dir"
2070          fi
2071          next=
2072        else
2073          case $opt in
2074            -L) next=yes ;;
2075            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
2076                 dnl No need to hardcode the standard /usr/lib.
2077                 if test "X$dir" != "X/usr/$acl_libdirstem" \
2078                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
2079                   rpathdirs="$rpathdirs $dir"
2080                 fi
2081                 next= ;;
2082            *) next= ;;
2083          esac
2084        fi
2085      done
2086      if test "X$rpathdirs" != "X"; then
2087        if test -n ""$3""; then
2088          dnl libtool is used for linking. Use -R options.
2089          for dir in $rpathdirs; do
2090            $1="${$1}${$1:+ }-R$dir"
2091          done
2092        else
2093          dnl The linker is used for linking directly.
2094          if test -n "$acl_hardcode_libdir_separator"; then
2095            dnl Weird platform: only the last -rpath option counts, the user
2096            dnl must pass all path elements in one option.
2097            alldirs=
2098            for dir in $rpathdirs; do
2099              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
2100            done
2101            acl_save_libdir="$libdir"
2102            libdir="$alldirs"
2103            eval flag=\"$acl_hardcode_libdir_flag_spec\"
2104            libdir="$acl_save_libdir"
2105            $1="$flag"
2106          else
2107            dnl The -rpath options are cumulative.
2108            for dir in $rpathdirs; do
2109              acl_save_libdir="$libdir"
2110              libdir="$dir"
2111              eval flag=\"$acl_hardcode_libdir_flag_spec\"
2112              libdir="$acl_save_libdir"
2113              $1="${$1}${$1:+ }$flag"
2114            done
2115          fi
2116        fi
2117      fi
2118    fi
2119  fi
2120  AC_SUBST([$1])
2121])
2122
2123# lib-prefix.m4 serial 7 (gettext-0.18)
2124dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
2125dnl This file is free software; the Free Software Foundation
2126dnl gives unlimited permission to copy and/or distribute it,
2127dnl with or without modifications, as long as this notice is preserved.
2128
2129dnl From Bruno Haible.
2130
2131dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
2132dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
2133dnl require excessive bracketing.
2134ifdef([AC_HELP_STRING],
2135[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
2136[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
2137
2138dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
2139dnl to access previously installed libraries. The basic assumption is that
2140dnl a user will want packages to use other packages he previously installed
2141dnl with the same --prefix option.
2142dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
2143dnl libraries, but is otherwise very convenient.
2144AC_DEFUN([AC_LIB_PREFIX],
2145[
2146  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
2147  AC_REQUIRE([AC_PROG_CC])
2148  AC_REQUIRE([AC_CANONICAL_HOST])
2149  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2150  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2151  dnl By default, look in $includedir and $libdir.
2152  use_additional=yes
2153  AC_LIB_WITH_FINAL_PREFIX([
2154    eval additional_includedir=\"$includedir\"
2155    eval additional_libdir=\"$libdir\"
2156  ])
2157  AC_LIB_ARG_WITH([lib-prefix],
2158[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
2159  --without-lib-prefix    don't search for libraries in includedir and libdir],
2160[
2161    if test "X$withval" = "Xno"; then
2162      use_additional=no
2163    else
2164      if test "X$withval" = "X"; then
2165        AC_LIB_WITH_FINAL_PREFIX([
2166          eval additional_includedir=\"$includedir\"
2167          eval additional_libdir=\"$libdir\"
2168        ])
2169      else
2170        additional_includedir="$withval/include"
2171        additional_libdir="$withval/$acl_libdirstem"
2172      fi
2173    fi
2174])
2175  if test $use_additional = yes; then
2176    dnl Potentially add $additional_includedir to $CPPFLAGS.
2177    dnl But don't add it
2178    dnl   1. if it's the standard /usr/include,
2179    dnl   2. if it's already present in $CPPFLAGS,
2180    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
2181    dnl   4. if it doesn't exist as a directory.
2182    if test "X$additional_includedir" != "X/usr/include"; then
2183      haveit=
2184      for x in $CPPFLAGS; do
2185        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2186        if test "X$x" = "X-I$additional_includedir"; then
2187          haveit=yes
2188          break
2189        fi
2190      done
2191      if test -z "$haveit"; then
2192        if test "X$additional_includedir" = "X/usr/local/include"; then
2193          if test -n "$GCC"; then
2194            case $host_os in
2195              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2196            esac
2197          fi
2198        fi
2199        if test -z "$haveit"; then
2200          if test -d "$additional_includedir"; then
2201            dnl Really add $additional_includedir to $CPPFLAGS.
2202            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2203          fi
2204        fi
2205      fi
2206    fi
2207    dnl Potentially add $additional_libdir to $LDFLAGS.
2208    dnl But don't add it
2209    dnl   1. if it's the standard /usr/lib,
2210    dnl   2. if it's already present in $LDFLAGS,
2211    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
2212    dnl   4. if it doesn't exist as a directory.
2213    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
2214      haveit=
2215      for x in $LDFLAGS; do
2216        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2217        if test "X$x" = "X-L$additional_libdir"; then
2218          haveit=yes
2219          break
2220        fi
2221      done
2222      if test -z "$haveit"; then
2223        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
2224          if test -n "$GCC"; then
2225            case $host_os in
2226              linux*) haveit=yes;;
2227            esac
2228          fi
2229        fi
2230        if test -z "$haveit"; then
2231          if test -d "$additional_libdir"; then
2232            dnl Really add $additional_libdir to $LDFLAGS.
2233            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2234          fi
2235        fi
2236      fi
2237    fi
2238  fi
2239])
2240
2241dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2242dnl acl_final_exec_prefix, containing the values to which $prefix and
2243dnl $exec_prefix will expand at the end of the configure script.
2244AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2245[
2246  dnl Unfortunately, prefix and exec_prefix get only finally determined
2247  dnl at the end of configure.
2248  if test "X$prefix" = "XNONE"; then
2249    acl_final_prefix="$ac_default_prefix"
2250  else
2251    acl_final_prefix="$prefix"
2252  fi
2253  if test "X$exec_prefix" = "XNONE"; then
2254    acl_final_exec_prefix='${prefix}'
2255  else
2256    acl_final_exec_prefix="$exec_prefix"
2257  fi
2258  acl_save_prefix="$prefix"
2259  prefix="$acl_final_prefix"
2260  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2261  prefix="$acl_save_prefix"
2262])
2263
2264dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2265dnl variables prefix and exec_prefix bound to the values they will have
2266dnl at the end of the configure script.
2267AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2268[
2269  acl_save_prefix="$prefix"
2270  prefix="$acl_final_prefix"
2271  acl_save_exec_prefix="$exec_prefix"
2272  exec_prefix="$acl_final_exec_prefix"
2273  $1
2274  exec_prefix="$acl_save_exec_prefix"
2275  prefix="$acl_save_prefix"
2276])
2277
2278dnl AC_LIB_PREPARE_MULTILIB creates
2279dnl - a variable acl_libdirstem, containing the basename of the libdir, either
2280dnl   "lib" or "lib64" or "lib/64",
2281dnl - a variable acl_libdirstem2, as a secondary possible value for
2282dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
2283dnl   "lib/amd64".
2284AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
2285[
2286  dnl There is no formal standard regarding lib and lib64.
2287  dnl On glibc systems, the current practice is that on a system supporting
2288  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2289  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
2290  dnl the compiler's default mode by looking at the compiler's library search
2291  dnl path. If at least one of its elements ends in /lib64 or points to a
2292  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
2293  dnl Otherwise we use the default, namely "lib".
2294  dnl On Solaris systems, the current practice is that on a system supporting
2295  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2296  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
2297  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
2298  AC_REQUIRE([AC_CANONICAL_HOST])
2299  acl_libdirstem=lib
2300  acl_libdirstem2=
2301  case "$host_os" in
2302    solaris*)
2303      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
2304      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
2305      dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
2306      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
2307      dnl symlink is missing, so we set acl_libdirstem2 too.
2308      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
2309        [AC_EGREP_CPP([sixtyfour bits], [
2310#ifdef _LP64
2311sixtyfour bits
2312#endif
2313           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
2314        ])
2315      if test $gl_cv_solaris_64bit = yes; then
2316        acl_libdirstem=lib/64
2317        case "$host_cpu" in
2318          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
2319          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
2320        esac
2321      fi
2322      ;;
2323    *)
2324      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
2325      if test -n "$searchpath"; then
2326        acl_save_IFS="${IFS= 	}"; IFS=":"
2327        for searchdir in $searchpath; do
2328          if test -d "$searchdir"; then
2329            case "$searchdir" in
2330              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
2331              */../ | */.. )
2332                # Better ignore directories of this form. They are misleading.
2333                ;;
2334              *) searchdir=`cd "$searchdir" && pwd`
2335                 case "$searchdir" in
2336                   */lib64 ) acl_libdirstem=lib64 ;;
2337                 esac ;;
2338            esac
2339          fi
2340        done
2341        IFS="$acl_save_IFS"
2342      fi
2343      ;;
2344  esac
2345  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
2346])
2347
2348# nls.m4 serial 5 (gettext-0.18)
2349dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
2350dnl Foundation, Inc.
2351dnl This file is free software; the Free Software Foundation
2352dnl gives unlimited permission to copy and/or distribute it,
2353dnl with or without modifications, as long as this notice is preserved.
2354dnl
2355dnl This file can be used in projects which are not available under
2356dnl the GNU General Public License or the GNU Library General Public
2357dnl License but which still want to provide support for the GNU gettext
2358dnl functionality.
2359dnl Please note that the actual code of the GNU gettext library is covered
2360dnl by the GNU Library General Public License, and the rest of the GNU
2361dnl gettext package is covered by the GNU General Public License.
2362dnl They are *not* in the public domain.
2363
2364dnl Authors:
2365dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2366dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2367
2368AC_PREREQ([2.50])
2369
2370AC_DEFUN([AM_NLS],
2371[
2372  AC_MSG_CHECKING([whether NLS is requested])
2373  dnl Default is enabled NLS
2374  AC_ARG_ENABLE([nls],
2375    [  --disable-nls           do not use Native Language Support],
2376    USE_NLS=$enableval, USE_NLS=yes)
2377  AC_MSG_RESULT([$USE_NLS])
2378  AC_SUBST([USE_NLS])
2379])
2380
2381# po.m4 serial 24 (gettext-0.19)
2382dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
2383dnl This file is free software; the Free Software Foundation
2384dnl gives unlimited permission to copy and/or distribute it,
2385dnl with or without modifications, as long as this notice is preserved.
2386dnl
2387dnl This file can be used in projects which are not available under
2388dnl the GNU General Public License or the GNU Library General Public
2389dnl License but which still want to provide support for the GNU gettext
2390dnl functionality.
2391dnl Please note that the actual code of the GNU gettext library is covered
2392dnl by the GNU Library General Public License, and the rest of the GNU
2393dnl gettext package is covered by the GNU General Public License.
2394dnl They are *not* in the public domain.
2395
2396dnl Authors:
2397dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2398dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2399
2400AC_PREREQ([2.60])
2401
2402dnl Checks for all prerequisites of the po subdirectory.
2403AC_DEFUN([AM_PO_SUBDIRS],
2404[
2405  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2406  AC_REQUIRE([AC_PROG_INSTALL])dnl
2407  AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2408  AC_REQUIRE([AC_PROG_SED])dnl
2409  AC_REQUIRE([AM_NLS])dnl
2410
2411  dnl Release version of the gettext macros. This is used to ensure that
2412  dnl the gettext macros and po/Makefile.in.in are in sync.
2413  AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
2414
2415  dnl Perform the following tests also if --disable-nls has been given,
2416  dnl because they are needed for "make dist" to work.
2417
2418  dnl Search for GNU msgfmt in the PATH.
2419  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2420  dnl The second test excludes FreeBSD msgfmt.
2421  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2422    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2423     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2424    :)
2425  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
2426
2427  dnl Test whether it is GNU msgfmt >= 0.15.
2428changequote(,)dnl
2429  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2430    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
2431    *) MSGFMT_015=$MSGFMT ;;
2432  esac
2433changequote([,])dnl
2434  AC_SUBST([MSGFMT_015])
2435changequote(,)dnl
2436  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2437    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
2438    *) GMSGFMT_015=$GMSGFMT ;;
2439  esac
2440changequote([,])dnl
2441  AC_SUBST([GMSGFMT_015])
2442
2443  dnl Search for GNU xgettext 0.12 or newer in the PATH.
2444  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2445  dnl The second test excludes FreeBSD xgettext.
2446  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2447    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2448     (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)],
2449    :)
2450  dnl Remove leftover from FreeBSD xgettext call.
2451  rm -f messages.po
2452
2453  dnl Test whether it is GNU xgettext >= 0.15.
2454changequote(,)dnl
2455  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2456    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2457    *) XGETTEXT_015=$XGETTEXT ;;
2458  esac
2459changequote([,])dnl
2460  AC_SUBST([XGETTEXT_015])
2461
2462  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2463  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2464    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2465
2466  dnl Installation directories.
2467  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2468  dnl have to define it here, so that it can be used in po/Makefile.
2469  test -n "$localedir" || localedir='${datadir}/locale'
2470  AC_SUBST([localedir])
2471
2472  dnl Support for AM_XGETTEXT_OPTION.
2473  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2474  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2475
2476  AC_CONFIG_COMMANDS([po-directories], [[
2477    for ac_file in $CONFIG_FILES; do
2478      # Support "outfile[:infile[:infile...]]"
2479      case "$ac_file" in
2480        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2481      esac
2482      # PO directories have a Makefile.in generated from Makefile.in.in.
2483      case "$ac_file" in */Makefile.in)
2484        # Adjust a relative srcdir.
2485        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2486        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2487        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2488        # In autoconf-2.13 it is called $ac_given_srcdir.
2489        # In autoconf-2.50 it is called $srcdir.
2490        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2491        case "$ac_given_srcdir" in
2492          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2493          /*) top_srcdir="$ac_given_srcdir" ;;
2494          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
2495        esac
2496        # Treat a directory as a PO directory if and only if it has a
2497        # POTFILES.in file. This allows packages to have multiple PO
2498        # directories under different names or in different locations.
2499        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2500          rm -f "$ac_dir/POTFILES"
2501          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2502          gt_tab=`printf '\t'`
2503          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"
2504          POMAKEFILEDEPS="POTFILES.in"
2505          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2506          # on $ac_dir but don't depend on user-specified configuration
2507          # parameters.
2508          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2509            # The LINGUAS file contains the set of available languages.
2510            if test -n "$OBSOLETE_ALL_LINGUAS"; then
2511              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2512            fi
2513            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2514            # Hide the ALL_LINGUAS assignment from automake < 1.5.
2515            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2516            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2517          else
2518            # The set of available languages was given in configure.in.
2519            # Hide the ALL_LINGUAS assignment from automake < 1.5.
2520            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2521          fi
2522          # Compute POFILES
2523          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2524          # Compute UPDATEPOFILES
2525          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2526          # Compute DUMMYPOFILES
2527          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2528          # Compute GMOFILES
2529          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2530          case "$ac_given_srcdir" in
2531            .) srcdirpre= ;;
2532            *) srcdirpre='$(srcdir)/' ;;
2533          esac
2534          POFILES=
2535          UPDATEPOFILES=
2536          DUMMYPOFILES=
2537          GMOFILES=
2538          for lang in $ALL_LINGUAS; do
2539            POFILES="$POFILES $srcdirpre$lang.po"
2540            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2541            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2542            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2543          done
2544          # CATALOGS depends on both $ac_dir and the user's LINGUAS
2545          # environment variable.
2546          INST_LINGUAS=
2547          if test -n "$ALL_LINGUAS"; then
2548            for presentlang in $ALL_LINGUAS; do
2549              useit=no
2550              if test "%UNSET%" != "$LINGUAS"; then
2551                desiredlanguages="$LINGUAS"
2552              else
2553                desiredlanguages="$ALL_LINGUAS"
2554              fi
2555              for desiredlang in $desiredlanguages; do
2556                # Use the presentlang catalog if desiredlang is
2557                #   a. equal to presentlang, or
2558                #   b. a variant of presentlang (because in this case,
2559                #      presentlang can be used as a fallback for messages
2560                #      which are not translated in the desiredlang catalog).
2561                case "$desiredlang" in
2562                  "$presentlang"*) useit=yes;;
2563                esac
2564              done
2565              if test $useit = yes; then
2566                INST_LINGUAS="$INST_LINGUAS $presentlang"
2567              fi
2568            done
2569          fi
2570          CATALOGS=
2571          if test -n "$INST_LINGUAS"; then
2572            for lang in $INST_LINGUAS; do
2573              CATALOGS="$CATALOGS $lang.gmo"
2574            done
2575          fi
2576          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2577          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"
2578          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2579            if test -f "$f"; then
2580              case "$f" in
2581                *.orig | *.bak | *~) ;;
2582                *) cat "$f" >> "$ac_dir/Makefile" ;;
2583              esac
2584            fi
2585          done
2586        fi
2587        ;;
2588      esac
2589    done]],
2590   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2591    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2592    # from automake < 1.5.
2593    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2594    # Capture the value of LINGUAS because we need it to compute CATALOGS.
2595    LINGUAS="${LINGUAS-%UNSET%}"
2596   ])
2597])
2598
2599dnl Postprocesses a Makefile in a directory containing PO files.
2600AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2601[
2602  # When this code is run, in config.status, two variables have already been
2603  # set:
2604  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2605  # - LINGUAS is the value of the environment variable LINGUAS at configure
2606  #   time.
2607
2608changequote(,)dnl
2609  # Adjust a relative srcdir.
2610  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2611  ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2612  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2613  # In autoconf-2.13 it is called $ac_given_srcdir.
2614  # In autoconf-2.50 it is called $srcdir.
2615  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2616  case "$ac_given_srcdir" in
2617    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2618    /*) top_srcdir="$ac_given_srcdir" ;;
2619    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
2620  esac
2621
2622  # Find a way to echo strings without interpreting backslash.
2623  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2624    gt_echo='echo'
2625  else
2626    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2627      gt_echo='printf %s\n'
2628    else
2629      echo_func () {
2630        cat <<EOT
2631$*
2632EOT
2633      }
2634      gt_echo='echo_func'
2635    fi
2636  fi
2637
2638  # A sed script that extracts the value of VARIABLE from a Makefile.
2639  tab=`printf '\t'`
2640  sed_x_variable='
2641# Test if the hold space is empty.
2642x
2643s/P/P/
2644x
2645ta
2646# Yes it was empty. Look if we have the expected variable definition.
2647/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
2648  # Seen the first line of the variable definition.
2649  s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
2650  ba
2651}
2652bd
2653:a
2654# Here we are processing a line from the variable definition.
2655# Remove comment, more precisely replace it with a space.
2656s/#.*$/ /
2657# See if the line ends in a backslash.
2658tb
2659:b
2660s/\\$//
2661# Print the line, without the trailing backslash.
2662p
2663tc
2664# There was no trailing backslash. The end of the variable definition is
2665# reached. Clear the hold space.
2666s/^.*$//
2667x
2668bd
2669:c
2670# A trailing backslash means that the variable definition continues in the
2671# next line. Put a nonempty string into the hold space to indicate this.
2672s/^.*$/P/
2673x
2674:d
2675'
2676changequote([,])dnl
2677
2678  # Set POTFILES to the value of the Makefile variable POTFILES.
2679  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2680  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2681  # Compute POTFILES_DEPS as
2682  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2683  POTFILES_DEPS=
2684  for file in $POTFILES; do
2685    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2686  done
2687  POMAKEFILEDEPS=""
2688
2689  if test -n "$OBSOLETE_ALL_LINGUAS"; then
2690    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2691  fi
2692  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2693    # The LINGUAS file contains the set of available languages.
2694    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2695    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2696  else
2697    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2698    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
2699    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2700  fi
2701  # Hide the ALL_LINGUAS assignment from automake < 1.5.
2702  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2703  # Compute POFILES
2704  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2705  # Compute UPDATEPOFILES
2706  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2707  # Compute DUMMYPOFILES
2708  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2709  # Compute GMOFILES
2710  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2711  # Compute PROPERTIESFILES
2712  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2713  # Compute CLASSFILES
2714  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2715  # Compute QMFILES
2716  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2717  # Compute MSGFILES
2718  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2719  # Compute RESOURCESDLLFILES
2720  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2721  case "$ac_given_srcdir" in
2722    .) srcdirpre= ;;
2723    *) srcdirpre='$(srcdir)/' ;;
2724  esac
2725  POFILES=
2726  UPDATEPOFILES=
2727  DUMMYPOFILES=
2728  GMOFILES=
2729  PROPERTIESFILES=
2730  CLASSFILES=
2731  QMFILES=
2732  MSGFILES=
2733  RESOURCESDLLFILES=
2734  for lang in $ALL_LINGUAS; do
2735    POFILES="$POFILES $srcdirpre$lang.po"
2736    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2737    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2738    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2739    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2740    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2741    QMFILES="$QMFILES $srcdirpre$lang.qm"
2742    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2743    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2744    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/'`
2745    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2746  done
2747  # CATALOGS depends on both $ac_dir and the user's LINGUAS
2748  # environment variable.
2749  INST_LINGUAS=
2750  if test -n "$ALL_LINGUAS"; then
2751    for presentlang in $ALL_LINGUAS; do
2752      useit=no
2753      if test "%UNSET%" != "$LINGUAS"; then
2754        desiredlanguages="$LINGUAS"
2755      else
2756        desiredlanguages="$ALL_LINGUAS"
2757      fi
2758      for desiredlang in $desiredlanguages; do
2759        # Use the presentlang catalog if desiredlang is
2760        #   a. equal to presentlang, or
2761        #   b. a variant of presentlang (because in this case,
2762        #      presentlang can be used as a fallback for messages
2763        #      which are not translated in the desiredlang catalog).
2764        case "$desiredlang" in
2765          "$presentlang"*) useit=yes;;
2766        esac
2767      done
2768      if test $useit = yes; then
2769        INST_LINGUAS="$INST_LINGUAS $presentlang"
2770      fi
2771    done
2772  fi
2773  CATALOGS=
2774  JAVACATALOGS=
2775  QTCATALOGS=
2776  TCLCATALOGS=
2777  CSHARPCATALOGS=
2778  if test -n "$INST_LINGUAS"; then
2779    for lang in $INST_LINGUAS; do
2780      CATALOGS="$CATALOGS $lang.gmo"
2781      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2782      QTCATALOGS="$QTCATALOGS $lang.qm"
2783      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2784      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2785      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/'`
2786      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2787    done
2788  fi
2789
2790  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"
2791  tab=`printf '\t'`
2792  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2793    # Add dependencies that cannot be formulated as a simple suffix rule.
2794    for lang in $ALL_LINGUAS; do
2795      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2796      cat >> "$ac_file.tmp" <<EOF
2797$frobbedlang.msg: $lang.po
2798${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2799${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2800EOF
2801    done
2802  fi
2803  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2804    # Add dependencies that cannot be formulated as a simple suffix rule.
2805    for lang in $ALL_LINGUAS; do
2806      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/'`
2807      cat >> "$ac_file.tmp" <<EOF
2808$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2809${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2810${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2811EOF
2812    done
2813  fi
2814  if test -n "$POMAKEFILEDEPS"; then
2815    cat >> "$ac_file.tmp" <<EOF
2816Makefile: $POMAKEFILEDEPS
2817EOF
2818  fi
2819  mv "$ac_file.tmp" "$ac_file"
2820])
2821
2822dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2823AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2824[
2825  XGETTEXT_EXTRA_OPTIONS=
2826])
2827
2828dnl Registers an option to be passed to xgettext in the po subdirectory.
2829AC_DEFUN([AM_XGETTEXT_OPTION],
2830[
2831  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2832  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2833])
2834
2835# progtest.m4 serial 7 (gettext-0.18.2)
2836dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
2837dnl This file is free software; the Free Software Foundation
2838dnl gives unlimited permission to copy and/or distribute it,
2839dnl with or without modifications, as long as this notice is preserved.
2840dnl
2841dnl This file can be used in projects which are not available under
2842dnl the GNU General Public License or the GNU Library General Public
2843dnl License but which still want to provide support for the GNU gettext
2844dnl functionality.
2845dnl Please note that the actual code of the GNU gettext library is covered
2846dnl by the GNU Library General Public License, and the rest of the GNU
2847dnl gettext package is covered by the GNU General Public License.
2848dnl They are *not* in the public domain.
2849
2850dnl Authors:
2851dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
2852
2853AC_PREREQ([2.50])
2854
2855# Search path for a program which passes the given test.
2856
2857dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2858dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2859AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2860[
2861# Prepare PATH_SEPARATOR.
2862# The user is always right.
2863if test "${PATH_SEPARATOR+set}" != set; then
2864  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
2865  # contains only /bin. Note that ksh looks also at the FPATH variable,
2866  # so we have to set that as well for the test.
2867  PATH_SEPARATOR=:
2868  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2869    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2870           || PATH_SEPARATOR=';'
2871       }
2872fi
2873
2874# Find out how to test for executable files. Don't use a zero-byte file,
2875# as systems may use methods other than mode bits to determine executability.
2876cat >conf$$.file <<_ASEOF
2877#! /bin/sh
2878exit 0
2879_ASEOF
2880chmod +x conf$$.file
2881if test -x conf$$.file >/dev/null 2>&1; then
2882  ac_executable_p="test -x"
2883else
2884  ac_executable_p="test -f"
2885fi
2886rm -f conf$$.file
2887
2888# Extract the first word of "$2", so it can be a program name with args.
2889set dummy $2; ac_word=[$]2
2890AC_MSG_CHECKING([for $ac_word])
2891AC_CACHE_VAL([ac_cv_path_$1],
2892[case "[$]$1" in
2893  [[\\/]]* | ?:[[\\/]]*)
2894    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2895    ;;
2896  *)
2897    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2898    for ac_dir in ifelse([$5], , $PATH, [$5]); do
2899      IFS="$ac_save_IFS"
2900      test -z "$ac_dir" && ac_dir=.
2901      for ac_exec_ext in '' $ac_executable_extensions; do
2902        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2903          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2904          if [$3]; then
2905            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2906            break 2
2907          fi
2908        fi
2909      done
2910    done
2911    IFS="$ac_save_IFS"
2912dnl If no 4th arg is given, leave the cache variable unset,
2913dnl so AC_PATH_PROGS will keep looking.
2914ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2915])dnl
2916    ;;
2917esac])dnl
2918$1="$ac_cv_path_$1"
2919if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2920  AC_MSG_RESULT([$][$1])
2921else
2922  AC_MSG_RESULT([no])
2923fi
2924AC_SUBST([$1])dnl
2925])
2926
2927AC_DEFUN([YELP_HELP_INIT],
2928[
2929AC_REQUIRE([AC_PROG_LN_S])
2930m4_pattern_allow([AM_V_at])
2931m4_pattern_allow([AM_V_GEN])
2932m4_pattern_allow([AM_DEFAULT_VERBOSITY])
2933
2934YELP_LC_MEDIA_LINKS=true
2935YELP_LC_DIST=true
2936
2937for yelpopt in [$1]; do
2938  case $yelpopt in
2939    lc-media-links)    YELP_LC_MEDIA_LINKS=true ;;
2940    no-lc-media-links) YELP_LC_MEDIA_LINKS= ;;
2941    lc-dist)           YELP_LC_DIST=true ;;
2942    no-lc-dist)        YELP_LC_DIST= ;;
2943    *) AC_MSG_ERROR([Unrecognized [YELP_HELP_INIT] option $yelpopt"]) ;;
2944  esac
2945done;
2946AC_SUBST([YELP_LC_MEDIA_LINKS])
2947AC_SUBST([YELP_LC_DIST])
2948
2949AC_ARG_WITH([help-dir],
2950            AS_HELP_STRING([--with-help-dir=DIR],
2951                           [path where help files are installed]),,
2952            [with_help_dir='${datadir}/help'])
2953HELP_DIR="$with_help_dir"
2954AC_SUBST(HELP_DIR)
2955
2956AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
2957AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
2958if test x"$ITSTOOL" = x; then
2959  AC_MSG_ERROR([itstool not found])
2960fi
2961
2962AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
2963AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
2964if test x"$XMLLINT" = x; then
2965  AC_MSG_ERROR([xmllint not found])
2966fi
2967
2968YELP_HELP_RULES='
2969HELP_ID ?=
2970HELP_POT ?=
2971HELP_FILES ?=
2972HELP_EXTRA ?=
2973HELP_MEDIA ?=
2974HELP_LINGUAS ?=
2975
2976_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
2977_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
2978_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
2979_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
2980_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
2981_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
2982_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
2983_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
2984_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
2985
2986_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
2987_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
2988_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
2989_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
2990_HELP_LC_VERBOSE_0 = @echo "  GEN    "$(dir [$]@);
2991
2992all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
2993
2994.PHONY: pot
2995pot: $(_HELP_POTFILE)
2996$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
2997	$(AM_V_GEN)if test -d "C"; then d=; else d="$(srcdir)/"; fi; \
2998	$(ITSTOOL) -o "[$]@" $(foreach f,$(_HELP_C_FILES),"$${d}$(f)")
2999
3000.PHONY: repo
3001repo: $(_HELP_POTFILE)
3002	$(AM_V_at)for po in $(_HELP_POFILES); do \
3003	  if test "x[$](_HELP_V)" = "x0"; then echo "  GEN    $${po}"; fi; \
3004	  msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
3005	done
3006
3007$(_HELP_POFILES):
3008	$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
3009	$(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
3010	$(AM_V_GEN)if ! test -f "[$]@"; then \
3011	  (cd "$(dir [$]@)" && \
3012	    $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
3013	    mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
3014	else \
3015	  (cd "$(dir [$]@)" && \
3016	    $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
3017	    msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
3018	    rm "$(notdir [$]@).tmp"); \
3019	fi
3020
3021$(_HELP_MOFILES): %.mo: %.po
3022	$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
3023	$(AM_V_GEN)msgfmt -o "[$]@" "$<"
3024
3025$(_HELP_LC_FILES): $(_HELP_LINGUAS)
3026$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
3027$(_HELP_LC_STAMPS): %.stamp: %.mo
3028$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
3029	$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
3030	$(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
3031	mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
3032	if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
3033	(cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
3034	touch "[$]@"
3035
3036.PHONY: clean-help
3037mostlyclean-am: $(if $(HELP_ID),clean-help)
3038clean-help:
3039	rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
3040
3041EXTRA_DIST ?=
3042EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
3043EXTRA_DIST += $(if $(YELP_LC_DIST),$(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp))
3044EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
3045EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
3046
3047distdir: distdir-help-files
3048distdir-help-files: $(_HELP_LC_FILES)
3049	@for lc in C $(if $(YELP_LC_DIST),$(HELP_LINGUAS)) ; do \
3050	  $(MKDIR_P) "$(distdir)/$$lc"; \
3051	  for file in $(HELP_FILES); do \
3052	    if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
3053	    cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
3054	  done; \
3055	done; \
3056
3057.PHONY: check-help
3058check: check-help
3059check-help:
3060	for lc in C $(_HELP_LINGUAS); do \
3061	  if test -d "$$lc"; \
3062	    then d=; \
3063	    xmlpath="$$lc"; \
3064	  else \
3065	    d="$(srcdir)/"; \
3066	    xmlpath="$$lc:$(srcdir)/$$lc"; \
3067	  fi; \
3068	  for page in $(HELP_FILES); do \
3069	    echo "$(XMLLINT) --nonet --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
3070	    $(XMLLINT) --nonet --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
3071	  done; \
3072	done
3073
3074
3075.PHONY: install-help
3076install-data-am: $(if $(HELP_ID),install-help)
3077install-help: $(_HELP_LC_FILES)
3078	@for lc in C $(_HELP_LINGUAS); do \
3079	  $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
3080	done
3081	@for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
3082	  if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
3083	  helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
3084	  if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
3085	  echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
3086	  $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
3087	done; done
3088	@for f in $(_HELP_C_EXTRA); do \
3089	  lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
3090	  if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
3091	  helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
3092	  if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
3093	  echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
3094	  $(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
3095	done
3096	@for f in $(HELP_MEDIA); do \
3097	  for lc in C $(_HELP_LINGUAS); do \
3098	    if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
3099	    helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
3100	    mdir=`dirname "$$f"`; \
3101	    if test "x$mdir" = "x."; then mdir=""; fi; \
3102	    if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
3103	    if test -f "$$d$$lc/$$f"; then \
3104	      echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
3105	      $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
3106	    elif test "x$$lc" != "xC"; then \
3107	      if test "x$(YELP_LC_MEDIA_LINKS)" != "x"; then \
3108	        echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
3109	        $(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
3110	      fi; \
3111	    fi; \
3112	  done; \
3113	done
3114
3115.PHONY: uninstall-help
3116uninstall-am: $(if $(HELP_ID),uninstall-help)
3117uninstall-help:
3118	for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
3119	  helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
3120	  echo "rm -f $$helpdir`basename $$f`"; \
3121	  rm -f "$$helpdir`basename $$f`"; \
3122	done; done
3123	@for f in $(_HELP_C_EXTRA); do \
3124	  lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
3125	  helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
3126	  echo "rm -f $$helpdir`basename $$f`"; \
3127	  rm -f "$$helpdir`basename $$f`"; \
3128	done
3129	@for f in $(HELP_MEDIA); do \
3130	  for lc in C $(_HELP_LINGUAS); do \
3131	    helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
3132	    echo "rm -f $$helpdir$$f"; \
3133	    rm -f "$$helpdir$$f"; \
3134	  done; \
3135	done;
3136'
3137AC_SUBST([YELP_HELP_RULES])
3138m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
3139])
3140
3141# Copyright (C) 2002-2020 Free Software Foundation, Inc.
3142#
3143# This file is free software; the Free Software Foundation
3144# gives unlimited permission to copy and/or distribute it,
3145# with or without modifications, as long as this notice is preserved.
3146
3147# AM_AUTOMAKE_VERSION(VERSION)
3148# ----------------------------
3149# Automake X.Y traces this macro to ensure aclocal.m4 has been
3150# generated from the m4 files accompanying Automake X.Y.
3151# (This private macro should not be called outside this file.)
3152AC_DEFUN([AM_AUTOMAKE_VERSION],
3153[am__api_version='1.16'
3154dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3155dnl require some minimum version.  Point them to the right macro.
3156m4_if([$1], [1.16.2], [],
3157      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3158])
3159
3160# _AM_AUTOCONF_VERSION(VERSION)
3161# -----------------------------
3162# aclocal traces this macro to find the Autoconf version.
3163# This is a private macro too.  Using m4_define simplifies
3164# the logic in aclocal, which can simply ignore this definition.
3165m4_define([_AM_AUTOCONF_VERSION], [])
3166
3167# AM_SET_CURRENT_AUTOMAKE_VERSION
3168# -------------------------------
3169# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
3170# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
3171AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
3172[AM_AUTOMAKE_VERSION([1.16.2])dnl
3173m4_ifndef([AC_AUTOCONF_VERSION],
3174  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
3175_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
3176
3177# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
3178
3179# Copyright (C) 2001-2020 Free Software Foundation, Inc.
3180#
3181# This file is free software; the Free Software Foundation
3182# gives unlimited permission to copy and/or distribute it,
3183# with or without modifications, as long as this notice is preserved.
3184
3185# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3186# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
3187# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
3188#
3189# Of course, Automake must honor this variable whenever it calls a
3190# tool from the auxiliary directory.  The problem is that $srcdir (and
3191# therefore $ac_aux_dir as well) can be either absolute or relative,
3192# depending on how configure is run.  This is pretty annoying, since
3193# it makes $ac_aux_dir quite unusable in subdirectories: in the top
3194# source directory, any form will work fine, but in subdirectories a
3195# relative path needs to be adjusted first.
3196#
3197# $ac_aux_dir/missing
3198#    fails when called from a subdirectory if $ac_aux_dir is relative
3199# $top_srcdir/$ac_aux_dir/missing
3200#    fails if $ac_aux_dir is absolute,
3201#    fails when called from a subdirectory in a VPATH build with
3202#          a relative $ac_aux_dir
3203#
3204# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3205# are both prefixed by $srcdir.  In an in-source build this is usually
3206# harmless because $srcdir is '.', but things will broke when you
3207# start a VPATH build or use an absolute $srcdir.
3208#
3209# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3210# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
3211#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3212# and then we would define $MISSING as
3213#   MISSING="\${SHELL} $am_aux_dir/missing"
3214# This will work as long as MISSING is not called from configure, because
3215# unfortunately $(top_srcdir) has no meaning in configure.
3216# However there are other variables, like CC, which are often used in
3217# configure, and could therefore not use this "fixed" $ac_aux_dir.
3218#
3219# Another solution, used here, is to always expand $ac_aux_dir to an
3220# absolute PATH.  The drawback is that using absolute paths prevent a
3221# configured tree to be moved without reconfiguration.
3222
3223AC_DEFUN([AM_AUX_DIR_EXPAND],
3224[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
3225# Expand $ac_aux_dir to an absolute path.
3226am_aux_dir=`cd "$ac_aux_dir" && pwd`
3227])
3228
3229# AM_CONDITIONAL                                            -*- Autoconf -*-
3230
3231# Copyright (C) 1997-2020 Free Software Foundation, Inc.
3232#
3233# This file is free software; the Free Software Foundation
3234# gives unlimited permission to copy and/or distribute it,
3235# with or without modifications, as long as this notice is preserved.
3236
3237# AM_CONDITIONAL(NAME, SHELL-CONDITION)
3238# -------------------------------------
3239# Define a conditional.
3240AC_DEFUN([AM_CONDITIONAL],
3241[AC_PREREQ([2.52])dnl
3242 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
3243       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
3244AC_SUBST([$1_TRUE])dnl
3245AC_SUBST([$1_FALSE])dnl
3246_AM_SUBST_NOTMAKE([$1_TRUE])dnl
3247_AM_SUBST_NOTMAKE([$1_FALSE])dnl
3248m4_define([_AM_COND_VALUE_$1], [$2])dnl
3249if $2; then
3250  $1_TRUE=
3251  $1_FALSE='#'
3252else
3253  $1_TRUE='#'
3254  $1_FALSE=
3255fi
3256AC_CONFIG_COMMANDS_PRE(
3257[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
3258  AC_MSG_ERROR([[conditional "$1" was never defined.
3259Usually this means the macro was only invoked conditionally.]])
3260fi])])
3261
3262# Copyright (C) 1999-2020 Free Software Foundation, Inc.
3263#
3264# This file is free software; the Free Software Foundation
3265# gives unlimited permission to copy and/or distribute it,
3266# with or without modifications, as long as this notice is preserved.
3267
3268
3269# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
3270# written in clear, in which case automake, when reading aclocal.m4,
3271# will think it sees a *use*, and therefore will trigger all it's
3272# C support machinery.  Also note that it means that autoscan, seeing
3273# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
3274
3275
3276# _AM_DEPENDENCIES(NAME)
3277# ----------------------
3278# See how the compiler implements dependency checking.
3279# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
3280# We try a few techniques and use that to set a single cache variable.
3281#
3282# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
3283# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
3284# dependency, and given that the user is not expected to run this macro,
3285# just rely on AC_PROG_CC.
3286AC_DEFUN([_AM_DEPENDENCIES],
3287[AC_REQUIRE([AM_SET_DEPDIR])dnl
3288AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
3289AC_REQUIRE([AM_MAKE_INCLUDE])dnl
3290AC_REQUIRE([AM_DEP_TRACK])dnl
3291
3292m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
3293      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
3294      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
3295      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
3296      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
3297      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
3298                    [depcc="$$1"   am_compiler_list=])
3299
3300AC_CACHE_CHECK([dependency style of $depcc],
3301               [am_cv_$1_dependencies_compiler_type],
3302[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3303  # We make a subdir and do the tests there.  Otherwise we can end up
3304  # making bogus files that we don't know about and never remove.  For
3305  # instance it was reported that on HP-UX the gcc test will end up
3306  # making a dummy file named 'D' -- because '-MD' means "put the output
3307  # in D".
3308  rm -rf conftest.dir
3309  mkdir conftest.dir
3310  # Copy depcomp to subdir because otherwise we won't find it if we're
3311  # using a relative directory.
3312  cp "$am_depcomp" conftest.dir
3313  cd conftest.dir
3314  # We will build objects and dependencies in a subdirectory because
3315  # it helps to detect inapplicable dependency modes.  For instance
3316  # both Tru64's cc and ICC support -MD to output dependencies as a
3317  # side effect of compilation, but ICC will put the dependencies in
3318  # the current directory while Tru64 will put them in the object
3319  # directory.
3320  mkdir sub
3321
3322  am_cv_$1_dependencies_compiler_type=none
3323  if test "$am_compiler_list" = ""; then
3324     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
3325  fi
3326  am__universal=false
3327  m4_case([$1], [CC],
3328    [case " $depcc " in #(
3329     *\ -arch\ *\ -arch\ *) am__universal=true ;;
3330     esac],
3331    [CXX],
3332    [case " $depcc " in #(
3333     *\ -arch\ *\ -arch\ *) am__universal=true ;;
3334     esac])
3335
3336  for depmode in $am_compiler_list; do
3337    # Setup a source with many dependencies, because some compilers
3338    # like to wrap large dependency lists on column 80 (with \), and
3339    # we should not choose a depcomp mode which is confused by this.
3340    #
3341    # We need to recreate these files for each test, as the compiler may
3342    # overwrite some of them when testing with obscure command lines.
3343    # This happens at least with the AIX C compiler.
3344    : > sub/conftest.c
3345    for i in 1 2 3 4 5 6; do
3346      echo '#include "conftst'$i'.h"' >> sub/conftest.c
3347      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3348      # Solaris 10 /bin/sh.
3349      echo '/* dummy */' > sub/conftst$i.h
3350    done
3351    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3352
3353    # We check with '-c' and '-o' for the sake of the "dashmstdout"
3354    # mode.  It turns out that the SunPro C++ compiler does not properly
3355    # handle '-M -o', and we need to detect this.  Also, some Intel
3356    # versions had trouble with output in subdirs.
3357    am__obj=sub/conftest.${OBJEXT-o}
3358    am__minus_obj="-o $am__obj"
3359    case $depmode in
3360    gcc)
3361      # This depmode causes a compiler race in universal mode.
3362      test "$am__universal" = false || continue
3363      ;;
3364    nosideeffect)
3365      # After this tag, mechanisms are not by side-effect, so they'll
3366      # only be used when explicitly requested.
3367      if test "x$enable_dependency_tracking" = xyes; then
3368	continue
3369      else
3370	break
3371      fi
3372      ;;
3373    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3374      # This compiler won't grok '-c -o', but also, the minuso test has
3375      # not run yet.  These depmodes are late enough in the game, and
3376      # so weak that their functioning should not be impacted.
3377      am__obj=conftest.${OBJEXT-o}
3378      am__minus_obj=
3379      ;;
3380    none) break ;;
3381    esac
3382    if depmode=$depmode \
3383       source=sub/conftest.c object=$am__obj \
3384       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3385       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3386         >/dev/null 2>conftest.err &&
3387       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3388       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3389       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3390       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3391      # icc doesn't choke on unknown options, it will just issue warnings
3392      # or remarks (even with -Werror).  So we grep stderr for any message
3393      # that says an option was ignored or not supported.
3394      # When given -MP, icc 7.0 and 7.1 complain thusly:
3395      #   icc: Command line warning: ignoring option '-M'; no argument required
3396      # The diagnosis changed in icc 8.0:
3397      #   icc: Command line remark: option '-MP' not supported
3398      if (grep 'ignoring option' conftest.err ||
3399          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3400        am_cv_$1_dependencies_compiler_type=$depmode
3401        break
3402      fi
3403    fi
3404  done
3405
3406  cd ..
3407  rm -rf conftest.dir
3408else
3409  am_cv_$1_dependencies_compiler_type=none
3410fi
3411])
3412AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3413AM_CONDITIONAL([am__fastdep$1], [
3414  test "x$enable_dependency_tracking" != xno \
3415  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3416])
3417
3418
3419# AM_SET_DEPDIR
3420# -------------
3421# Choose a directory name for dependency files.
3422# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3423AC_DEFUN([AM_SET_DEPDIR],
3424[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3425AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3426])
3427
3428
3429# AM_DEP_TRACK
3430# ------------
3431AC_DEFUN([AM_DEP_TRACK],
3432[AC_ARG_ENABLE([dependency-tracking], [dnl
3433AS_HELP_STRING(
3434  [--enable-dependency-tracking],
3435  [do not reject slow dependency extractors])
3436AS_HELP_STRING(
3437  [--disable-dependency-tracking],
3438  [speeds up one-time build])])
3439if test "x$enable_dependency_tracking" != xno; then
3440  am_depcomp="$ac_aux_dir/depcomp"
3441  AMDEPBACKSLASH='\'
3442  am__nodep='_no'
3443fi
3444AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3445AC_SUBST([AMDEPBACKSLASH])dnl
3446_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3447AC_SUBST([am__nodep])dnl
3448_AM_SUBST_NOTMAKE([am__nodep])dnl
3449])
3450
3451# Generate code to set up dependency tracking.              -*- Autoconf -*-
3452
3453# Copyright (C) 1999-2020 Free Software Foundation, Inc.
3454#
3455# This file is free software; the Free Software Foundation
3456# gives unlimited permission to copy and/or distribute it,
3457# with or without modifications, as long as this notice is preserved.
3458
3459# _AM_OUTPUT_DEPENDENCY_COMMANDS
3460# ------------------------------
3461AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3462[{
3463  # Older Autoconf quotes --file arguments for eval, but not when files
3464  # are listed without --file.  Let's play safe and only enable the eval
3465  # if we detect the quoting.
3466  # TODO: see whether this extra hack can be removed once we start
3467  # requiring Autoconf 2.70 or later.
3468  AS_CASE([$CONFIG_FILES],
3469          [*\'*], [eval set x "$CONFIG_FILES"],
3470          [*], [set x $CONFIG_FILES])
3471  shift
3472  # Used to flag and report bootstrapping failures.
3473  am_rc=0
3474  for am_mf
3475  do
3476    # Strip MF so we end up with the name of the file.
3477    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
3478    # Check whether this is an Automake generated Makefile which includes
3479    # dependency-tracking related rules and includes.
3480    # Grep'ing the whole file directly is not great: AIX grep has a line
3481    # limit of 2048, but all sed's we know have understand at least 4000.
3482    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
3483      || continue
3484    am_dirpart=`AS_DIRNAME(["$am_mf"])`
3485    am_filepart=`AS_BASENAME(["$am_mf"])`
3486    AM_RUN_LOG([cd "$am_dirpart" \
3487      && sed -e '/# am--include-marker/d' "$am_filepart" \
3488        | $MAKE -f - am--depfiles]) || am_rc=$?
3489  done
3490  if test $am_rc -ne 0; then
3491    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
3492    for automatic dependency tracking.  If GNU make was not used, consider
3493    re-running the configure script with MAKE="gmake" (or whatever is
3494    necessary).  You can also try re-running configure with the
3495    '--disable-dependency-tracking' option to at least be able to build
3496    the package (albeit without support for automatic dependency tracking).])
3497  fi
3498  AS_UNSET([am_dirpart])
3499  AS_UNSET([am_filepart])
3500  AS_UNSET([am_mf])
3501  AS_UNSET([am_rc])
3502  rm -f conftest-deps.mk
3503}
3504])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3505
3506
3507# AM_OUTPUT_DEPENDENCY_COMMANDS
3508# -----------------------------
3509# This macro should only be invoked once -- use via AC_REQUIRE.
3510#
3511# This code is only required when automatic dependency tracking is enabled.
3512# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
3513# order to bootstrap the dependency handling code.
3514AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3515[AC_CONFIG_COMMANDS([depfiles],
3516     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3517     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
3518
3519# Do all the work for Automake.                             -*- Autoconf -*-
3520
3521# Copyright (C) 1996-2020 Free Software Foundation, Inc.
3522#
3523# This file is free software; the Free Software Foundation
3524# gives unlimited permission to copy and/or distribute it,
3525# with or without modifications, as long as this notice is preserved.
3526
3527# This macro actually does too much.  Some checks are only needed if
3528# your package does certain things.  But this isn't really a big deal.
3529
3530dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
3531m4_define([AC_PROG_CC],
3532m4_defn([AC_PROG_CC])
3533[_AM_PROG_CC_C_O
3534])
3535
3536# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3537# AM_INIT_AUTOMAKE([OPTIONS])
3538# -----------------------------------------------
3539# The call with PACKAGE and VERSION arguments is the old style
3540# call (pre autoconf-2.50), which is being phased out.  PACKAGE
3541# and VERSION should now be passed to AC_INIT and removed from
3542# the call to AM_INIT_AUTOMAKE.
3543# We support both call styles for the transition.  After
3544# the next Automake release, Autoconf can make the AC_INIT
3545# arguments mandatory, and then we can depend on a new Autoconf
3546# release and drop the old call support.
3547AC_DEFUN([AM_INIT_AUTOMAKE],
3548[AC_PREREQ([2.65])dnl
3549dnl Autoconf wants to disallow AM_ names.  We explicitly allow
3550dnl the ones we care about.
3551m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3552AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3553AC_REQUIRE([AC_PROG_INSTALL])dnl
3554if test "`cd $srcdir && pwd`" != "`pwd`"; then
3555  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3556  # is not polluted with repeated "-I."
3557  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3558  # test to see if srcdir already configured
3559  if test -f $srcdir/config.status; then
3560    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3561  fi
3562fi
3563
3564# test whether we have cygpath
3565if test -z "$CYGPATH_W"; then
3566  if (cygpath --version) >/dev/null 2>/dev/null; then
3567    CYGPATH_W='cygpath -w'
3568  else
3569    CYGPATH_W=echo
3570  fi
3571fi
3572AC_SUBST([CYGPATH_W])
3573
3574# Define the identity of the package.
3575dnl Distinguish between old-style and new-style calls.
3576m4_ifval([$2],
3577[AC_DIAGNOSE([obsolete],
3578             [$0: two- and three-arguments forms are deprecated.])
3579m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3580 AC_SUBST([PACKAGE], [$1])dnl
3581 AC_SUBST([VERSION], [$2])],
3582[_AM_SET_OPTIONS([$1])dnl
3583dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3584m4_if(
3585  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
3586  [ok:ok],,
3587  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3588 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3589 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3590
3591_AM_IF_OPTION([no-define],,
3592[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
3593 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
3594
3595# Some tools Automake needs.
3596AC_REQUIRE([AM_SANITY_CHECK])dnl
3597AC_REQUIRE([AC_ARG_PROGRAM])dnl
3598AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
3599AM_MISSING_PROG([AUTOCONF], [autoconf])
3600AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
3601AM_MISSING_PROG([AUTOHEADER], [autoheader])
3602AM_MISSING_PROG([MAKEINFO], [makeinfo])
3603AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3604AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3605AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3606# For better backward compatibility.  To be removed once Automake 1.9.x
3607# dies out for good.  For more background, see:
3608# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3609# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3610AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
3611# We need awk for the "check" target (and possibly the TAP driver).  The
3612# system "awk" is bad on some platforms.
3613AC_REQUIRE([AC_PROG_AWK])dnl
3614AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3615AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3616_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3617	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3618			     [_AM_PROG_TAR([v7])])])
3619_AM_IF_OPTION([no-dependencies],,
3620[AC_PROVIDE_IFELSE([AC_PROG_CC],
3621		  [_AM_DEPENDENCIES([CC])],
3622		  [m4_define([AC_PROG_CC],
3623			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
3624AC_PROVIDE_IFELSE([AC_PROG_CXX],
3625		  [_AM_DEPENDENCIES([CXX])],
3626		  [m4_define([AC_PROG_CXX],
3627			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
3628AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3629		  [_AM_DEPENDENCIES([OBJC])],
3630		  [m4_define([AC_PROG_OBJC],
3631			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
3632AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
3633		  [_AM_DEPENDENCIES([OBJCXX])],
3634		  [m4_define([AC_PROG_OBJCXX],
3635			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
3636])
3637AC_REQUIRE([AM_SILENT_RULES])dnl
3638dnl The testsuite driver may need to know about EXEEXT, so add the
3639dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
3640dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
3641AC_CONFIG_COMMANDS_PRE(dnl
3642[m4_provide_if([_AM_COMPILER_EXEEXT],
3643  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3644
3645# POSIX will say in a future version that running "rm -f" with no argument
3646# is OK; and we want to be able to make that assumption in our Makefile
3647# recipes.  So use an aggressive probe to check that the usage we want is
3648# actually supported "in the wild" to an acceptable degree.
3649# See automake bug#10828.
3650# To make any issue more visible, cause the running configure to be aborted
3651# by default if the 'rm' program in use doesn't match our expectations; the
3652# user can still override this though.
3653if rm -f && rm -fr && rm -rf; then : OK; else
3654  cat >&2 <<'END'
3655Oops!
3656
3657Your 'rm' program seems unable to run without file operands specified
3658on the command line, even when the '-f' option is present.  This is contrary
3659to the behaviour of most rm programs out there, and not conforming with
3660the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3661
3662Please tell bug-automake@gnu.org about your system, including the value
3663of your $PATH and any error possibly output before this message.  This
3664can help us improve future automake versions.
3665
3666END
3667  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3668    echo 'Configuration will proceed anyway, since you have set the' >&2
3669    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3670    echo >&2
3671  else
3672    cat >&2 <<'END'
3673Aborting the configuration process, to ensure you take notice of the issue.
3674
3675You can download and install GNU coreutils to get an 'rm' implementation
3676that behaves properly: <https://www.gnu.org/software/coreutils/>.
3677
3678If you want to complete the configuration process using your problematic
3679'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3680to "yes", and re-run configure.
3681
3682END
3683    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
3684  fi
3685fi
3686dnl The trailing newline in this macro's definition is deliberate, for
3687dnl backward compatibility and to allow trailing 'dnl'-style comments
3688dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
3689])
3690
3691dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
3692dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3693dnl mangled by Autoconf and run in a shell conditional statement.
3694m4_define([_AC_COMPILER_EXEEXT],
3695m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3696
3697# When config.status generates a header, we must update the stamp-h file.
3698# This file resides in the same directory as the config header
3699# that is generated.  The stamp files are numbered to have different names.
3700
3701# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3702# loop where config.status creates the headers, so we can generate
3703# our stamp files there.
3704AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3705[# Compute $1's index in $config_headers.
3706_am_arg=$1
3707_am_stamp_count=1
3708for _am_header in $config_headers :; do
3709  case $_am_header in
3710    $_am_arg | $_am_arg:* )
3711      break ;;
3712    * )
3713      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3714  esac
3715done
3716echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3717
3718# Copyright (C) 2001-2020 Free Software Foundation, Inc.
3719#
3720# This file is free software; the Free Software Foundation
3721# gives unlimited permission to copy and/or distribute it,
3722# with or without modifications, as long as this notice is preserved.
3723
3724# AM_PROG_INSTALL_SH
3725# ------------------
3726# Define $install_sh.
3727AC_DEFUN([AM_PROG_INSTALL_SH],
3728[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3729if test x"${install_sh+set}" != xset; then
3730  case $am_aux_dir in
3731  *\ * | *\	*)
3732    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3733  *)
3734    install_sh="\${SHELL} $am_aux_dir/install-sh"
3735  esac
3736fi
3737AC_SUBST([install_sh])])
3738
3739# Copyright (C) 2003-2020 Free Software Foundation, Inc.
3740#
3741# This file is free software; the Free Software Foundation
3742# gives unlimited permission to copy and/or distribute it,
3743# with or without modifications, as long as this notice is preserved.
3744
3745# Check whether the underlying file-system supports filenames
3746# with a leading dot.  For instance MS-DOS doesn't.
3747AC_DEFUN([AM_SET_LEADING_DOT],
3748[rm -rf .tst 2>/dev/null
3749mkdir .tst 2>/dev/null
3750if test -d .tst; then
3751  am__leading_dot=.
3752else
3753  am__leading_dot=_
3754fi
3755rmdir .tst 2>/dev/null
3756AC_SUBST([am__leading_dot])])
3757
3758# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
3759# From Jim Meyering
3760
3761# Copyright (C) 1996-2020 Free Software Foundation, Inc.
3762#
3763# This file is free software; the Free Software Foundation
3764# gives unlimited permission to copy and/or distribute it,
3765# with or without modifications, as long as this notice is preserved.
3766
3767# AM_MAINTAINER_MODE([DEFAULT-MODE])
3768# ----------------------------------
3769# Control maintainer-specific portions of Makefiles.
3770# Default is to disable them, unless 'enable' is passed literally.
3771# For symmetry, 'disable' may be passed as well.  Anyway, the user
3772# can override the default with the --enable/--disable switch.
3773AC_DEFUN([AM_MAINTAINER_MODE],
3774[m4_case(m4_default([$1], [disable]),
3775       [enable], [m4_define([am_maintainer_other], [disable])],
3776       [disable], [m4_define([am_maintainer_other], [enable])],
3777       [m4_define([am_maintainer_other], [enable])
3778        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
3779AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
3780  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
3781  AC_ARG_ENABLE([maintainer-mode],
3782    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
3783      am_maintainer_other[ make rules and dependencies not useful
3784      (and sometimes confusing) to the casual installer])],
3785    [USE_MAINTAINER_MODE=$enableval],
3786    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
3787  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
3788  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
3789  MAINT=$MAINTAINER_MODE_TRUE
3790  AC_SUBST([MAINT])dnl
3791]
3792)
3793
3794# Check to see how 'make' treats includes.	            -*- Autoconf -*-
3795
3796# Copyright (C) 2001-2020 Free Software Foundation, Inc.
3797#
3798# This file is free software; the Free Software Foundation
3799# gives unlimited permission to copy and/or distribute it,
3800# with or without modifications, as long as this notice is preserved.
3801
3802# AM_MAKE_INCLUDE()
3803# -----------------
3804# Check whether make has an 'include' directive that can support all
3805# the idioms we need for our automatic dependency tracking code.
3806AC_DEFUN([AM_MAKE_INCLUDE],
3807[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
3808cat > confinc.mk << 'END'
3809am__doit:
3810	@echo this is the am__doit target >confinc.out
3811.PHONY: am__doit
3812END
3813am__include="#"
3814am__quote=
3815# BSD make does it like this.
3816echo '.include "confinc.mk" # ignored' > confmf.BSD
3817# Other make implementations (GNU, Solaris 10, AIX) do it like this.
3818echo 'include confinc.mk # ignored' > confmf.GNU
3819_am_result=no
3820for s in GNU BSD; do
3821  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
3822  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
3823      ['0:this is the am__doit target'],
3824      [AS_CASE([$s],
3825          [BSD], [am__include='.include' am__quote='"'],
3826          [am__include='include' am__quote=''])])
3827  if test "$am__include" != "#"; then
3828    _am_result="yes ($s style)"
3829    break
3830  fi
3831done
3832rm -f confinc.* confmf.*
3833AC_MSG_RESULT([${_am_result}])
3834AC_SUBST([am__include])])
3835AC_SUBST([am__quote])])
3836
3837# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
3838
3839# Copyright (C) 1997-2020 Free Software Foundation, Inc.
3840#
3841# This file is free software; the Free Software Foundation
3842# gives unlimited permission to copy and/or distribute it,
3843# with or without modifications, as long as this notice is preserved.
3844
3845# AM_MISSING_PROG(NAME, PROGRAM)
3846# ------------------------------
3847AC_DEFUN([AM_MISSING_PROG],
3848[AC_REQUIRE([AM_MISSING_HAS_RUN])
3849$1=${$1-"${am_missing_run}$2"}
3850AC_SUBST($1)])
3851
3852# AM_MISSING_HAS_RUN
3853# ------------------
3854# Define MISSING if not defined so far and test if it is modern enough.
3855# If it is, set am_missing_run to use it, otherwise, to nothing.
3856AC_DEFUN([AM_MISSING_HAS_RUN],
3857[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3858AC_REQUIRE_AUX_FILE([missing])dnl
3859if test x"${MISSING+set}" != xset; then
3860  case $am_aux_dir in
3861  *\ * | *\	*)
3862    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3863  *)
3864    MISSING="\${SHELL} $am_aux_dir/missing" ;;
3865  esac
3866fi
3867# Use eval to expand $SHELL
3868if eval "$MISSING --is-lightweight"; then
3869  am_missing_run="$MISSING "
3870else
3871  am_missing_run=
3872  AC_MSG_WARN(['missing' script is too old or missing])
3873fi
3874])
3875
3876# Helper functions for option handling.                     -*- Autoconf -*-
3877
3878# Copyright (C) 2001-2020 Free Software Foundation, Inc.
3879#
3880# This file is free software; the Free Software Foundation
3881# gives unlimited permission to copy and/or distribute it,
3882# with or without modifications, as long as this notice is preserved.
3883
3884# _AM_MANGLE_OPTION(NAME)
3885# -----------------------
3886AC_DEFUN([_AM_MANGLE_OPTION],
3887[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3888
3889# _AM_SET_OPTION(NAME)
3890# --------------------
3891# Set option NAME.  Presently that only means defining a flag for this option.
3892AC_DEFUN([_AM_SET_OPTION],
3893[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
3894
3895# _AM_SET_OPTIONS(OPTIONS)
3896# ------------------------
3897# OPTIONS is a space-separated list of Automake options.
3898AC_DEFUN([_AM_SET_OPTIONS],
3899[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3900
3901# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3902# -------------------------------------------
3903# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3904AC_DEFUN([_AM_IF_OPTION],
3905[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3906
3907# Copyright (C) 1999-2020 Free Software Foundation, Inc.
3908#
3909# This file is free software; the Free Software Foundation
3910# gives unlimited permission to copy and/or distribute it,
3911# with or without modifications, as long as this notice is preserved.
3912
3913# _AM_PROG_CC_C_O
3914# ---------------
3915# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
3916# to automatically call this.
3917AC_DEFUN([_AM_PROG_CC_C_O],
3918[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3919AC_REQUIRE_AUX_FILE([compile])dnl
3920AC_LANG_PUSH([C])dnl
3921AC_CACHE_CHECK(
3922  [whether $CC understands -c and -o together],
3923  [am_cv_prog_cc_c_o],
3924  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
3925  # Make sure it works both with $CC and with simple cc.
3926  # Following AC_PROG_CC_C_O, we do the test twice because some
3927  # compilers refuse to overwrite an existing .o file with -o,
3928  # though they will create one.
3929  am_cv_prog_cc_c_o=yes
3930  for am_i in 1 2; do
3931    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
3932         && test -f conftest2.$ac_objext; then
3933      : OK
3934    else
3935      am_cv_prog_cc_c_o=no
3936      break
3937    fi
3938  done
3939  rm -f core conftest*
3940  unset am_i])
3941if test "$am_cv_prog_cc_c_o" != yes; then
3942   # Losing compiler, so override with the script.
3943   # FIXME: It is wrong to rewrite CC.
3944   # But if we don't then we get into trouble of one sort or another.
3945   # A longer-term fix would be to have automake use am__CC in this case,
3946   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3947   CC="$am_aux_dir/compile $CC"
3948fi
3949AC_LANG_POP([C])])
3950
3951# For backward compatibility.
3952AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
3953
3954# Copyright (C) 1999-2020 Free Software Foundation, Inc.
3955#
3956# This file is free software; the Free Software Foundation
3957# gives unlimited permission to copy and/or distribute it,
3958# with or without modifications, as long as this notice is preserved.
3959
3960
3961# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3962# ---------------------------------------------------------------------------
3963# Adds support for distributing Python modules and packages.  To
3964# install modules, copy them to $(pythondir), using the python_PYTHON
3965# automake variable.  To install a package with the same name as the
3966# automake package, install to $(pkgpythondir), or use the
3967# pkgpython_PYTHON automake variable.
3968#
3969# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
3970# locations to install python extension modules (shared libraries).
3971# Another macro is required to find the appropriate flags to compile
3972# extension modules.
3973#
3974# If your package is configured with a different prefix to python,
3975# users will have to add the install directory to the PYTHONPATH
3976# environment variable, or create a .pth file (see the python
3977# documentation for details).
3978#
3979# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
3980# cause an error if the version of python installed on the system
3981# doesn't meet the requirement.  MINIMUM-VERSION should consist of
3982# numbers and dots only.
3983AC_DEFUN([AM_PATH_PYTHON],
3984 [
3985  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
3986  dnl supported. (2.0 was released on October 16, 2000).
3987  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
3988[python python2 python3 dnl
3989 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
3990 python3.2 python3.1 python3.0 dnl
3991 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
3992 python2.0])
3993
3994  AC_ARG_VAR([PYTHON], [the Python interpreter])
3995
3996  m4_if([$1],[],[
3997    dnl No version check is needed.
3998    # Find any Python interpreter.
3999    if test -z "$PYTHON"; then
4000      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
4001    fi
4002    am_display_PYTHON=python
4003  ], [
4004    dnl A version check is needed.
4005    if test -n "$PYTHON"; then
4006      # If the user set $PYTHON, use it and don't search something else.
4007      AC_MSG_CHECKING([whether $PYTHON version is >= $1])
4008      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
4009			      [AC_MSG_RESULT([yes])],
4010			      [AC_MSG_RESULT([no])
4011			       AC_MSG_ERROR([Python interpreter is too old])])
4012      am_display_PYTHON=$PYTHON
4013    else
4014      # Otherwise, try each interpreter until we find one that satisfies
4015      # VERSION.
4016      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
4017	[am_cv_pathless_PYTHON],[
4018	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
4019	  test "$am_cv_pathless_PYTHON" = none && break
4020	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
4021	done])
4022      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
4023      if test "$am_cv_pathless_PYTHON" = none; then
4024	PYTHON=:
4025      else
4026        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
4027      fi
4028      am_display_PYTHON=$am_cv_pathless_PYTHON
4029    fi
4030  ])
4031
4032  if test "$PYTHON" = :; then
4033  dnl Run any user-specified action, or abort.
4034    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
4035  else
4036
4037  dnl Query Python for its version number.  Getting [:3] seems to be
4038  dnl the best way to do this; it's what "site.py" does in the standard
4039  dnl library.
4040
4041  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
4042    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
4043  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
4044
4045  dnl Use the values of $prefix and $exec_prefix for the corresponding
4046  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
4047  dnl distinct variables so they can be overridden if need be.  However,
4048  dnl general consensus is that you shouldn't need this ability.
4049
4050  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
4051  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
4052
4053  dnl At times (like when building shared libraries) you may want
4054  dnl to know which OS platform Python thinks this is.
4055
4056  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
4057    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
4058  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
4059
4060  # Just factor out some code duplication.
4061  am_python_setup_sysconfig="\
4062import sys
4063# Prefer sysconfig over distutils.sysconfig, for better compatibility
4064# with python 3.x.  See automake bug#10227.
4065try:
4066    import sysconfig
4067except ImportError:
4068    can_use_sysconfig = 0
4069else:
4070    can_use_sysconfig = 1
4071# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
4072# <https://github.com/pypa/virtualenv/issues/118>
4073try:
4074    from platform import python_implementation
4075    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
4076        can_use_sysconfig = 0
4077except ImportError:
4078    pass"
4079
4080  dnl Set up 4 directories:
4081
4082  dnl pythondir -- where to install python scripts.  This is the
4083  dnl   site-packages directory, not the python standard library
4084  dnl   directory like in previous automake betas.  This behavior
4085  dnl   is more consistent with lispdir.m4 for example.
4086  dnl Query distutils for this directory.
4087  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
4088    [am_cv_python_pythondir],
4089    [if test "x$prefix" = xNONE
4090     then
4091       am_py_prefix=$ac_default_prefix
4092     else
4093       am_py_prefix=$prefix
4094     fi
4095     am_cv_python_pythondir=`$PYTHON -c "
4096$am_python_setup_sysconfig
4097if can_use_sysconfig:
4098    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
4099else:
4100    from distutils import sysconfig
4101    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
4102sys.stdout.write(sitedir)"`
4103     case $am_cv_python_pythondir in
4104     $am_py_prefix*)
4105       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
4106       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
4107       ;;
4108     *)
4109       case $am_py_prefix in
4110         /usr|/System*) ;;
4111         *)
4112	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
4113	  ;;
4114       esac
4115       ;;
4116     esac
4117    ])
4118  AC_SUBST([pythondir], [$am_cv_python_pythondir])
4119
4120  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
4121  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
4122  dnl   more consistent with the rest of automake.
4123
4124  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
4125
4126  dnl pyexecdir -- directory for installing python extension modules
4127  dnl   (shared libraries)
4128  dnl Query distutils for this directory.
4129  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
4130    [am_cv_python_pyexecdir],
4131    [if test "x$exec_prefix" = xNONE
4132     then
4133       am_py_exec_prefix=$am_py_prefix
4134     else
4135       am_py_exec_prefix=$exec_prefix
4136     fi
4137     am_cv_python_pyexecdir=`$PYTHON -c "
4138$am_python_setup_sysconfig
4139if can_use_sysconfig:
4140    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
4141else:
4142    from distutils import sysconfig
4143    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
4144sys.stdout.write(sitedir)"`
4145     case $am_cv_python_pyexecdir in
4146     $am_py_exec_prefix*)
4147       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
4148       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
4149       ;;
4150     *)
4151       case $am_py_exec_prefix in
4152         /usr|/System*) ;;
4153         *)
4154	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
4155	   ;;
4156       esac
4157       ;;
4158     esac
4159    ])
4160  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
4161
4162  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
4163
4164  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
4165
4166  dnl Run any user-specified action.
4167  $2
4168  fi
4169
4170])
4171
4172
4173# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
4174# ---------------------------------------------------------------------------
4175# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
4176# Run ACTION-IF-FALSE otherwise.
4177# This test uses sys.hexversion instead of the string equivalent (first
4178# word of sys.version), in order to cope with versions such as 2.2c1.
4179# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
4180AC_DEFUN([AM_PYTHON_CHECK_VERSION],
4181 [prog="import sys
4182# split strings by '.' and convert to numeric.  Append some zeros
4183# because we need at least 4 digits for the hex conversion.
4184# map returns an iterator in Python 3.0 and a list in 2.x
4185minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
4186minverhex = 0
4187# xrange is not present in Python 3.0 and range returns an iterator
4188for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
4189sys.exit(sys.hexversion < minverhex)"
4190  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
4191
4192# Copyright (C) 2001-2020 Free Software Foundation, Inc.
4193#
4194# This file is free software; the Free Software Foundation
4195# gives unlimited permission to copy and/or distribute it,
4196# with or without modifications, as long as this notice is preserved.
4197
4198# AM_RUN_LOG(COMMAND)
4199# -------------------
4200# Run COMMAND, save the exit status in ac_status, and log it.
4201# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
4202AC_DEFUN([AM_RUN_LOG],
4203[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
4204   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
4205   ac_status=$?
4206   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4207   (exit $ac_status); }])
4208
4209# Check to make sure that the build environment is sane.    -*- Autoconf -*-
4210
4211# Copyright (C) 1996-2020 Free Software Foundation, Inc.
4212#
4213# This file is free software; the Free Software Foundation
4214# gives unlimited permission to copy and/or distribute it,
4215# with or without modifications, as long as this notice is preserved.
4216
4217# AM_SANITY_CHECK
4218# ---------------
4219AC_DEFUN([AM_SANITY_CHECK],
4220[AC_MSG_CHECKING([whether build environment is sane])
4221# Reject unsafe characters in $srcdir or the absolute working directory
4222# name.  Accept space and tab only in the latter.
4223am_lf='
4224'
4225case `pwd` in
4226  *[[\\\"\#\$\&\'\`$am_lf]]*)
4227    AC_MSG_ERROR([unsafe absolute working directory name]);;
4228esac
4229case $srcdir in
4230  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
4231    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
4232esac
4233
4234# Do 'set' in a subshell so we don't clobber the current shell's
4235# arguments.  Must try -L first in case configure is actually a
4236# symlink; some systems play weird games with the mod time of symlinks
4237# (eg FreeBSD returns the mod time of the symlink's containing
4238# directory).
4239if (
4240   am_has_slept=no
4241   for am_try in 1 2; do
4242     echo "timestamp, slept: $am_has_slept" > conftest.file
4243     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4244     if test "$[*]" = "X"; then
4245	# -L didn't work.
4246	set X `ls -t "$srcdir/configure" conftest.file`
4247     fi
4248     if test "$[*]" != "X $srcdir/configure conftest.file" \
4249	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
4250
4251	# If neither matched, then we have a broken ls.  This can happen
4252	# if, for instance, CONFIG_SHELL is bash and it inherits a
4253	# broken ls alias from the environment.  This has actually
4254	# happened.  Such a system could not be considered "sane".
4255	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
4256  alias in your environment])
4257     fi
4258     if test "$[2]" = conftest.file || test $am_try -eq 2; then
4259       break
4260     fi
4261     # Just in case.
4262     sleep 1
4263     am_has_slept=yes
4264   done
4265   test "$[2]" = conftest.file
4266   )
4267then
4268   # Ok.
4269   :
4270else
4271   AC_MSG_ERROR([newly created file is older than distributed files!
4272Check your system clock])
4273fi
4274AC_MSG_RESULT([yes])
4275# If we didn't sleep, we still need to ensure time stamps of config.status and
4276# generated files are strictly newer.
4277am_sleep_pid=
4278if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4279  ( sleep 1 ) &
4280  am_sleep_pid=$!
4281fi
4282AC_CONFIG_COMMANDS_PRE(
4283  [AC_MSG_CHECKING([that generated files are newer than configure])
4284   if test -n "$am_sleep_pid"; then
4285     # Hide warnings about reused PIDs.
4286     wait $am_sleep_pid 2>/dev/null
4287   fi
4288   AC_MSG_RESULT([done])])
4289rm -f conftest.file
4290])
4291
4292# Copyright (C) 2009-2020 Free Software Foundation, Inc.
4293#
4294# This file is free software; the Free Software Foundation
4295# gives unlimited permission to copy and/or distribute it,
4296# with or without modifications, as long as this notice is preserved.
4297
4298# AM_SILENT_RULES([DEFAULT])
4299# --------------------------
4300# Enable less verbose build rules; with the default set to DEFAULT
4301# ("yes" being less verbose, "no" or empty being verbose).
4302AC_DEFUN([AM_SILENT_RULES],
4303[AC_ARG_ENABLE([silent-rules], [dnl
4304AS_HELP_STRING(
4305  [--enable-silent-rules],
4306  [less verbose build output (undo: "make V=1")])
4307AS_HELP_STRING(
4308  [--disable-silent-rules],
4309  [verbose build output (undo: "make V=0")])dnl
4310])
4311case $enable_silent_rules in @%:@ (((
4312  yes) AM_DEFAULT_VERBOSITY=0;;
4313   no) AM_DEFAULT_VERBOSITY=1;;
4314    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
4315esac
4316dnl
4317dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
4318dnl do not support nested variable expansions.
4319dnl See automake bug#9928 and bug#10237.
4320am_make=${MAKE-make}
4321AC_CACHE_CHECK([whether $am_make supports nested variables],
4322   [am_cv_make_support_nested_variables],
4323   [if AS_ECHO([['TRUE=$(BAR$(V))
4324BAR0=false
4325BAR1=true
4326V=1
4327am__doit:
4328	@$(TRUE)
4329.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
4330  am_cv_make_support_nested_variables=yes
4331else
4332  am_cv_make_support_nested_variables=no
4333fi])
4334if test $am_cv_make_support_nested_variables = yes; then
4335  dnl Using '$V' instead of '$(V)' breaks IRIX make.
4336  AM_V='$(V)'
4337  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4338else
4339  AM_V=$AM_DEFAULT_VERBOSITY
4340  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4341fi
4342AC_SUBST([AM_V])dnl
4343AM_SUBST_NOTMAKE([AM_V])dnl
4344AC_SUBST([AM_DEFAULT_V])dnl
4345AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
4346AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
4347AM_BACKSLASH='\'
4348AC_SUBST([AM_BACKSLASH])dnl
4349_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
4350])
4351
4352# Copyright (C) 2001-2020 Free Software Foundation, Inc.
4353#
4354# This file is free software; the Free Software Foundation
4355# gives unlimited permission to copy and/or distribute it,
4356# with or without modifications, as long as this notice is preserved.
4357
4358# AM_PROG_INSTALL_STRIP
4359# ---------------------
4360# One issue with vendor 'install' (even GNU) is that you can't
4361# specify the program used to strip binaries.  This is especially
4362# annoying in cross-compiling environments, where the build's strip
4363# is unlikely to handle the host's binaries.
4364# Fortunately install-sh will honor a STRIPPROG variable, so we
4365# always use install-sh in "make install-strip", and initialize
4366# STRIPPROG with the value of the STRIP variable (set by the user).
4367AC_DEFUN([AM_PROG_INSTALL_STRIP],
4368[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4369# Installed binaries are usually stripped using 'strip' when the user
4370# run "make install-strip".  However 'strip' might not be the right
4371# tool to use in cross-compilation environments, therefore Automake
4372# will honor the 'STRIP' environment variable to overrule this program.
4373dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
4374if test "$cross_compiling" != no; then
4375  AC_CHECK_TOOL([STRIP], [strip], :)
4376fi
4377INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4378AC_SUBST([INSTALL_STRIP_PROGRAM])])
4379
4380# Copyright (C) 2006-2020 Free Software Foundation, Inc.
4381#
4382# This file is free software; the Free Software Foundation
4383# gives unlimited permission to copy and/or distribute it,
4384# with or without modifications, as long as this notice is preserved.
4385
4386# _AM_SUBST_NOTMAKE(VARIABLE)
4387# ---------------------------
4388# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
4389# This macro is traced by Automake.
4390AC_DEFUN([_AM_SUBST_NOTMAKE])
4391
4392# AM_SUBST_NOTMAKE(VARIABLE)
4393# --------------------------
4394# Public sister of _AM_SUBST_NOTMAKE.
4395AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
4396
4397# Check how to create a tarball.                            -*- Autoconf -*-
4398
4399# Copyright (C) 2004-2020 Free Software Foundation, Inc.
4400#
4401# This file is free software; the Free Software Foundation
4402# gives unlimited permission to copy and/or distribute it,
4403# with or without modifications, as long as this notice is preserved.
4404
4405# _AM_PROG_TAR(FORMAT)
4406# --------------------
4407# Check how to create a tarball in format FORMAT.
4408# FORMAT should be one of 'v7', 'ustar', or 'pax'.
4409#
4410# Substitute a variable $(am__tar) that is a command
4411# writing to stdout a FORMAT-tarball containing the directory
4412# $tardir.
4413#     tardir=directory && $(am__tar) > result.tar
4414#
4415# Substitute a variable $(am__untar) that extract such
4416# a tarball read from stdin.
4417#     $(am__untar) < result.tar
4418#
4419AC_DEFUN([_AM_PROG_TAR],
4420[# Always define AMTAR for backward compatibility.  Yes, it's still used
4421# in the wild :-(  We should find a proper way to deprecate it ...
4422AC_SUBST([AMTAR], ['$${TAR-tar}'])
4423
4424# We'll loop over all known methods to create a tar archive until one works.
4425_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
4426
4427m4_if([$1], [v7],
4428  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
4429
4430  [m4_case([$1],
4431    [ustar],
4432     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
4433      # There is notably a 21 bits limit for the UID and the GID.  In fact,
4434      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
4435      # and bug#13588).
4436      am_max_uid=2097151 # 2^21 - 1
4437      am_max_gid=$am_max_uid
4438      # The $UID and $GID variables are not portable, so we need to resort
4439      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
4440      # below are definitely unexpected, so allow the users to see them
4441      # (that is, avoid stderr redirection).
4442      am_uid=`id -u || echo unknown`
4443      am_gid=`id -g || echo unknown`
4444      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
4445      if test $am_uid -le $am_max_uid; then
4446         AC_MSG_RESULT([yes])
4447      else
4448         AC_MSG_RESULT([no])
4449         _am_tools=none
4450      fi
4451      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
4452      if test $am_gid -le $am_max_gid; then
4453         AC_MSG_RESULT([yes])
4454      else
4455        AC_MSG_RESULT([no])
4456        _am_tools=none
4457      fi],
4458
4459  [pax],
4460    [],
4461
4462  [m4_fatal([Unknown tar format])])
4463
4464  AC_MSG_CHECKING([how to create a $1 tar archive])
4465
4466  # Go ahead even if we have the value already cached.  We do so because we
4467  # need to set the values for the 'am__tar' and 'am__untar' variables.
4468  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
4469
4470  for _am_tool in $_am_tools; do
4471    case $_am_tool in
4472    gnutar)
4473      for _am_tar in tar gnutar gtar; do
4474        AM_RUN_LOG([$_am_tar --version]) && break
4475      done
4476      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
4477      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
4478      am__untar="$_am_tar -xf -"
4479      ;;
4480    plaintar)
4481      # Must skip GNU tar: if it does not support --format= it doesn't create
4482      # ustar tarball either.
4483      (tar --version) >/dev/null 2>&1 && continue
4484      am__tar='tar chf - "$$tardir"'
4485      am__tar_='tar chf - "$tardir"'
4486      am__untar='tar xf -'
4487      ;;
4488    pax)
4489      am__tar='pax -L -x $1 -w "$$tardir"'
4490      am__tar_='pax -L -x $1 -w "$tardir"'
4491      am__untar='pax -r'
4492      ;;
4493    cpio)
4494      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
4495      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
4496      am__untar='cpio -i -H $1 -d'
4497      ;;
4498    none)
4499      am__tar=false
4500      am__tar_=false
4501      am__untar=false
4502      ;;
4503    esac
4504
4505    # If the value was cached, stop now.  We just wanted to have am__tar
4506    # and am__untar set.
4507    test -n "${am_cv_prog_tar_$1}" && break
4508
4509    # tar/untar a dummy directory, and stop if the command works.
4510    rm -rf conftest.dir
4511    mkdir conftest.dir
4512    echo GrepMe > conftest.dir/file
4513    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
4514    rm -rf conftest.dir
4515    if test -s conftest.tar; then
4516      AM_RUN_LOG([$am__untar <conftest.tar])
4517      AM_RUN_LOG([cat conftest.dir/file])
4518      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4519    fi
4520  done
4521  rm -rf conftest.dir
4522
4523  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
4524  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
4525
4526AC_SUBST([am__tar])
4527AC_SUBST([am__untar])
4528]) # _AM_PROG_TAR
4529
4530m4_include([acinclude.m4])
4531