]> git.donarmstrong.com Git - xournal.git/blob - aclocal.m4
cleanup code for alternate clipboard targets
[xournal.git] / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
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.
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_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
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'.])])
21
22 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
23 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
24 #
25 # This file is free software, distributed under the terms of the GNU
26 # General Public License.  As a special exception to the GNU General
27 # Public License, this file may be distributed as part of a program
28 # that contains a configuration script generated by Autoconf, under
29 # the same distribution terms as the rest of that program.
30 #
31 # This file can be copied and used freely without restrictions.  It can
32 # be used in projects which are not available under the GNU Public License
33 # but which still want to provide support for the GNU gettext functionality.
34 #
35 # Macro to add for using GNU gettext.
36 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37 #
38 # Modified to never use included libintl. 
39 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
40 #
41 # Major rework to remove unused code
42 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
43 #
44 # Added better handling of ALL_LINGUAS from GNU gettext version 
45 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46 #
47 # Modified to require ngettext
48 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
49 #
50 # We need this here as well, since someone might use autoconf-2.5x
51 # to configure GLib then an older version to configure a package
52 # using AM_GLIB_GNU_GETTEXT
53 AC_PREREQ(2.53)
54
55 dnl
56 dnl We go to great lengths to make sure that aclocal won't 
57 dnl try to pull in the installed version of these macros
58 dnl when running aclocal in the glib directory.
59 dnl
60 m4_copy([AC_DEFUN],[glib_DEFUN])
61 m4_copy([AC_REQUIRE],[glib_REQUIRE])
62 dnl
63 dnl At the end, if we're not within glib, we'll define the public
64 dnl definitions in terms of our private definitions.
65 dnl
66
67 # GLIB_LC_MESSAGES
68 #--------------------
69 glib_DEFUN([GLIB_LC_MESSAGES],
70   [AC_CHECK_HEADERS([locale.h])
71     if test $ac_cv_header_locale_h = yes; then
72     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75     if test $am_cv_val_LC_MESSAGES = yes; then
76       AC_DEFINE(HAVE_LC_MESSAGES, 1,
77         [Define if your <locale.h> file defines LC_MESSAGES.])
78     fi
79   fi])
80
81 # GLIB_PATH_PROG_WITH_TEST
82 #----------------------------
83 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86 [# Extract the first word of "$2", so it can be a program name with args.
87 set dummy $2; ac_word=[$]2
88 AC_MSG_CHECKING([for $ac_word])
89 AC_CACHE_VAL(ac_cv_path_$1,
90 [case "[$]$1" in
91   /*)
92   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93   ;;
94   *)
95   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96   for ac_dir in ifelse([$5], , $PATH, [$5]); do
97     test -z "$ac_dir" && ac_dir=.
98     if test -f $ac_dir/$ac_word; then
99       if [$3]; then
100         ac_cv_path_$1="$ac_dir/$ac_word"
101         break
102       fi
103     fi
104   done
105   IFS="$ac_save_ifs"
106 dnl If no 4th arg is given, leave the cache variable unset,
107 dnl so AC_PATH_PROGS will keep looking.
108 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
109 ])dnl
110   ;;
111 esac])dnl
112 $1="$ac_cv_path_$1"
113 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114   AC_MSG_RESULT([$]$1)
115 else
116   AC_MSG_RESULT(no)
117 fi
118 AC_SUBST($1)dnl
119 ])
120
121 # GLIB_WITH_NLS
122 #-----------------
123 glib_DEFUN([GLIB_WITH_NLS],
124   dnl NLS is obligatory
125   [USE_NLS=yes
126     AC_SUBST(USE_NLS)
127
128     gt_cv_have_gettext=no
129
130     CATOBJEXT=NONE
131     XGETTEXT=:
132     INTLLIBS=
133
134     AC_CHECK_HEADER(libintl.h,
135      [gt_cv_func_dgettext_libintl="no"
136       libintl_extra_libs=""
137
138       #
139       # First check in libc
140       #
141       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142         [AC_TRY_LINK([
143 #include <libintl.h>
144 ],
145          [return !ngettext ("","", 1)],
146           gt_cv_func_ngettext_libc=yes,
147           gt_cv_func_ngettext_libc=no)
148         ])
149   
150       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152                 [AC_TRY_LINK([
153 #include <libintl.h>
154 ],
155                   [return !dgettext ("","")],
156                   gt_cv_func_dgettext_libc=yes,
157                   gt_cv_func_dgettext_libc=no)
158                 ])
159       fi
160   
161       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162         AC_CHECK_FUNCS(bind_textdomain_codeset)
163       fi
164
165       #
166       # If we don't have everything we want, check in libintl
167       #
168       if test "$gt_cv_func_dgettext_libc" != "yes" \
169          || test "$gt_cv_func_ngettext_libc" != "yes" \
170          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
171         
172         AC_CHECK_LIB(intl, bindtextdomain,
173             [AC_CHECK_LIB(intl, ngettext,
174                     [AC_CHECK_LIB(intl, dgettext,
175                                   gt_cv_func_dgettext_libintl=yes)])])
176
177         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178           AC_MSG_CHECKING([if -liconv is needed to use gettext])
179           AC_MSG_RESULT([])
180           AC_CHECK_LIB(intl, ngettext,
181                 [AC_CHECK_LIB(intl, dcgettext,
182                        [gt_cv_func_dgettext_libintl=yes
183                         libintl_extra_libs=-liconv],
184                         :,-liconv)],
185                 :,-liconv)
186         fi
187
188         #
189         # If we found libintl, then check in it for bind_textdomain_codeset();
190         # we'll prefer libc if neither have bind_textdomain_codeset(),
191         # and both have dgettext and ngettext
192         #
193         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194           glib_save_LIBS="$LIBS"
195           LIBS="$LIBS -lintl $libintl_extra_libs"
196           unset ac_cv_func_bind_textdomain_codeset
197           AC_CHECK_FUNCS(bind_textdomain_codeset)
198           LIBS="$glib_save_LIBS"
199
200           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201             gt_cv_func_dgettext_libc=no
202           else
203             if test "$gt_cv_func_dgettext_libc" = "yes" \
204                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
205               gt_cv_func_dgettext_libintl=no
206             fi
207           fi
208         fi
209       fi
210
211       if test "$gt_cv_func_dgettext_libc" = "yes" \
212         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
213         gt_cv_have_gettext=yes
214       fi
215   
216       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217         INTLLIBS="-lintl $libintl_extra_libs"
218       fi
219   
220       if test "$gt_cv_have_gettext" = "yes"; then
221         AC_DEFINE(HAVE_GETTEXT,1,
222           [Define if the GNU gettext() function is already present or preinstalled.])
223         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225         if test "$MSGFMT" != "no"; then
226           glib_save_LIBS="$LIBS"
227           LIBS="$LIBS $INTLLIBS"
228           AC_CHECK_FUNCS(dcgettext)
229           MSGFMT_OPTS=
230           AC_MSG_CHECKING([if msgfmt accepts -c])
231           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232 msgid ""
233 msgstr ""
234 "Content-Type: text/plain; charset=UTF-8\n"
235 "Project-Id-Version: test 1.0\n"
236 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
237 "Last-Translator: test <foo@bar.xx>\n"
238 "Language-Team: C <LL@li.org>\n"
239 "MIME-Version: 1.0\n"
240 "Content-Transfer-Encoding: 8bit\n"
241 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242           AC_SUBST(MSGFMT_OPTS)
243           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247                          return _nl_msg_cat_cntr],
248             [CATOBJEXT=.gmo 
249              DATADIRNAME=share],
250             [case $host in
251             *-*-solaris*)
252             dnl On Solaris, if bind_textdomain_codeset is in libc,
253             dnl GNU format message catalog is always supported,
254             dnl since both are added to the libc all together.
255             dnl Hence, we'd like to go with DATADIRNAME=share and
256             dnl and CATOBJEXT=.gmo in this case.
257             AC_CHECK_FUNC(bind_textdomain_codeset,
258               [CATOBJEXT=.gmo 
259                DATADIRNAME=share],
260               [CATOBJEXT=.mo
261                DATADIRNAME=lib])
262             ;;
263             *-*-openbsd*)
264             CATOBJEXT=.mo
265             DATADIRNAME=share
266             ;;
267             *)
268             CATOBJEXT=.mo
269             DATADIRNAME=lib
270             ;;
271             esac])
272           LIBS="$glib_save_LIBS"
273           INSTOBJEXT=.mo
274         else
275           gt_cv_have_gettext=no
276         fi
277       fi
278     ])
279
280     if test "$gt_cv_have_gettext" = "yes" ; then
281       AC_DEFINE(ENABLE_NLS, 1,
282         [always defined to indicate that i18n is enabled])
283     fi
284
285     dnl Test whether we really found GNU xgettext.
286     if test "$XGETTEXT" != ":"; then
287       dnl If it is not GNU xgettext we define it as : so that the
288       dnl Makefiles still can work.
289       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
290         : ;
291       else
292         AC_MSG_RESULT(
293           [found xgettext program is not GNU xgettext; ignore it])
294         XGETTEXT=":"
295       fi
296     fi
297
298     # We need to process the po/ directory.
299     POSUB=po
300
301     AC_OUTPUT_COMMANDS(
302       [case "$CONFIG_FILES" in *po/Makefile.in*)
303         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
304       esac])
305
306     dnl These rules are solely for the distribution goal.  While doing this
307     dnl we only have to keep exactly one list of the available catalogs
308     dnl in configure.ac.
309     for lang in $ALL_LINGUAS; do
310       GMOFILES="$GMOFILES $lang.gmo"
311       POFILES="$POFILES $lang.po"
312     done
313
314     dnl Make all variables we use known to autoconf.
315     AC_SUBST(CATALOGS)
316     AC_SUBST(CATOBJEXT)
317     AC_SUBST(DATADIRNAME)
318     AC_SUBST(GMOFILES)
319     AC_SUBST(INSTOBJEXT)
320     AC_SUBST(INTLLIBS)
321     AC_SUBST(PO_IN_DATADIR_TRUE)
322     AC_SUBST(PO_IN_DATADIR_FALSE)
323     AC_SUBST(POFILES)
324     AC_SUBST(POSUB)
325   ])
326
327 # AM_GLIB_GNU_GETTEXT
328 # -------------------
329 # Do checks necessary for use of gettext. If a suitable implementation 
330 # of gettext is found in either in libintl or in the C library,
331 # it will set INTLLIBS to the libraries needed for use of gettext
332 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
333 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
334 # on various variables needed by the Makefile.in.in installed by 
335 # glib-gettextize.
336 dnl
337 glib_DEFUN([GLIB_GNU_GETTEXT],
338   [AC_REQUIRE([AC_PROG_CC])dnl
339    AC_REQUIRE([AC_HEADER_STDC])dnl
340    
341    GLIB_LC_MESSAGES
342    GLIB_WITH_NLS
343
344    if test "$gt_cv_have_gettext" = "yes"; then
345      if test "x$ALL_LINGUAS" = "x"; then
346        LINGUAS=
347      else
348        AC_MSG_CHECKING(for catalogs to be installed)
349        NEW_LINGUAS=
350        for presentlang in $ALL_LINGUAS; do
351          useit=no
352          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
353            desiredlanguages="$LINGUAS"
354          else
355            desiredlanguages="$ALL_LINGUAS"
356          fi
357          for desiredlang in $desiredlanguages; do
358            # Use the presentlang catalog if desiredlang is
359            #   a. equal to presentlang, or
360            #   b. a variant of presentlang (because in this case,
361            #      presentlang can be used as a fallback for messages
362            #      which are not translated in the desiredlang catalog).
363            case "$desiredlang" in
364              "$presentlang"*) useit=yes;;
365            esac
366          done
367          if test $useit = yes; then
368            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
369          fi
370        done
371        LINGUAS=$NEW_LINGUAS
372        AC_MSG_RESULT($LINGUAS)
373      fi
374
375      dnl Construct list of names of catalog files to be constructed.
376      if test -n "$LINGUAS"; then
377        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
378      fi
379    fi
380
381    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
382    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
383    dnl Try to locate is.
384    MKINSTALLDIRS=
385    if test -n "$ac_aux_dir"; then
386      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
387    fi
388    if test -z "$MKINSTALLDIRS"; then
389      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
390    fi
391    AC_SUBST(MKINSTALLDIRS)
392
393    dnl Generate list of files to be processed by xgettext which will
394    dnl be included in po/Makefile.
395    test -d po || mkdir po
396    if test "x$srcdir" != "x."; then
397      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
398        posrcprefix="$srcdir/"
399      else
400        posrcprefix="../$srcdir/"
401      fi
402    else
403      posrcprefix="../"
404    fi
405    rm -f po/POTFILES
406    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
407         < $srcdir/po/POTFILES.in > po/POTFILES
408   ])
409
410 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
411 # -------------------------------
412 # Define VARIABLE to the location where catalog files will
413 # be installed by po/Makefile.
414 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
415 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
416 glib_save_prefix="$prefix"
417 glib_save_exec_prefix="$exec_prefix"
418 glib_save_datarootdir="$datarootdir"
419 test "x$prefix" = xNONE && prefix=$ac_default_prefix
420 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
421 datarootdir=`eval echo "${datarootdir}"`
422 if test "x$CATOBJEXT" = "x.mo" ; then
423   localedir=`eval echo "${libdir}/locale"`
424 else
425   localedir=`eval echo "${datadir}/locale"`
426 fi
427 prefix="$glib_save_prefix"
428 exec_prefix="$glib_save_exec_prefix"
429 datarootdir="$glib_save_datarootdir"
430 AC_DEFINE_UNQUOTED($1, "$localedir",
431   [Define the location where the catalogs will be installed])
432 ])
433
434 dnl
435 dnl Now the definitions that aclocal will find
436 dnl
437 ifdef(glib_configure_ac,[],[
438 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
439 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
440 ])dnl
441
442 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
443
444 # Create a temporary file with TEST-FILE as its contents and pass the
445 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
446 # 0 and perform ACTION-IF-FAIL for any other exit status.
447 AC_DEFUN([GLIB_RUN_PROG],
448 [cat >conftest.foo <<_ACEOF
449 $2
450 _ACEOF
451 if AC_RUN_LOG([$1 conftest.foo]); then
452   m4_ifval([$3], [$3], [:])
453 m4_ifvaln([$4], [else $4])dnl
454 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
455 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
456 fi])
457
458
459 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
460 # serial 1 (pkg-config-0.24)
461
462 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
463 #
464 # This program is free software; you can redistribute it and/or modify
465 # it under the terms of the GNU General Public License as published by
466 # the Free Software Foundation; either version 2 of the License, or
467 # (at your option) any later version.
468 #
469 # This program is distributed in the hope that it will be useful, but
470 # WITHOUT ANY WARRANTY; without even the implied warranty of
471 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
472 # General Public License for more details.
473 #
474 # You should have received a copy of the GNU General Public License
475 # along with this program; if not, write to the Free Software
476 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
477 #
478 # As a special exception to the GNU General Public License, if you
479 # distribute this file as part of a program that contains a
480 # configuration script generated by Autoconf, you may include it under
481 # the same distribution terms that you use for the rest of that program.
482
483 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
484 # ----------------------------------
485 AC_DEFUN([PKG_PROG_PKG_CONFIG],
486 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
487 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
488 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
489 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
490 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
491
492 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
493         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
494 fi
495 if test -n "$PKG_CONFIG"; then
496         _pkg_min_version=m4_default([$1], [0.9.0])
497         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
498         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
499                 AC_MSG_RESULT([yes])
500         else
501                 AC_MSG_RESULT([no])
502                 PKG_CONFIG=""
503         fi
504 fi[]dnl
505 ])# PKG_PROG_PKG_CONFIG
506
507 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
508 #
509 # Check to see whether a particular set of modules exists.  Similar
510 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
511 #
512 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
513 # only at the first occurence in configure.ac, so if the first place
514 # it's called might be skipped (such as if it is within an "if", you
515 # have to call PKG_CHECK_EXISTS manually
516 # --------------------------------------------------------------
517 AC_DEFUN([PKG_CHECK_EXISTS],
518 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
519 if test -n "$PKG_CONFIG" && \
520     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
521   m4_default([$2], [:])
522 m4_ifvaln([$3], [else
523   $3])dnl
524 fi])
525
526 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
527 # ---------------------------------------------
528 m4_define([_PKG_CONFIG],
529 [if test -n "$$1"; then
530     pkg_cv_[]$1="$$1"
531  elif test -n "$PKG_CONFIG"; then
532     PKG_CHECK_EXISTS([$3],
533                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
534                      [pkg_failed=yes])
535  else
536     pkg_failed=untried
537 fi[]dnl
538 ])# _PKG_CONFIG
539
540 # _PKG_SHORT_ERRORS_SUPPORTED
541 # -----------------------------
542 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
543 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
544 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
545         _pkg_short_errors_supported=yes
546 else
547         _pkg_short_errors_supported=no
548 fi[]dnl
549 ])# _PKG_SHORT_ERRORS_SUPPORTED
550
551
552 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
553 # [ACTION-IF-NOT-FOUND])
554 #
555 #
556 # Note that if there is a possibility the first call to
557 # PKG_CHECK_MODULES might not happen, you should be sure to include an
558 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
559 #
560 #
561 # --------------------------------------------------------------
562 AC_DEFUN([PKG_CHECK_MODULES],
563 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
564 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
565 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
566
567 pkg_failed=no
568 AC_MSG_CHECKING([for $1])
569
570 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
571 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
572
573 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
574 and $1[]_LIBS to avoid the need to call pkg-config.
575 See the pkg-config man page for more details.])
576
577 if test $pkg_failed = yes; then
578         AC_MSG_RESULT([no])
579         _PKG_SHORT_ERRORS_SUPPORTED
580         if test $_pkg_short_errors_supported = yes; then
581                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
582         else 
583                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
584         fi
585         # Put the nasty error message in config.log where it belongs
586         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
587
588         m4_default([$4], [AC_MSG_ERROR(
589 [Package requirements ($2) were not met:
590
591 $$1_PKG_ERRORS
592
593 Consider adjusting the PKG_CONFIG_PATH environment variable if you
594 installed software in a non-standard prefix.
595
596 _PKG_TEXT])
597         ])
598 elif test $pkg_failed = untried; then
599         AC_MSG_RESULT([no])
600         m4_default([$4], [AC_MSG_FAILURE(
601 [The pkg-config script could not be found or is too old.  Make sure it
602 is in your PATH or set the PKG_CONFIG environment variable to the full
603 path to pkg-config.
604
605 _PKG_TEXT
606
607 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
608         ])
609 else
610         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
611         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
612         AC_MSG_RESULT([yes])
613         $3
614 fi[]dnl
615 ])# PKG_CHECK_MODULES
616
617 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
618 #
619 # This file is free software; the Free Software Foundation
620 # gives unlimited permission to copy and/or distribute it,
621 # with or without modifications, as long as this notice is preserved.
622
623 # AM_AUTOMAKE_VERSION(VERSION)
624 # ----------------------------
625 # Automake X.Y traces this macro to ensure aclocal.m4 has been
626 # generated from the m4 files accompanying Automake X.Y.
627 # (This private macro should not be called outside this file.)
628 AC_DEFUN([AM_AUTOMAKE_VERSION],
629 [am__api_version='1.11'
630 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
631 dnl require some minimum version.  Point them to the right macro.
632 m4_if([$1], [1.11.1], [],
633       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
634 ])
635
636 # _AM_AUTOCONF_VERSION(VERSION)
637 # -----------------------------
638 # aclocal traces this macro to find the Autoconf version.
639 # This is a private macro too.  Using m4_define simplifies
640 # the logic in aclocal, which can simply ignore this definition.
641 m4_define([_AM_AUTOCONF_VERSION], [])
642
643 # AM_SET_CURRENT_AUTOMAKE_VERSION
644 # -------------------------------
645 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
646 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
647 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
648 [AM_AUTOMAKE_VERSION([1.11.1])dnl
649 m4_ifndef([AC_AUTOCONF_VERSION],
650   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
651 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
652
653 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
654
655 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
656 #
657 # This file is free software; the Free Software Foundation
658 # gives unlimited permission to copy and/or distribute it,
659 # with or without modifications, as long as this notice is preserved.
660
661 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
662 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
663 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
664 #
665 # Of course, Automake must honor this variable whenever it calls a
666 # tool from the auxiliary directory.  The problem is that $srcdir (and
667 # therefore $ac_aux_dir as well) can be either absolute or relative,
668 # depending on how configure is run.  This is pretty annoying, since
669 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
670 # source directory, any form will work fine, but in subdirectories a
671 # relative path needs to be adjusted first.
672 #
673 # $ac_aux_dir/missing
674 #    fails when called from a subdirectory if $ac_aux_dir is relative
675 # $top_srcdir/$ac_aux_dir/missing
676 #    fails if $ac_aux_dir is absolute,
677 #    fails when called from a subdirectory in a VPATH build with
678 #          a relative $ac_aux_dir
679 #
680 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
681 # are both prefixed by $srcdir.  In an in-source build this is usually
682 # harmless because $srcdir is `.', but things will broke when you
683 # start a VPATH build or use an absolute $srcdir.
684 #
685 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
686 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
687 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
688 # and then we would define $MISSING as
689 #   MISSING="\${SHELL} $am_aux_dir/missing"
690 # This will work as long as MISSING is not called from configure, because
691 # unfortunately $(top_srcdir) has no meaning in configure.
692 # However there are other variables, like CC, which are often used in
693 # configure, and could therefore not use this "fixed" $ac_aux_dir.
694 #
695 # Another solution, used here, is to always expand $ac_aux_dir to an
696 # absolute PATH.  The drawback is that using absolute paths prevent a
697 # configured tree to be moved without reconfiguration.
698
699 AC_DEFUN([AM_AUX_DIR_EXPAND],
700 [dnl Rely on autoconf to set up CDPATH properly.
701 AC_PREREQ([2.50])dnl
702 # expand $ac_aux_dir to an absolute path
703 am_aux_dir=`cd $ac_aux_dir && pwd`
704 ])
705
706
707 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
708 # Free Software Foundation, Inc.
709 #
710 # This file is free software; the Free Software Foundation
711 # gives unlimited permission to copy and/or distribute it,
712 # with or without modifications, as long as this notice is preserved.
713
714 # serial 4
715
716 # This was merged into AC_PROG_CC in Autoconf.
717
718 AU_DEFUN([AM_PROG_CC_STDC],
719 [AC_PROG_CC
720 AC_DIAGNOSE([obsolete], [$0:
721         your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
722         `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
723         you adjust the code.  You can also remove the above call to
724         AC_PROG_CC if you already called it elsewhere.])
725 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
726 ])
727 AU_DEFUN([fp_PROG_CC_STDC])
728
729 # AM_CONDITIONAL                                            -*- Autoconf -*-
730
731 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
732 # Free Software Foundation, Inc.
733 #
734 # This file is free software; the Free Software Foundation
735 # gives unlimited permission to copy and/or distribute it,
736 # with or without modifications, as long as this notice is preserved.
737
738 # serial 9
739
740 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
741 # -------------------------------------
742 # Define a conditional.
743 AC_DEFUN([AM_CONDITIONAL],
744 [AC_PREREQ(2.52)dnl
745  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
746         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
747 AC_SUBST([$1_TRUE])dnl
748 AC_SUBST([$1_FALSE])dnl
749 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
750 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
751 m4_define([_AM_COND_VALUE_$1], [$2])dnl
752 if $2; then
753   $1_TRUE=
754   $1_FALSE='#'
755 else
756   $1_TRUE='#'
757   $1_FALSE=
758 fi
759 AC_CONFIG_COMMANDS_PRE(
760 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
761   AC_MSG_ERROR([[conditional "$1" was never defined.
762 Usually this means the macro was only invoked conditionally.]])
763 fi])])
764
765 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
766 # Free Software Foundation, Inc.
767 #
768 # This file is free software; the Free Software Foundation
769 # gives unlimited permission to copy and/or distribute it,
770 # with or without modifications, as long as this notice is preserved.
771
772 # serial 10
773
774 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
775 # written in clear, in which case automake, when reading aclocal.m4,
776 # will think it sees a *use*, and therefore will trigger all it's
777 # C support machinery.  Also note that it means that autoscan, seeing
778 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
779
780
781 # _AM_DEPENDENCIES(NAME)
782 # ----------------------
783 # See how the compiler implements dependency checking.
784 # NAME is "CC", "CXX", "GCJ", or "OBJC".
785 # We try a few techniques and use that to set a single cache variable.
786 #
787 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
788 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
789 # dependency, and given that the user is not expected to run this macro,
790 # just rely on AC_PROG_CC.
791 AC_DEFUN([_AM_DEPENDENCIES],
792 [AC_REQUIRE([AM_SET_DEPDIR])dnl
793 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
794 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
795 AC_REQUIRE([AM_DEP_TRACK])dnl
796
797 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
798        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
799        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
800        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
801        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
802                    [depcc="$$1"   am_compiler_list=])
803
804 AC_CACHE_CHECK([dependency style of $depcc],
805                [am_cv_$1_dependencies_compiler_type],
806 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
807   # We make a subdir and do the tests there.  Otherwise we can end up
808   # making bogus files that we don't know about and never remove.  For
809   # instance it was reported that on HP-UX the gcc test will end up
810   # making a dummy file named `D' -- because `-MD' means `put the output
811   # in D'.
812   mkdir conftest.dir
813   # Copy depcomp to subdir because otherwise we won't find it if we're
814   # using a relative directory.
815   cp "$am_depcomp" conftest.dir
816   cd conftest.dir
817   # We will build objects and dependencies in a subdirectory because
818   # it helps to detect inapplicable dependency modes.  For instance
819   # both Tru64's cc and ICC support -MD to output dependencies as a
820   # side effect of compilation, but ICC will put the dependencies in
821   # the current directory while Tru64 will put them in the object
822   # directory.
823   mkdir sub
824
825   am_cv_$1_dependencies_compiler_type=none
826   if test "$am_compiler_list" = ""; then
827      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
828   fi
829   am__universal=false
830   m4_case([$1], [CC],
831     [case " $depcc " in #(
832      *\ -arch\ *\ -arch\ *) am__universal=true ;;
833      esac],
834     [CXX],
835     [case " $depcc " in #(
836      *\ -arch\ *\ -arch\ *) am__universal=true ;;
837      esac])
838
839   for depmode in $am_compiler_list; do
840     # Setup a source with many dependencies, because some compilers
841     # like to wrap large dependency lists on column 80 (with \), and
842     # we should not choose a depcomp mode which is confused by this.
843     #
844     # We need to recreate these files for each test, as the compiler may
845     # overwrite some of them when testing with obscure command lines.
846     # This happens at least with the AIX C compiler.
847     : > sub/conftest.c
848     for i in 1 2 3 4 5 6; do
849       echo '#include "conftst'$i'.h"' >> sub/conftest.c
850       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
851       # Solaris 8's {/usr,}/bin/sh.
852       touch sub/conftst$i.h
853     done
854     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
855
856     # We check with `-c' and `-o' for the sake of the "dashmstdout"
857     # mode.  It turns out that the SunPro C++ compiler does not properly
858     # handle `-M -o', and we need to detect this.  Also, some Intel
859     # versions had trouble with output in subdirs
860     am__obj=sub/conftest.${OBJEXT-o}
861     am__minus_obj="-o $am__obj"
862     case $depmode in
863     gcc)
864       # This depmode causes a compiler race in universal mode.
865       test "$am__universal" = false || continue
866       ;;
867     nosideeffect)
868       # after this tag, mechanisms are not by side-effect, so they'll
869       # only be used when explicitly requested
870       if test "x$enable_dependency_tracking" = xyes; then
871         continue
872       else
873         break
874       fi
875       ;;
876     msvisualcpp | msvcmsys)
877       # This compiler won't grok `-c -o', but also, the minuso test has
878       # not run yet.  These depmodes are late enough in the game, and
879       # so weak that their functioning should not be impacted.
880       am__obj=conftest.${OBJEXT-o}
881       am__minus_obj=
882       ;;
883     none) break ;;
884     esac
885     if depmode=$depmode \
886        source=sub/conftest.c object=$am__obj \
887        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
888        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
889          >/dev/null 2>conftest.err &&
890        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
891        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
892        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
893        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
894       # icc doesn't choke on unknown options, it will just issue warnings
895       # or remarks (even with -Werror).  So we grep stderr for any message
896       # that says an option was ignored or not supported.
897       # When given -MP, icc 7.0 and 7.1 complain thusly:
898       #   icc: Command line warning: ignoring option '-M'; no argument required
899       # The diagnosis changed in icc 8.0:
900       #   icc: Command line remark: option '-MP' not supported
901       if (grep 'ignoring option' conftest.err ||
902           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
903         am_cv_$1_dependencies_compiler_type=$depmode
904         break
905       fi
906     fi
907   done
908
909   cd ..
910   rm -rf conftest.dir
911 else
912   am_cv_$1_dependencies_compiler_type=none
913 fi
914 ])
915 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
916 AM_CONDITIONAL([am__fastdep$1], [
917   test "x$enable_dependency_tracking" != xno \
918   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
919 ])
920
921
922 # AM_SET_DEPDIR
923 # -------------
924 # Choose a directory name for dependency files.
925 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
926 AC_DEFUN([AM_SET_DEPDIR],
927 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
928 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
929 ])
930
931
932 # AM_DEP_TRACK
933 # ------------
934 AC_DEFUN([AM_DEP_TRACK],
935 [AC_ARG_ENABLE(dependency-tracking,
936 [  --disable-dependency-tracking  speeds up one-time build
937   --enable-dependency-tracking   do not reject slow dependency extractors])
938 if test "x$enable_dependency_tracking" != xno; then
939   am_depcomp="$ac_aux_dir/depcomp"
940   AMDEPBACKSLASH='\'
941 fi
942 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
943 AC_SUBST([AMDEPBACKSLASH])dnl
944 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
945 ])
946
947 # Generate code to set up dependency tracking.              -*- Autoconf -*-
948
949 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
950 # Free Software Foundation, Inc.
951 #
952 # This file is free software; the Free Software Foundation
953 # gives unlimited permission to copy and/or distribute it,
954 # with or without modifications, as long as this notice is preserved.
955
956 #serial 5
957
958 # _AM_OUTPUT_DEPENDENCY_COMMANDS
959 # ------------------------------
960 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
961 [{
962   # Autoconf 2.62 quotes --file arguments for eval, but not when files
963   # are listed without --file.  Let's play safe and only enable the eval
964   # if we detect the quoting.
965   case $CONFIG_FILES in
966   *\'*) eval set x "$CONFIG_FILES" ;;
967   *)   set x $CONFIG_FILES ;;
968   esac
969   shift
970   for mf
971   do
972     # Strip MF so we end up with the name of the file.
973     mf=`echo "$mf" | sed -e 's/:.*$//'`
974     # Check whether this is an Automake generated Makefile or not.
975     # We used to match only the files named `Makefile.in', but
976     # some people rename them; so instead we look at the file content.
977     # Grep'ing the first line is not enough: some people post-process
978     # each Makefile.in and add a new line on top of each file to say so.
979     # Grep'ing the whole file is not good either: AIX grep has a line
980     # limit of 2048, but all sed's we know have understand at least 4000.
981     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
982       dirpart=`AS_DIRNAME("$mf")`
983     else
984       continue
985     fi
986     # Extract the definition of DEPDIR, am__include, and am__quote
987     # from the Makefile without running `make'.
988     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
989     test -z "$DEPDIR" && continue
990     am__include=`sed -n 's/^am__include = //p' < "$mf"`
991     test -z "am__include" && continue
992     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
993     # When using ansi2knr, U may be empty or an underscore; expand it
994     U=`sed -n 's/^U = //p' < "$mf"`
995     # Find all dependency output files, they are included files with
996     # $(DEPDIR) in their names.  We invoke sed twice because it is the
997     # simplest approach to changing $(DEPDIR) to its actual value in the
998     # expansion.
999     for file in `sed -n "
1000       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1001          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1002       # Make sure the directory exists.
1003       test -f "$dirpart/$file" && continue
1004       fdir=`AS_DIRNAME(["$file"])`
1005       AS_MKDIR_P([$dirpart/$fdir])
1006       # echo "creating $dirpart/$file"
1007       echo '# dummy' > "$dirpart/$file"
1008     done
1009   done
1010 }
1011 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1012
1013
1014 # AM_OUTPUT_DEPENDENCY_COMMANDS
1015 # -----------------------------
1016 # This macro should only be invoked once -- use via AC_REQUIRE.
1017 #
1018 # This code is only required when automatic dependency tracking
1019 # is enabled.  FIXME.  This creates each `.P' file that we will
1020 # need in order to bootstrap the dependency handling code.
1021 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1022 [AC_CONFIG_COMMANDS([depfiles],
1023      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1024      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1025 ])
1026
1027 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1028 # Free Software Foundation, Inc.
1029 #
1030 # This file is free software; the Free Software Foundation
1031 # gives unlimited permission to copy and/or distribute it,
1032 # with or without modifications, as long as this notice is preserved.
1033
1034 # serial 8
1035
1036 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
1037 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1038
1039 # Do all the work for Automake.                             -*- Autoconf -*-
1040
1041 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1042 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1043 #
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.
1047
1048 # serial 16
1049
1050 # This macro actually does too much.  Some checks are only needed if
1051 # your package does certain things.  But this isn't really a big deal.
1052
1053 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1054 # AM_INIT_AUTOMAKE([OPTIONS])
1055 # -----------------------------------------------
1056 # The call with PACKAGE and VERSION arguments is the old style
1057 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1058 # and VERSION should now be passed to AC_INIT and removed from
1059 # the call to AM_INIT_AUTOMAKE.
1060 # We support both call styles for the transition.  After
1061 # the next Automake release, Autoconf can make the AC_INIT
1062 # arguments mandatory, and then we can depend on a new Autoconf
1063 # release and drop the old call support.
1064 AC_DEFUN([AM_INIT_AUTOMAKE],
1065 [AC_PREREQ([2.62])dnl
1066 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1067 dnl the ones we care about.
1068 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1069 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1070 AC_REQUIRE([AC_PROG_INSTALL])dnl
1071 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1072   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1073   # is not polluted with repeated "-I."
1074   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1075   # test to see if srcdir already configured
1076   if test -f $srcdir/config.status; then
1077     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1078   fi
1079 fi
1080
1081 # test whether we have cygpath
1082 if test -z "$CYGPATH_W"; then
1083   if (cygpath --version) >/dev/null 2>/dev/null; then
1084     CYGPATH_W='cygpath -w'
1085   else
1086     CYGPATH_W=echo
1087   fi
1088 fi
1089 AC_SUBST([CYGPATH_W])
1090
1091 # Define the identity of the package.
1092 dnl Distinguish between old-style and new-style calls.
1093 m4_ifval([$2],
1094 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1095  AC_SUBST([PACKAGE], [$1])dnl
1096  AC_SUBST([VERSION], [$2])],
1097 [_AM_SET_OPTIONS([$1])dnl
1098 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1099 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1100   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1101  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1102  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1103
1104 _AM_IF_OPTION([no-define],,
1105 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1106  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1107
1108 # Some tools Automake needs.
1109 AC_REQUIRE([AM_SANITY_CHECK])dnl
1110 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1111 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1112 AM_MISSING_PROG(AUTOCONF, autoconf)
1113 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1114 AM_MISSING_PROG(AUTOHEADER, autoheader)
1115 AM_MISSING_PROG(MAKEINFO, makeinfo)
1116 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1117 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1118 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1119 # We need awk for the "check" target.  The system "awk" is bad on
1120 # some platforms.
1121 AC_REQUIRE([AC_PROG_AWK])dnl
1122 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1123 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1124 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1125               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1126                              [_AM_PROG_TAR([v7])])])
1127 _AM_IF_OPTION([no-dependencies],,
1128 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1129                   [_AM_DEPENDENCIES(CC)],
1130                   [define([AC_PROG_CC],
1131                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1132 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1133                   [_AM_DEPENDENCIES(CXX)],
1134                   [define([AC_PROG_CXX],
1135                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1136 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1137                   [_AM_DEPENDENCIES(OBJC)],
1138                   [define([AC_PROG_OBJC],
1139                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1140 ])
1141 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1142 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1143 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
1144 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1145 AC_CONFIG_COMMANDS_PRE(dnl
1146 [m4_provide_if([_AM_COMPILER_EXEEXT],
1147   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1148 ])
1149
1150 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1151 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1152 dnl mangled by Autoconf and run in a shell conditional statement.
1153 m4_define([_AC_COMPILER_EXEEXT],
1154 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1155
1156
1157 # When config.status generates a header, we must update the stamp-h file.
1158 # This file resides in the same directory as the config header
1159 # that is generated.  The stamp files are numbered to have different names.
1160
1161 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1162 # loop where config.status creates the headers, so we can generate
1163 # our stamp files there.
1164 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1165 [# Compute $1's index in $config_headers.
1166 _am_arg=$1
1167 _am_stamp_count=1
1168 for _am_header in $config_headers :; do
1169   case $_am_header in
1170     $_am_arg | $_am_arg:* )
1171       break ;;
1172     * )
1173       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1174   esac
1175 done
1176 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1177
1178 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
1179 #
1180 # This file is free software; the Free Software Foundation
1181 # gives unlimited permission to copy and/or distribute it,
1182 # with or without modifications, as long as this notice is preserved.
1183
1184 # AM_PROG_INSTALL_SH
1185 # ------------------
1186 # Define $install_sh.
1187 AC_DEFUN([AM_PROG_INSTALL_SH],
1188 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1189 if test x"${install_sh}" != xset; then
1190   case $am_aux_dir in
1191   *\ * | *\     *)
1192     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1193   *)
1194     install_sh="\${SHELL} $am_aux_dir/install-sh"
1195   esac
1196 fi
1197 AC_SUBST(install_sh)])
1198
1199 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
1200 #
1201 # This file is free software; the Free Software Foundation
1202 # gives unlimited permission to copy and/or distribute it,
1203 # with or without modifications, as long as this notice is preserved.
1204
1205 # serial 2
1206
1207 # Check whether the underlying file-system supports filenames
1208 # with a leading dot.  For instance MS-DOS doesn't.
1209 AC_DEFUN([AM_SET_LEADING_DOT],
1210 [rm -rf .tst 2>/dev/null
1211 mkdir .tst 2>/dev/null
1212 if test -d .tst; then
1213   am__leading_dot=.
1214 else
1215   am__leading_dot=_
1216 fi
1217 rmdir .tst 2>/dev/null
1218 AC_SUBST([am__leading_dot])])
1219
1220 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1221 # From Jim Meyering
1222
1223 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1224 # Free Software Foundation, Inc.
1225 #
1226 # This file is free software; the Free Software Foundation
1227 # gives unlimited permission to copy and/or distribute it,
1228 # with or without modifications, as long as this notice is preserved.
1229
1230 # serial 5
1231
1232 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1233 # ----------------------------------
1234 # Control maintainer-specific portions of Makefiles.
1235 # Default is to disable them, unless `enable' is passed literally.
1236 # For symmetry, `disable' may be passed as well.  Anyway, the user
1237 # can override the default with the --enable/--disable switch.
1238 AC_DEFUN([AM_MAINTAINER_MODE],
1239 [m4_case(m4_default([$1], [disable]),
1240        [enable], [m4_define([am_maintainer_other], [disable])],
1241        [disable], [m4_define([am_maintainer_other], [enable])],
1242        [m4_define([am_maintainer_other], [enable])
1243         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1244 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1245   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1246   AC_ARG_ENABLE([maintainer-mode],
1247 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
1248                           (and sometimes confusing) to the casual installer],
1249       [USE_MAINTAINER_MODE=$enableval],
1250       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1251   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1252   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1253   MAINT=$MAINTAINER_MODE_TRUE
1254   AC_SUBST([MAINT])dnl
1255 ]
1256 )
1257
1258 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1259
1260 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1261
1262 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
1263 #
1264 # This file is free software; the Free Software Foundation
1265 # gives unlimited permission to copy and/or distribute it,
1266 # with or without modifications, as long as this notice is preserved.
1267
1268 # serial 4
1269
1270 # AM_MAKE_INCLUDE()
1271 # -----------------
1272 # Check to see how make treats includes.
1273 AC_DEFUN([AM_MAKE_INCLUDE],
1274 [am_make=${MAKE-make}
1275 cat > confinc << 'END'
1276 am__doit:
1277         @echo this is the am__doit target
1278 .PHONY: am__doit
1279 END
1280 # If we don't find an include directive, just comment out the code.
1281 AC_MSG_CHECKING([for style of include used by $am_make])
1282 am__include="#"
1283 am__quote=
1284 _am_result=none
1285 # First try GNU make style include.
1286 echo "include confinc" > confmf
1287 # Ignore all kinds of additional output from `make'.
1288 case `$am_make -s -f confmf 2> /dev/null` in #(
1289 *the\ am__doit\ target*)
1290   am__include=include
1291   am__quote=
1292   _am_result=GNU
1293   ;;
1294 esac
1295 # Now try BSD make style include.
1296 if test "$am__include" = "#"; then
1297    echo '.include "confinc"' > confmf
1298    case `$am_make -s -f confmf 2> /dev/null` in #(
1299    *the\ am__doit\ target*)
1300      am__include=.include
1301      am__quote="\""
1302      _am_result=BSD
1303      ;;
1304    esac
1305 fi
1306 AC_SUBST([am__include])
1307 AC_SUBST([am__quote])
1308 AC_MSG_RESULT([$_am_result])
1309 rm -f confinc confmf
1310 ])
1311
1312 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1313
1314 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1315 # Free Software Foundation, Inc.
1316 #
1317 # This file is free software; the Free Software Foundation
1318 # gives unlimited permission to copy and/or distribute it,
1319 # with or without modifications, as long as this notice is preserved.
1320
1321 # serial 6
1322
1323 # AM_MISSING_PROG(NAME, PROGRAM)
1324 # ------------------------------
1325 AC_DEFUN([AM_MISSING_PROG],
1326 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1327 $1=${$1-"${am_missing_run}$2"}
1328 AC_SUBST($1)])
1329
1330
1331 # AM_MISSING_HAS_RUN
1332 # ------------------
1333 # Define MISSING if not defined so far and test if it supports --run.
1334 # If it does, set am_missing_run to use it, otherwise, to nothing.
1335 AC_DEFUN([AM_MISSING_HAS_RUN],
1336 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1337 AC_REQUIRE_AUX_FILE([missing])dnl
1338 if test x"${MISSING+set}" != xset; then
1339   case $am_aux_dir in
1340   *\ * | *\     *)
1341     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1342   *)
1343     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1344   esac
1345 fi
1346 # Use eval to expand $SHELL
1347 if eval "$MISSING --run true"; then
1348   am_missing_run="$MISSING --run "
1349 else
1350   am_missing_run=
1351   AC_MSG_WARN([`missing' script is too old or missing])
1352 fi
1353 ])
1354
1355 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
1356 #
1357 # This file is free software; the Free Software Foundation
1358 # gives unlimited permission to copy and/or distribute it,
1359 # with or without modifications, as long as this notice is preserved.
1360
1361 # AM_PROG_MKDIR_P
1362 # ---------------
1363 # Check for `mkdir -p'.
1364 AC_DEFUN([AM_PROG_MKDIR_P],
1365 [AC_PREREQ([2.60])dnl
1366 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1367 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
1368 dnl while keeping a definition of mkdir_p for backward compatibility.
1369 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1370 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1371 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1372 dnl adjustment using top_builddir (which is defined more often than
1373 dnl MKDIR_P).
1374 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1375 case $mkdir_p in
1376   [[\\/$]]* | ?:[[\\/]]*) ;;
1377   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1378 esac
1379 ])
1380
1381 # Helper functions for option handling.                     -*- Autoconf -*-
1382
1383 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1384 #
1385 # This file is free software; the Free Software Foundation
1386 # gives unlimited permission to copy and/or distribute it,
1387 # with or without modifications, as long as this notice is preserved.
1388
1389 # serial 4
1390
1391 # _AM_MANGLE_OPTION(NAME)
1392 # -----------------------
1393 AC_DEFUN([_AM_MANGLE_OPTION],
1394 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1395
1396 # _AM_SET_OPTION(NAME)
1397 # ------------------------------
1398 # Set option NAME.  Presently that only means defining a flag for this option.
1399 AC_DEFUN([_AM_SET_OPTION],
1400 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1401
1402 # _AM_SET_OPTIONS(OPTIONS)
1403 # ----------------------------------
1404 # OPTIONS is a space-separated list of Automake options.
1405 AC_DEFUN([_AM_SET_OPTIONS],
1406 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1407
1408 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1409 # -------------------------------------------
1410 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1411 AC_DEFUN([_AM_IF_OPTION],
1412 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1413
1414 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1415
1416 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1417 # Free Software Foundation, Inc.
1418 #
1419 # This file is free software; the Free Software Foundation
1420 # gives unlimited permission to copy and/or distribute it,
1421 # with or without modifications, as long as this notice is preserved.
1422
1423 # serial 5
1424
1425 # AM_SANITY_CHECK
1426 # ---------------
1427 AC_DEFUN([AM_SANITY_CHECK],
1428 [AC_MSG_CHECKING([whether build environment is sane])
1429 # Just in case
1430 sleep 1
1431 echo timestamp > conftest.file
1432 # Reject unsafe characters in $srcdir or the absolute working directory
1433 # name.  Accept space and tab only in the latter.
1434 am_lf='
1435 '
1436 case `pwd` in
1437   *[[\\\"\#\$\&\'\`$am_lf]]*)
1438     AC_MSG_ERROR([unsafe absolute working directory name]);;
1439 esac
1440 case $srcdir in
1441   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1442     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1443 esac
1444
1445 # Do `set' in a subshell so we don't clobber the current shell's
1446 # arguments.  Must try -L first in case configure is actually a
1447 # symlink; some systems play weird games with the mod time of symlinks
1448 # (eg FreeBSD returns the mod time of the symlink's containing
1449 # directory).
1450 if (
1451    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1452    if test "$[*]" = "X"; then
1453       # -L didn't work.
1454       set X `ls -t "$srcdir/configure" conftest.file`
1455    fi
1456    rm -f conftest.file
1457    if test "$[*]" != "X $srcdir/configure conftest.file" \
1458       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1459
1460       # If neither matched, then we have a broken ls.  This can happen
1461       # if, for instance, CONFIG_SHELL is bash and it inherits a
1462       # broken ls alias from the environment.  This has actually
1463       # happened.  Such a system could not be considered "sane".
1464       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1465 alias in your environment])
1466    fi
1467
1468    test "$[2]" = conftest.file
1469    )
1470 then
1471    # Ok.
1472    :
1473 else
1474    AC_MSG_ERROR([newly created file is older than distributed files!
1475 Check your system clock])
1476 fi
1477 AC_MSG_RESULT(yes)])
1478
1479 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1480 #
1481 # This file is free software; the Free Software Foundation
1482 # gives unlimited permission to copy and/or distribute it,
1483 # with or without modifications, as long as this notice is preserved.
1484
1485 # AM_PROG_INSTALL_STRIP
1486 # ---------------------
1487 # One issue with vendor `install' (even GNU) is that you can't
1488 # specify the program used to strip binaries.  This is especially
1489 # annoying in cross-compiling environments, where the build's strip
1490 # is unlikely to handle the host's binaries.
1491 # Fortunately install-sh will honor a STRIPPROG variable, so we
1492 # always use install-sh in `make install-strip', and initialize
1493 # STRIPPROG with the value of the STRIP variable (set by the user).
1494 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1495 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1496 # Installed binaries are usually stripped using `strip' when the user
1497 # run `make install-strip'.  However `strip' might not be the right
1498 # tool to use in cross-compilation environments, therefore Automake
1499 # will honor the `STRIP' environment variable to overrule this program.
1500 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1501 if test "$cross_compiling" != no; then
1502   AC_CHECK_TOOL([STRIP], [strip], :)
1503 fi
1504 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1505 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1506
1507 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
1508 #
1509 # This file is free software; the Free Software Foundation
1510 # gives unlimited permission to copy and/or distribute it,
1511 # with or without modifications, as long as this notice is preserved.
1512
1513 # serial 2
1514
1515 # _AM_SUBST_NOTMAKE(VARIABLE)
1516 # ---------------------------
1517 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1518 # This macro is traced by Automake.
1519 AC_DEFUN([_AM_SUBST_NOTMAKE])
1520
1521 # AM_SUBST_NOTMAKE(VARIABLE)
1522 # ---------------------------
1523 # Public sister of _AM_SUBST_NOTMAKE.
1524 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1525
1526 # Check how to create a tarball.                            -*- Autoconf -*-
1527
1528 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1529 #
1530 # This file is free software; the Free Software Foundation
1531 # gives unlimited permission to copy and/or distribute it,
1532 # with or without modifications, as long as this notice is preserved.
1533
1534 # serial 2
1535
1536 # _AM_PROG_TAR(FORMAT)
1537 # --------------------
1538 # Check how to create a tarball in format FORMAT.
1539 # FORMAT should be one of `v7', `ustar', or `pax'.
1540 #
1541 # Substitute a variable $(am__tar) that is a command
1542 # writing to stdout a FORMAT-tarball containing the directory
1543 # $tardir.
1544 #     tardir=directory && $(am__tar) > result.tar
1545 #
1546 # Substitute a variable $(am__untar) that extract such
1547 # a tarball read from stdin.
1548 #     $(am__untar) < result.tar
1549 AC_DEFUN([_AM_PROG_TAR],
1550 [# Always define AMTAR for backward compatibility.
1551 AM_MISSING_PROG([AMTAR], [tar])
1552 m4_if([$1], [v7],
1553      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1554      [m4_case([$1], [ustar],, [pax],,
1555               [m4_fatal([Unknown tar format])])
1556 AC_MSG_CHECKING([how to create a $1 tar archive])
1557 # Loop over all known methods to create a tar archive until one works.
1558 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1559 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1560 # Do not fold the above two line into one, because Tru64 sh and
1561 # Solaris sh will not grok spaces in the rhs of `-'.
1562 for _am_tool in $_am_tools
1563 do
1564   case $_am_tool in
1565   gnutar)
1566     for _am_tar in tar gnutar gtar;
1567     do
1568       AM_RUN_LOG([$_am_tar --version]) && break
1569     done
1570     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1571     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1572     am__untar="$_am_tar -xf -"
1573     ;;
1574   plaintar)
1575     # Must skip GNU tar: if it does not support --format= it doesn't create
1576     # ustar tarball either.
1577     (tar --version) >/dev/null 2>&1 && continue
1578     am__tar='tar chf - "$$tardir"'
1579     am__tar_='tar chf - "$tardir"'
1580     am__untar='tar xf -'
1581     ;;
1582   pax)
1583     am__tar='pax -L -x $1 -w "$$tardir"'
1584     am__tar_='pax -L -x $1 -w "$tardir"'
1585     am__untar='pax -r'
1586     ;;
1587   cpio)
1588     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1589     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1590     am__untar='cpio -i -H $1 -d'
1591     ;;
1592   none)
1593     am__tar=false
1594     am__tar_=false
1595     am__untar=false
1596     ;;
1597   esac
1598
1599   # If the value was cached, stop now.  We just wanted to have am__tar
1600   # and am__untar set.
1601   test -n "${am_cv_prog_tar_$1}" && break
1602
1603   # tar/untar a dummy directory, and stop if the command works
1604   rm -rf conftest.dir
1605   mkdir conftest.dir
1606   echo GrepMe > conftest.dir/file
1607   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1608   rm -rf conftest.dir
1609   if test -s conftest.tar; then
1610     AM_RUN_LOG([$am__untar <conftest.tar])
1611     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1612   fi
1613 done
1614 rm -rf conftest.dir
1615
1616 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1617 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1618 AC_SUBST([am__tar])
1619 AC_SUBST([am__untar])
1620 ]) # _AM_PROG_TAR
1621