Adding upstream version 0.9.0.
[debian/lxpanel.git] / aclocal.m4
CommitLineData
6b775dbb 1# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
aaccad27 2
6b775dbb 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
6b775dbb 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
39c13576
DB
15m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
eea54180
DB
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
39c13576
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.
aaccad27 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
39c13576 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 ;;
514580cf
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
6b775dbb
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
6b775dbb
AG
299 # We need to process the po/ directory.
300 POSUB=po
6cc5e1a6 301
6b775dbb
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
6b775dbb
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
6b775dbb
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
6b775dbb
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
6b775dbb
AG
340
341 GLIB_LC_MESSAGES
342 GLIB_WITH_NLS
96dc8a45 343
6b775dbb
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
96dc8a45 374
6b775dbb
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
96dc8a45 380
6b775dbb
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)
96dc8a45 392
6b775dbb
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 ])
96dc8a45 409
6b775dbb
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
6b775dbb
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
96dc8a45 441
6b775dbb
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])
96dc8a45 457
7486d297 458
7a1c5048
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
19ab5cea 674# nls.m4 serial 5 (gettext-0.18)
0688b017 675dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
19ab5cea
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 -*-
4652f59b 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_]+$])
514580cf
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)$])
4652f59b
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#
4652f59b
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
4652f59b 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],
32a67dc7
DB
778[if test -n "$$1"; then
779 pkg_cv_[]$1="$$1"
780 elif test -n "$PKG_CONFIG"; then
781 PKG_CHECK_EXISTS([$3],
514580cf
DB
782 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
783 test "x$?" != "x0" && pkg_failed=yes ],
32a67dc7
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
4652f59b 828 AC_MSG_RESULT([no])
6cc5e1a6
DB
829 _PKG_SHORT_ERRORS_SUPPORTED
830 if test $_pkg_short_errors_supported = yes; then
514580cf 831 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
6cc5e1a6 832 else
514580cf 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
4652f59b 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
cb7f7ba8 846_PKG_TEXT])[]dnl
4652f59b 847 ])
6cc5e1a6 848elif test $pkg_failed = untried; then
4652f59b
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
cb7f7ba8 857To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
4652f59b 858 ])
6cc5e1a6
DB
859else
860 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
861 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
862 AC_MSG_RESULT([yes])
4652f59b 863 $3
6cc5e1a6
DB
864fi[]dnl
865])# PKG_CHECK_MODULES
866
0688b017
AG
867
868# PKG_INSTALLDIR(DIRECTORY)
869# -------------------------
870# Substitutes the variable pkgconfigdir as the location where a module
871# should install pkg-config .pc files. By default the directory is
872# $libdir/pkgconfig, but the default can be changed by passing
873# DIRECTORY. The user can override through the --with-pkgconfigdir
874# parameter.
875AC_DEFUN([PKG_INSTALLDIR],
876[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
877m4_pushdef([pkg_description],
878 [pkg-config installation directory @<:@]pkg_default[@:>@])
879AC_ARG_WITH([pkgconfigdir],
880 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
881 [with_pkgconfigdir=]pkg_default)
882AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
883m4_popdef([pkg_default])
884m4_popdef([pkg_description])
885]) dnl PKG_INSTALLDIR
886
887
888# PKG_NOARCH_INSTALLDIR(DIRECTORY)
889# -------------------------
890# Substitutes the variable noarch_pkgconfigdir as the location where a
891# module should install arch-independent pkg-config .pc files. By
892# default the directory is $datadir/pkgconfig, but the default can be
893# changed by passing DIRECTORY. The user can override through the
894# --with-noarch-pkgconfigdir parameter.
895AC_DEFUN([PKG_NOARCH_INSTALLDIR],
896[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
897m4_pushdef([pkg_description],
898 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
899AC_ARG_WITH([noarch-pkgconfigdir],
900 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
901 [with_noarch_pkgconfigdir=]pkg_default)
902AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
903m4_popdef([pkg_default])
904m4_popdef([pkg_description])
905]) dnl PKG_NOARCH_INSTALLDIR
906
907
908# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
909# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
910# -------------------------------------------
911# Retrieves the value of the pkg-config variable for the given module.
912AC_DEFUN([PKG_CHECK_VAR],
913[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
914AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
915
916_PKG_CONFIG([$1], [variable="][$3]["], [$2])
917AS_VAR_COPY([$1], [pkg_cv_][$1])
918
919AS_VAR_IF([$1], [""], [$5], [$4])dnl
920])# PKG_CHECK_VAR
921
6b775dbb 922# Copyright (C) 2002-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
923#
924# This file is free software; the Free Software Foundation
925# gives unlimited permission to copy and/or distribute it,
926# with or without modifications, as long as this notice is preserved.
927
928# AM_AUTOMAKE_VERSION(VERSION)
929# ----------------------------
930# Automake X.Y traces this macro to ensure aclocal.m4 has been
931# generated from the m4 files accompanying Automake X.Y.
932# (This private macro should not be called outside this file.)
933AC_DEFUN([AM_AUTOMAKE_VERSION],
6b775dbb 934[am__api_version='1.14'
6cc5e1a6
DB
935dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
936dnl require some minimum version. Point them to the right macro.
6b775dbb 937m4_if([$1], [1.14.1], [],
6cc5e1a6
DB
938 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
939])
940
941# _AM_AUTOCONF_VERSION(VERSION)
942# -----------------------------
943# aclocal traces this macro to find the Autoconf version.
944# This is a private macro too. Using m4_define simplifies
945# the logic in aclocal, which can simply ignore this definition.
946m4_define([_AM_AUTOCONF_VERSION], [])
947
948# AM_SET_CURRENT_AUTOMAKE_VERSION
949# -------------------------------
950# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
7486d297 951# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
6cc5e1a6 952AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6b775dbb 953[AM_AUTOMAKE_VERSION([1.14.1])dnl
39c13576
DB
954m4_ifndef([AC_AUTOCONF_VERSION],
955 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
7486d297 956_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
6cc5e1a6 957
6b775dbb 958# Copyright (C) 2011-2013 Free Software Foundation, Inc.
aaccad27
AL
959#
960# This file is free software; the Free Software Foundation
961# gives unlimited permission to copy and/or distribute it,
962# with or without modifications, as long as this notice is preserved.
963
964# AM_PROG_AR([ACT-IF-FAIL])
965# -------------------------
966# Try to determine the archiver interface, and trigger the ar-lib wrapper
967# if it is needed. If the detection of archiver interface fails, run
968# ACT-IF-FAIL (default is to abort configure with a proper error message).
969AC_DEFUN([AM_PROG_AR],
970[AC_BEFORE([$0], [LT_INIT])dnl
971AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
972AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
973AC_REQUIRE_AUX_FILE([ar-lib])dnl
974AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
975: ${AR=ar}
976
977AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
6b775dbb
AG
978 [AC_LANG_PUSH([C])
979 am_cv_ar_interface=ar
aaccad27
AL
980 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
981 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
982 AC_TRY_EVAL([am_ar_try])
983 if test "$ac_status" -eq 0; then
984 am_cv_ar_interface=ar
985 else
986 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
987 AC_TRY_EVAL([am_ar_try])
988 if test "$ac_status" -eq 0; then
989 am_cv_ar_interface=lib
990 else
991 am_cv_ar_interface=unknown
992 fi
993 fi
994 rm -f conftest.lib libconftest.a
995 ])
6b775dbb 996 AC_LANG_POP([C])])
aaccad27
AL
997
998case $am_cv_ar_interface in
999ar)
1000 ;;
1001lib)
1002 # Microsoft lib, so override with the ar-lib wrapper script.
1003 # FIXME: It is wrong to rewrite AR.
1004 # But if we don't then we get into trouble of one sort or another.
1005 # A longer-term fix would be to have automake use am__AR in this case,
1006 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
1007 # similar.
1008 AR="$am_aux_dir/ar-lib $AR"
1009 ;;
1010unknown)
1011 m4_default([$1],
1012 [AC_MSG_ERROR([could not determine $AR interface])])
1013 ;;
1014esac
1015AC_SUBST([AR])dnl
1016])
1017
6cc5e1a6
DB
1018# AM_AUX_DIR_EXPAND -*- Autoconf -*-
1019
6b775dbb 1020# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1021#
1022# This file is free software; the Free Software Foundation
1023# gives unlimited permission to copy and/or distribute it,
1024# with or without modifications, as long as this notice is preserved.
1025
1026# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
aaccad27
AL
1027# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
1028# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
6cc5e1a6
DB
1029#
1030# Of course, Automake must honor this variable whenever it calls a
1031# tool from the auxiliary directory. The problem is that $srcdir (and
1032# therefore $ac_aux_dir as well) can be either absolute or relative,
1033# depending on how configure is run. This is pretty annoying, since
1034# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1035# source directory, any form will work fine, but in subdirectories a
1036# relative path needs to be adjusted first.
1037#
1038# $ac_aux_dir/missing
1039# fails when called from a subdirectory if $ac_aux_dir is relative
1040# $top_srcdir/$ac_aux_dir/missing
1041# fails if $ac_aux_dir is absolute,
1042# fails when called from a subdirectory in a VPATH build with
1043# a relative $ac_aux_dir
1044#
1045# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1046# are both prefixed by $srcdir. In an in-source build this is usually
aaccad27 1047# harmless because $srcdir is '.', but things will broke when you
6cc5e1a6
DB
1048# start a VPATH build or use an absolute $srcdir.
1049#
1050# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1051# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1052# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1053# and then we would define $MISSING as
1054# MISSING="\${SHELL} $am_aux_dir/missing"
1055# This will work as long as MISSING is not called from configure, because
1056# unfortunately $(top_srcdir) has no meaning in configure.
1057# However there are other variables, like CC, which are often used in
1058# configure, and could therefore not use this "fixed" $ac_aux_dir.
1059#
1060# Another solution, used here, is to always expand $ac_aux_dir to an
1061# absolute PATH. The drawback is that using absolute paths prevent a
1062# configured tree to be moved without reconfiguration.
1063
1064AC_DEFUN([AM_AUX_DIR_EXPAND],
0688b017
AG
1065[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1066# Expand $ac_aux_dir to an absolute path.
1067am_aux_dir=`cd "$ac_aux_dir" && pwd`
6cc5e1a6
DB
1068])
1069
1070# AM_CONDITIONAL -*- Autoconf -*-
1071
6b775dbb 1072# Copyright (C) 1997-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1073#
1074# This file is free software; the Free Software Foundation
1075# gives unlimited permission to copy and/or distribute it,
1076# with or without modifications, as long as this notice is preserved.
1077
6cc5e1a6
DB
1078# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1079# -------------------------------------
1080# Define a conditional.
1081AC_DEFUN([AM_CONDITIONAL],
aaccad27
AL
1082[AC_PREREQ([2.52])dnl
1083 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1084 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6cc5e1a6
DB
1085AC_SUBST([$1_TRUE])dnl
1086AC_SUBST([$1_FALSE])dnl
1087_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1088_AM_SUBST_NOTMAKE([$1_FALSE])dnl
2ba86315 1089m4_define([_AM_COND_VALUE_$1], [$2])dnl
6cc5e1a6
DB
1090if $2; then
1091 $1_TRUE=
1092 $1_FALSE='#'
1093else
1094 $1_TRUE='#'
1095 $1_FALSE=
1096fi
1097AC_CONFIG_COMMANDS_PRE(
1098[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1099 AC_MSG_ERROR([[conditional "$1" was never defined.
1100Usually this means the macro was only invoked conditionally.]])
1101fi])])
1102
6b775dbb 1103# Copyright (C) 1999-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1104#
1105# This file is free software; the Free Software Foundation
1106# gives unlimited permission to copy and/or distribute it,
1107# with or without modifications, as long as this notice is preserved.
1108
6cc5e1a6 1109
aaccad27 1110# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
6cc5e1a6
DB
1111# written in clear, in which case automake, when reading aclocal.m4,
1112# will think it sees a *use*, and therefore will trigger all it's
1113# C support machinery. Also note that it means that autoscan, seeing
1114# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1115
1116
1117# _AM_DEPENDENCIES(NAME)
1118# ----------------------
1119# See how the compiler implements dependency checking.
aaccad27 1120# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
6cc5e1a6
DB
1121# We try a few techniques and use that to set a single cache variable.
1122#
1123# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1124# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1125# dependency, and given that the user is not expected to run this macro,
1126# just rely on AC_PROG_CC.
1127AC_DEFUN([_AM_DEPENDENCIES],
1128[AC_REQUIRE([AM_SET_DEPDIR])dnl
1129AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1130AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1131AC_REQUIRE([AM_DEP_TRACK])dnl
1132
aaccad27
AL
1133m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1134 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1135 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1136 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1137 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1138 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1139 [depcc="$$1" am_compiler_list=])
6cc5e1a6
DB
1140
1141AC_CACHE_CHECK([dependency style of $depcc],
1142 [am_cv_$1_dependencies_compiler_type],
1143[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1144 # We make a subdir and do the tests there. Otherwise we can end up
1145 # making bogus files that we don't know about and never remove. For
1146 # instance it was reported that on HP-UX the gcc test will end up
aaccad27
AL
1147 # making a dummy file named 'D' -- because '-MD' means "put the output
1148 # in D".
514580cf 1149 rm -rf conftest.dir
6cc5e1a6
DB
1150 mkdir conftest.dir
1151 # Copy depcomp to subdir because otherwise we won't find it if we're
1152 # using a relative directory.
1153 cp "$am_depcomp" conftest.dir
1154 cd conftest.dir
1155 # We will build objects and dependencies in a subdirectory because
1156 # it helps to detect inapplicable dependency modes. For instance
1157 # both Tru64's cc and ICC support -MD to output dependencies as a
1158 # side effect of compilation, but ICC will put the dependencies in
1159 # the current directory while Tru64 will put them in the object
1160 # directory.
1161 mkdir sub
1162
1163 am_cv_$1_dependencies_compiler_type=none
1164 if test "$am_compiler_list" = ""; then
1165 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1166 fi
2ba86315
DB
1167 am__universal=false
1168 m4_case([$1], [CC],
1169 [case " $depcc " in #(
1170 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1171 esac],
1172 [CXX],
1173 [case " $depcc " in #(
1174 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1175 esac])
1176
6cc5e1a6
DB
1177 for depmode in $am_compiler_list; do
1178 # Setup a source with many dependencies, because some compilers
1179 # like to wrap large dependency lists on column 80 (with \), and
1180 # we should not choose a depcomp mode which is confused by this.
1181 #
1182 # We need to recreate these files for each test, as the compiler may
1183 # overwrite some of them when testing with obscure command lines.
1184 # This happens at least with the AIX C compiler.
1185 : > sub/conftest.c
1186 for i in 1 2 3 4 5 6; do
1187 echo '#include "conftst'$i'.h"' >> sub/conftest.c
aaccad27
AL
1188 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1189 # Solaris 10 /bin/sh.
1190 echo '/* dummy */' > sub/conftst$i.h
6cc5e1a6
DB
1191 done
1192 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1193
aaccad27 1194 # We check with '-c' and '-o' for the sake of the "dashmstdout"
2ba86315 1195 # mode. It turns out that the SunPro C++ compiler does not properly
aaccad27
AL
1196 # handle '-M -o', and we need to detect this. Also, some Intel
1197 # versions had trouble with output in subdirs.
2ba86315
DB
1198 am__obj=sub/conftest.${OBJEXT-o}
1199 am__minus_obj="-o $am__obj"
6cc5e1a6 1200 case $depmode in
2ba86315
DB
1201 gcc)
1202 # This depmode causes a compiler race in universal mode.
1203 test "$am__universal" = false || continue
1204 ;;
6cc5e1a6 1205 nosideeffect)
aaccad27
AL
1206 # After this tag, mechanisms are not by side-effect, so they'll
1207 # only be used when explicitly requested.
6cc5e1a6
DB
1208 if test "x$enable_dependency_tracking" = xyes; then
1209 continue
1210 else
1211 break
1212 fi
1213 ;;
514580cf 1214 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
aaccad27 1215 # This compiler won't grok '-c -o', but also, the minuso test has
2ba86315
DB
1216 # not run yet. These depmodes are late enough in the game, and
1217 # so weak that their functioning should not be impacted.
1218 am__obj=conftest.${OBJEXT-o}
1219 am__minus_obj=
1220 ;;
6cc5e1a6
DB
1221 none) break ;;
1222 esac
6cc5e1a6 1223 if depmode=$depmode \
2ba86315 1224 source=sub/conftest.c object=$am__obj \
6cc5e1a6 1225 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2ba86315 1226 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6cc5e1a6
DB
1227 >/dev/null 2>conftest.err &&
1228 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1229 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2ba86315 1230 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6cc5e1a6
DB
1231 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1232 # icc doesn't choke on unknown options, it will just issue warnings
1233 # or remarks (even with -Werror). So we grep stderr for any message
1234 # that says an option was ignored or not supported.
1235 # When given -MP, icc 7.0 and 7.1 complain thusly:
1236 # icc: Command line warning: ignoring option '-M'; no argument required
1237 # The diagnosis changed in icc 8.0:
1238 # icc: Command line remark: option '-MP' not supported
1239 if (grep 'ignoring option' conftest.err ||
1240 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1241 am_cv_$1_dependencies_compiler_type=$depmode
1242 break
1243 fi
1244 fi
1245 done
1246
1247 cd ..
1248 rm -rf conftest.dir
1249else
1250 am_cv_$1_dependencies_compiler_type=none
1251fi
1252])
1253AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1254AM_CONDITIONAL([am__fastdep$1], [
1255 test "x$enable_dependency_tracking" != xno \
1256 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1257])
1258
1259
1260# AM_SET_DEPDIR
1261# -------------
1262# Choose a directory name for dependency files.
aaccad27 1263# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
6cc5e1a6
DB
1264AC_DEFUN([AM_SET_DEPDIR],
1265[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1266AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1267])
1268
1269
1270# AM_DEP_TRACK
1271# ------------
1272AC_DEFUN([AM_DEP_TRACK],
aaccad27
AL
1273[AC_ARG_ENABLE([dependency-tracking], [dnl
1274AS_HELP_STRING(
1275 [--enable-dependency-tracking],
1276 [do not reject slow dependency extractors])
1277AS_HELP_STRING(
1278 [--disable-dependency-tracking],
1279 [speeds up one-time build])])
6cc5e1a6
DB
1280if test "x$enable_dependency_tracking" != xno; then
1281 am_depcomp="$ac_aux_dir/depcomp"
1282 AMDEPBACKSLASH='\'
514580cf 1283 am__nodep='_no'
6cc5e1a6
DB
1284fi
1285AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1286AC_SUBST([AMDEPBACKSLASH])dnl
1287_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
514580cf
DB
1288AC_SUBST([am__nodep])dnl
1289_AM_SUBST_NOTMAKE([am__nodep])dnl
6cc5e1a6
DB
1290])
1291
1292# Generate code to set up dependency tracking. -*- Autoconf -*-
1293
6b775dbb 1294# Copyright (C) 1999-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1295#
1296# This file is free software; the Free Software Foundation
1297# gives unlimited permission to copy and/or distribute it,
1298# with or without modifications, as long as this notice is preserved.
1299
6cc5e1a6
DB
1300
1301# _AM_OUTPUT_DEPENDENCY_COMMANDS
1302# ------------------------------
1303AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2ba86315 1304[{
6b775dbb 1305 # Older Autoconf quotes --file arguments for eval, but not when files
2ba86315
DB
1306 # are listed without --file. Let's play safe and only enable the eval
1307 # if we detect the quoting.
1308 case $CONFIG_FILES in
1309 *\'*) eval set x "$CONFIG_FILES" ;;
1310 *) set x $CONFIG_FILES ;;
1311 esac
1312 shift
1313 for mf
1314 do
1315 # Strip MF so we end up with the name of the file.
1316 mf=`echo "$mf" | sed -e 's/:.*$//'`
1317 # Check whether this is an Automake generated Makefile or not.
aaccad27 1318 # We used to match only the files named 'Makefile.in', but
2ba86315
DB
1319 # some people rename them; so instead we look at the file content.
1320 # Grep'ing the first line is not enough: some people post-process
1321 # each Makefile.in and add a new line on top of each file to say so.
1322 # Grep'ing the whole file is not good either: AIX grep has a line
1323 # limit of 2048, but all sed's we know have understand at least 4000.
1324 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1325 dirpart=`AS_DIRNAME("$mf")`
1326 else
1327 continue
1328 fi
1329 # Extract the definition of DEPDIR, am__include, and am__quote
aaccad27 1330 # from the Makefile without running 'make'.
2ba86315
DB
1331 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1332 test -z "$DEPDIR" && continue
1333 am__include=`sed -n 's/^am__include = //p' < "$mf"`
6b775dbb 1334 test -z "$am__include" && continue
2ba86315 1335 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
2ba86315
DB
1336 # Find all dependency output files, they are included files with
1337 # $(DEPDIR) in their names. We invoke sed twice because it is the
1338 # simplest approach to changing $(DEPDIR) to its actual value in the
1339 # expansion.
1340 for file in `sed -n "
1341 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
aaccad27 1342 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
2ba86315
DB
1343 # Make sure the directory exists.
1344 test -f "$dirpart/$file" && continue
1345 fdir=`AS_DIRNAME(["$file"])`
1346 AS_MKDIR_P([$dirpart/$fdir])
1347 # echo "creating $dirpart/$file"
1348 echo '# dummy' > "$dirpart/$file"
1349 done
6cc5e1a6 1350 done
2ba86315 1351}
6cc5e1a6
DB
1352])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1353
1354
1355# AM_OUTPUT_DEPENDENCY_COMMANDS
1356# -----------------------------
1357# This macro should only be invoked once -- use via AC_REQUIRE.
1358#
1359# This code is only required when automatic dependency tracking
aaccad27 1360# is enabled. FIXME. This creates each '.P' file that we will
6cc5e1a6
DB
1361# need in order to bootstrap the dependency handling code.
1362AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1363[AC_CONFIG_COMMANDS([depfiles],
1364 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1365 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1366])
1367
1368# Do all the work for Automake. -*- Autoconf -*-
1369
6b775dbb 1370# Copyright (C) 1996-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1371#
1372# This file is free software; the Free Software Foundation
1373# gives unlimited permission to copy and/or distribute it,
1374# with or without modifications, as long as this notice is preserved.
1375
6cc5e1a6
DB
1376# This macro actually does too much. Some checks are only needed if
1377# your package does certain things. But this isn't really a big deal.
1378
6b775dbb
AG
1379dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1380m4_define([AC_PROG_CC],
1381m4_defn([AC_PROG_CC])
1382[_AM_PROG_CC_C_O
1383])
1384
6cc5e1a6
DB
1385# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1386# AM_INIT_AUTOMAKE([OPTIONS])
1387# -----------------------------------------------
1388# The call with PACKAGE and VERSION arguments is the old style
1389# call (pre autoconf-2.50), which is being phased out. PACKAGE
1390# and VERSION should now be passed to AC_INIT and removed from
1391# the call to AM_INIT_AUTOMAKE.
1392# We support both call styles for the transition. After
1393# the next Automake release, Autoconf can make the AC_INIT
1394# arguments mandatory, and then we can depend on a new Autoconf
1395# release and drop the old call support.
1396AC_DEFUN([AM_INIT_AUTOMAKE],
6b775dbb 1397[AC_PREREQ([2.65])dnl
6cc5e1a6
DB
1398dnl Autoconf wants to disallow AM_ names. We explicitly allow
1399dnl the ones we care about.
1400m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1401AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1402AC_REQUIRE([AC_PROG_INSTALL])dnl
1403if test "`cd $srcdir && pwd`" != "`pwd`"; then
1404 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1405 # is not polluted with repeated "-I."
1406 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1407 # test to see if srcdir already configured
1408 if test -f $srcdir/config.status; then
1409 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1410 fi
1411fi
1412
1413# test whether we have cygpath
1414if test -z "$CYGPATH_W"; then
1415 if (cygpath --version) >/dev/null 2>/dev/null; then
1416 CYGPATH_W='cygpath -w'
1417 else
1418 CYGPATH_W=echo
1419 fi
1420fi
1421AC_SUBST([CYGPATH_W])
1422
1423# Define the identity of the package.
1424dnl Distinguish between old-style and new-style calls.
1425m4_ifval([$2],
aaccad27 1426[AC_DIAGNOSE([obsolete],
6b775dbb 1427 [$0: two- and three-arguments forms are deprecated.])
aaccad27 1428m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6cc5e1a6
DB
1429 AC_SUBST([PACKAGE], [$1])dnl
1430 AC_SUBST([VERSION], [$2])],
1431[_AM_SET_OPTIONS([$1])dnl
1432dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
aaccad27
AL
1433m4_if(
1434 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1435 [ok:ok],,
6cc5e1a6
DB
1436 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1437 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1438 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1439
1440_AM_IF_OPTION([no-define],,
aaccad27
AL
1441[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1442 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
6cc5e1a6
DB
1443
1444# Some tools Automake needs.
1445AC_REQUIRE([AM_SANITY_CHECK])dnl
1446AC_REQUIRE([AC_ARG_PROGRAM])dnl
aaccad27
AL
1447AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1448AM_MISSING_PROG([AUTOCONF], [autoconf])
1449AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1450AM_MISSING_PROG([AUTOHEADER], [autoheader])
1451AM_MISSING_PROG([MAKEINFO], [makeinfo])
2ba86315
DB
1452AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1453AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
aaccad27
AL
1454AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1455# For better backward compatibility. To be removed once Automake 1.9.x
1456# dies out for good. For more background, see:
1457# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1458# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1459AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
6cc5e1a6
DB
1460# We need awk for the "check" target. The system "awk" is bad on
1461# some platforms.
1462AC_REQUIRE([AC_PROG_AWK])dnl
1463AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1464AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1465_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
2ba86315
DB
1466 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1467 [_AM_PROG_TAR([v7])])])
6cc5e1a6
DB
1468_AM_IF_OPTION([no-dependencies],,
1469[AC_PROVIDE_IFELSE([AC_PROG_CC],
aaccad27
AL
1470 [_AM_DEPENDENCIES([CC])],
1471 [m4_define([AC_PROG_CC],
1472 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
6cc5e1a6 1473AC_PROVIDE_IFELSE([AC_PROG_CXX],
aaccad27
AL
1474 [_AM_DEPENDENCIES([CXX])],
1475 [m4_define([AC_PROG_CXX],
1476 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
6cc5e1a6 1477AC_PROVIDE_IFELSE([AC_PROG_OBJC],
aaccad27
AL
1478 [_AM_DEPENDENCIES([OBJC])],
1479 [m4_define([AC_PROG_OBJC],
1480 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
6b775dbb 1481AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
aaccad27
AL
1482 [_AM_DEPENDENCIES([OBJCXX])],
1483 [m4_define([AC_PROG_OBJCXX],
6b775dbb 1484 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
6cc5e1a6 1485])
6b775dbb
AG
1486AC_REQUIRE([AM_SILENT_RULES])dnl
1487dnl The testsuite driver may need to know about EXEEXT, so add the
1488dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1489dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
2ba86315
DB
1490AC_CONFIG_COMMANDS_PRE(dnl
1491[m4_provide_if([_AM_COMPILER_EXEEXT],
1492 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
6b775dbb
AG
1493
1494# POSIX will say in a future version that running "rm -f" with no argument
1495# is OK; and we want to be able to make that assumption in our Makefile
1496# recipes. So use an aggressive probe to check that the usage we want is
1497# actually supported "in the wild" to an acceptable degree.
1498# See automake bug#10828.
1499# To make any issue more visible, cause the running configure to be aborted
1500# by default if the 'rm' program in use doesn't match our expectations; the
1501# user can still override this though.
1502if rm -f && rm -fr && rm -rf; then : OK; else
1503 cat >&2 <<'END'
1504Oops!
1505
1506Your 'rm' program seems unable to run without file operands specified
1507on the command line, even when the '-f' option is present. This is contrary
1508to the behaviour of most rm programs out there, and not conforming with
1509the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1510
1511Please tell bug-automake@gnu.org about your system, including the value
1512of your $PATH and any error possibly output before this message. This
1513can help us improve future automake versions.
1514
1515END
1516 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1517 echo 'Configuration will proceed anyway, since you have set the' >&2
1518 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1519 echo >&2
1520 else
1521 cat >&2 <<'END'
1522Aborting the configuration process, to ensure you take notice of the issue.
1523
1524You can download and install GNU coreutils to get an 'rm' implementation
1525that behaves properly: <http://www.gnu.org/software/coreutils/>.
1526
1527If you want to complete the configuration process using your problematic
1528'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1529to "yes", and re-run configure.
1530
1531END
1532 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1533 fi
8713e384
AG
1534fi
1535])
6cc5e1a6 1536
aaccad27 1537dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
2ba86315
DB
1538dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1539dnl mangled by Autoconf and run in a shell conditional statement.
1540m4_define([_AC_COMPILER_EXEEXT],
1541m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1542
6cc5e1a6
DB
1543# When config.status generates a header, we must update the stamp-h file.
1544# This file resides in the same directory as the config header
1545# that is generated. The stamp files are numbered to have different names.
1546
1547# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1548# loop where config.status creates the headers, so we can generate
1549# our stamp files there.
1550AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1551[# Compute $1's index in $config_headers.
39c13576 1552_am_arg=$1
6cc5e1a6
DB
1553_am_stamp_count=1
1554for _am_header in $config_headers :; do
1555 case $_am_header in
39c13576 1556 $_am_arg | $_am_arg:* )
6cc5e1a6
DB
1557 break ;;
1558 * )
1559 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1560 esac
1561done
39c13576 1562echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
6cc5e1a6 1563
6b775dbb 1564# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1565#
1566# This file is free software; the Free Software Foundation
1567# gives unlimited permission to copy and/or distribute it,
1568# with or without modifications, as long as this notice is preserved.
1569
1570# AM_PROG_INSTALL_SH
1571# ------------------
1572# Define $install_sh.
1573AC_DEFUN([AM_PROG_INSTALL_SH],
1574[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2ba86315
DB
1575if test x"${install_sh}" != xset; then
1576 case $am_aux_dir in
1577 *\ * | *\ *)
1578 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1579 *)
1580 install_sh="\${SHELL} $am_aux_dir/install-sh"
1581 esac
1582fi
aaccad27 1583AC_SUBST([install_sh])])
6cc5e1a6 1584
6b775dbb 1585# Copyright (C) 2003-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1586#
1587# This file is free software; the Free Software Foundation
1588# gives unlimited permission to copy and/or distribute it,
1589# with or without modifications, as long as this notice is preserved.
1590
6cc5e1a6
DB
1591# Check whether the underlying file-system supports filenames
1592# with a leading dot. For instance MS-DOS doesn't.
1593AC_DEFUN([AM_SET_LEADING_DOT],
1594[rm -rf .tst 2>/dev/null
1595mkdir .tst 2>/dev/null
1596if test -d .tst; then
1597 am__leading_dot=.
1598else
1599 am__leading_dot=_
1600fi
1601rmdir .tst 2>/dev/null
1602AC_SUBST([am__leading_dot])])
1603
1604# Check to see how 'make' treats includes. -*- Autoconf -*-
1605
6b775dbb 1606# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1607#
1608# This file is free software; the Free Software Foundation
1609# gives unlimited permission to copy and/or distribute it,
1610# with or without modifications, as long as this notice is preserved.
1611
6cc5e1a6
DB
1612# AM_MAKE_INCLUDE()
1613# -----------------
1614# Check to see how make treats includes.
1615AC_DEFUN([AM_MAKE_INCLUDE],
1616[am_make=${MAKE-make}
1617cat > confinc << 'END'
1618am__doit:
2ba86315 1619 @echo this is the am__doit target
6cc5e1a6
DB
1620.PHONY: am__doit
1621END
1622# If we don't find an include directive, just comment out the code.
1623AC_MSG_CHECKING([for style of include used by $am_make])
1624am__include="#"
1625am__quote=
1626_am_result=none
1627# First try GNU make style include.
1628echo "include confinc" > confmf
aaccad27 1629# Ignore all kinds of additional output from 'make'.
2ba86315
DB
1630case `$am_make -s -f confmf 2> /dev/null` in #(
1631*the\ am__doit\ target*)
1632 am__include=include
1633 am__quote=
1634 _am_result=GNU
1635 ;;
1636esac
6cc5e1a6
DB
1637# Now try BSD make style include.
1638if test "$am__include" = "#"; then
1639 echo '.include "confinc"' > confmf
2ba86315
DB
1640 case `$am_make -s -f confmf 2> /dev/null` in #(
1641 *the\ am__doit\ target*)
1642 am__include=.include
1643 am__quote="\""
1644 _am_result=BSD
1645 ;;
1646 esac
6cc5e1a6
DB
1647fi
1648AC_SUBST([am__include])
1649AC_SUBST([am__quote])
1650AC_MSG_RESULT([$_am_result])
1651rm -f confinc confmf
1652])
1653
1654# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1655
6b775dbb 1656# Copyright (C) 1997-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1657#
1658# This file is free software; the Free Software Foundation
1659# gives unlimited permission to copy and/or distribute it,
1660# with or without modifications, as long as this notice is preserved.
1661
6cc5e1a6
DB
1662# AM_MISSING_PROG(NAME, PROGRAM)
1663# ------------------------------
1664AC_DEFUN([AM_MISSING_PROG],
1665[AC_REQUIRE([AM_MISSING_HAS_RUN])
1666$1=${$1-"${am_missing_run}$2"}
1667AC_SUBST($1)])
1668
6cc5e1a6
DB
1669# AM_MISSING_HAS_RUN
1670# ------------------
6b775dbb
AG
1671# Define MISSING if not defined so far and test if it is modern enough.
1672# If it is, set am_missing_run to use it, otherwise, to nothing.
6cc5e1a6
DB
1673AC_DEFUN([AM_MISSING_HAS_RUN],
1674[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1675AC_REQUIRE_AUX_FILE([missing])dnl
2ba86315
DB
1676if test x"${MISSING+set}" != xset; then
1677 case $am_aux_dir in
1678 *\ * | *\ *)
1679 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1680 *)
1681 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1682 esac
1683fi
6cc5e1a6 1684# Use eval to expand $SHELL
6b775dbb
AG
1685if eval "$MISSING --is-lightweight"; then
1686 am_missing_run="$MISSING "
6cc5e1a6
DB
1687else
1688 am_missing_run=
aaccad27 1689 AC_MSG_WARN(['missing' script is too old or missing])
6cc5e1a6
DB
1690fi
1691])
1692
6cc5e1a6
DB
1693# Helper functions for option handling. -*- Autoconf -*-
1694
6b775dbb 1695# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1696#
1697# This file is free software; the Free Software Foundation
1698# gives unlimited permission to copy and/or distribute it,
1699# with or without modifications, as long as this notice is preserved.
1700
6cc5e1a6
DB
1701# _AM_MANGLE_OPTION(NAME)
1702# -----------------------
1703AC_DEFUN([_AM_MANGLE_OPTION],
1704[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1705
1706# _AM_SET_OPTION(NAME)
514580cf 1707# --------------------
6cc5e1a6
DB
1708# Set option NAME. Presently that only means defining a flag for this option.
1709AC_DEFUN([_AM_SET_OPTION],
aaccad27 1710[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
6cc5e1a6
DB
1711
1712# _AM_SET_OPTIONS(OPTIONS)
514580cf 1713# ------------------------
6cc5e1a6
DB
1714# OPTIONS is a space-separated list of Automake options.
1715AC_DEFUN([_AM_SET_OPTIONS],
7486d297 1716[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
6cc5e1a6
DB
1717
1718# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1719# -------------------------------------------
1720# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1721AC_DEFUN([_AM_IF_OPTION],
1722[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1723
6b775dbb
AG
1724# Copyright (C) 1999-2013 Free Software Foundation, Inc.
1725#
1726# This file is free software; the Free Software Foundation
1727# gives unlimited permission to copy and/or distribute it,
1728# with or without modifications, as long as this notice is preserved.
1729
1730# _AM_PROG_CC_C_O
1731# ---------------
1732# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1733# to automatically call this.
1734AC_DEFUN([_AM_PROG_CC_C_O],
1735[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1736AC_REQUIRE_AUX_FILE([compile])dnl
1737AC_LANG_PUSH([C])dnl
1738AC_CACHE_CHECK(
1739 [whether $CC understands -c and -o together],
1740 [am_cv_prog_cc_c_o],
1741 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1742 # Make sure it works both with $CC and with simple cc.
1743 # Following AC_PROG_CC_C_O, we do the test twice because some
1744 # compilers refuse to overwrite an existing .o file with -o,
1745 # though they will create one.
1746 am_cv_prog_cc_c_o=yes
1747 for am_i in 1 2; do
1748 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1749 && test -f conftest2.$ac_objext; then
1750 : OK
1751 else
1752 am_cv_prog_cc_c_o=no
1753 break
1754 fi
1755 done
1756 rm -f core conftest*
1757 unset am_i])
1758if test "$am_cv_prog_cc_c_o" != yes; then
1759 # Losing compiler, so override with the script.
1760 # FIXME: It is wrong to rewrite CC.
1761 # But if we don't then we get into trouble of one sort or another.
1762 # A longer-term fix would be to have automake use am__CC in this case,
1763 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1764 CC="$am_aux_dir/compile $CC"
1765fi
1766AC_LANG_POP([C])])
1767
1768# For backward compatibility.
1769AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1770
1771# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1772#
1773# This file is free software; the Free Software Foundation
1774# gives unlimited permission to copy and/or distribute it,
1775# with or without modifications, as long as this notice is preserved.
1776
1777# AM_RUN_LOG(COMMAND)
1778# -------------------
1779# Run COMMAND, save the exit status in ac_status, and log it.
1780# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1781AC_DEFUN([AM_RUN_LOG],
1782[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1783 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1784 ac_status=$?
1785 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1786 (exit $ac_status); }])
1787
6cc5e1a6
DB
1788# Check to make sure that the build environment is sane. -*- Autoconf -*-
1789
6b775dbb 1790# Copyright (C) 1996-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1791#
1792# This file is free software; the Free Software Foundation
1793# gives unlimited permission to copy and/or distribute it,
1794# with or without modifications, as long as this notice is preserved.
1795
6cc5e1a6
DB
1796# AM_SANITY_CHECK
1797# ---------------
1798AC_DEFUN([AM_SANITY_CHECK],
1799[AC_MSG_CHECKING([whether build environment is sane])
2ba86315
DB
1800# Reject unsafe characters in $srcdir or the absolute working directory
1801# name. Accept space and tab only in the latter.
1802am_lf='
1803'
1804case `pwd` in
1805 *[[\\\"\#\$\&\'\`$am_lf]]*)
1806 AC_MSG_ERROR([unsafe absolute working directory name]);;
1807esac
1808case $srcdir in
1809 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
aaccad27 1810 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
2ba86315
DB
1811esac
1812
aaccad27 1813# Do 'set' in a subshell so we don't clobber the current shell's
6cc5e1a6
DB
1814# arguments. Must try -L first in case configure is actually a
1815# symlink; some systems play weird games with the mod time of symlinks
1816# (eg FreeBSD returns the mod time of the symlink's containing
1817# directory).
1818if (
aaccad27
AL
1819 am_has_slept=no
1820 for am_try in 1 2; do
1821 echo "timestamp, slept: $am_has_slept" > conftest.file
1822 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1823 if test "$[*]" = "X"; then
1824 # -L didn't work.
1825 set X `ls -t "$srcdir/configure" conftest.file`
1826 fi
1827 if test "$[*]" != "X $srcdir/configure conftest.file" \
1828 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1829
1830 # If neither matched, then we have a broken ls. This can happen
1831 # if, for instance, CONFIG_SHELL is bash and it inherits a
1832 # broken ls alias from the environment. This has actually
1833 # happened. Such a system could not be considered "sane".
1834 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1835 alias in your environment])
1836 fi
1837 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1838 break
1839 fi
1840 # Just in case.
1841 sleep 1
1842 am_has_slept=yes
1843 done
6cc5e1a6
DB
1844 test "$[2]" = conftest.file
1845 )
1846then
1847 # Ok.
1848 :
1849else
1850 AC_MSG_ERROR([newly created file is older than distributed files!
1851Check your system clock])
1852fi
aaccad27
AL
1853AC_MSG_RESULT([yes])
1854# If we didn't sleep, we still need to ensure time stamps of config.status and
1855# generated files are strictly newer.
1856am_sleep_pid=
1857if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1858 ( sleep 1 ) &
1859 am_sleep_pid=$!
1860fi
1861AC_CONFIG_COMMANDS_PRE(
1862 [AC_MSG_CHECKING([that generated files are newer than configure])
1863 if test -n "$am_sleep_pid"; then
1864 # Hide warnings about reused PIDs.
1865 wait $am_sleep_pid 2>/dev/null
1866 fi
1867 AC_MSG_RESULT([done])])
1868rm -f conftest.file
1869])
6cc5e1a6 1870
6b775dbb 1871# Copyright (C) 2009-2013 Free Software Foundation, Inc.
cb7f7ba8
DB
1872#
1873# This file is free software; the Free Software Foundation
1874# gives unlimited permission to copy and/or distribute it,
1875# with or without modifications, as long as this notice is preserved.
1876
cb7f7ba8
DB
1877# AM_SILENT_RULES([DEFAULT])
1878# --------------------------
1879# Enable less verbose build rules; with the default set to DEFAULT
aaccad27 1880# ("yes" being less verbose, "no" or empty being verbose).
cb7f7ba8 1881AC_DEFUN([AM_SILENT_RULES],
aaccad27
AL
1882[AC_ARG_ENABLE([silent-rules], [dnl
1883AS_HELP_STRING(
1884 [--enable-silent-rules],
1885 [less verbose build output (undo: "make V=1")])
1886AS_HELP_STRING(
1887 [--disable-silent-rules],
1888 [verbose build output (undo: "make V=0")])dnl
1889])
1890case $enable_silent_rules in @%:@ (((
1891 yes) AM_DEFAULT_VERBOSITY=0;;
1892 no) AM_DEFAULT_VERBOSITY=1;;
1893 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
cb7f7ba8 1894esac
514580cf 1895dnl
aaccad27 1896dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
514580cf
DB
1897dnl do not support nested variable expansions.
1898dnl See automake bug#9928 and bug#10237.
1899am_make=${MAKE-make}
1900AC_CACHE_CHECK([whether $am_make supports nested variables],
1901 [am_cv_make_support_nested_variables],
1902 [if AS_ECHO([['TRUE=$(BAR$(V))
1903BAR0=false
1904BAR1=true
1905V=1
1906am__doit:
1907 @$(TRUE)
1908.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1909 am_cv_make_support_nested_variables=yes
1910else
1911 am_cv_make_support_nested_variables=no
1912fi])
1913if test $am_cv_make_support_nested_variables = yes; then
aaccad27 1914 dnl Using '$V' instead of '$(V)' breaks IRIX make.
514580cf
DB
1915 AM_V='$(V)'
1916 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1917else
1918 AM_V=$AM_DEFAULT_VERBOSITY
1919 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1920fi
1921AC_SUBST([AM_V])dnl
1922AM_SUBST_NOTMAKE([AM_V])dnl
1923AC_SUBST([AM_DEFAULT_V])dnl
1924AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
cb7f7ba8
DB
1925AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1926AM_BACKSLASH='\'
1927AC_SUBST([AM_BACKSLASH])dnl
1928_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1929])
1930
6b775dbb 1931# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1932#
1933# This file is free software; the Free Software Foundation
1934# gives unlimited permission to copy and/or distribute it,
1935# with or without modifications, as long as this notice is preserved.
1936
1937# AM_PROG_INSTALL_STRIP
1938# ---------------------
aaccad27 1939# One issue with vendor 'install' (even GNU) is that you can't
6cc5e1a6
DB
1940# specify the program used to strip binaries. This is especially
1941# annoying in cross-compiling environments, where the build's strip
1942# is unlikely to handle the host's binaries.
1943# Fortunately install-sh will honor a STRIPPROG variable, so we
aaccad27 1944# always use install-sh in "make install-strip", and initialize
6cc5e1a6
DB
1945# STRIPPROG with the value of the STRIP variable (set by the user).
1946AC_DEFUN([AM_PROG_INSTALL_STRIP],
1947[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
aaccad27
AL
1948# Installed binaries are usually stripped using 'strip' when the user
1949# run "make install-strip". However 'strip' might not be the right
6cc5e1a6 1950# tool to use in cross-compilation environments, therefore Automake
aaccad27
AL
1951# will honor the 'STRIP' environment variable to overrule this program.
1952dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
6cc5e1a6
DB
1953if test "$cross_compiling" != no; then
1954 AC_CHECK_TOOL([STRIP], [strip], :)
1955fi
1956INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1957AC_SUBST([INSTALL_STRIP_PROGRAM])])
1958
6b775dbb 1959# Copyright (C) 2006-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1960#
1961# This file is free software; the Free Software Foundation
1962# gives unlimited permission to copy and/or distribute it,
1963# with or without modifications, as long as this notice is preserved.
1964
1965# _AM_SUBST_NOTMAKE(VARIABLE)
1966# ---------------------------
39c13576 1967# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
6cc5e1a6
DB
1968# This macro is traced by Automake.
1969AC_DEFUN([_AM_SUBST_NOTMAKE])
1970
2ba86315 1971# AM_SUBST_NOTMAKE(VARIABLE)
514580cf 1972# --------------------------
2ba86315
DB
1973# Public sister of _AM_SUBST_NOTMAKE.
1974AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1975
6cc5e1a6
DB
1976# Check how to create a tarball. -*- Autoconf -*-
1977
6b775dbb 1978# Copyright (C) 2004-2013 Free Software Foundation, Inc.
6cc5e1a6
DB
1979#
1980# This file is free software; the Free Software Foundation
1981# gives unlimited permission to copy and/or distribute it,
1982# with or without modifications, as long as this notice is preserved.
1983
6cc5e1a6
DB
1984# _AM_PROG_TAR(FORMAT)
1985# --------------------
1986# Check how to create a tarball in format FORMAT.
aaccad27 1987# FORMAT should be one of 'v7', 'ustar', or 'pax'.
6cc5e1a6
DB
1988#
1989# Substitute a variable $(am__tar) that is a command
1990# writing to stdout a FORMAT-tarball containing the directory
1991# $tardir.
1992# tardir=directory && $(am__tar) > result.tar
1993#
1994# Substitute a variable $(am__untar) that extract such
1995# a tarball read from stdin.
1996# $(am__untar) < result.tar
6b775dbb 1997#
6cc5e1a6 1998AC_DEFUN([_AM_PROG_TAR],
514580cf
DB
1999[# Always define AMTAR for backward compatibility. Yes, it's still used
2000# in the wild :-( We should find a proper way to deprecate it ...
2001AC_SUBST([AMTAR], ['$${TAR-tar}'])
6b775dbb
AG
2002
2003# We'll loop over all known methods to create a tar archive until one works.
6cc5e1a6 2004_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
6cc5e1a6 2005
6b775dbb
AG
2006m4_if([$1], [v7],
2007 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2008
2009 [m4_case([$1],
2010 [ustar],
2011 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2012 # There is notably a 21 bits limit for the UID and the GID. In fact,
2013 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2014 # and bug#13588).
2015 am_max_uid=2097151 # 2^21 - 1
2016 am_max_gid=$am_max_uid
2017 # The $UID and $GID variables are not portable, so we need to resort
2018 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
2019 # below are definitely unexpected, so allow the users to see them
2020 # (that is, avoid stderr redirection).
2021 am_uid=`id -u || echo unknown`
2022 am_gid=`id -g || echo unknown`
2023 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2024 if test $am_uid -le $am_max_uid; then
2025 AC_MSG_RESULT([yes])
2026 else
2027 AC_MSG_RESULT([no])
2028 _am_tools=none
2029 fi
2030 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2031 if test $am_gid -le $am_max_gid; then
2032 AC_MSG_RESULT([yes])
2033 else
2034 AC_MSG_RESULT([no])
2035 _am_tools=none
2036 fi],
2037
2038 [pax],
2039 [],
6cc5e1a6 2040
6b775dbb
AG
2041 [m4_fatal([Unknown tar format])])
2042
2043 AC_MSG_CHECKING([how to create a $1 tar archive])
2044
2045 # Go ahead even if we have the value already cached. We do so because we
2046 # need to set the values for the 'am__tar' and 'am__untar' variables.
2047 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2048
2049 for _am_tool in $_am_tools; do
2050 case $_am_tool in
2051 gnutar)
2052 for _am_tar in tar gnutar gtar; do
2053 AM_RUN_LOG([$_am_tar --version]) && break
2054 done
2055 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2056 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2057 am__untar="$_am_tar -xf -"
2058 ;;
2059 plaintar)
2060 # Must skip GNU tar: if it does not support --format= it doesn't create
2061 # ustar tarball either.
2062 (tar --version) >/dev/null 2>&1 && continue
2063 am__tar='tar chf - "$$tardir"'
2064 am__tar_='tar chf - "$tardir"'
2065 am__untar='tar xf -'
2066 ;;
2067 pax)
2068 am__tar='pax -L -x $1 -w "$$tardir"'
2069 am__tar_='pax -L -x $1 -w "$tardir"'
2070 am__untar='pax -r'
2071 ;;
2072 cpio)
2073 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2074 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2075 am__untar='cpio -i -H $1 -d'
2076 ;;
2077 none)
2078 am__tar=false
2079 am__tar_=false
2080 am__untar=false
2081 ;;
2082 esac
2083
2084 # If the value was cached, stop now. We just wanted to have am__tar
2085 # and am__untar set.
2086 test -n "${am_cv_prog_tar_$1}" && break
2087
2088 # tar/untar a dummy directory, and stop if the command works.
2089 rm -rf conftest.dir
2090 mkdir conftest.dir
2091 echo GrepMe > conftest.dir/file
2092 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2093 rm -rf conftest.dir
2094 if test -s conftest.tar; then
2095 AM_RUN_LOG([$am__untar <conftest.tar])
2096 AM_RUN_LOG([cat conftest.dir/file])
2097 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2098 fi
2099 done
6cc5e1a6 2100 rm -rf conftest.dir
6cc5e1a6 2101
6b775dbb
AG
2102 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2103 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2104
6cc5e1a6
DB
2105AC_SUBST([am__tar])
2106AC_SUBST([am__untar])
2107]) # _AM_PROG_TAR
2108
6b775dbb
AG
2109m4_include([m4/libtool.m4])
2110m4_include([m4/ltoptions.m4])
2111m4_include([m4/ltsugar.m4])
2112m4_include([m4/ltversion.m4])
2113m4_include([m4/lt~obsolete.m4])