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