Bump to version 0.9.4
[platform/upstream/libunistring.git] / aclocal.m4
1 # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2013 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
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17
18 # po.m4 serial 21 (gettext-0.18.3)
19 dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
20 dnl This file is free software; the Free Software Foundation
21 dnl gives unlimited permission to copy and/or distribute it,
22 dnl with or without modifications, as long as this notice is preserved.
23 dnl
24 dnl This file can can be used in projects which are not available under
25 dnl the GNU General Public License or the GNU Library General Public
26 dnl License but which still want to provide support for the GNU gettext
27 dnl functionality.
28 dnl Please note that the actual code of the GNU gettext library is covered
29 dnl by the GNU Library General Public License, and the rest of the GNU
30 dnl gettext package package is covered by the GNU General Public License.
31 dnl They are *not* in the public domain.
32
33 dnl Authors:
34 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
35 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
36
37 AC_PREREQ([2.60])
38
39 dnl Checks for all prerequisites of the po subdirectory.
40 AC_DEFUN([AM_PO_SUBDIRS],
41 [
42   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
43   AC_REQUIRE([AC_PROG_INSTALL])dnl
44   AC_REQUIRE([AC_PROG_MKDIR_P])dnl
45   AC_REQUIRE([AC_PROG_SED])dnl
46   AC_REQUIRE([AM_NLS])dnl
47
48   dnl Release version of the gettext macros. This is used to ensure that
49   dnl the gettext macros and po/Makefile.in.in are in sync.
50   AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
51
52   dnl Perform the following tests also if --disable-nls has been given,
53   dnl because they are needed for "make dist" to work.
54
55   dnl Search for GNU msgfmt in the PATH.
56   dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
57   dnl The second test excludes FreeBSD msgfmt.
58   AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
59     [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
60      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
61     :)
62   AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
63
64   dnl Test whether it is GNU msgfmt >= 0.15.
65 changequote(,)dnl
66   case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
67     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
68     *) MSGFMT_015=$MSGFMT ;;
69   esac
70 changequote([,])dnl
71   AC_SUBST([MSGFMT_015])
72 changequote(,)dnl
73   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
74     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
75     *) GMSGFMT_015=$GMSGFMT ;;
76   esac
77 changequote([,])dnl
78   AC_SUBST([GMSGFMT_015])
79
80   dnl Search for GNU xgettext 0.12 or newer in the PATH.
81   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
82   dnl The second test excludes FreeBSD xgettext.
83   AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
84     [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
85      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
86     :)
87   dnl Remove leftover from FreeBSD xgettext call.
88   rm -f messages.po
89
90   dnl Test whether it is GNU xgettext >= 0.15.
91 changequote(,)dnl
92   case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
93     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
94     *) XGETTEXT_015=$XGETTEXT ;;
95   esac
96 changequote([,])dnl
97   AC_SUBST([XGETTEXT_015])
98
99   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
100   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
101     [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
102
103   dnl Installation directories.
104   dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
105   dnl have to define it here, so that it can be used in po/Makefile.
106   test -n "$localedir" || localedir='${datadir}/locale'
107   AC_SUBST([localedir])
108
109   dnl Support for AM_XGETTEXT_OPTION.
110   test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
111   AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
112
113   AC_CONFIG_COMMANDS([po-directories], [[
114     for ac_file in $CONFIG_FILES; do
115       # Support "outfile[:infile[:infile...]]"
116       case "$ac_file" in
117         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
118       esac
119       # PO directories have a Makefile.in generated from Makefile.in.in.
120       case "$ac_file" in */Makefile.in)
121         # Adjust a relative srcdir.
122         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
123         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
124         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
125         # In autoconf-2.13 it is called $ac_given_srcdir.
126         # In autoconf-2.50 it is called $srcdir.
127         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
128         case "$ac_given_srcdir" in
129           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
130           /*) top_srcdir="$ac_given_srcdir" ;;
131           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
132         esac
133         # Treat a directory as a PO directory if and only if it has a
134         # POTFILES.in file. This allows packages to have multiple PO
135         # directories under different names or in different locations.
136         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
137           rm -f "$ac_dir/POTFILES"
138           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
139           gt_tab=`printf '\t'`
140           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
141           POMAKEFILEDEPS="POTFILES.in"
142           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
143           # on $ac_dir but don't depend on user-specified configuration
144           # parameters.
145           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
146             # The LINGUAS file contains the set of available languages.
147             if test -n "$OBSOLETE_ALL_LINGUAS"; then
148               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
149             fi
150             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
151             # Hide the ALL_LINGUAS assignment from automake < 1.5.
152             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
153             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
154           else
155             # The set of available languages was given in configure.in.
156             # Hide the ALL_LINGUAS assignment from automake < 1.5.
157             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
158           fi
159           # Compute POFILES
160           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
161           # Compute UPDATEPOFILES
162           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
163           # Compute DUMMYPOFILES
164           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
165           # Compute GMOFILES
166           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
167           case "$ac_given_srcdir" in
168             .) srcdirpre= ;;
169             *) srcdirpre='$(srcdir)/' ;;
170           esac
171           POFILES=
172           UPDATEPOFILES=
173           DUMMYPOFILES=
174           GMOFILES=
175           for lang in $ALL_LINGUAS; do
176             POFILES="$POFILES $srcdirpre$lang.po"
177             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
178             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
179             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
180           done
181           # CATALOGS depends on both $ac_dir and the user's LINGUAS
182           # environment variable.
183           INST_LINGUAS=
184           if test -n "$ALL_LINGUAS"; then
185             for presentlang in $ALL_LINGUAS; do
186               useit=no
187               if test "%UNSET%" != "$LINGUAS"; then
188                 desiredlanguages="$LINGUAS"
189               else
190                 desiredlanguages="$ALL_LINGUAS"
191               fi
192               for desiredlang in $desiredlanguages; do
193                 # Use the presentlang catalog if desiredlang is
194                 #   a. equal to presentlang, or
195                 #   b. a variant of presentlang (because in this case,
196                 #      presentlang can be used as a fallback for messages
197                 #      which are not translated in the desiredlang catalog).
198                 case "$desiredlang" in
199                   "$presentlang"*) useit=yes;;
200                 esac
201               done
202               if test $useit = yes; then
203                 INST_LINGUAS="$INST_LINGUAS $presentlang"
204               fi
205             done
206           fi
207           CATALOGS=
208           if test -n "$INST_LINGUAS"; then
209             for lang in $INST_LINGUAS; do
210               CATALOGS="$CATALOGS $lang.gmo"
211             done
212           fi
213           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
214           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
215           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
216             if test -f "$f"; then
217               case "$f" in
218                 *.orig | *.bak | *~) ;;
219                 *) cat "$f" >> "$ac_dir/Makefile" ;;
220               esac
221             fi
222           done
223         fi
224         ;;
225       esac
226     done]],
227    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
228     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
229     # from automake < 1.5.
230     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
231     # Capture the value of LINGUAS because we need it to compute CATALOGS.
232     LINGUAS="${LINGUAS-%UNSET%}"
233    ])
234 ])
235
236 dnl Postprocesses a Makefile in a directory containing PO files.
237 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
238 [
239   # When this code is run, in config.status, two variables have already been
240   # set:
241   # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
242   # - LINGUAS is the value of the environment variable LINGUAS at configure
243   #   time.
244
245 changequote(,)dnl
246   # Adjust a relative srcdir.
247   ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
248   ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
249   ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
250   # In autoconf-2.13 it is called $ac_given_srcdir.
251   # In autoconf-2.50 it is called $srcdir.
252   test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
253   case "$ac_given_srcdir" in
254     .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
255     /*) top_srcdir="$ac_given_srcdir" ;;
256     *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
257   esac
258
259   # Find a way to echo strings without interpreting backslash.
260   if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
261     gt_echo='echo'
262   else
263     if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
264       gt_echo='printf %s\n'
265     else
266       echo_func () {
267         cat <<EOT
268 $*
269 EOT
270       }
271       gt_echo='echo_func'
272     fi
273   fi
274
275   # A sed script that extracts the value of VARIABLE from a Makefile.
276   tab=`printf '\t'`
277   sed_x_variable='
278 # Test if the hold space is empty.
279 x
280 s/P/P/
281 x
282 ta
283 # Yes it was empty. Look if we have the expected variable definition.
284 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
285   # Seen the first line of the variable definition.
286   s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
287   ba
288 }
289 bd
290 :a
291 # Here we are processing a line from the variable definition.
292 # Remove comment, more precisely replace it with a space.
293 s/#.*$/ /
294 # See if the line ends in a backslash.
295 tb
296 :b
297 s/\\$//
298 # Print the line, without the trailing backslash.
299 p
300 tc
301 # There was no trailing backslash. The end of the variable definition is
302 # reached. Clear the hold space.
303 s/^.*$//
304 x
305 bd
306 :c
307 # A trailing backslash means that the variable definition continues in the
308 # next line. Put a nonempty string into the hold space to indicate this.
309 s/^.*$/P/
310 x
311 :d
312 '
313 changequote([,])dnl
314
315   # Set POTFILES to the value of the Makefile variable POTFILES.
316   sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
317   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
318   # Compute POTFILES_DEPS as
319   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
320   POTFILES_DEPS=
321   for file in $POTFILES; do
322     POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
323   done
324   POMAKEFILEDEPS=""
325
326   if test -n "$OBSOLETE_ALL_LINGUAS"; then
327     test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
328   fi
329   if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
330     # The LINGUAS file contains the set of available languages.
331     ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
332     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
333   else
334     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
335     sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
336     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
337   fi
338   # Hide the ALL_LINGUAS assignment from automake < 1.5.
339   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
340   # Compute POFILES
341   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
342   # Compute UPDATEPOFILES
343   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
344   # Compute DUMMYPOFILES
345   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
346   # Compute GMOFILES
347   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
348   # Compute PROPERTIESFILES
349   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
350   # Compute CLASSFILES
351   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
352   # Compute QMFILES
353   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
354   # Compute MSGFILES
355   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
356   # Compute RESOURCESDLLFILES
357   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
358   case "$ac_given_srcdir" in
359     .) srcdirpre= ;;
360     *) srcdirpre='$(srcdir)/' ;;
361   esac
362   POFILES=
363   UPDATEPOFILES=
364   DUMMYPOFILES=
365   GMOFILES=
366   PROPERTIESFILES=
367   CLASSFILES=
368   QMFILES=
369   MSGFILES=
370   RESOURCESDLLFILES=
371   for lang in $ALL_LINGUAS; do
372     POFILES="$POFILES $srcdirpre$lang.po"
373     UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
374     DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
375     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
376     PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
377     CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
378     QMFILES="$QMFILES $srcdirpre$lang.qm"
379     frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
380     MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
381     frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
382     RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
383   done
384   # CATALOGS depends on both $ac_dir and the user's LINGUAS
385   # environment variable.
386   INST_LINGUAS=
387   if test -n "$ALL_LINGUAS"; then
388     for presentlang in $ALL_LINGUAS; do
389       useit=no
390       if test "%UNSET%" != "$LINGUAS"; then
391         desiredlanguages="$LINGUAS"
392       else
393         desiredlanguages="$ALL_LINGUAS"
394       fi
395       for desiredlang in $desiredlanguages; do
396         # Use the presentlang catalog if desiredlang is
397         #   a. equal to presentlang, or
398         #   b. a variant of presentlang (because in this case,
399         #      presentlang can be used as a fallback for messages
400         #      which are not translated in the desiredlang catalog).
401         case "$desiredlang" in
402           "$presentlang"*) useit=yes;;
403         esac
404       done
405       if test $useit = yes; then
406         INST_LINGUAS="$INST_LINGUAS $presentlang"
407       fi
408     done
409   fi
410   CATALOGS=
411   JAVACATALOGS=
412   QTCATALOGS=
413   TCLCATALOGS=
414   CSHARPCATALOGS=
415   if test -n "$INST_LINGUAS"; then
416     for lang in $INST_LINGUAS; do
417       CATALOGS="$CATALOGS $lang.gmo"
418       JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
419       QTCATALOGS="$QTCATALOGS $lang.qm"
420       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
421       TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
422       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
423       CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
424     done
425   fi
426
427   sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
428   tab=`printf '\t'`
429   if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
430     # Add dependencies that cannot be formulated as a simple suffix rule.
431     for lang in $ALL_LINGUAS; do
432       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
433       cat >> "$ac_file.tmp" <<EOF
434 $frobbedlang.msg: $lang.po
435 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
436 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
437 EOF
438     done
439   fi
440   if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
441     # Add dependencies that cannot be formulated as a simple suffix rule.
442     for lang in $ALL_LINGUAS; do
443       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
444       cat >> "$ac_file.tmp" <<EOF
445 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
446 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
447 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
448 EOF
449     done
450   fi
451   if test -n "$POMAKEFILEDEPS"; then
452     cat >> "$ac_file.tmp" <<EOF
453 Makefile: $POMAKEFILEDEPS
454 EOF
455   fi
456   mv "$ac_file.tmp" "$ac_file"
457 ])
458
459 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
460 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
461 [
462   XGETTEXT_EXTRA_OPTIONS=
463 ])
464
465 dnl Registers an option to be passed to xgettext in the po subdirectory.
466 AC_DEFUN([AM_XGETTEXT_OPTION],
467 [
468   AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
469   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
470 ])
471
472 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
473 #
474 # This file is free software; the Free Software Foundation
475 # gives unlimited permission to copy and/or distribute it,
476 # with or without modifications, as long as this notice is preserved.
477
478 # AM_AUTOMAKE_VERSION(VERSION)
479 # ----------------------------
480 # Automake X.Y traces this macro to ensure aclocal.m4 has been
481 # generated from the m4 files accompanying Automake X.Y.
482 # (This private macro should not be called outside this file.)
483 AC_DEFUN([AM_AUTOMAKE_VERSION],
484 [am__api_version='1.13'
485 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
486 dnl require some minimum version.  Point them to the right macro.
487 m4_if([$1], [1.13.4], [],
488       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
489 ])
490
491 # _AM_AUTOCONF_VERSION(VERSION)
492 # -----------------------------
493 # aclocal traces this macro to find the Autoconf version.
494 # This is a private macro too.  Using m4_define simplifies
495 # the logic in aclocal, which can simply ignore this definition.
496 m4_define([_AM_AUTOCONF_VERSION], [])
497
498 # AM_SET_CURRENT_AUTOMAKE_VERSION
499 # -------------------------------
500 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
501 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
502 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
503 [AM_AUTOMAKE_VERSION([1.13.4])dnl
504 m4_ifndef([AC_AUTOCONF_VERSION],
505   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
506 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
507
508 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
509
510 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
511 #
512 # This file is free software; the Free Software Foundation
513 # gives unlimited permission to copy and/or distribute it,
514 # with or without modifications, as long as this notice is preserved.
515
516 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
517 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
518 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
519 #
520 # Of course, Automake must honor this variable whenever it calls a
521 # tool from the auxiliary directory.  The problem is that $srcdir (and
522 # therefore $ac_aux_dir as well) can be either absolute or relative,
523 # depending on how configure is run.  This is pretty annoying, since
524 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
525 # source directory, any form will work fine, but in subdirectories a
526 # relative path needs to be adjusted first.
527 #
528 # $ac_aux_dir/missing
529 #    fails when called from a subdirectory if $ac_aux_dir is relative
530 # $top_srcdir/$ac_aux_dir/missing
531 #    fails if $ac_aux_dir is absolute,
532 #    fails when called from a subdirectory in a VPATH build with
533 #          a relative $ac_aux_dir
534 #
535 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
536 # are both prefixed by $srcdir.  In an in-source build this is usually
537 # harmless because $srcdir is '.', but things will broke when you
538 # start a VPATH build or use an absolute $srcdir.
539 #
540 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
541 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
542 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
543 # and then we would define $MISSING as
544 #   MISSING="\${SHELL} $am_aux_dir/missing"
545 # This will work as long as MISSING is not called from configure, because
546 # unfortunately $(top_srcdir) has no meaning in configure.
547 # However there are other variables, like CC, which are often used in
548 # configure, and could therefore not use this "fixed" $ac_aux_dir.
549 #
550 # Another solution, used here, is to always expand $ac_aux_dir to an
551 # absolute PATH.  The drawback is that using absolute paths prevent a
552 # configured tree to be moved without reconfiguration.
553
554 AC_DEFUN([AM_AUX_DIR_EXPAND],
555 [dnl Rely on autoconf to set up CDPATH properly.
556 AC_PREREQ([2.50])dnl
557 # expand $ac_aux_dir to an absolute path
558 am_aux_dir=`cd $ac_aux_dir && pwd`
559 ])
560
561 # AM_CONDITIONAL                                            -*- Autoconf -*-
562
563 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
564 #
565 # This file is free software; the Free Software Foundation
566 # gives unlimited permission to copy and/or distribute it,
567 # with or without modifications, as long as this notice is preserved.
568
569 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
570 # -------------------------------------
571 # Define a conditional.
572 AC_DEFUN([AM_CONDITIONAL],
573 [AC_PREREQ([2.52])dnl
574  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
575        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
576 AC_SUBST([$1_TRUE])dnl
577 AC_SUBST([$1_FALSE])dnl
578 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
579 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
580 m4_define([_AM_COND_VALUE_$1], [$2])dnl
581 if $2; then
582   $1_TRUE=
583   $1_FALSE='#'
584 else
585   $1_TRUE='#'
586   $1_FALSE=
587 fi
588 AC_CONFIG_COMMANDS_PRE(
589 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
590   AC_MSG_ERROR([[conditional "$1" was never defined.
591 Usually this means the macro was only invoked conditionally.]])
592 fi])])
593
594 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
595 #
596 # This file is free software; the Free Software Foundation
597 # gives unlimited permission to copy and/or distribute it,
598 # with or without modifications, as long as this notice is preserved.
599
600
601 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
602 # written in clear, in which case automake, when reading aclocal.m4,
603 # will think it sees a *use*, and therefore will trigger all it's
604 # C support machinery.  Also note that it means that autoscan, seeing
605 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
606
607
608 # _AM_DEPENDENCIES(NAME)
609 # ----------------------
610 # See how the compiler implements dependency checking.
611 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
612 # We try a few techniques and use that to set a single cache variable.
613 #
614 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
615 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
616 # dependency, and given that the user is not expected to run this macro,
617 # just rely on AC_PROG_CC.
618 AC_DEFUN([_AM_DEPENDENCIES],
619 [AC_REQUIRE([AM_SET_DEPDIR])dnl
620 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
621 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
622 AC_REQUIRE([AM_DEP_TRACK])dnl
623
624 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
625       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
626       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
627       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
628       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
629       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
630                     [depcc="$$1"   am_compiler_list=])
631
632 AC_CACHE_CHECK([dependency style of $depcc],
633                [am_cv_$1_dependencies_compiler_type],
634 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
635   # We make a subdir and do the tests there.  Otherwise we can end up
636   # making bogus files that we don't know about and never remove.  For
637   # instance it was reported that on HP-UX the gcc test will end up
638   # making a dummy file named 'D' -- because '-MD' means "put the output
639   # in D".
640   rm -rf conftest.dir
641   mkdir conftest.dir
642   # Copy depcomp to subdir because otherwise we won't find it if we're
643   # using a relative directory.
644   cp "$am_depcomp" conftest.dir
645   cd conftest.dir
646   # We will build objects and dependencies in a subdirectory because
647   # it helps to detect inapplicable dependency modes.  For instance
648   # both Tru64's cc and ICC support -MD to output dependencies as a
649   # side effect of compilation, but ICC will put the dependencies in
650   # the current directory while Tru64 will put them in the object
651   # directory.
652   mkdir sub
653
654   am_cv_$1_dependencies_compiler_type=none
655   if test "$am_compiler_list" = ""; then
656      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
657   fi
658   am__universal=false
659   m4_case([$1], [CC],
660     [case " $depcc " in #(
661      *\ -arch\ *\ -arch\ *) am__universal=true ;;
662      esac],
663     [CXX],
664     [case " $depcc " in #(
665      *\ -arch\ *\ -arch\ *) am__universal=true ;;
666      esac])
667
668   for depmode in $am_compiler_list; do
669     # Setup a source with many dependencies, because some compilers
670     # like to wrap large dependency lists on column 80 (with \), and
671     # we should not choose a depcomp mode which is confused by this.
672     #
673     # We need to recreate these files for each test, as the compiler may
674     # overwrite some of them when testing with obscure command lines.
675     # This happens at least with the AIX C compiler.
676     : > sub/conftest.c
677     for i in 1 2 3 4 5 6; do
678       echo '#include "conftst'$i'.h"' >> sub/conftest.c
679       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
680       # Solaris 10 /bin/sh.
681       echo '/* dummy */' > sub/conftst$i.h
682     done
683     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
684
685     # We check with '-c' and '-o' for the sake of the "dashmstdout"
686     # mode.  It turns out that the SunPro C++ compiler does not properly
687     # handle '-M -o', and we need to detect this.  Also, some Intel
688     # versions had trouble with output in subdirs.
689     am__obj=sub/conftest.${OBJEXT-o}
690     am__minus_obj="-o $am__obj"
691     case $depmode in
692     gcc)
693       # This depmode causes a compiler race in universal mode.
694       test "$am__universal" = false || continue
695       ;;
696     nosideeffect)
697       # After this tag, mechanisms are not by side-effect, so they'll
698       # only be used when explicitly requested.
699       if test "x$enable_dependency_tracking" = xyes; then
700         continue
701       else
702         break
703       fi
704       ;;
705     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
706       # This compiler won't grok '-c -o', but also, the minuso test has
707       # not run yet.  These depmodes are late enough in the game, and
708       # so weak that their functioning should not be impacted.
709       am__obj=conftest.${OBJEXT-o}
710       am__minus_obj=
711       ;;
712     none) break ;;
713     esac
714     if depmode=$depmode \
715        source=sub/conftest.c object=$am__obj \
716        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
717        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
718          >/dev/null 2>conftest.err &&
719        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
720        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
721        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
722        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
723       # icc doesn't choke on unknown options, it will just issue warnings
724       # or remarks (even with -Werror).  So we grep stderr for any message
725       # that says an option was ignored or not supported.
726       # When given -MP, icc 7.0 and 7.1 complain thusly:
727       #   icc: Command line warning: ignoring option '-M'; no argument required
728       # The diagnosis changed in icc 8.0:
729       #   icc: Command line remark: option '-MP' not supported
730       if (grep 'ignoring option' conftest.err ||
731           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
732         am_cv_$1_dependencies_compiler_type=$depmode
733         break
734       fi
735     fi
736   done
737
738   cd ..
739   rm -rf conftest.dir
740 else
741   am_cv_$1_dependencies_compiler_type=none
742 fi
743 ])
744 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
745 AM_CONDITIONAL([am__fastdep$1], [
746   test "x$enable_dependency_tracking" != xno \
747   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
748 ])
749
750
751 # AM_SET_DEPDIR
752 # -------------
753 # Choose a directory name for dependency files.
754 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
755 AC_DEFUN([AM_SET_DEPDIR],
756 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
757 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
758 ])
759
760
761 # AM_DEP_TRACK
762 # ------------
763 AC_DEFUN([AM_DEP_TRACK],
764 [AC_ARG_ENABLE([dependency-tracking], [dnl
765 AS_HELP_STRING(
766   [--enable-dependency-tracking],
767   [do not reject slow dependency extractors])
768 AS_HELP_STRING(
769   [--disable-dependency-tracking],
770   [speeds up one-time build])])
771 if test "x$enable_dependency_tracking" != xno; then
772   am_depcomp="$ac_aux_dir/depcomp"
773   AMDEPBACKSLASH='\'
774   am__nodep='_no'
775 fi
776 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
777 AC_SUBST([AMDEPBACKSLASH])dnl
778 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
779 AC_SUBST([am__nodep])dnl
780 _AM_SUBST_NOTMAKE([am__nodep])dnl
781 ])
782
783 # Generate code to set up dependency tracking.              -*- Autoconf -*-
784
785 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
786 #
787 # This file is free software; the Free Software Foundation
788 # gives unlimited permission to copy and/or distribute it,
789 # with or without modifications, as long as this notice is preserved.
790
791
792 # _AM_OUTPUT_DEPENDENCY_COMMANDS
793 # ------------------------------
794 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
795 [{
796   # Older Autoconf quotes --file arguments for eval, but not when files
797   # are listed without --file.  Let's play safe and only enable the eval
798   # if we detect the quoting.
799   case $CONFIG_FILES in
800   *\'*) eval set x "$CONFIG_FILES" ;;
801   *)   set x $CONFIG_FILES ;;
802   esac
803   shift
804   for mf
805   do
806     # Strip MF so we end up with the name of the file.
807     mf=`echo "$mf" | sed -e 's/:.*$//'`
808     # Check whether this is an Automake generated Makefile or not.
809     # We used to match only the files named 'Makefile.in', but
810     # some people rename them; so instead we look at the file content.
811     # Grep'ing the first line is not enough: some people post-process
812     # each Makefile.in and add a new line on top of each file to say so.
813     # Grep'ing the whole file is not good either: AIX grep has a line
814     # limit of 2048, but all sed's we know have understand at least 4000.
815     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
816       dirpart=`AS_DIRNAME("$mf")`
817     else
818       continue
819     fi
820     # Extract the definition of DEPDIR, am__include, and am__quote
821     # from the Makefile without running 'make'.
822     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
823     test -z "$DEPDIR" && continue
824     am__include=`sed -n 's/^am__include = //p' < "$mf"`
825     test -z "$am__include" && continue
826     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
827     # Find all dependency output files, they are included files with
828     # $(DEPDIR) in their names.  We invoke sed twice because it is the
829     # simplest approach to changing $(DEPDIR) to its actual value in the
830     # expansion.
831     for file in `sed -n "
832       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
833          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
834       # Make sure the directory exists.
835       test -f "$dirpart/$file" && continue
836       fdir=`AS_DIRNAME(["$file"])`
837       AS_MKDIR_P([$dirpart/$fdir])
838       # echo "creating $dirpart/$file"
839       echo '# dummy' > "$dirpart/$file"
840     done
841   done
842 }
843 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
844
845
846 # AM_OUTPUT_DEPENDENCY_COMMANDS
847 # -----------------------------
848 # This macro should only be invoked once -- use via AC_REQUIRE.
849 #
850 # This code is only required when automatic dependency tracking
851 # is enabled.  FIXME.  This creates each '.P' file that we will
852 # need in order to bootstrap the dependency handling code.
853 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
854 [AC_CONFIG_COMMANDS([depfiles],
855      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
856      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
857 ])
858
859 # Do all the work for Automake.                             -*- Autoconf -*-
860
861 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
862 #
863 # This file is free software; the Free Software Foundation
864 # gives unlimited permission to copy and/or distribute it,
865 # with or without modifications, as long as this notice is preserved.
866
867 # This macro actually does too much.  Some checks are only needed if
868 # your package does certain things.  But this isn't really a big deal.
869
870 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
871 # AM_INIT_AUTOMAKE([OPTIONS])
872 # -----------------------------------------------
873 # The call with PACKAGE and VERSION arguments is the old style
874 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
875 # and VERSION should now be passed to AC_INIT and removed from
876 # the call to AM_INIT_AUTOMAKE.
877 # We support both call styles for the transition.  After
878 # the next Automake release, Autoconf can make the AC_INIT
879 # arguments mandatory, and then we can depend on a new Autoconf
880 # release and drop the old call support.
881 AC_DEFUN([AM_INIT_AUTOMAKE],
882 [AC_PREREQ([2.65])dnl
883 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
884 dnl the ones we care about.
885 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
886 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
887 AC_REQUIRE([AC_PROG_INSTALL])dnl
888 if test "`cd $srcdir && pwd`" != "`pwd`"; then
889   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
890   # is not polluted with repeated "-I."
891   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
892   # test to see if srcdir already configured
893   if test -f $srcdir/config.status; then
894     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
895   fi
896 fi
897
898 # test whether we have cygpath
899 if test -z "$CYGPATH_W"; then
900   if (cygpath --version) >/dev/null 2>/dev/null; then
901     CYGPATH_W='cygpath -w'
902   else
903     CYGPATH_W=echo
904   fi
905 fi
906 AC_SUBST([CYGPATH_W])
907
908 # Define the identity of the package.
909 dnl Distinguish between old-style and new-style calls.
910 m4_ifval([$2],
911 [AC_DIAGNOSE([obsolete],
912              [$0: two- and three-arguments forms are deprecated.])
913 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
914  AC_SUBST([PACKAGE], [$1])dnl
915  AC_SUBST([VERSION], [$2])],
916 [_AM_SET_OPTIONS([$1])dnl
917 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
918 m4_if(
919   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
920   [ok:ok],,
921   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
922  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
923  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
924
925 _AM_IF_OPTION([no-define],,
926 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
927  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
928
929 # Some tools Automake needs.
930 AC_REQUIRE([AM_SANITY_CHECK])dnl
931 AC_REQUIRE([AC_ARG_PROGRAM])dnl
932 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
933 AM_MISSING_PROG([AUTOCONF], [autoconf])
934 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
935 AM_MISSING_PROG([AUTOHEADER], [autoheader])
936 AM_MISSING_PROG([MAKEINFO], [makeinfo])
937 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
938 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
939 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
940 # For better backward compatibility.  To be removed once Automake 1.9.x
941 # dies out for good.  For more background, see:
942 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
943 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
944 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
945 # We need awk for the "check" target.  The system "awk" is bad on
946 # some platforms.
947 AC_REQUIRE([AC_PROG_AWK])dnl
948 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
949 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
950 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
951               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
952                              [_AM_PROG_TAR([v7])])])
953 _AM_IF_OPTION([no-dependencies],,
954 [AC_PROVIDE_IFELSE([AC_PROG_CC],
955                   [_AM_DEPENDENCIES([CC])],
956                   [m4_define([AC_PROG_CC],
957                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
958 AC_PROVIDE_IFELSE([AC_PROG_CXX],
959                   [_AM_DEPENDENCIES([CXX])],
960                   [m4_define([AC_PROG_CXX],
961                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
962 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
963                   [_AM_DEPENDENCIES([OBJC])],
964                   [m4_define([AC_PROG_OBJC],
965                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
966 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
967                   [_AM_DEPENDENCIES([OBJCXX])],
968                   [m4_define([AC_PROG_OBJCXX],
969                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
970 ])
971 AC_REQUIRE([AM_SILENT_RULES])dnl
972 dnl The testsuite driver may need to know about EXEEXT, so add the
973 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
974 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
975 AC_CONFIG_COMMANDS_PRE(dnl
976 [m4_provide_if([_AM_COMPILER_EXEEXT],
977   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
978 ])
979
980 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
981 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
982 dnl mangled by Autoconf and run in a shell conditional statement.
983 m4_define([_AC_COMPILER_EXEEXT],
984 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
985
986
987 # When config.status generates a header, we must update the stamp-h file.
988 # This file resides in the same directory as the config header
989 # that is generated.  The stamp files are numbered to have different names.
990
991 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
992 # loop where config.status creates the headers, so we can generate
993 # our stamp files there.
994 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
995 [# Compute $1's index in $config_headers.
996 _am_arg=$1
997 _am_stamp_count=1
998 for _am_header in $config_headers :; do
999   case $_am_header in
1000     $_am_arg | $_am_arg:* )
1001       break ;;
1002     * )
1003       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1004   esac
1005 done
1006 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1007
1008 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1009 #
1010 # This file is free software; the Free Software Foundation
1011 # gives unlimited permission to copy and/or distribute it,
1012 # with or without modifications, as long as this notice is preserved.
1013
1014 # AM_PROG_INSTALL_SH
1015 # ------------------
1016 # Define $install_sh.
1017 AC_DEFUN([AM_PROG_INSTALL_SH],
1018 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1019 if test x"${install_sh}" != xset; then
1020   case $am_aux_dir in
1021   *\ * | *\     *)
1022     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1023   *)
1024     install_sh="\${SHELL} $am_aux_dir/install-sh"
1025   esac
1026 fi
1027 AC_SUBST([install_sh])])
1028
1029 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
1030 #
1031 # This file is free software; the Free Software Foundation
1032 # gives unlimited permission to copy and/or distribute it,
1033 # with or without modifications, as long as this notice is preserved.
1034
1035 # Check whether the underlying file-system supports filenames
1036 # with a leading dot.  For instance MS-DOS doesn't.
1037 AC_DEFUN([AM_SET_LEADING_DOT],
1038 [rm -rf .tst 2>/dev/null
1039 mkdir .tst 2>/dev/null
1040 if test -d .tst; then
1041   am__leading_dot=.
1042 else
1043   am__leading_dot=_
1044 fi
1045 rmdir .tst 2>/dev/null
1046 AC_SUBST([am__leading_dot])])
1047
1048 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1049
1050 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1051 #
1052 # This file is free software; the Free Software Foundation
1053 # gives unlimited permission to copy and/or distribute it,
1054 # with or without modifications, as long as this notice is preserved.
1055
1056 # AM_MAKE_INCLUDE()
1057 # -----------------
1058 # Check to see how make treats includes.
1059 AC_DEFUN([AM_MAKE_INCLUDE],
1060 [am_make=${MAKE-make}
1061 cat > confinc << 'END'
1062 am__doit:
1063         @echo this is the am__doit target
1064 .PHONY: am__doit
1065 END
1066 # If we don't find an include directive, just comment out the code.
1067 AC_MSG_CHECKING([for style of include used by $am_make])
1068 am__include="#"
1069 am__quote=
1070 _am_result=none
1071 # First try GNU make style include.
1072 echo "include confinc" > confmf
1073 # Ignore all kinds of additional output from 'make'.
1074 case `$am_make -s -f confmf 2> /dev/null` in #(
1075 *the\ am__doit\ target*)
1076   am__include=include
1077   am__quote=
1078   _am_result=GNU
1079   ;;
1080 esac
1081 # Now try BSD make style include.
1082 if test "$am__include" = "#"; then
1083    echo '.include "confinc"' > confmf
1084    case `$am_make -s -f confmf 2> /dev/null` in #(
1085    *the\ am__doit\ target*)
1086      am__include=.include
1087      am__quote="\""
1088      _am_result=BSD
1089      ;;
1090    esac
1091 fi
1092 AC_SUBST([am__include])
1093 AC_SUBST([am__quote])
1094 AC_MSG_RESULT([$_am_result])
1095 rm -f confinc confmf
1096 ])
1097
1098 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1099 #
1100 # This file is free software; the Free Software Foundation
1101 # gives unlimited permission to copy and/or distribute it,
1102 # with or without modifications, as long as this notice is preserved.
1103
1104 # AM_PROG_CC_C_O
1105 # --------------
1106 # Like AC_PROG_CC_C_O, but changed for automake.
1107 AC_DEFUN([AM_PROG_CC_C_O],
1108 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1109 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1110 AC_REQUIRE_AUX_FILE([compile])dnl
1111 # FIXME: we rely on the cache variable name because
1112 # there is no other way.
1113 set dummy $CC
1114 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1115 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1116 if test "$am_t" != yes; then
1117    # Losing compiler, so override with the script.
1118    # FIXME: It is wrong to rewrite CC.
1119    # But if we don't then we get into trouble of one sort or another.
1120    # A longer-term fix would be to have automake use am__CC in this case,
1121    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1122    CC="$am_aux_dir/compile $CC"
1123 fi
1124 dnl Make sure AC_PROG_CC is never called again, or it will override our
1125 dnl setting of CC.
1126 m4_define([AC_PROG_CC],
1127           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1128 ])
1129
1130 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1131
1132 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1133 #
1134 # This file is free software; the Free Software Foundation
1135 # gives unlimited permission to copy and/or distribute it,
1136 # with or without modifications, as long as this notice is preserved.
1137
1138 # AM_MISSING_PROG(NAME, PROGRAM)
1139 # ------------------------------
1140 AC_DEFUN([AM_MISSING_PROG],
1141 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1142 $1=${$1-"${am_missing_run}$2"}
1143 AC_SUBST($1)])
1144
1145 # AM_MISSING_HAS_RUN
1146 # ------------------
1147 # Define MISSING if not defined so far and test if it is modern enough.
1148 # If it is, set am_missing_run to use it, otherwise, to nothing.
1149 AC_DEFUN([AM_MISSING_HAS_RUN],
1150 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1151 AC_REQUIRE_AUX_FILE([missing])dnl
1152 if test x"${MISSING+set}" != xset; then
1153   case $am_aux_dir in
1154   *\ * | *\     *)
1155     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1156   *)
1157     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1158   esac
1159 fi
1160 # Use eval to expand $SHELL
1161 if eval "$MISSING --is-lightweight"; then
1162   am_missing_run="$MISSING "
1163 else
1164   am_missing_run=
1165   AC_MSG_WARN(['missing' script is too old or missing])
1166 fi
1167 ])
1168
1169 #  -*- Autoconf -*-
1170 # Obsolete and "removed" macros, that must however still report explicit
1171 # error messages when used, to smooth transition.
1172 #
1173 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1174 #
1175 # This file is free software; the Free Software Foundation
1176 # gives unlimited permission to copy and/or distribute it,
1177 # with or without modifications, as long as this notice is preserved.
1178
1179 AC_DEFUN([AM_CONFIG_HEADER],
1180 [AC_DIAGNOSE([obsolete],
1181 ['$0': this macro is obsolete.
1182 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
1183 AC_CONFIG_HEADERS($@)])
1184
1185 AC_DEFUN([AM_PROG_CC_STDC],
1186 [AC_PROG_CC
1187 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
1188 AC_DIAGNOSE([obsolete],
1189 ['$0': this macro is obsolete.
1190 You should simply use the 'AC][_PROG_CC' macro instead.
1191 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
1192 but upon 'ac_cv_prog_cc_stdc'.])])
1193
1194 AC_DEFUN([AM_C_PROTOTYPES],
1195          [AC_FATAL([automatic de-ANSI-fication support has been removed])])
1196 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
1197
1198 # Helper functions for option handling.                     -*- Autoconf -*-
1199
1200 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1201 #
1202 # This file is free software; the Free Software Foundation
1203 # gives unlimited permission to copy and/or distribute it,
1204 # with or without modifications, as long as this notice is preserved.
1205
1206 # _AM_MANGLE_OPTION(NAME)
1207 # -----------------------
1208 AC_DEFUN([_AM_MANGLE_OPTION],
1209 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1210
1211 # _AM_SET_OPTION(NAME)
1212 # --------------------
1213 # Set option NAME.  Presently that only means defining a flag for this option.
1214 AC_DEFUN([_AM_SET_OPTION],
1215 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1216
1217 # _AM_SET_OPTIONS(OPTIONS)
1218 # ------------------------
1219 # OPTIONS is a space-separated list of Automake options.
1220 AC_DEFUN([_AM_SET_OPTIONS],
1221 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1222
1223 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1224 # -------------------------------------------
1225 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1226 AC_DEFUN([_AM_IF_OPTION],
1227 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1228
1229 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1230
1231 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1232 #
1233 # This file is free software; the Free Software Foundation
1234 # gives unlimited permission to copy and/or distribute it,
1235 # with or without modifications, as long as this notice is preserved.
1236
1237 # AM_SANITY_CHECK
1238 # ---------------
1239 AC_DEFUN([AM_SANITY_CHECK],
1240 [AC_MSG_CHECKING([whether build environment is sane])
1241 # Reject unsafe characters in $srcdir or the absolute working directory
1242 # name.  Accept space and tab only in the latter.
1243 am_lf='
1244 '
1245 case `pwd` in
1246   *[[\\\"\#\$\&\'\`$am_lf]]*)
1247     AC_MSG_ERROR([unsafe absolute working directory name]);;
1248 esac
1249 case $srcdir in
1250   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1251     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1252 esac
1253
1254 # Do 'set' in a subshell so we don't clobber the current shell's
1255 # arguments.  Must try -L first in case configure is actually a
1256 # symlink; some systems play weird games with the mod time of symlinks
1257 # (eg FreeBSD returns the mod time of the symlink's containing
1258 # directory).
1259 if (
1260    am_has_slept=no
1261    for am_try in 1 2; do
1262      echo "timestamp, slept: $am_has_slept" > conftest.file
1263      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1264      if test "$[*]" = "X"; then
1265         # -L didn't work.
1266         set X `ls -t "$srcdir/configure" conftest.file`
1267      fi
1268      if test "$[*]" != "X $srcdir/configure conftest.file" \
1269         && test "$[*]" != "X conftest.file $srcdir/configure"; then
1270
1271         # If neither matched, then we have a broken ls.  This can happen
1272         # if, for instance, CONFIG_SHELL is bash and it inherits a
1273         # broken ls alias from the environment.  This has actually
1274         # happened.  Such a system could not be considered "sane".
1275         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1276   alias in your environment])
1277      fi
1278      if test "$[2]" = conftest.file || test $am_try -eq 2; then
1279        break
1280      fi
1281      # Just in case.
1282      sleep 1
1283      am_has_slept=yes
1284    done
1285    test "$[2]" = conftest.file
1286    )
1287 then
1288    # Ok.
1289    :
1290 else
1291    AC_MSG_ERROR([newly created file is older than distributed files!
1292 Check your system clock])
1293 fi
1294 AC_MSG_RESULT([yes])
1295 # If we didn't sleep, we still need to ensure time stamps of config.status and
1296 # generated files are strictly newer.
1297 am_sleep_pid=
1298 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1299   ( sleep 1 ) &
1300   am_sleep_pid=$!
1301 fi
1302 AC_CONFIG_COMMANDS_PRE(
1303   [AC_MSG_CHECKING([that generated files are newer than configure])
1304    if test -n "$am_sleep_pid"; then
1305      # Hide warnings about reused PIDs.
1306      wait $am_sleep_pid 2>/dev/null
1307    fi
1308    AC_MSG_RESULT([done])])
1309 rm -f conftest.file
1310 ])
1311
1312 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
1313 #
1314 # This file is free software; the Free Software Foundation
1315 # gives unlimited permission to copy and/or distribute it,
1316 # with or without modifications, as long as this notice is preserved.
1317
1318 # AM_SILENT_RULES([DEFAULT])
1319 # --------------------------
1320 # Enable less verbose build rules; with the default set to DEFAULT
1321 # ("yes" being less verbose, "no" or empty being verbose).
1322 AC_DEFUN([AM_SILENT_RULES],
1323 [AC_ARG_ENABLE([silent-rules], [dnl
1324 AS_HELP_STRING(
1325   [--enable-silent-rules],
1326   [less verbose build output (undo: "make V=1")])
1327 AS_HELP_STRING(
1328   [--disable-silent-rules],
1329   [verbose build output (undo: "make V=0")])dnl
1330 ])
1331 case $enable_silent_rules in @%:@ (((
1332   yes) AM_DEFAULT_VERBOSITY=0;;
1333    no) AM_DEFAULT_VERBOSITY=1;;
1334     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1335 esac
1336 dnl
1337 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1338 dnl do not support nested variable expansions.
1339 dnl See automake bug#9928 and bug#10237.
1340 am_make=${MAKE-make}
1341 AC_CACHE_CHECK([whether $am_make supports nested variables],
1342    [am_cv_make_support_nested_variables],
1343    [if AS_ECHO([['TRUE=$(BAR$(V))
1344 BAR0=false
1345 BAR1=true
1346 V=1
1347 am__doit:
1348         @$(TRUE)
1349 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1350   am_cv_make_support_nested_variables=yes
1351 else
1352   am_cv_make_support_nested_variables=no
1353 fi])
1354 if test $am_cv_make_support_nested_variables = yes; then
1355   dnl Using '$V' instead of '$(V)' breaks IRIX make.
1356   AM_V='$(V)'
1357   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1358 else
1359   AM_V=$AM_DEFAULT_VERBOSITY
1360   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1361 fi
1362 AC_SUBST([AM_V])dnl
1363 AM_SUBST_NOTMAKE([AM_V])dnl
1364 AC_SUBST([AM_DEFAULT_V])dnl
1365 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1366 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1367 AM_BACKSLASH='\'
1368 AC_SUBST([AM_BACKSLASH])dnl
1369 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1370 ])
1371
1372 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1373 #
1374 # This file is free software; the Free Software Foundation
1375 # gives unlimited permission to copy and/or distribute it,
1376 # with or without modifications, as long as this notice is preserved.
1377
1378 # AM_PROG_INSTALL_STRIP
1379 # ---------------------
1380 # One issue with vendor 'install' (even GNU) is that you can't
1381 # specify the program used to strip binaries.  This is especially
1382 # annoying in cross-compiling environments, where the build's strip
1383 # is unlikely to handle the host's binaries.
1384 # Fortunately install-sh will honor a STRIPPROG variable, so we
1385 # always use install-sh in "make install-strip", and initialize
1386 # STRIPPROG with the value of the STRIP variable (set by the user).
1387 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1388 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1389 # Installed binaries are usually stripped using 'strip' when the user
1390 # run "make install-strip".  However 'strip' might not be the right
1391 # tool to use in cross-compilation environments, therefore Automake
1392 # will honor the 'STRIP' environment variable to overrule this program.
1393 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1394 if test "$cross_compiling" != no; then
1395   AC_CHECK_TOOL([STRIP], [strip], :)
1396 fi
1397 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1398 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1399
1400 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1401 #
1402 # This file is free software; the Free Software Foundation
1403 # gives unlimited permission to copy and/or distribute it,
1404 # with or without modifications, as long as this notice is preserved.
1405
1406 # _AM_SUBST_NOTMAKE(VARIABLE)
1407 # ---------------------------
1408 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1409 # This macro is traced by Automake.
1410 AC_DEFUN([_AM_SUBST_NOTMAKE])
1411
1412 # AM_SUBST_NOTMAKE(VARIABLE)
1413 # --------------------------
1414 # Public sister of _AM_SUBST_NOTMAKE.
1415 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1416
1417 # Check how to create a tarball.                            -*- Autoconf -*-
1418
1419 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1420 #
1421 # This file is free software; the Free Software Foundation
1422 # gives unlimited permission to copy and/or distribute it,
1423 # with or without modifications, as long as this notice is preserved.
1424
1425 # _AM_PROG_TAR(FORMAT)
1426 # --------------------
1427 # Check how to create a tarball in format FORMAT.
1428 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1429 #
1430 # Substitute a variable $(am__tar) that is a command
1431 # writing to stdout a FORMAT-tarball containing the directory
1432 # $tardir.
1433 #     tardir=directory && $(am__tar) > result.tar
1434 #
1435 # Substitute a variable $(am__untar) that extract such
1436 # a tarball read from stdin.
1437 #     $(am__untar) < result.tar
1438 #
1439 AC_DEFUN([_AM_PROG_TAR],
1440 [# Always define AMTAR for backward compatibility.  Yes, it's still used
1441 # in the wild :-(  We should find a proper way to deprecate it ...
1442 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1443
1444 # We'll loop over all known methods to create a tar archive until one works.
1445 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1446
1447 m4_if([$1], [v7],
1448   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1449
1450   [m4_case([$1],
1451     [ustar],
1452      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1453       # There is notably a 21 bits limit for the UID and the GID.  In fact,
1454       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1455       # and bug#13588).
1456       am_max_uid=2097151 # 2^21 - 1
1457       am_max_gid=$am_max_uid
1458       # The $UID and $GID variables are not portable, so we need to resort
1459       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1460       # below are definitely unexpected, so allow the users to see them
1461       # (that is, avoid stderr redirection).
1462       am_uid=`id -u || echo unknown`
1463       am_gid=`id -g || echo unknown`
1464       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1465       if test $am_uid -le $am_max_uid; then
1466          AC_MSG_RESULT([yes])
1467       else
1468          AC_MSG_RESULT([no])
1469          _am_tools=none
1470       fi
1471       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1472       if test $am_gid -le $am_max_gid; then
1473          AC_MSG_RESULT([yes])
1474       else
1475         AC_MSG_RESULT([no])
1476         _am_tools=none
1477       fi],
1478
1479   [pax],
1480     [],
1481
1482   [m4_fatal([Unknown tar format])])
1483
1484   AC_MSG_CHECKING([how to create a $1 tar archive])
1485
1486   # Go ahead even if we have the value already cached.  We do so because we
1487   # need to set the values for the 'am__tar' and 'am__untar' variables.
1488   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1489
1490   for _am_tool in $_am_tools; do
1491     case $_am_tool in
1492     gnutar)
1493       for _am_tar in tar gnutar gtar; do
1494         AM_RUN_LOG([$_am_tar --version]) && break
1495       done
1496       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1497       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1498       am__untar="$_am_tar -xf -"
1499       ;;
1500     plaintar)
1501       # Must skip GNU tar: if it does not support --format= it doesn't create
1502       # ustar tarball either.
1503       (tar --version) >/dev/null 2>&1 && continue
1504       am__tar='tar chf - "$$tardir"'
1505       am__tar_='tar chf - "$tardir"'
1506       am__untar='tar xf -'
1507       ;;
1508     pax)
1509       am__tar='pax -L -x $1 -w "$$tardir"'
1510       am__tar_='pax -L -x $1 -w "$tardir"'
1511       am__untar='pax -r'
1512       ;;
1513     cpio)
1514       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1515       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1516       am__untar='cpio -i -H $1 -d'
1517       ;;
1518     none)
1519       am__tar=false
1520       am__tar_=false
1521       am__untar=false
1522       ;;
1523     esac
1524
1525     # If the value was cached, stop now.  We just wanted to have am__tar
1526     # and am__untar set.
1527     test -n "${am_cv_prog_tar_$1}" && break
1528
1529     # tar/untar a dummy directory, and stop if the command works.
1530     rm -rf conftest.dir
1531     mkdir conftest.dir
1532     echo GrepMe > conftest.dir/file
1533     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1534     rm -rf conftest.dir
1535     if test -s conftest.tar; then
1536       AM_RUN_LOG([$am__untar <conftest.tar])
1537       AM_RUN_LOG([cat conftest.dir/file])
1538       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1539     fi
1540   done
1541   rm -rf conftest.dir
1542
1543   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1544   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1545
1546 AC_SUBST([am__tar])
1547 AC_SUBST([am__untar])
1548 ]) # _AM_PROG_TAR
1549
1550 m4_include([gnulib-m4/00gnulib.m4])
1551 m4_include([gnulib-m4/absolute-header.m4])
1552 m4_include([gnulib-m4/alloca.m4])
1553 m4_include([gnulib-m4/btowc.m4])
1554 m4_include([gnulib-m4/codeset.m4])
1555 m4_include([gnulib-m4/configmake.m4])
1556 m4_include([gnulib-m4/eealloc.m4])
1557 m4_include([gnulib-m4/environ.m4])
1558 m4_include([gnulib-m4/errno_h.m4])
1559 m4_include([gnulib-m4/error.m4])
1560 m4_include([gnulib-m4/exponentd.m4])
1561 m4_include([gnulib-m4/exponentf.m4])
1562 m4_include([gnulib-m4/exponentl.m4])
1563 m4_include([gnulib-m4/extensions.m4])
1564 m4_include([gnulib-m4/extern-inline.m4])
1565 m4_include([gnulib-m4/fcntl-o.m4])
1566 m4_include([gnulib-m4/fdopen.m4])
1567 m4_include([gnulib-m4/float_h.m4])
1568 m4_include([gnulib-m4/fpieee.m4])
1569 m4_include([gnulib-m4/frexp.m4])
1570 m4_include([gnulib-m4/frexpl.m4])
1571 m4_include([gnulib-m4/fseterr.m4])
1572 m4_include([gnulib-m4/getpagesize.m4])
1573 m4_include([gnulib-m4/glibc21.m4])
1574 m4_include([gnulib-m4/gnulib-common.m4])
1575 m4_include([gnulib-m4/gnulib-comp.m4])
1576 m4_include([gnulib-m4/iconv.m4])
1577 m4_include([gnulib-m4/iconv_h.m4])
1578 m4_include([gnulib-m4/iconv_open.m4])
1579 m4_include([gnulib-m4/include_next.m4])
1580 m4_include([gnulib-m4/inline.m4])
1581 m4_include([gnulib-m4/intlmacosx.m4])
1582 m4_include([gnulib-m4/intmax_t.m4])
1583 m4_include([gnulib-m4/inttypes-pri.m4])
1584 m4_include([gnulib-m4/inttypes.m4])
1585 m4_include([gnulib-m4/inttypes_h.m4])
1586 m4_include([gnulib-m4/isnand.m4])
1587 m4_include([gnulib-m4/isnanf.m4])
1588 m4_include([gnulib-m4/isnanl.m4])
1589 m4_include([gnulib-m4/iswblank.m4])
1590 m4_include([gnulib-m4/lcmessage.m4])
1591 m4_include([gnulib-m4/ldexpl.m4])
1592 m4_include([gnulib-m4/lib-ld.m4])
1593 m4_include([gnulib-m4/lib-link.m4])
1594 m4_include([gnulib-m4/lib-prefix.m4])
1595 m4_include([gnulib-m4/libunistring-base.m4])
1596 m4_include([gnulib-m4/localcharset.m4])
1597 m4_include([gnulib-m4/locale-ar.m4])
1598 m4_include([gnulib-m4/locale-fr.m4])
1599 m4_include([gnulib-m4/locale-ja.m4])
1600 m4_include([gnulib-m4/locale-tr.m4])
1601 m4_include([gnulib-m4/locale-zh.m4])
1602 m4_include([gnulib-m4/locale_h.m4])
1603 m4_include([gnulib-m4/localename.m4])
1604 m4_include([gnulib-m4/lock.m4])
1605 m4_include([gnulib-m4/longlong.m4])
1606 m4_include([gnulib-m4/malloc.m4])
1607 m4_include([gnulib-m4/malloca.m4])
1608 m4_include([gnulib-m4/math_h.m4])
1609 m4_include([gnulib-m4/mbchar.m4])
1610 m4_include([gnulib-m4/mbiter.m4])
1611 m4_include([gnulib-m4/mbrtowc.m4])
1612 m4_include([gnulib-m4/mbsinit.m4])
1613 m4_include([gnulib-m4/mbstate_t.m4])
1614 m4_include([gnulib-m4/mbtowc.m4])
1615 m4_include([gnulib-m4/memchr.m4])
1616 m4_include([gnulib-m4/minmax.m4])
1617 m4_include([gnulib-m4/mmap-anon.m4])
1618 m4_include([gnulib-m4/msvc-inval.m4])
1619 m4_include([gnulib-m4/msvc-nothrow.m4])
1620 m4_include([gnulib-m4/multiarch.m4])
1621 m4_include([gnulib-m4/nocrash.m4])
1622 m4_include([gnulib-m4/off_t.m4])
1623 m4_include([gnulib-m4/printf-frexp.m4])
1624 m4_include([gnulib-m4/printf-frexpl.m4])
1625 m4_include([gnulib-m4/printf.m4])
1626 m4_include([gnulib-m4/putenv.m4])
1627 m4_include([gnulib-m4/relocatable-lib.m4])
1628 m4_include([gnulib-m4/setenv.m4])
1629 m4_include([gnulib-m4/setlocale.m4])
1630 m4_include([gnulib-m4/signbit.m4])
1631 m4_include([gnulib-m4/size_max.m4])
1632 m4_include([gnulib-m4/ssize_t.m4])
1633 m4_include([gnulib-m4/stdbool.m4])
1634 m4_include([gnulib-m4/stddef_h.m4])
1635 m4_include([gnulib-m4/stdint.m4])
1636 m4_include([gnulib-m4/stdint_h.m4])
1637 m4_include([gnulib-m4/stdio_h.m4])
1638 m4_include([gnulib-m4/stdlib_h.m4])
1639 m4_include([gnulib-m4/strerror.m4])
1640 m4_include([gnulib-m4/string_h.m4])
1641 m4_include([gnulib-m4/strncat.m4])
1642 m4_include([gnulib-m4/strstr.m4])
1643 m4_include([gnulib-m4/sys_socket_h.m4])
1644 m4_include([gnulib-m4/sys_types_h.m4])
1645 m4_include([gnulib-m4/thread.m4])
1646 m4_include([gnulib-m4/threadlib.m4])
1647 m4_include([gnulib-m4/unistd_h.m4])
1648 m4_include([gnulib-m4/vasnprintf.m4])
1649 m4_include([gnulib-m4/warn-on-use.m4])
1650 m4_include([gnulib-m4/wchar_h.m4])
1651 m4_include([gnulib-m4/wchar_t.m4])
1652 m4_include([gnulib-m4/wcrtomb.m4])
1653 m4_include([gnulib-m4/wctob.m4])
1654 m4_include([gnulib-m4/wctomb.m4])
1655 m4_include([gnulib-m4/wctype_h.m4])
1656 m4_include([gnulib-m4/wcwidth.m4])
1657 m4_include([gnulib-m4/wint_t.m4])
1658 m4_include([gnulib-m4/xalloc.m4])
1659 m4_include([gnulib-m4/xsize.m4])
1660 m4_include([gnulib-m4/yield.m4])
1661 m4_include([m4/exported.m4])
1662 m4_include([m4/init-package-version.m4])
1663 m4_include([m4/libtool.m4])
1664 m4_include([m4/ltoptions.m4])
1665 m4_include([m4/ltsugar.m4])
1666 m4_include([m4/ltversion.m4])
1667 m4_include([m4/lt~obsolete.m4])
1668 m4_include([m4/woe32-dll.m4])