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