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