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