Bump to ecryptfs-utils 111
[platform/upstream/ecryptfs-utils.git] / aclocal.m4
1 # generated automatically by aclocal 1.15 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
24 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
25 #
26 # This file is free software, distributed under the terms of the GNU
27 # General Public License.  As a special exception to the GNU General
28 # Public License, this file may be distributed as part of a program
29 # that contains a configuration script generated by Autoconf, under
30 # the same distribution terms as the rest of that program.
31 #
32 # This file can be copied and used freely without restrictions.  It can
33 # be used in projects which are not available under the GNU Public License
34 # but which still want to provide support for the GNU gettext functionality.
35 #
36 # Macro to add for using GNU gettext.
37 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38 #
39 # Modified to never use included libintl. 
40 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
41 #
42 # Major rework to remove unused code
43 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
44 #
45 # Added better handling of ALL_LINGUAS from GNU gettext version 
46 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47 #
48 # Modified to require ngettext
49 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
50 #
51 # We need this here as well, since someone might use autoconf-2.5x
52 # to configure GLib then an older version to configure a package
53 # using AM_GLIB_GNU_GETTEXT
54 AC_PREREQ(2.53)
55
56 dnl
57 dnl We go to great lengths to make sure that aclocal won't 
58 dnl try to pull in the installed version of these macros
59 dnl when running aclocal in the glib directory.
60 dnl
61 m4_copy([AC_DEFUN],[glib_DEFUN])
62 m4_copy([AC_REQUIRE],[glib_REQUIRE])
63 dnl
64 dnl At the end, if we're not within glib, we'll define the public
65 dnl definitions in terms of our private definitions.
66 dnl
67
68 # GLIB_LC_MESSAGES
69 #--------------------
70 glib_DEFUN([GLIB_LC_MESSAGES],
71   [AC_CHECK_HEADERS([locale.h])
72     if test $ac_cv_header_locale_h = yes; then
73     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76     if test $am_cv_val_LC_MESSAGES = yes; then
77       AC_DEFINE(HAVE_LC_MESSAGES, 1,
78         [Define if your <locale.h> file defines LC_MESSAGES.])
79     fi
80   fi])
81
82 # GLIB_PATH_PROG_WITH_TEST
83 #----------------------------
84 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87 [# Extract the first word of "$2", so it can be a program name with args.
88 set dummy $2; ac_word=[$]2
89 AC_MSG_CHECKING([for $ac_word])
90 AC_CACHE_VAL(ac_cv_path_$1,
91 [case "[$]$1" in
92   /*)
93   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
94   ;;
95   *)
96   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97   for ac_dir in ifelse([$5], , $PATH, [$5]); do
98     test -z "$ac_dir" && ac_dir=.
99     if test -f $ac_dir/$ac_word; then
100       if [$3]; then
101         ac_cv_path_$1="$ac_dir/$ac_word"
102         break
103       fi
104     fi
105   done
106   IFS="$ac_save_ifs"
107 dnl If no 4th arg is given, leave the cache variable unset,
108 dnl so AC_PATH_PROGS will keep looking.
109 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
110 ])dnl
111   ;;
112 esac])dnl
113 $1="$ac_cv_path_$1"
114 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
115   AC_MSG_RESULT([$]$1)
116 else
117   AC_MSG_RESULT(no)
118 fi
119 AC_SUBST($1)dnl
120 ])
121
122 # GLIB_WITH_NLS
123 #-----------------
124 glib_DEFUN([GLIB_WITH_NLS],
125   dnl NLS is obligatory
126   [USE_NLS=yes
127     AC_SUBST(USE_NLS)
128
129     gt_cv_have_gettext=no
130
131     CATOBJEXT=NONE
132     XGETTEXT=:
133     INTLLIBS=
134
135     AC_CHECK_HEADER(libintl.h,
136      [gt_cv_func_dgettext_libintl="no"
137       libintl_extra_libs=""
138
139       #
140       # First check in libc
141       #
142       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
143         [AC_TRY_LINK([
144 #include <libintl.h>
145 ],
146          [return !ngettext ("","", 1)],
147           gt_cv_func_ngettext_libc=yes,
148           gt_cv_func_ngettext_libc=no)
149         ])
150   
151       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
153                 [AC_TRY_LINK([
154 #include <libintl.h>
155 ],
156                   [return !dgettext ("","")],
157                   gt_cv_func_dgettext_libc=yes,
158                   gt_cv_func_dgettext_libc=no)
159                 ])
160       fi
161   
162       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163         AC_CHECK_FUNCS(bind_textdomain_codeset)
164       fi
165
166       #
167       # If we don't have everything we want, check in libintl
168       #
169       if test "$gt_cv_func_dgettext_libc" != "yes" \
170          || test "$gt_cv_func_ngettext_libc" != "yes" \
171          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172         
173         AC_CHECK_LIB(intl, bindtextdomain,
174             [AC_CHECK_LIB(intl, ngettext,
175                     [AC_CHECK_LIB(intl, dgettext,
176                                   gt_cv_func_dgettext_libintl=yes)])])
177
178         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179           AC_MSG_CHECKING([if -liconv is needed to use gettext])
180           AC_MSG_RESULT([])
181           AC_CHECK_LIB(intl, ngettext,
182                 [AC_CHECK_LIB(intl, dcgettext,
183                        [gt_cv_func_dgettext_libintl=yes
184                         libintl_extra_libs=-liconv],
185                         :,-liconv)],
186                 :,-liconv)
187         fi
188
189         #
190         # If we found libintl, then check in it for bind_textdomain_codeset();
191         # we'll prefer libc if neither have bind_textdomain_codeset(),
192         # and both have dgettext and ngettext
193         #
194         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195           glib_save_LIBS="$LIBS"
196           LIBS="$LIBS -lintl $libintl_extra_libs"
197           unset ac_cv_func_bind_textdomain_codeset
198           AC_CHECK_FUNCS(bind_textdomain_codeset)
199           LIBS="$glib_save_LIBS"
200
201           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202             gt_cv_func_dgettext_libc=no
203           else
204             if test "$gt_cv_func_dgettext_libc" = "yes" \
205                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
206               gt_cv_func_dgettext_libintl=no
207             fi
208           fi
209         fi
210       fi
211
212       if test "$gt_cv_func_dgettext_libc" = "yes" \
213         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
214         gt_cv_have_gettext=yes
215       fi
216   
217       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218         INTLLIBS="-lintl $libintl_extra_libs"
219       fi
220   
221       if test "$gt_cv_have_gettext" = "yes"; then
222         AC_DEFINE(HAVE_GETTEXT,1,
223           [Define if the GNU gettext() function is already present or preinstalled.])
224         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226         if test "$MSGFMT" != "no"; then
227           glib_save_LIBS="$LIBS"
228           LIBS="$LIBS $INTLLIBS"
229           AC_CHECK_FUNCS(dcgettext)
230           MSGFMT_OPTS=
231           AC_MSG_CHECKING([if msgfmt accepts -c])
232           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
233 msgid ""
234 msgstr ""
235 "Content-Type: text/plain; charset=UTF-8\n"
236 "Project-Id-Version: test 1.0\n"
237 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
238 "Last-Translator: test <foo@bar.xx>\n"
239 "Language-Team: C <LL@li.org>\n"
240 "MIME-Version: 1.0\n"
241 "Content-Transfer-Encoding: 8bit\n"
242 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243           AC_SUBST(MSGFMT_OPTS)
244           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248                          return _nl_msg_cat_cntr],
249             [CATOBJEXT=.gmo 
250              DATADIRNAME=share],
251             [case $host in
252             *-*-solaris*)
253             dnl On Solaris, if bind_textdomain_codeset is in libc,
254             dnl GNU format message catalog is always supported,
255             dnl since both are added to the libc all together.
256             dnl Hence, we'd like to go with DATADIRNAME=share and
257             dnl and CATOBJEXT=.gmo in this case.
258             AC_CHECK_FUNC(bind_textdomain_codeset,
259               [CATOBJEXT=.gmo 
260                DATADIRNAME=share],
261               [CATOBJEXT=.mo
262                DATADIRNAME=lib])
263             ;;
264             *-*-openbsd*)
265             CATOBJEXT=.mo
266             DATADIRNAME=share
267             ;;
268             *)
269             CATOBJEXT=.mo
270             DATADIRNAME=lib
271             ;;
272             esac])
273           LIBS="$glib_save_LIBS"
274           INSTOBJEXT=.mo
275         else
276           gt_cv_have_gettext=no
277         fi
278       fi
279     ])
280
281     if test "$gt_cv_have_gettext" = "yes" ; then
282       AC_DEFINE(ENABLE_NLS, 1,
283         [always defined to indicate that i18n is enabled])
284     fi
285
286     dnl Test whether we really found GNU xgettext.
287     if test "$XGETTEXT" != ":"; then
288       dnl If it is not GNU xgettext we define it as : so that the
289       dnl Makefiles still can work.
290       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
291         : ;
292       else
293         AC_MSG_RESULT(
294           [found xgettext program is not GNU xgettext; ignore it])
295         XGETTEXT=":"
296       fi
297     fi
298
299     # We need to process the po/ directory.
300     POSUB=po
301
302     AC_OUTPUT_COMMANDS(
303       [case "$CONFIG_FILES" in *po/Makefile.in*)
304         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
305       esac])
306
307     dnl These rules are solely for the distribution goal.  While doing this
308     dnl we only have to keep exactly one list of the available catalogs
309     dnl in configure.ac.
310     for lang in $ALL_LINGUAS; do
311       GMOFILES="$GMOFILES $lang.gmo"
312       POFILES="$POFILES $lang.po"
313     done
314
315     dnl Make all variables we use known to autoconf.
316     AC_SUBST(CATALOGS)
317     AC_SUBST(CATOBJEXT)
318     AC_SUBST(DATADIRNAME)
319     AC_SUBST(GMOFILES)
320     AC_SUBST(INSTOBJEXT)
321     AC_SUBST(INTLLIBS)
322     AC_SUBST(PO_IN_DATADIR_TRUE)
323     AC_SUBST(PO_IN_DATADIR_FALSE)
324     AC_SUBST(POFILES)
325     AC_SUBST(POSUB)
326   ])
327
328 # AM_GLIB_GNU_GETTEXT
329 # -------------------
330 # Do checks necessary for use of gettext. If a suitable implementation 
331 # of gettext is found in either in libintl or in the C library,
332 # it will set INTLLIBS to the libraries needed for use of gettext
333 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335 # on various variables needed by the Makefile.in.in installed by 
336 # glib-gettextize.
337 dnl
338 AU_DEFUN([GLIB_GNU_GETTEXT],
339   [AC_REQUIRE([AC_PROG_CC])dnl
340    
341    GLIB_LC_MESSAGES
342    GLIB_WITH_NLS
343
344    if test "$gt_cv_have_gettext" = "yes"; then
345      if test "x$ALL_LINGUAS" = "x"; then
346        LINGUAS=
347      else
348        AC_MSG_CHECKING(for catalogs to be installed)
349        NEW_LINGUAS=
350        for presentlang in $ALL_LINGUAS; do
351          useit=no
352          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
353            desiredlanguages="$LINGUAS"
354          else
355            desiredlanguages="$ALL_LINGUAS"
356          fi
357          for desiredlang in $desiredlanguages; do
358            # Use the presentlang catalog if desiredlang is
359            #   a. equal to presentlang, or
360            #   b. a variant of presentlang (because in this case,
361            #      presentlang can be used as a fallback for messages
362            #      which are not translated in the desiredlang catalog).
363            case "$desiredlang" in
364              "$presentlang"*) useit=yes;;
365            esac
366          done
367          if test $useit = yes; then
368            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
369          fi
370        done
371        LINGUAS=$NEW_LINGUAS
372        AC_MSG_RESULT($LINGUAS)
373      fi
374
375      dnl Construct list of names of catalog files to be constructed.
376      if test -n "$LINGUAS"; then
377        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
378      fi
379    fi
380
381    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
382    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
383    dnl Try to locate is.
384    MKINSTALLDIRS=
385    if test -n "$ac_aux_dir"; then
386      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
387    fi
388    if test -z "$MKINSTALLDIRS"; then
389      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
390    fi
391    AC_SUBST(MKINSTALLDIRS)
392
393    dnl Generate list of files to be processed by xgettext which will
394    dnl be included in po/Makefile.
395    test -d po || mkdir po
396    if test "x$srcdir" != "x."; then
397      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
398        posrcprefix="$srcdir/"
399      else
400        posrcprefix="../$srcdir/"
401      fi
402    else
403      posrcprefix="../"
404    fi
405    rm -f po/POTFILES
406    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
407         < $srcdir/po/POTFILES.in > po/POTFILES
408   ],
409   [[$0: This macro is deprecated. You should use upstream gettext instead.]])
410
411 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
412 # -------------------------------
413 # Define VARIABLE to the location where catalog files will
414 # be installed by po/Makefile.
415 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
416 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
417 glib_save_prefix="$prefix"
418 glib_save_exec_prefix="$exec_prefix"
419 glib_save_datarootdir="$datarootdir"
420 test "x$prefix" = xNONE && prefix=$ac_default_prefix
421 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
422 datarootdir=`eval echo "${datarootdir}"`
423 if test "x$CATOBJEXT" = "x.mo" ; then
424   localedir=`eval echo "${libdir}/locale"`
425 else
426   localedir=`eval echo "${datadir}/locale"`
427 fi
428 prefix="$glib_save_prefix"
429 exec_prefix="$glib_save_exec_prefix"
430 datarootdir="$glib_save_datarootdir"
431 AC_DEFINE_UNQUOTED($1, "$localedir",
432   [Define the location where the catalogs will be installed])
433 ])
434
435 dnl
436 dnl Now the definitions that aclocal will find
437 dnl
438 ifdef(glib_configure_ac,[],[
439 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
440 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
441 ])dnl
442
443 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
444
445 # Create a temporary file with TEST-FILE as its contents and pass the
446 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
447 # 0 and perform ACTION-IF-FAIL for any other exit status.
448 AC_DEFUN([GLIB_RUN_PROG],
449 [cat >conftest.foo <<_ACEOF
450 $2
451 _ACEOF
452 if AC_RUN_LOG([$1 conftest.foo]); then
453   m4_ifval([$3], [$3], [:])
454 m4_ifvaln([$4], [else $4])dnl
455 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
456 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
457 fi])
458
459
460 # nls.m4 serial 5 (gettext-0.18)
461 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
462 dnl Inc.
463 dnl This file is free software; the Free Software Foundation
464 dnl gives unlimited permission to copy and/or distribute it,
465 dnl with or without modifications, as long as this notice is preserved.
466 dnl
467 dnl This file can be used in projects which are not available under
468 dnl the GNU General Public License or the GNU Library General Public
469 dnl License but which still want to provide support for the GNU gettext
470 dnl functionality.
471 dnl Please note that the actual code of the GNU gettext library is covered
472 dnl by the GNU Library General Public License, and the rest of the GNU
473 dnl gettext package is covered by the GNU General Public License.
474 dnl They are *not* in the public domain.
475
476 dnl Authors:
477 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
478 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
479
480 AC_PREREQ([2.50])
481
482 AC_DEFUN([AM_NLS],
483 [
484   AC_MSG_CHECKING([whether NLS is requested])
485   dnl Default is enabled NLS
486   AC_ARG_ENABLE([nls],
487     [  --disable-nls           do not use Native Language Support],
488     USE_NLS=$enableval, USE_NLS=yes)
489   AC_MSG_RESULT([$USE_NLS])
490   AC_SUBST([USE_NLS])
491 ])
492
493 dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
494 dnl serial 11 (pkg-config-0.29)
495 dnl
496 dnl Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
497 dnl Copyright Â© 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
498 dnl
499 dnl This program is free software; you can redistribute it and/or modify
500 dnl it under the terms of the GNU General Public License as published by
501 dnl the Free Software Foundation; either version 2 of the License, or
502 dnl (at your option) any later version.
503 dnl
504 dnl This program is distributed in the hope that it will be useful, but
505 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
506 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
507 dnl General Public License for more details.
508 dnl
509 dnl You should have received a copy of the GNU General Public License
510 dnl along with this program; if not, write to the Free Software
511 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
512 dnl 02111-1307, USA.
513 dnl
514 dnl As a special exception to the GNU General Public License, if you
515 dnl distribute this file as part of a program that contains a
516 dnl configuration script generated by Autoconf, you may include it under
517 dnl the same distribution terms that you use for the rest of that
518 dnl program.
519
520 dnl PKG_PREREQ(MIN-VERSION)
521 dnl -----------------------
522 dnl Since: 0.29
523 dnl
524 dnl Verify that the version of the pkg-config macros are at least
525 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
526 dnl installed version of pkg-config, this checks the developer's version
527 dnl of pkg.m4 when generating configure.
528 dnl
529 dnl To ensure that this macro is defined, also add:
530 dnl m4_ifndef([PKG_PREREQ],
531 dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
532 dnl
533 dnl See the "Since" comment for each macro you use to see what version
534 dnl of the macros you require.
535 m4_defun([PKG_PREREQ],
536 [m4_define([PKG_MACROS_VERSION], [0.29])
537 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
538     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
539 ])dnl PKG_PREREQ
540
541 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
542 dnl ----------------------------------
543 dnl Since: 0.16
544 dnl
545 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
546 dnl first found in the path. Checks that the version of pkg-config found
547 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
548 dnl used since that's the first version where most current features of
549 dnl pkg-config existed.
550 AC_DEFUN([PKG_PROG_PKG_CONFIG],
551 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
552 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
553 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
554 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
555 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
556 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
557
558 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
559         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
560 fi
561 if test -n "$PKG_CONFIG"; then
562         _pkg_min_version=m4_default([$1], [0.9.0])
563         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
564         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
565                 AC_MSG_RESULT([yes])
566         else
567                 AC_MSG_RESULT([no])
568                 PKG_CONFIG=""
569         fi
570 fi[]dnl
571 ])dnl PKG_PROG_PKG_CONFIG
572
573 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
574 dnl -------------------------------------------------------------------
575 dnl Since: 0.18
576 dnl
577 dnl Check to see whether a particular set of modules exists. Similar to
578 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
579 dnl
580 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
581 dnl only at the first occurence in configure.ac, so if the first place
582 dnl it's called might be skipped (such as if it is within an "if", you
583 dnl have to call PKG_CHECK_EXISTS manually
584 AC_DEFUN([PKG_CHECK_EXISTS],
585 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
586 if test -n "$PKG_CONFIG" && \
587     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
588   m4_default([$2], [:])
589 m4_ifvaln([$3], [else
590   $3])dnl
591 fi])
592
593 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
594 dnl ---------------------------------------------
595 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
596 dnl pkg_failed based on the result.
597 m4_define([_PKG_CONFIG],
598 [if test -n "$$1"; then
599     pkg_cv_[]$1="$$1"
600  elif test -n "$PKG_CONFIG"; then
601     PKG_CHECK_EXISTS([$3],
602                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
603                       test "x$?" != "x0" && pkg_failed=yes ],
604                      [pkg_failed=yes])
605  else
606     pkg_failed=untried
607 fi[]dnl
608 ])dnl _PKG_CONFIG
609
610 dnl _PKG_SHORT_ERRORS_SUPPORTED
611 dnl ---------------------------
612 dnl Internal check to see if pkg-config supports short errors.
613 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
614 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
615 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
616         _pkg_short_errors_supported=yes
617 else
618         _pkg_short_errors_supported=no
619 fi[]dnl
620 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
621
622
623 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
624 dnl   [ACTION-IF-NOT-FOUND])
625 dnl --------------------------------------------------------------
626 dnl Since: 0.4.0
627 dnl
628 dnl Note that if there is a possibility the first call to
629 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
630 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
631 AC_DEFUN([PKG_CHECK_MODULES],
632 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
633 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
634 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
635
636 pkg_failed=no
637 AC_MSG_CHECKING([for $1])
638
639 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
640 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
641
642 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
643 and $1[]_LIBS to avoid the need to call pkg-config.
644 See the pkg-config man page for more details.])
645
646 if test $pkg_failed = yes; then
647         AC_MSG_RESULT([no])
648         _PKG_SHORT_ERRORS_SUPPORTED
649         if test $_pkg_short_errors_supported = yes; then
650                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
651         else 
652                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
653         fi
654         # Put the nasty error message in config.log where it belongs
655         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
656
657         m4_default([$4], [AC_MSG_ERROR(
658 [Package requirements ($2) were not met:
659
660 $$1_PKG_ERRORS
661
662 Consider adjusting the PKG_CONFIG_PATH environment variable if you
663 installed software in a non-standard prefix.
664
665 _PKG_TEXT])[]dnl
666         ])
667 elif test $pkg_failed = untried; then
668         AC_MSG_RESULT([no])
669         m4_default([$4], [AC_MSG_FAILURE(
670 [The pkg-config script could not be found or is too old.  Make sure it
671 is in your PATH or set the PKG_CONFIG environment variable to the full
672 path to pkg-config.
673
674 _PKG_TEXT
675
676 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
677         ])
678 else
679         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
680         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
681         AC_MSG_RESULT([yes])
682         $3
683 fi[]dnl
684 ])dnl PKG_CHECK_MODULES
685
686
687 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
688 dnl   [ACTION-IF-NOT-FOUND])
689 dnl ---------------------------------------------------------------------
690 dnl Since: 0.29
691 dnl
692 dnl Checks for existence of MODULES and gathers its build flags with
693 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
694 dnl and VARIABLE-PREFIX_LIBS from --libs.
695 dnl
696 dnl Note that if there is a possibility the first call to
697 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
698 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
699 dnl configure.ac.
700 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
701 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
702 _save_PKG_CONFIG=$PKG_CONFIG
703 PKG_CONFIG="$PKG_CONFIG --static"
704 PKG_CHECK_MODULES($@)
705 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
706 ])dnl PKG_CHECK_MODULES_STATIC
707
708
709 dnl PKG_INSTALLDIR([DIRECTORY])
710 dnl -------------------------
711 dnl Since: 0.27
712 dnl
713 dnl Substitutes the variable pkgconfigdir as the location where a module
714 dnl should install pkg-config .pc files. By default the directory is
715 dnl $libdir/pkgconfig, but the default can be changed by passing
716 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
717 dnl parameter.
718 AC_DEFUN([PKG_INSTALLDIR],
719 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
720 m4_pushdef([pkg_description],
721     [pkg-config installation directory @<:@]pkg_default[@:>@])
722 AC_ARG_WITH([pkgconfigdir],
723     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
724     [with_pkgconfigdir=]pkg_default)
725 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
726 m4_popdef([pkg_default])
727 m4_popdef([pkg_description])
728 ])dnl PKG_INSTALLDIR
729
730
731 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
732 dnl --------------------------------
733 dnl Since: 0.27
734 dnl
735 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
736 dnl module should install arch-independent pkg-config .pc files. By
737 dnl default the directory is $datadir/pkgconfig, but the default can be
738 dnl changed by passing DIRECTORY. The user can override through the
739 dnl --with-noarch-pkgconfigdir parameter.
740 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
741 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
742 m4_pushdef([pkg_description],
743     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
744 AC_ARG_WITH([noarch-pkgconfigdir],
745     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
746     [with_noarch_pkgconfigdir=]pkg_default)
747 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
748 m4_popdef([pkg_default])
749 m4_popdef([pkg_description])
750 ])dnl PKG_NOARCH_INSTALLDIR
751
752
753 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
754 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
755 dnl -------------------------------------------
756 dnl Since: 0.28
757 dnl
758 dnl Retrieves the value of the pkg-config variable for the given module.
759 AC_DEFUN([PKG_CHECK_VAR],
760 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
761 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
762
763 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
764 AS_VAR_COPY([$1], [pkg_cv_][$1])
765
766 AS_VAR_IF([$1], [""], [$5], [$4])dnl
767 ])dnl PKG_CHECK_VAR
768
769 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
770 #
771 # This file is free software; the Free Software Foundation
772 # gives unlimited permission to copy and/or distribute it,
773 # with or without modifications, as long as this notice is preserved.
774
775 # AM_AUTOMAKE_VERSION(VERSION)
776 # ----------------------------
777 # Automake X.Y traces this macro to ensure aclocal.m4 has been
778 # generated from the m4 files accompanying Automake X.Y.
779 # (This private macro should not be called outside this file.)
780 AC_DEFUN([AM_AUTOMAKE_VERSION],
781 [am__api_version='1.15'
782 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
783 dnl require some minimum version.  Point them to the right macro.
784 m4_if([$1], [1.15], [],
785       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
786 ])
787
788 # _AM_AUTOCONF_VERSION(VERSION)
789 # -----------------------------
790 # aclocal traces this macro to find the Autoconf version.
791 # This is a private macro too.  Using m4_define simplifies
792 # the logic in aclocal, which can simply ignore this definition.
793 m4_define([_AM_AUTOCONF_VERSION], [])
794
795 # AM_SET_CURRENT_AUTOMAKE_VERSION
796 # -------------------------------
797 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
798 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
799 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
800 [AM_AUTOMAKE_VERSION([1.15])dnl
801 m4_ifndef([AC_AUTOCONF_VERSION],
802   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
803 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
804
805 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
806
807 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
808 #
809 # This file is free software; the Free Software Foundation
810 # gives unlimited permission to copy and/or distribute it,
811 # with or without modifications, as long as this notice is preserved.
812
813 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
814 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
815 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
816 #
817 # Of course, Automake must honor this variable whenever it calls a
818 # tool from the auxiliary directory.  The problem is that $srcdir (and
819 # therefore $ac_aux_dir as well) can be either absolute or relative,
820 # depending on how configure is run.  This is pretty annoying, since
821 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
822 # source directory, any form will work fine, but in subdirectories a
823 # relative path needs to be adjusted first.
824 #
825 # $ac_aux_dir/missing
826 #    fails when called from a subdirectory if $ac_aux_dir is relative
827 # $top_srcdir/$ac_aux_dir/missing
828 #    fails if $ac_aux_dir is absolute,
829 #    fails when called from a subdirectory in a VPATH build with
830 #          a relative $ac_aux_dir
831 #
832 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
833 # are both prefixed by $srcdir.  In an in-source build this is usually
834 # harmless because $srcdir is '.', but things will broke when you
835 # start a VPATH build or use an absolute $srcdir.
836 #
837 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
838 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
839 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
840 # and then we would define $MISSING as
841 #   MISSING="\${SHELL} $am_aux_dir/missing"
842 # This will work as long as MISSING is not called from configure, because
843 # unfortunately $(top_srcdir) has no meaning in configure.
844 # However there are other variables, like CC, which are often used in
845 # configure, and could therefore not use this "fixed" $ac_aux_dir.
846 #
847 # Another solution, used here, is to always expand $ac_aux_dir to an
848 # absolute PATH.  The drawback is that using absolute paths prevent a
849 # configured tree to be moved without reconfiguration.
850
851 AC_DEFUN([AM_AUX_DIR_EXPAND],
852 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
853 # Expand $ac_aux_dir to an absolute path.
854 am_aux_dir=`cd "$ac_aux_dir" && pwd`
855 ])
856
857 # AM_CONDITIONAL                                            -*- Autoconf -*-
858
859 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
860 #
861 # This file is free software; the Free Software Foundation
862 # gives unlimited permission to copy and/or distribute it,
863 # with or without modifications, as long as this notice is preserved.
864
865 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
866 # -------------------------------------
867 # Define a conditional.
868 AC_DEFUN([AM_CONDITIONAL],
869 [AC_PREREQ([2.52])dnl
870  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
871        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
872 AC_SUBST([$1_TRUE])dnl
873 AC_SUBST([$1_FALSE])dnl
874 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
875 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
876 m4_define([_AM_COND_VALUE_$1], [$2])dnl
877 if $2; then
878   $1_TRUE=
879   $1_FALSE='#'
880 else
881   $1_TRUE='#'
882   $1_FALSE=
883 fi
884 AC_CONFIG_COMMANDS_PRE(
885 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
886   AC_MSG_ERROR([[conditional "$1" was never defined.
887 Usually this means the macro was only invoked conditionally.]])
888 fi])])
889
890 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
891 #
892 # This file is free software; the Free Software Foundation
893 # gives unlimited permission to copy and/or distribute it,
894 # with or without modifications, as long as this notice is preserved.
895
896
897 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
898 # written in clear, in which case automake, when reading aclocal.m4,
899 # will think it sees a *use*, and therefore will trigger all it's
900 # C support machinery.  Also note that it means that autoscan, seeing
901 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
902
903
904 # _AM_DEPENDENCIES(NAME)
905 # ----------------------
906 # See how the compiler implements dependency checking.
907 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
908 # We try a few techniques and use that to set a single cache variable.
909 #
910 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
911 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
912 # dependency, and given that the user is not expected to run this macro,
913 # just rely on AC_PROG_CC.
914 AC_DEFUN([_AM_DEPENDENCIES],
915 [AC_REQUIRE([AM_SET_DEPDIR])dnl
916 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
917 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
918 AC_REQUIRE([AM_DEP_TRACK])dnl
919
920 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
921       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
922       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
923       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
924       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
925       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
926                     [depcc="$$1"   am_compiler_list=])
927
928 AC_CACHE_CHECK([dependency style of $depcc],
929                [am_cv_$1_dependencies_compiler_type],
930 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
931   # We make a subdir and do the tests there.  Otherwise we can end up
932   # making bogus files that we don't know about and never remove.  For
933   # instance it was reported that on HP-UX the gcc test will end up
934   # making a dummy file named 'D' -- because '-MD' means "put the output
935   # in D".
936   rm -rf conftest.dir
937   mkdir conftest.dir
938   # Copy depcomp to subdir because otherwise we won't find it if we're
939   # using a relative directory.
940   cp "$am_depcomp" conftest.dir
941   cd conftest.dir
942   # We will build objects and dependencies in a subdirectory because
943   # it helps to detect inapplicable dependency modes.  For instance
944   # both Tru64's cc and ICC support -MD to output dependencies as a
945   # side effect of compilation, but ICC will put the dependencies in
946   # the current directory while Tru64 will put them in the object
947   # directory.
948   mkdir sub
949
950   am_cv_$1_dependencies_compiler_type=none
951   if test "$am_compiler_list" = ""; then
952      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
953   fi
954   am__universal=false
955   m4_case([$1], [CC],
956     [case " $depcc " in #(
957      *\ -arch\ *\ -arch\ *) am__universal=true ;;
958      esac],
959     [CXX],
960     [case " $depcc " in #(
961      *\ -arch\ *\ -arch\ *) am__universal=true ;;
962      esac])
963
964   for depmode in $am_compiler_list; do
965     # Setup a source with many dependencies, because some compilers
966     # like to wrap large dependency lists on column 80 (with \), and
967     # we should not choose a depcomp mode which is confused by this.
968     #
969     # We need to recreate these files for each test, as the compiler may
970     # overwrite some of them when testing with obscure command lines.
971     # This happens at least with the AIX C compiler.
972     : > sub/conftest.c
973     for i in 1 2 3 4 5 6; do
974       echo '#include "conftst'$i'.h"' >> sub/conftest.c
975       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
976       # Solaris 10 /bin/sh.
977       echo '/* dummy */' > sub/conftst$i.h
978     done
979     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
980
981     # We check with '-c' and '-o' for the sake of the "dashmstdout"
982     # mode.  It turns out that the SunPro C++ compiler does not properly
983     # handle '-M -o', and we need to detect this.  Also, some Intel
984     # versions had trouble with output in subdirs.
985     am__obj=sub/conftest.${OBJEXT-o}
986     am__minus_obj="-o $am__obj"
987     case $depmode in
988     gcc)
989       # This depmode causes a compiler race in universal mode.
990       test "$am__universal" = false || continue
991       ;;
992     nosideeffect)
993       # After this tag, mechanisms are not by side-effect, so they'll
994       # only be used when explicitly requested.
995       if test "x$enable_dependency_tracking" = xyes; then
996         continue
997       else
998         break
999       fi
1000       ;;
1001     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1002       # This compiler won't grok '-c -o', but also, the minuso test has
1003       # not run yet.  These depmodes are late enough in the game, and
1004       # so weak that their functioning should not be impacted.
1005       am__obj=conftest.${OBJEXT-o}
1006       am__minus_obj=
1007       ;;
1008     none) break ;;
1009     esac
1010     if depmode=$depmode \
1011        source=sub/conftest.c object=$am__obj \
1012        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1013        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1014          >/dev/null 2>conftest.err &&
1015        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1016        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1017        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1018        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1019       # icc doesn't choke on unknown options, it will just issue warnings
1020       # or remarks (even with -Werror).  So we grep stderr for any message
1021       # that says an option was ignored or not supported.
1022       # When given -MP, icc 7.0 and 7.1 complain thusly:
1023       #   icc: Command line warning: ignoring option '-M'; no argument required
1024       # The diagnosis changed in icc 8.0:
1025       #   icc: Command line remark: option '-MP' not supported
1026       if (grep 'ignoring option' conftest.err ||
1027           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1028         am_cv_$1_dependencies_compiler_type=$depmode
1029         break
1030       fi
1031     fi
1032   done
1033
1034   cd ..
1035   rm -rf conftest.dir
1036 else
1037   am_cv_$1_dependencies_compiler_type=none
1038 fi
1039 ])
1040 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1041 AM_CONDITIONAL([am__fastdep$1], [
1042   test "x$enable_dependency_tracking" != xno \
1043   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1044 ])
1045
1046
1047 # AM_SET_DEPDIR
1048 # -------------
1049 # Choose a directory name for dependency files.
1050 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1051 AC_DEFUN([AM_SET_DEPDIR],
1052 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1053 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1054 ])
1055
1056
1057 # AM_DEP_TRACK
1058 # ------------
1059 AC_DEFUN([AM_DEP_TRACK],
1060 [AC_ARG_ENABLE([dependency-tracking], [dnl
1061 AS_HELP_STRING(
1062   [--enable-dependency-tracking],
1063   [do not reject slow dependency extractors])
1064 AS_HELP_STRING(
1065   [--disable-dependency-tracking],
1066   [speeds up one-time build])])
1067 if test "x$enable_dependency_tracking" != xno; then
1068   am_depcomp="$ac_aux_dir/depcomp"
1069   AMDEPBACKSLASH='\'
1070   am__nodep='_no'
1071 fi
1072 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1073 AC_SUBST([AMDEPBACKSLASH])dnl
1074 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1075 AC_SUBST([am__nodep])dnl
1076 _AM_SUBST_NOTMAKE([am__nodep])dnl
1077 ])
1078
1079 # Generate code to set up dependency tracking.              -*- Autoconf -*-
1080
1081 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
1082 #
1083 # This file is free software; the Free Software Foundation
1084 # gives unlimited permission to copy and/or distribute it,
1085 # with or without modifications, as long as this notice is preserved.
1086
1087
1088 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1089 # ------------------------------
1090 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1091 [{
1092   # Older Autoconf quotes --file arguments for eval, but not when files
1093   # are listed without --file.  Let's play safe and only enable the eval
1094   # if we detect the quoting.
1095   case $CONFIG_FILES in
1096   *\'*) eval set x "$CONFIG_FILES" ;;
1097   *)   set x $CONFIG_FILES ;;
1098   esac
1099   shift
1100   for mf
1101   do
1102     # Strip MF so we end up with the name of the file.
1103     mf=`echo "$mf" | sed -e 's/:.*$//'`
1104     # Check whether this is an Automake generated Makefile or not.
1105     # We used to match only the files named 'Makefile.in', but
1106     # some people rename them; so instead we look at the file content.
1107     # Grep'ing the first line is not enough: some people post-process
1108     # each Makefile.in and add a new line on top of each file to say so.
1109     # Grep'ing the whole file is not good either: AIX grep has a line
1110     # limit of 2048, but all sed's we know have understand at least 4000.
1111     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1112       dirpart=`AS_DIRNAME("$mf")`
1113     else
1114       continue
1115     fi
1116     # Extract the definition of DEPDIR, am__include, and am__quote
1117     # from the Makefile without running 'make'.
1118     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1119     test -z "$DEPDIR" && continue
1120     am__include=`sed -n 's/^am__include = //p' < "$mf"`
1121     test -z "$am__include" && continue
1122     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1123     # Find all dependency output files, they are included files with
1124     # $(DEPDIR) in their names.  We invoke sed twice because it is the
1125     # simplest approach to changing $(DEPDIR) to its actual value in the
1126     # expansion.
1127     for file in `sed -n "
1128       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1129          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1130       # Make sure the directory exists.
1131       test -f "$dirpart/$file" && continue
1132       fdir=`AS_DIRNAME(["$file"])`
1133       AS_MKDIR_P([$dirpart/$fdir])
1134       # echo "creating $dirpart/$file"
1135       echo '# dummy' > "$dirpart/$file"
1136     done
1137   done
1138 }
1139 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1140
1141
1142 # AM_OUTPUT_DEPENDENCY_COMMANDS
1143 # -----------------------------
1144 # This macro should only be invoked once -- use via AC_REQUIRE.
1145 #
1146 # This code is only required when automatic dependency tracking
1147 # is enabled.  FIXME.  This creates each '.P' file that we will
1148 # need in order to bootstrap the dependency handling code.
1149 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1150 [AC_CONFIG_COMMANDS([depfiles],
1151      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1152      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1153 ])
1154
1155 # Do all the work for Automake.                             -*- Autoconf -*-
1156
1157 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
1158 #
1159 # This file is free software; the Free Software Foundation
1160 # gives unlimited permission to copy and/or distribute it,
1161 # with or without modifications, as long as this notice is preserved.
1162
1163 # This macro actually does too much.  Some checks are only needed if
1164 # your package does certain things.  But this isn't really a big deal.
1165
1166 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1167 m4_define([AC_PROG_CC],
1168 m4_defn([AC_PROG_CC])
1169 [_AM_PROG_CC_C_O
1170 ])
1171
1172 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1173 # AM_INIT_AUTOMAKE([OPTIONS])
1174 # -----------------------------------------------
1175 # The call with PACKAGE and VERSION arguments is the old style
1176 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1177 # and VERSION should now be passed to AC_INIT and removed from
1178 # the call to AM_INIT_AUTOMAKE.
1179 # We support both call styles for the transition.  After
1180 # the next Automake release, Autoconf can make the AC_INIT
1181 # arguments mandatory, and then we can depend on a new Autoconf
1182 # release and drop the old call support.
1183 AC_DEFUN([AM_INIT_AUTOMAKE],
1184 [AC_PREREQ([2.65])dnl
1185 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1186 dnl the ones we care about.
1187 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1188 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1189 AC_REQUIRE([AC_PROG_INSTALL])dnl
1190 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1191   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1192   # is not polluted with repeated "-I."
1193   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1194   # test to see if srcdir already configured
1195   if test -f $srcdir/config.status; then
1196     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1197   fi
1198 fi
1199
1200 # test whether we have cygpath
1201 if test -z "$CYGPATH_W"; then
1202   if (cygpath --version) >/dev/null 2>/dev/null; then
1203     CYGPATH_W='cygpath -w'
1204   else
1205     CYGPATH_W=echo
1206   fi
1207 fi
1208 AC_SUBST([CYGPATH_W])
1209
1210 # Define the identity of the package.
1211 dnl Distinguish between old-style and new-style calls.
1212 m4_ifval([$2],
1213 [AC_DIAGNOSE([obsolete],
1214              [$0: two- and three-arguments forms are deprecated.])
1215 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1216  AC_SUBST([PACKAGE], [$1])dnl
1217  AC_SUBST([VERSION], [$2])],
1218 [_AM_SET_OPTIONS([$1])dnl
1219 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1220 m4_if(
1221   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1222   [ok:ok],,
1223   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1224  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1225  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1226
1227 _AM_IF_OPTION([no-define],,
1228 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1229  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1230
1231 # Some tools Automake needs.
1232 AC_REQUIRE([AM_SANITY_CHECK])dnl
1233 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1234 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1235 AM_MISSING_PROG([AUTOCONF], [autoconf])
1236 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1237 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1238 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1239 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1240 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1241 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1242 # For better backward compatibility.  To be removed once Automake 1.9.x
1243 # dies out for good.  For more background, see:
1244 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1245 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1246 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1247 # We need awk for the "check" target (and possibly the TAP driver).  The
1248 # system "awk" is bad on some platforms.
1249 AC_REQUIRE([AC_PROG_AWK])dnl
1250 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1251 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1252 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1253               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1254                              [_AM_PROG_TAR([v7])])])
1255 _AM_IF_OPTION([no-dependencies],,
1256 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1257                   [_AM_DEPENDENCIES([CC])],
1258                   [m4_define([AC_PROG_CC],
1259                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1260 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1261                   [_AM_DEPENDENCIES([CXX])],
1262                   [m4_define([AC_PROG_CXX],
1263                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1264 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1265                   [_AM_DEPENDENCIES([OBJC])],
1266                   [m4_define([AC_PROG_OBJC],
1267                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1268 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1269                   [_AM_DEPENDENCIES([OBJCXX])],
1270                   [m4_define([AC_PROG_OBJCXX],
1271                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1272 ])
1273 AC_REQUIRE([AM_SILENT_RULES])dnl
1274 dnl The testsuite driver may need to know about EXEEXT, so add the
1275 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1276 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1277 AC_CONFIG_COMMANDS_PRE(dnl
1278 [m4_provide_if([_AM_COMPILER_EXEEXT],
1279   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1280
1281 # POSIX will say in a future version that running "rm -f" with no argument
1282 # is OK; and we want to be able to make that assumption in our Makefile
1283 # recipes.  So use an aggressive probe to check that the usage we want is
1284 # actually supported "in the wild" to an acceptable degree.
1285 # See automake bug#10828.
1286 # To make any issue more visible, cause the running configure to be aborted
1287 # by default if the 'rm' program in use doesn't match our expectations; the
1288 # user can still override this though.
1289 if rm -f && rm -fr && rm -rf; then : OK; else
1290   cat >&2 <<'END'
1291 Oops!
1292
1293 Your 'rm' program seems unable to run without file operands specified
1294 on the command line, even when the '-f' option is present.  This is contrary
1295 to the behaviour of most rm programs out there, and not conforming with
1296 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1297
1298 Please tell bug-automake@gnu.org about your system, including the value
1299 of your $PATH and any error possibly output before this message.  This
1300 can help us improve future automake versions.
1301
1302 END
1303   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1304     echo 'Configuration will proceed anyway, since you have set the' >&2
1305     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1306     echo >&2
1307   else
1308     cat >&2 <<'END'
1309 Aborting the configuration process, to ensure you take notice of the issue.
1310
1311 You can download and install GNU coreutils to get an 'rm' implementation
1312 that behaves properly: <http://www.gnu.org/software/coreutils/>.
1313
1314 If you want to complete the configuration process using your problematic
1315 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1316 to "yes", and re-run configure.
1317
1318 END
1319     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1320   fi
1321 fi
1322 dnl The trailing newline in this macro's definition is deliberate, for
1323 dnl backward compatibility and to allow trailing 'dnl'-style comments
1324 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1325 ])
1326
1327 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1328 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1329 dnl mangled by Autoconf and run in a shell conditional statement.
1330 m4_define([_AC_COMPILER_EXEEXT],
1331 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1332
1333 # When config.status generates a header, we must update the stamp-h file.
1334 # This file resides in the same directory as the config header
1335 # that is generated.  The stamp files are numbered to have different names.
1336
1337 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1338 # loop where config.status creates the headers, so we can generate
1339 # our stamp files there.
1340 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1341 [# Compute $1's index in $config_headers.
1342 _am_arg=$1
1343 _am_stamp_count=1
1344 for _am_header in $config_headers :; do
1345   case $_am_header in
1346     $_am_arg | $_am_arg:* )
1347       break ;;
1348     * )
1349       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1350   esac
1351 done
1352 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1353
1354 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1355 #
1356 # This file is free software; the Free Software Foundation
1357 # gives unlimited permission to copy and/or distribute it,
1358 # with or without modifications, as long as this notice is preserved.
1359
1360 # AM_PROG_INSTALL_SH
1361 # ------------------
1362 # Define $install_sh.
1363 AC_DEFUN([AM_PROG_INSTALL_SH],
1364 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1365 if test x"${install_sh+set}" != xset; then
1366   case $am_aux_dir in
1367   *\ * | *\     *)
1368     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1369   *)
1370     install_sh="\${SHELL} $am_aux_dir/install-sh"
1371   esac
1372 fi
1373 AC_SUBST([install_sh])])
1374
1375 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
1376 #
1377 # This file is free software; the Free Software Foundation
1378 # gives unlimited permission to copy and/or distribute it,
1379 # with or without modifications, as long as this notice is preserved.
1380
1381 # Check whether the underlying file-system supports filenames
1382 # with a leading dot.  For instance MS-DOS doesn't.
1383 AC_DEFUN([AM_SET_LEADING_DOT],
1384 [rm -rf .tst 2>/dev/null
1385 mkdir .tst 2>/dev/null
1386 if test -d .tst; then
1387   am__leading_dot=.
1388 else
1389   am__leading_dot=_
1390 fi
1391 rmdir .tst 2>/dev/null
1392 AC_SUBST([am__leading_dot])])
1393
1394 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1395
1396 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1397 #
1398 # This file is free software; the Free Software Foundation
1399 # gives unlimited permission to copy and/or distribute it,
1400 # with or without modifications, as long as this notice is preserved.
1401
1402 # AM_MAKE_INCLUDE()
1403 # -----------------
1404 # Check to see how make treats includes.
1405 AC_DEFUN([AM_MAKE_INCLUDE],
1406 [am_make=${MAKE-make}
1407 cat > confinc << 'END'
1408 am__doit:
1409         @echo this is the am__doit target
1410 .PHONY: am__doit
1411 END
1412 # If we don't find an include directive, just comment out the code.
1413 AC_MSG_CHECKING([for style of include used by $am_make])
1414 am__include="#"
1415 am__quote=
1416 _am_result=none
1417 # First try GNU make style include.
1418 echo "include confinc" > confmf
1419 # Ignore all kinds of additional output from 'make'.
1420 case `$am_make -s -f confmf 2> /dev/null` in #(
1421 *the\ am__doit\ target*)
1422   am__include=include
1423   am__quote=
1424   _am_result=GNU
1425   ;;
1426 esac
1427 # Now try BSD make style include.
1428 if test "$am__include" = "#"; then
1429    echo '.include "confinc"' > confmf
1430    case `$am_make -s -f confmf 2> /dev/null` in #(
1431    *the\ am__doit\ target*)
1432      am__include=.include
1433      am__quote="\""
1434      _am_result=BSD
1435      ;;
1436    esac
1437 fi
1438 AC_SUBST([am__include])
1439 AC_SUBST([am__quote])
1440 AC_MSG_RESULT([$_am_result])
1441 rm -f confinc confmf
1442 ])
1443
1444 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1445
1446 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
1447 #
1448 # This file is free software; the Free Software Foundation
1449 # gives unlimited permission to copy and/or distribute it,
1450 # with or without modifications, as long as this notice is preserved.
1451
1452 # AM_MISSING_PROG(NAME, PROGRAM)
1453 # ------------------------------
1454 AC_DEFUN([AM_MISSING_PROG],
1455 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1456 $1=${$1-"${am_missing_run}$2"}
1457 AC_SUBST($1)])
1458
1459 # AM_MISSING_HAS_RUN
1460 # ------------------
1461 # Define MISSING if not defined so far and test if it is modern enough.
1462 # If it is, set am_missing_run to use it, otherwise, to nothing.
1463 AC_DEFUN([AM_MISSING_HAS_RUN],
1464 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1465 AC_REQUIRE_AUX_FILE([missing])dnl
1466 if test x"${MISSING+set}" != xset; then
1467   case $am_aux_dir in
1468   *\ * | *\     *)
1469     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1470   *)
1471     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1472   esac
1473 fi
1474 # Use eval to expand $SHELL
1475 if eval "$MISSING --is-lightweight"; then
1476   am_missing_run="$MISSING "
1477 else
1478   am_missing_run=
1479   AC_MSG_WARN(['missing' script is too old or missing])
1480 fi
1481 ])
1482
1483 # Helper functions for option handling.                     -*- Autoconf -*-
1484
1485 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1486 #
1487 # This file is free software; the Free Software Foundation
1488 # gives unlimited permission to copy and/or distribute it,
1489 # with or without modifications, as long as this notice is preserved.
1490
1491 # _AM_MANGLE_OPTION(NAME)
1492 # -----------------------
1493 AC_DEFUN([_AM_MANGLE_OPTION],
1494 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1495
1496 # _AM_SET_OPTION(NAME)
1497 # --------------------
1498 # Set option NAME.  Presently that only means defining a flag for this option.
1499 AC_DEFUN([_AM_SET_OPTION],
1500 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1501
1502 # _AM_SET_OPTIONS(OPTIONS)
1503 # ------------------------
1504 # OPTIONS is a space-separated list of Automake options.
1505 AC_DEFUN([_AM_SET_OPTIONS],
1506 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1507
1508 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1509 # -------------------------------------------
1510 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1511 AC_DEFUN([_AM_IF_OPTION],
1512 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1513
1514 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
1515 #
1516 # This file is free software; the Free Software Foundation
1517 # gives unlimited permission to copy and/or distribute it,
1518 # with or without modifications, as long as this notice is preserved.
1519
1520 # _AM_PROG_CC_C_O
1521 # ---------------
1522 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
1523 # to automatically call this.
1524 AC_DEFUN([_AM_PROG_CC_C_O],
1525 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1526 AC_REQUIRE_AUX_FILE([compile])dnl
1527 AC_LANG_PUSH([C])dnl
1528 AC_CACHE_CHECK(
1529   [whether $CC understands -c and -o together],
1530   [am_cv_prog_cc_c_o],
1531   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1532   # Make sure it works both with $CC and with simple cc.
1533   # Following AC_PROG_CC_C_O, we do the test twice because some
1534   # compilers refuse to overwrite an existing .o file with -o,
1535   # though they will create one.
1536   am_cv_prog_cc_c_o=yes
1537   for am_i in 1 2; do
1538     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1539          && test -f conftest2.$ac_objext; then
1540       : OK
1541     else
1542       am_cv_prog_cc_c_o=no
1543       break
1544     fi
1545   done
1546   rm -f core conftest*
1547   unset am_i])
1548 if test "$am_cv_prog_cc_c_o" != yes; then
1549    # Losing compiler, so override with the script.
1550    # FIXME: It is wrong to rewrite CC.
1551    # But if we don't then we get into trouble of one sort or another.
1552    # A longer-term fix would be to have automake use am__CC in this case,
1553    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1554    CC="$am_aux_dir/compile $CC"
1555 fi
1556 AC_LANG_POP([C])])
1557
1558 # For backward compatibility.
1559 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1560
1561 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
1562 #
1563 # This file is free software; the Free Software Foundation
1564 # gives unlimited permission to copy and/or distribute it,
1565 # with or without modifications, as long as this notice is preserved.
1566
1567
1568 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1569 # ---------------------------------------------------------------------------
1570 # Adds support for distributing Python modules and packages.  To
1571 # install modules, copy them to $(pythondir), using the python_PYTHON
1572 # automake variable.  To install a package with the same name as the
1573 # automake package, install to $(pkgpythondir), or use the
1574 # pkgpython_PYTHON automake variable.
1575 #
1576 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1577 # locations to install python extension modules (shared libraries).
1578 # Another macro is required to find the appropriate flags to compile
1579 # extension modules.
1580 #
1581 # If your package is configured with a different prefix to python,
1582 # users will have to add the install directory to the PYTHONPATH
1583 # environment variable, or create a .pth file (see the python
1584 # documentation for details).
1585 #
1586 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1587 # cause an error if the version of python installed on the system
1588 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
1589 # numbers and dots only.
1590 AC_DEFUN([AM_PATH_PYTHON],
1591  [
1592   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
1593   dnl supported. (2.0 was released on October 16, 2000).
1594   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1595 [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
1596  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
1597
1598   AC_ARG_VAR([PYTHON], [the Python interpreter])
1599
1600   m4_if([$1],[],[
1601     dnl No version check is needed.
1602     # Find any Python interpreter.
1603     if test -z "$PYTHON"; then
1604       AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1605     fi
1606     am_display_PYTHON=python
1607   ], [
1608     dnl A version check is needed.
1609     if test -n "$PYTHON"; then
1610       # If the user set $PYTHON, use it and don't search something else.
1611       AC_MSG_CHECKING([whether $PYTHON version is >= $1])
1612       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1613                               [AC_MSG_RESULT([yes])],
1614                               [AC_MSG_RESULT([no])
1615                                AC_MSG_ERROR([Python interpreter is too old])])
1616       am_display_PYTHON=$PYTHON
1617     else
1618       # Otherwise, try each interpreter until we find one that satisfies
1619       # VERSION.
1620       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1621         [am_cv_pathless_PYTHON],[
1622         for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1623           test "$am_cv_pathless_PYTHON" = none && break
1624           AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1625         done])
1626       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1627       if test "$am_cv_pathless_PYTHON" = none; then
1628         PYTHON=:
1629       else
1630         AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1631       fi
1632       am_display_PYTHON=$am_cv_pathless_PYTHON
1633     fi
1634   ])
1635
1636   if test "$PYTHON" = :; then
1637   dnl Run any user-specified action, or abort.
1638     m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1639   else
1640
1641   dnl Query Python for its version number.  Getting [:3] seems to be
1642   dnl the best way to do this; it's what "site.py" does in the standard
1643   dnl library.
1644
1645   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1646     [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1647   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1648
1649   dnl Use the values of $prefix and $exec_prefix for the corresponding
1650   dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
1651   dnl distinct variables so they can be overridden if need be.  However,
1652   dnl general consensus is that you shouldn't need this ability.
1653
1654   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1655   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1656
1657   dnl At times (like when building shared libraries) you may want
1658   dnl to know which OS platform Python thinks this is.
1659
1660   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1661     [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1662   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1663
1664   # Just factor out some code duplication.
1665   am_python_setup_sysconfig="\
1666 import sys
1667 # Prefer sysconfig over distutils.sysconfig, for better compatibility
1668 # with python 3.x.  See automake bug#10227.
1669 try:
1670     import sysconfig
1671 except ImportError:
1672     can_use_sysconfig = 0
1673 else:
1674     can_use_sysconfig = 1
1675 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1676 # <https://github.com/pypa/virtualenv/issues/118>
1677 try:
1678     from platform import python_implementation
1679     if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1680         can_use_sysconfig = 0
1681 except ImportError:
1682     pass"
1683
1684   dnl Set up 4 directories:
1685
1686   dnl pythondir -- where to install python scripts.  This is the
1687   dnl   site-packages directory, not the python standard library
1688   dnl   directory like in previous automake betas.  This behavior
1689   dnl   is more consistent with lispdir.m4 for example.
1690   dnl Query distutils for this directory.
1691   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1692     [am_cv_python_pythondir],
1693     [if test "x$prefix" = xNONE
1694      then
1695        am_py_prefix=$ac_default_prefix
1696      else
1697        am_py_prefix=$prefix
1698      fi
1699      am_cv_python_pythondir=`$PYTHON -c "
1700 $am_python_setup_sysconfig
1701 if can_use_sysconfig:
1702     sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
1703 else:
1704     from distutils import sysconfig
1705     sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1706 sys.stdout.write(sitedir)"`
1707      case $am_cv_python_pythondir in
1708      $am_py_prefix*)
1709        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1710        am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1711        ;;
1712      *)
1713        case $am_py_prefix in
1714          /usr|/System*) ;;
1715          *)
1716           am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1717           ;;
1718        esac
1719        ;;
1720      esac
1721     ])
1722   AC_SUBST([pythondir], [$am_cv_python_pythondir])
1723
1724   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
1725   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
1726   dnl   more consistent with the rest of automake.
1727
1728   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1729
1730   dnl pyexecdir -- directory for installing python extension modules
1731   dnl   (shared libraries)
1732   dnl Query distutils for this directory.
1733   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1734     [am_cv_python_pyexecdir],
1735     [if test "x$exec_prefix" = xNONE
1736      then
1737        am_py_exec_prefix=$am_py_prefix
1738      else
1739        am_py_exec_prefix=$exec_prefix
1740      fi
1741      am_cv_python_pyexecdir=`$PYTHON -c "
1742 $am_python_setup_sysconfig
1743 if can_use_sysconfig:
1744     sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
1745 else:
1746     from distutils import sysconfig
1747     sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
1748 sys.stdout.write(sitedir)"`
1749      case $am_cv_python_pyexecdir in
1750      $am_py_exec_prefix*)
1751        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1752        am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1753        ;;
1754      *)
1755        case $am_py_exec_prefix in
1756          /usr|/System*) ;;
1757          *)
1758            am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1759            ;;
1760        esac
1761        ;;
1762      esac
1763     ])
1764   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1765
1766   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1767
1768   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1769
1770   dnl Run any user-specified action.
1771   $2
1772   fi
1773
1774 ])
1775
1776
1777 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1778 # ---------------------------------------------------------------------------
1779 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1780 # Run ACTION-IF-FALSE otherwise.
1781 # This test uses sys.hexversion instead of the string equivalent (first
1782 # word of sys.version), in order to cope with versions such as 2.2c1.
1783 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1784 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1785  [prog="import sys
1786 # split strings by '.' and convert to numeric.  Append some zeros
1787 # because we need at least 4 digits for the hex conversion.
1788 # map returns an iterator in Python 3.0 and a list in 2.x
1789 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1790 minverhex = 0
1791 # xrange is not present in Python 3.0 and range returns an iterator
1792 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1793 sys.exit(sys.hexversion < minverhex)"
1794   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1795
1796 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1797 #
1798 # This file is free software; the Free Software Foundation
1799 # gives unlimited permission to copy and/or distribute it,
1800 # with or without modifications, as long as this notice is preserved.
1801
1802 # AM_RUN_LOG(COMMAND)
1803 # -------------------
1804 # Run COMMAND, save the exit status in ac_status, and log it.
1805 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1806 AC_DEFUN([AM_RUN_LOG],
1807 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1808    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1809    ac_status=$?
1810    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1811    (exit $ac_status); }])
1812
1813 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1814
1815 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
1816 #
1817 # This file is free software; the Free Software Foundation
1818 # gives unlimited permission to copy and/or distribute it,
1819 # with or without modifications, as long as this notice is preserved.
1820
1821 # AM_SANITY_CHECK
1822 # ---------------
1823 AC_DEFUN([AM_SANITY_CHECK],
1824 [AC_MSG_CHECKING([whether build environment is sane])
1825 # Reject unsafe characters in $srcdir or the absolute working directory
1826 # name.  Accept space and tab only in the latter.
1827 am_lf='
1828 '
1829 case `pwd` in
1830   *[[\\\"\#\$\&\'\`$am_lf]]*)
1831     AC_MSG_ERROR([unsafe absolute working directory name]);;
1832 esac
1833 case $srcdir in
1834   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1835     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1836 esac
1837
1838 # Do 'set' in a subshell so we don't clobber the current shell's
1839 # arguments.  Must try -L first in case configure is actually a
1840 # symlink; some systems play weird games with the mod time of symlinks
1841 # (eg FreeBSD returns the mod time of the symlink's containing
1842 # directory).
1843 if (
1844    am_has_slept=no
1845    for am_try in 1 2; do
1846      echo "timestamp, slept: $am_has_slept" > conftest.file
1847      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1848      if test "$[*]" = "X"; then
1849         # -L didn't work.
1850         set X `ls -t "$srcdir/configure" conftest.file`
1851      fi
1852      if test "$[*]" != "X $srcdir/configure conftest.file" \
1853         && test "$[*]" != "X conftest.file $srcdir/configure"; then
1854
1855         # If neither matched, then we have a broken ls.  This can happen
1856         # if, for instance, CONFIG_SHELL is bash and it inherits a
1857         # broken ls alias from the environment.  This has actually
1858         # happened.  Such a system could not be considered "sane".
1859         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1860   alias in your environment])
1861      fi
1862      if test "$[2]" = conftest.file || test $am_try -eq 2; then
1863        break
1864      fi
1865      # Just in case.
1866      sleep 1
1867      am_has_slept=yes
1868    done
1869    test "$[2]" = conftest.file
1870    )
1871 then
1872    # Ok.
1873    :
1874 else
1875    AC_MSG_ERROR([newly created file is older than distributed files!
1876 Check your system clock])
1877 fi
1878 AC_MSG_RESULT([yes])
1879 # If we didn't sleep, we still need to ensure time stamps of config.status and
1880 # generated files are strictly newer.
1881 am_sleep_pid=
1882 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1883   ( sleep 1 ) &
1884   am_sleep_pid=$!
1885 fi
1886 AC_CONFIG_COMMANDS_PRE(
1887   [AC_MSG_CHECKING([that generated files are newer than configure])
1888    if test -n "$am_sleep_pid"; then
1889      # Hide warnings about reused PIDs.
1890      wait $am_sleep_pid 2>/dev/null
1891    fi
1892    AC_MSG_RESULT([done])])
1893 rm -f conftest.file
1894 ])
1895
1896 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
1897 #
1898 # This file is free software; the Free Software Foundation
1899 # gives unlimited permission to copy and/or distribute it,
1900 # with or without modifications, as long as this notice is preserved.
1901
1902 # AM_SILENT_RULES([DEFAULT])
1903 # --------------------------
1904 # Enable less verbose build rules; with the default set to DEFAULT
1905 # ("yes" being less verbose, "no" or empty being verbose).
1906 AC_DEFUN([AM_SILENT_RULES],
1907 [AC_ARG_ENABLE([silent-rules], [dnl
1908 AS_HELP_STRING(
1909   [--enable-silent-rules],
1910   [less verbose build output (undo: "make V=1")])
1911 AS_HELP_STRING(
1912   [--disable-silent-rules],
1913   [verbose build output (undo: "make V=0")])dnl
1914 ])
1915 case $enable_silent_rules in @%:@ (((
1916   yes) AM_DEFAULT_VERBOSITY=0;;
1917    no) AM_DEFAULT_VERBOSITY=1;;
1918     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1919 esac
1920 dnl
1921 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1922 dnl do not support nested variable expansions.
1923 dnl See automake bug#9928 and bug#10237.
1924 am_make=${MAKE-make}
1925 AC_CACHE_CHECK([whether $am_make supports nested variables],
1926    [am_cv_make_support_nested_variables],
1927    [if AS_ECHO([['TRUE=$(BAR$(V))
1928 BAR0=false
1929 BAR1=true
1930 V=1
1931 am__doit:
1932         @$(TRUE)
1933 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1934   am_cv_make_support_nested_variables=yes
1935 else
1936   am_cv_make_support_nested_variables=no
1937 fi])
1938 if test $am_cv_make_support_nested_variables = yes; then
1939   dnl Using '$V' instead of '$(V)' breaks IRIX make.
1940   AM_V='$(V)'
1941   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1942 else
1943   AM_V=$AM_DEFAULT_VERBOSITY
1944   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1945 fi
1946 AC_SUBST([AM_V])dnl
1947 AM_SUBST_NOTMAKE([AM_V])dnl
1948 AC_SUBST([AM_DEFAULT_V])dnl
1949 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1950 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1951 AM_BACKSLASH='\'
1952 AC_SUBST([AM_BACKSLASH])dnl
1953 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1954 ])
1955
1956 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1957 #
1958 # This file is free software; the Free Software Foundation
1959 # gives unlimited permission to copy and/or distribute it,
1960 # with or without modifications, as long as this notice is preserved.
1961
1962 # AM_PROG_INSTALL_STRIP
1963 # ---------------------
1964 # One issue with vendor 'install' (even GNU) is that you can't
1965 # specify the program used to strip binaries.  This is especially
1966 # annoying in cross-compiling environments, where the build's strip
1967 # is unlikely to handle the host's binaries.
1968 # Fortunately install-sh will honor a STRIPPROG variable, so we
1969 # always use install-sh in "make install-strip", and initialize
1970 # STRIPPROG with the value of the STRIP variable (set by the user).
1971 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1972 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1973 # Installed binaries are usually stripped using 'strip' when the user
1974 # run "make install-strip".  However 'strip' might not be the right
1975 # tool to use in cross-compilation environments, therefore Automake
1976 # will honor the 'STRIP' environment variable to overrule this program.
1977 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1978 if test "$cross_compiling" != no; then
1979   AC_CHECK_TOOL([STRIP], [strip], :)
1980 fi
1981 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1982 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1983
1984 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
1985 #
1986 # This file is free software; the Free Software Foundation
1987 # gives unlimited permission to copy and/or distribute it,
1988 # with or without modifications, as long as this notice is preserved.
1989
1990 # _AM_SUBST_NOTMAKE(VARIABLE)
1991 # ---------------------------
1992 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1993 # This macro is traced by Automake.
1994 AC_DEFUN([_AM_SUBST_NOTMAKE])
1995
1996 # AM_SUBST_NOTMAKE(VARIABLE)
1997 # --------------------------
1998 # Public sister of _AM_SUBST_NOTMAKE.
1999 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2000
2001 # Check how to create a tarball.                            -*- Autoconf -*-
2002
2003 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
2004 #
2005 # This file is free software; the Free Software Foundation
2006 # gives unlimited permission to copy and/or distribute it,
2007 # with or without modifications, as long as this notice is preserved.
2008
2009 # _AM_PROG_TAR(FORMAT)
2010 # --------------------
2011 # Check how to create a tarball in format FORMAT.
2012 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2013 #
2014 # Substitute a variable $(am__tar) that is a command
2015 # writing to stdout a FORMAT-tarball containing the directory
2016 # $tardir.
2017 #     tardir=directory && $(am__tar) > result.tar
2018 #
2019 # Substitute a variable $(am__untar) that extract such
2020 # a tarball read from stdin.
2021 #     $(am__untar) < result.tar
2022 #
2023 AC_DEFUN([_AM_PROG_TAR],
2024 [# Always define AMTAR for backward compatibility.  Yes, it's still used
2025 # in the wild :-(  We should find a proper way to deprecate it ...
2026 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2027
2028 # We'll loop over all known methods to create a tar archive until one works.
2029 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2030
2031 m4_if([$1], [v7],
2032   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2033
2034   [m4_case([$1],
2035     [ustar],
2036      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2037       # There is notably a 21 bits limit for the UID and the GID.  In fact,
2038       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2039       # and bug#13588).
2040       am_max_uid=2097151 # 2^21 - 1
2041       am_max_gid=$am_max_uid
2042       # The $UID and $GID variables are not portable, so we need to resort
2043       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
2044       # below are definitely unexpected, so allow the users to see them
2045       # (that is, avoid stderr redirection).
2046       am_uid=`id -u || echo unknown`
2047       am_gid=`id -g || echo unknown`
2048       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2049       if test $am_uid -le $am_max_uid; then
2050          AC_MSG_RESULT([yes])
2051       else
2052          AC_MSG_RESULT([no])
2053          _am_tools=none
2054       fi
2055       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2056       if test $am_gid -le $am_max_gid; then
2057          AC_MSG_RESULT([yes])
2058       else
2059         AC_MSG_RESULT([no])
2060         _am_tools=none
2061       fi],
2062
2063   [pax],
2064     [],
2065
2066   [m4_fatal([Unknown tar format])])
2067
2068   AC_MSG_CHECKING([how to create a $1 tar archive])
2069
2070   # Go ahead even if we have the value already cached.  We do so because we
2071   # need to set the values for the 'am__tar' and 'am__untar' variables.
2072   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2073
2074   for _am_tool in $_am_tools; do
2075     case $_am_tool in
2076     gnutar)
2077       for _am_tar in tar gnutar gtar; do
2078         AM_RUN_LOG([$_am_tar --version]) && break
2079       done
2080       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2081       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2082       am__untar="$_am_tar -xf -"
2083       ;;
2084     plaintar)
2085       # Must skip GNU tar: if it does not support --format= it doesn't create
2086       # ustar tarball either.
2087       (tar --version) >/dev/null 2>&1 && continue
2088       am__tar='tar chf - "$$tardir"'
2089       am__tar_='tar chf - "$tardir"'
2090       am__untar='tar xf -'
2091       ;;
2092     pax)
2093       am__tar='pax -L -x $1 -w "$$tardir"'
2094       am__tar_='pax -L -x $1 -w "$tardir"'
2095       am__untar='pax -r'
2096       ;;
2097     cpio)
2098       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2099       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2100       am__untar='cpio -i -H $1 -d'
2101       ;;
2102     none)
2103       am__tar=false
2104       am__tar_=false
2105       am__untar=false
2106       ;;
2107     esac
2108
2109     # If the value was cached, stop now.  We just wanted to have am__tar
2110     # and am__untar set.
2111     test -n "${am_cv_prog_tar_$1}" && break
2112
2113     # tar/untar a dummy directory, and stop if the command works.
2114     rm -rf conftest.dir
2115     mkdir conftest.dir
2116     echo GrepMe > conftest.dir/file
2117     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2118     rm -rf conftest.dir
2119     if test -s conftest.tar; then
2120       AM_RUN_LOG([$am__untar <conftest.tar])
2121       AM_RUN_LOG([cat conftest.dir/file])
2122       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2123     fi
2124   done
2125   rm -rf conftest.dir
2126
2127   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2128   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2129
2130 AC_SUBST([am__tar])
2131 AC_SUBST([am__untar])
2132 ]) # _AM_PROG_TAR
2133
2134 m4_include([m4/ac_pkg_swig.m4])
2135 m4_include([m4/ac_python_devel.m4])
2136 m4_include([m4/intltool.m4])
2137 m4_include([m4/libtool.m4])
2138 m4_include([m4/ltoptions.m4])
2139 m4_include([m4/ltsugar.m4])
2140 m4_include([m4/ltversion.m4])
2141 m4_include([m4/lt~obsolete.m4])
2142 m4_include([m4/swig_python.m4])