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