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