Packaging: clean spec file
[platform/upstream/ibus-libpinyin.git] / aclocal.m4
1 # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 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 glib_DEFUN([GLIB_GNU_GETTEXT],
339   [AC_REQUIRE([AC_PROG_CC])dnl
340    AC_REQUIRE([AC_HEADER_STDC])dnl
341    
342    GLIB_LC_MESSAGES
343    GLIB_WITH_NLS
344
345    if test "$gt_cv_have_gettext" = "yes"; then
346      if test "x$ALL_LINGUAS" = "x"; then
347        LINGUAS=
348      else
349        AC_MSG_CHECKING(for catalogs to be installed)
350        NEW_LINGUAS=
351        for presentlang in $ALL_LINGUAS; do
352          useit=no
353          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
354            desiredlanguages="$LINGUAS"
355          else
356            desiredlanguages="$ALL_LINGUAS"
357          fi
358          for desiredlang in $desiredlanguages; do
359            # Use the presentlang catalog if desiredlang is
360            #   a. equal to presentlang, or
361            #   b. a variant of presentlang (because in this case,
362            #      presentlang can be used as a fallback for messages
363            #      which are not translated in the desiredlang catalog).
364            case "$desiredlang" in
365              "$presentlang"*) useit=yes;;
366            esac
367          done
368          if test $useit = yes; then
369            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
370          fi
371        done
372        LINGUAS=$NEW_LINGUAS
373        AC_MSG_RESULT($LINGUAS)
374      fi
375
376      dnl Construct list of names of catalog files to be constructed.
377      if test -n "$LINGUAS"; then
378        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
379      fi
380    fi
381
382    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
383    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
384    dnl Try to locate is.
385    MKINSTALLDIRS=
386    if test -n "$ac_aux_dir"; then
387      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
388    fi
389    if test -z "$MKINSTALLDIRS"; then
390      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
391    fi
392    AC_SUBST(MKINSTALLDIRS)
393
394    dnl Generate list of files to be processed by xgettext which will
395    dnl be included in po/Makefile.
396    test -d po || mkdir po
397    if test "x$srcdir" != "x."; then
398      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
399        posrcprefix="$srcdir/"
400      else
401        posrcprefix="../$srcdir/"
402      fi
403    else
404      posrcprefix="../"
405    fi
406    rm -f po/POTFILES
407    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
408         < $srcdir/po/POTFILES.in > po/POTFILES
409   ])
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-2013 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 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 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 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
494 # serial 1 (pkg-config-0.24)
495
496 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
497 #
498 # This program is free software; you can redistribute it and/or modify
499 # it under the terms of the GNU General Public License as published by
500 # the Free Software Foundation; either version 2 of the License, or
501 # (at your option) any later version.
502 #
503 # This program is distributed in the hope that it will be useful, but
504 # WITHOUT ANY WARRANTY; without even the implied warranty of
505 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
506 # General Public License for more details.
507 #
508 # You should have received a copy of the GNU General Public License
509 # along with this program; if not, write to the Free Software
510 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
511 #
512 # As a special exception to the GNU General Public License, if you
513 # distribute this file as part of a program that contains a
514 # configuration script generated by Autoconf, you may include it under
515 # the same distribution terms that you use for the rest of that program.
516
517 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
518 # ----------------------------------
519 AC_DEFUN([PKG_PROG_PKG_CONFIG],
520 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
521 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
522 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
523 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
524 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
525 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
526
527 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
528         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
529 fi
530 if test -n "$PKG_CONFIG"; then
531         _pkg_min_version=m4_default([$1], [0.9.0])
532         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
533         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
534                 AC_MSG_RESULT([yes])
535         else
536                 AC_MSG_RESULT([no])
537                 PKG_CONFIG=""
538         fi
539 fi[]dnl
540 ])# PKG_PROG_PKG_CONFIG
541
542 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
543 #
544 # Check to see whether a particular set of modules exists.  Similar
545 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
546 #
547 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
548 # only at the first occurence in configure.ac, so if the first place
549 # it's called might be skipped (such as if it is within an "if", you
550 # have to call PKG_CHECK_EXISTS manually
551 # --------------------------------------------------------------
552 AC_DEFUN([PKG_CHECK_EXISTS],
553 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
554 if test -n "$PKG_CONFIG" && \
555     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
556   m4_default([$2], [:])
557 m4_ifvaln([$3], [else
558   $3])dnl
559 fi])
560
561 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
562 # ---------------------------------------------
563 m4_define([_PKG_CONFIG],
564 [if test -n "$$1"; then
565     pkg_cv_[]$1="$$1"
566  elif test -n "$PKG_CONFIG"; then
567     PKG_CHECK_EXISTS([$3],
568                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
569                       test "x$?" != "x0" && pkg_failed=yes ],
570                      [pkg_failed=yes])
571  else
572     pkg_failed=untried
573 fi[]dnl
574 ])# _PKG_CONFIG
575
576 # _PKG_SHORT_ERRORS_SUPPORTED
577 # -----------------------------
578 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
579 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
580 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
581         _pkg_short_errors_supported=yes
582 else
583         _pkg_short_errors_supported=no
584 fi[]dnl
585 ])# _PKG_SHORT_ERRORS_SUPPORTED
586
587
588 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
589 # [ACTION-IF-NOT-FOUND])
590 #
591 #
592 # Note that if there is a possibility the first call to
593 # PKG_CHECK_MODULES might not happen, you should be sure to include an
594 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
595 #
596 #
597 # --------------------------------------------------------------
598 AC_DEFUN([PKG_CHECK_MODULES],
599 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
600 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
601 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
602
603 pkg_failed=no
604 AC_MSG_CHECKING([for $1])
605
606 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
607 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
608
609 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
610 and $1[]_LIBS to avoid the need to call pkg-config.
611 See the pkg-config man page for more details.])
612
613 if test $pkg_failed = yes; then
614         AC_MSG_RESULT([no])
615         _PKG_SHORT_ERRORS_SUPPORTED
616         if test $_pkg_short_errors_supported = yes; then
617                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
618         else 
619                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
620         fi
621         # Put the nasty error message in config.log where it belongs
622         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
623
624         m4_default([$4], [AC_MSG_ERROR(
625 [Package requirements ($2) were not met:
626
627 $$1_PKG_ERRORS
628
629 Consider adjusting the PKG_CONFIG_PATH environment variable if you
630 installed software in a non-standard prefix.
631
632 _PKG_TEXT])[]dnl
633         ])
634 elif test $pkg_failed = untried; then
635         AC_MSG_RESULT([no])
636         m4_default([$4], [AC_MSG_FAILURE(
637 [The pkg-config script could not be found or is too old.  Make sure it
638 is in your PATH or set the PKG_CONFIG environment variable to the full
639 path to pkg-config.
640
641 _PKG_TEXT
642
643 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
644         ])
645 else
646         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
647         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
648         AC_MSG_RESULT([yes])
649         $3
650 fi[]dnl
651 ])# PKG_CHECK_MODULES
652
653
654 # PKG_INSTALLDIR(DIRECTORY)
655 # -------------------------
656 # Substitutes the variable pkgconfigdir as the location where a module
657 # should install pkg-config .pc files. By default the directory is
658 # $libdir/pkgconfig, but the default can be changed by passing
659 # DIRECTORY. The user can override through the --with-pkgconfigdir
660 # parameter.
661 AC_DEFUN([PKG_INSTALLDIR],
662 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
663 m4_pushdef([pkg_description],
664     [pkg-config installation directory @<:@]pkg_default[@:>@])
665 AC_ARG_WITH([pkgconfigdir],
666     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
667     [with_pkgconfigdir=]pkg_default)
668 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
669 m4_popdef([pkg_default])
670 m4_popdef([pkg_description])
671 ]) dnl PKG_INSTALLDIR
672
673
674 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
675 # -------------------------
676 # Substitutes the variable noarch_pkgconfigdir as the location where a
677 # module should install arch-independent pkg-config .pc files. By
678 # default the directory is $datadir/pkgconfig, but the default can be
679 # changed by passing DIRECTORY. The user can override through the
680 # --with-noarch-pkgconfigdir parameter.
681 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
682 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
683 m4_pushdef([pkg_description],
684     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
685 AC_ARG_WITH([noarch-pkgconfigdir],
686     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
687     [with_noarch_pkgconfigdir=]pkg_default)
688 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
689 m4_popdef([pkg_default])
690 m4_popdef([pkg_description])
691 ]) dnl PKG_NOARCH_INSTALLDIR
692
693 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
694 #
695 # This file is free software; the Free Software Foundation
696 # gives unlimited permission to copy and/or distribute it,
697 # with or without modifications, as long as this notice is preserved.
698
699 # AM_AUTOMAKE_VERSION(VERSION)
700 # ----------------------------
701 # Automake X.Y traces this macro to ensure aclocal.m4 has been
702 # generated from the m4 files accompanying Automake X.Y.
703 # (This private macro should not be called outside this file.)
704 AC_DEFUN([AM_AUTOMAKE_VERSION],
705 [am__api_version='1.13'
706 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
707 dnl require some minimum version.  Point them to the right macro.
708 m4_if([$1], [1.13.4], [],
709       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
710 ])
711
712 # _AM_AUTOCONF_VERSION(VERSION)
713 # -----------------------------
714 # aclocal traces this macro to find the Autoconf version.
715 # This is a private macro too.  Using m4_define simplifies
716 # the logic in aclocal, which can simply ignore this definition.
717 m4_define([_AM_AUTOCONF_VERSION], [])
718
719 # AM_SET_CURRENT_AUTOMAKE_VERSION
720 # -------------------------------
721 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
722 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
723 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
724 [AM_AUTOMAKE_VERSION([1.13.4])dnl
725 m4_ifndef([AC_AUTOCONF_VERSION],
726   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
727 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
728
729 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
730
731 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
732 #
733 # This file is free software; the Free Software Foundation
734 # gives unlimited permission to copy and/or distribute it,
735 # with or without modifications, as long as this notice is preserved.
736
737 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
738 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
739 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
740 #
741 # Of course, Automake must honor this variable whenever it calls a
742 # tool from the auxiliary directory.  The problem is that $srcdir (and
743 # therefore $ac_aux_dir as well) can be either absolute or relative,
744 # depending on how configure is run.  This is pretty annoying, since
745 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
746 # source directory, any form will work fine, but in subdirectories a
747 # relative path needs to be adjusted first.
748 #
749 # $ac_aux_dir/missing
750 #    fails when called from a subdirectory if $ac_aux_dir is relative
751 # $top_srcdir/$ac_aux_dir/missing
752 #    fails if $ac_aux_dir is absolute,
753 #    fails when called from a subdirectory in a VPATH build with
754 #          a relative $ac_aux_dir
755 #
756 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
757 # are both prefixed by $srcdir.  In an in-source build this is usually
758 # harmless because $srcdir is '.', but things will broke when you
759 # start a VPATH build or use an absolute $srcdir.
760 #
761 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
762 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
763 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
764 # and then we would define $MISSING as
765 #   MISSING="\${SHELL} $am_aux_dir/missing"
766 # This will work as long as MISSING is not called from configure, because
767 # unfortunately $(top_srcdir) has no meaning in configure.
768 # However there are other variables, like CC, which are often used in
769 # configure, and could therefore not use this "fixed" $ac_aux_dir.
770 #
771 # Another solution, used here, is to always expand $ac_aux_dir to an
772 # absolute PATH.  The drawback is that using absolute paths prevent a
773 # configured tree to be moved without reconfiguration.
774
775 AC_DEFUN([AM_AUX_DIR_EXPAND],
776 [dnl Rely on autoconf to set up CDPATH properly.
777 AC_PREREQ([2.50])dnl
778 # expand $ac_aux_dir to an absolute path
779 am_aux_dir=`cd $ac_aux_dir && pwd`
780 ])
781
782 # AM_CONDITIONAL                                            -*- Autoconf -*-
783
784 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
785 #
786 # This file is free software; the Free Software Foundation
787 # gives unlimited permission to copy and/or distribute it,
788 # with or without modifications, as long as this notice is preserved.
789
790 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
791 # -------------------------------------
792 # Define a conditional.
793 AC_DEFUN([AM_CONDITIONAL],
794 [AC_PREREQ([2.52])dnl
795  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
796        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
797 AC_SUBST([$1_TRUE])dnl
798 AC_SUBST([$1_FALSE])dnl
799 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
800 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
801 m4_define([_AM_COND_VALUE_$1], [$2])dnl
802 if $2; then
803   $1_TRUE=
804   $1_FALSE='#'
805 else
806   $1_TRUE='#'
807   $1_FALSE=
808 fi
809 AC_CONFIG_COMMANDS_PRE(
810 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
811   AC_MSG_ERROR([[conditional "$1" was never defined.
812 Usually this means the macro was only invoked conditionally.]])
813 fi])])
814
815 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
816 #
817 # This file is free software; the Free Software Foundation
818 # gives unlimited permission to copy and/or distribute it,
819 # with or without modifications, as long as this notice is preserved.
820
821
822 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
823 # written in clear, in which case automake, when reading aclocal.m4,
824 # will think it sees a *use*, and therefore will trigger all it's
825 # C support machinery.  Also note that it means that autoscan, seeing
826 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
827
828
829 # _AM_DEPENDENCIES(NAME)
830 # ----------------------
831 # See how the compiler implements dependency checking.
832 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
833 # We try a few techniques and use that to set a single cache variable.
834 #
835 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
836 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
837 # dependency, and given that the user is not expected to run this macro,
838 # just rely on AC_PROG_CC.
839 AC_DEFUN([_AM_DEPENDENCIES],
840 [AC_REQUIRE([AM_SET_DEPDIR])dnl
841 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
842 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
843 AC_REQUIRE([AM_DEP_TRACK])dnl
844
845 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
846       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
847       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
848       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
849       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
850       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
851                     [depcc="$$1"   am_compiler_list=])
852
853 AC_CACHE_CHECK([dependency style of $depcc],
854                [am_cv_$1_dependencies_compiler_type],
855 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
856   # We make a subdir and do the tests there.  Otherwise we can end up
857   # making bogus files that we don't know about and never remove.  For
858   # instance it was reported that on HP-UX the gcc test will end up
859   # making a dummy file named 'D' -- because '-MD' means "put the output
860   # in D".
861   rm -rf conftest.dir
862   mkdir conftest.dir
863   # Copy depcomp to subdir because otherwise we won't find it if we're
864   # using a relative directory.
865   cp "$am_depcomp" conftest.dir
866   cd conftest.dir
867   # We will build objects and dependencies in a subdirectory because
868   # it helps to detect inapplicable dependency modes.  For instance
869   # both Tru64's cc and ICC support -MD to output dependencies as a
870   # side effect of compilation, but ICC will put the dependencies in
871   # the current directory while Tru64 will put them in the object
872   # directory.
873   mkdir sub
874
875   am_cv_$1_dependencies_compiler_type=none
876   if test "$am_compiler_list" = ""; then
877      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
878   fi
879   am__universal=false
880   m4_case([$1], [CC],
881     [case " $depcc " in #(
882      *\ -arch\ *\ -arch\ *) am__universal=true ;;
883      esac],
884     [CXX],
885     [case " $depcc " in #(
886      *\ -arch\ *\ -arch\ *) am__universal=true ;;
887      esac])
888
889   for depmode in $am_compiler_list; do
890     # Setup a source with many dependencies, because some compilers
891     # like to wrap large dependency lists on column 80 (with \), and
892     # we should not choose a depcomp mode which is confused by this.
893     #
894     # We need to recreate these files for each test, as the compiler may
895     # overwrite some of them when testing with obscure command lines.
896     # This happens at least with the AIX C compiler.
897     : > sub/conftest.c
898     for i in 1 2 3 4 5 6; do
899       echo '#include "conftst'$i'.h"' >> sub/conftest.c
900       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
901       # Solaris 10 /bin/sh.
902       echo '/* dummy */' > sub/conftst$i.h
903     done
904     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
905
906     # We check with '-c' and '-o' for the sake of the "dashmstdout"
907     # mode.  It turns out that the SunPro C++ compiler does not properly
908     # handle '-M -o', and we need to detect this.  Also, some Intel
909     # versions had trouble with output in subdirs.
910     am__obj=sub/conftest.${OBJEXT-o}
911     am__minus_obj="-o $am__obj"
912     case $depmode in
913     gcc)
914       # This depmode causes a compiler race in universal mode.
915       test "$am__universal" = false || continue
916       ;;
917     nosideeffect)
918       # After this tag, mechanisms are not by side-effect, so they'll
919       # only be used when explicitly requested.
920       if test "x$enable_dependency_tracking" = xyes; then
921         continue
922       else
923         break
924       fi
925       ;;
926     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
927       # This compiler won't grok '-c -o', but also, the minuso test has
928       # not run yet.  These depmodes are late enough in the game, and
929       # so weak that their functioning should not be impacted.
930       am__obj=conftest.${OBJEXT-o}
931       am__minus_obj=
932       ;;
933     none) break ;;
934     esac
935     if depmode=$depmode \
936        source=sub/conftest.c object=$am__obj \
937        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
938        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
939          >/dev/null 2>conftest.err &&
940        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
941        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
942        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
943        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
944       # icc doesn't choke on unknown options, it will just issue warnings
945       # or remarks (even with -Werror).  So we grep stderr for any message
946       # that says an option was ignored or not supported.
947       # When given -MP, icc 7.0 and 7.1 complain thusly:
948       #   icc: Command line warning: ignoring option '-M'; no argument required
949       # The diagnosis changed in icc 8.0:
950       #   icc: Command line remark: option '-MP' not supported
951       if (grep 'ignoring option' conftest.err ||
952           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
953         am_cv_$1_dependencies_compiler_type=$depmode
954         break
955       fi
956     fi
957   done
958
959   cd ..
960   rm -rf conftest.dir
961 else
962   am_cv_$1_dependencies_compiler_type=none
963 fi
964 ])
965 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
966 AM_CONDITIONAL([am__fastdep$1], [
967   test "x$enable_dependency_tracking" != xno \
968   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
969 ])
970
971
972 # AM_SET_DEPDIR
973 # -------------
974 # Choose a directory name for dependency files.
975 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
976 AC_DEFUN([AM_SET_DEPDIR],
977 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
978 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
979 ])
980
981
982 # AM_DEP_TRACK
983 # ------------
984 AC_DEFUN([AM_DEP_TRACK],
985 [AC_ARG_ENABLE([dependency-tracking], [dnl
986 AS_HELP_STRING(
987   [--enable-dependency-tracking],
988   [do not reject slow dependency extractors])
989 AS_HELP_STRING(
990   [--disable-dependency-tracking],
991   [speeds up one-time build])])
992 if test "x$enable_dependency_tracking" != xno; then
993   am_depcomp="$ac_aux_dir/depcomp"
994   AMDEPBACKSLASH='\'
995   am__nodep='_no'
996 fi
997 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
998 AC_SUBST([AMDEPBACKSLASH])dnl
999 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1000 AC_SUBST([am__nodep])dnl
1001 _AM_SUBST_NOTMAKE([am__nodep])dnl
1002 ])
1003
1004 # Generate code to set up dependency tracking.              -*- Autoconf -*-
1005
1006 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1007 #
1008 # This file is free software; the Free Software Foundation
1009 # gives unlimited permission to copy and/or distribute it,
1010 # with or without modifications, as long as this notice is preserved.
1011
1012
1013 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1014 # ------------------------------
1015 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1016 [{
1017   # Older Autoconf quotes --file arguments for eval, but not when files
1018   # are listed without --file.  Let's play safe and only enable the eval
1019   # if we detect the quoting.
1020   case $CONFIG_FILES in
1021   *\'*) eval set x "$CONFIG_FILES" ;;
1022   *)   set x $CONFIG_FILES ;;
1023   esac
1024   shift
1025   for mf
1026   do
1027     # Strip MF so we end up with the name of the file.
1028     mf=`echo "$mf" | sed -e 's/:.*$//'`
1029     # Check whether this is an Automake generated Makefile or not.
1030     # We used to match only the files named 'Makefile.in', but
1031     # some people rename them; so instead we look at the file content.
1032     # Grep'ing the first line is not enough: some people post-process
1033     # each Makefile.in and add a new line on top of each file to say so.
1034     # Grep'ing the whole file is not good either: AIX grep has a line
1035     # limit of 2048, but all sed's we know have understand at least 4000.
1036     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1037       dirpart=`AS_DIRNAME("$mf")`
1038     else
1039       continue
1040     fi
1041     # Extract the definition of DEPDIR, am__include, and am__quote
1042     # from the Makefile without running 'make'.
1043     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1044     test -z "$DEPDIR" && continue
1045     am__include=`sed -n 's/^am__include = //p' < "$mf"`
1046     test -z "$am__include" && continue
1047     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1048     # Find all dependency output files, they are included files with
1049     # $(DEPDIR) in their names.  We invoke sed twice because it is the
1050     # simplest approach to changing $(DEPDIR) to its actual value in the
1051     # expansion.
1052     for file in `sed -n "
1053       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1054          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1055       # Make sure the directory exists.
1056       test -f "$dirpart/$file" && continue
1057       fdir=`AS_DIRNAME(["$file"])`
1058       AS_MKDIR_P([$dirpart/$fdir])
1059       # echo "creating $dirpart/$file"
1060       echo '# dummy' > "$dirpart/$file"
1061     done
1062   done
1063 }
1064 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1065
1066
1067 # AM_OUTPUT_DEPENDENCY_COMMANDS
1068 # -----------------------------
1069 # This macro should only be invoked once -- use via AC_REQUIRE.
1070 #
1071 # This code is only required when automatic dependency tracking
1072 # is enabled.  FIXME.  This creates each '.P' file that we will
1073 # need in order to bootstrap the dependency handling code.
1074 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1075 [AC_CONFIG_COMMANDS([depfiles],
1076      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1077      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1078 ])
1079
1080 # Do all the work for Automake.                             -*- Autoconf -*-
1081
1082 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1083 #
1084 # This file is free software; the Free Software Foundation
1085 # gives unlimited permission to copy and/or distribute it,
1086 # with or without modifications, as long as this notice is preserved.
1087
1088 # This macro actually does too much.  Some checks are only needed if
1089 # your package does certain things.  But this isn't really a big deal.
1090
1091 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1092 # AM_INIT_AUTOMAKE([OPTIONS])
1093 # -----------------------------------------------
1094 # The call with PACKAGE and VERSION arguments is the old style
1095 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1096 # and VERSION should now be passed to AC_INIT and removed from
1097 # the call to AM_INIT_AUTOMAKE.
1098 # We support both call styles for the transition.  After
1099 # the next Automake release, Autoconf can make the AC_INIT
1100 # arguments mandatory, and then we can depend on a new Autoconf
1101 # release and drop the old call support.
1102 AC_DEFUN([AM_INIT_AUTOMAKE],
1103 [AC_PREREQ([2.65])dnl
1104 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1105 dnl the ones we care about.
1106 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1107 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1108 AC_REQUIRE([AC_PROG_INSTALL])dnl
1109 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1110   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1111   # is not polluted with repeated "-I."
1112   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1113   # test to see if srcdir already configured
1114   if test -f $srcdir/config.status; then
1115     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1116   fi
1117 fi
1118
1119 # test whether we have cygpath
1120 if test -z "$CYGPATH_W"; then
1121   if (cygpath --version) >/dev/null 2>/dev/null; then
1122     CYGPATH_W='cygpath -w'
1123   else
1124     CYGPATH_W=echo
1125   fi
1126 fi
1127 AC_SUBST([CYGPATH_W])
1128
1129 # Define the identity of the package.
1130 dnl Distinguish between old-style and new-style calls.
1131 m4_ifval([$2],
1132 [AC_DIAGNOSE([obsolete],
1133              [$0: two- and three-arguments forms are deprecated.])
1134 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1135  AC_SUBST([PACKAGE], [$1])dnl
1136  AC_SUBST([VERSION], [$2])],
1137 [_AM_SET_OPTIONS([$1])dnl
1138 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1139 m4_if(
1140   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1141   [ok:ok],,
1142   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1143  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1144  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1145
1146 _AM_IF_OPTION([no-define],,
1147 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1148  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1149
1150 # Some tools Automake needs.
1151 AC_REQUIRE([AM_SANITY_CHECK])dnl
1152 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1153 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1154 AM_MISSING_PROG([AUTOCONF], [autoconf])
1155 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1156 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1157 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1158 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1159 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1160 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1161 # For better backward compatibility.  To be removed once Automake 1.9.x
1162 # dies out for good.  For more background, see:
1163 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1164 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1165 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1166 # We need awk for the "check" target.  The system "awk" is bad on
1167 # some platforms.
1168 AC_REQUIRE([AC_PROG_AWK])dnl
1169 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1170 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1171 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1172               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1173                              [_AM_PROG_TAR([v7])])])
1174 _AM_IF_OPTION([no-dependencies],,
1175 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1176                   [_AM_DEPENDENCIES([CC])],
1177                   [m4_define([AC_PROG_CC],
1178                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1179 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1180                   [_AM_DEPENDENCIES([CXX])],
1181                   [m4_define([AC_PROG_CXX],
1182                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1183 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1184                   [_AM_DEPENDENCIES([OBJC])],
1185                   [m4_define([AC_PROG_OBJC],
1186                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1187 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1188                   [_AM_DEPENDENCIES([OBJCXX])],
1189                   [m4_define([AC_PROG_OBJCXX],
1190                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1191 ])
1192 AC_REQUIRE([AM_SILENT_RULES])dnl
1193 dnl The testsuite driver may need to know about EXEEXT, so add the
1194 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1195 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1196 AC_CONFIG_COMMANDS_PRE(dnl
1197 [m4_provide_if([_AM_COMPILER_EXEEXT],
1198   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1199 ])
1200
1201 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1202 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1203 dnl mangled by Autoconf and run in a shell conditional statement.
1204 m4_define([_AC_COMPILER_EXEEXT],
1205 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1206
1207
1208 # When config.status generates a header, we must update the stamp-h file.
1209 # This file resides in the same directory as the config header
1210 # that is generated.  The stamp files are numbered to have different names.
1211
1212 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1213 # loop where config.status creates the headers, so we can generate
1214 # our stamp files there.
1215 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1216 [# Compute $1's index in $config_headers.
1217 _am_arg=$1
1218 _am_stamp_count=1
1219 for _am_header in $config_headers :; do
1220   case $_am_header in
1221     $_am_arg | $_am_arg:* )
1222       break ;;
1223     * )
1224       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1225   esac
1226 done
1227 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1228
1229 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1230 #
1231 # This file is free software; the Free Software Foundation
1232 # gives unlimited permission to copy and/or distribute it,
1233 # with or without modifications, as long as this notice is preserved.
1234
1235 # AM_PROG_INSTALL_SH
1236 # ------------------
1237 # Define $install_sh.
1238 AC_DEFUN([AM_PROG_INSTALL_SH],
1239 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1240 if test x"${install_sh}" != xset; then
1241   case $am_aux_dir in
1242   *\ * | *\     *)
1243     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1244   *)
1245     install_sh="\${SHELL} $am_aux_dir/install-sh"
1246   esac
1247 fi
1248 AC_SUBST([install_sh])])
1249
1250 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
1251 #
1252 # This file is free software; the Free Software Foundation
1253 # gives unlimited permission to copy and/or distribute it,
1254 # with or without modifications, as long as this notice is preserved.
1255
1256 # Check whether the underlying file-system supports filenames
1257 # with a leading dot.  For instance MS-DOS doesn't.
1258 AC_DEFUN([AM_SET_LEADING_DOT],
1259 [rm -rf .tst 2>/dev/null
1260 mkdir .tst 2>/dev/null
1261 if test -d .tst; then
1262   am__leading_dot=.
1263 else
1264   am__leading_dot=_
1265 fi
1266 rmdir .tst 2>/dev/null
1267 AC_SUBST([am__leading_dot])])
1268
1269 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1270 # From Jim Meyering
1271
1272 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1273 #
1274 # This file is free software; the Free Software Foundation
1275 # gives unlimited permission to copy and/or distribute it,
1276 # with or without modifications, as long as this notice is preserved.
1277
1278 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1279 # ----------------------------------
1280 # Control maintainer-specific portions of Makefiles.
1281 # Default is to disable them, unless 'enable' is passed literally.
1282 # For symmetry, 'disable' may be passed as well.  Anyway, the user
1283 # can override the default with the --enable/--disable switch.
1284 AC_DEFUN([AM_MAINTAINER_MODE],
1285 [m4_case(m4_default([$1], [disable]),
1286        [enable], [m4_define([am_maintainer_other], [disable])],
1287        [disable], [m4_define([am_maintainer_other], [enable])],
1288        [m4_define([am_maintainer_other], [enable])
1289         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1290 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1291   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1292   AC_ARG_ENABLE([maintainer-mode],
1293     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1294       am_maintainer_other[ make rules and dependencies not useful
1295       (and sometimes confusing) to the casual installer])],
1296     [USE_MAINTAINER_MODE=$enableval],
1297     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1298   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1299   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1300   MAINT=$MAINTAINER_MODE_TRUE
1301   AC_SUBST([MAINT])dnl
1302 ]
1303 )
1304
1305 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1306
1307 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1308 #
1309 # This file is free software; the Free Software Foundation
1310 # gives unlimited permission to copy and/or distribute it,
1311 # with or without modifications, as long as this notice is preserved.
1312
1313 # AM_MAKE_INCLUDE()
1314 # -----------------
1315 # Check to see how make treats includes.
1316 AC_DEFUN([AM_MAKE_INCLUDE],
1317 [am_make=${MAKE-make}
1318 cat > confinc << 'END'
1319 am__doit:
1320         @echo this is the am__doit target
1321 .PHONY: am__doit
1322 END
1323 # If we don't find an include directive, just comment out the code.
1324 AC_MSG_CHECKING([for style of include used by $am_make])
1325 am__include="#"
1326 am__quote=
1327 _am_result=none
1328 # First try GNU make style include.
1329 echo "include confinc" > confmf
1330 # Ignore all kinds of additional output from 'make'.
1331 case `$am_make -s -f confmf 2> /dev/null` in #(
1332 *the\ am__doit\ target*)
1333   am__include=include
1334   am__quote=
1335   _am_result=GNU
1336   ;;
1337 esac
1338 # Now try BSD make style include.
1339 if test "$am__include" = "#"; then
1340    echo '.include "confinc"' > confmf
1341    case `$am_make -s -f confmf 2> /dev/null` in #(
1342    *the\ am__doit\ target*)
1343      am__include=.include
1344      am__quote="\""
1345      _am_result=BSD
1346      ;;
1347    esac
1348 fi
1349 AC_SUBST([am__include])
1350 AC_SUBST([am__quote])
1351 AC_MSG_RESULT([$_am_result])
1352 rm -f confinc confmf
1353 ])
1354
1355 # Copyright (C) 1999-2013 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_CC_C_O
1362 # --------------
1363 # Like AC_PROG_CC_C_O, but changed for automake.
1364 AC_DEFUN([AM_PROG_CC_C_O],
1365 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1366 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1367 AC_REQUIRE_AUX_FILE([compile])dnl
1368 # FIXME: we rely on the cache variable name because
1369 # there is no other way.
1370 set dummy $CC
1371 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1372 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1373 if test "$am_t" != yes; then
1374    # Losing compiler, so override with the script.
1375    # FIXME: It is wrong to rewrite CC.
1376    # But if we don't then we get into trouble of one sort or another.
1377    # A longer-term fix would be to have automake use am__CC in this case,
1378    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1379    CC="$am_aux_dir/compile $CC"
1380 fi
1381 dnl Make sure AC_PROG_CC is never called again, or it will override our
1382 dnl setting of CC.
1383 m4_define([AC_PROG_CC],
1384           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1385 ])
1386
1387 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1388
1389 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1390 #
1391 # This file is free software; the Free Software Foundation
1392 # gives unlimited permission to copy and/or distribute it,
1393 # with or without modifications, as long as this notice is preserved.
1394
1395 # AM_MISSING_PROG(NAME, PROGRAM)
1396 # ------------------------------
1397 AC_DEFUN([AM_MISSING_PROG],
1398 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1399 $1=${$1-"${am_missing_run}$2"}
1400 AC_SUBST($1)])
1401
1402 # AM_MISSING_HAS_RUN
1403 # ------------------
1404 # Define MISSING if not defined so far and test if it is modern enough.
1405 # If it is, set am_missing_run to use it, otherwise, to nothing.
1406 AC_DEFUN([AM_MISSING_HAS_RUN],
1407 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1408 AC_REQUIRE_AUX_FILE([missing])dnl
1409 if test x"${MISSING+set}" != xset; then
1410   case $am_aux_dir in
1411   *\ * | *\     *)
1412     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1413   *)
1414     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1415   esac
1416 fi
1417 # Use eval to expand $SHELL
1418 if eval "$MISSING --is-lightweight"; then
1419   am_missing_run="$MISSING "
1420 else
1421   am_missing_run=
1422   AC_MSG_WARN(['missing' script is too old or missing])
1423 fi
1424 ])
1425
1426 # Helper functions for option handling.                     -*- Autoconf -*-
1427
1428 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1429 #
1430 # This file is free software; the Free Software Foundation
1431 # gives unlimited permission to copy and/or distribute it,
1432 # with or without modifications, as long as this notice is preserved.
1433
1434 # _AM_MANGLE_OPTION(NAME)
1435 # -----------------------
1436 AC_DEFUN([_AM_MANGLE_OPTION],
1437 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1438
1439 # _AM_SET_OPTION(NAME)
1440 # --------------------
1441 # Set option NAME.  Presently that only means defining a flag for this option.
1442 AC_DEFUN([_AM_SET_OPTION],
1443 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1444
1445 # _AM_SET_OPTIONS(OPTIONS)
1446 # ------------------------
1447 # OPTIONS is a space-separated list of Automake options.
1448 AC_DEFUN([_AM_SET_OPTIONS],
1449 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1450
1451 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1452 # -------------------------------------------
1453 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1454 AC_DEFUN([_AM_IF_OPTION],
1455 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1456
1457 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1458 #
1459 # This file is free software; the Free Software Foundation
1460 # gives unlimited permission to copy and/or distribute it,
1461 # with or without modifications, as long as this notice is preserved.
1462
1463
1464 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1465 # ---------------------------------------------------------------------------
1466 # Adds support for distributing Python modules and packages.  To
1467 # install modules, copy them to $(pythondir), using the python_PYTHON
1468 # automake variable.  To install a package with the same name as the
1469 # automake package, install to $(pkgpythondir), or use the
1470 # pkgpython_PYTHON automake variable.
1471 #
1472 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1473 # locations to install python extension modules (shared libraries).
1474 # Another macro is required to find the appropriate flags to compile
1475 # extension modules.
1476 #
1477 # If your package is configured with a different prefix to python,
1478 # users will have to add the install directory to the PYTHONPATH
1479 # environment variable, or create a .pth file (see the python
1480 # documentation for details).
1481 #
1482 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1483 # cause an error if the version of python installed on the system
1484 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
1485 # numbers and dots only.
1486 AC_DEFUN([AM_PATH_PYTHON],
1487  [
1488   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
1489   dnl supported. (2.0 was released on October 16, 2000).
1490   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1491 [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
1492  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
1493
1494   AC_ARG_VAR([PYTHON], [the Python interpreter])
1495
1496   m4_if([$1],[],[
1497     dnl No version check is needed.
1498     # Find any Python interpreter.
1499     if test -z "$PYTHON"; then
1500       AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1501     fi
1502     am_display_PYTHON=python
1503   ], [
1504     dnl A version check is needed.
1505     if test -n "$PYTHON"; then
1506       # If the user set $PYTHON, use it and don't search something else.
1507       AC_MSG_CHECKING([whether $PYTHON version is >= $1])
1508       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1509                               [AC_MSG_RESULT([yes])],
1510                               [AC_MSG_RESULT([no])
1511                                AC_MSG_ERROR([Python interpreter is too old])])
1512       am_display_PYTHON=$PYTHON
1513     else
1514       # Otherwise, try each interpreter until we find one that satisfies
1515       # VERSION.
1516       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1517         [am_cv_pathless_PYTHON],[
1518         for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1519           test "$am_cv_pathless_PYTHON" = none && break
1520           AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1521         done])
1522       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1523       if test "$am_cv_pathless_PYTHON" = none; then
1524         PYTHON=:
1525       else
1526         AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1527       fi
1528       am_display_PYTHON=$am_cv_pathless_PYTHON
1529     fi
1530   ])
1531
1532   if test "$PYTHON" = :; then
1533   dnl Run any user-specified action, or abort.
1534     m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1535   else
1536
1537   dnl Query Python for its version number.  Getting [:3] seems to be
1538   dnl the best way to do this; it's what "site.py" does in the standard
1539   dnl library.
1540
1541   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1542     [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1543   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1544
1545   dnl Use the values of $prefix and $exec_prefix for the corresponding
1546   dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
1547   dnl distinct variables so they can be overridden if need be.  However,
1548   dnl general consensus is that you shouldn't need this ability.
1549
1550   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1551   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1552
1553   dnl At times (like when building shared libraries) you may want
1554   dnl to know which OS platform Python thinks this is.
1555
1556   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1557     [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1558   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1559
1560   # Just factor out some code duplication.
1561   am_python_setup_sysconfig="\
1562 import sys
1563 # Prefer sysconfig over distutils.sysconfig, for better compatibility
1564 # with python 3.x.  See automake bug#10227.
1565 try:
1566     import sysconfig
1567 except ImportError:
1568     can_use_sysconfig = 0
1569 else:
1570     can_use_sysconfig = 1
1571 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1572 # <https://github.com/pypa/virtualenv/issues/118>
1573 try:
1574     from platform import python_implementation
1575     if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1576         can_use_sysconfig = 0
1577 except ImportError:
1578     pass"
1579
1580   dnl Set up 4 directories:
1581
1582   dnl pythondir -- where to install python scripts.  This is the
1583   dnl   site-packages directory, not the python standard library
1584   dnl   directory like in previous automake betas.  This behavior
1585   dnl   is more consistent with lispdir.m4 for example.
1586   dnl Query distutils for this directory.
1587   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1588     [am_cv_python_pythondir],
1589     [if test "x$prefix" = xNONE
1590      then
1591        am_py_prefix=$ac_default_prefix
1592      else
1593        am_py_prefix=$prefix
1594      fi
1595      am_cv_python_pythondir=`$PYTHON -c "
1596 $am_python_setup_sysconfig
1597 if can_use_sysconfig:
1598     sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
1599 else:
1600     from distutils import sysconfig
1601     sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1602 sys.stdout.write(sitedir)"`
1603      case $am_cv_python_pythondir in
1604      $am_py_prefix*)
1605        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1606        am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1607        ;;
1608      *)
1609        case $am_py_prefix in
1610          /usr|/System*) ;;
1611          *)
1612           am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1613           ;;
1614        esac
1615        ;;
1616      esac
1617     ])
1618   AC_SUBST([pythondir], [$am_cv_python_pythondir])
1619
1620   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
1621   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
1622   dnl   more consistent with the rest of automake.
1623
1624   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1625
1626   dnl pyexecdir -- directory for installing python extension modules
1627   dnl   (shared libraries)
1628   dnl Query distutils for this directory.
1629   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1630     [am_cv_python_pyexecdir],
1631     [if test "x$exec_prefix" = xNONE
1632      then
1633        am_py_exec_prefix=$am_py_prefix
1634      else
1635        am_py_exec_prefix=$exec_prefix
1636      fi
1637      am_cv_python_pyexecdir=`$PYTHON -c "
1638 $am_python_setup_sysconfig
1639 if can_use_sysconfig:
1640     sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
1641 else:
1642     from distutils import sysconfig
1643     sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
1644 sys.stdout.write(sitedir)"`
1645      case $am_cv_python_pyexecdir in
1646      $am_py_exec_prefix*)
1647        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1648        am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1649        ;;
1650      *)
1651        case $am_py_exec_prefix in
1652          /usr|/System*) ;;
1653          *)
1654            am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1655            ;;
1656        esac
1657        ;;
1658      esac
1659     ])
1660   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1661
1662   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1663
1664   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1665
1666   dnl Run any user-specified action.
1667   $2
1668   fi
1669
1670 ])
1671
1672
1673 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1674 # ---------------------------------------------------------------------------
1675 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1676 # Run ACTION-IF-FALSE otherwise.
1677 # This test uses sys.hexversion instead of the string equivalent (first
1678 # word of sys.version), in order to cope with versions such as 2.2c1.
1679 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1680 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1681  [prog="import sys
1682 # split strings by '.' and convert to numeric.  Append some zeros
1683 # because we need at least 4 digits for the hex conversion.
1684 # map returns an iterator in Python 3.0 and a list in 2.x
1685 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1686 minverhex = 0
1687 # xrange is not present in Python 3.0 and range returns an iterator
1688 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1689 sys.exit(sys.hexversion < minverhex)"
1690   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1691
1692 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1693 #
1694 # This file is free software; the Free Software Foundation
1695 # gives unlimited permission to copy and/or distribute it,
1696 # with or without modifications, as long as this notice is preserved.
1697
1698 # AM_RUN_LOG(COMMAND)
1699 # -------------------
1700 # Run COMMAND, save the exit status in ac_status, and log it.
1701 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1702 AC_DEFUN([AM_RUN_LOG],
1703 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1704    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1705    ac_status=$?
1706    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1707    (exit $ac_status); }])
1708
1709 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1710
1711 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1712 #
1713 # This file is free software; the Free Software Foundation
1714 # gives unlimited permission to copy and/or distribute it,
1715 # with or without modifications, as long as this notice is preserved.
1716
1717 # AM_SANITY_CHECK
1718 # ---------------
1719 AC_DEFUN([AM_SANITY_CHECK],
1720 [AC_MSG_CHECKING([whether build environment is sane])
1721 # Reject unsafe characters in $srcdir or the absolute working directory
1722 # name.  Accept space and tab only in the latter.
1723 am_lf='
1724 '
1725 case `pwd` in
1726   *[[\\\"\#\$\&\'\`$am_lf]]*)
1727     AC_MSG_ERROR([unsafe absolute working directory name]);;
1728 esac
1729 case $srcdir in
1730   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1731     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1732 esac
1733
1734 # Do 'set' in a subshell so we don't clobber the current shell's
1735 # arguments.  Must try -L first in case configure is actually a
1736 # symlink; some systems play weird games with the mod time of symlinks
1737 # (eg FreeBSD returns the mod time of the symlink's containing
1738 # directory).
1739 if (
1740    am_has_slept=no
1741    for am_try in 1 2; do
1742      echo "timestamp, slept: $am_has_slept" > conftest.file
1743      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1744      if test "$[*]" = "X"; then
1745         # -L didn't work.
1746         set X `ls -t "$srcdir/configure" conftest.file`
1747      fi
1748      if test "$[*]" != "X $srcdir/configure conftest.file" \
1749         && test "$[*]" != "X conftest.file $srcdir/configure"; then
1750
1751         # If neither matched, then we have a broken ls.  This can happen
1752         # if, for instance, CONFIG_SHELL is bash and it inherits a
1753         # broken ls alias from the environment.  This has actually
1754         # happened.  Such a system could not be considered "sane".
1755         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1756   alias in your environment])
1757      fi
1758      if test "$[2]" = conftest.file || test $am_try -eq 2; then
1759        break
1760      fi
1761      # Just in case.
1762      sleep 1
1763      am_has_slept=yes
1764    done
1765    test "$[2]" = conftest.file
1766    )
1767 then
1768    # Ok.
1769    :
1770 else
1771    AC_MSG_ERROR([newly created file is older than distributed files!
1772 Check your system clock])
1773 fi
1774 AC_MSG_RESULT([yes])
1775 # If we didn't sleep, we still need to ensure time stamps of config.status and
1776 # generated files are strictly newer.
1777 am_sleep_pid=
1778 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1779   ( sleep 1 ) &
1780   am_sleep_pid=$!
1781 fi
1782 AC_CONFIG_COMMANDS_PRE(
1783   [AC_MSG_CHECKING([that generated files are newer than configure])
1784    if test -n "$am_sleep_pid"; then
1785      # Hide warnings about reused PIDs.
1786      wait $am_sleep_pid 2>/dev/null
1787    fi
1788    AC_MSG_RESULT([done])])
1789 rm -f conftest.file
1790 ])
1791
1792 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
1793 #
1794 # This file is free software; the Free Software Foundation
1795 # gives unlimited permission to copy and/or distribute it,
1796 # with or without modifications, as long as this notice is preserved.
1797
1798 # AM_SILENT_RULES([DEFAULT])
1799 # --------------------------
1800 # Enable less verbose build rules; with the default set to DEFAULT
1801 # ("yes" being less verbose, "no" or empty being verbose).
1802 AC_DEFUN([AM_SILENT_RULES],
1803 [AC_ARG_ENABLE([silent-rules], [dnl
1804 AS_HELP_STRING(
1805   [--enable-silent-rules],
1806   [less verbose build output (undo: "make V=1")])
1807 AS_HELP_STRING(
1808   [--disable-silent-rules],
1809   [verbose build output (undo: "make V=0")])dnl
1810 ])
1811 case $enable_silent_rules in @%:@ (((
1812   yes) AM_DEFAULT_VERBOSITY=0;;
1813    no) AM_DEFAULT_VERBOSITY=1;;
1814     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1815 esac
1816 dnl
1817 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1818 dnl do not support nested variable expansions.
1819 dnl See automake bug#9928 and bug#10237.
1820 am_make=${MAKE-make}
1821 AC_CACHE_CHECK([whether $am_make supports nested variables],
1822    [am_cv_make_support_nested_variables],
1823    [if AS_ECHO([['TRUE=$(BAR$(V))
1824 BAR0=false
1825 BAR1=true
1826 V=1
1827 am__doit:
1828         @$(TRUE)
1829 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1830   am_cv_make_support_nested_variables=yes
1831 else
1832   am_cv_make_support_nested_variables=no
1833 fi])
1834 if test $am_cv_make_support_nested_variables = yes; then
1835   dnl Using '$V' instead of '$(V)' breaks IRIX make.
1836   AM_V='$(V)'
1837   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1838 else
1839   AM_V=$AM_DEFAULT_VERBOSITY
1840   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1841 fi
1842 AC_SUBST([AM_V])dnl
1843 AM_SUBST_NOTMAKE([AM_V])dnl
1844 AC_SUBST([AM_DEFAULT_V])dnl
1845 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1846 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1847 AM_BACKSLASH='\'
1848 AC_SUBST([AM_BACKSLASH])dnl
1849 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1850 ])
1851
1852 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1853 #
1854 # This file is free software; the Free Software Foundation
1855 # gives unlimited permission to copy and/or distribute it,
1856 # with or without modifications, as long as this notice is preserved.
1857
1858 # AM_PROG_INSTALL_STRIP
1859 # ---------------------
1860 # One issue with vendor 'install' (even GNU) is that you can't
1861 # specify the program used to strip binaries.  This is especially
1862 # annoying in cross-compiling environments, where the build's strip
1863 # is unlikely to handle the host's binaries.
1864 # Fortunately install-sh will honor a STRIPPROG variable, so we
1865 # always use install-sh in "make install-strip", and initialize
1866 # STRIPPROG with the value of the STRIP variable (set by the user).
1867 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1868 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1869 # Installed binaries are usually stripped using 'strip' when the user
1870 # run "make install-strip".  However 'strip' might not be the right
1871 # tool to use in cross-compilation environments, therefore Automake
1872 # will honor the 'STRIP' environment variable to overrule this program.
1873 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1874 if test "$cross_compiling" != no; then
1875   AC_CHECK_TOOL([STRIP], [strip], :)
1876 fi
1877 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1878 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1879
1880 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1881 #
1882 # This file is free software; the Free Software Foundation
1883 # gives unlimited permission to copy and/or distribute it,
1884 # with or without modifications, as long as this notice is preserved.
1885
1886 # _AM_SUBST_NOTMAKE(VARIABLE)
1887 # ---------------------------
1888 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1889 # This macro is traced by Automake.
1890 AC_DEFUN([_AM_SUBST_NOTMAKE])
1891
1892 # AM_SUBST_NOTMAKE(VARIABLE)
1893 # --------------------------
1894 # Public sister of _AM_SUBST_NOTMAKE.
1895 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1896
1897 # Check how to create a tarball.                            -*- Autoconf -*-
1898
1899 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1900 #
1901 # This file is free software; the Free Software Foundation
1902 # gives unlimited permission to copy and/or distribute it,
1903 # with or without modifications, as long as this notice is preserved.
1904
1905 # _AM_PROG_TAR(FORMAT)
1906 # --------------------
1907 # Check how to create a tarball in format FORMAT.
1908 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1909 #
1910 # Substitute a variable $(am__tar) that is a command
1911 # writing to stdout a FORMAT-tarball containing the directory
1912 # $tardir.
1913 #     tardir=directory && $(am__tar) > result.tar
1914 #
1915 # Substitute a variable $(am__untar) that extract such
1916 # a tarball read from stdin.
1917 #     $(am__untar) < result.tar
1918 #
1919 AC_DEFUN([_AM_PROG_TAR],
1920 [# Always define AMTAR for backward compatibility.  Yes, it's still used
1921 # in the wild :-(  We should find a proper way to deprecate it ...
1922 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1923
1924 # We'll loop over all known methods to create a tar archive until one works.
1925 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1926
1927 m4_if([$1], [v7],
1928   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1929
1930   [m4_case([$1],
1931     [ustar],
1932      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1933       # There is notably a 21 bits limit for the UID and the GID.  In fact,
1934       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1935       # and bug#13588).
1936       am_max_uid=2097151 # 2^21 - 1
1937       am_max_gid=$am_max_uid
1938       # The $UID and $GID variables are not portable, so we need to resort
1939       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1940       # below are definitely unexpected, so allow the users to see them
1941       # (that is, avoid stderr redirection).
1942       am_uid=`id -u || echo unknown`
1943       am_gid=`id -g || echo unknown`
1944       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1945       if test $am_uid -le $am_max_uid; then
1946          AC_MSG_RESULT([yes])
1947       else
1948          AC_MSG_RESULT([no])
1949          _am_tools=none
1950       fi
1951       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1952       if test $am_gid -le $am_max_gid; then
1953          AC_MSG_RESULT([yes])
1954       else
1955         AC_MSG_RESULT([no])
1956         _am_tools=none
1957       fi],
1958
1959   [pax],
1960     [],
1961
1962   [m4_fatal([Unknown tar format])])
1963
1964   AC_MSG_CHECKING([how to create a $1 tar archive])
1965
1966   # Go ahead even if we have the value already cached.  We do so because we
1967   # need to set the values for the 'am__tar' and 'am__untar' variables.
1968   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1969
1970   for _am_tool in $_am_tools; do
1971     case $_am_tool in
1972     gnutar)
1973       for _am_tar in tar gnutar gtar; do
1974         AM_RUN_LOG([$_am_tar --version]) && break
1975       done
1976       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1977       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1978       am__untar="$_am_tar -xf -"
1979       ;;
1980     plaintar)
1981       # Must skip GNU tar: if it does not support --format= it doesn't create
1982       # ustar tarball either.
1983       (tar --version) >/dev/null 2>&1 && continue
1984       am__tar='tar chf - "$$tardir"'
1985       am__tar_='tar chf - "$tardir"'
1986       am__untar='tar xf -'
1987       ;;
1988     pax)
1989       am__tar='pax -L -x $1 -w "$$tardir"'
1990       am__tar_='pax -L -x $1 -w "$tardir"'
1991       am__untar='pax -r'
1992       ;;
1993     cpio)
1994       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1995       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1996       am__untar='cpio -i -H $1 -d'
1997       ;;
1998     none)
1999       am__tar=false
2000       am__tar_=false
2001       am__untar=false
2002       ;;
2003     esac
2004
2005     # If the value was cached, stop now.  We just wanted to have am__tar
2006     # and am__untar set.
2007     test -n "${am_cv_prog_tar_$1}" && break
2008
2009     # tar/untar a dummy directory, and stop if the command works.
2010     rm -rf conftest.dir
2011     mkdir conftest.dir
2012     echo GrepMe > conftest.dir/file
2013     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2014     rm -rf conftest.dir
2015     if test -s conftest.tar; then
2016       AM_RUN_LOG([$am__untar <conftest.tar])
2017       AM_RUN_LOG([cat conftest.dir/file])
2018       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2019     fi
2020   done
2021   rm -rf conftest.dir
2022
2023   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2024   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2025
2026 AC_SUBST([am__tar])
2027 AC_SUBST([am__untar])
2028 ]) # _AM_PROG_TAR
2029
2030 m4_include([m4/as-version.m4])
2031 m4_include([m4/boost.m4])
2032 m4_include([m4/intltool.m4])
2033 m4_include([m4/libtool.m4])
2034 m4_include([m4/ltoptions.m4])
2035 m4_include([m4/ltsugar.m4])
2036 m4_include([m4/ltversion.m4])
2037 m4_include([m4/lt~obsolete.m4])