1 # generated automatically by aclocal 1.11a -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
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.
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
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64.69-81c80],,
17 [m4_warning([this file was generated for autoconf 2.64.69-81c80.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 # po.m4 serial 15 (gettext-0.17)
23 dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
24 dnl This file is free software; the Free Software Foundation
25 dnl gives unlimited permission to copy and/or distribute it,
26 dnl with or without modifications, as long as this notice is preserved.
28 dnl This file can can be used in projects which are not available under
29 dnl the GNU General Public License or the GNU Library General Public
30 dnl License but which still want to provide support for the GNU gettext
32 dnl Please note that the actual code of the GNU gettext library is covered
33 dnl by the GNU Library General Public License, and the rest of the GNU
34 dnl gettext package package is covered by the GNU General Public License.
35 dnl They are *not* in the public domain.
38 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
43 dnl Checks for all prerequisites of the po subdirectory.
44 AC_DEFUN([AM_PO_SUBDIRS],
46 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
47 AC_REQUIRE([AC_PROG_INSTALL])dnl
48 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
49 AC_REQUIRE([AM_NLS])dnl
51 dnl Release version of the gettext macros. This is used to ensure that
52 dnl the gettext macros and po/Makefile.in.in are in sync.
53 AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
55 dnl Perform the following tests also if --disable-nls has been given,
56 dnl because they are needed for "make dist" to work.
58 dnl Search for GNU msgfmt in the PATH.
59 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
60 dnl The second test excludes FreeBSD msgfmt.
61 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
62 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
63 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
65 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
67 dnl Test whether it is GNU msgfmt >= 0.15.
69 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
70 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
71 *) MSGFMT_015=$MSGFMT ;;
74 AC_SUBST([MSGFMT_015])
76 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
77 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
78 *) GMSGFMT_015=$GMSGFMT ;;
81 AC_SUBST([GMSGFMT_015])
83 dnl Search for GNU xgettext 0.12 or newer in the PATH.
84 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
85 dnl The second test excludes FreeBSD xgettext.
86 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
87 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
88 (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)],
90 dnl Remove leftover from FreeBSD xgettext call.
93 dnl Test whether it is GNU xgettext >= 0.15.
95 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
96 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
97 *) XGETTEXT_015=$XGETTEXT ;;
100 AC_SUBST([XGETTEXT_015])
102 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
103 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
104 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
106 dnl Installation directories.
107 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
108 dnl have to define it here, so that it can be used in po/Makefile.
109 test -n "$localedir" || localedir='${datadir}/locale'
110 AC_SUBST([localedir])
112 dnl Support for AM_XGETTEXT_OPTION.
113 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
114 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
116 AC_CONFIG_COMMANDS([po-directories], [[
117 for ac_file in $CONFIG_FILES; do
118 # Support "outfile[:infile[:infile...]]"
120 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
122 # PO directories have a Makefile.in generated from Makefile.in.in.
123 case "$ac_file" in */Makefile.in)
124 # Adjust a relative srcdir.
125 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
126 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
127 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
128 # In autoconf-2.13 it is called $ac_given_srcdir.
129 # In autoconf-2.50 it is called $srcdir.
130 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
131 case "$ac_given_srcdir" in
132 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
133 /*) top_srcdir="$ac_given_srcdir" ;;
134 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
136 # Treat a directory as a PO directory if and only if it has a
137 # POTFILES.in file. This allows packages to have multiple PO
138 # directories under different names or in different locations.
139 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
140 rm -f "$ac_dir/POTFILES"
141 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
142 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
143 POMAKEFILEDEPS="POTFILES.in"
144 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
145 # on $ac_dir but don't depend on user-specified configuration
147 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
148 # The LINGUAS file contains the set of available languages.
149 if test -n "$OBSOLETE_ALL_LINGUAS"; then
150 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
152 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
153 # Hide the ALL_LINGUAS assigment from automake < 1.5.
154 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
155 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
157 # The set of available languages was given in configure.in.
158 # Hide the ALL_LINGUAS assigment from automake < 1.5.
159 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
162 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
163 # Compute UPDATEPOFILES
164 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
165 # Compute DUMMYPOFILES
166 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
168 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
169 case "$ac_given_srcdir" in
171 *) srcdirpre='$(srcdir)/' ;;
177 for lang in $ALL_LINGUAS; do
178 POFILES="$POFILES $srcdirpre$lang.po"
179 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
180 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
181 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
183 # CATALOGS depends on both $ac_dir and the user's LINGUAS
184 # environment variable.
186 if test -n "$ALL_LINGUAS"; then
187 for presentlang in $ALL_LINGUAS; do
189 if test "%UNSET%" != "$LINGUAS"; then
190 desiredlanguages="$LINGUAS"
192 desiredlanguages="$ALL_LINGUAS"
194 for desiredlang in $desiredlanguages; do
195 # Use the presentlang catalog if desiredlang is
196 # a. equal to presentlang, or
197 # b. a variant of presentlang (because in this case,
198 # presentlang can be used as a fallback for messages
199 # which are not translated in the desiredlang catalog).
200 case "$desiredlang" in
201 "$presentlang"*) useit=yes;;
204 if test $useit = yes; then
205 INST_LINGUAS="$INST_LINGUAS $presentlang"
210 if test -n "$INST_LINGUAS"; then
211 for lang in $INST_LINGUAS; do
212 CATALOGS="$CATALOGS $lang.gmo"
215 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
216 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"
217 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
218 if test -f "$f"; then
220 *.orig | *.bak | *~) ;;
221 *) cat "$f" >> "$ac_dir/Makefile" ;;
229 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
230 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
231 # from automake < 1.5.
232 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
233 # Capture the value of LINGUAS because we need it to compute CATALOGS.
234 LINGUAS="${LINGUAS-%UNSET%}"
238 dnl Postprocesses a Makefile in a directory containing PO files.
239 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
241 # When this code is run, in config.status, two variables have already been
243 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
244 # - LINGUAS is the value of the environment variable LINGUAS at configure
248 # Adjust a relative srcdir.
249 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
250 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
251 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
252 # In autoconf-2.13 it is called $ac_given_srcdir.
253 # In autoconf-2.50 it is called $srcdir.
254 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
255 case "$ac_given_srcdir" in
256 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
257 /*) top_srcdir="$ac_given_srcdir" ;;
258 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
261 # Find a way to echo strings without interpreting backslash.
262 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
265 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
266 gt_echo='printf %s\n'
277 # A sed script that extracts the value of VARIABLE from a Makefile.
279 # Test if the hold space is empty.
284 # Yes it was empty. Look if we have the expected variable definition.
285 /^[ ]*VARIABLE[ ]*=/{
286 # Seen the first line of the variable definition.
287 s/^[ ]*VARIABLE[ ]*=//
292 # Here we are processing a line from the variable definition.
293 # Remove comment, more precisely replace it with a space.
295 # See if the line ends in a backslash.
299 # Print the line, without the trailing backslash.
302 # There was no trailing backslash. The end of the variable definition is
303 # reached. Clear the hold space.
308 # A trailing backslash means that the variable definition continues in the
309 # next line. Put a nonempty string into the hold space to indicate this.
316 # Set POTFILES to the value of the Makefile variable POTFILES.
317 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
318 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
319 # Compute POTFILES_DEPS as
320 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
322 for file in $POTFILES; do
323 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
327 if test -n "$OBSOLETE_ALL_LINGUAS"; then
328 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
330 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
331 # The LINGUAS file contains the set of available languages.
332 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
333 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
335 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
336 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
337 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
339 # Hide the ALL_LINGUAS assigment from automake < 1.5.
340 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
342 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
343 # Compute UPDATEPOFILES
344 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
345 # Compute DUMMYPOFILES
346 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
348 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
349 # Compute PROPERTIESFILES
350 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
352 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
354 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
356 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
357 # Compute RESOURCESDLLFILES
358 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
359 case "$ac_given_srcdir" in
361 *) srcdirpre='$(srcdir)/' ;;
372 for lang in $ALL_LINGUAS; do
373 POFILES="$POFILES $srcdirpre$lang.po"
374 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
375 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
376 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
377 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
378 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
379 QMFILES="$QMFILES $srcdirpre$lang.qm"
380 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
381 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
382 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/'`
383 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
385 # CATALOGS depends on both $ac_dir and the user's LINGUAS
386 # environment variable.
388 if test -n "$ALL_LINGUAS"; then
389 for presentlang in $ALL_LINGUAS; do
391 if test "%UNSET%" != "$LINGUAS"; then
392 desiredlanguages="$LINGUAS"
394 desiredlanguages="$ALL_LINGUAS"
396 for desiredlang in $desiredlanguages; do
397 # Use the presentlang catalog if desiredlang is
398 # a. equal to presentlang, or
399 # b. a variant of presentlang (because in this case,
400 # presentlang can be used as a fallback for messages
401 # which are not translated in the desiredlang catalog).
402 case "$desiredlang" in
403 "$presentlang"*) useit=yes;;
406 if test $useit = yes; then
407 INST_LINGUAS="$INST_LINGUAS $presentlang"
416 if test -n "$INST_LINGUAS"; then
417 for lang in $INST_LINGUAS; do
418 CATALOGS="$CATALOGS $lang.gmo"
419 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
420 QTCATALOGS="$QTCATALOGS $lang.qm"
421 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
422 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
423 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/'`
424 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
428 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"
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 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
436 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
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 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
447 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
451 if test -n "$POMAKEFILEDEPS"; then
452 cat >> "$ac_file.tmp" <<EOF
453 Makefile: $POMAKEFILEDEPS
456 mv "$ac_file.tmp" "$ac_file"
459 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
460 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
462 XGETTEXT_EXTRA_OPTIONS=
465 dnl Registers an option to be passed to xgettext in the po subdirectory.
466 AC_DEFUN([AM_XGETTEXT_OPTION],
468 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
469 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
472 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
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.
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.11a'
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.11a], [],
488 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
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], [])
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.11a])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]))])
508 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
510 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
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.
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/../..'.
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.
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
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.
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.
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.
554 AC_DEFUN([AM_AUX_DIR_EXPAND],
555 [dnl Rely on autoconf to set up CDPATH properly.
557 # expand $ac_aux_dir to an absolute path
558 am_aux_dir=`cd $ac_aux_dir && pwd`
561 # AM_CONDITIONAL -*- Autoconf -*-
563 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
564 # Free Software Foundation, Inc.
566 # This file is free software; the Free Software Foundation
567 # gives unlimited permission to copy and/or distribute it,
568 # with or without modifications, as long as this notice is preserved.
572 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
573 # -------------------------------------
574 # Define a conditional.
575 AC_DEFUN([AM_CONDITIONAL],
577 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
578 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
579 AC_SUBST([$1_TRUE])dnl
580 AC_SUBST([$1_FALSE])dnl
581 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
582 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
583 m4_define([_AM_COND_VALUE_$1], [$2])dnl
591 AC_CONFIG_COMMANDS_PRE(
592 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
593 AC_MSG_ERROR([[conditional "$1" was never defined.
594 Usually this means the macro was only invoked conditionally.]])
597 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
598 # Free Software Foundation, Inc.
600 # This file is free software; the Free Software Foundation
601 # gives unlimited permission to copy and/or distribute it,
602 # with or without modifications, as long as this notice is preserved.
606 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
607 # written in clear, in which case automake, when reading aclocal.m4,
608 # will think it sees a *use*, and therefore will trigger all it's
609 # C support machinery. Also note that it means that autoscan, seeing
610 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
613 # _AM_DEPENDENCIES(NAME)
614 # ----------------------
615 # See how the compiler implements dependency checking.
616 # NAME is "CC", "CXX", "GCJ", or "OBJC".
617 # We try a few techniques and use that to set a single cache variable.
619 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
620 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
621 # dependency, and given that the user is not expected to run this macro,
622 # just rely on AC_PROG_CC.
623 AC_DEFUN([_AM_DEPENDENCIES],
624 [AC_REQUIRE([AM_SET_DEPDIR])dnl
625 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
626 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
627 AC_REQUIRE([AM_DEP_TRACK])dnl
629 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
630 [$1], CXX, [depcc="$CXX" am_compiler_list=],
631 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
632 [$1], UPC, [depcc="$UPC" am_compiler_list=],
633 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
634 [depcc="$$1" am_compiler_list=])
636 AC_CACHE_CHECK([dependency style of $depcc],
637 [am_cv_$1_dependencies_compiler_type],
638 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
639 # We make a subdir and do the tests there. Otherwise we can end up
640 # making bogus files that we don't know about and never remove. For
641 # instance it was reported that on HP-UX the gcc test will end up
642 # making a dummy file named `D' -- because `-MD' means `put the output
645 # Copy depcomp to subdir because otherwise we won't find it if we're
646 # using a relative directory.
647 cp "$am_depcomp" conftest.dir
649 # We will build objects and dependencies in a subdirectory because
650 # it helps to detect inapplicable dependency modes. For instance
651 # both Tru64's cc and ICC support -MD to output dependencies as a
652 # side effect of compilation, but ICC will put the dependencies in
653 # the current directory while Tru64 will put them in the object
657 am_cv_$1_dependencies_compiler_type=none
658 if test "$am_compiler_list" = ""; then
659 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
663 [case " $depcc " in #(
664 *\ -arch\ *\ -arch\ *) am__universal=true ;;
667 [case " $depcc " in #(
668 *\ -arch\ *\ -arch\ *) am__universal=true ;;
671 for depmode in $am_compiler_list; do
672 # Setup a source with many dependencies, because some compilers
673 # like to wrap large dependency lists on column 80 (with \), and
674 # we should not choose a depcomp mode which is confused by this.
676 # We need to recreate these files for each test, as the compiler may
677 # overwrite some of them when testing with obscure command lines.
678 # This happens at least with the AIX C compiler.
680 for i in 1 2 3 4 5 6; do
681 echo '#include "conftst'$i'.h"' >> sub/conftest.c
682 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
683 # Solaris 8's {/usr,}/bin/sh.
684 touch sub/conftst$i.h
686 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
688 # We check with `-c' and `-o' for the sake of the "dashmstdout"
689 # mode. It turns out that the SunPro C++ compiler does not properly
690 # handle `-M -o', and we need to detect this. Also, some Intel
691 # versions had trouble with output in subdirs
692 am__obj=sub/conftest.${OBJEXT-o}
693 am__minus_obj="-o $am__obj"
696 # This depmode causes a compiler race in universal mode.
697 test "$am__universal" = false || continue
700 # after this tag, mechanisms are not by side-effect, so they'll
701 # only be used when explicitly requested
702 if test "x$enable_dependency_tracking" = xyes; then
708 msvisualcpp | msvcmsys)
709 # This compiler won't grok `-c -o', but also, the minuso test has
710 # not run yet. These depmodes are late enough in the game, and
711 # so weak that their functioning should not be impacted.
712 am__obj=conftest.${OBJEXT-o}
717 if depmode=$depmode \
718 source=sub/conftest.c object=$am__obj \
719 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
720 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
721 >/dev/null 2>conftest.err &&
722 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
723 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
724 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
725 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
726 # icc doesn't choke on unknown options, it will just issue warnings
727 # or remarks (even with -Werror). So we grep stderr for any message
728 # that says an option was ignored or not supported.
729 # When given -MP, icc 7.0 and 7.1 complain thusly:
730 # icc: Command line warning: ignoring option '-M'; no argument required
731 # The diagnosis changed in icc 8.0:
732 # icc: Command line remark: option '-MP' not supported
733 if (grep 'ignoring option' conftest.err ||
734 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
735 am_cv_$1_dependencies_compiler_type=$depmode
744 am_cv_$1_dependencies_compiler_type=none
747 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
748 AM_CONDITIONAL([am__fastdep$1], [
749 test "x$enable_dependency_tracking" != xno \
750 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
756 # Choose a directory name for dependency files.
757 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
758 AC_DEFUN([AM_SET_DEPDIR],
759 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
760 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
766 AC_DEFUN([AM_DEP_TRACK],
767 [AC_ARG_ENABLE(dependency-tracking,
768 [ --disable-dependency-tracking speeds up one-time build
769 --enable-dependency-tracking do not reject slow dependency extractors])
770 if test "x$enable_dependency_tracking" != xno; then
771 am_depcomp="$ac_aux_dir/depcomp"
774 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
775 AC_SUBST([AMDEPBACKSLASH])dnl
776 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
779 # Generate code to set up dependency tracking. -*- Autoconf -*-
781 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
782 # Free Software Foundation, Inc.
784 # This file is free software; the Free Software Foundation
785 # gives unlimited permission to copy and/or distribute it,
786 # with or without modifications, as long as this notice is preserved.
790 # _AM_OUTPUT_DEPENDENCY_COMMANDS
791 # ------------------------------
792 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
794 # Autoconf 2.62 quotes --file arguments for eval, but not when files
795 # are listed without --file. Let's play safe and only enable the eval
796 # if we detect the quoting.
797 case $CONFIG_FILES in
798 *\'*) eval set x "$CONFIG_FILES" ;;
799 *) set x $CONFIG_FILES ;;
804 # Strip MF so we end up with the name of the file.
805 mf=`echo "$mf" | sed -e 's/:.*$//'`
806 # Check whether this is an Automake generated Makefile or not.
807 # We used to match only the files named `Makefile.in', but
808 # some people rename them; so instead we look at the file content.
809 # Grep'ing the first line is not enough: some people post-process
810 # each Makefile.in and add a new line on top of each file to say so.
811 # Grep'ing the whole file is not good either: AIX grep has a line
812 # limit of 2048, but all sed's we know have understand at least 4000.
813 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
814 dirpart=`AS_DIRNAME("$mf")`
818 # Extract the definition of DEPDIR, am__include, and am__quote
819 # from the Makefile without running `make'.
820 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
821 test -z "$DEPDIR" && continue
822 am__include=`sed -n 's/^am__include = //p' < "$mf"`
823 test -z "am__include" && continue
824 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
825 # When using ansi2knr, U may be empty or an underscore; expand it
826 U=`sed -n 's/^U = //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
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' -e 's/\$U/'"$U"'/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"
843 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
846 # AM_OUTPUT_DEPENDENCY_COMMANDS
847 # -----------------------------
848 # This macro should only be invoked once -- use via AC_REQUIRE.
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"])
859 # Do all the work for Automake. -*- Autoconf -*-
861 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
862 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
864 # This file is free software; the Free Software Foundation
865 # gives unlimited permission to copy and/or distribute it,
866 # with or without modifications, as long as this notice is preserved.
870 # This macro actually does too much. Some checks are only needed if
871 # your package does certain things. But this isn't really a big deal.
873 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
874 # AM_INIT_AUTOMAKE([OPTIONS])
875 # -----------------------------------------------
876 # The call with PACKAGE and VERSION arguments is the old style
877 # call (pre autoconf-2.50), which is being phased out. PACKAGE
878 # and VERSION should now be passed to AC_INIT and removed from
879 # the call to AM_INIT_AUTOMAKE.
880 # We support both call styles for the transition. After
881 # the next Automake release, Autoconf can make the AC_INIT
882 # arguments mandatory, and then we can depend on a new Autoconf
883 # release and drop the old call support.
884 AC_DEFUN([AM_INIT_AUTOMAKE],
885 [AC_PREREQ([2.62])dnl
886 dnl Autoconf wants to disallow AM_ names. We explicitly allow
887 dnl the ones we care about.
888 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
889 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
890 AC_REQUIRE([AC_PROG_INSTALL])dnl
891 if test "`cd $srcdir && pwd`" != "`pwd`"; then
892 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
893 # is not polluted with repeated "-I."
894 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
895 # test to see if srcdir already configured
896 if test -f $srcdir/config.status; then
897 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
901 # test whether we have cygpath
902 if test -z "$CYGPATH_W"; then
903 if (cygpath --version) >/dev/null 2>/dev/null; then
904 CYGPATH_W='cygpath -w'
909 AC_SUBST([CYGPATH_W])
911 # Define the identity of the package.
912 dnl Distinguish between old-style and new-style calls.
914 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
915 AC_SUBST([PACKAGE], [$1])dnl
916 AC_SUBST([VERSION], [$2])],
917 [_AM_SET_OPTIONS([$1])dnl
918 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
919 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
920 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
921 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
922 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
924 _AM_IF_OPTION([no-define],,
925 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
926 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
928 # Some tools Automake needs.
929 AC_REQUIRE([AM_SANITY_CHECK])dnl
930 AC_REQUIRE([AC_ARG_PROGRAM])dnl
931 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
932 AM_MISSING_PROG(AUTOCONF, autoconf)
933 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
934 AM_MISSING_PROG(AUTOHEADER, autoheader)
935 AM_MISSING_PROG(MAKEINFO, makeinfo)
936 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
937 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
938 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
939 # We need awk for the "check" target. The system "awk" is bad on
941 AC_REQUIRE([AC_PROG_AWK])dnl
942 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
943 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
944 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
945 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
946 [_AM_PROG_TAR([v7])])])
947 _AM_IF_OPTION([no-dependencies],,
948 [AC_PROVIDE_IFELSE([AC_PROG_CC],
949 [_AM_DEPENDENCIES(CC)],
950 [define([AC_PROG_CC],
951 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
952 AC_PROVIDE_IFELSE([AC_PROG_CXX],
953 [_AM_DEPENDENCIES(CXX)],
954 [define([AC_PROG_CXX],
955 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
956 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
957 [_AM_DEPENDENCIES(OBJC)],
958 [define([AC_PROG_OBJC],
959 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
961 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
962 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
963 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
964 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
965 AC_CONFIG_COMMANDS_PRE(dnl
966 [m4_provide_if([_AM_COMPILER_EXEEXT],
967 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
970 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
971 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
972 dnl mangled by Autoconf and run in a shell conditional statement.
973 m4_define([_AC_COMPILER_EXEEXT],
974 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
977 # When config.status generates a header, we must update the stamp-h file.
978 # This file resides in the same directory as the config header
979 # that is generated. The stamp files are numbered to have different names.
981 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
982 # loop where config.status creates the headers, so we can generate
983 # our stamp files there.
984 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
985 [# Compute $1's index in $config_headers.
988 for _am_header in $config_headers :; do
990 $_am_arg | $_am_arg:* )
993 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
996 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
998 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1000 # This file is free software; the Free Software Foundation
1001 # gives unlimited permission to copy and/or distribute it,
1002 # with or without modifications, as long as this notice is preserved.
1004 # AM_PROG_INSTALL_SH
1005 # ------------------
1006 # Define $install_sh.
1007 AC_DEFUN([AM_PROG_INSTALL_SH],
1008 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1009 if test x"${install_sh}" != xset; then
1012 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1014 install_sh="\${SHELL} $am_aux_dir/install-sh"
1017 AC_SUBST(install_sh)])
1019 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1021 # This file is free software; the Free Software Foundation
1022 # gives unlimited permission to copy and/or distribute it,
1023 # with or without modifications, as long as this notice is preserved.
1027 # Check whether the underlying file-system supports filenames
1028 # with a leading dot. For instance MS-DOS doesn't.
1029 AC_DEFUN([AM_SET_LEADING_DOT],
1030 [rm -rf .tst 2>/dev/null
1031 mkdir .tst 2>/dev/null
1032 if test -d .tst; then
1037 rmdir .tst 2>/dev/null
1038 AC_SUBST([am__leading_dot])])
1040 # Check to see how 'make' treats includes. -*- Autoconf -*-
1042 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1044 # This file is free software; the Free Software Foundation
1045 # gives unlimited permission to copy and/or distribute it,
1046 # with or without modifications, as long as this notice is preserved.
1052 # Check to see how make treats includes.
1053 AC_DEFUN([AM_MAKE_INCLUDE],
1054 [am_make=${MAKE-make}
1055 cat > confinc << 'END'
1057 @echo this is the am__doit target
1060 # If we don't find an include directive, just comment out the code.
1061 AC_MSG_CHECKING([for style of include used by $am_make])
1065 # First try GNU make style include.
1066 echo "include confinc" > confmf
1067 # Ignore all kinds of additional output from `make'.
1068 case `$am_make -s -f confmf 2> /dev/null` in #(
1069 *the\ am__doit\ target*)
1075 # Now try BSD make style include.
1076 if test "$am__include" = "#"; then
1077 echo '.include "confinc"' > confmf
1078 case `$am_make -s -f confmf 2> /dev/null` in #(
1079 *the\ am__doit\ target*)
1080 am__include=.include
1086 AC_SUBST([am__include])
1087 AC_SUBST([am__quote])
1088 AC_MSG_RESULT([$_am_result])
1089 rm -f confinc confmf
1092 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1093 # Free Software Foundation, Inc.
1095 # This file is free software; the Free Software Foundation
1096 # gives unlimited permission to copy and/or distribute it,
1097 # with or without modifications, as long as this notice is preserved.
1103 # Like AC_PROG_CC_C_O, but changed for automake.
1104 AC_DEFUN([AM_PROG_CC_C_O],
1105 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1106 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1107 AC_REQUIRE_AUX_FILE([compile])dnl
1108 # FIXME: we rely on the cache variable name because
1109 # there is no other way.
1111 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1112 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1113 if test "$am_t" != yes; then
1114 # Losing compiler, so override with the script.
1115 # FIXME: It is wrong to rewrite CC.
1116 # But if we don't then we get into trouble of one sort or another.
1117 # A longer-term fix would be to have automake use am__CC in this case,
1118 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1119 CC="$am_aux_dir/compile $CC"
1121 dnl Make sure AC_PROG_CC is never called again, or it will override our
1123 m4_define([AC_PROG_CC],
1124 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1127 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1129 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1130 # Free Software Foundation, Inc.
1132 # This file is free software; the Free Software Foundation
1133 # gives unlimited permission to copy and/or distribute it,
1134 # with or without modifications, as long as this notice is preserved.
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"}
1146 # AM_MISSING_HAS_RUN
1147 # ------------------
1148 # Define MISSING if not defined so far and test if it supports --run.
1149 # If it does, set am_missing_run to use it, otherwise, to nothing.
1150 AC_DEFUN([AM_MISSING_HAS_RUN],
1151 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1152 AC_REQUIRE_AUX_FILE([missing])dnl
1153 if test x"${MISSING+set}" != xset; then
1156 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1158 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1161 # Use eval to expand $SHELL
1162 if eval "$MISSING --run true"; then
1163 am_missing_run="$MISSING --run "
1166 AC_MSG_WARN([`missing' script is too old or missing])
1170 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1172 # This file is free software; the Free Software Foundation
1173 # gives unlimited permission to copy and/or distribute it,
1174 # with or without modifications, as long as this notice is preserved.
1178 # Check for `mkdir -p'.
1179 AC_DEFUN([AM_PROG_MKDIR_P],
1180 [AC_PREREQ([2.60])dnl
1181 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1182 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1183 dnl while keeping a definition of mkdir_p for backward compatibility.
1184 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1185 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1186 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1187 dnl adjustment using top_builddir (which is defined more often than
1189 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1191 [[\\/$]]* | ?:[[\\/]]*) ;;
1192 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1196 # Helper functions for option handling. -*- Autoconf -*-
1198 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1200 # This file is free software; the Free Software Foundation
1201 # gives unlimited permission to copy and/or distribute it,
1202 # with or without modifications, as long as this notice is preserved.
1206 # _AM_MANGLE_OPTION(NAME)
1207 # -----------------------
1208 AC_DEFUN([_AM_MANGLE_OPTION],
1209 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
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)])
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)])])
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])])
1229 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1231 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008, 2009
1232 # Free Software Foundation, Inc.
1234 # This file is free software; the Free Software Foundation
1235 # gives unlimited permission to copy and/or distribute it,
1236 # with or without modifications, as long as this notice is preserved.
1242 AC_DEFUN([AM_SANITY_CHECK],
1243 [AC_MSG_CHECKING([whether build environment is sane])
1244 # Reject unsafe characters in $srcdir or the absolute working directory
1245 # name. Accept space and tab only in the latter.
1249 *[[\\\"\#\$\&\'\`$am_lf]]*)
1250 AC_MSG_ERROR([unsafe absolute working directory name]);;
1253 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1254 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1257 # Do `set' in a subshell so we don't clobber the current shell's
1258 # arguments. Must try -L first in case configure is actually a
1259 # symlink; some systems play weird games with the mod time of symlinks
1260 # (eg FreeBSD returns the mod time of the symlink's containing
1263 for am_try in 1 2; do
1264 echo timestamp > conftest.file
1265 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1266 if test "$[*]" = "X"; then
1268 set X `ls -t "$srcdir/configure" conftest.file`
1271 if test "$[*]" != "X $srcdir/configure conftest.file" \
1272 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1274 # If neither matched, then we have a broken ls. This can happen
1275 # if, for instance, CONFIG_SHELL is bash and it inherits a
1276 # broken ls alias from the environment. This has actually
1277 # happened. Such a system could not be considered "sane".
1278 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1279 alias in your environment])
1281 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1287 test "$[2]" = conftest.file
1293 AC_MSG_ERROR([newly created file is older than distributed files!
1294 Check your system clock])
1296 AC_MSG_RESULT(yes)])
1298 # Copyright (C) 2009 Free Software Foundation, Inc.
1300 # This file is free software; the Free Software Foundation
1301 # gives unlimited permission to copy and/or distribute it,
1302 # with or without modifications, as long as this notice is preserved.
1306 # AM_SILENT_RULES([DEFAULT])
1307 # --------------------------
1308 # Enable less verbose build rules; with the default set to DEFAULT
1309 # (`yes' being less verbose, `no' or empty being verbose).
1310 AC_DEFUN([AM_SILENT_RULES],
1311 [AC_ARG_ENABLE([silent-rules],
1312 [ --enable-silent-rules less verbose build output (undo: `make V=1')
1313 --disable-silent-rules verbose build output (undo: `make V=0')])
1314 case $enable_silent_rules in
1315 yes) AM_DEFAULT_VERBOSITY=0;;
1316 no) AM_DEFAULT_VERBOSITY=1;;
1317 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1319 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1321 AC_SUBST([AM_BACKSLASH])dnl
1322 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1325 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1327 # This file is free software; the Free Software Foundation
1328 # gives unlimited permission to copy and/or distribute it,
1329 # with or without modifications, as long as this notice is preserved.
1331 # AM_PROG_INSTALL_STRIP
1332 # ---------------------
1333 # One issue with vendor `install' (even GNU) is that you can't
1334 # specify the program used to strip binaries. This is especially
1335 # annoying in cross-compiling environments, where the build's strip
1336 # is unlikely to handle the host's binaries.
1337 # Fortunately install-sh will honor a STRIPPROG variable, so we
1338 # always use install-sh in `make install-strip', and initialize
1339 # STRIPPROG with the value of the STRIP variable (set by the user).
1340 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1341 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1342 # Installed binaries are usually stripped using `strip' when the user
1343 # run `make install-strip'. However `strip' might not be the right
1344 # tool to use in cross-compilation environments, therefore Automake
1345 # will honor the `STRIP' environment variable to overrule this program.
1346 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1347 if test "$cross_compiling" != no; then
1348 AC_CHECK_TOOL([STRIP], [strip], :)
1350 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1351 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1353 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1355 # This file is free software; the Free Software Foundation
1356 # gives unlimited permission to copy and/or distribute it,
1357 # with or without modifications, as long as this notice is preserved.
1361 # _AM_SUBST_NOTMAKE(VARIABLE)
1362 # ---------------------------
1363 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1364 # This macro is traced by Automake.
1365 AC_DEFUN([_AM_SUBST_NOTMAKE])
1367 # AM_SUBST_NOTMAKE(VARIABLE)
1368 # ---------------------------
1369 # Public sister of _AM_SUBST_NOTMAKE.
1370 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1372 # Check how to create a tarball. -*- Autoconf -*-
1374 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1376 # This file is free software; the Free Software Foundation
1377 # gives unlimited permission to copy and/or distribute it,
1378 # with or without modifications, as long as this notice is preserved.
1382 # _AM_PROG_TAR(FORMAT)
1383 # --------------------
1384 # Check how to create a tarball in format FORMAT.
1385 # FORMAT should be one of `v7', `ustar', or `pax'.
1387 # Substitute a variable $(am__tar) that is a command
1388 # writing to stdout a FORMAT-tarball containing the directory
1390 # tardir=directory && $(am__tar) > result.tar
1392 # Substitute a variable $(am__untar) that extract such
1393 # a tarball read from stdin.
1394 # $(am__untar) < result.tar
1395 AC_DEFUN([_AM_PROG_TAR],
1396 [# Always define AMTAR for backward compatibility.
1397 AM_MISSING_PROG([AMTAR], [tar])
1399 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1400 [m4_case([$1], [ustar],, [pax],,
1401 [m4_fatal([Unknown tar format])])
1402 AC_MSG_CHECKING([how to create a $1 tar archive])
1403 # Loop over all known methods to create a tar archive until one works.
1404 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1405 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1406 # Do not fold the above two line into one, because Tru64 sh and
1407 # Solaris sh will not grok spaces in the rhs of `-'.
1408 for _am_tool in $_am_tools
1412 for _am_tar in tar gnutar gtar;
1414 AM_RUN_LOG([$_am_tar --version]) && break
1416 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1417 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1418 am__untar="$_am_tar -xf -"
1421 # Must skip GNU tar: if it does not support --format= it doesn't create
1422 # ustar tarball either.
1423 (tar --version) >/dev/null 2>&1 && continue
1424 am__tar='tar chf - "$$tardir"'
1425 am__tar_='tar chf - "$tardir"'
1426 am__untar='tar xf -'
1429 am__tar='pax -L -x $1 -w "$$tardir"'
1430 am__tar_='pax -L -x $1 -w "$tardir"'
1434 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1435 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1436 am__untar='cpio -i -H $1 -d'
1445 # If the value was cached, stop now. We just wanted to have am__tar
1446 # and am__untar set.
1447 test -n "${am_cv_prog_tar_$1}" && break
1449 # tar/untar a dummy directory, and stop if the command works
1452 echo GrepMe > conftest.dir/file
1453 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1455 if test -s conftest.tar; then
1456 AM_RUN_LOG([$am__untar <conftest.tar])
1457 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1462 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1463 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1465 AC_SUBST([am__untar])
1468 m4_include([m4/00gnulib.m4])
1469 m4_include([m4/alloca.m4])
1470 m4_include([m4/calloc.m4])
1471 m4_include([m4/clock_time.m4])
1472 m4_include([m4/close-stream.m4])
1473 m4_include([m4/close.m4])
1474 m4_include([m4/closein.m4])
1475 m4_include([m4/closeout.m4])
1476 m4_include([m4/codeset.m4])
1477 m4_include([m4/dos.m4])
1478 m4_include([m4/dup2.m4])
1479 m4_include([m4/errno_h.m4])
1480 m4_include([m4/error.m4])
1481 m4_include([m4/exitfail.m4])
1482 m4_include([m4/exponentd.m4])
1483 m4_include([m4/exponentf.m4])
1484 m4_include([m4/exponentl.m4])
1485 m4_include([m4/extensions.m4])
1486 m4_include([m4/fclose.m4])
1487 m4_include([m4/fcntl-safer.m4])
1488 m4_include([m4/fcntl_h.m4])
1489 m4_include([m4/fflush.m4])
1490 m4_include([m4/float_h.m4])
1491 m4_include([m4/fpending.m4])
1492 m4_include([m4/fpieee.m4])
1493 m4_include([m4/fprintf-posix.m4])
1494 m4_include([m4/fpurge.m4])
1495 m4_include([m4/freading.m4])
1496 m4_include([m4/frexp.m4])
1497 m4_include([m4/frexpl.m4])
1498 m4_include([m4/fseeko.m4])
1499 m4_include([m4/ftello.m4])
1500 m4_include([m4/getopt.m4])
1501 m4_include([m4/getpagesize.m4])
1502 m4_include([m4/gettime.m4])
1503 m4_include([m4/gettimeofday.m4])
1504 m4_include([m4/glibc21.m4])
1505 m4_include([m4/gnu-make.m4])
1506 m4_include([m4/gnulib-common.m4])
1507 m4_include([m4/gnulib-comp.m4])
1508 m4_include([m4/include_next.m4])
1509 m4_include([m4/inline.m4])
1510 m4_include([m4/intmax_t.m4])
1511 m4_include([m4/inttypes_h.m4])
1512 m4_include([m4/isnand.m4])
1513 m4_include([m4/isnanf.m4])
1514 m4_include([m4/isnanl.m4])
1515 m4_include([m4/ldexpl.m4])
1516 m4_include([m4/localcharset.m4])
1517 m4_include([m4/locale-fr.m4])
1518 m4_include([m4/locale-ja.m4])
1519 m4_include([m4/locale-zh.m4])
1520 m4_include([m4/longlong.m4])
1521 m4_include([m4/lseek.m4])
1522 m4_include([m4/lstat.m4])
1523 m4_include([m4/malloc.m4])
1524 m4_include([m4/math_h.m4])
1525 m4_include([m4/mbrtowc.m4])
1526 m4_include([m4/mbsinit.m4])
1527 m4_include([m4/mbstate_t.m4])
1528 m4_include([m4/memchr.m4])
1529 m4_include([m4/mmap-anon.m4])
1530 m4_include([m4/mode_t.m4])
1531 m4_include([m4/multiarch.m4])
1532 m4_include([m4/nocrash.m4])
1533 m4_include([m4/open.m4])
1534 m4_include([m4/perror.m4])
1535 m4_include([m4/printf-frexp.m4])
1536 m4_include([m4/printf-frexpl.m4])
1537 m4_include([m4/printf-posix-rpl.m4])
1538 m4_include([m4/printf.m4])
1539 m4_include([m4/quotearg.m4])
1540 m4_include([m4/realloc.m4])
1541 m4_include([m4/shell.m4])
1542 m4_include([m4/signbit.m4])
1543 m4_include([m4/size_max.m4])
1544 m4_include([m4/stat-time.m4])
1545 m4_include([m4/stat.m4])
1546 m4_include([m4/stdbool.m4])
1547 m4_include([m4/stddef_h.m4])
1548 m4_include([m4/stdint.m4])
1549 m4_include([m4/stdint_h.m4])
1550 m4_include([m4/stdio_h.m4])
1551 m4_include([m4/stdlib_h.m4])
1552 m4_include([m4/strerror.m4])
1553 m4_include([m4/string_h.m4])
1554 m4_include([m4/sys_stat_h.m4])
1555 m4_include([m4/sys_time_h.m4])
1556 m4_include([m4/time_h.m4])
1557 m4_include([m4/timespec.m4])
1558 m4_include([m4/unistd-safer.m4])
1559 m4_include([m4/unistd_h.m4])
1560 m4_include([m4/utimbuf.m4])
1561 m4_include([m4/utimens.m4])
1562 m4_include([m4/utimes.m4])
1563 m4_include([m4/vasnprintf.m4])
1564 m4_include([m4/vfprintf-posix.m4])
1565 m4_include([m4/wchar.m4])
1566 m4_include([m4/wchar_t.m4])
1567 m4_include([m4/wctype.m4])
1568 m4_include([m4/wint_t.m4])
1569 m4_include([m4/xalloc.m4])
1570 m4_include([m4/xsize.m4])
1571 m4_include([m4/yesno.m4])