Preparing release
[geeqie.git] / aclocal.m4
1 # generated automatically by aclocal 1.16.2 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2020 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 environment 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 environment 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 occurred. 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 # Configure paths for GTK+
917 # Owen Taylor     1997-2001
918
919 # Version number used by aclocal, see `info automake Serials`.
920 # Increment on every change.
921 #serial 1
922
923 dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
924 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, 
925 dnl pass to pkg-config
926 dnl
927 AC_DEFUN([AM_PATH_GTK_3_0],
928 [m4_warn([obsolete], [AM_PATH_GTK_3_0 is deprecated, use PKG_CHECK_MODULES([GTK], [gtk+-3.0]) instead])
929 dnl Get the cflags and libraries from pkg-config
930 dnl
931 AC_ARG_ENABLE(gtktest, [  --disable-gtktest       do not try to compile and run a test GTK+ program],
932                     , enable_gtktest=yes)
933   min_gtk_version=ifelse([$1], [], [3.0.0], [$1])
934
935   pkg_config_args="gtk+-3.0 >= $min_gtk_version"
936   for module in . $4
937   do
938       case "$module" in
939          gthread)
940              pkg_config_args="$pkg_config_args gthread-2.0"
941          ;;
942       esac
943   done
944
945   no_gtk=""
946
947   PKG_PROG_PKG_CONFIG([0.16])
948
949   if test -z "$PKG_CONFIG"; then
950     no_gtk=yes
951   fi
952
953   AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
954
955   if test -n "$PKG_CONFIG"; then
956     ## don't try to run the test against uninstalled libtool libs
957     if $PKG_CONFIG --uninstalled $pkg_config_args; then
958           echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
959           enable_gtktest=no
960     fi
961
962     if $PKG_CONFIG $pkg_config_args; then
963           :
964     else
965           no_gtk=yes
966     fi
967   fi
968
969   if test x"$no_gtk" = x ; then
970     GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
971     GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
972     gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
973            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
974     gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
975            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
976     gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
977            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
978     if test "x$enable_gtktest" = "xyes" ; then
979       ac_save_CFLAGS="$CFLAGS"
980       ac_save_LIBS="$LIBS"
981       CFLAGS="$CFLAGS $GTK_CFLAGS"
982       LIBS="$GTK_LIBS $LIBS"
983 dnl
984 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
985 dnl checks the results of pkg-config to some extent)
986 dnl
987       rm -f conf.gtktest
988       AC_TRY_RUN([
989 #include <gtk/gtk.h>
990 #include <stdio.h>
991 #include <stdlib.h>
992
993 int 
994 main ()
995 {
996   unsigned int major, minor, micro;
997
998   fclose (fopen ("conf.gtktest", "w"));
999
1000   if (sscanf("$min_gtk_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
1001      printf("%s, bad version string\n", "$min_gtk_version");
1002      exit(1);
1003    }
1004
1005   if ((gtk_major_version != $gtk_config_major_version) ||
1006       (gtk_minor_version != $gtk_config_minor_version) ||
1007       (gtk_micro_version != $gtk_config_micro_version))
1008     {
1009       printf("\n*** 'pkg-config --modversion gtk+-3.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
1010              $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
1011              gtk_major_version, gtk_minor_version, gtk_micro_version);
1012       printf ("*** was found! If pkg-config was correct, then it is best\n");
1013       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
1014       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1015       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1016       printf("*** required on your system.\n");
1017       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
1018       printf("*** to point to the correct configuration files\n");
1019     } 
1020   else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
1021            (gtk_minor_version != GTK_MINOR_VERSION) ||
1022            (gtk_micro_version != GTK_MICRO_VERSION))
1023     {
1024       printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
1025              GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
1026       printf("*** library (version %d.%d.%d)\n",
1027              gtk_major_version, gtk_minor_version, gtk_micro_version);
1028     }
1029   else
1030     {
1031       if ((gtk_major_version > major) ||
1032         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
1033         ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
1034       {
1035         return 0;
1036        }
1037      else
1038       {
1039         printf("\n*** An old version of GTK+ (%u.%u.%u) was found.\n",
1040                gtk_major_version, gtk_minor_version, gtk_micro_version);
1041         printf("*** You need a version of GTK+ newer than %u.%u.%u. The latest version of\n",
1042                major, minor, micro);
1043         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
1044         printf("***\n");
1045         printf("*** If you have already installed a sufficiently new version, this error\n");
1046         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
1047         printf("*** being found. The easiest way to fix this is to remove the old version\n");
1048         printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
1049         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
1050         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1051         printf("*** so that the correct libraries are found at run-time))\n");
1052       }
1053     }
1054   return 1;
1055 }
1056 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1057        CFLAGS="$ac_save_CFLAGS"
1058        LIBS="$ac_save_LIBS"
1059      fi
1060   fi
1061   if test "x$no_gtk" = x ; then
1062      AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
1063      ifelse([$2], , :, [$2])
1064   else
1065      AC_MSG_RESULT(no)
1066      if test -z "$PKG_CONFIG"; then
1067        echo "*** A new enough version of pkg-config was not found."
1068        echo "*** See http://pkgconfig.sourceforge.net"
1069      else
1070        if test -f conf.gtktest ; then
1071         :
1072        else
1073           echo "*** Could not run GTK+ test program, checking why..."
1074           ac_save_CFLAGS="$CFLAGS"
1075           ac_save_LIBS="$LIBS"
1076           CFLAGS="$CFLAGS $GTK_CFLAGS"
1077           LIBS="$LIBS $GTK_LIBS"
1078           AC_TRY_LINK([
1079 #include <gtk/gtk.h>
1080 #include <stdio.h>
1081 ],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
1082         [ echo "*** The test program compiled, but did not run. This usually means"
1083           echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
1084           echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
1085           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1086           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
1087           echo "*** is required on your system"
1088           echo "***"
1089           echo "*** If you have an old version installed, it is best to remove it, although"
1090           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1091         [ echo "*** The test program failed to compile or link. See the file config.log for the"
1092           echo "*** exact error that occurred. This usually means GTK+ is incorrectly installed."])
1093           CFLAGS="$ac_save_CFLAGS"
1094           LIBS="$ac_save_LIBS"
1095        fi
1096      fi
1097      GTK_CFLAGS=""
1098      GTK_LIBS=""
1099      ifelse([$3], , :, [$3])
1100   fi
1101   AC_SUBST(GTK_CFLAGS)
1102   AC_SUBST(GTK_LIBS)
1103   rm -f conf.gtktest
1104 ])
1105
1106 dnl GTK_CHECK_BACKEND(BACKEND-NAME [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1107 dnl   Tests for BACKEND-NAME in the GTK targets list
1108 dnl
1109 AC_DEFUN([GTK_CHECK_BACKEND],
1110 [m4_warn([obsolete], [GTK_CHECK_BACKEND is deprecated, use PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-3.0]) or similar instead])
1111   pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0)
1112   min_gtk_version=ifelse([$2],,3.0.0,$2)
1113   pkg_config_args="$pkg_config_args >= $min_gtk_version"
1114
1115   PKG_PROG_PKG_CONFIG([0.16])
1116   AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR([No pkg-config found])])
1117
1118   if $PKG_CONFIG $pkg_config_args ; then
1119     target_found=yes
1120   else
1121     target_found=no
1122   fi
1123
1124   if test "x$target_found" = "xno"; then
1125     ifelse([$4],,[AC_MSG_ERROR([Backend $backend not found.])],[$4])
1126   else
1127     ifelse([$3],,[:],[$3])
1128   fi
1129 ])
1130
1131
1132 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1133 # serial 42 IT_PROG_INTLTOOL
1134 AC_DEFUN([IT_PROG_INTLTOOL], [
1135 AC_PREREQ([2.50])dnl
1136 AC_REQUIRE([AM_NLS])dnl
1137
1138 case "$am__api_version" in
1139     1.[01234])
1140         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1141     ;;
1142     *)
1143     ;;
1144 esac
1145
1146 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1147 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1148 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1149 if test -n "$1"; then
1150     AC_MSG_CHECKING([for intltool >= $1])
1151     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1152     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1153         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
1154 fi
1155
1156 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1157 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1158 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1159 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1160     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1161 fi
1162
1163 if test -z "$AM_DEFAULT_VERBOSITY"; then
1164   AM_DEFAULT_VERBOSITY=1
1165 fi
1166 AC_SUBST([AM_DEFAULT_VERBOSITY])
1167
1168 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
1169 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
1170 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
1171 AC_SUBST(INTLTOOL_V_MERGE)
1172 AC_SUBST(INTLTOOL__v_MERGE_)
1173 AC_SUBST(INTLTOOL__v_MERGE_0)
1174
1175 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
1176 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
1177 intltool__v_merge_options_0='-q'
1178 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
1179 AC_SUBST(intltool__v_merge_options_)
1180 AC_SUBST(intltool__v_merge_options_0)
1181
1182   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 $< [$]@' 
1183 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 $< [$]@' 
1184      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 $< [$]@' 
1185      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 $< [$]@' 
1186       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 $< [$]@'
1187      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 $< [$]@' 
1188    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 $< [$]@' 
1189     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 $< [$]@' 
1190 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 $< [$]@' 
1191        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 $< [$]@' 
1192       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 $< [$]@' 
1193 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
1194       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 $< [$]@'
1195 else
1196       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'
1197 fi
1198       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 $< [$]@' 
1199       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 $< [$]@' 
1200     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 $< [$]@' 
1201   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 $< [$]@' 
1202     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 $< [$]@' 
1203     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 $< [$]@'
1204    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 $< [$]@'
1205
1206 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
1207 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1208 _IT_SUBST(INTLTOOL_KEYS_RULE)
1209 _IT_SUBST(INTLTOOL_PROP_RULE)
1210 _IT_SUBST(INTLTOOL_OAF_RULE)
1211 _IT_SUBST(INTLTOOL_PONG_RULE)
1212 _IT_SUBST(INTLTOOL_SERVER_RULE)
1213 _IT_SUBST(INTLTOOL_SHEET_RULE)
1214 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1215 _IT_SUBST(INTLTOOL_UI_RULE)
1216 _IT_SUBST(INTLTOOL_XAM_RULE)
1217 _IT_SUBST(INTLTOOL_KBD_RULE)
1218 _IT_SUBST(INTLTOOL_XML_RULE)
1219 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1220 _IT_SUBST(INTLTOOL_CAVES_RULE)
1221 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1222 _IT_SUBST(INTLTOOL_THEME_RULE)
1223 _IT_SUBST(INTLTOOL_SERVICE_RULE)
1224 _IT_SUBST(INTLTOOL_POLICY_RULE)
1225
1226 # Check the gettext tools to make sure they are GNU
1227 AC_PATH_PROG(XGETTEXT, xgettext)
1228 AC_PATH_PROG(MSGMERGE, msgmerge)
1229 AC_PATH_PROG(MSGFMT, msgfmt)
1230 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1231 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1232     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1233 fi
1234 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1235 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1236 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1237 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1238     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1239 fi
1240
1241 AC_PATH_PROG(INTLTOOL_PERL, perl)
1242 if test -z "$INTLTOOL_PERL"; then
1243    AC_MSG_ERROR([perl not found])
1244 fi
1245 AC_MSG_CHECKING([for perl >= 5.8.1])
1246 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1247 if test $? -ne 0; then
1248    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1249 else
1250    IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1251    AC_MSG_RESULT([$IT_PERL_VERSION])
1252 fi
1253 if test "x$2" != "xno-xml"; then
1254    AC_MSG_CHECKING([for XML::Parser])
1255    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1256        AC_MSG_RESULT([ok])
1257    else
1258        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1259    fi
1260 fi
1261
1262 # Substitute ALL_LINGUAS so we can use it in po/Makefile
1263 AC_SUBST(ALL_LINGUAS)
1264
1265 IT_PO_SUBDIR([po])
1266
1267 ])
1268
1269
1270 # IT_PO_SUBDIR(DIRNAME)
1271 # ---------------------
1272 # All po subdirs have to be declared with this macro; the subdir "po" is
1273 # declared by IT_PROG_INTLTOOL.
1274 #
1275 AC_DEFUN([IT_PO_SUBDIR],
1276 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1277 dnl
1278 dnl The following CONFIG_COMMANDS should be executed at the very end
1279 dnl of config.status.
1280 AC_CONFIG_COMMANDS_PRE([
1281   AC_CONFIG_COMMANDS([$1/stamp-it], [
1282     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1283        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1284     fi
1285     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1286     >"$1/stamp-it.tmp"
1287     [sed '/^#/d
1288          s/^[[].*] *//
1289          /^[    ]*$/d
1290         '"s|^|  $ac_top_srcdir/|" \
1291       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1292     ]
1293     [sed '/^POTFILES =/,/[^\\]$/ {
1294                 /^POTFILES =/!d
1295                 r $1/POTFILES
1296           }
1297          ' "$1/Makefile.in" >"$1/Makefile"]
1298     rm -f "$1/Makefile.tmp"
1299     mv "$1/stamp-it.tmp" "$1/stamp-it"
1300   ])
1301 ])dnl
1302 ])
1303
1304 # _IT_SUBST(VARIABLE)
1305 # -------------------
1306 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1307 #
1308 AC_DEFUN([_IT_SUBST],
1309 [
1310 AC_SUBST([$1])
1311 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1312 ]
1313 )
1314
1315 # deprecated macros
1316 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1317 # A hint is needed for aclocal from Automake <= 1.9.4:
1318 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
1319
1320
1321 # nls.m4 serial 5 (gettext-0.18)
1322 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
1323 dnl Foundation, Inc.
1324 dnl This file is free software; the Free Software Foundation
1325 dnl gives unlimited permission to copy and/or distribute it,
1326 dnl with or without modifications, as long as this notice is preserved.
1327 dnl
1328 dnl This file can be used in projects which are not available under
1329 dnl the GNU General Public License or the GNU Library General Public
1330 dnl License but which still want to provide support for the GNU gettext
1331 dnl functionality.
1332 dnl Please note that the actual code of the GNU gettext library is covered
1333 dnl by the GNU Library General Public License, and the rest of the GNU
1334 dnl gettext package is covered by the GNU General Public License.
1335 dnl They are *not* in the public domain.
1336
1337 dnl Authors:
1338 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1339 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1340
1341 AC_PREREQ([2.50])
1342
1343 AC_DEFUN([AM_NLS],
1344 [
1345   AC_MSG_CHECKING([whether NLS is requested])
1346   dnl Default is enabled NLS
1347   AC_ARG_ENABLE([nls],
1348     [  --disable-nls           do not use Native Language Support],
1349     USE_NLS=$enableval, USE_NLS=yes)
1350   AC_MSG_RESULT([$USE_NLS])
1351   AC_SUBST([USE_NLS])
1352 ])
1353
1354 # pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
1355 # serial 12 (pkg-config-0.29.2)
1356
1357 dnl Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
1358 dnl Copyright Â© 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
1359 dnl
1360 dnl This program is free software; you can redistribute it and/or modify
1361 dnl it under the terms of the GNU General Public License as published by
1362 dnl the Free Software Foundation; either version 2 of the License, or
1363 dnl (at your option) any later version.
1364 dnl
1365 dnl This program is distributed in the hope that it will be useful, but
1366 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
1367 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1368 dnl General Public License for more details.
1369 dnl
1370 dnl You should have received a copy of the GNU General Public License
1371 dnl along with this program; if not, write to the Free Software
1372 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1373 dnl 02111-1307, USA.
1374 dnl
1375 dnl As a special exception to the GNU General Public License, if you
1376 dnl distribute this file as part of a program that contains a
1377 dnl configuration script generated by Autoconf, you may include it under
1378 dnl the same distribution terms that you use for the rest of that
1379 dnl program.
1380
1381 dnl PKG_PREREQ(MIN-VERSION)
1382 dnl -----------------------
1383 dnl Since: 0.29
1384 dnl
1385 dnl Verify that the version of the pkg-config macros are at least
1386 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
1387 dnl installed version of pkg-config, this checks the developer's version
1388 dnl of pkg.m4 when generating configure.
1389 dnl
1390 dnl To ensure that this macro is defined, also add:
1391 dnl m4_ifndef([PKG_PREREQ],
1392 dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
1393 dnl
1394 dnl See the "Since" comment for each macro you use to see what version
1395 dnl of the macros you require.
1396 m4_defun([PKG_PREREQ],
1397 [m4_define([PKG_MACROS_VERSION], [0.29.2])
1398 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
1399     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
1400 ])dnl PKG_PREREQ
1401
1402 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
1403 dnl ----------------------------------
1404 dnl Since: 0.16
1405 dnl
1406 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
1407 dnl first found in the path. Checks that the version of pkg-config found
1408 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
1409 dnl used since that's the first version where most current features of
1410 dnl pkg-config existed.
1411 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1412 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1413 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1414 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1415 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1416 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1417 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1418
1419 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1420         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1421 fi
1422 if test -n "$PKG_CONFIG"; then
1423         _pkg_min_version=m4_default([$1], [0.9.0])
1424         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1425         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1426                 AC_MSG_RESULT([yes])
1427         else
1428                 AC_MSG_RESULT([no])
1429                 PKG_CONFIG=""
1430         fi
1431 fi[]dnl
1432 ])dnl PKG_PROG_PKG_CONFIG
1433
1434 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1435 dnl -------------------------------------------------------------------
1436 dnl Since: 0.18
1437 dnl
1438 dnl Check to see whether a particular set of modules exists. Similar to
1439 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
1440 dnl
1441 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1442 dnl only at the first occurence in configure.ac, so if the first place
1443 dnl it's called might be skipped (such as if it is within an "if", you
1444 dnl have to call PKG_CHECK_EXISTS manually
1445 AC_DEFUN([PKG_CHECK_EXISTS],
1446 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1447 if test -n "$PKG_CONFIG" && \
1448     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1449   m4_default([$2], [:])
1450 m4_ifvaln([$3], [else
1451   $3])dnl
1452 fi])
1453
1454 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1455 dnl ---------------------------------------------
1456 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
1457 dnl pkg_failed based on the result.
1458 m4_define([_PKG_CONFIG],
1459 [if test -n "$$1"; then
1460     pkg_cv_[]$1="$$1"
1461  elif test -n "$PKG_CONFIG"; then
1462     PKG_CHECK_EXISTS([$3],
1463                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1464                       test "x$?" != "x0" && pkg_failed=yes ],
1465                      [pkg_failed=yes])
1466  else
1467     pkg_failed=untried
1468 fi[]dnl
1469 ])dnl _PKG_CONFIG
1470
1471 dnl _PKG_SHORT_ERRORS_SUPPORTED
1472 dnl ---------------------------
1473 dnl Internal check to see if pkg-config supports short errors.
1474 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1475 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1476 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1477         _pkg_short_errors_supported=yes
1478 else
1479         _pkg_short_errors_supported=no
1480 fi[]dnl
1481 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
1482
1483
1484 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1485 dnl   [ACTION-IF-NOT-FOUND])
1486 dnl --------------------------------------------------------------
1487 dnl Since: 0.4.0
1488 dnl
1489 dnl Note that if there is a possibility the first call to
1490 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
1491 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1492 AC_DEFUN([PKG_CHECK_MODULES],
1493 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1494 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1495 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1496
1497 pkg_failed=no
1498 AC_MSG_CHECKING([for $2])
1499
1500 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1501 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1502
1503 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1504 and $1[]_LIBS to avoid the need to call pkg-config.
1505 See the pkg-config man page for more details.])
1506
1507 if test $pkg_failed = yes; then
1508         AC_MSG_RESULT([no])
1509         _PKG_SHORT_ERRORS_SUPPORTED
1510         if test $_pkg_short_errors_supported = yes; then
1511                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1512         else
1513                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1514         fi
1515         # Put the nasty error message in config.log where it belongs
1516         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1517
1518         m4_default([$4], [AC_MSG_ERROR(
1519 [Package requirements ($2) were not met:
1520
1521 $$1_PKG_ERRORS
1522
1523 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1524 installed software in a non-standard prefix.
1525
1526 _PKG_TEXT])[]dnl
1527         ])
1528 elif test $pkg_failed = untried; then
1529         AC_MSG_RESULT([no])
1530         m4_default([$4], [AC_MSG_FAILURE(
1531 [The pkg-config script could not be found or is too old.  Make sure it
1532 is in your PATH or set the PKG_CONFIG environment variable to the full
1533 path to pkg-config.
1534
1535 _PKG_TEXT
1536
1537 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1538         ])
1539 else
1540         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1541         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1542         AC_MSG_RESULT([yes])
1543         $3
1544 fi[]dnl
1545 ])dnl PKG_CHECK_MODULES
1546
1547
1548 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1549 dnl   [ACTION-IF-NOT-FOUND])
1550 dnl ---------------------------------------------------------------------
1551 dnl Since: 0.29
1552 dnl
1553 dnl Checks for existence of MODULES and gathers its build flags with
1554 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
1555 dnl and VARIABLE-PREFIX_LIBS from --libs.
1556 dnl
1557 dnl Note that if there is a possibility the first call to
1558 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
1559 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
1560 dnl configure.ac.
1561 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
1562 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1563 _save_PKG_CONFIG=$PKG_CONFIG
1564 PKG_CONFIG="$PKG_CONFIG --static"
1565 PKG_CHECK_MODULES($@)
1566 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
1567 ])dnl PKG_CHECK_MODULES_STATIC
1568
1569
1570 dnl PKG_INSTALLDIR([DIRECTORY])
1571 dnl -------------------------
1572 dnl Since: 0.27
1573 dnl
1574 dnl Substitutes the variable pkgconfigdir as the location where a module
1575 dnl should install pkg-config .pc files. By default the directory is
1576 dnl $libdir/pkgconfig, but the default can be changed by passing
1577 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
1578 dnl parameter.
1579 AC_DEFUN([PKG_INSTALLDIR],
1580 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1581 m4_pushdef([pkg_description],
1582     [pkg-config installation directory @<:@]pkg_default[@:>@])
1583 AC_ARG_WITH([pkgconfigdir],
1584     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1585     [with_pkgconfigdir=]pkg_default)
1586 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1587 m4_popdef([pkg_default])
1588 m4_popdef([pkg_description])
1589 ])dnl PKG_INSTALLDIR
1590
1591
1592 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
1593 dnl --------------------------------
1594 dnl Since: 0.27
1595 dnl
1596 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
1597 dnl module should install arch-independent pkg-config .pc files. By
1598 dnl default the directory is $datadir/pkgconfig, but the default can be
1599 dnl changed by passing DIRECTORY. The user can override through the
1600 dnl --with-noarch-pkgconfigdir parameter.
1601 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1602 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1603 m4_pushdef([pkg_description],
1604     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1605 AC_ARG_WITH([noarch-pkgconfigdir],
1606     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1607     [with_noarch_pkgconfigdir=]pkg_default)
1608 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1609 m4_popdef([pkg_default])
1610 m4_popdef([pkg_description])
1611 ])dnl PKG_NOARCH_INSTALLDIR
1612
1613
1614 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1615 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1616 dnl -------------------------------------------
1617 dnl Since: 0.28
1618 dnl
1619 dnl Retrieves the value of the pkg-config variable for the given module.
1620 AC_DEFUN([PKG_CHECK_VAR],
1621 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1622 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1623
1624 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
1625 AS_VAR_COPY([$1], [pkg_cv_][$1])
1626
1627 AS_VAR_IF([$1], [""], [$5], [$4])dnl
1628 ])dnl PKG_CHECK_VAR
1629
1630 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
1631 #
1632 # This file is free software; the Free Software Foundation
1633 # gives unlimited permission to copy and/or distribute it,
1634 # with or without modifications, as long as this notice is preserved.
1635
1636 # AM_AUTOMAKE_VERSION(VERSION)
1637 # ----------------------------
1638 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1639 # generated from the m4 files accompanying Automake X.Y.
1640 # (This private macro should not be called outside this file.)
1641 AC_DEFUN([AM_AUTOMAKE_VERSION],
1642 [am__api_version='1.16'
1643 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1644 dnl require some minimum version.  Point them to the right macro.
1645 m4_if([$1], [1.16.2], [],
1646       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1647 ])
1648
1649 # _AM_AUTOCONF_VERSION(VERSION)
1650 # -----------------------------
1651 # aclocal traces this macro to find the Autoconf version.
1652 # This is a private macro too.  Using m4_define simplifies
1653 # the logic in aclocal, which can simply ignore this definition.
1654 m4_define([_AM_AUTOCONF_VERSION], [])
1655
1656 # AM_SET_CURRENT_AUTOMAKE_VERSION
1657 # -------------------------------
1658 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1659 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1660 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1661 [AM_AUTOMAKE_VERSION([1.16.2])dnl
1662 m4_ifndef([AC_AUTOCONF_VERSION],
1663   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1664 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1665
1666 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
1667
1668 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
1669 #
1670 # This file is free software; the Free Software Foundation
1671 # gives unlimited permission to copy and/or distribute it,
1672 # with or without modifications, as long as this notice is preserved.
1673
1674 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1675 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
1676 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1677 #
1678 # Of course, Automake must honor this variable whenever it calls a
1679 # tool from the auxiliary directory.  The problem is that $srcdir (and
1680 # therefore $ac_aux_dir as well) can be either absolute or relative,
1681 # depending on how configure is run.  This is pretty annoying, since
1682 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1683 # source directory, any form will work fine, but in subdirectories a
1684 # relative path needs to be adjusted first.
1685 #
1686 # $ac_aux_dir/missing
1687 #    fails when called from a subdirectory if $ac_aux_dir is relative
1688 # $top_srcdir/$ac_aux_dir/missing
1689 #    fails if $ac_aux_dir is absolute,
1690 #    fails when called from a subdirectory in a VPATH build with
1691 #          a relative $ac_aux_dir
1692 #
1693 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1694 # are both prefixed by $srcdir.  In an in-source build this is usually
1695 # harmless because $srcdir is '.', but things will broke when you
1696 # start a VPATH build or use an absolute $srcdir.
1697 #
1698 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1699 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
1700 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1701 # and then we would define $MISSING as
1702 #   MISSING="\${SHELL} $am_aux_dir/missing"
1703 # This will work as long as MISSING is not called from configure, because
1704 # unfortunately $(top_srcdir) has no meaning in configure.
1705 # However there are other variables, like CC, which are often used in
1706 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1707 #
1708 # Another solution, used here, is to always expand $ac_aux_dir to an
1709 # absolute PATH.  The drawback is that using absolute paths prevent a
1710 # configured tree to be moved without reconfiguration.
1711
1712 AC_DEFUN([AM_AUX_DIR_EXPAND],
1713 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1714 # Expand $ac_aux_dir to an absolute path.
1715 am_aux_dir=`cd "$ac_aux_dir" && pwd`
1716 ])
1717
1718 # AM_CONDITIONAL                                            -*- Autoconf -*-
1719
1720 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
1721 #
1722 # This file is free software; the Free Software Foundation
1723 # gives unlimited permission to copy and/or distribute it,
1724 # with or without modifications, as long as this notice is preserved.
1725
1726 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1727 # -------------------------------------
1728 # Define a conditional.
1729 AC_DEFUN([AM_CONDITIONAL],
1730 [AC_PREREQ([2.52])dnl
1731  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1732        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1733 AC_SUBST([$1_TRUE])dnl
1734 AC_SUBST([$1_FALSE])dnl
1735 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1736 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1737 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1738 if $2; then
1739   $1_TRUE=
1740   $1_FALSE='#'
1741 else
1742   $1_TRUE='#'
1743   $1_FALSE=
1744 fi
1745 AC_CONFIG_COMMANDS_PRE(
1746 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1747   AC_MSG_ERROR([[conditional "$1" was never defined.
1748 Usually this means the macro was only invoked conditionally.]])
1749 fi])])
1750
1751 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
1752 #
1753 # This file is free software; the Free Software Foundation
1754 # gives unlimited permission to copy and/or distribute it,
1755 # with or without modifications, as long as this notice is preserved.
1756
1757
1758 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1759 # written in clear, in which case automake, when reading aclocal.m4,
1760 # will think it sees a *use*, and therefore will trigger all it's
1761 # C support machinery.  Also note that it means that autoscan, seeing
1762 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1763
1764
1765 # _AM_DEPENDENCIES(NAME)
1766 # ----------------------
1767 # See how the compiler implements dependency checking.
1768 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1769 # We try a few techniques and use that to set a single cache variable.
1770 #
1771 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1772 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1773 # dependency, and given that the user is not expected to run this macro,
1774 # just rely on AC_PROG_CC.
1775 AC_DEFUN([_AM_DEPENDENCIES],
1776 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1777 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1778 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1779 AC_REQUIRE([AM_DEP_TRACK])dnl
1780
1781 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1782       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1783       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1784       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1785       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1786       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1787                     [depcc="$$1"   am_compiler_list=])
1788
1789 AC_CACHE_CHECK([dependency style of $depcc],
1790                [am_cv_$1_dependencies_compiler_type],
1791 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1792   # We make a subdir and do the tests there.  Otherwise we can end up
1793   # making bogus files that we don't know about and never remove.  For
1794   # instance it was reported that on HP-UX the gcc test will end up
1795   # making a dummy file named 'D' -- because '-MD' means "put the output
1796   # in D".
1797   rm -rf conftest.dir
1798   mkdir conftest.dir
1799   # Copy depcomp to subdir because otherwise we won't find it if we're
1800   # using a relative directory.
1801   cp "$am_depcomp" conftest.dir
1802   cd conftest.dir
1803   # We will build objects and dependencies in a subdirectory because
1804   # it helps to detect inapplicable dependency modes.  For instance
1805   # both Tru64's cc and ICC support -MD to output dependencies as a
1806   # side effect of compilation, but ICC will put the dependencies in
1807   # the current directory while Tru64 will put them in the object
1808   # directory.
1809   mkdir sub
1810
1811   am_cv_$1_dependencies_compiler_type=none
1812   if test "$am_compiler_list" = ""; then
1813      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1814   fi
1815   am__universal=false
1816   m4_case([$1], [CC],
1817     [case " $depcc " in #(
1818      *\ -arch\ *\ -arch\ *) am__universal=true ;;
1819      esac],
1820     [CXX],
1821     [case " $depcc " in #(
1822      *\ -arch\ *\ -arch\ *) am__universal=true ;;
1823      esac])
1824
1825   for depmode in $am_compiler_list; do
1826     # Setup a source with many dependencies, because some compilers
1827     # like to wrap large dependency lists on column 80 (with \), and
1828     # we should not choose a depcomp mode which is confused by this.
1829     #
1830     # We need to recreate these files for each test, as the compiler may
1831     # overwrite some of them when testing with obscure command lines.
1832     # This happens at least with the AIX C compiler.
1833     : > sub/conftest.c
1834     for i in 1 2 3 4 5 6; do
1835       echo '#include "conftst'$i'.h"' >> sub/conftest.c
1836       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1837       # Solaris 10 /bin/sh.
1838       echo '/* dummy */' > sub/conftst$i.h
1839     done
1840     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1841
1842     # We check with '-c' and '-o' for the sake of the "dashmstdout"
1843     # mode.  It turns out that the SunPro C++ compiler does not properly
1844     # handle '-M -o', and we need to detect this.  Also, some Intel
1845     # versions had trouble with output in subdirs.
1846     am__obj=sub/conftest.${OBJEXT-o}
1847     am__minus_obj="-o $am__obj"
1848     case $depmode in
1849     gcc)
1850       # This depmode causes a compiler race in universal mode.
1851       test "$am__universal" = false || continue
1852       ;;
1853     nosideeffect)
1854       # After this tag, mechanisms are not by side-effect, so they'll
1855       # only be used when explicitly requested.
1856       if test "x$enable_dependency_tracking" = xyes; then
1857         continue
1858       else
1859         break
1860       fi
1861       ;;
1862     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1863       # This compiler won't grok '-c -o', but also, the minuso test has
1864       # not run yet.  These depmodes are late enough in the game, and
1865       # so weak that their functioning should not be impacted.
1866       am__obj=conftest.${OBJEXT-o}
1867       am__minus_obj=
1868       ;;
1869     none) break ;;
1870     esac
1871     if depmode=$depmode \
1872        source=sub/conftest.c object=$am__obj \
1873        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1874        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1875          >/dev/null 2>conftest.err &&
1876        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1877        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1878        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1879        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1880       # icc doesn't choke on unknown options, it will just issue warnings
1881       # or remarks (even with -Werror).  So we grep stderr for any message
1882       # that says an option was ignored or not supported.
1883       # When given -MP, icc 7.0 and 7.1 complain thusly:
1884       #   icc: Command line warning: ignoring option '-M'; no argument required
1885       # The diagnosis changed in icc 8.0:
1886       #   icc: Command line remark: option '-MP' not supported
1887       if (grep 'ignoring option' conftest.err ||
1888           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1889         am_cv_$1_dependencies_compiler_type=$depmode
1890         break
1891       fi
1892     fi
1893   done
1894
1895   cd ..
1896   rm -rf conftest.dir
1897 else
1898   am_cv_$1_dependencies_compiler_type=none
1899 fi
1900 ])
1901 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1902 AM_CONDITIONAL([am__fastdep$1], [
1903   test "x$enable_dependency_tracking" != xno \
1904   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1905 ])
1906
1907
1908 # AM_SET_DEPDIR
1909 # -------------
1910 # Choose a directory name for dependency files.
1911 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1912 AC_DEFUN([AM_SET_DEPDIR],
1913 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1914 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1915 ])
1916
1917
1918 # AM_DEP_TRACK
1919 # ------------
1920 AC_DEFUN([AM_DEP_TRACK],
1921 [AC_ARG_ENABLE([dependency-tracking], [dnl
1922 AS_HELP_STRING(
1923   [--enable-dependency-tracking],
1924   [do not reject slow dependency extractors])
1925 AS_HELP_STRING(
1926   [--disable-dependency-tracking],
1927   [speeds up one-time build])])
1928 if test "x$enable_dependency_tracking" != xno; then
1929   am_depcomp="$ac_aux_dir/depcomp"
1930   AMDEPBACKSLASH='\'
1931   am__nodep='_no'
1932 fi
1933 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1934 AC_SUBST([AMDEPBACKSLASH])dnl
1935 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1936 AC_SUBST([am__nodep])dnl
1937 _AM_SUBST_NOTMAKE([am__nodep])dnl
1938 ])
1939
1940 # Generate code to set up dependency tracking.              -*- Autoconf -*-
1941
1942 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
1943 #
1944 # This file is free software; the Free Software Foundation
1945 # gives unlimited permission to copy and/or distribute it,
1946 # with or without modifications, as long as this notice is preserved.
1947
1948 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1949 # ------------------------------
1950 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1951 [{
1952   # Older Autoconf quotes --file arguments for eval, but not when files
1953   # are listed without --file.  Let's play safe and only enable the eval
1954   # if we detect the quoting.
1955   # TODO: see whether this extra hack can be removed once we start
1956   # requiring Autoconf 2.70 or later.
1957   AS_CASE([$CONFIG_FILES],
1958           [*\'*], [eval set x "$CONFIG_FILES"],
1959           [*], [set x $CONFIG_FILES])
1960   shift
1961   # Used to flag and report bootstrapping failures.
1962   am_rc=0
1963   for am_mf
1964   do
1965     # Strip MF so we end up with the name of the file.
1966     am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
1967     # Check whether this is an Automake generated Makefile which includes
1968     # dependency-tracking related rules and includes.
1969     # Grep'ing the whole file directly is not great: AIX grep has a line
1970     # limit of 2048, but all sed's we know have understand at least 4000.
1971     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
1972       || continue
1973     am_dirpart=`AS_DIRNAME(["$am_mf"])`
1974     am_filepart=`AS_BASENAME(["$am_mf"])`
1975     AM_RUN_LOG([cd "$am_dirpart" \
1976       && sed -e '/# am--include-marker/d' "$am_filepart" \
1977         | $MAKE -f - am--depfiles]) || am_rc=$?
1978   done
1979   if test $am_rc -ne 0; then
1980     AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
1981     for automatic dependency tracking.  If GNU make was not used, consider
1982     re-running the configure script with MAKE="gmake" (or whatever is
1983     necessary).  You can also try re-running configure with the
1984     '--disable-dependency-tracking' option to at least be able to build
1985     the package (albeit without support for automatic dependency tracking).])
1986   fi
1987   AS_UNSET([am_dirpart])
1988   AS_UNSET([am_filepart])
1989   AS_UNSET([am_mf])
1990   AS_UNSET([am_rc])
1991   rm -f conftest-deps.mk
1992 }
1993 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1994
1995
1996 # AM_OUTPUT_DEPENDENCY_COMMANDS
1997 # -----------------------------
1998 # This macro should only be invoked once -- use via AC_REQUIRE.
1999 #
2000 # This code is only required when automatic dependency tracking is enabled.
2001 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
2002 # order to bootstrap the dependency handling code.
2003 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2004 [AC_CONFIG_COMMANDS([depfiles],
2005      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2006      [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
2007
2008 # Do all the work for Automake.                             -*- Autoconf -*-
2009
2010 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
2011 #
2012 # This file is free software; the Free Software Foundation
2013 # gives unlimited permission to copy and/or distribute it,
2014 # with or without modifications, as long as this notice is preserved.
2015
2016 # This macro actually does too much.  Some checks are only needed if
2017 # your package does certain things.  But this isn't really a big deal.
2018
2019 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
2020 m4_define([AC_PROG_CC],
2021 m4_defn([AC_PROG_CC])
2022 [_AM_PROG_CC_C_O
2023 ])
2024
2025 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
2026 # AM_INIT_AUTOMAKE([OPTIONS])
2027 # -----------------------------------------------
2028 # The call with PACKAGE and VERSION arguments is the old style
2029 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
2030 # and VERSION should now be passed to AC_INIT and removed from
2031 # the call to AM_INIT_AUTOMAKE.
2032 # We support both call styles for the transition.  After
2033 # the next Automake release, Autoconf can make the AC_INIT
2034 # arguments mandatory, and then we can depend on a new Autoconf
2035 # release and drop the old call support.
2036 AC_DEFUN([AM_INIT_AUTOMAKE],
2037 [AC_PREREQ([2.65])dnl
2038 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
2039 dnl the ones we care about.
2040 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
2041 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
2042 AC_REQUIRE([AC_PROG_INSTALL])dnl
2043 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2044   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2045   # is not polluted with repeated "-I."
2046   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
2047   # test to see if srcdir already configured
2048   if test -f $srcdir/config.status; then
2049     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
2050   fi
2051 fi
2052
2053 # test whether we have cygpath
2054 if test -z "$CYGPATH_W"; then
2055   if (cygpath --version) >/dev/null 2>/dev/null; then
2056     CYGPATH_W='cygpath -w'
2057   else
2058     CYGPATH_W=echo
2059   fi
2060 fi
2061 AC_SUBST([CYGPATH_W])
2062
2063 # Define the identity of the package.
2064 dnl Distinguish between old-style and new-style calls.
2065 m4_ifval([$2],
2066 [AC_DIAGNOSE([obsolete],
2067              [$0: two- and three-arguments forms are deprecated.])
2068 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
2069  AC_SUBST([PACKAGE], [$1])dnl
2070  AC_SUBST([VERSION], [$2])],
2071 [_AM_SET_OPTIONS([$1])dnl
2072 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
2073 m4_if(
2074   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
2075   [ok:ok],,
2076   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
2077  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
2078  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
2079
2080 _AM_IF_OPTION([no-define],,
2081 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
2082  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
2083
2084 # Some tools Automake needs.
2085 AC_REQUIRE([AM_SANITY_CHECK])dnl
2086 AC_REQUIRE([AC_ARG_PROGRAM])dnl
2087 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
2088 AM_MISSING_PROG([AUTOCONF], [autoconf])
2089 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
2090 AM_MISSING_PROG([AUTOHEADER], [autoheader])
2091 AM_MISSING_PROG([MAKEINFO], [makeinfo])
2092 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2093 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
2094 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2095 # For better backward compatibility.  To be removed once Automake 1.9.x
2096 # dies out for good.  For more background, see:
2097 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
2098 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
2099 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
2100 # We need awk for the "check" target (and possibly the TAP driver).  The
2101 # system "awk" is bad on some platforms.
2102 AC_REQUIRE([AC_PROG_AWK])dnl
2103 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2104 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2105 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
2106               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
2107                              [_AM_PROG_TAR([v7])])])
2108 _AM_IF_OPTION([no-dependencies],,
2109 [AC_PROVIDE_IFELSE([AC_PROG_CC],
2110                   [_AM_DEPENDENCIES([CC])],
2111                   [m4_define([AC_PROG_CC],
2112                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
2113 AC_PROVIDE_IFELSE([AC_PROG_CXX],
2114                   [_AM_DEPENDENCIES([CXX])],
2115                   [m4_define([AC_PROG_CXX],
2116                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
2117 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
2118                   [_AM_DEPENDENCIES([OBJC])],
2119                   [m4_define([AC_PROG_OBJC],
2120                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
2121 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
2122                   [_AM_DEPENDENCIES([OBJCXX])],
2123                   [m4_define([AC_PROG_OBJCXX],
2124                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
2125 ])
2126 AC_REQUIRE([AM_SILENT_RULES])dnl
2127 dnl The testsuite driver may need to know about EXEEXT, so add the
2128 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
2129 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
2130 AC_CONFIG_COMMANDS_PRE(dnl
2131 [m4_provide_if([_AM_COMPILER_EXEEXT],
2132   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
2133
2134 # POSIX will say in a future version that running "rm -f" with no argument
2135 # is OK; and we want to be able to make that assumption in our Makefile
2136 # recipes.  So use an aggressive probe to check that the usage we want is
2137 # actually supported "in the wild" to an acceptable degree.
2138 # See automake bug#10828.
2139 # To make any issue more visible, cause the running configure to be aborted
2140 # by default if the 'rm' program in use doesn't match our expectations; the
2141 # user can still override this though.
2142 if rm -f && rm -fr && rm -rf; then : OK; else
2143   cat >&2 <<'END'
2144 Oops!
2145
2146 Your 'rm' program seems unable to run without file operands specified
2147 on the command line, even when the '-f' option is present.  This is contrary
2148 to the behaviour of most rm programs out there, and not conforming with
2149 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
2150
2151 Please tell bug-automake@gnu.org about your system, including the value
2152 of your $PATH and any error possibly output before this message.  This
2153 can help us improve future automake versions.
2154
2155 END
2156   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
2157     echo 'Configuration will proceed anyway, since you have set the' >&2
2158     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
2159     echo >&2
2160   else
2161     cat >&2 <<'END'
2162 Aborting the configuration process, to ensure you take notice of the issue.
2163
2164 You can download and install GNU coreutils to get an 'rm' implementation
2165 that behaves properly: <https://www.gnu.org/software/coreutils/>.
2166
2167 If you want to complete the configuration process using your problematic
2168 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
2169 to "yes", and re-run configure.
2170
2171 END
2172     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
2173   fi
2174 fi
2175 dnl The trailing newline in this macro's definition is deliberate, for
2176 dnl backward compatibility and to allow trailing 'dnl'-style comments
2177 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
2178 ])
2179
2180 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
2181 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
2182 dnl mangled by Autoconf and run in a shell conditional statement.
2183 m4_define([_AC_COMPILER_EXEEXT],
2184 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
2185
2186 # When config.status generates a header, we must update the stamp-h file.
2187 # This file resides in the same directory as the config header
2188 # that is generated.  The stamp files are numbered to have different names.
2189
2190 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
2191 # loop where config.status creates the headers, so we can generate
2192 # our stamp files there.
2193 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
2194 [# Compute $1's index in $config_headers.
2195 _am_arg=$1
2196 _am_stamp_count=1
2197 for _am_header in $config_headers :; do
2198   case $_am_header in
2199     $_am_arg | $_am_arg:* )
2200       break ;;
2201     * )
2202       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2203   esac
2204 done
2205 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2206
2207 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
2208 #
2209 # This file is free software; the Free Software Foundation
2210 # gives unlimited permission to copy and/or distribute it,
2211 # with or without modifications, as long as this notice is preserved.
2212
2213 # AM_PROG_INSTALL_SH
2214 # ------------------
2215 # Define $install_sh.
2216 AC_DEFUN([AM_PROG_INSTALL_SH],
2217 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2218 if test x"${install_sh+set}" != xset; then
2219   case $am_aux_dir in
2220   *\ * | *\     *)
2221     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2222   *)
2223     install_sh="\${SHELL} $am_aux_dir/install-sh"
2224   esac
2225 fi
2226 AC_SUBST([install_sh])])
2227
2228 # Copyright (C) 2003-2020 Free Software Foundation, Inc.
2229 #
2230 # This file is free software; the Free Software Foundation
2231 # gives unlimited permission to copy and/or distribute it,
2232 # with or without modifications, as long as this notice is preserved.
2233
2234 # Check whether the underlying file-system supports filenames
2235 # with a leading dot.  For instance MS-DOS doesn't.
2236 AC_DEFUN([AM_SET_LEADING_DOT],
2237 [rm -rf .tst 2>/dev/null
2238 mkdir .tst 2>/dev/null
2239 if test -d .tst; then
2240   am__leading_dot=.
2241 else
2242   am__leading_dot=_
2243 fi
2244 rmdir .tst 2>/dev/null
2245 AC_SUBST([am__leading_dot])])
2246
2247 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
2248 # From Jim Meyering
2249
2250 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
2251 #
2252 # This file is free software; the Free Software Foundation
2253 # gives unlimited permission to copy and/or distribute it,
2254 # with or without modifications, as long as this notice is preserved.
2255
2256 # AM_MAINTAINER_MODE([DEFAULT-MODE])
2257 # ----------------------------------
2258 # Control maintainer-specific portions of Makefiles.
2259 # Default is to disable them, unless 'enable' is passed literally.
2260 # For symmetry, 'disable' may be passed as well.  Anyway, the user
2261 # can override the default with the --enable/--disable switch.
2262 AC_DEFUN([AM_MAINTAINER_MODE],
2263 [m4_case(m4_default([$1], [disable]),
2264        [enable], [m4_define([am_maintainer_other], [disable])],
2265        [disable], [m4_define([am_maintainer_other], [enable])],
2266        [m4_define([am_maintainer_other], [enable])
2267         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
2268 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
2269   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
2270   AC_ARG_ENABLE([maintainer-mode],
2271     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
2272       am_maintainer_other[ make rules and dependencies not useful
2273       (and sometimes confusing) to the casual installer])],
2274     [USE_MAINTAINER_MODE=$enableval],
2275     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
2276   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
2277   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
2278   MAINT=$MAINTAINER_MODE_TRUE
2279   AC_SUBST([MAINT])dnl
2280 ]
2281 )
2282
2283 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
2284
2285 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
2286 #
2287 # This file is free software; the Free Software Foundation
2288 # gives unlimited permission to copy and/or distribute it,
2289 # with or without modifications, as long as this notice is preserved.
2290
2291 # AM_MAKE_INCLUDE()
2292 # -----------------
2293 # Check whether make has an 'include' directive that can support all
2294 # the idioms we need for our automatic dependency tracking code.
2295 AC_DEFUN([AM_MAKE_INCLUDE],
2296 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
2297 cat > confinc.mk << 'END'
2298 am__doit:
2299         @echo this is the am__doit target >confinc.out
2300 .PHONY: am__doit
2301 END
2302 am__include="#"
2303 am__quote=
2304 # BSD make does it like this.
2305 echo '.include "confinc.mk" # ignored' > confmf.BSD
2306 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
2307 echo 'include confinc.mk # ignored' > confmf.GNU
2308 _am_result=no
2309 for s in GNU BSD; do
2310   AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
2311   AS_CASE([$?:`cat confinc.out 2>/dev/null`],
2312       ['0:this is the am__doit target'],
2313       [AS_CASE([$s],
2314           [BSD], [am__include='.include' am__quote='"'],
2315           [am__include='include' am__quote=''])])
2316   if test "$am__include" != "#"; then
2317     _am_result="yes ($s style)"
2318     break
2319   fi
2320 done
2321 rm -f confinc.* confmf.*
2322 AC_MSG_RESULT([${_am_result}])
2323 AC_SUBST([am__include])])
2324 AC_SUBST([am__quote])])
2325
2326 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
2327
2328 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
2329 #
2330 # This file is free software; the Free Software Foundation
2331 # gives unlimited permission to copy and/or distribute it,
2332 # with or without modifications, as long as this notice is preserved.
2333
2334 # AM_MISSING_PROG(NAME, PROGRAM)
2335 # ------------------------------
2336 AC_DEFUN([AM_MISSING_PROG],
2337 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2338 $1=${$1-"${am_missing_run}$2"}
2339 AC_SUBST($1)])
2340
2341 # AM_MISSING_HAS_RUN
2342 # ------------------
2343 # Define MISSING if not defined so far and test if it is modern enough.
2344 # If it is, set am_missing_run to use it, otherwise, to nothing.
2345 AC_DEFUN([AM_MISSING_HAS_RUN],
2346 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2347 AC_REQUIRE_AUX_FILE([missing])dnl
2348 if test x"${MISSING+set}" != xset; then
2349   case $am_aux_dir in
2350   *\ * | *\     *)
2351     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2352   *)
2353     MISSING="\${SHELL} $am_aux_dir/missing" ;;
2354   esac
2355 fi
2356 # Use eval to expand $SHELL
2357 if eval "$MISSING --is-lightweight"; then
2358   am_missing_run="$MISSING "
2359 else
2360   am_missing_run=
2361   AC_MSG_WARN(['missing' script is too old or missing])
2362 fi
2363 ])
2364
2365 # Helper functions for option handling.                     -*- Autoconf -*-
2366
2367 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
2368 #
2369 # This file is free software; the Free Software Foundation
2370 # gives unlimited permission to copy and/or distribute it,
2371 # with or without modifications, as long as this notice is preserved.
2372
2373 # _AM_MANGLE_OPTION(NAME)
2374 # -----------------------
2375 AC_DEFUN([_AM_MANGLE_OPTION],
2376 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2377
2378 # _AM_SET_OPTION(NAME)
2379 # --------------------
2380 # Set option NAME.  Presently that only means defining a flag for this option.
2381 AC_DEFUN([_AM_SET_OPTION],
2382 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
2383
2384 # _AM_SET_OPTIONS(OPTIONS)
2385 # ------------------------
2386 # OPTIONS is a space-separated list of Automake options.
2387 AC_DEFUN([_AM_SET_OPTIONS],
2388 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2389
2390 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2391 # -------------------------------------------
2392 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2393 AC_DEFUN([_AM_IF_OPTION],
2394 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2395
2396 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
2397 #
2398 # This file is free software; the Free Software Foundation
2399 # gives unlimited permission to copy and/or distribute it,
2400 # with or without modifications, as long as this notice is preserved.
2401
2402 # _AM_PROG_CC_C_O
2403 # ---------------
2404 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
2405 # to automatically call this.
2406 AC_DEFUN([_AM_PROG_CC_C_O],
2407 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2408 AC_REQUIRE_AUX_FILE([compile])dnl
2409 AC_LANG_PUSH([C])dnl
2410 AC_CACHE_CHECK(
2411   [whether $CC understands -c and -o together],
2412   [am_cv_prog_cc_c_o],
2413   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
2414   # Make sure it works both with $CC and with simple cc.
2415   # Following AC_PROG_CC_C_O, we do the test twice because some
2416   # compilers refuse to overwrite an existing .o file with -o,
2417   # though they will create one.
2418   am_cv_prog_cc_c_o=yes
2419   for am_i in 1 2; do
2420     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
2421          && test -f conftest2.$ac_objext; then
2422       : OK
2423     else
2424       am_cv_prog_cc_c_o=no
2425       break
2426     fi
2427   done
2428   rm -f core conftest*
2429   unset am_i])
2430 if test "$am_cv_prog_cc_c_o" != yes; then
2431    # Losing compiler, so override with the script.
2432    # FIXME: It is wrong to rewrite CC.
2433    # But if we don't then we get into trouble of one sort or another.
2434    # A longer-term fix would be to have automake use am__CC in this case,
2435    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2436    CC="$am_aux_dir/compile $CC"
2437 fi
2438 AC_LANG_POP([C])])
2439
2440 # For backward compatibility.
2441 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
2442
2443 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
2444 #
2445 # This file is free software; the Free Software Foundation
2446 # gives unlimited permission to copy and/or distribute it,
2447 # with or without modifications, as long as this notice is preserved.
2448
2449 # AM_RUN_LOG(COMMAND)
2450 # -------------------
2451 # Run COMMAND, save the exit status in ac_status, and log it.
2452 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
2453 AC_DEFUN([AM_RUN_LOG],
2454 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
2455    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
2456    ac_status=$?
2457    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2458    (exit $ac_status); }])
2459
2460 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
2461
2462 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
2463 #
2464 # This file is free software; the Free Software Foundation
2465 # gives unlimited permission to copy and/or distribute it,
2466 # with or without modifications, as long as this notice is preserved.
2467
2468 # AM_SANITY_CHECK
2469 # ---------------
2470 AC_DEFUN([AM_SANITY_CHECK],
2471 [AC_MSG_CHECKING([whether build environment is sane])
2472 # Reject unsafe characters in $srcdir or the absolute working directory
2473 # name.  Accept space and tab only in the latter.
2474 am_lf='
2475 '
2476 case `pwd` in
2477   *[[\\\"\#\$\&\'\`$am_lf]]*)
2478     AC_MSG_ERROR([unsafe absolute working directory name]);;
2479 esac
2480 case $srcdir in
2481   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
2482     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
2483 esac
2484
2485 # Do 'set' in a subshell so we don't clobber the current shell's
2486 # arguments.  Must try -L first in case configure is actually a
2487 # symlink; some systems play weird games with the mod time of symlinks
2488 # (eg FreeBSD returns the mod time of the symlink's containing
2489 # directory).
2490 if (
2491    am_has_slept=no
2492    for am_try in 1 2; do
2493      echo "timestamp, slept: $am_has_slept" > conftest.file
2494      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2495      if test "$[*]" = "X"; then
2496         # -L didn't work.
2497         set X `ls -t "$srcdir/configure" conftest.file`
2498      fi
2499      if test "$[*]" != "X $srcdir/configure conftest.file" \
2500         && test "$[*]" != "X conftest.file $srcdir/configure"; then
2501
2502         # If neither matched, then we have a broken ls.  This can happen
2503         # if, for instance, CONFIG_SHELL is bash and it inherits a
2504         # broken ls alias from the environment.  This has actually
2505         # happened.  Such a system could not be considered "sane".
2506         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2507   alias in your environment])
2508      fi
2509      if test "$[2]" = conftest.file || test $am_try -eq 2; then
2510        break
2511      fi
2512      # Just in case.
2513      sleep 1
2514      am_has_slept=yes
2515    done
2516    test "$[2]" = conftest.file
2517    )
2518 then
2519    # Ok.
2520    :
2521 else
2522    AC_MSG_ERROR([newly created file is older than distributed files!
2523 Check your system clock])
2524 fi
2525 AC_MSG_RESULT([yes])
2526 # If we didn't sleep, we still need to ensure time stamps of config.status and
2527 # generated files are strictly newer.
2528 am_sleep_pid=
2529 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2530   ( sleep 1 ) &
2531   am_sleep_pid=$!
2532 fi
2533 AC_CONFIG_COMMANDS_PRE(
2534   [AC_MSG_CHECKING([that generated files are newer than configure])
2535    if test -n "$am_sleep_pid"; then
2536      # Hide warnings about reused PIDs.
2537      wait $am_sleep_pid 2>/dev/null
2538    fi
2539    AC_MSG_RESULT([done])])
2540 rm -f conftest.file
2541 ])
2542
2543 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
2544 #
2545 # This file is free software; the Free Software Foundation
2546 # gives unlimited permission to copy and/or distribute it,
2547 # with or without modifications, as long as this notice is preserved.
2548
2549 # AM_SILENT_RULES([DEFAULT])
2550 # --------------------------
2551 # Enable less verbose build rules; with the default set to DEFAULT
2552 # ("yes" being less verbose, "no" or empty being verbose).
2553 AC_DEFUN([AM_SILENT_RULES],
2554 [AC_ARG_ENABLE([silent-rules], [dnl
2555 AS_HELP_STRING(
2556   [--enable-silent-rules],
2557   [less verbose build output (undo: "make V=1")])
2558 AS_HELP_STRING(
2559   [--disable-silent-rules],
2560   [verbose build output (undo: "make V=0")])dnl
2561 ])
2562 case $enable_silent_rules in @%:@ (((
2563   yes) AM_DEFAULT_VERBOSITY=0;;
2564    no) AM_DEFAULT_VERBOSITY=1;;
2565     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2566 esac
2567 dnl
2568 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2569 dnl do not support nested variable expansions.
2570 dnl See automake bug#9928 and bug#10237.
2571 am_make=${MAKE-make}
2572 AC_CACHE_CHECK([whether $am_make supports nested variables],
2573    [am_cv_make_support_nested_variables],
2574    [if AS_ECHO([['TRUE=$(BAR$(V))
2575 BAR0=false
2576 BAR1=true
2577 V=1
2578 am__doit:
2579         @$(TRUE)
2580 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2581   am_cv_make_support_nested_variables=yes
2582 else
2583   am_cv_make_support_nested_variables=no
2584 fi])
2585 if test $am_cv_make_support_nested_variables = yes; then
2586   dnl Using '$V' instead of '$(V)' breaks IRIX make.
2587   AM_V='$(V)'
2588   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2589 else
2590   AM_V=$AM_DEFAULT_VERBOSITY
2591   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2592 fi
2593 AC_SUBST([AM_V])dnl
2594 AM_SUBST_NOTMAKE([AM_V])dnl
2595 AC_SUBST([AM_DEFAULT_V])dnl
2596 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2597 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2598 AM_BACKSLASH='\'
2599 AC_SUBST([AM_BACKSLASH])dnl
2600 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2601 ])
2602
2603 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
2604 #
2605 # This file is free software; the Free Software Foundation
2606 # gives unlimited permission to copy and/or distribute it,
2607 # with or without modifications, as long as this notice is preserved.
2608
2609 # AM_PROG_INSTALL_STRIP
2610 # ---------------------
2611 # One issue with vendor 'install' (even GNU) is that you can't
2612 # specify the program used to strip binaries.  This is especially
2613 # annoying in cross-compiling environments, where the build's strip
2614 # is unlikely to handle the host's binaries.
2615 # Fortunately install-sh will honor a STRIPPROG variable, so we
2616 # always use install-sh in "make install-strip", and initialize
2617 # STRIPPROG with the value of the STRIP variable (set by the user).
2618 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2619 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2620 # Installed binaries are usually stripped using 'strip' when the user
2621 # run "make install-strip".  However 'strip' might not be the right
2622 # tool to use in cross-compilation environments, therefore Automake
2623 # will honor the 'STRIP' environment variable to overrule this program.
2624 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2625 if test "$cross_compiling" != no; then
2626   AC_CHECK_TOOL([STRIP], [strip], :)
2627 fi
2628 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2629 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2630
2631 # Copyright (C) 2006-2020 Free Software Foundation, Inc.
2632 #
2633 # This file is free software; the Free Software Foundation
2634 # gives unlimited permission to copy and/or distribute it,
2635 # with or without modifications, as long as this notice is preserved.
2636
2637 # _AM_SUBST_NOTMAKE(VARIABLE)
2638 # ---------------------------
2639 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2640 # This macro is traced by Automake.
2641 AC_DEFUN([_AM_SUBST_NOTMAKE])
2642
2643 # AM_SUBST_NOTMAKE(VARIABLE)
2644 # --------------------------
2645 # Public sister of _AM_SUBST_NOTMAKE.
2646 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2647
2648 # Check how to create a tarball.                            -*- Autoconf -*-
2649
2650 # Copyright (C) 2004-2020 Free Software Foundation, Inc.
2651 #
2652 # This file is free software; the Free Software Foundation
2653 # gives unlimited permission to copy and/or distribute it,
2654 # with or without modifications, as long as this notice is preserved.
2655
2656 # _AM_PROG_TAR(FORMAT)
2657 # --------------------
2658 # Check how to create a tarball in format FORMAT.
2659 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2660 #
2661 # Substitute a variable $(am__tar) that is a command
2662 # writing to stdout a FORMAT-tarball containing the directory
2663 # $tardir.
2664 #     tardir=directory && $(am__tar) > result.tar
2665 #
2666 # Substitute a variable $(am__untar) that extract such
2667 # a tarball read from stdin.
2668 #     $(am__untar) < result.tar
2669 #
2670 AC_DEFUN([_AM_PROG_TAR],
2671 [# Always define AMTAR for backward compatibility.  Yes, it's still used
2672 # in the wild :-(  We should find a proper way to deprecate it ...
2673 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2674
2675 # We'll loop over all known methods to create a tar archive until one works.
2676 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2677
2678 m4_if([$1], [v7],
2679   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2680
2681   [m4_case([$1],
2682     [ustar],
2683      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2684       # There is notably a 21 bits limit for the UID and the GID.  In fact,
2685       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2686       # and bug#13588).
2687       am_max_uid=2097151 # 2^21 - 1
2688       am_max_gid=$am_max_uid
2689       # The $UID and $GID variables are not portable, so we need to resort
2690       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
2691       # below are definitely unexpected, so allow the users to see them
2692       # (that is, avoid stderr redirection).
2693       am_uid=`id -u || echo unknown`
2694       am_gid=`id -g || echo unknown`
2695       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2696       if test $am_uid -le $am_max_uid; then
2697          AC_MSG_RESULT([yes])
2698       else
2699          AC_MSG_RESULT([no])
2700          _am_tools=none
2701       fi
2702       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2703       if test $am_gid -le $am_max_gid; then
2704          AC_MSG_RESULT([yes])
2705       else
2706         AC_MSG_RESULT([no])
2707         _am_tools=none
2708       fi],
2709
2710   [pax],
2711     [],
2712
2713   [m4_fatal([Unknown tar format])])
2714
2715   AC_MSG_CHECKING([how to create a $1 tar archive])
2716
2717   # Go ahead even if we have the value already cached.  We do so because we
2718   # need to set the values for the 'am__tar' and 'am__untar' variables.
2719   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2720
2721   for _am_tool in $_am_tools; do
2722     case $_am_tool in
2723     gnutar)
2724       for _am_tar in tar gnutar gtar; do
2725         AM_RUN_LOG([$_am_tar --version]) && break
2726       done
2727       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2728       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2729       am__untar="$_am_tar -xf -"
2730       ;;
2731     plaintar)
2732       # Must skip GNU tar: if it does not support --format= it doesn't create
2733       # ustar tarball either.
2734       (tar --version) >/dev/null 2>&1 && continue
2735       am__tar='tar chf - "$$tardir"'
2736       am__tar_='tar chf - "$tardir"'
2737       am__untar='tar xf -'
2738       ;;
2739     pax)
2740       am__tar='pax -L -x $1 -w "$$tardir"'
2741       am__tar_='pax -L -x $1 -w "$tardir"'
2742       am__untar='pax -r'
2743       ;;
2744     cpio)
2745       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2746       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2747       am__untar='cpio -i -H $1 -d'
2748       ;;
2749     none)
2750       am__tar=false
2751       am__tar_=false
2752       am__untar=false
2753       ;;
2754     esac
2755
2756     # If the value was cached, stop now.  We just wanted to have am__tar
2757     # and am__untar set.
2758     test -n "${am_cv_prog_tar_$1}" && break
2759
2760     # tar/untar a dummy directory, and stop if the command works.
2761     rm -rf conftest.dir
2762     mkdir conftest.dir
2763     echo GrepMe > conftest.dir/file
2764     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2765     rm -rf conftest.dir
2766     if test -s conftest.tar; then
2767       AM_RUN_LOG([$am__untar <conftest.tar])
2768       AM_RUN_LOG([cat conftest.dir/file])
2769       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2770     fi
2771   done
2772   rm -rf conftest.dir
2773
2774   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2775   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2776
2777 AC_SUBST([am__tar])
2778 AC_SUBST([am__untar])
2779 ]) # _AM_PROG_TAR
2780
2781 m4_include([acinclude.m4])