Fixing missing backslashes before minus signs in the manpage.
[debian/lxdm.git] / aclocal.m4
CommitLineData
d6ba7c28
AG
1# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2
3# Copyright (C) 1996-2013 Free Software Foundation, Inc.
9931e273 4
9931e273
DB
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
d6ba7c28 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
9931e273
DB
15m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
d6ba7c28
AG
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
9931e273
DB
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.
d6ba7c28 21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
9931e273
DB
22
23
24dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
d6ba7c28 25# serial 42 IT_PROG_INTLTOOL
9931e273
DB
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
d6ba7c28
AG
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; }'`
9931e273
DB
41if test -n "$1"; then
42 AC_MSG_CHECKING([for intltool >= $1])
9931e273
DB
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
d6ba7c28
AG
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 $< [$]@'
9931e273
DB
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
d6ba7c28 142 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
9931e273
DB
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
157# Set DATADIRNAME correctly if it is not set yet
158# (copied from glib-gettext.m4)
159if test -z "$DATADIRNAME"; then
160 AC_LINK_IFELSE(
161 [AC_LANG_PROGRAM([[]],
162 [[extern int _nl_msg_cat_cntr;
163 return _nl_msg_cat_cntr]])],
164 [DATADIRNAME=share],
165 [case $host in
166 *-*-solaris*)
167 dnl On Solaris, if bind_textdomain_codeset is in libc,
168 dnl GNU format message catalog is always supported,
169 dnl since both are added to the libc all together.
170 dnl Hence, we'd like to go with DATADIRNAME=share
171 dnl in this case.
172 AC_CHECK_FUNC(bind_textdomain_codeset,
173 [DATADIRNAME=share], [DATADIRNAME=lib])
174 ;;
175 *)
176 [DATADIRNAME=lib]
177 ;;
178 esac])
179fi
180AC_SUBST(DATADIRNAME)
181
182IT_PO_SUBDIR([po])
183
184])
185
186
187# IT_PO_SUBDIR(DIRNAME)
188# ---------------------
189# All po subdirs have to be declared with this macro; the subdir "po" is
190# declared by IT_PROG_INTLTOOL.
191#
192AC_DEFUN([IT_PO_SUBDIR],
193[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
194dnl
195dnl The following CONFIG_COMMANDS should be executed at the very end
196dnl of config.status.
197AC_CONFIG_COMMANDS_PRE([
198 AC_CONFIG_COMMANDS([$1/stamp-it], [
199 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
200 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
201 fi
202 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
203 >"$1/stamp-it.tmp"
204 [sed '/^#/d
205 s/^[[].*] *//
206 /^[ ]*$/d
207 '"s|^| $ac_top_srcdir/|" \
208 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
209 ]
210 [sed '/^POTFILES =/,/[^\\]$/ {
211 /^POTFILES =/!d
212 r $1/POTFILES
213 }
214 ' "$1/Makefile.in" >"$1/Makefile"]
215 rm -f "$1/Makefile.tmp"
216 mv "$1/stamp-it.tmp" "$1/stamp-it"
217 ])
218])dnl
219])
220
221# _IT_SUBST(VARIABLE)
222# -------------------
223# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
224#
225AC_DEFUN([_IT_SUBST],
226[
227AC_SUBST([$1])
228m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
229]
230)
231
232# deprecated macros
233AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
234# A hint is needed for aclocal from Automake <= 1.9.4:
235# AC_DEFUN([AC_PROG_INTLTOOL], ...)
236
237
238# nls.m4 serial 5 (gettext-0.18)
d6ba7c28 239dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
9931e273
DB
240dnl Inc.
241dnl This file is free software; the Free Software Foundation
242dnl gives unlimited permission to copy and/or distribute it,
243dnl with or without modifications, as long as this notice is preserved.
244dnl
245dnl This file can can be used in projects which are not available under
246dnl the GNU General Public License or the GNU Library General Public
247dnl License but which still want to provide support for the GNU gettext
248dnl functionality.
249dnl Please note that the actual code of the GNU gettext library is covered
250dnl by the GNU Library General Public License, and the rest of the GNU
251dnl gettext package package is covered by the GNU General Public License.
252dnl They are *not* in the public domain.
253
254dnl Authors:
255dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
256dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
257
258AC_PREREQ([2.50])
259
260AC_DEFUN([AM_NLS],
261[
262 AC_MSG_CHECKING([whether NLS is requested])
263 dnl Default is enabled NLS
264 AC_ARG_ENABLE([nls],
265 [ --disable-nls do not use Native Language Support],
266 USE_NLS=$enableval, USE_NLS=yes)
267 AC_MSG_RESULT([$USE_NLS])
268 AC_SUBST([USE_NLS])
269])
270
271# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
272# serial 1 (pkg-config-0.24)
273#
274# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
275#
276# This program is free software; you can redistribute it and/or modify
277# it under the terms of the GNU General Public License as published by
278# the Free Software Foundation; either version 2 of the License, or
279# (at your option) any later version.
280#
281# This program is distributed in the hope that it will be useful, but
282# WITHOUT ANY WARRANTY; without even the implied warranty of
283# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
284# General Public License for more details.
285#
286# You should have received a copy of the GNU General Public License
287# along with this program; if not, write to the Free Software
288# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
289#
290# As a special exception to the GNU General Public License, if you
291# distribute this file as part of a program that contains a
292# configuration script generated by Autoconf, you may include it under
293# the same distribution terms that you use for the rest of that program.
294
295# PKG_PROG_PKG_CONFIG([MIN-VERSION])
296# ----------------------------------
297AC_DEFUN([PKG_PROG_PKG_CONFIG],
298[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
d6ba7c28
AG
299m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
300m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9931e273
DB
301AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
302AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
303AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
304
305if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
306 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
307fi
308if test -n "$PKG_CONFIG"; then
309 _pkg_min_version=m4_default([$1], [0.9.0])
310 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
311 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
312 AC_MSG_RESULT([yes])
313 else
314 AC_MSG_RESULT([no])
315 PKG_CONFIG=""
316 fi
317fi[]dnl
318])# PKG_PROG_PKG_CONFIG
319
320# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
321#
322# Check to see whether a particular set of modules exists. Similar
323# to PKG_CHECK_MODULES(), but does not set variables or print errors.
324#
325# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
326# only at the first occurence in configure.ac, so if the first place
327# it's called might be skipped (such as if it is within an "if", you
328# have to call PKG_CHECK_EXISTS manually
329# --------------------------------------------------------------
330AC_DEFUN([PKG_CHECK_EXISTS],
331[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
332if test -n "$PKG_CONFIG" && \
333 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
334 m4_default([$2], [:])
335m4_ifvaln([$3], [else
336 $3])dnl
337fi])
338
339# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
340# ---------------------------------------------
341m4_define([_PKG_CONFIG],
342[if test -n "$$1"; then
343 pkg_cv_[]$1="$$1"
344 elif test -n "$PKG_CONFIG"; then
345 PKG_CHECK_EXISTS([$3],
d6ba7c28
AG
346 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
347 test "x$?" != "x0" && pkg_failed=yes ],
9931e273
DB
348 [pkg_failed=yes])
349 else
350 pkg_failed=untried
351fi[]dnl
352])# _PKG_CONFIG
353
354# _PKG_SHORT_ERRORS_SUPPORTED
355# -----------------------------
356AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
357[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
358if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
359 _pkg_short_errors_supported=yes
360else
361 _pkg_short_errors_supported=no
362fi[]dnl
363])# _PKG_SHORT_ERRORS_SUPPORTED
364
365
366# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
367# [ACTION-IF-NOT-FOUND])
368#
369#
370# Note that if there is a possibility the first call to
371# PKG_CHECK_MODULES might not happen, you should be sure to include an
372# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
373#
374#
375# --------------------------------------------------------------
376AC_DEFUN([PKG_CHECK_MODULES],
377[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
378AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
379AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
380
381pkg_failed=no
382AC_MSG_CHECKING([for $1])
383
384_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
385_PKG_CONFIG([$1][_LIBS], [libs], [$2])
386
387m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
388and $1[]_LIBS to avoid the need to call pkg-config.
389See the pkg-config man page for more details.])
390
391if test $pkg_failed = yes; then
392 AC_MSG_RESULT([no])
393 _PKG_SHORT_ERRORS_SUPPORTED
394 if test $_pkg_short_errors_supported = yes; then
d6ba7c28 395 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9931e273 396 else
d6ba7c28 397 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9931e273
DB
398 fi
399 # Put the nasty error message in config.log where it belongs
400 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
401
402 m4_default([$4], [AC_MSG_ERROR(
403[Package requirements ($2) were not met:
404
405$$1_PKG_ERRORS
406
407Consider adjusting the PKG_CONFIG_PATH environment variable if you
408installed software in a non-standard prefix.
409
410_PKG_TEXT])[]dnl
411 ])
412elif test $pkg_failed = untried; then
413 AC_MSG_RESULT([no])
414 m4_default([$4], [AC_MSG_FAILURE(
415[The pkg-config script could not be found or is too old. Make sure it
416is in your PATH or set the PKG_CONFIG environment variable to the full
417path to pkg-config.
418
419_PKG_TEXT
420
421To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
422 ])
423else
424 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
425 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
426 AC_MSG_RESULT([yes])
427 $3
428fi[]dnl
429])# PKG_CHECK_MODULES
430
d6ba7c28
AG
431
432# PKG_INSTALLDIR(DIRECTORY)
433# -------------------------
434# Substitutes the variable pkgconfigdir as the location where a module
435# should install pkg-config .pc files. By default the directory is
436# $libdir/pkgconfig, but the default can be changed by passing
437# DIRECTORY. The user can override through the --with-pkgconfigdir
438# parameter.
439AC_DEFUN([PKG_INSTALLDIR],
440[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
441m4_pushdef([pkg_description],
442 [pkg-config installation directory @<:@]pkg_default[@:>@])
443AC_ARG_WITH([pkgconfigdir],
444 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
445 [with_pkgconfigdir=]pkg_default)
446AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
447m4_popdef([pkg_default])
448m4_popdef([pkg_description])
449]) dnl PKG_INSTALLDIR
450
451
452# PKG_NOARCH_INSTALLDIR(DIRECTORY)
453# -------------------------
454# Substitutes the variable noarch_pkgconfigdir as the location where a
455# module should install arch-independent pkg-config .pc files. By
456# default the directory is $datadir/pkgconfig, but the default can be
457# changed by passing DIRECTORY. The user can override through the
458# --with-noarch-pkgconfigdir parameter.
459AC_DEFUN([PKG_NOARCH_INSTALLDIR],
460[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
461m4_pushdef([pkg_description],
462 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
463AC_ARG_WITH([noarch-pkgconfigdir],
464 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
465 [with_noarch_pkgconfigdir=]pkg_default)
466AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
467m4_popdef([pkg_default])
468m4_popdef([pkg_description])
469]) dnl PKG_NOARCH_INSTALLDIR
470
471
472# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
473# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
474# -------------------------------------------
475# Retrieves the value of the pkg-config variable for the given module.
476AC_DEFUN([PKG_CHECK_VAR],
477[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
478AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
479
480_PKG_CONFIG([$1], [variable="][$3]["], [$2])
481AS_VAR_COPY([$1], [pkg_cv_][$1])
482
483AS_VAR_IF([$1], [""], [$5], [$4])dnl
484])# PKG_CHECK_VAR
485
486# Copyright (C) 2002-2013 Free Software Foundation, Inc.
9931e273
DB
487#
488# This file is free software; the Free Software Foundation
489# gives unlimited permission to copy and/or distribute it,
490# with or without modifications, as long as this notice is preserved.
491
492# AM_AUTOMAKE_VERSION(VERSION)
493# ----------------------------
494# Automake X.Y traces this macro to ensure aclocal.m4 has been
495# generated from the m4 files accompanying Automake X.Y.
496# (This private macro should not be called outside this file.)
497AC_DEFUN([AM_AUTOMAKE_VERSION],
d6ba7c28 498[am__api_version='1.13'
9931e273
DB
499dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
500dnl require some minimum version. Point them to the right macro.
d6ba7c28 501m4_if([$1], [1.13.4], [],
9931e273
DB
502 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
503])
504
505# _AM_AUTOCONF_VERSION(VERSION)
506# -----------------------------
507# aclocal traces this macro to find the Autoconf version.
508# This is a private macro too. Using m4_define simplifies
509# the logic in aclocal, which can simply ignore this definition.
510m4_define([_AM_AUTOCONF_VERSION], [])
511
512# AM_SET_CURRENT_AUTOMAKE_VERSION
513# -------------------------------
514# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
515# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
516AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
d6ba7c28 517[AM_AUTOMAKE_VERSION([1.13.4])dnl
9931e273
DB
518m4_ifndef([AC_AUTOCONF_VERSION],
519 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
520_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
521
522# AM_AUX_DIR_EXPAND -*- Autoconf -*-
523
d6ba7c28 524# Copyright (C) 2001-2013 Free Software Foundation, Inc.
9931e273
DB
525#
526# This file is free software; the Free Software Foundation
527# gives unlimited permission to copy and/or distribute it,
528# with or without modifications, as long as this notice is preserved.
529
530# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
d6ba7c28
AG
531# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
532# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
9931e273
DB
533#
534# Of course, Automake must honor this variable whenever it calls a
535# tool from the auxiliary directory. The problem is that $srcdir (and
536# therefore $ac_aux_dir as well) can be either absolute or relative,
537# depending on how configure is run. This is pretty annoying, since
538# it makes $ac_aux_dir quite unusable in subdirectories: in the top
539# source directory, any form will work fine, but in subdirectories a
540# relative path needs to be adjusted first.
541#
542# $ac_aux_dir/missing
543# fails when called from a subdirectory if $ac_aux_dir is relative
544# $top_srcdir/$ac_aux_dir/missing
545# fails if $ac_aux_dir is absolute,
546# fails when called from a subdirectory in a VPATH build with
547# a relative $ac_aux_dir
548#
549# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
550# are both prefixed by $srcdir. In an in-source build this is usually
d6ba7c28 551# harmless because $srcdir is '.', but things will broke when you
9931e273
DB
552# start a VPATH build or use an absolute $srcdir.
553#
554# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
555# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
556# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
557# and then we would define $MISSING as
558# MISSING="\${SHELL} $am_aux_dir/missing"
559# This will work as long as MISSING is not called from configure, because
560# unfortunately $(top_srcdir) has no meaning in configure.
561# However there are other variables, like CC, which are often used in
562# configure, and could therefore not use this "fixed" $ac_aux_dir.
563#
564# Another solution, used here, is to always expand $ac_aux_dir to an
565# absolute PATH. The drawback is that using absolute paths prevent a
566# configured tree to be moved without reconfiguration.
567
568AC_DEFUN([AM_AUX_DIR_EXPAND],
569[dnl Rely on autoconf to set up CDPATH properly.
570AC_PREREQ([2.50])dnl
571# expand $ac_aux_dir to an absolute path
572am_aux_dir=`cd $ac_aux_dir && pwd`
573])
574
575# AM_CONDITIONAL -*- Autoconf -*-
576
d6ba7c28 577# Copyright (C) 1997-2013 Free Software Foundation, Inc.
9931e273
DB
578#
579# This file is free software; the Free Software Foundation
580# gives unlimited permission to copy and/or distribute it,
581# with or without modifications, as long as this notice is preserved.
582
9931e273
DB
583# AM_CONDITIONAL(NAME, SHELL-CONDITION)
584# -------------------------------------
585# Define a conditional.
586AC_DEFUN([AM_CONDITIONAL],
d6ba7c28
AG
587[AC_PREREQ([2.52])dnl
588 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
589 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9931e273
DB
590AC_SUBST([$1_TRUE])dnl
591AC_SUBST([$1_FALSE])dnl
592_AM_SUBST_NOTMAKE([$1_TRUE])dnl
593_AM_SUBST_NOTMAKE([$1_FALSE])dnl
594m4_define([_AM_COND_VALUE_$1], [$2])dnl
595if $2; then
596 $1_TRUE=
597 $1_FALSE='#'
598else
599 $1_TRUE='#'
600 $1_FALSE=
601fi
602AC_CONFIG_COMMANDS_PRE(
603[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
604 AC_MSG_ERROR([[conditional "$1" was never defined.
605Usually this means the macro was only invoked conditionally.]])
606fi])])
607
d6ba7c28 608# Copyright (C) 1999-2013 Free Software Foundation, Inc.
9931e273
DB
609#
610# This file is free software; the Free Software Foundation
611# gives unlimited permission to copy and/or distribute it,
612# with or without modifications, as long as this notice is preserved.
613
9931e273 614
d6ba7c28 615# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
9931e273
DB
616# written in clear, in which case automake, when reading aclocal.m4,
617# will think it sees a *use*, and therefore will trigger all it's
618# C support machinery. Also note that it means that autoscan, seeing
619# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
620
621
622# _AM_DEPENDENCIES(NAME)
623# ----------------------
624# See how the compiler implements dependency checking.
d6ba7c28 625# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
9931e273
DB
626# We try a few techniques and use that to set a single cache variable.
627#
628# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
629# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
630# dependency, and given that the user is not expected to run this macro,
631# just rely on AC_PROG_CC.
632AC_DEFUN([_AM_DEPENDENCIES],
633[AC_REQUIRE([AM_SET_DEPDIR])dnl
634AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
635AC_REQUIRE([AM_MAKE_INCLUDE])dnl
636AC_REQUIRE([AM_DEP_TRACK])dnl
637
d6ba7c28
AG
638m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
639 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
640 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
641 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
642 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
643 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
644 [depcc="$$1" am_compiler_list=])
9931e273
DB
645
646AC_CACHE_CHECK([dependency style of $depcc],
647 [am_cv_$1_dependencies_compiler_type],
648[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
649 # We make a subdir and do the tests there. Otherwise we can end up
650 # making bogus files that we don't know about and never remove. For
651 # instance it was reported that on HP-UX the gcc test will end up
d6ba7c28
AG
652 # making a dummy file named 'D' -- because '-MD' means "put the output
653 # in D".
654 rm -rf conftest.dir
9931e273
DB
655 mkdir conftest.dir
656 # Copy depcomp to subdir because otherwise we won't find it if we're
657 # using a relative directory.
658 cp "$am_depcomp" conftest.dir
659 cd conftest.dir
660 # We will build objects and dependencies in a subdirectory because
661 # it helps to detect inapplicable dependency modes. For instance
662 # both Tru64's cc and ICC support -MD to output dependencies as a
663 # side effect of compilation, but ICC will put the dependencies in
664 # the current directory while Tru64 will put them in the object
665 # directory.
666 mkdir sub
667
668 am_cv_$1_dependencies_compiler_type=none
669 if test "$am_compiler_list" = ""; then
670 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
671 fi
672 am__universal=false
673 m4_case([$1], [CC],
674 [case " $depcc " in #(
675 *\ -arch\ *\ -arch\ *) am__universal=true ;;
676 esac],
677 [CXX],
678 [case " $depcc " in #(
679 *\ -arch\ *\ -arch\ *) am__universal=true ;;
680 esac])
681
682 for depmode in $am_compiler_list; do
683 # Setup a source with many dependencies, because some compilers
684 # like to wrap large dependency lists on column 80 (with \), and
685 # we should not choose a depcomp mode which is confused by this.
686 #
687 # We need to recreate these files for each test, as the compiler may
688 # overwrite some of them when testing with obscure command lines.
689 # This happens at least with the AIX C compiler.
690 : > sub/conftest.c
691 for i in 1 2 3 4 5 6; do
692 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d6ba7c28
AG
693 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
694 # Solaris 10 /bin/sh.
695 echo '/* dummy */' > sub/conftst$i.h
9931e273
DB
696 done
697 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
698
d6ba7c28 699 # We check with '-c' and '-o' for the sake of the "dashmstdout"
9931e273 700 # mode. It turns out that the SunPro C++ compiler does not properly
d6ba7c28
AG
701 # handle '-M -o', and we need to detect this. Also, some Intel
702 # versions had trouble with output in subdirs.
9931e273
DB
703 am__obj=sub/conftest.${OBJEXT-o}
704 am__minus_obj="-o $am__obj"
705 case $depmode in
706 gcc)
707 # This depmode causes a compiler race in universal mode.
708 test "$am__universal" = false || continue
709 ;;
710 nosideeffect)
d6ba7c28
AG
711 # After this tag, mechanisms are not by side-effect, so they'll
712 # only be used when explicitly requested.
9931e273
DB
713 if test "x$enable_dependency_tracking" = xyes; then
714 continue
715 else
716 break
717 fi
718 ;;
d6ba7c28
AG
719 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
720 # This compiler won't grok '-c -o', but also, the minuso test has
9931e273
DB
721 # not run yet. These depmodes are late enough in the game, and
722 # so weak that their functioning should not be impacted.
723 am__obj=conftest.${OBJEXT-o}
724 am__minus_obj=
725 ;;
726 none) break ;;
727 esac
728 if depmode=$depmode \
729 source=sub/conftest.c object=$am__obj \
730 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
731 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
732 >/dev/null 2>conftest.err &&
733 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
734 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
735 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
736 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
737 # icc doesn't choke on unknown options, it will just issue warnings
738 # or remarks (even with -Werror). So we grep stderr for any message
739 # that says an option was ignored or not supported.
740 # When given -MP, icc 7.0 and 7.1 complain thusly:
741 # icc: Command line warning: ignoring option '-M'; no argument required
742 # The diagnosis changed in icc 8.0:
743 # icc: Command line remark: option '-MP' not supported
744 if (grep 'ignoring option' conftest.err ||
745 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
746 am_cv_$1_dependencies_compiler_type=$depmode
747 break
748 fi
749 fi
750 done
751
752 cd ..
753 rm -rf conftest.dir
754else
755 am_cv_$1_dependencies_compiler_type=none
756fi
757])
758AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
759AM_CONDITIONAL([am__fastdep$1], [
760 test "x$enable_dependency_tracking" != xno \
761 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
762])
763
764
765# AM_SET_DEPDIR
766# -------------
767# Choose a directory name for dependency files.
d6ba7c28 768# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
9931e273
DB
769AC_DEFUN([AM_SET_DEPDIR],
770[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
771AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
772])
773
774
775# AM_DEP_TRACK
776# ------------
777AC_DEFUN([AM_DEP_TRACK],
d6ba7c28
AG
778[AC_ARG_ENABLE([dependency-tracking], [dnl
779AS_HELP_STRING(
780 [--enable-dependency-tracking],
781 [do not reject slow dependency extractors])
782AS_HELP_STRING(
783 [--disable-dependency-tracking],
784 [speeds up one-time build])])
9931e273
DB
785if test "x$enable_dependency_tracking" != xno; then
786 am_depcomp="$ac_aux_dir/depcomp"
787 AMDEPBACKSLASH='\'
d6ba7c28 788 am__nodep='_no'
9931e273
DB
789fi
790AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
791AC_SUBST([AMDEPBACKSLASH])dnl
792_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
d6ba7c28
AG
793AC_SUBST([am__nodep])dnl
794_AM_SUBST_NOTMAKE([am__nodep])dnl
9931e273
DB
795])
796
797# Generate code to set up dependency tracking. -*- Autoconf -*-
798
d6ba7c28 799# Copyright (C) 1999-2013 Free Software Foundation, Inc.
9931e273
DB
800#
801# This file is free software; the Free Software Foundation
802# gives unlimited permission to copy and/or distribute it,
803# with or without modifications, as long as this notice is preserved.
804
9931e273
DB
805
806# _AM_OUTPUT_DEPENDENCY_COMMANDS
807# ------------------------------
808AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
809[{
d6ba7c28 810 # Older Autoconf quotes --file arguments for eval, but not when files
9931e273
DB
811 # are listed without --file. Let's play safe and only enable the eval
812 # if we detect the quoting.
813 case $CONFIG_FILES in
814 *\'*) eval set x "$CONFIG_FILES" ;;
815 *) set x $CONFIG_FILES ;;
816 esac
817 shift
818 for mf
819 do
820 # Strip MF so we end up with the name of the file.
821 mf=`echo "$mf" | sed -e 's/:.*$//'`
822 # Check whether this is an Automake generated Makefile or not.
d6ba7c28 823 # We used to match only the files named 'Makefile.in', but
9931e273
DB
824 # some people rename them; so instead we look at the file content.
825 # Grep'ing the first line is not enough: some people post-process
826 # each Makefile.in and add a new line on top of each file to say so.
827 # Grep'ing the whole file is not good either: AIX grep has a line
828 # limit of 2048, but all sed's we know have understand at least 4000.
829 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
830 dirpart=`AS_DIRNAME("$mf")`
831 else
832 continue
833 fi
834 # Extract the definition of DEPDIR, am__include, and am__quote
d6ba7c28 835 # from the Makefile without running 'make'.
9931e273
DB
836 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
837 test -z "$DEPDIR" && continue
838 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d6ba7c28 839 test -z "$am__include" && continue
9931e273 840 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9931e273
DB
841 # Find all dependency output files, they are included files with
842 # $(DEPDIR) in their names. We invoke sed twice because it is the
843 # simplest approach to changing $(DEPDIR) to its actual value in the
844 # expansion.
845 for file in `sed -n "
846 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d6ba7c28 847 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
9931e273
DB
848 # Make sure the directory exists.
849 test -f "$dirpart/$file" && continue
850 fdir=`AS_DIRNAME(["$file"])`
851 AS_MKDIR_P([$dirpart/$fdir])
852 # echo "creating $dirpart/$file"
853 echo '# dummy' > "$dirpart/$file"
854 done
855 done
856}
857])# _AM_OUTPUT_DEPENDENCY_COMMANDS
858
859
860# AM_OUTPUT_DEPENDENCY_COMMANDS
861# -----------------------------
862# This macro should only be invoked once -- use via AC_REQUIRE.
863#
864# This code is only required when automatic dependency tracking
d6ba7c28 865# is enabled. FIXME. This creates each '.P' file that we will
9931e273
DB
866# need in order to bootstrap the dependency handling code.
867AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
868[AC_CONFIG_COMMANDS([depfiles],
869 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
870 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
871])
872
873# Do all the work for Automake. -*- Autoconf -*-
874
d6ba7c28 875# Copyright (C) 1996-2013 Free Software Foundation, Inc.
9931e273
DB
876#
877# This file is free software; the Free Software Foundation
878# gives unlimited permission to copy and/or distribute it,
879# with or without modifications, as long as this notice is preserved.
880
9931e273
DB
881# This macro actually does too much. Some checks are only needed if
882# your package does certain things. But this isn't really a big deal.
883
884# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
885# AM_INIT_AUTOMAKE([OPTIONS])
886# -----------------------------------------------
887# The call with PACKAGE and VERSION arguments is the old style
888# call (pre autoconf-2.50), which is being phased out. PACKAGE
889# and VERSION should now be passed to AC_INIT and removed from
890# the call to AM_INIT_AUTOMAKE.
891# We support both call styles for the transition. After
892# the next Automake release, Autoconf can make the AC_INIT
893# arguments mandatory, and then we can depend on a new Autoconf
894# release and drop the old call support.
895AC_DEFUN([AM_INIT_AUTOMAKE],
d6ba7c28 896[AC_PREREQ([2.65])dnl
9931e273
DB
897dnl Autoconf wants to disallow AM_ names. We explicitly allow
898dnl the ones we care about.
899m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
900AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
901AC_REQUIRE([AC_PROG_INSTALL])dnl
902if test "`cd $srcdir && pwd`" != "`pwd`"; then
903 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
904 # is not polluted with repeated "-I."
905 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
906 # test to see if srcdir already configured
907 if test -f $srcdir/config.status; then
908 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
909 fi
910fi
911
912# test whether we have cygpath
913if test -z "$CYGPATH_W"; then
914 if (cygpath --version) >/dev/null 2>/dev/null; then
915 CYGPATH_W='cygpath -w'
916 else
917 CYGPATH_W=echo
918 fi
919fi
920AC_SUBST([CYGPATH_W])
921
922# Define the identity of the package.
923dnl Distinguish between old-style and new-style calls.
924m4_ifval([$2],
d6ba7c28
AG
925[AC_DIAGNOSE([obsolete],
926 [$0: two- and three-arguments forms are deprecated.])
927m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9931e273
DB
928 AC_SUBST([PACKAGE], [$1])dnl
929 AC_SUBST([VERSION], [$2])],
930[_AM_SET_OPTIONS([$1])dnl
931dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
d6ba7c28
AG
932m4_if(
933 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
934 [ok:ok],,
9931e273
DB
935 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
936 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
937 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
938
939_AM_IF_OPTION([no-define],,
d6ba7c28
AG
940[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
941 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
9931e273
DB
942
943# Some tools Automake needs.
944AC_REQUIRE([AM_SANITY_CHECK])dnl
945AC_REQUIRE([AC_ARG_PROGRAM])dnl
d6ba7c28
AG
946AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
947AM_MISSING_PROG([AUTOCONF], [autoconf])
948AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
949AM_MISSING_PROG([AUTOHEADER], [autoheader])
950AM_MISSING_PROG([MAKEINFO], [makeinfo])
9931e273
DB
951AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
952AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
d6ba7c28
AG
953AC_REQUIRE([AC_PROG_MKDIR_P])dnl
954# For better backward compatibility. To be removed once Automake 1.9.x
955# dies out for good. For more background, see:
956# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
957# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
958AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
9931e273
DB
959# We need awk for the "check" target. The system "awk" is bad on
960# some platforms.
961AC_REQUIRE([AC_PROG_AWK])dnl
962AC_REQUIRE([AC_PROG_MAKE_SET])dnl
963AC_REQUIRE([AM_SET_LEADING_DOT])dnl
964_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
965 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
966 [_AM_PROG_TAR([v7])])])
967_AM_IF_OPTION([no-dependencies],,
968[AC_PROVIDE_IFELSE([AC_PROG_CC],
d6ba7c28
AG
969 [_AM_DEPENDENCIES([CC])],
970 [m4_define([AC_PROG_CC],
971 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
9931e273 972AC_PROVIDE_IFELSE([AC_PROG_CXX],
d6ba7c28
AG
973 [_AM_DEPENDENCIES([CXX])],
974 [m4_define([AC_PROG_CXX],
975 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
9931e273 976AC_PROVIDE_IFELSE([AC_PROG_OBJC],
d6ba7c28
AG
977 [_AM_DEPENDENCIES([OBJC])],
978 [m4_define([AC_PROG_OBJC],
979 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
980AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
981 [_AM_DEPENDENCIES([OBJCXX])],
982 [m4_define([AC_PROG_OBJCXX],
983 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
9931e273 984])
d6ba7c28
AG
985AC_REQUIRE([AM_SILENT_RULES])dnl
986dnl The testsuite driver may need to know about EXEEXT, so add the
987dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
988dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
9931e273
DB
989AC_CONFIG_COMMANDS_PRE(dnl
990[m4_provide_if([_AM_COMPILER_EXEEXT],
991 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
992])
993
d6ba7c28 994dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9931e273
DB
995dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
996dnl mangled by Autoconf and run in a shell conditional statement.
997m4_define([_AC_COMPILER_EXEEXT],
998m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
999
1000
1001# When config.status generates a header, we must update the stamp-h file.
1002# This file resides in the same directory as the config header
1003# that is generated. The stamp files are numbered to have different names.
1004
1005# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1006# loop where config.status creates the headers, so we can generate
1007# our stamp files there.
1008AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1009[# Compute $1's index in $config_headers.
1010_am_arg=$1
1011_am_stamp_count=1
1012for _am_header in $config_headers :; do
1013 case $_am_header in
1014 $_am_arg | $_am_arg:* )
1015 break ;;
1016 * )
1017 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1018 esac
1019done
1020echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1021
d6ba7c28 1022# Copyright (C) 2001-2013 Free Software Foundation, Inc.
9931e273
DB
1023#
1024# This file is free software; the Free Software Foundation
1025# gives unlimited permission to copy and/or distribute it,
1026# with or without modifications, as long as this notice is preserved.
1027
1028# AM_PROG_INSTALL_SH
1029# ------------------
1030# Define $install_sh.
1031AC_DEFUN([AM_PROG_INSTALL_SH],
1032[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1033if test x"${install_sh}" != xset; then
1034 case $am_aux_dir in
1035 *\ * | *\ *)
1036 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1037 *)
1038 install_sh="\${SHELL} $am_aux_dir/install-sh"
1039 esac
1040fi
d6ba7c28 1041AC_SUBST([install_sh])])
9931e273 1042
d6ba7c28 1043# Copyright (C) 2003-2013 Free Software Foundation, Inc.
9931e273
DB
1044#
1045# This file is free software; the Free Software Foundation
1046# gives unlimited permission to copy and/or distribute it,
1047# with or without modifications, as long as this notice is preserved.
1048
9931e273
DB
1049# Check whether the underlying file-system supports filenames
1050# with a leading dot. For instance MS-DOS doesn't.
1051AC_DEFUN([AM_SET_LEADING_DOT],
1052[rm -rf .tst 2>/dev/null
1053mkdir .tst 2>/dev/null
1054if test -d .tst; then
1055 am__leading_dot=.
1056else
1057 am__leading_dot=_
1058fi
1059rmdir .tst 2>/dev/null
1060AC_SUBST([am__leading_dot])])
1061
1062# Check to see how 'make' treats includes. -*- Autoconf -*-
1063
d6ba7c28 1064# Copyright (C) 2001-2013 Free Software Foundation, Inc.
9931e273
DB
1065#
1066# This file is free software; the Free Software Foundation
1067# gives unlimited permission to copy and/or distribute it,
1068# with or without modifications, as long as this notice is preserved.
1069
9931e273
DB
1070# AM_MAKE_INCLUDE()
1071# -----------------
1072# Check to see how make treats includes.
1073AC_DEFUN([AM_MAKE_INCLUDE],
1074[am_make=${MAKE-make}
1075cat > confinc << 'END'
1076am__doit:
1077 @echo this is the am__doit target
1078.PHONY: am__doit
1079END
1080# If we don't find an include directive, just comment out the code.
1081AC_MSG_CHECKING([for style of include used by $am_make])
1082am__include="#"
1083am__quote=
1084_am_result=none
1085# First try GNU make style include.
1086echo "include confinc" > confmf
d6ba7c28 1087# Ignore all kinds of additional output from 'make'.
9931e273
DB
1088case `$am_make -s -f confmf 2> /dev/null` in #(
1089*the\ am__doit\ target*)
1090 am__include=include
1091 am__quote=
1092 _am_result=GNU
1093 ;;
1094esac
1095# Now try BSD make style include.
1096if test "$am__include" = "#"; then
1097 echo '.include "confinc"' > confmf
1098 case `$am_make -s -f confmf 2> /dev/null` in #(
1099 *the\ am__doit\ target*)
1100 am__include=.include
1101 am__quote="\""
1102 _am_result=BSD
1103 ;;
1104 esac
1105fi
1106AC_SUBST([am__include])
1107AC_SUBST([am__quote])
1108AC_MSG_RESULT([$_am_result])
1109rm -f confinc confmf
1110])
1111
d6ba7c28 1112# Copyright (C) 1999-2013 Free Software Foundation, Inc.
9931e273
DB
1113#
1114# This file is free software; the Free Software Foundation
1115# gives unlimited permission to copy and/or distribute it,
1116# with or without modifications, as long as this notice is preserved.
1117
9931e273
DB
1118# AM_PROG_CC_C_O
1119# --------------
1120# Like AC_PROG_CC_C_O, but changed for automake.
1121AC_DEFUN([AM_PROG_CC_C_O],
1122[AC_REQUIRE([AC_PROG_CC_C_O])dnl
1123AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1124AC_REQUIRE_AUX_FILE([compile])dnl
1125# FIXME: we rely on the cache variable name because
1126# there is no other way.
1127set dummy $CC
1128am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1129eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1130if test "$am_t" != yes; then
1131 # Losing compiler, so override with the script.
1132 # FIXME: It is wrong to rewrite CC.
1133 # But if we don't then we get into trouble of one sort or another.
1134 # A longer-term fix would be to have automake use am__CC in this case,
1135 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1136 CC="$am_aux_dir/compile $CC"
1137fi
1138dnl Make sure AC_PROG_CC is never called again, or it will override our
1139dnl setting of CC.
1140m4_define([AC_PROG_CC],
1141 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1142])
1143
1144# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1145
d6ba7c28 1146# Copyright (C) 1997-2013 Free Software Foundation, Inc.
9931e273
DB
1147#
1148# This file is free software; the Free Software Foundation
1149# gives unlimited permission to copy and/or distribute it,
1150# with or without modifications, as long as this notice is preserved.
1151
9931e273
DB
1152# AM_MISSING_PROG(NAME, PROGRAM)
1153# ------------------------------
1154AC_DEFUN([AM_MISSING_PROG],
1155[AC_REQUIRE([AM_MISSING_HAS_RUN])
1156$1=${$1-"${am_missing_run}$2"}
1157AC_SUBST($1)])
1158
9931e273
DB
1159# AM_MISSING_HAS_RUN
1160# ------------------
d6ba7c28
AG
1161# Define MISSING if not defined so far and test if it is modern enough.
1162# If it is, set am_missing_run to use it, otherwise, to nothing.
9931e273
DB
1163AC_DEFUN([AM_MISSING_HAS_RUN],
1164[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1165AC_REQUIRE_AUX_FILE([missing])dnl
1166if test x"${MISSING+set}" != xset; then
1167 case $am_aux_dir in
1168 *\ * | *\ *)
1169 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1170 *)
1171 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1172 esac
1173fi
1174# Use eval to expand $SHELL
d6ba7c28
AG
1175if eval "$MISSING --is-lightweight"; then
1176 am_missing_run="$MISSING "
9931e273
DB
1177else
1178 am_missing_run=
d6ba7c28 1179 AC_MSG_WARN(['missing' script is too old or missing])
9931e273
DB
1180fi
1181])
1182
9931e273
DB
1183# Helper functions for option handling. -*- Autoconf -*-
1184
d6ba7c28 1185# Copyright (C) 2001-2013 Free Software Foundation, Inc.
9931e273
DB
1186#
1187# This file is free software; the Free Software Foundation
1188# gives unlimited permission to copy and/or distribute it,
1189# with or without modifications, as long as this notice is preserved.
1190
9931e273
DB
1191# _AM_MANGLE_OPTION(NAME)
1192# -----------------------
1193AC_DEFUN([_AM_MANGLE_OPTION],
1194[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1195
1196# _AM_SET_OPTION(NAME)
d6ba7c28 1197# --------------------
9931e273
DB
1198# Set option NAME. Presently that only means defining a flag for this option.
1199AC_DEFUN([_AM_SET_OPTION],
d6ba7c28 1200[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
9931e273
DB
1201
1202# _AM_SET_OPTIONS(OPTIONS)
d6ba7c28 1203# ------------------------
9931e273
DB
1204# OPTIONS is a space-separated list of Automake options.
1205AC_DEFUN([_AM_SET_OPTIONS],
1206[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1207
1208# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1209# -------------------------------------------
1210# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1211AC_DEFUN([_AM_IF_OPTION],
1212[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1213
1214# Check to make sure that the build environment is sane. -*- Autoconf -*-
1215
d6ba7c28 1216# Copyright (C) 1996-2013 Free Software Foundation, Inc.
9931e273
DB
1217#
1218# This file is free software; the Free Software Foundation
1219# gives unlimited permission to copy and/or distribute it,
1220# with or without modifications, as long as this notice is preserved.
1221
9931e273
DB
1222# AM_SANITY_CHECK
1223# ---------------
1224AC_DEFUN([AM_SANITY_CHECK],
1225[AC_MSG_CHECKING([whether build environment is sane])
9931e273
DB
1226# Reject unsafe characters in $srcdir or the absolute working directory
1227# name. Accept space and tab only in the latter.
1228am_lf='
1229'
1230case `pwd` in
1231 *[[\\\"\#\$\&\'\`$am_lf]]*)
1232 AC_MSG_ERROR([unsafe absolute working directory name]);;
1233esac
1234case $srcdir in
1235 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
d6ba7c28 1236 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
9931e273
DB
1237esac
1238
d6ba7c28 1239# Do 'set' in a subshell so we don't clobber the current shell's
9931e273
DB
1240# arguments. Must try -L first in case configure is actually a
1241# symlink; some systems play weird games with the mod time of symlinks
1242# (eg FreeBSD returns the mod time of the symlink's containing
1243# directory).
1244if (
d6ba7c28
AG
1245 am_has_slept=no
1246 for am_try in 1 2; do
1247 echo "timestamp, slept: $am_has_slept" > conftest.file
1248 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1249 if test "$[*]" = "X"; then
1250 # -L didn't work.
1251 set X `ls -t "$srcdir/configure" conftest.file`
1252 fi
1253 if test "$[*]" != "X $srcdir/configure conftest.file" \
1254 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1255
1256 # If neither matched, then we have a broken ls. This can happen
1257 # if, for instance, CONFIG_SHELL is bash and it inherits a
1258 # broken ls alias from the environment. This has actually
1259 # happened. Such a system could not be considered "sane".
1260 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1261 alias in your environment])
1262 fi
1263 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1264 break
1265 fi
1266 # Just in case.
1267 sleep 1
1268 am_has_slept=yes
1269 done
9931e273
DB
1270 test "$[2]" = conftest.file
1271 )
1272then
1273 # Ok.
1274 :
1275else
1276 AC_MSG_ERROR([newly created file is older than distributed files!
1277Check your system clock])
1278fi
d6ba7c28
AG
1279AC_MSG_RESULT([yes])
1280# If we didn't sleep, we still need to ensure time stamps of config.status and
1281# generated files are strictly newer.
1282am_sleep_pid=
1283if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1284 ( sleep 1 ) &
1285 am_sleep_pid=$!
1286fi
1287AC_CONFIG_COMMANDS_PRE(
1288 [AC_MSG_CHECKING([that generated files are newer than configure])
1289 if test -n "$am_sleep_pid"; then
1290 # Hide warnings about reused PIDs.
1291 wait $am_sleep_pid 2>/dev/null
1292 fi
1293 AC_MSG_RESULT([done])])
1294rm -f conftest.file
1295])
1296
1297# Copyright (C) 2009-2013 Free Software Foundation, Inc.
1298#
1299# This file is free software; the Free Software Foundation
1300# gives unlimited permission to copy and/or distribute it,
1301# with or without modifications, as long as this notice is preserved.
1302
1303# AM_SILENT_RULES([DEFAULT])
1304# --------------------------
1305# Enable less verbose build rules; with the default set to DEFAULT
1306# ("yes" being less verbose, "no" or empty being verbose).
1307AC_DEFUN([AM_SILENT_RULES],
1308[AC_ARG_ENABLE([silent-rules], [dnl
1309AS_HELP_STRING(
1310 [--enable-silent-rules],
1311 [less verbose build output (undo: "make V=1")])
1312AS_HELP_STRING(
1313 [--disable-silent-rules],
1314 [verbose build output (undo: "make V=0")])dnl
1315])
1316case $enable_silent_rules in @%:@ (((
1317 yes) AM_DEFAULT_VERBOSITY=0;;
1318 no) AM_DEFAULT_VERBOSITY=1;;
1319 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1320esac
1321dnl
1322dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1323dnl do not support nested variable expansions.
1324dnl See automake bug#9928 and bug#10237.
1325am_make=${MAKE-make}
1326AC_CACHE_CHECK([whether $am_make supports nested variables],
1327 [am_cv_make_support_nested_variables],
1328 [if AS_ECHO([['TRUE=$(BAR$(V))
1329BAR0=false
1330BAR1=true
1331V=1
1332am__doit:
1333 @$(TRUE)
1334.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1335 am_cv_make_support_nested_variables=yes
1336else
1337 am_cv_make_support_nested_variables=no
1338fi])
1339if test $am_cv_make_support_nested_variables = yes; then
1340 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1341 AM_V='$(V)'
1342 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1343else
1344 AM_V=$AM_DEFAULT_VERBOSITY
1345 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1346fi
1347AC_SUBST([AM_V])dnl
1348AM_SUBST_NOTMAKE([AM_V])dnl
1349AC_SUBST([AM_DEFAULT_V])dnl
1350AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1351AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1352AM_BACKSLASH='\'
1353AC_SUBST([AM_BACKSLASH])dnl
1354_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1355])
9931e273 1356
d6ba7c28 1357# Copyright (C) 2001-2013 Free Software Foundation, Inc.
9931e273
DB
1358#
1359# This file is free software; the Free Software Foundation
1360# gives unlimited permission to copy and/or distribute it,
1361# with or without modifications, as long as this notice is preserved.
1362
1363# AM_PROG_INSTALL_STRIP
1364# ---------------------
d6ba7c28 1365# One issue with vendor 'install' (even GNU) is that you can't
9931e273
DB
1366# specify the program used to strip binaries. This is especially
1367# annoying in cross-compiling environments, where the build's strip
1368# is unlikely to handle the host's binaries.
1369# Fortunately install-sh will honor a STRIPPROG variable, so we
d6ba7c28 1370# always use install-sh in "make install-strip", and initialize
9931e273
DB
1371# STRIPPROG with the value of the STRIP variable (set by the user).
1372AC_DEFUN([AM_PROG_INSTALL_STRIP],
1373[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
d6ba7c28
AG
1374# Installed binaries are usually stripped using 'strip' when the user
1375# run "make install-strip". However 'strip' might not be the right
9931e273 1376# tool to use in cross-compilation environments, therefore Automake
d6ba7c28
AG
1377# will honor the 'STRIP' environment variable to overrule this program.
1378dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
9931e273
DB
1379if test "$cross_compiling" != no; then
1380 AC_CHECK_TOOL([STRIP], [strip], :)
1381fi
1382INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1383AC_SUBST([INSTALL_STRIP_PROGRAM])])
1384
d6ba7c28 1385# Copyright (C) 2006-2013 Free Software Foundation, Inc.
9931e273
DB
1386#
1387# This file is free software; the Free Software Foundation
1388# gives unlimited permission to copy and/or distribute it,
1389# with or without modifications, as long as this notice is preserved.
1390
9931e273
DB
1391# _AM_SUBST_NOTMAKE(VARIABLE)
1392# ---------------------------
1393# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1394# This macro is traced by Automake.
1395AC_DEFUN([_AM_SUBST_NOTMAKE])
1396
1397# AM_SUBST_NOTMAKE(VARIABLE)
d6ba7c28 1398# --------------------------
9931e273
DB
1399# Public sister of _AM_SUBST_NOTMAKE.
1400AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1401
1402# Check how to create a tarball. -*- Autoconf -*-
1403
d6ba7c28 1404# Copyright (C) 2004-2013 Free Software Foundation, Inc.
9931e273
DB
1405#
1406# This file is free software; the Free Software Foundation
1407# gives unlimited permission to copy and/or distribute it,
1408# with or without modifications, as long as this notice is preserved.
1409
9931e273
DB
1410# _AM_PROG_TAR(FORMAT)
1411# --------------------
1412# Check how to create a tarball in format FORMAT.
d6ba7c28 1413# FORMAT should be one of 'v7', 'ustar', or 'pax'.
9931e273
DB
1414#
1415# Substitute a variable $(am__tar) that is a command
1416# writing to stdout a FORMAT-tarball containing the directory
1417# $tardir.
1418# tardir=directory && $(am__tar) > result.tar
1419#
1420# Substitute a variable $(am__untar) that extract such
1421# a tarball read from stdin.
1422# $(am__untar) < result.tar
d6ba7c28 1423#
9931e273 1424AC_DEFUN([_AM_PROG_TAR],
d6ba7c28
AG
1425[# Always define AMTAR for backward compatibility. Yes, it's still used
1426# in the wild :-( We should find a proper way to deprecate it ...
1427AC_SUBST([AMTAR], ['$${TAR-tar}'])
1428
1429# We'll loop over all known methods to create a tar archive until one works.
9931e273 1430_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9931e273 1431
d6ba7c28
AG
1432m4_if([$1], [v7],
1433 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1434
1435 [m4_case([$1],
1436 [ustar],
1437 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1438 # There is notably a 21 bits limit for the UID and the GID. In fact,
1439 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1440 # and bug#13588).
1441 am_max_uid=2097151 # 2^21 - 1
1442 am_max_gid=$am_max_uid
1443 # The $UID and $GID variables are not portable, so we need to resort
1444 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1445 # below are definitely unexpected, so allow the users to see them
1446 # (that is, avoid stderr redirection).
1447 am_uid=`id -u || echo unknown`
1448 am_gid=`id -g || echo unknown`
1449 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1450 if test $am_uid -le $am_max_uid; then
1451 AC_MSG_RESULT([yes])
1452 else
1453 AC_MSG_RESULT([no])
1454 _am_tools=none
1455 fi
1456 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1457 if test $am_gid -le $am_max_gid; then
1458 AC_MSG_RESULT([yes])
1459 else
1460 AC_MSG_RESULT([no])
1461 _am_tools=none
1462 fi],
1463
1464 [pax],
1465 [],
1466
1467 [m4_fatal([Unknown tar format])])
1468
1469 AC_MSG_CHECKING([how to create a $1 tar archive])
1470
1471 # Go ahead even if we have the value already cached. We do so because we
1472 # need to set the values for the 'am__tar' and 'am__untar' variables.
1473 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1474
1475 for _am_tool in $_am_tools; do
1476 case $_am_tool in
1477 gnutar)
1478 for _am_tar in tar gnutar gtar; do
1479 AM_RUN_LOG([$_am_tar --version]) && break
1480 done
1481 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1482 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1483 am__untar="$_am_tar -xf -"
1484 ;;
1485 plaintar)
1486 # Must skip GNU tar: if it does not support --format= it doesn't create
1487 # ustar tarball either.
1488 (tar --version) >/dev/null 2>&1 && continue
1489 am__tar='tar chf - "$$tardir"'
1490 am__tar_='tar chf - "$tardir"'
1491 am__untar='tar xf -'
1492 ;;
1493 pax)
1494 am__tar='pax -L -x $1 -w "$$tardir"'
1495 am__tar_='pax -L -x $1 -w "$tardir"'
1496 am__untar='pax -r'
1497 ;;
1498 cpio)
1499 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1500 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1501 am__untar='cpio -i -H $1 -d'
1502 ;;
1503 none)
1504 am__tar=false
1505 am__tar_=false
1506 am__untar=false
1507 ;;
1508 esac
9931e273 1509
d6ba7c28
AG
1510 # If the value was cached, stop now. We just wanted to have am__tar
1511 # and am__untar set.
1512 test -n "${am_cv_prog_tar_$1}" && break
1513
1514 # tar/untar a dummy directory, and stop if the command works.
1515 rm -rf conftest.dir
1516 mkdir conftest.dir
1517 echo GrepMe > conftest.dir/file
1518 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1519 rm -rf conftest.dir
1520 if test -s conftest.tar; then
1521 AM_RUN_LOG([$am__untar <conftest.tar])
1522 AM_RUN_LOG([cat conftest.dir/file])
1523 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1524 fi
1525 done
9931e273 1526 rm -rf conftest.dir
9931e273 1527
d6ba7c28
AG
1528 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1529 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1530
9931e273
DB
1531AC_SUBST([am__tar])
1532AC_SUBST([am__untar])
1533]) # _AM_PROG_TAR
1534