1# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2018 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
24dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
25# serial 42 IT_PROG_INTLTOOL
26AC_DEFUN([IT_PROG_INTLTOOL], [
27AC_PREREQ([2.50])dnl
28AC_REQUIRE([AM_NLS])dnl
29
30case "$am__api_version" in
31    1.[01234])
32	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
33    ;;
34    *)
35    ;;
36esac
37
38INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
39INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
40INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
41if test -n "$1"; then
42    AC_MSG_CHECKING([for intltool >= $1])
43    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
44    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
45	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
46fi
47
48AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
49AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
50AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
51if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
52    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
53fi
54
55if test -z "$AM_DEFAULT_VERBOSITY"; then
56  AM_DEFAULT_VERBOSITY=1
57fi
58AC_SUBST([AM_DEFAULT_VERBOSITY])
59
60INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
61INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
62INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
63AC_SUBST(INTLTOOL_V_MERGE)
64AC_SUBST(INTLTOOL__v_MERGE_)
65AC_SUBST(INTLTOOL__v_MERGE_0)
66
67INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
68intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
69intltool__v_merge_options_0='-q'
70AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
71AC_SUBST(intltool__v_merge_options_)
72AC_SUBST(intltool__v_merge_options_0)
73
74  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
75INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
76     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
77     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
78      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
79     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
80   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
81    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
82INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
83       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
84      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
85if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
86      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
87else
88      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
89fi
90      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
91      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
92    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
93  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
94    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
95    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
96   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
97
98_IT_SUBST(INTLTOOL_DESKTOP_RULE)
99_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
100_IT_SUBST(INTLTOOL_KEYS_RULE)
101_IT_SUBST(INTLTOOL_PROP_RULE)
102_IT_SUBST(INTLTOOL_OAF_RULE)
103_IT_SUBST(INTLTOOL_PONG_RULE)
104_IT_SUBST(INTLTOOL_SERVER_RULE)
105_IT_SUBST(INTLTOOL_SHEET_RULE)
106_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
107_IT_SUBST(INTLTOOL_UI_RULE)
108_IT_SUBST(INTLTOOL_XAM_RULE)
109_IT_SUBST(INTLTOOL_KBD_RULE)
110_IT_SUBST(INTLTOOL_XML_RULE)
111_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
112_IT_SUBST(INTLTOOL_CAVES_RULE)
113_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
114_IT_SUBST(INTLTOOL_THEME_RULE)
115_IT_SUBST(INTLTOOL_SERVICE_RULE)
116_IT_SUBST(INTLTOOL_POLICY_RULE)
117
118# Check the gettext tools to make sure they are GNU
119AC_PATH_PROG(XGETTEXT, xgettext)
120AC_PATH_PROG(MSGMERGE, msgmerge)
121AC_PATH_PROG(MSGFMT, msgfmt)
122AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
123if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
124    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
125fi
126xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
127mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
128mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
129if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
130    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
131fi
132
133AC_PATH_PROG(INTLTOOL_PERL, perl)
134if test -z "$INTLTOOL_PERL"; then
135   AC_MSG_ERROR([perl not found])
136fi
137AC_MSG_CHECKING([for perl >= 5.8.1])
138$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
139if test $? -ne 0; then
140   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
141else
142   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
143   AC_MSG_RESULT([$IT_PERL_VERSION])
144fi
145if test "x$2" != "xno-xml"; then
146   AC_MSG_CHECKING([for XML::Parser])
147   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
148       AC_MSG_RESULT([ok])
149   else
150       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
151   fi
152fi
153
154# Substitute ALL_LINGUAS so we can use it in po/Makefile
155AC_SUBST(ALL_LINGUAS)
156
157IT_PO_SUBDIR([po])
158
159])
160
161
162# IT_PO_SUBDIR(DIRNAME)
163# ---------------------
164# All po subdirs have to be declared with this macro; the subdir "po" is
165# declared by IT_PROG_INTLTOOL.
166#
167AC_DEFUN([IT_PO_SUBDIR],
168[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
169dnl
170dnl The following CONFIG_COMMANDS should be executed at the very end
171dnl of config.status.
172AC_CONFIG_COMMANDS_PRE([
173  AC_CONFIG_COMMANDS([$1/stamp-it], [
174    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
175       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
176    fi
177    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
178    >"$1/stamp-it.tmp"
179    [sed '/^#/d
180	 s/^[[].*] *//
181	 /^[ 	]*$/d
182	'"s|^|	$ac_top_srcdir/|" \
183      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
184    ]
185    [sed '/^POTFILES =/,/[^\\]$/ {
186		/^POTFILES =/!d
187		r $1/POTFILES
188	  }
189	 ' "$1/Makefile.in" >"$1/Makefile"]
190    rm -f "$1/Makefile.tmp"
191    mv "$1/stamp-it.tmp" "$1/stamp-it"
192  ])
193])dnl
194])
195
196# _IT_SUBST(VARIABLE)
197# -------------------
198# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
199#
200AC_DEFUN([_IT_SUBST],
201[
202AC_SUBST([$1])
203m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
204]
205)
206
207# deprecated macros
208AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
209# A hint is needed for aclocal from Automake <= 1.9.4:
210# AC_DEFUN([AC_PROG_INTLTOOL], ...)
211
212
213# nls.m4 serial 5 (gettext-0.18)
214dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
215dnl Foundation, Inc.
216dnl This file is free software; the Free Software Foundation
217dnl gives unlimited permission to copy and/or distribute it,
218dnl with or without modifications, as long as this notice is preserved.
219dnl
220dnl This file can be used in projects which are not available under
221dnl the GNU General Public License or the GNU Library General Public
222dnl License but which still want to provide support for the GNU gettext
223dnl functionality.
224dnl Please note that the actual code of the GNU gettext library is covered
225dnl by the GNU Library General Public License, and the rest of the GNU
226dnl gettext package is covered by the GNU General Public License.
227dnl They are *not* in the public domain.
228
229dnl Authors:
230dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
231dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
232
233AC_PREREQ([2.50])
234
235AC_DEFUN([AM_NLS],
236[
237  AC_MSG_CHECKING([whether NLS is requested])
238  dnl Default is enabled NLS
239  AC_ARG_ENABLE([nls],
240    [  --disable-nls           do not use Native Language Support],
241    USE_NLS=$enableval, USE_NLS=yes)
242  AC_MSG_RESULT([$USE_NLS])
243  AC_SUBST([USE_NLS])
244])
245
246dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
247dnl serial 11 (pkg-config-0.29.1)
248dnl
249dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
250dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
251dnl
252dnl This program is free software; you can redistribute it and/or modify
253dnl it under the terms of the GNU General Public License as published by
254dnl the Free Software Foundation; either version 2 of the License, or
255dnl (at your option) any later version.
256dnl
257dnl This program is distributed in the hope that it will be useful, but
258dnl WITHOUT ANY WARRANTY; without even the implied warranty of
259dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
260dnl General Public License for more details.
261dnl
262dnl You should have received a copy of the GNU General Public License
263dnl along with this program; if not, write to the Free Software
264dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
265dnl 02111-1307, USA.
266dnl
267dnl As a special exception to the GNU General Public License, if you
268dnl distribute this file as part of a program that contains a
269dnl configuration script generated by Autoconf, you may include it under
270dnl the same distribution terms that you use for the rest of that
271dnl program.
272
273dnl PKG_PREREQ(MIN-VERSION)
274dnl -----------------------
275dnl Since: 0.29
276dnl
277dnl Verify that the version of the pkg-config macros are at least
278dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
279dnl installed version of pkg-config, this checks the developer's version
280dnl of pkg.m4 when generating configure.
281dnl
282dnl To ensure that this macro is defined, also add:
283dnl m4_ifndef([PKG_PREREQ],
284dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
285dnl
286dnl See the "Since" comment for each macro you use to see what version
287dnl of the macros you require.
288m4_defun([PKG_PREREQ],
289[m4_define([PKG_MACROS_VERSION], [0.29.1])
290m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
291    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
292])dnl PKG_PREREQ
293
294dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
295dnl ----------------------------------
296dnl Since: 0.16
297dnl
298dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
299dnl first found in the path. Checks that the version of pkg-config found
300dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
301dnl used since that's the first version where most current features of
302dnl pkg-config existed.
303AC_DEFUN([PKG_PROG_PKG_CONFIG],
304[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
305m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
306m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
307AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
308AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
309AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
310
311if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
312	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
313fi
314if test -n "$PKG_CONFIG"; then
315	_pkg_min_version=m4_default([$1], [0.9.0])
316	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
317	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
318		AC_MSG_RESULT([yes])
319	else
320		AC_MSG_RESULT([no])
321		PKG_CONFIG=""
322	fi
323fi[]dnl
324])dnl PKG_PROG_PKG_CONFIG
325
326dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
327dnl -------------------------------------------------------------------
328dnl Since: 0.18
329dnl
330dnl Check to see whether a particular set of modules exists. Similar to
331dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
332dnl
333dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
334dnl only at the first occurence in configure.ac, so if the first place
335dnl it's called might be skipped (such as if it is within an "if", you
336dnl have to call PKG_CHECK_EXISTS manually
337AC_DEFUN([PKG_CHECK_EXISTS],
338[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
339if test -n "$PKG_CONFIG" && \
340    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
341  m4_default([$2], [:])
342m4_ifvaln([$3], [else
343  $3])dnl
344fi])
345
346dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
347dnl ---------------------------------------------
348dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
349dnl pkg_failed based on the result.
350m4_define([_PKG_CONFIG],
351[if test -n "$$1"; then
352    pkg_cv_[]$1="$$1"
353 elif test -n "$PKG_CONFIG"; then
354    PKG_CHECK_EXISTS([$3],
355                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
356		      test "x$?" != "x0" && pkg_failed=yes ],
357		     [pkg_failed=yes])
358 else
359    pkg_failed=untried
360fi[]dnl
361])dnl _PKG_CONFIG
362
363dnl _PKG_SHORT_ERRORS_SUPPORTED
364dnl ---------------------------
365dnl Internal check to see if pkg-config supports short errors.
366AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
367[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
368if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
369        _pkg_short_errors_supported=yes
370else
371        _pkg_short_errors_supported=no
372fi[]dnl
373])dnl _PKG_SHORT_ERRORS_SUPPORTED
374
375
376dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
377dnl   [ACTION-IF-NOT-FOUND])
378dnl --------------------------------------------------------------
379dnl Since: 0.4.0
380dnl
381dnl Note that if there is a possibility the first call to
382dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
383dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
384AC_DEFUN([PKG_CHECK_MODULES],
385[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
386AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
387AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
388
389pkg_failed=no
390AC_MSG_CHECKING([for $1])
391
392_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
393_PKG_CONFIG([$1][_LIBS], [libs], [$2])
394
395m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
396and $1[]_LIBS to avoid the need to call pkg-config.
397See the pkg-config man page for more details.])
398
399if test $pkg_failed = yes; then
400   	AC_MSG_RESULT([no])
401        _PKG_SHORT_ERRORS_SUPPORTED
402        if test $_pkg_short_errors_supported = yes; then
403	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
404        else
405	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
406        fi
407	# Put the nasty error message in config.log where it belongs
408	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
409
410	m4_default([$4], [AC_MSG_ERROR(
411[Package requirements ($2) were not met:
412
413$$1_PKG_ERRORS
414
415Consider adjusting the PKG_CONFIG_PATH environment variable if you
416installed software in a non-standard prefix.
417
418_PKG_TEXT])[]dnl
419        ])
420elif test $pkg_failed = untried; then
421     	AC_MSG_RESULT([no])
422	m4_default([$4], [AC_MSG_FAILURE(
423[The pkg-config script could not be found or is too old.  Make sure it
424is in your PATH or set the PKG_CONFIG environment variable to the full
425path to pkg-config.
426
427_PKG_TEXT
428
429To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
430        ])
431else
432	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
433	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
434        AC_MSG_RESULT([yes])
435	$3
436fi[]dnl
437])dnl PKG_CHECK_MODULES
438
439
440dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
441dnl   [ACTION-IF-NOT-FOUND])
442dnl ---------------------------------------------------------------------
443dnl Since: 0.29
444dnl
445dnl Checks for existence of MODULES and gathers its build flags with
446dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
447dnl and VARIABLE-PREFIX_LIBS from --libs.
448dnl
449dnl Note that if there is a possibility the first call to
450dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
451dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
452dnl configure.ac.
453AC_DEFUN([PKG_CHECK_MODULES_STATIC],
454[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
455_save_PKG_CONFIG=$PKG_CONFIG
456PKG_CONFIG="$PKG_CONFIG --static"
457PKG_CHECK_MODULES($@)
458PKG_CONFIG=$_save_PKG_CONFIG[]dnl
459])dnl PKG_CHECK_MODULES_STATIC
460
461
462dnl PKG_INSTALLDIR([DIRECTORY])
463dnl -------------------------
464dnl Since: 0.27
465dnl
466dnl Substitutes the variable pkgconfigdir as the location where a module
467dnl should install pkg-config .pc files. By default the directory is
468dnl $libdir/pkgconfig, but the default can be changed by passing
469dnl DIRECTORY. The user can override through the --with-pkgconfigdir
470dnl parameter.
471AC_DEFUN([PKG_INSTALLDIR],
472[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
473m4_pushdef([pkg_description],
474    [pkg-config installation directory @<:@]pkg_default[@:>@])
475AC_ARG_WITH([pkgconfigdir],
476    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
477    [with_pkgconfigdir=]pkg_default)
478AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
479m4_popdef([pkg_default])
480m4_popdef([pkg_description])
481])dnl PKG_INSTALLDIR
482
483
484dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
485dnl --------------------------------
486dnl Since: 0.27
487dnl
488dnl Substitutes the variable noarch_pkgconfigdir as the location where a
489dnl module should install arch-independent pkg-config .pc files. By
490dnl default the directory is $datadir/pkgconfig, but the default can be
491dnl changed by passing DIRECTORY. The user can override through the
492dnl --with-noarch-pkgconfigdir parameter.
493AC_DEFUN([PKG_NOARCH_INSTALLDIR],
494[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
495m4_pushdef([pkg_description],
496    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
497AC_ARG_WITH([noarch-pkgconfigdir],
498    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
499    [with_noarch_pkgconfigdir=]pkg_default)
500AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
501m4_popdef([pkg_default])
502m4_popdef([pkg_description])
503])dnl PKG_NOARCH_INSTALLDIR
504
505
506dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
507dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
508dnl -------------------------------------------
509dnl Since: 0.28
510dnl
511dnl Retrieves the value of the pkg-config variable for the given module.
512AC_DEFUN([PKG_CHECK_VAR],
513[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
514AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
515
516_PKG_CONFIG([$1], [variable="][$3]["], [$2])
517AS_VAR_COPY([$1], [pkg_cv_][$1])
518
519AS_VAR_IF([$1], [""], [$5], [$4])dnl
520])dnl PKG_CHECK_VAR
521
522dnl Copyright (c) 2002-2015
523dnl         The Xfce development team. All rights reserved.
524dnl
525dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
526dnl
527dnl This program is free software; you can redistribute it and/or modify
528dnl it under the terms of the GNU General Public License as published by
529dnl the Free Software Foundation; either version 2 of the License, or
530dnl (at your option) any later version.
531dnl
532dnl This program is distributed in the hope that it will be useful,
533dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
534dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
535dnl GNU General Public License for more details.
536dnl
537dnl You should have received a copy of the GNU General Public License along
538dnl with this program; if not, write to the Free Software Foundation, Inc.,
539dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
540dnl
541dnl xdt-depends
542dnl -----------
543dnl  Contains M4 macros to check for software dependencies.
544dnl  Partly based on prior work of the XDG contributors.
545dnl
546
547
548
549dnl We need recent a autoconf version
550AC_PREREQ([2.69])
551
552
553
554dnl XDT_PROG_PKG_CONFIG()
555dnl
556dnl Checks for the freedesktop.org pkg-config
557dnl utility and sets the PKG_CONFIG environment
558dnl variable to the full path if found.
559dnl
560AC_DEFUN([XDT_PROG_PKG_CONFIG],
561[
562  # minimum supported version of pkg-config
563  xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0
564
565  m4_ifdef([PKG_PROG_PKG_CONFIG],
566    [
567      PKG_PROG_PKG_CONFIG([$xdt_cv_PKG_CONFIG_MIN_VERSION])
568
569      if test x"$PKG_CONFIG" = x""; then
570        echo
571        echo "*** Your version of pkg-config is too old. You need atleast"
572        echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config"
573        echo "*** from the freedesktop.org software repository at"
574        echo "***"
575        echo "***    https://www.freedesktop.org/wiki/Software/pkg-config/"
576        echo "***"
577        exit 1;
578      fi
579    ],
580    [
581      echo
582      echo "*** The pkg-config utility could not be found on your system."
583      echo "*** Make sure it is in your path, or set the PKG_CONFIG"
584      echo "*** environment variable to the full path to pkg-config."
585      echo "*** You can download pkg-config from the freedesktop.org"
586      echo "*** software repository at"
587      echo "***"
588      echo "***    https://www.freedesktop.org/wiki/Software/pkg-config/"
589      echo "***"
590      exit 1
591    ])
592])
593
594
595
596dnl XDT_CHECK_PACKAGE(varname, package, version, [action-if], [action-if-not])
597dnl
598dnl Checks if "package" >= "version" is installed on the
599dnl target system, using the pkg-config utility. If the
600dnl dependency is met, "varname"_CFLAGS, "varname"_LIBS,
601dnl "varname"_VERSION and "varname"_REQUIRED_VERSION
602dnl will be set and marked for substition.
603dnl
604dnl "varname"_REQUIRED_VERSION will be set to the value of
605dnl "version". This is mostly useful to automatically
606dnl place the correct version information into the RPM
607dnl .spec file.
608dnl
609dnl In addition, if the dependency is met, "action-if" will
610dnl be executed if given.
611dnl
612dnl If the package check fails, "action-if-not" will be
613dnl executed. If this parameter isn't specified, a diagnostic
614dnl message will be printed and the configure script will
615dnl be terminated with exit code 1.
616dnl
617AC_DEFUN([XDT_CHECK_PACKAGE],
618[
619  XDT_PROG_PKG_CONFIG()
620
621  AC_MSG_CHECKING([for $2 >= $3])
622  if $PKG_CONFIG "--atleast-version=$3" "$2" >/dev/null 2>&1; then
623    $1_VERSION=`$PKG_CONFIG --modversion "$2"`
624    AC_MSG_RESULT([$$1_VERSION])
625
626    AC_MSG_CHECKING([$1_CFLAGS])
627    $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
628    AC_MSG_RESULT([$$1_CFLAGS])
629
630    AC_MSG_CHECKING([$1_LIBS])
631    $1_LIBS=`$PKG_CONFIG --libs "$2"`
632    AC_MSG_RESULT([$$1_LIBS])
633
634    $1_REQUIRED_VERSION=$3
635
636    AC_SUBST([$1_VERSION])
637    AC_SUBST([$1_CFLAGS])
638    AC_SUBST([$1_LIBS])
639    AC_SUBST([$1_REQUIRED_VERSION])
640
641    ifelse([$4], , , [$4])
642  elif $PKG_CONFIG --exists "$2" >/dev/null 2>&1; then
643    xdt_cv_version=`$PKG_CONFIG --modversion "$2"`
644    AC_MSG_RESULT([found, but $xdt_cv_version])
645
646    ifelse([$5], ,
647    [
648      echo "*** The required package $2 was found on your system,"
649      echo "*** but the installed version ($xdt_cv_version) is too old."
650      echo "*** Please upgrade $2 to atleast version $3, or adjust"
651      echo "*** the PKG_CONFIG_PATH environment variable if you installed"
652      echo "*** the new version of the package in a nonstandard prefix so"
653      echo "*** pkg-config is able to find it."
654      exit 1
655    ], [$5])
656  else
657    AC_MSG_RESULT([not found])
658
659    ifelse([$5], ,
660    [
661      echo "*** The required package $2 was not found on your system."
662      echo "*** Please install $2 (atleast version $3) or adjust"
663      echo "*** the PKG_CONFIG_PATH environment variable if you"
664      echo "*** installed the package in a nonstandard prefix so that"
665      echo "*** pkg-config is able to find it."
666      exit 1
667    ], [$5])
668  fi
669])
670
671
672
673dnl XDT_CHECK_OPTIONAL_PACKAGE(varname, package, version, optionname, helpstring, [default])
674dnl
675dnl Checks for an optional dependency on "package" >= "version". "default"
676dnl can be "yes" or "no" (defaults to "yes" if not specified) and controls
677dnl whether configure should check this dependency by default, or only if
678dnl the user explicitly enables it using a command line switch.
679dnl
680dnl This macro automatically adds a commandline switch based on the "optionname"
681dnl parameter (--enable-optionname/--disable-optionname), which allows the
682dnl user to explicitly control whether this optional dependency should be
683dnl enabled or not. The "helpstring" parameter gives a brief(!) description
684dnl about this dependency.
685dnl
686dnl If the user chose to enable this dependency and the required package
687dnl was found, this macro defines the variable "varname"_FOUND and sets it
688dnl to the string "yes", in addition to the 4 variables set by XDT_CHECK_PACKAGE.
689dnl But "varname"_FOUND will not be marked for substition. Furthermore,
690dnl a CPP define HAVE_"varname" will be placed in config.h (or added to
691dnl the cc command line, depending on your configure.ac) and set to
692dnl 1.
693dnl
694AC_DEFUN([XDT_CHECK_OPTIONAL_PACKAGE],
695[
696  AC_REQUIRE([XDT_PROG_PKG_CONFIG])
697
698  AC_ARG_ENABLE([$4],
699AS_HELP_STRING([--enable-$4],[Enable checking for $5 (default=m4_default([$6], [yes]))])
700AS_HELP_STRING([--disable-$4],[Disable checking for $5]),
701    [xdt_cv_$1_check=$enableval], [xdt_cv_$1_check=m4_default([$6], [yes])])
702
703  if test x"$xdt_cv_$1_check" = x"yes"; then
704    if $PKG_CONFIG --exists "$2 >= $3" >/dev/null 2>&1; then
705      XDT_CHECK_PACKAGE([$1], [$2], [$3],
706      [
707        AC_DEFINE([HAVE_$1], [1], [Define if $2 >= $3 present])
708        $1_FOUND="yes"
709      ])
710    else
711      AC_MSG_CHECKING([for optional package $2 >= $3])
712      AC_MSG_RESULT([not found])
713    fi
714  else
715    AC_MSG_CHECKING([for optional package $2])
716    AC_MSG_RESULT([disabled])
717  fi
718
719  AM_CONDITIONAL([HAVE_$1], [test x"$$1_FOUND" = x"yes"])
720])
721
722
723
724dnl XDT_CHECK_LIBX11()
725dnl
726dnl Executes various checks for X11. Sets LIBX11_CFLAGS, LIBX11_LDFLAGS
727dnl and LIBX11_LIBS (and marks them for substitution). In addition
728dnl HAVE_LIBX11 is set to 1 in config.h, if the X window system and
729dnl the development files are detected on the target system.
730dnl
731AC_DEFUN([XDT_CHECK_LIBX11],
732[
733  AC_REQUIRE([AC_PATH_XTRA])
734
735  LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS=
736  if test x"$no_x" != x"yes"; then
737    AC_CHECK_LIB([X11], [main],
738    [
739      AC_DEFINE([HAVE_LIBX11], [1], [Define if libX11 is available])
740      LIBX11_CFLAGS="$X_CFLAGS"
741      for option in $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS; do
742      	case "$option" in
743        -L*)
744          path=`echo $option | sed 's/^-L//'`
745          if test x"$path" != x""; then
746            LIBX11_LDFLAGS="$LIBX11_LDFLAGS -L$path"
747          fi
748          ;;
749        *)
750          LIBX11_LIBS="$LIBX11_LIBS $option"
751          ;;
752        esac
753      done
754      if ! echo $LIBX11_LIBS | grep -- '-lX11' >/dev/null; then
755        LIBX11_LIBS="$LIBX11_LIBS -lX11"
756      fi
757    ], [], [$X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS])
758  fi
759  AC_SUBST([LIBX11_CFLAGS])
760  AC_SUBST([LIBX11_LDFLAGS])
761  AC_SUBST([LIBX11_LIBS])
762])
763
764
765
766dnl XDT_CHECK_LIBX11_REQUIRE()
767dnl
768dnl Similar to XDT_CHECK_LIBX11(), but terminates with an error if
769dnl the X window system and development files aren't detected on the
770dnl target system.
771dnl
772AC_DEFUN([XDT_CHECK_LIBX11_REQUIRE],
773[
774  AC_REQUIRE([XDT_CHECK_LIBX11])
775
776  if test x"$no_x" = x"yes"; then
777    AC_MSG_ERROR([X Window system libraries and header files are required])
778  fi
779])
780
781
782
783dnl XDT_CHECK_LIBSM()
784dnl
785dnl Checks whether the session management library is present on the
786dnl target system, and sets LIBSM_CFLAGS, LIBSM_LDFLAGS and LIBSM_LIBS
787dnl properly. In addition, HAVE_LIBSM will be set to 1 in config.h
788dnl if libSM is detected.
789dnl
790AC_DEFUN([XDT_CHECK_LIBSM],
791[
792  AC_REQUIRE([XDT_CHECK_LIBX11])
793
794  LIBSM_CFLAGS= LIBSM_LDFLAGS= LIBSM_LIBS=
795  if test x"$no_x" != x"yes"; then
796    AC_CHECK_LIB([SM], [SmcSaveYourselfDone],
797    [
798      AC_DEFINE([HAVE_LIBSM], [1], [Define if libSM is available])
799      LIBSM_CFLAGS="$LIBX11_CFLAGS"
800      LIBSM_LDFLAGS="$LIBX11_LDFLAGS"
801      LIBSM_LIBS="$LIBX11_LIBS"
802      if ! echo $LIBSM_LIBS | grep -- '-lSM' >/dev/null; then
803        LIBSM_LIBS="$LIBSM_LIBS -lSM -lICE"
804      fi
805    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lICE])
806  fi
807  AC_SUBST([LIBSM_CFLAGS])
808  AC_SUBST([LIBSM_LDFLAGS])
809  AC_SUBST([LIBSM_LIBS])
810])
811
812
813
814dnl XDT_CHECK_LIBXPM()
815dnl
816dnl Checks if the Xpm library is present on the target system, and
817dnl sets LIBXPM_CFLAGS, LIBXPM_LDFLAGS and LIBXPM_LIBS. In addition,
818dnl HAVE_LIBXPM will be set to 1 in config.h if libXpm is detected.
819dnl
820AC_DEFUN([XDT_CHECK_LIBXPM],
821[
822  AC_REQUIRE([XDT_CHECK_LIBX11])
823
824  LIBXPM_CFLAGS= LIBXPM_LDFLAGS= LIBXPM_LIBS=
825  if test "$no_x" != "yes"; then
826    AC_CHECK_LIB([Xpm], [main],
827    [
828      AC_DEFINE([HAVE_LIBXPM], [1], [Define if libXpm is available])
829      LIBXPM_CFLAGS="$LIBX11_CFLAGS"
830      LIBXPM_LDFLAGS="$LIBX11_LDFLAGS"
831      LIBXPM_LIBS="$LIBX11_LIBS"
832      if ! echo $LIBXPM_LIBS | grep -- '-lXpm' >/dev/null; then
833        LIBXPM_LIBS="$LIBXPM_LIBS -lXpm"
834      fi
835    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXpm])
836  fi
837  AC_SUBST([LIBXPM_CFLAGS])
838  AC_SUBST([LIBXPM_LDFLAGS])
839  AC_SUBST([LIBXPM_LIBS])
840])
841
842
843
844dnl XDT_CHECK_LIBXPM_REQUIRE()
845dnl
846dnl Similar to XDT_CHECK_LIBXPM(), but fails if the Xpm library isn't
847dnl present on the target system.
848dnl
849AC_DEFUN([XDT_CHECK_LIBXPM_REQUIRE],
850[
851  AC_REQUIRE([XDT_CHECK_LIBX11_REQUIRE])
852  AC_REQUIRE([XDT_CHECK_LIBXPM])
853
854  if test x"$LIBXPM_LIBS" = x""; then
855    AC_MSG_ERROR([The Xpm library was not found on your system])
856  fi
857])
858
859
860dnl Copyright (c) 2002-2015
861dnl         The Xfce development team. All rights reserved.
862dnl
863dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
864dnl
865dnl This program is free software; you can redistribute it and/or modify
866dnl it under the terms of the GNU General Public License as published by
867dnl the Free Software Foundation; either version 2 of the License, or
868dnl (at your option) any later version.
869dnl
870dnl This program is distributed in the hope that it will be useful,
871dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
872dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
873dnl GNU General Public License for more details.
874dnl
875dnl You should have received a copy of the GNU General Public License along
876dnl with this program; if not, write to the Free Software Foundation, Inc.,
877dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
878dnl
879dnl xdt-depends
880dnl -----------
881dnl  Contains M4 macros to check for software dependencies.
882dnl  Partly based on prior work of the XDG contributors.
883dnl
884
885
886
887dnl We need recent a autoconf version
888AC_PREREQ([2.69])
889
890
891dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
892dnl
893dnl For each token in FLAGS, checks to be sure the compiler supports
894dnl the flag, and if so, adds each one to VAR.
895dnl
896AC_DEFUN([XDT_SUPPORTED_FLAGS],
897[
898  for flag in $2; do
899    AC_MSG_CHECKING([if $CC supports $flag])
900    saved_CFLAGS="$CFLAGS"
901    CFLAGS="$CFLAGS $flag"
902    AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ])], [flag_supported=yes], [flag_supported=no])
903    CFLAGS="$saved_CFLAGS"
904    AC_MSG_RESULT([$flag_supported])
905
906    if test "x$flag_supported" = "xyes"; then
907      $1="$$1 $flag"
908    fi
909  done
910])
911
912
913
914dnl XDT_FEATURE_DEBUG(default_level=minimum)
915dnl
916AC_DEFUN([XDT_FEATURE_DEBUG],
917[
918  dnl weird indentation to keep output indentation correct
919  AC_ARG_ENABLE([debug],
920                AS_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],[Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
921AS_HELP_STRING([--disable-debug],[Include no debugging support]),
922                [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
923
924  dnl enable most warnings regardless of debug level
925  xdt_cv_additional_CFLAGS="-Wall -Wextra \
926                            -Wno-missing-field-initializers \
927                            -Wno-unused-parameter -Wold-style-definition \
928                            -Wdeclaration-after-statement \
929                            -Wmissing-declarations \
930                            -Wmissing-noreturn -Wpointer-arith \
931                            -Wcast-align -Wformat -Wformat-security -Wformat-y2k \
932                            -Winit-self -Wmissing-include-dirs -Wundef \
933                            -Wnested-externs -Wredundant-decls"
934
935  AC_MSG_CHECKING([whether to build with debugging support])
936  if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
937    AC_DEFINE([DEBUG], [1], [Define for debugging support])
938
939    CPPFLAGS="$CPPFLAGS"
940
941    if test x`uname` = x"Linux"; then
942      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -fstack-protector"
943    fi
944
945    if test x"$enable_debug" = x"full"; then
946      AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
947      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g"
948      CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
949      AC_MSG_RESULT([full])
950    else
951      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g -Wshadow"
952      AC_MSG_RESULT([yes])
953    fi
954  else
955    xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -Wshadow"
956    CPPFLAGS="$CPPFLAGS -DNDEBUG"
957
958    if test x"$enable_debug" = x"no"; then
959      CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT"
960      AC_MSG_RESULT([no])
961    else
962      AC_MSG_RESULT([minimum])
963    fi
964  fi
965
966  XDT_SUPPORTED_FLAGS([supported_CFLAGS], [$xdt_cv_additional_CFLAGS])
967
968  ifelse([$CXX], , , [
969    dnl FIXME: should test on c++ compiler, but the following line causes
970    dnl        autoconf errors for projects that don't check for a
971    dnl        c++ compiler at all.
972    dnl AC_LANG_PUSH([C++])
973    dnl XDT_SUPPORTED_FLAGS([supported_CXXFLAGS], [$xdt_cv_additional_CFLAGS])
974    dnl AC_LANG_POP()
975    dnl        instead, just use supported_CFLAGS...
976    supported_CXXFLAGS="$supported_CFLAGS"
977  ])
978
979  CFLAGS="$CFLAGS $supported_CFLAGS"
980  CXXFLAGS="$CXXFLAGS $supported_CXXFLAGS"
981])
982
983
984dnl XDT_FEATURE_VISIBILITY()
985dnl
986dnl Checks to see if the compiler supports the 'visibility' attribute
987dnl If so, adds -DHAVE_GNUC_VISIBILTY to CPPFLAGS.  Also sets the
988dnl automake conditional HAVE_GNUC_VISIBILITY.
989dnl
990AC_DEFUN([XDT_FEATURE_VISIBILITY],
991[
992  AC_ARG_ENABLE([visibility],
993                AS_HELP_STRING([--disable-visibility],[Don't use ELF visibility attributes]),
994                [enable_visibility=$enableval], [enable_visibility=yes])
995  have_gnuc_visibility=no
996  if test "x$enable_visibility" != "xno"; then
997    XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
998    saved_CFLAGS="$CFLAGS"
999    CFLAGS="$CFLAGS $xdt_vis_test_cflags"
1000    AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
1001    AC_COMPILE_IFELSE([AC_LANG_SOURCE(
1002    [
1003      void test_default (void);
1004      void test_hidden (void);
1005
1006      void __attribute__ ((visibility("default"))) test_default (void) {}
1007      void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
1008
1009      int main (int argc, char **argv) {
1010        test_default ();
1011        test_hidden ();
1012        return 0;
1013      }
1014    ])],
1015    [
1016      have_gnuc_visibility=yes
1017      AC_MSG_RESULT([yes])
1018    ],
1019    [
1020      AC_MSG_RESULT([no])
1021    ])
1022    CFLAGS="$saved_CFLAGS"
1023  fi
1024
1025  if test "x$have_gnuc_visibility" = "xyes"; then
1026    CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
1027    xdt_vis_hidden_cflags=""
1028    XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-xldscope=hidden])
1029    if test "x$xdt_vis_hidden_cflags" = "x"; then
1030      XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-fvisibility=hidden])
1031    fi
1032    CFLAGS="$CFLAGS $xdt_vis_hidden_cflags"
1033  fi
1034
1035  AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
1036])
1037
1038dnl XDT_FEATURE_LINKER_OPTS
1039dnl
1040dnl Checks for and enables any special linker optimizations.
1041dnl
1042AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
1043[
1044  AC_ARG_ENABLE([linker-opts],
1045                AS_HELP_STRING([--disable-linker-opts],[Disable linker optimizations]),
1046                [enable_linker_opts=$enableval], [enable_linker_opts=yes])
1047
1048  if test "x$enable_linker_opts" != "xno"; then
1049    if test x`uname` != x"OpenBSD"; then
1050      AC_MSG_CHECKING([whether $LD accepts --as-needed])
1051      case `$LD --as-needed -v 2>&1 </dev/null` in
1052      *GNU* | *'with BFD'*)
1053        LDFLAGS="$LDFLAGS -Wl,--as-needed"
1054        AC_MSG_RESULT([yes])
1055        ;;
1056      *)
1057        AC_MSG_RESULT([no])
1058        ;;
1059      esac
1060    fi
1061    AC_MSG_CHECKING([whether $LD accepts -O1])
1062    case `$LD -O1 -v 2>&1 </dev/null` in
1063    *GNU* | *'with BFD'*)
1064      LDFLAGS="$LDFLAGS -Wl,-O1"
1065      AC_MSG_RESULT([yes])
1066      ;;
1067    *)
1068      AC_MSG_RESULT([no])
1069      ;;
1070    esac
1071  fi
1072])
1073
1074dnl Copyright (c) 2002-2015
1075dnl         The Xfce development team. All rights reserved.
1076dnl
1077dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
1078dnl
1079dnl This program is free software; you can redistribute it and/or modify
1080dnl it under the terms of the GNU General Public License as published by
1081dnl the Free Software Foundation; either version 2 of the License, or
1082dnl (at your option) any later version.
1083dnl
1084dnl This program is distributed in the hope that it will be useful,
1085dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
1086dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1087dnl GNU General Public License for more details.
1088dnl
1089dnl You should have received a copy of the GNU General Public License along
1090dnl with this program; if not, write to the Free Software Foundation, Inc.,
1091dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1092dnl
1093dnl xdt-i18n
1094dnl --------
1095dnl  Internalization M4 macros.
1096dnl
1097
1098
1099dnl XDT_I18N([LINGUAS][, PACKAGE])
1100dnl
1101dnl This macro takes care of setting up everything for i18n support.
1102dnl
1103dnl If LINGUAS isn't specified, it will automatically extract the linguas
1104dnl from po/*.po.
1105dnl
1106dnl If PACKAGE isn't specified, it defaults to the package tarname; see
1107dnl the description of AC_INIT() for an explanation of what makes up
1108dnl the package tarname. Normally, you don't need to specify PACKAGE,
1109dnl but you can stick with the default.
1110dnl
1111AC_DEFUN([XDT_I18N],
1112[
1113  dnl Substitute GETTEXT_PACKAGE variable
1114  GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()])
1115  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
1116  AC_SUBST([GETTEXT_PACKAGE])
1117
1118  dnl gettext and stuff
1119  ALL_LINGUAS="m4_ifblank(
1120    [$1],
1121    [esyscmd([echo $(for i in po/*.po; do test -e "$i" && basename -- "$i" .po; done) | tr -d '\n'])],
1122    [$1])"
1123
1124  dnl This is required on some Linux systems
1125  AC_CHECK_FUNC([bind_textdomain_codeset])
1126
1127  dnl Determine where to install locale files
1128  AC_MSG_CHECKING([for locales directory])
1129  AC_ARG_WITH([locales-dir],
1130  [
1131    AS_HELP_STRING([--with-locales-dir=DIR],[Install locales into DIR])
1132  ], [localedir=$withval],
1133  [
1134    if test x"$CATOBJEXT" = x".mo"; then
1135      localedir=$libdir/locale
1136    else
1137      localedir=$datarootdir/locale
1138    fi
1139  ])
1140  AC_MSG_RESULT([$localedir])
1141  AC_SUBST([localedir])
1142])
1143
1144
1145# Copyright (C) 2002-2018 Free Software Foundation, Inc.
1146#
1147# This file is free software; the Free Software Foundation
1148# gives unlimited permission to copy and/or distribute it,
1149# with or without modifications, as long as this notice is preserved.
1150
1151# AM_AUTOMAKE_VERSION(VERSION)
1152# ----------------------------
1153# Automake X.Y traces this macro to ensure aclocal.m4 has been
1154# generated from the m4 files accompanying Automake X.Y.
1155# (This private macro should not be called outside this file.)
1156AC_DEFUN([AM_AUTOMAKE_VERSION],
1157[am__api_version='1.16'
1158dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1159dnl require some minimum version.  Point them to the right macro.
1160m4_if([$1], [1.16.1], [],
1161      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1162])
1163
1164# _AM_AUTOCONF_VERSION(VERSION)
1165# -----------------------------
1166# aclocal traces this macro to find the Autoconf version.
1167# This is a private macro too.  Using m4_define simplifies
1168# the logic in aclocal, which can simply ignore this definition.
1169m4_define([_AM_AUTOCONF_VERSION], [])
1170
1171# AM_SET_CURRENT_AUTOMAKE_VERSION
1172# -------------------------------
1173# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1174# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1175AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1176[AM_AUTOMAKE_VERSION([1.16.1])dnl
1177m4_ifndef([AC_AUTOCONF_VERSION],
1178  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1179_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1180
1181# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
1182
1183# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1184#
1185# This file is free software; the Free Software Foundation
1186# gives unlimited permission to copy and/or distribute it,
1187# with or without modifications, as long as this notice is preserved.
1188
1189# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1190# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
1191# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1192#
1193# Of course, Automake must honor this variable whenever it calls a
1194# tool from the auxiliary directory.  The problem is that $srcdir (and
1195# therefore $ac_aux_dir as well) can be either absolute or relative,
1196# depending on how configure is run.  This is pretty annoying, since
1197# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1198# source directory, any form will work fine, but in subdirectories a
1199# relative path needs to be adjusted first.
1200#
1201# $ac_aux_dir/missing
1202#    fails when called from a subdirectory if $ac_aux_dir is relative
1203# $top_srcdir/$ac_aux_dir/missing
1204#    fails if $ac_aux_dir is absolute,
1205#    fails when called from a subdirectory in a VPATH build with
1206#          a relative $ac_aux_dir
1207#
1208# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1209# are both prefixed by $srcdir.  In an in-source build this is usually
1210# harmless because $srcdir is '.', but things will broke when you
1211# start a VPATH build or use an absolute $srcdir.
1212#
1213# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1214# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
1215#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1216# and then we would define $MISSING as
1217#   MISSING="\${SHELL} $am_aux_dir/missing"
1218# This will work as long as MISSING is not called from configure, because
1219# unfortunately $(top_srcdir) has no meaning in configure.
1220# However there are other variables, like CC, which are often used in
1221# configure, and could therefore not use this "fixed" $ac_aux_dir.
1222#
1223# Another solution, used here, is to always expand $ac_aux_dir to an
1224# absolute PATH.  The drawback is that using absolute paths prevent a
1225# configured tree to be moved without reconfiguration.
1226
1227AC_DEFUN([AM_AUX_DIR_EXPAND],
1228[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1229# Expand $ac_aux_dir to an absolute path.
1230am_aux_dir=`cd "$ac_aux_dir" && pwd`
1231])
1232
1233# AM_CONDITIONAL                                            -*- Autoconf -*-
1234
1235# Copyright (C) 1997-2018 Free Software Foundation, Inc.
1236#
1237# This file is free software; the Free Software Foundation
1238# gives unlimited permission to copy and/or distribute it,
1239# with or without modifications, as long as this notice is preserved.
1240
1241# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1242# -------------------------------------
1243# Define a conditional.
1244AC_DEFUN([AM_CONDITIONAL],
1245[AC_PREREQ([2.52])dnl
1246 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1247       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1248AC_SUBST([$1_TRUE])dnl
1249AC_SUBST([$1_FALSE])dnl
1250_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1251_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1252m4_define([_AM_COND_VALUE_$1], [$2])dnl
1253if $2; then
1254  $1_TRUE=
1255  $1_FALSE='#'
1256else
1257  $1_TRUE='#'
1258  $1_FALSE=
1259fi
1260AC_CONFIG_COMMANDS_PRE(
1261[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1262  AC_MSG_ERROR([[conditional "$1" was never defined.
1263Usually this means the macro was only invoked conditionally.]])
1264fi])])
1265
1266# Copyright (C) 1999-2018 Free Software Foundation, Inc.
1267#
1268# This file is free software; the Free Software Foundation
1269# gives unlimited permission to copy and/or distribute it,
1270# with or without modifications, as long as this notice is preserved.
1271
1272
1273# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1274# written in clear, in which case automake, when reading aclocal.m4,
1275# will think it sees a *use*, and therefore will trigger all it's
1276# C support machinery.  Also note that it means that autoscan, seeing
1277# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1278
1279
1280# _AM_DEPENDENCIES(NAME)
1281# ----------------------
1282# See how the compiler implements dependency checking.
1283# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1284# We try a few techniques and use that to set a single cache variable.
1285#
1286# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1287# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1288# dependency, and given that the user is not expected to run this macro,
1289# just rely on AC_PROG_CC.
1290AC_DEFUN([_AM_DEPENDENCIES],
1291[AC_REQUIRE([AM_SET_DEPDIR])dnl
1292AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1293AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1294AC_REQUIRE([AM_DEP_TRACK])dnl
1295
1296m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1297      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1298      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1299      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1300      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1301      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1302                    [depcc="$$1"   am_compiler_list=])
1303
1304AC_CACHE_CHECK([dependency style of $depcc],
1305               [am_cv_$1_dependencies_compiler_type],
1306[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1307  # We make a subdir and do the tests there.  Otherwise we can end up
1308  # making bogus files that we don't know about and never remove.  For
1309  # instance it was reported that on HP-UX the gcc test will end up
1310  # making a dummy file named 'D' -- because '-MD' means "put the output
1311  # in D".
1312  rm -rf conftest.dir
1313  mkdir conftest.dir
1314  # Copy depcomp to subdir because otherwise we won't find it if we're
1315  # using a relative directory.
1316  cp "$am_depcomp" conftest.dir
1317  cd conftest.dir
1318  # We will build objects and dependencies in a subdirectory because
1319  # it helps to detect inapplicable dependency modes.  For instance
1320  # both Tru64's cc and ICC support -MD to output dependencies as a
1321  # side effect of compilation, but ICC will put the dependencies in
1322  # the current directory while Tru64 will put them in the object
1323  # directory.
1324  mkdir sub
1325
1326  am_cv_$1_dependencies_compiler_type=none
1327  if test "$am_compiler_list" = ""; then
1328     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1329  fi
1330  am__universal=false
1331  m4_case([$1], [CC],
1332    [case " $depcc " in #(
1333     *\ -arch\ *\ -arch\ *) am__universal=true ;;
1334     esac],
1335    [CXX],
1336    [case " $depcc " in #(
1337     *\ -arch\ *\ -arch\ *) am__universal=true ;;
1338     esac])
1339
1340  for depmode in $am_compiler_list; do
1341    # Setup a source with many dependencies, because some compilers
1342    # like to wrap large dependency lists on column 80 (with \), and
1343    # we should not choose a depcomp mode which is confused by this.
1344    #
1345    # We need to recreate these files for each test, as the compiler may
1346    # overwrite some of them when testing with obscure command lines.
1347    # This happens at least with the AIX C compiler.
1348    : > sub/conftest.c
1349    for i in 1 2 3 4 5 6; do
1350      echo '#include "conftst'$i'.h"' >> sub/conftest.c
1351      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1352      # Solaris 10 /bin/sh.
1353      echo '/* dummy */' > sub/conftst$i.h
1354    done
1355    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1356
1357    # We check with '-c' and '-o' for the sake of the "dashmstdout"
1358    # mode.  It turns out that the SunPro C++ compiler does not properly
1359    # handle '-M -o', and we need to detect this.  Also, some Intel
1360    # versions had trouble with output in subdirs.
1361    am__obj=sub/conftest.${OBJEXT-o}
1362    am__minus_obj="-o $am__obj"
1363    case $depmode in
1364    gcc)
1365      # This depmode causes a compiler race in universal mode.
1366      test "$am__universal" = false || continue
1367      ;;
1368    nosideeffect)
1369      # After this tag, mechanisms are not by side-effect, so they'll
1370      # only be used when explicitly requested.
1371      if test "x$enable_dependency_tracking" = xyes; then
1372	continue
1373      else
1374	break
1375      fi
1376      ;;
1377    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1378      # This compiler won't grok '-c -o', but also, the minuso test has
1379      # not run yet.  These depmodes are late enough in the game, and
1380      # so weak that their functioning should not be impacted.
1381      am__obj=conftest.${OBJEXT-o}
1382      am__minus_obj=
1383      ;;
1384    none) break ;;
1385    esac
1386    if depmode=$depmode \
1387       source=sub/conftest.c object=$am__obj \
1388       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1389       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1390         >/dev/null 2>conftest.err &&
1391       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1392       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1393       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1394       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1395      # icc doesn't choke on unknown options, it will just issue warnings
1396      # or remarks (even with -Werror).  So we grep stderr for any message
1397      # that says an option was ignored or not supported.
1398      # When given -MP, icc 7.0 and 7.1 complain thusly:
1399      #   icc: Command line warning: ignoring option '-M'; no argument required
1400      # The diagnosis changed in icc 8.0:
1401      #   icc: Command line remark: option '-MP' not supported
1402      if (grep 'ignoring option' conftest.err ||
1403          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1404        am_cv_$1_dependencies_compiler_type=$depmode
1405        break
1406      fi
1407    fi
1408  done
1409
1410  cd ..
1411  rm -rf conftest.dir
1412else
1413  am_cv_$1_dependencies_compiler_type=none
1414fi
1415])
1416AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1417AM_CONDITIONAL([am__fastdep$1], [
1418  test "x$enable_dependency_tracking" != xno \
1419  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1420])
1421
1422
1423# AM_SET_DEPDIR
1424# -------------
1425# Choose a directory name for dependency files.
1426# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1427AC_DEFUN([AM_SET_DEPDIR],
1428[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1429AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1430])
1431
1432
1433# AM_DEP_TRACK
1434# ------------
1435AC_DEFUN([AM_DEP_TRACK],
1436[AC_ARG_ENABLE([dependency-tracking], [dnl
1437AS_HELP_STRING(
1438  [--enable-dependency-tracking],
1439  [do not reject slow dependency extractors])
1440AS_HELP_STRING(
1441  [--disable-dependency-tracking],
1442  [speeds up one-time build])])
1443if test "x$enable_dependency_tracking" != xno; then
1444  am_depcomp="$ac_aux_dir/depcomp"
1445  AMDEPBACKSLASH='\'
1446  am__nodep='_no'
1447fi
1448AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1449AC_SUBST([AMDEPBACKSLASH])dnl
1450_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1451AC_SUBST([am__nodep])dnl
1452_AM_SUBST_NOTMAKE([am__nodep])dnl
1453])
1454
1455# Generate code to set up dependency tracking.              -*- Autoconf -*-
1456
1457# Copyright (C) 1999-2018 Free Software Foundation, Inc.
1458#
1459# This file is free software; the Free Software Foundation
1460# gives unlimited permission to copy and/or distribute it,
1461# with or without modifications, as long as this notice is preserved.
1462
1463# _AM_OUTPUT_DEPENDENCY_COMMANDS
1464# ------------------------------
1465AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1466[{
1467  # Older Autoconf quotes --file arguments for eval, but not when files
1468  # are listed without --file.  Let's play safe and only enable the eval
1469  # if we detect the quoting.
1470  # TODO: see whether this extra hack can be removed once we start
1471  # requiring Autoconf 2.70 or later.
1472  AS_CASE([$CONFIG_FILES],
1473          [*\'*], [eval set x "$CONFIG_FILES"],
1474          [*], [set x $CONFIG_FILES])
1475  shift
1476  # Used to flag and report bootstrapping failures.
1477  am_rc=0
1478  for am_mf
1479  do
1480    # Strip MF so we end up with the name of the file.
1481    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
1482    # Check whether this is an Automake generated Makefile which includes
1483    # dependency-tracking related rules and includes.
1484    # Grep'ing the whole file directly is not great: AIX grep has a line
1485    # limit of 2048, but all sed's we know have understand at least 4000.
1486    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
1487      || continue
1488    am_dirpart=`AS_DIRNAME(["$am_mf"])`
1489    am_filepart=`AS_BASENAME(["$am_mf"])`
1490    AM_RUN_LOG([cd "$am_dirpart" \
1491      && sed -e '/# am--include-marker/d' "$am_filepart" \
1492        | $MAKE -f - am--depfiles]) || am_rc=$?
1493  done
1494  if test $am_rc -ne 0; then
1495    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
1496    for automatic dependency tracking.  Try re-running configure with the
1497    '--disable-dependency-tracking' option to at least be able to build
1498    the package (albeit without support for automatic dependency tracking).])
1499  fi
1500  AS_UNSET([am_dirpart])
1501  AS_UNSET([am_filepart])
1502  AS_UNSET([am_mf])
1503  AS_UNSET([am_rc])
1504  rm -f conftest-deps.mk
1505}
1506])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1507
1508
1509# AM_OUTPUT_DEPENDENCY_COMMANDS
1510# -----------------------------
1511# This macro should only be invoked once -- use via AC_REQUIRE.
1512#
1513# This code is only required when automatic dependency tracking is enabled.
1514# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
1515# order to bootstrap the dependency handling code.
1516AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1517[AC_CONFIG_COMMANDS([depfiles],
1518     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1519     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
1520
1521# Do all the work for Automake.                             -*- Autoconf -*-
1522
1523# Copyright (C) 1996-2018 Free Software Foundation, Inc.
1524#
1525# This file is free software; the Free Software Foundation
1526# gives unlimited permission to copy and/or distribute it,
1527# with or without modifications, as long as this notice is preserved.
1528
1529# This macro actually does too much.  Some checks are only needed if
1530# your package does certain things.  But this isn't really a big deal.
1531
1532dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1533m4_define([AC_PROG_CC],
1534m4_defn([AC_PROG_CC])
1535[_AM_PROG_CC_C_O
1536])
1537
1538# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1539# AM_INIT_AUTOMAKE([OPTIONS])
1540# -----------------------------------------------
1541# The call with PACKAGE and VERSION arguments is the old style
1542# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1543# and VERSION should now be passed to AC_INIT and removed from
1544# the call to AM_INIT_AUTOMAKE.
1545# We support both call styles for the transition.  After
1546# the next Automake release, Autoconf can make the AC_INIT
1547# arguments mandatory, and then we can depend on a new Autoconf
1548# release and drop the old call support.
1549AC_DEFUN([AM_INIT_AUTOMAKE],
1550[AC_PREREQ([2.65])dnl
1551dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1552dnl the ones we care about.
1553m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1554AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1555AC_REQUIRE([AC_PROG_INSTALL])dnl
1556if test "`cd $srcdir && pwd`" != "`pwd`"; then
1557  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1558  # is not polluted with repeated "-I."
1559  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1560  # test to see if srcdir already configured
1561  if test -f $srcdir/config.status; then
1562    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1563  fi
1564fi
1565
1566# test whether we have cygpath
1567if test -z "$CYGPATH_W"; then
1568  if (cygpath --version) >/dev/null 2>/dev/null; then
1569    CYGPATH_W='cygpath -w'
1570  else
1571    CYGPATH_W=echo
1572  fi
1573fi
1574AC_SUBST([CYGPATH_W])
1575
1576# Define the identity of the package.
1577dnl Distinguish between old-style and new-style calls.
1578m4_ifval([$2],
1579[AC_DIAGNOSE([obsolete],
1580             [$0: two- and three-arguments forms are deprecated.])
1581m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1582 AC_SUBST([PACKAGE], [$1])dnl
1583 AC_SUBST([VERSION], [$2])],
1584[_AM_SET_OPTIONS([$1])dnl
1585dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1586m4_if(
1587  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1588  [ok:ok],,
1589  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1590 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1591 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1592
1593_AM_IF_OPTION([no-define],,
1594[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1595 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1596
1597# Some tools Automake needs.
1598AC_REQUIRE([AM_SANITY_CHECK])dnl
1599AC_REQUIRE([AC_ARG_PROGRAM])dnl
1600AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1601AM_MISSING_PROG([AUTOCONF], [autoconf])
1602AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1603AM_MISSING_PROG([AUTOHEADER], [autoheader])
1604AM_MISSING_PROG([MAKEINFO], [makeinfo])
1605AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1606AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1607AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1608# For better backward compatibility.  To be removed once Automake 1.9.x
1609# dies out for good.  For more background, see:
1610# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1611# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1612AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1613# We need awk for the "check" target (and possibly the TAP driver).  The
1614# system "awk" is bad on some platforms.
1615AC_REQUIRE([AC_PROG_AWK])dnl
1616AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1617AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1618_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1619	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1620			     [_AM_PROG_TAR([v7])])])
1621_AM_IF_OPTION([no-dependencies],,
1622[AC_PROVIDE_IFELSE([AC_PROG_CC],
1623		  [_AM_DEPENDENCIES([CC])],
1624		  [m4_define([AC_PROG_CC],
1625			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1626AC_PROVIDE_IFELSE([AC_PROG_CXX],
1627		  [_AM_DEPENDENCIES([CXX])],
1628		  [m4_define([AC_PROG_CXX],
1629			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1630AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1631		  [_AM_DEPENDENCIES([OBJC])],
1632		  [m4_define([AC_PROG_OBJC],
1633			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1634AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1635		  [_AM_DEPENDENCIES([OBJCXX])],
1636		  [m4_define([AC_PROG_OBJCXX],
1637			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1638])
1639AC_REQUIRE([AM_SILENT_RULES])dnl
1640dnl The testsuite driver may need to know about EXEEXT, so add the
1641dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1642dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1643AC_CONFIG_COMMANDS_PRE(dnl
1644[m4_provide_if([_AM_COMPILER_EXEEXT],
1645  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1646
1647# POSIX will say in a future version that running "rm -f" with no argument
1648# is OK; and we want to be able to make that assumption in our Makefile
1649# recipes.  So use an aggressive probe to check that the usage we want is
1650# actually supported "in the wild" to an acceptable degree.
1651# See automake bug#10828.
1652# To make any issue more visible, cause the running configure to be aborted
1653# by default if the 'rm' program in use doesn't match our expectations; the
1654# user can still override this though.
1655if rm -f && rm -fr && rm -rf; then : OK; else
1656  cat >&2 <<'END'
1657Oops!
1658
1659Your 'rm' program seems unable to run without file operands specified
1660on the command line, even when the '-f' option is present.  This is contrary
1661to the behaviour of most rm programs out there, and not conforming with
1662the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1663
1664Please tell bug-automake@gnu.org about your system, including the value
1665of your $PATH and any error possibly output before this message.  This
1666can help us improve future automake versions.
1667
1668END
1669  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1670    echo 'Configuration will proceed anyway, since you have set the' >&2
1671    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1672    echo >&2
1673  else
1674    cat >&2 <<'END'
1675Aborting the configuration process, to ensure you take notice of the issue.
1676
1677You can download and install GNU coreutils to get an 'rm' implementation
1678that behaves properly: <https://www.gnu.org/software/coreutils/>.
1679
1680If you want to complete the configuration process using your problematic
1681'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1682to "yes", and re-run configure.
1683
1684END
1685    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1686  fi
1687fi
1688dnl The trailing newline in this macro's definition is deliberate, for
1689dnl backward compatibility and to allow trailing 'dnl'-style comments
1690dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1691])
1692
1693dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1694dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1695dnl mangled by Autoconf and run in a shell conditional statement.
1696m4_define([_AC_COMPILER_EXEEXT],
1697m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1698
1699# When config.status generates a header, we must update the stamp-h file.
1700# This file resides in the same directory as the config header
1701# that is generated.  The stamp files are numbered to have different names.
1702
1703# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1704# loop where config.status creates the headers, so we can generate
1705# our stamp files there.
1706AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1707[# Compute $1's index in $config_headers.
1708_am_arg=$1
1709_am_stamp_count=1
1710for _am_header in $config_headers :; do
1711  case $_am_header in
1712    $_am_arg | $_am_arg:* )
1713      break ;;
1714    * )
1715      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1716  esac
1717done
1718echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1719
1720# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1721#
1722# This file is free software; the Free Software Foundation
1723# gives unlimited permission to copy and/or distribute it,
1724# with or without modifications, as long as this notice is preserved.
1725
1726# AM_PROG_INSTALL_SH
1727# ------------------
1728# Define $install_sh.
1729AC_DEFUN([AM_PROG_INSTALL_SH],
1730[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1731if test x"${install_sh+set}" != xset; then
1732  case $am_aux_dir in
1733  *\ * | *\	*)
1734    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1735  *)
1736    install_sh="\${SHELL} $am_aux_dir/install-sh"
1737  esac
1738fi
1739AC_SUBST([install_sh])])
1740
1741# Copyright (C) 2003-2018 Free Software Foundation, Inc.
1742#
1743# This file is free software; the Free Software Foundation
1744# gives unlimited permission to copy and/or distribute it,
1745# with or without modifications, as long as this notice is preserved.
1746
1747# Check whether the underlying file-system supports filenames
1748# with a leading dot.  For instance MS-DOS doesn't.
1749AC_DEFUN([AM_SET_LEADING_DOT],
1750[rm -rf .tst 2>/dev/null
1751mkdir .tst 2>/dev/null
1752if test -d .tst; then
1753  am__leading_dot=.
1754else
1755  am__leading_dot=_
1756fi
1757rmdir .tst 2>/dev/null
1758AC_SUBST([am__leading_dot])])
1759
1760# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1761# From Jim Meyering
1762
1763# Copyright (C) 1996-2018 Free Software Foundation, Inc.
1764#
1765# This file is free software; the Free Software Foundation
1766# gives unlimited permission to copy and/or distribute it,
1767# with or without modifications, as long as this notice is preserved.
1768
1769# AM_MAINTAINER_MODE([DEFAULT-MODE])
1770# ----------------------------------
1771# Control maintainer-specific portions of Makefiles.
1772# Default is to disable them, unless 'enable' is passed literally.
1773# For symmetry, 'disable' may be passed as well.  Anyway, the user
1774# can override the default with the --enable/--disable switch.
1775AC_DEFUN([AM_MAINTAINER_MODE],
1776[m4_case(m4_default([$1], [disable]),
1777       [enable], [m4_define([am_maintainer_other], [disable])],
1778       [disable], [m4_define([am_maintainer_other], [enable])],
1779       [m4_define([am_maintainer_other], [enable])
1780        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1781AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1782  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1783  AC_ARG_ENABLE([maintainer-mode],
1784    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1785      am_maintainer_other[ make rules and dependencies not useful
1786      (and sometimes confusing) to the casual installer])],
1787    [USE_MAINTAINER_MODE=$enableval],
1788    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1789  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1790  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1791  MAINT=$MAINTAINER_MODE_TRUE
1792  AC_SUBST([MAINT])dnl
1793]
1794)
1795
1796# Check to see how 'make' treats includes.	            -*- Autoconf -*-
1797
1798# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1799#
1800# This file is free software; the Free Software Foundation
1801# gives unlimited permission to copy and/or distribute it,
1802# with or without modifications, as long as this notice is preserved.
1803
1804# AM_MAKE_INCLUDE()
1805# -----------------
1806# Check whether make has an 'include' directive that can support all
1807# the idioms we need for our automatic dependency tracking code.
1808AC_DEFUN([AM_MAKE_INCLUDE],
1809[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
1810cat > confinc.mk << 'END'
1811am__doit:
1812	@echo this is the am__doit target >confinc.out
1813.PHONY: am__doit
1814END
1815am__include="#"
1816am__quote=
1817# BSD make does it like this.
1818echo '.include "confinc.mk" # ignored' > confmf.BSD
1819# Other make implementations (GNU, Solaris 10, AIX) do it like this.
1820echo 'include confinc.mk # ignored' > confmf.GNU
1821_am_result=no
1822for s in GNU BSD; do
1823  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
1824  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
1825      ['0:this is the am__doit target'],
1826      [AS_CASE([$s],
1827          [BSD], [am__include='.include' am__quote='"'],
1828          [am__include='include' am__quote=''])])
1829  if test "$am__include" != "#"; then
1830    _am_result="yes ($s style)"
1831    break
1832  fi
1833done
1834rm -f confinc.* confmf.*
1835AC_MSG_RESULT([${_am_result}])
1836AC_SUBST([am__include])])
1837AC_SUBST([am__quote])])
1838
1839# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1840
1841# Copyright (C) 1997-2018 Free Software Foundation, Inc.
1842#
1843# This file is free software; the Free Software Foundation
1844# gives unlimited permission to copy and/or distribute it,
1845# with or without modifications, as long as this notice is preserved.
1846
1847# AM_MISSING_PROG(NAME, PROGRAM)
1848# ------------------------------
1849AC_DEFUN([AM_MISSING_PROG],
1850[AC_REQUIRE([AM_MISSING_HAS_RUN])
1851$1=${$1-"${am_missing_run}$2"}
1852AC_SUBST($1)])
1853
1854# AM_MISSING_HAS_RUN
1855# ------------------
1856# Define MISSING if not defined so far and test if it is modern enough.
1857# If it is, set am_missing_run to use it, otherwise, to nothing.
1858AC_DEFUN([AM_MISSING_HAS_RUN],
1859[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1860AC_REQUIRE_AUX_FILE([missing])dnl
1861if test x"${MISSING+set}" != xset; then
1862  case $am_aux_dir in
1863  *\ * | *\	*)
1864    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1865  *)
1866    MISSING="\${SHELL} $am_aux_dir/missing" ;;
1867  esac
1868fi
1869# Use eval to expand $SHELL
1870if eval "$MISSING --is-lightweight"; then
1871  am_missing_run="$MISSING "
1872else
1873  am_missing_run=
1874  AC_MSG_WARN(['missing' script is too old or missing])
1875fi
1876])
1877
1878# Helper functions for option handling.                     -*- Autoconf -*-
1879
1880# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1881#
1882# This file is free software; the Free Software Foundation
1883# gives unlimited permission to copy and/or distribute it,
1884# with or without modifications, as long as this notice is preserved.
1885
1886# _AM_MANGLE_OPTION(NAME)
1887# -----------------------
1888AC_DEFUN([_AM_MANGLE_OPTION],
1889[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1890
1891# _AM_SET_OPTION(NAME)
1892# --------------------
1893# Set option NAME.  Presently that only means defining a flag for this option.
1894AC_DEFUN([_AM_SET_OPTION],
1895[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1896
1897# _AM_SET_OPTIONS(OPTIONS)
1898# ------------------------
1899# OPTIONS is a space-separated list of Automake options.
1900AC_DEFUN([_AM_SET_OPTIONS],
1901[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1902
1903# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1904# -------------------------------------------
1905# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1906AC_DEFUN([_AM_IF_OPTION],
1907[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1908
1909# Copyright (C) 1999-2018 Free Software Foundation, Inc.
1910#
1911# This file is free software; the Free Software Foundation
1912# gives unlimited permission to copy and/or distribute it,
1913# with or without modifications, as long as this notice is preserved.
1914
1915# _AM_PROG_CC_C_O
1916# ---------------
1917# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
1918# to automatically call this.
1919AC_DEFUN([_AM_PROG_CC_C_O],
1920[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1921AC_REQUIRE_AUX_FILE([compile])dnl
1922AC_LANG_PUSH([C])dnl
1923AC_CACHE_CHECK(
1924  [whether $CC understands -c and -o together],
1925  [am_cv_prog_cc_c_o],
1926  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1927  # Make sure it works both with $CC and with simple cc.
1928  # Following AC_PROG_CC_C_O, we do the test twice because some
1929  # compilers refuse to overwrite an existing .o file with -o,
1930  # though they will create one.
1931  am_cv_prog_cc_c_o=yes
1932  for am_i in 1 2; do
1933    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1934         && test -f conftest2.$ac_objext; then
1935      : OK
1936    else
1937      am_cv_prog_cc_c_o=no
1938      break
1939    fi
1940  done
1941  rm -f core conftest*
1942  unset am_i])
1943if test "$am_cv_prog_cc_c_o" != yes; then
1944   # Losing compiler, so override with the script.
1945   # FIXME: It is wrong to rewrite CC.
1946   # But if we don't then we get into trouble of one sort or another.
1947   # A longer-term fix would be to have automake use am__CC in this case,
1948   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1949   CC="$am_aux_dir/compile $CC"
1950fi
1951AC_LANG_POP([C])])
1952
1953# For backward compatibility.
1954AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1955
1956# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1957#
1958# This file is free software; the Free Software Foundation
1959# gives unlimited permission to copy and/or distribute it,
1960# with or without modifications, as long as this notice is preserved.
1961
1962# AM_RUN_LOG(COMMAND)
1963# -------------------
1964# Run COMMAND, save the exit status in ac_status, and log it.
1965# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1966AC_DEFUN([AM_RUN_LOG],
1967[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1968   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1969   ac_status=$?
1970   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1971   (exit $ac_status); }])
1972
1973# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1974
1975# Copyright (C) 1996-2018 Free Software Foundation, Inc.
1976#
1977# This file is free software; the Free Software Foundation
1978# gives unlimited permission to copy and/or distribute it,
1979# with or without modifications, as long as this notice is preserved.
1980
1981# AM_SANITY_CHECK
1982# ---------------
1983AC_DEFUN([AM_SANITY_CHECK],
1984[AC_MSG_CHECKING([whether build environment is sane])
1985# Reject unsafe characters in $srcdir or the absolute working directory
1986# name.  Accept space and tab only in the latter.
1987am_lf='
1988'
1989case `pwd` in
1990  *[[\\\"\#\$\&\'\`$am_lf]]*)
1991    AC_MSG_ERROR([unsafe absolute working directory name]);;
1992esac
1993case $srcdir in
1994  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1995    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1996esac
1997
1998# Do 'set' in a subshell so we don't clobber the current shell's
1999# arguments.  Must try -L first in case configure is actually a
2000# symlink; some systems play weird games with the mod time of symlinks
2001# (eg FreeBSD returns the mod time of the symlink's containing
2002# directory).
2003if (
2004   am_has_slept=no
2005   for am_try in 1 2; do
2006     echo "timestamp, slept: $am_has_slept" > conftest.file
2007     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2008     if test "$[*]" = "X"; then
2009	# -L didn't work.
2010	set X `ls -t "$srcdir/configure" conftest.file`
2011     fi
2012     if test "$[*]" != "X $srcdir/configure conftest.file" \
2013	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
2014
2015	# If neither matched, then we have a broken ls.  This can happen
2016	# if, for instance, CONFIG_SHELL is bash and it inherits a
2017	# broken ls alias from the environment.  This has actually
2018	# happened.  Such a system could not be considered "sane".
2019	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2020  alias in your environment])
2021     fi
2022     if test "$[2]" = conftest.file || test $am_try -eq 2; then
2023       break
2024     fi
2025     # Just in case.
2026     sleep 1
2027     am_has_slept=yes
2028   done
2029   test "$[2]" = conftest.file
2030   )
2031then
2032   # Ok.
2033   :
2034else
2035   AC_MSG_ERROR([newly created file is older than distributed files!
2036Check your system clock])
2037fi
2038AC_MSG_RESULT([yes])
2039# If we didn't sleep, we still need to ensure time stamps of config.status and
2040# generated files are strictly newer.
2041am_sleep_pid=
2042if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2043  ( sleep 1 ) &
2044  am_sleep_pid=$!
2045fi
2046AC_CONFIG_COMMANDS_PRE(
2047  [AC_MSG_CHECKING([that generated files are newer than configure])
2048   if test -n "$am_sleep_pid"; then
2049     # Hide warnings about reused PIDs.
2050     wait $am_sleep_pid 2>/dev/null
2051   fi
2052   AC_MSG_RESULT([done])])
2053rm -f conftest.file
2054])
2055
2056# Copyright (C) 2009-2018 Free Software Foundation, Inc.
2057#
2058# This file is free software; the Free Software Foundation
2059# gives unlimited permission to copy and/or distribute it,
2060# with or without modifications, as long as this notice is preserved.
2061
2062# AM_SILENT_RULES([DEFAULT])
2063# --------------------------
2064# Enable less verbose build rules; with the default set to DEFAULT
2065# ("yes" being less verbose, "no" or empty being verbose).
2066AC_DEFUN([AM_SILENT_RULES],
2067[AC_ARG_ENABLE([silent-rules], [dnl
2068AS_HELP_STRING(
2069  [--enable-silent-rules],
2070  [less verbose build output (undo: "make V=1")])
2071AS_HELP_STRING(
2072  [--disable-silent-rules],
2073  [verbose build output (undo: "make V=0")])dnl
2074])
2075case $enable_silent_rules in @%:@ (((
2076  yes) AM_DEFAULT_VERBOSITY=0;;
2077   no) AM_DEFAULT_VERBOSITY=1;;
2078    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2079esac
2080dnl
2081dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2082dnl do not support nested variable expansions.
2083dnl See automake bug#9928 and bug#10237.
2084am_make=${MAKE-make}
2085AC_CACHE_CHECK([whether $am_make supports nested variables],
2086   [am_cv_make_support_nested_variables],
2087   [if AS_ECHO([['TRUE=$(BAR$(V))
2088BAR0=false
2089BAR1=true
2090V=1
2091am__doit:
2092	@$(TRUE)
2093.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2094  am_cv_make_support_nested_variables=yes
2095else
2096  am_cv_make_support_nested_variables=no
2097fi])
2098if test $am_cv_make_support_nested_variables = yes; then
2099  dnl Using '$V' instead of '$(V)' breaks IRIX make.
2100  AM_V='$(V)'
2101  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2102else
2103  AM_V=$AM_DEFAULT_VERBOSITY
2104  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2105fi
2106AC_SUBST([AM_V])dnl
2107AM_SUBST_NOTMAKE([AM_V])dnl
2108AC_SUBST([AM_DEFAULT_V])dnl
2109AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2110AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2111AM_BACKSLASH='\'
2112AC_SUBST([AM_BACKSLASH])dnl
2113_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2114])
2115
2116# Copyright (C) 2001-2018 Free Software Foundation, Inc.
2117#
2118# This file is free software; the Free Software Foundation
2119# gives unlimited permission to copy and/or distribute it,
2120# with or without modifications, as long as this notice is preserved.
2121
2122# AM_PROG_INSTALL_STRIP
2123# ---------------------
2124# One issue with vendor 'install' (even GNU) is that you can't
2125# specify the program used to strip binaries.  This is especially
2126# annoying in cross-compiling environments, where the build's strip
2127# is unlikely to handle the host's binaries.
2128# Fortunately install-sh will honor a STRIPPROG variable, so we
2129# always use install-sh in "make install-strip", and initialize
2130# STRIPPROG with the value of the STRIP variable (set by the user).
2131AC_DEFUN([AM_PROG_INSTALL_STRIP],
2132[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2133# Installed binaries are usually stripped using 'strip' when the user
2134# run "make install-strip".  However 'strip' might not be the right
2135# tool to use in cross-compilation environments, therefore Automake
2136# will honor the 'STRIP' environment variable to overrule this program.
2137dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2138if test "$cross_compiling" != no; then
2139  AC_CHECK_TOOL([STRIP], [strip], :)
2140fi
2141INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2142AC_SUBST([INSTALL_STRIP_PROGRAM])])
2143
2144# Copyright (C) 2006-2018 Free Software Foundation, Inc.
2145#
2146# This file is free software; the Free Software Foundation
2147# gives unlimited permission to copy and/or distribute it,
2148# with or without modifications, as long as this notice is preserved.
2149
2150# _AM_SUBST_NOTMAKE(VARIABLE)
2151# ---------------------------
2152# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2153# This macro is traced by Automake.
2154AC_DEFUN([_AM_SUBST_NOTMAKE])
2155
2156# AM_SUBST_NOTMAKE(VARIABLE)
2157# --------------------------
2158# Public sister of _AM_SUBST_NOTMAKE.
2159AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2160
2161# Check how to create a tarball.                            -*- Autoconf -*-
2162
2163# Copyright (C) 2004-2018 Free Software Foundation, Inc.
2164#
2165# This file is free software; the Free Software Foundation
2166# gives unlimited permission to copy and/or distribute it,
2167# with or without modifications, as long as this notice is preserved.
2168
2169# _AM_PROG_TAR(FORMAT)
2170# --------------------
2171# Check how to create a tarball in format FORMAT.
2172# FORMAT should be one of 'v7', 'ustar', or 'pax'.
2173#
2174# Substitute a variable $(am__tar) that is a command
2175# writing to stdout a FORMAT-tarball containing the directory
2176# $tardir.
2177#     tardir=directory && $(am__tar) > result.tar
2178#
2179# Substitute a variable $(am__untar) that extract such
2180# a tarball read from stdin.
2181#     $(am__untar) < result.tar
2182#
2183AC_DEFUN([_AM_PROG_TAR],
2184[# Always define AMTAR for backward compatibility.  Yes, it's still used
2185# in the wild :-(  We should find a proper way to deprecate it ...
2186AC_SUBST([AMTAR], ['$${TAR-tar}'])
2187
2188# We'll loop over all known methods to create a tar archive until one works.
2189_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2190
2191m4_if([$1], [v7],
2192  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2193
2194  [m4_case([$1],
2195    [ustar],
2196     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2197      # There is notably a 21 bits limit for the UID and the GID.  In fact,
2198      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2199      # and bug#13588).
2200      am_max_uid=2097151 # 2^21 - 1
2201      am_max_gid=$am_max_uid
2202      # The $UID and $GID variables are not portable, so we need to resort
2203      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
2204      # below are definitely unexpected, so allow the users to see them
2205      # (that is, avoid stderr redirection).
2206      am_uid=`id -u || echo unknown`
2207      am_gid=`id -g || echo unknown`
2208      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2209      if test $am_uid -le $am_max_uid; then
2210         AC_MSG_RESULT([yes])
2211      else
2212         AC_MSG_RESULT([no])
2213         _am_tools=none
2214      fi
2215      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2216      if test $am_gid -le $am_max_gid; then
2217         AC_MSG_RESULT([yes])
2218      else
2219        AC_MSG_RESULT([no])
2220        _am_tools=none
2221      fi],
2222
2223  [pax],
2224    [],
2225
2226  [m4_fatal([Unknown tar format])])
2227
2228  AC_MSG_CHECKING([how to create a $1 tar archive])
2229
2230  # Go ahead even if we have the value already cached.  We do so because we
2231  # need to set the values for the 'am__tar' and 'am__untar' variables.
2232  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2233
2234  for _am_tool in $_am_tools; do
2235    case $_am_tool in
2236    gnutar)
2237      for _am_tar in tar gnutar gtar; do
2238        AM_RUN_LOG([$_am_tar --version]) && break
2239      done
2240      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2241      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2242      am__untar="$_am_tar -xf -"
2243      ;;
2244    plaintar)
2245      # Must skip GNU tar: if it does not support --format= it doesn't create
2246      # ustar tarball either.
2247      (tar --version) >/dev/null 2>&1 && continue
2248      am__tar='tar chf - "$$tardir"'
2249      am__tar_='tar chf - "$tardir"'
2250      am__untar='tar xf -'
2251      ;;
2252    pax)
2253      am__tar='pax -L -x $1 -w "$$tardir"'
2254      am__tar_='pax -L -x $1 -w "$tardir"'
2255      am__untar='pax -r'
2256      ;;
2257    cpio)
2258      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2259      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2260      am__untar='cpio -i -H $1 -d'
2261      ;;
2262    none)
2263      am__tar=false
2264      am__tar_=false
2265      am__untar=false
2266      ;;
2267    esac
2268
2269    # If the value was cached, stop now.  We just wanted to have am__tar
2270    # and am__untar set.
2271    test -n "${am_cv_prog_tar_$1}" && break
2272
2273    # tar/untar a dummy directory, and stop if the command works.
2274    rm -rf conftest.dir
2275    mkdir conftest.dir
2276    echo GrepMe > conftest.dir/file
2277    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2278    rm -rf conftest.dir
2279    if test -s conftest.tar; then
2280      AM_RUN_LOG([$am__untar <conftest.tar])
2281      AM_RUN_LOG([cat conftest.dir/file])
2282      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2283    fi
2284  done
2285  rm -rf conftest.dir
2286
2287  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2288  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2289
2290AC_SUBST([am__tar])
2291AC_SUBST([am__untar])
2292]) # _AM_PROG_TAR
2293
2294m4_include([m4/libtool.m4])
2295m4_include([m4/ltoptions.m4])
2296m4_include([m4/ltsugar.m4])
2297m4_include([m4/ltversion.m4])
2298m4_include([m4/lt~obsolete.m4])
2299