Adding x-terminal-emulator | pavucontrol | gnome-alsamixer as Recommended.
[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
78ad3d2c 340 AC_REQUIRE([AC_HEADER_STDC])dnl
00916e98
AG
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
64ea8d44 460# nls.m4 serial 5 (gettext-0.18)
78ad3d2c 461dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
64ea8d44
AG
462dnl Inc.
463dnl This file is free software; the Free Software Foundation
464dnl gives unlimited permission to copy and/or distribute it,
465dnl with or without modifications, as long as this notice is preserved.
466dnl
467dnl This file can can be used in projects which are not available under
468dnl the GNU General Public License or the GNU Library General Public
469dnl License but which still want to provide support for the GNU gettext
470dnl functionality.
471dnl Please note that the actual code of the GNU gettext library is covered
472dnl by the GNU Library General Public License, and the rest of the GNU
473dnl gettext package package is covered by the GNU General Public License.
474dnl They are *not* in the public domain.
475
476dnl Authors:
477dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
478dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
479
480AC_PREREQ([2.50])
481
482AC_DEFUN([AM_NLS],
483[
484 AC_MSG_CHECKING([whether NLS is requested])
485 dnl Default is enabled NLS
486 AC_ARG_ENABLE([nls],
487 [ --disable-nls do not use Native Language Support],
488 USE_NLS=$enableval, USE_NLS=yes)
489 AC_MSG_RESULT([$USE_NLS])
490 AC_SUBST([USE_NLS])
491])
492
6cc5e1a6 493# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
24d886e1 494# serial 1 (pkg-config-0.24)
6cc5e1a6
DB
495#
496# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
497#
498# This program is free software; you can redistribute it and/or modify
499# it under the terms of the GNU General Public License as published by
500# the Free Software Foundation; either version 2 of the License, or
501# (at your option) any later version.
502#
503# This program is distributed in the hope that it will be useful, but
504# WITHOUT ANY WARRANTY; without even the implied warranty of
505# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
506# General Public License for more details.
507#
508# You should have received a copy of the GNU General Public License
509# along with this program; if not, write to the Free Software
510# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
511#
512# As a special exception to the GNU General Public License, if you
513# distribute this file as part of a program that contains a
514# configuration script generated by Autoconf, you may include it under
515# the same distribution terms that you use for the rest of that program.
516
517# PKG_PROG_PKG_CONFIG([MIN-VERSION])
518# ----------------------------------
519AC_DEFUN([PKG_PROG_PKG_CONFIG],
520[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
f8c25730
DB
521m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
522m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
24d886e1
DB
523AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
524AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
525AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
526
6cc5e1a6
DB
527if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
528 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
529fi
530if test -n "$PKG_CONFIG"; then
531 _pkg_min_version=m4_default([$1], [0.9.0])
532 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
533 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
534 AC_MSG_RESULT([yes])
535 else
536 AC_MSG_RESULT([no])
537 PKG_CONFIG=""
538 fi
6cc5e1a6
DB
539fi[]dnl
540])# PKG_PROG_PKG_CONFIG
541
542# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
543#
544# Check to see whether a particular set of modules exists. Similar
545# to PKG_CHECK_MODULES(), but does not set variables or print errors.
546#
24d886e1
DB
547# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
548# only at the first occurence in configure.ac, so if the first place
549# it's called might be skipped (such as if it is within an "if", you
550# have to call PKG_CHECK_EXISTS manually
6cc5e1a6
DB
551# --------------------------------------------------------------
552AC_DEFUN([PKG_CHECK_EXISTS],
553[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
554if test -n "$PKG_CONFIG" && \
555 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
24d886e1 556 m4_default([$2], [:])
6cc5e1a6
DB
557m4_ifvaln([$3], [else
558 $3])dnl
559fi])
560
6cc5e1a6
DB
561# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
562# ---------------------------------------------
563m4_define([_PKG_CONFIG],
934ecce5
DB
564[if test -n "$$1"; then
565 pkg_cv_[]$1="$$1"
566 elif test -n "$PKG_CONFIG"; then
567 PKG_CHECK_EXISTS([$3],
f8c25730
DB
568 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
569 test "x$?" != "x0" && pkg_failed=yes ],
934ecce5
DB
570 [pkg_failed=yes])
571 else
572 pkg_failed=untried
6cc5e1a6
DB
573fi[]dnl
574])# _PKG_CONFIG
575
576# _PKG_SHORT_ERRORS_SUPPORTED
577# -----------------------------
578AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
579[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
580if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
581 _pkg_short_errors_supported=yes
582else
583 _pkg_short_errors_supported=no
584fi[]dnl
585])# _PKG_SHORT_ERRORS_SUPPORTED
586
587
588# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
589# [ACTION-IF-NOT-FOUND])
590#
591#
592# Note that if there is a possibility the first call to
593# PKG_CHECK_MODULES might not happen, you should be sure to include an
594# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
595#
596#
597# --------------------------------------------------------------
598AC_DEFUN([PKG_CHECK_MODULES],
599[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
600AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
601AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
602
603pkg_failed=no
604AC_MSG_CHECKING([for $1])
605
606_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
607_PKG_CONFIG([$1][_LIBS], [libs], [$2])
608
609m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
610and $1[]_LIBS to avoid the need to call pkg-config.
611See the pkg-config man page for more details.])
612
613if test $pkg_failed = yes; then
24d886e1 614 AC_MSG_RESULT([no])
6cc5e1a6
DB
615 _PKG_SHORT_ERRORS_SUPPORTED
616 if test $_pkg_short_errors_supported = yes; then
f8c25730 617 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
6cc5e1a6 618 else
f8c25730 619 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
6cc5e1a6
DB
620 fi
621 # Put the nasty error message in config.log where it belongs
622 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
623
24d886e1 624 m4_default([$4], [AC_MSG_ERROR(
6cc5e1a6
DB
625[Package requirements ($2) were not met:
626
627$$1_PKG_ERRORS
628
629Consider adjusting the PKG_CONFIG_PATH environment variable if you
630installed software in a non-standard prefix.
631
ca14ea2b 632_PKG_TEXT])[]dnl
24d886e1 633 ])
6cc5e1a6 634elif test $pkg_failed = untried; then
24d886e1
DB
635 AC_MSG_RESULT([no])
636 m4_default([$4], [AC_MSG_FAILURE(
6cc5e1a6
DB
637[The pkg-config script could not be found or is too old. Make sure it
638is in your PATH or set the PKG_CONFIG environment variable to the full
639path to pkg-config.
640
641_PKG_TEXT
642
ca14ea2b 643To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
24d886e1 644 ])
6cc5e1a6
DB
645else
646 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
647 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
648 AC_MSG_RESULT([yes])
24d886e1 649 $3
6cc5e1a6
DB
650fi[]dnl
651])# PKG_CHECK_MODULES
652
00916e98 653# Copyright (C) 2002-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
654#
655# This file is free software; the Free Software Foundation
656# gives unlimited permission to copy and/or distribute it,
657# with or without modifications, as long as this notice is preserved.
658
659# AM_AUTOMAKE_VERSION(VERSION)
660# ----------------------------
661# Automake X.Y traces this macro to ensure aclocal.m4 has been
662# generated from the m4 files accompanying Automake X.Y.
663# (This private macro should not be called outside this file.)
664AC_DEFUN([AM_AUTOMAKE_VERSION],
00916e98 665[am__api_version='1.14'
6cc5e1a6
DB
666dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
667dnl require some minimum version. Point them to the right macro.
00916e98 668m4_if([$1], [1.14.1], [],
6cc5e1a6
DB
669 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
670])
671
672# _AM_AUTOCONF_VERSION(VERSION)
673# -----------------------------
674# aclocal traces this macro to find the Autoconf version.
675# This is a private macro too. Using m4_define simplifies
676# the logic in aclocal, which can simply ignore this definition.
677m4_define([_AM_AUTOCONF_VERSION], [])
678
679# AM_SET_CURRENT_AUTOMAKE_VERSION
680# -------------------------------
681# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10862fa6 682# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
6cc5e1a6 683AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
00916e98 684[AM_AUTOMAKE_VERSION([1.14.1])dnl
b3df3353
DB
685m4_ifndef([AC_AUTOCONF_VERSION],
686 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10862fa6 687_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
6cc5e1a6 688
00916e98 689# Copyright (C) 2011-2013 Free Software Foundation, Inc.
0f7f2ef3
AL
690#
691# This file is free software; the Free Software Foundation
692# gives unlimited permission to copy and/or distribute it,
693# with or without modifications, as long as this notice is preserved.
694
695# AM_PROG_AR([ACT-IF-FAIL])
696# -------------------------
697# Try to determine the archiver interface, and trigger the ar-lib wrapper
698# if it is needed. If the detection of archiver interface fails, run
699# ACT-IF-FAIL (default is to abort configure with a proper error message).
700AC_DEFUN([AM_PROG_AR],
701[AC_BEFORE([$0], [LT_INIT])dnl
702AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
703AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
704AC_REQUIRE_AUX_FILE([ar-lib])dnl
705AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
706: ${AR=ar}
707
708AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
00916e98
AG
709 [AC_LANG_PUSH([C])
710 am_cv_ar_interface=ar
0f7f2ef3
AL
711 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
712 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
713 AC_TRY_EVAL([am_ar_try])
714 if test "$ac_status" -eq 0; then
715 am_cv_ar_interface=ar
716 else
717 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
718 AC_TRY_EVAL([am_ar_try])
719 if test "$ac_status" -eq 0; then
720 am_cv_ar_interface=lib
721 else
722 am_cv_ar_interface=unknown
723 fi
724 fi
725 rm -f conftest.lib libconftest.a
726 ])
00916e98 727 AC_LANG_POP([C])])
0f7f2ef3
AL
728
729case $am_cv_ar_interface in
730ar)
731 ;;
732lib)
733 # Microsoft lib, so override with the ar-lib wrapper script.
734 # FIXME: It is wrong to rewrite AR.
735 # But if we don't then we get into trouble of one sort or another.
736 # A longer-term fix would be to have automake use am__AR in this case,
737 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
738 # similar.
739 AR="$am_aux_dir/ar-lib $AR"
740 ;;
741unknown)
742 m4_default([$1],
743 [AC_MSG_ERROR([could not determine $AR interface])])
744 ;;
745esac
746AC_SUBST([AR])dnl
747])
748
6cc5e1a6
DB
749# AM_AUX_DIR_EXPAND -*- Autoconf -*-
750
00916e98 751# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
752#
753# This file is free software; the Free Software Foundation
754# gives unlimited permission to copy and/or distribute it,
755# with or without modifications, as long as this notice is preserved.
756
757# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
0f7f2ef3
AL
758# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
759# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
6cc5e1a6
DB
760#
761# Of course, Automake must honor this variable whenever it calls a
762# tool from the auxiliary directory. The problem is that $srcdir (and
763# therefore $ac_aux_dir as well) can be either absolute or relative,
764# depending on how configure is run. This is pretty annoying, since
765# it makes $ac_aux_dir quite unusable in subdirectories: in the top
766# source directory, any form will work fine, but in subdirectories a
767# relative path needs to be adjusted first.
768#
769# $ac_aux_dir/missing
770# fails when called from a subdirectory if $ac_aux_dir is relative
771# $top_srcdir/$ac_aux_dir/missing
772# fails if $ac_aux_dir is absolute,
773# fails when called from a subdirectory in a VPATH build with
774# a relative $ac_aux_dir
775#
776# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
777# are both prefixed by $srcdir. In an in-source build this is usually
0f7f2ef3 778# harmless because $srcdir is '.', but things will broke when you
6cc5e1a6
DB
779# start a VPATH build or use an absolute $srcdir.
780#
781# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
782# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
783# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
784# and then we would define $MISSING as
785# MISSING="\${SHELL} $am_aux_dir/missing"
786# This will work as long as MISSING is not called from configure, because
787# unfortunately $(top_srcdir) has no meaning in configure.
788# However there are other variables, like CC, which are often used in
789# configure, and could therefore not use this "fixed" $ac_aux_dir.
790#
791# Another solution, used here, is to always expand $ac_aux_dir to an
792# absolute PATH. The drawback is that using absolute paths prevent a
793# configured tree to be moved without reconfiguration.
794
795AC_DEFUN([AM_AUX_DIR_EXPAND],
796[dnl Rely on autoconf to set up CDPATH properly.
797AC_PREREQ([2.50])dnl
798# expand $ac_aux_dir to an absolute path
799am_aux_dir=`cd $ac_aux_dir && pwd`
800])
801
802# AM_CONDITIONAL -*- Autoconf -*-
803
00916e98 804# Copyright (C) 1997-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
805#
806# This file is free software; the Free Software Foundation
807# gives unlimited permission to copy and/or distribute it,
808# with or without modifications, as long as this notice is preserved.
809
6cc5e1a6
DB
810# AM_CONDITIONAL(NAME, SHELL-CONDITION)
811# -------------------------------------
812# Define a conditional.
813AC_DEFUN([AM_CONDITIONAL],
0f7f2ef3
AL
814[AC_PREREQ([2.52])dnl
815 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
816 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6cc5e1a6
DB
817AC_SUBST([$1_TRUE])dnl
818AC_SUBST([$1_FALSE])dnl
819_AM_SUBST_NOTMAKE([$1_TRUE])dnl
820_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1ea75322 821m4_define([_AM_COND_VALUE_$1], [$2])dnl
6cc5e1a6
DB
822if $2; then
823 $1_TRUE=
824 $1_FALSE='#'
825else
826 $1_TRUE='#'
827 $1_FALSE=
828fi
829AC_CONFIG_COMMANDS_PRE(
830[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
831 AC_MSG_ERROR([[conditional "$1" was never defined.
832Usually this means the macro was only invoked conditionally.]])
833fi])])
834
00916e98 835# Copyright (C) 1999-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
836#
837# This file is free software; the Free Software Foundation
838# gives unlimited permission to copy and/or distribute it,
839# with or without modifications, as long as this notice is preserved.
840
6cc5e1a6 841
0f7f2ef3 842# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
6cc5e1a6
DB
843# written in clear, in which case automake, when reading aclocal.m4,
844# will think it sees a *use*, and therefore will trigger all it's
845# C support machinery. Also note that it means that autoscan, seeing
846# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
847
848
849# _AM_DEPENDENCIES(NAME)
850# ----------------------
851# See how the compiler implements dependency checking.
0f7f2ef3 852# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
6cc5e1a6
DB
853# We try a few techniques and use that to set a single cache variable.
854#
855# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
856# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
857# dependency, and given that the user is not expected to run this macro,
858# just rely on AC_PROG_CC.
859AC_DEFUN([_AM_DEPENDENCIES],
860[AC_REQUIRE([AM_SET_DEPDIR])dnl
861AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
862AC_REQUIRE([AM_MAKE_INCLUDE])dnl
863AC_REQUIRE([AM_DEP_TRACK])dnl
864
0f7f2ef3
AL
865m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
866 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
867 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
868 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
869 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
870 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
871 [depcc="$$1" am_compiler_list=])
6cc5e1a6
DB
872
873AC_CACHE_CHECK([dependency style of $depcc],
874 [am_cv_$1_dependencies_compiler_type],
875[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
876 # We make a subdir and do the tests there. Otherwise we can end up
877 # making bogus files that we don't know about and never remove. For
878 # instance it was reported that on HP-UX the gcc test will end up
0f7f2ef3
AL
879 # making a dummy file named 'D' -- because '-MD' means "put the output
880 # in D".
f8c25730 881 rm -rf conftest.dir
6cc5e1a6
DB
882 mkdir conftest.dir
883 # Copy depcomp to subdir because otherwise we won't find it if we're
884 # using a relative directory.
885 cp "$am_depcomp" conftest.dir
886 cd conftest.dir
887 # We will build objects and dependencies in a subdirectory because
888 # it helps to detect inapplicable dependency modes. For instance
889 # both Tru64's cc and ICC support -MD to output dependencies as a
890 # side effect of compilation, but ICC will put the dependencies in
891 # the current directory while Tru64 will put them in the object
892 # directory.
893 mkdir sub
894
895 am_cv_$1_dependencies_compiler_type=none
896 if test "$am_compiler_list" = ""; then
897 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
898 fi
1ea75322
DB
899 am__universal=false
900 m4_case([$1], [CC],
901 [case " $depcc " in #(
902 *\ -arch\ *\ -arch\ *) am__universal=true ;;
903 esac],
904 [CXX],
905 [case " $depcc " in #(
906 *\ -arch\ *\ -arch\ *) am__universal=true ;;
907 esac])
908
6cc5e1a6
DB
909 for depmode in $am_compiler_list; do
910 # Setup a source with many dependencies, because some compilers
911 # like to wrap large dependency lists on column 80 (with \), and
912 # we should not choose a depcomp mode which is confused by this.
913 #
914 # We need to recreate these files for each test, as the compiler may
915 # overwrite some of them when testing with obscure command lines.
916 # This happens at least with the AIX C compiler.
917 : > sub/conftest.c
918 for i in 1 2 3 4 5 6; do
919 echo '#include "conftst'$i'.h"' >> sub/conftest.c
0f7f2ef3
AL
920 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
921 # Solaris 10 /bin/sh.
922 echo '/* dummy */' > sub/conftst$i.h
6cc5e1a6
DB
923 done
924 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
925
0f7f2ef3 926 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1ea75322 927 # mode. It turns out that the SunPro C++ compiler does not properly
0f7f2ef3
AL
928 # handle '-M -o', and we need to detect this. Also, some Intel
929 # versions had trouble with output in subdirs.
1ea75322
DB
930 am__obj=sub/conftest.${OBJEXT-o}
931 am__minus_obj="-o $am__obj"
6cc5e1a6 932 case $depmode in
1ea75322
DB
933 gcc)
934 # This depmode causes a compiler race in universal mode.
935 test "$am__universal" = false || continue
936 ;;
6cc5e1a6 937 nosideeffect)
0f7f2ef3
AL
938 # After this tag, mechanisms are not by side-effect, so they'll
939 # only be used when explicitly requested.
6cc5e1a6
DB
940 if test "x$enable_dependency_tracking" = xyes; then
941 continue
942 else
943 break
944 fi
945 ;;
f8c25730 946 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
0f7f2ef3 947 # This compiler won't grok '-c -o', but also, the minuso test has
1ea75322
DB
948 # not run yet. These depmodes are late enough in the game, and
949 # so weak that their functioning should not be impacted.
950 am__obj=conftest.${OBJEXT-o}
951 am__minus_obj=
952 ;;
6cc5e1a6
DB
953 none) break ;;
954 esac
6cc5e1a6 955 if depmode=$depmode \
1ea75322 956 source=sub/conftest.c object=$am__obj \
6cc5e1a6 957 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1ea75322 958 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6cc5e1a6
DB
959 >/dev/null 2>conftest.err &&
960 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
961 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1ea75322 962 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6cc5e1a6
DB
963 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
964 # icc doesn't choke on unknown options, it will just issue warnings
965 # or remarks (even with -Werror). So we grep stderr for any message
966 # that says an option was ignored or not supported.
967 # When given -MP, icc 7.0 and 7.1 complain thusly:
968 # icc: Command line warning: ignoring option '-M'; no argument required
969 # The diagnosis changed in icc 8.0:
970 # icc: Command line remark: option '-MP' not supported
971 if (grep 'ignoring option' conftest.err ||
972 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
973 am_cv_$1_dependencies_compiler_type=$depmode
974 break
975 fi
976 fi
977 done
978
979 cd ..
980 rm -rf conftest.dir
981else
982 am_cv_$1_dependencies_compiler_type=none
983fi
984])
985AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
986AM_CONDITIONAL([am__fastdep$1], [
987 test "x$enable_dependency_tracking" != xno \
988 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
989])
990
991
992# AM_SET_DEPDIR
993# -------------
994# Choose a directory name for dependency files.
0f7f2ef3 995# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
6cc5e1a6
DB
996AC_DEFUN([AM_SET_DEPDIR],
997[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
998AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
999])
1000
1001
1002# AM_DEP_TRACK
1003# ------------
1004AC_DEFUN([AM_DEP_TRACK],
0f7f2ef3
AL
1005[AC_ARG_ENABLE([dependency-tracking], [dnl
1006AS_HELP_STRING(
1007 [--enable-dependency-tracking],
1008 [do not reject slow dependency extractors])
1009AS_HELP_STRING(
1010 [--disable-dependency-tracking],
1011 [speeds up one-time build])])
6cc5e1a6
DB
1012if test "x$enable_dependency_tracking" != xno; then
1013 am_depcomp="$ac_aux_dir/depcomp"
1014 AMDEPBACKSLASH='\'
f8c25730 1015 am__nodep='_no'
6cc5e1a6
DB
1016fi
1017AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1018AC_SUBST([AMDEPBACKSLASH])dnl
1019_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
f8c25730
DB
1020AC_SUBST([am__nodep])dnl
1021_AM_SUBST_NOTMAKE([am__nodep])dnl
6cc5e1a6
DB
1022])
1023
1024# Generate code to set up dependency tracking. -*- Autoconf -*-
1025
00916e98 1026# Copyright (C) 1999-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1027#
1028# This file is free software; the Free Software Foundation
1029# gives unlimited permission to copy and/or distribute it,
1030# with or without modifications, as long as this notice is preserved.
1031
6cc5e1a6
DB
1032
1033# _AM_OUTPUT_DEPENDENCY_COMMANDS
1034# ------------------------------
1035AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1ea75322 1036[{
00916e98 1037 # Older Autoconf quotes --file arguments for eval, but not when files
1ea75322
DB
1038 # are listed without --file. Let's play safe and only enable the eval
1039 # if we detect the quoting.
1040 case $CONFIG_FILES in
1041 *\'*) eval set x "$CONFIG_FILES" ;;
1042 *) set x $CONFIG_FILES ;;
1043 esac
1044 shift
1045 for mf
1046 do
1047 # Strip MF so we end up with the name of the file.
1048 mf=`echo "$mf" | sed -e 's/:.*$//'`
1049 # Check whether this is an Automake generated Makefile or not.
0f7f2ef3 1050 # We used to match only the files named 'Makefile.in', but
1ea75322
DB
1051 # some people rename them; so instead we look at the file content.
1052 # Grep'ing the first line is not enough: some people post-process
1053 # each Makefile.in and add a new line on top of each file to say so.
1054 # Grep'ing the whole file is not good either: AIX grep has a line
1055 # limit of 2048, but all sed's we know have understand at least 4000.
1056 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1057 dirpart=`AS_DIRNAME("$mf")`
1058 else
1059 continue
1060 fi
1061 # Extract the definition of DEPDIR, am__include, and am__quote
0f7f2ef3 1062 # from the Makefile without running 'make'.
1ea75322
DB
1063 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1064 test -z "$DEPDIR" && continue
1065 am__include=`sed -n 's/^am__include = //p' < "$mf"`
00916e98 1066 test -z "$am__include" && continue
1ea75322 1067 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1ea75322
DB
1068 # Find all dependency output files, they are included files with
1069 # $(DEPDIR) in their names. We invoke sed twice because it is the
1070 # simplest approach to changing $(DEPDIR) to its actual value in the
1071 # expansion.
1072 for file in `sed -n "
1073 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
0f7f2ef3 1074 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1ea75322
DB
1075 # Make sure the directory exists.
1076 test -f "$dirpart/$file" && continue
1077 fdir=`AS_DIRNAME(["$file"])`
1078 AS_MKDIR_P([$dirpart/$fdir])
1079 # echo "creating $dirpart/$file"
1080 echo '# dummy' > "$dirpart/$file"
1081 done
6cc5e1a6 1082 done
1ea75322 1083}
6cc5e1a6
DB
1084])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1085
1086
1087# AM_OUTPUT_DEPENDENCY_COMMANDS
1088# -----------------------------
1089# This macro should only be invoked once -- use via AC_REQUIRE.
1090#
1091# This code is only required when automatic dependency tracking
0f7f2ef3 1092# is enabled. FIXME. This creates each '.P' file that we will
6cc5e1a6
DB
1093# need in order to bootstrap the dependency handling code.
1094AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1095[AC_CONFIG_COMMANDS([depfiles],
1096 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1097 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1098])
1099
1100# Do all the work for Automake. -*- Autoconf -*-
1101
00916e98 1102# Copyright (C) 1996-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1103#
1104# This file is free software; the Free Software Foundation
1105# gives unlimited permission to copy and/or distribute it,
1106# with or without modifications, as long as this notice is preserved.
1107
6cc5e1a6
DB
1108# This macro actually does too much. Some checks are only needed if
1109# your package does certain things. But this isn't really a big deal.
1110
00916e98
AG
1111dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1112m4_define([AC_PROG_CC],
1113m4_defn([AC_PROG_CC])
1114[_AM_PROG_CC_C_O
1115])
1116
6cc5e1a6
DB
1117# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1118# AM_INIT_AUTOMAKE([OPTIONS])
1119# -----------------------------------------------
1120# The call with PACKAGE and VERSION arguments is the old style
1121# call (pre autoconf-2.50), which is being phased out. PACKAGE
1122# and VERSION should now be passed to AC_INIT and removed from
1123# the call to AM_INIT_AUTOMAKE.
1124# We support both call styles for the transition. After
1125# the next Automake release, Autoconf can make the AC_INIT
1126# arguments mandatory, and then we can depend on a new Autoconf
1127# release and drop the old call support.
1128AC_DEFUN([AM_INIT_AUTOMAKE],
00916e98 1129[AC_PREREQ([2.65])dnl
6cc5e1a6
DB
1130dnl Autoconf wants to disallow AM_ names. We explicitly allow
1131dnl the ones we care about.
1132m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1133AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1134AC_REQUIRE([AC_PROG_INSTALL])dnl
1135if test "`cd $srcdir && pwd`" != "`pwd`"; then
1136 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1137 # is not polluted with repeated "-I."
1138 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1139 # test to see if srcdir already configured
1140 if test -f $srcdir/config.status; then
1141 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1142 fi
1143fi
1144
1145# test whether we have cygpath
1146if test -z "$CYGPATH_W"; then
1147 if (cygpath --version) >/dev/null 2>/dev/null; then
1148 CYGPATH_W='cygpath -w'
1149 else
1150 CYGPATH_W=echo
1151 fi
1152fi
1153AC_SUBST([CYGPATH_W])
1154
1155# Define the identity of the package.
1156dnl Distinguish between old-style and new-style calls.
1157m4_ifval([$2],
0f7f2ef3 1158[AC_DIAGNOSE([obsolete],
00916e98 1159 [$0: two- and three-arguments forms are deprecated.])
0f7f2ef3 1160m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6cc5e1a6
DB
1161 AC_SUBST([PACKAGE], [$1])dnl
1162 AC_SUBST([VERSION], [$2])],
1163[_AM_SET_OPTIONS([$1])dnl
1164dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
0f7f2ef3
AL
1165m4_if(
1166 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1167 [ok:ok],,
6cc5e1a6
DB
1168 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1169 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1170 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1171
1172_AM_IF_OPTION([no-define],,
0f7f2ef3
AL
1173[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1174 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
6cc5e1a6
DB
1175
1176# Some tools Automake needs.
1177AC_REQUIRE([AM_SANITY_CHECK])dnl
1178AC_REQUIRE([AC_ARG_PROGRAM])dnl
0f7f2ef3
AL
1179AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1180AM_MISSING_PROG([AUTOCONF], [autoconf])
1181AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1182AM_MISSING_PROG([AUTOHEADER], [autoheader])
1183AM_MISSING_PROG([MAKEINFO], [makeinfo])
1ea75322
DB
1184AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1185AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
0f7f2ef3
AL
1186AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1187# For better backward compatibility. To be removed once Automake 1.9.x
1188# dies out for good. For more background, see:
1189# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1190# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1191AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
6cc5e1a6
DB
1192# We need awk for the "check" target. The system "awk" is bad on
1193# some platforms.
1194AC_REQUIRE([AC_PROG_AWK])dnl
1195AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1196AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1197_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1ea75322
DB
1198 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1199 [_AM_PROG_TAR([v7])])])
6cc5e1a6
DB
1200_AM_IF_OPTION([no-dependencies],,
1201[AC_PROVIDE_IFELSE([AC_PROG_CC],
0f7f2ef3
AL
1202 [_AM_DEPENDENCIES([CC])],
1203 [m4_define([AC_PROG_CC],
1204 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
6cc5e1a6 1205AC_PROVIDE_IFELSE([AC_PROG_CXX],
0f7f2ef3
AL
1206 [_AM_DEPENDENCIES([CXX])],
1207 [m4_define([AC_PROG_CXX],
1208 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
6cc5e1a6 1209AC_PROVIDE_IFELSE([AC_PROG_OBJC],
0f7f2ef3
AL
1210 [_AM_DEPENDENCIES([OBJC])],
1211 [m4_define([AC_PROG_OBJC],
1212 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
00916e98 1213AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
0f7f2ef3
AL
1214 [_AM_DEPENDENCIES([OBJCXX])],
1215 [m4_define([AC_PROG_OBJCXX],
00916e98 1216 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
6cc5e1a6 1217])
00916e98
AG
1218AC_REQUIRE([AM_SILENT_RULES])dnl
1219dnl The testsuite driver may need to know about EXEEXT, so add the
1220dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1221dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1ea75322
DB
1222AC_CONFIG_COMMANDS_PRE(dnl
1223[m4_provide_if([_AM_COMPILER_EXEEXT],
1224 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
00916e98
AG
1225
1226# POSIX will say in a future version that running "rm -f" with no argument
1227# is OK; and we want to be able to make that assumption in our Makefile
1228# recipes. So use an aggressive probe to check that the usage we want is
1229# actually supported "in the wild" to an acceptable degree.
1230# See automake bug#10828.
1231# To make any issue more visible, cause the running configure to be aborted
1232# by default if the 'rm' program in use doesn't match our expectations; the
1233# user can still override this though.
1234if rm -f && rm -fr && rm -rf; then : OK; else
1235 cat >&2 <<'END'
1236Oops!
1237
1238Your 'rm' program seems unable to run without file operands specified
1239on the command line, even when the '-f' option is present. This is contrary
1240to the behaviour of most rm programs out there, and not conforming with
1241the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1242
1243Please tell bug-automake@gnu.org about your system, including the value
1244of your $PATH and any error possibly output before this message. This
1245can help us improve future automake versions.
1246
1247END
1248 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1249 echo 'Configuration will proceed anyway, since you have set the' >&2
1250 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1251 echo >&2
1252 else
1253 cat >&2 <<'END'
1254Aborting the configuration process, to ensure you take notice of the issue.
1255
1256You can download and install GNU coreutils to get an 'rm' implementation
1257that behaves properly: <http://www.gnu.org/software/coreutils/>.
1258
1259If you want to complete the configuration process using your problematic
1260'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1261to "yes", and re-run configure.
1262
1263END
1264 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1265 fi
78ad3d2c
AG
1266fi
1267])
6cc5e1a6 1268
0f7f2ef3 1269dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1ea75322
DB
1270dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1271dnl mangled by Autoconf and run in a shell conditional statement.
1272m4_define([_AC_COMPILER_EXEEXT],
1273m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1274
6cc5e1a6
DB
1275# When config.status generates a header, we must update the stamp-h file.
1276# This file resides in the same directory as the config header
1277# that is generated. The stamp files are numbered to have different names.
1278
1279# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1280# loop where config.status creates the headers, so we can generate
1281# our stamp files there.
1282AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1283[# Compute $1's index in $config_headers.
b3df3353 1284_am_arg=$1
6cc5e1a6
DB
1285_am_stamp_count=1
1286for _am_header in $config_headers :; do
1287 case $_am_header in
b3df3353 1288 $_am_arg | $_am_arg:* )
6cc5e1a6
DB
1289 break ;;
1290 * )
1291 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1292 esac
1293done
b3df3353 1294echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
6cc5e1a6 1295
00916e98 1296# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1297#
1298# This file is free software; the Free Software Foundation
1299# gives unlimited permission to copy and/or distribute it,
1300# with or without modifications, as long as this notice is preserved.
1301
1302# AM_PROG_INSTALL_SH
1303# ------------------
1304# Define $install_sh.
1305AC_DEFUN([AM_PROG_INSTALL_SH],
1306[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1ea75322
DB
1307if test x"${install_sh}" != xset; then
1308 case $am_aux_dir in
1309 *\ * | *\ *)
1310 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1311 *)
1312 install_sh="\${SHELL} $am_aux_dir/install-sh"
1313 esac
1314fi
0f7f2ef3 1315AC_SUBST([install_sh])])
6cc5e1a6 1316
00916e98 1317# Copyright (C) 2003-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1318#
1319# This file is free software; the Free Software Foundation
1320# gives unlimited permission to copy and/or distribute it,
1321# with or without modifications, as long as this notice is preserved.
1322
6cc5e1a6
DB
1323# Check whether the underlying file-system supports filenames
1324# with a leading dot. For instance MS-DOS doesn't.
1325AC_DEFUN([AM_SET_LEADING_DOT],
1326[rm -rf .tst 2>/dev/null
1327mkdir .tst 2>/dev/null
1328if test -d .tst; then
1329 am__leading_dot=.
1330else
1331 am__leading_dot=_
1332fi
1333rmdir .tst 2>/dev/null
1334AC_SUBST([am__leading_dot])])
1335
1336# Check to see how 'make' treats includes. -*- Autoconf -*-
1337
00916e98 1338# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1339#
1340# This file is free software; the Free Software Foundation
1341# gives unlimited permission to copy and/or distribute it,
1342# with or without modifications, as long as this notice is preserved.
1343
6cc5e1a6
DB
1344# AM_MAKE_INCLUDE()
1345# -----------------
1346# Check to see how make treats includes.
1347AC_DEFUN([AM_MAKE_INCLUDE],
1348[am_make=${MAKE-make}
1349cat > confinc << 'END'
1350am__doit:
1ea75322 1351 @echo this is the am__doit target
6cc5e1a6
DB
1352.PHONY: am__doit
1353END
1354# If we don't find an include directive, just comment out the code.
1355AC_MSG_CHECKING([for style of include used by $am_make])
1356am__include="#"
1357am__quote=
1358_am_result=none
1359# First try GNU make style include.
1360echo "include confinc" > confmf
0f7f2ef3 1361# Ignore all kinds of additional output from 'make'.
1ea75322
DB
1362case `$am_make -s -f confmf 2> /dev/null` in #(
1363*the\ am__doit\ target*)
1364 am__include=include
1365 am__quote=
1366 _am_result=GNU
1367 ;;
1368esac
6cc5e1a6
DB
1369# Now try BSD make style include.
1370if test "$am__include" = "#"; then
1371 echo '.include "confinc"' > confmf
1ea75322
DB
1372 case `$am_make -s -f confmf 2> /dev/null` in #(
1373 *the\ am__doit\ target*)
1374 am__include=.include
1375 am__quote="\""
1376 _am_result=BSD
1377 ;;
1378 esac
6cc5e1a6
DB
1379fi
1380AC_SUBST([am__include])
1381AC_SUBST([am__quote])
1382AC_MSG_RESULT([$_am_result])
1383rm -f confinc confmf
1384])
1385
1386# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1387
00916e98 1388# Copyright (C) 1997-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1389#
1390# This file is free software; the Free Software Foundation
1391# gives unlimited permission to copy and/or distribute it,
1392# with or without modifications, as long as this notice is preserved.
1393
6cc5e1a6
DB
1394# AM_MISSING_PROG(NAME, PROGRAM)
1395# ------------------------------
1396AC_DEFUN([AM_MISSING_PROG],
1397[AC_REQUIRE([AM_MISSING_HAS_RUN])
1398$1=${$1-"${am_missing_run}$2"}
1399AC_SUBST($1)])
1400
6cc5e1a6
DB
1401# AM_MISSING_HAS_RUN
1402# ------------------
00916e98
AG
1403# Define MISSING if not defined so far and test if it is modern enough.
1404# If it is, set am_missing_run to use it, otherwise, to nothing.
6cc5e1a6
DB
1405AC_DEFUN([AM_MISSING_HAS_RUN],
1406[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1407AC_REQUIRE_AUX_FILE([missing])dnl
1ea75322
DB
1408if test x"${MISSING+set}" != xset; then
1409 case $am_aux_dir in
1410 *\ * | *\ *)
1411 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1412 *)
1413 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1414 esac
1415fi
6cc5e1a6 1416# Use eval to expand $SHELL
00916e98
AG
1417if eval "$MISSING --is-lightweight"; then
1418 am_missing_run="$MISSING "
6cc5e1a6
DB
1419else
1420 am_missing_run=
0f7f2ef3 1421 AC_MSG_WARN(['missing' script is too old or missing])
6cc5e1a6
DB
1422fi
1423])
1424
6cc5e1a6
DB
1425# Helper functions for option handling. -*- Autoconf -*-
1426
00916e98 1427# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1428#
1429# This file is free software; the Free Software Foundation
1430# gives unlimited permission to copy and/or distribute it,
1431# with or without modifications, as long as this notice is preserved.
1432
6cc5e1a6
DB
1433# _AM_MANGLE_OPTION(NAME)
1434# -----------------------
1435AC_DEFUN([_AM_MANGLE_OPTION],
1436[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1437
1438# _AM_SET_OPTION(NAME)
f8c25730 1439# --------------------
6cc5e1a6
DB
1440# Set option NAME. Presently that only means defining a flag for this option.
1441AC_DEFUN([_AM_SET_OPTION],
0f7f2ef3 1442[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
6cc5e1a6
DB
1443
1444# _AM_SET_OPTIONS(OPTIONS)
f8c25730 1445# ------------------------
6cc5e1a6
DB
1446# OPTIONS is a space-separated list of Automake options.
1447AC_DEFUN([_AM_SET_OPTIONS],
10862fa6 1448[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
6cc5e1a6
DB
1449
1450# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1451# -------------------------------------------
1452# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1453AC_DEFUN([_AM_IF_OPTION],
1454[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1455
00916e98
AG
1456# Copyright (C) 1999-2013 Free Software Foundation, Inc.
1457#
1458# This file is free software; the Free Software Foundation
1459# gives unlimited permission to copy and/or distribute it,
1460# with or without modifications, as long as this notice is preserved.
1461
1462# _AM_PROG_CC_C_O
1463# ---------------
1464# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1465# to automatically call this.
1466AC_DEFUN([_AM_PROG_CC_C_O],
1467[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1468AC_REQUIRE_AUX_FILE([compile])dnl
1469AC_LANG_PUSH([C])dnl
1470AC_CACHE_CHECK(
1471 [whether $CC understands -c and -o together],
1472 [am_cv_prog_cc_c_o],
1473 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1474 # Make sure it works both with $CC and with simple cc.
1475 # Following AC_PROG_CC_C_O, we do the test twice because some
1476 # compilers refuse to overwrite an existing .o file with -o,
1477 # though they will create one.
1478 am_cv_prog_cc_c_o=yes
1479 for am_i in 1 2; do
1480 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1481 && test -f conftest2.$ac_objext; then
1482 : OK
1483 else
1484 am_cv_prog_cc_c_o=no
1485 break
1486 fi
1487 done
1488 rm -f core conftest*
1489 unset am_i])
1490if test "$am_cv_prog_cc_c_o" != yes; then
1491 # Losing compiler, so override with the script.
1492 # FIXME: It is wrong to rewrite CC.
1493 # But if we don't then we get into trouble of one sort or another.
1494 # A longer-term fix would be to have automake use am__CC in this case,
1495 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1496 CC="$am_aux_dir/compile $CC"
1497fi
1498AC_LANG_POP([C])])
1499
1500# For backward compatibility.
1501AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1502
1503# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1504#
1505# This file is free software; the Free Software Foundation
1506# gives unlimited permission to copy and/or distribute it,
1507# with or without modifications, as long as this notice is preserved.
1508
1509# AM_RUN_LOG(COMMAND)
1510# -------------------
1511# Run COMMAND, save the exit status in ac_status, and log it.
1512# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1513AC_DEFUN([AM_RUN_LOG],
1514[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1515 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1516 ac_status=$?
1517 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1518 (exit $ac_status); }])
1519
6cc5e1a6
DB
1520# Check to make sure that the build environment is sane. -*- Autoconf -*-
1521
00916e98 1522# Copyright (C) 1996-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1523#
1524# This file is free software; the Free Software Foundation
1525# gives unlimited permission to copy and/or distribute it,
1526# with or without modifications, as long as this notice is preserved.
1527
6cc5e1a6
DB
1528# AM_SANITY_CHECK
1529# ---------------
1530AC_DEFUN([AM_SANITY_CHECK],
1531[AC_MSG_CHECKING([whether build environment is sane])
1ea75322
DB
1532# Reject unsafe characters in $srcdir or the absolute working directory
1533# name. Accept space and tab only in the latter.
1534am_lf='
1535'
1536case `pwd` in
1537 *[[\\\"\#\$\&\'\`$am_lf]]*)
1538 AC_MSG_ERROR([unsafe absolute working directory name]);;
1539esac
1540case $srcdir in
1541 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
0f7f2ef3 1542 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1ea75322
DB
1543esac
1544
0f7f2ef3 1545# Do 'set' in a subshell so we don't clobber the current shell's
6cc5e1a6
DB
1546# arguments. Must try -L first in case configure is actually a
1547# symlink; some systems play weird games with the mod time of symlinks
1548# (eg FreeBSD returns the mod time of the symlink's containing
1549# directory).
1550if (
0f7f2ef3
AL
1551 am_has_slept=no
1552 for am_try in 1 2; do
1553 echo "timestamp, slept: $am_has_slept" > conftest.file
1554 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1555 if test "$[*]" = "X"; then
1556 # -L didn't work.
1557 set X `ls -t "$srcdir/configure" conftest.file`
1558 fi
1559 if test "$[*]" != "X $srcdir/configure conftest.file" \
1560 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1561
1562 # If neither matched, then we have a broken ls. This can happen
1563 # if, for instance, CONFIG_SHELL is bash and it inherits a
1564 # broken ls alias from the environment. This has actually
1565 # happened. Such a system could not be considered "sane".
1566 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1567 alias in your environment])
1568 fi
1569 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1570 break
1571 fi
1572 # Just in case.
1573 sleep 1
1574 am_has_slept=yes
1575 done
6cc5e1a6
DB
1576 test "$[2]" = conftest.file
1577 )
1578then
1579 # Ok.
1580 :
1581else
1582 AC_MSG_ERROR([newly created file is older than distributed files!
1583Check your system clock])
1584fi
0f7f2ef3
AL
1585AC_MSG_RESULT([yes])
1586# If we didn't sleep, we still need to ensure time stamps of config.status and
1587# generated files are strictly newer.
1588am_sleep_pid=
1589if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1590 ( sleep 1 ) &
1591 am_sleep_pid=$!
1592fi
1593AC_CONFIG_COMMANDS_PRE(
1594 [AC_MSG_CHECKING([that generated files are newer than configure])
1595 if test -n "$am_sleep_pid"; then
1596 # Hide warnings about reused PIDs.
1597 wait $am_sleep_pid 2>/dev/null
1598 fi
1599 AC_MSG_RESULT([done])])
1600rm -f conftest.file
1601])
6cc5e1a6 1602
00916e98 1603# Copyright (C) 2009-2013 Free Software Foundation, Inc.
ca14ea2b
DB
1604#
1605# This file is free software; the Free Software Foundation
1606# gives unlimited permission to copy and/or distribute it,
1607# with or without modifications, as long as this notice is preserved.
1608
ca14ea2b
DB
1609# AM_SILENT_RULES([DEFAULT])
1610# --------------------------
1611# Enable less verbose build rules; with the default set to DEFAULT
0f7f2ef3 1612# ("yes" being less verbose, "no" or empty being verbose).
ca14ea2b 1613AC_DEFUN([AM_SILENT_RULES],
0f7f2ef3
AL
1614[AC_ARG_ENABLE([silent-rules], [dnl
1615AS_HELP_STRING(
1616 [--enable-silent-rules],
1617 [less verbose build output (undo: "make V=1")])
1618AS_HELP_STRING(
1619 [--disable-silent-rules],
1620 [verbose build output (undo: "make V=0")])dnl
1621])
1622case $enable_silent_rules in @%:@ (((
1623 yes) AM_DEFAULT_VERBOSITY=0;;
1624 no) AM_DEFAULT_VERBOSITY=1;;
1625 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
ca14ea2b 1626esac
f8c25730 1627dnl
0f7f2ef3 1628dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
f8c25730
DB
1629dnl do not support nested variable expansions.
1630dnl See automake bug#9928 and bug#10237.
1631am_make=${MAKE-make}
1632AC_CACHE_CHECK([whether $am_make supports nested variables],
1633 [am_cv_make_support_nested_variables],
1634 [if AS_ECHO([['TRUE=$(BAR$(V))
1635BAR0=false
1636BAR1=true
1637V=1
1638am__doit:
1639 @$(TRUE)
1640.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1641 am_cv_make_support_nested_variables=yes
1642else
1643 am_cv_make_support_nested_variables=no
1644fi])
1645if test $am_cv_make_support_nested_variables = yes; then
0f7f2ef3 1646 dnl Using '$V' instead of '$(V)' breaks IRIX make.
f8c25730
DB
1647 AM_V='$(V)'
1648 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1649else
1650 AM_V=$AM_DEFAULT_VERBOSITY
1651 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1652fi
1653AC_SUBST([AM_V])dnl
1654AM_SUBST_NOTMAKE([AM_V])dnl
1655AC_SUBST([AM_DEFAULT_V])dnl
1656AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
ca14ea2b
DB
1657AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1658AM_BACKSLASH='\'
1659AC_SUBST([AM_BACKSLASH])dnl
1660_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1661])
1662
00916e98 1663# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1664#
1665# This file is free software; the Free Software Foundation
1666# gives unlimited permission to copy and/or distribute it,
1667# with or without modifications, as long as this notice is preserved.
1668
1669# AM_PROG_INSTALL_STRIP
1670# ---------------------
0f7f2ef3 1671# One issue with vendor 'install' (even GNU) is that you can't
6cc5e1a6
DB
1672# specify the program used to strip binaries. This is especially
1673# annoying in cross-compiling environments, where the build's strip
1674# is unlikely to handle the host's binaries.
1675# Fortunately install-sh will honor a STRIPPROG variable, so we
0f7f2ef3 1676# always use install-sh in "make install-strip", and initialize
6cc5e1a6
DB
1677# STRIPPROG with the value of the STRIP variable (set by the user).
1678AC_DEFUN([AM_PROG_INSTALL_STRIP],
1679[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
0f7f2ef3
AL
1680# Installed binaries are usually stripped using 'strip' when the user
1681# run "make install-strip". However 'strip' might not be the right
6cc5e1a6 1682# tool to use in cross-compilation environments, therefore Automake
0f7f2ef3
AL
1683# will honor the 'STRIP' environment variable to overrule this program.
1684dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
6cc5e1a6
DB
1685if test "$cross_compiling" != no; then
1686 AC_CHECK_TOOL([STRIP], [strip], :)
1687fi
1688INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1689AC_SUBST([INSTALL_STRIP_PROGRAM])])
1690
00916e98 1691# Copyright (C) 2006-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1692#
1693# This file is free software; the Free Software Foundation
1694# gives unlimited permission to copy and/or distribute it,
1695# with or without modifications, as long as this notice is preserved.
1696
1697# _AM_SUBST_NOTMAKE(VARIABLE)
1698# ---------------------------
b3df3353 1699# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
6cc5e1a6
DB
1700# This macro is traced by Automake.
1701AC_DEFUN([_AM_SUBST_NOTMAKE])
1702
1ea75322 1703# AM_SUBST_NOTMAKE(VARIABLE)
f8c25730 1704# --------------------------
1ea75322
DB
1705# Public sister of _AM_SUBST_NOTMAKE.
1706AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1707
6cc5e1a6
DB
1708# Check how to create a tarball. -*- Autoconf -*-
1709
00916e98 1710# Copyright (C) 2004-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1711#
1712# This file is free software; the Free Software Foundation
1713# gives unlimited permission to copy and/or distribute it,
1714# with or without modifications, as long as this notice is preserved.
1715
6cc5e1a6
DB
1716# _AM_PROG_TAR(FORMAT)
1717# --------------------
1718# Check how to create a tarball in format FORMAT.
0f7f2ef3 1719# FORMAT should be one of 'v7', 'ustar', or 'pax'.
6cc5e1a6
DB
1720#
1721# Substitute a variable $(am__tar) that is a command
1722# writing to stdout a FORMAT-tarball containing the directory
1723# $tardir.
1724# tardir=directory && $(am__tar) > result.tar
1725#
1726# Substitute a variable $(am__untar) that extract such
1727# a tarball read from stdin.
1728# $(am__untar) < result.tar
00916e98 1729#
6cc5e1a6 1730AC_DEFUN([_AM_PROG_TAR],
f8c25730
DB
1731[# Always define AMTAR for backward compatibility. Yes, it's still used
1732# in the wild :-( We should find a proper way to deprecate it ...
1733AC_SUBST([AMTAR], ['$${TAR-tar}'])
00916e98
AG
1734
1735# We'll loop over all known methods to create a tar archive until one works.
6cc5e1a6 1736_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
6cc5e1a6 1737
00916e98
AG
1738m4_if([$1], [v7],
1739 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1740
1741 [m4_case([$1],
1742 [ustar],
1743 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1744 # There is notably a 21 bits limit for the UID and the GID. In fact,
1745 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1746 # and bug#13588).
1747 am_max_uid=2097151 # 2^21 - 1
1748 am_max_gid=$am_max_uid
1749 # The $UID and $GID variables are not portable, so we need to resort
1750 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1751 # below are definitely unexpected, so allow the users to see them
1752 # (that is, avoid stderr redirection).
1753 am_uid=`id -u || echo unknown`
1754 am_gid=`id -g || echo unknown`
1755 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1756 if test $am_uid -le $am_max_uid; then
1757 AC_MSG_RESULT([yes])
1758 else
1759 AC_MSG_RESULT([no])
1760 _am_tools=none
1761 fi
1762 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1763 if test $am_gid -le $am_max_gid; then
1764 AC_MSG_RESULT([yes])
1765 else
1766 AC_MSG_RESULT([no])
1767 _am_tools=none
1768 fi],
1769
1770 [pax],
1771 [],
6cc5e1a6 1772
00916e98
AG
1773 [m4_fatal([Unknown tar format])])
1774
1775 AC_MSG_CHECKING([how to create a $1 tar archive])
1776
1777 # Go ahead even if we have the value already cached. We do so because we
1778 # need to set the values for the 'am__tar' and 'am__untar' variables.
1779 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1780
1781 for _am_tool in $_am_tools; do
1782 case $_am_tool in
1783 gnutar)
1784 for _am_tar in tar gnutar gtar; do
1785 AM_RUN_LOG([$_am_tar --version]) && break
1786 done
1787 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1788 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1789 am__untar="$_am_tar -xf -"
1790 ;;
1791 plaintar)
1792 # Must skip GNU tar: if it does not support --format= it doesn't create
1793 # ustar tarball either.
1794 (tar --version) >/dev/null 2>&1 && continue
1795 am__tar='tar chf - "$$tardir"'
1796 am__tar_='tar chf - "$tardir"'
1797 am__untar='tar xf -'
1798 ;;
1799 pax)
1800 am__tar='pax -L -x $1 -w "$$tardir"'
1801 am__tar_='pax -L -x $1 -w "$tardir"'
1802 am__untar='pax -r'
1803 ;;
1804 cpio)
1805 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1806 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1807 am__untar='cpio -i -H $1 -d'
1808 ;;
1809 none)
1810 am__tar=false
1811 am__tar_=false
1812 am__untar=false
1813 ;;
1814 esac
1815
1816 # If the value was cached, stop now. We just wanted to have am__tar
1817 # and am__untar set.
1818 test -n "${am_cv_prog_tar_$1}" && break
1819
1820 # tar/untar a dummy directory, and stop if the command works.
1821 rm -rf conftest.dir
1822 mkdir conftest.dir
1823 echo GrepMe > conftest.dir/file
1824 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1825 rm -rf conftest.dir
1826 if test -s conftest.tar; then
1827 AM_RUN_LOG([$am__untar <conftest.tar])
1828 AM_RUN_LOG([cat conftest.dir/file])
1829 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1830 fi
1831 done
6cc5e1a6 1832 rm -rf conftest.dir
6cc5e1a6 1833
00916e98
AG
1834 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1835 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1836
6cc5e1a6
DB
1837AC_SUBST([am__tar])
1838AC_SUBST([am__untar])
1839]) # _AM_PROG_TAR
1840
78ad3d2c 1841m4_include([m4/intltool.m4])
00916e98
AG
1842m4_include([m4/libtool.m4])
1843m4_include([m4/ltoptions.m4])
1844m4_include([m4/ltsugar.m4])
1845m4_include([m4/ltversion.m4])
1846m4_include([m4/lt~obsolete.m4])