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