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