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