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