1 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
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.
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
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'.])])
23 # Configure paths for GLIB
24 # Owen Taylor 1997-2001
26 # Increment this whenever this file is changed.
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
33 AC_DEFUN([AM_PATH_GLIB_2_0],
35 dnl Get the cflags and libraries from pkg-config
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])
42 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
43 , enable_glibtest=yes)
45 min_glib_version=ifelse([$1], [], [2.0.0], [$1])
46 pkg_config_args="glib-2.0 >= $min_glib_version"
51 pkg_config_args="$pkg_config_args gmodule-2.0"
54 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
57 pkg_config_args="$pkg_config_args gobject-2.0"
60 pkg_config_args="$pkg_config_args gthread-2.0"
63 pkg_config_args="$pkg_config_args $module-2.0"
68 PKG_PROG_PKG_CONFIG([0.16])
72 if test "x$PKG_CONFIG" = x ; then
77 dnl For GLIB_CFLAGS and GLIB_LIBS
78 PKG_CHECK_MODULES([GLIB], [$pkg_config_args], [:], [:])
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])
86 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
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"
95 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
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"
112 CFLAGS="$CFLAGS $GLIB_CFLAGS"
113 LIBS="$GLIB_LIBS $LIBS"
115 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
116 dnl checks the results of pkg-config to some extent)
127 unsigned int major, minor, micro;
129 fclose (fopen ("conf.glibtest", "w"));
131 if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) {
132 printf("%s, bad version string\n", "$min_glib_version");
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))
140 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
141 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
142 glib_major_version, glib_minor_version, glib_micro_version);
143 printf ("*** was found! If pkg-config was correct, then it is best\n");
144 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
145 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
146 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
147 printf("*** required on your system.\n");
148 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
149 printf("*** to point to the correct configuration files\n");
151 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
152 (glib_minor_version != GLIB_MINOR_VERSION) ||
153 (glib_micro_version != GLIB_MICRO_VERSION))
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);
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)))
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");
176 printf("*** If you have already installed a sufficiently new version, this error\n");
177 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
178 printf("*** being found. The easiest way to fix this is to remove the old version\n");
179 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
180 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
181 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
182 printf("*** so that the correct libraries are found at run-time))\n");
187 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
188 CFLAGS="$ac_save_CFLAGS"
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])
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/"
201 if test -f conf.glibtest ; then
204 echo "*** Could not run GLIB test program, checking why..."
205 ac_save_CFLAGS="$CFLAGS"
207 CFLAGS="$CFLAGS $GLIB_CFLAGS"
208 LIBS="$LIBS $GLIB_LIBS"
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"
220 echo "*** If you have an old version installed, it is best to remove it, although"
221 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
222 [ echo "*** The test program failed to compile or link. See the file config.log for the"
223 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
224 CFLAGS="$ac_save_CFLAGS"
233 GLIB_COMPILE_RESOURCES=""
234 ifelse([$3], , :, [$3])
239 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
240 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
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.
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.
252 # Macro to add for using GNU gettext.
253 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
255 # Modified to never use included libintl.
256 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
258 # Major rework to remove unused code
259 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
261 # Added better handling of ALL_LINGUAS from GNU gettext version
262 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
264 # Modified to require ngettext
265 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
267 # Increment this whenever this file is changed.
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
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.
280 m4_copy([AC_DEFUN],[glib_DEFUN])
281 m4_copy([AC_REQUIRE],[glib_REQUIRE])
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.
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.])
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,
312 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
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
320 ac_cv_path_$1="$ac_dir/$ac_word"
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"
333 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
341 dnl Checks for special options needed on Mac OS X.
342 dnl Defines INTL_MACOSX_LIBS.
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],
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"
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.])
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"
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.])
380 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
381 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
383 AC_SUBST([INTL_MACOSX_LIBS])
388 glib_DEFUN([GLIB_WITH_NLS],
389 dnl NLS is obligatory
393 gt_cv_have_gettext=no
401 AC_CHECK_HEADER(libintl.h,
402 [gt_cv_func_dgettext_libintl="no"
403 libintl_extra_libs=""
406 # First check in libc
408 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
412 [return !ngettext ("","", 1)],
413 gt_cv_func_ngettext_libc=yes,
414 gt_cv_func_ngettext_libc=no)
417 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
418 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
422 [return !dgettext ("","")],
423 gt_cv_func_dgettext_libc=yes,
424 gt_cv_func_dgettext_libc=no)
428 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
429 AC_CHECK_FUNCS(bind_textdomain_codeset)
433 # If we don't have everything we want, check in libintl
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
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)])])
444 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
445 AC_MSG_CHECKING([if -liconv is needed to use gettext])
447 AC_CHECK_LIB(intl, ngettext,
448 [AC_CHECK_LIB(intl, dcgettext,
449 [gt_cv_func_dgettext_libintl=yes
450 libintl_extra_libs=-liconv],
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
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"
467 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
468 gt_cv_func_dgettext_libc=no
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
478 if test "$gt_cv_func_dgettext_libc" = "yes" \
479 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
480 gt_cv_have_gettext=yes
483 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
484 INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
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)
497 AC_MSG_CHECKING([if msgfmt accepts -c])
498 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
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],
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,
539 LIBS="$glib_save_LIBS"
542 gt_cv_have_gettext=no
547 if test "$gt_cv_have_gettext" = "yes" ; then
548 AC_DEFINE(ENABLE_NLS, 1,
549 [always defined to indicate that i18n is enabled])
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
560 [found xgettext program is not GNU xgettext; ignore it])
565 # We need to process the po/ directory.
569 [case "$CONFIG_FILES" in *po/Makefile.in*)
570 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
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
576 for lang in $ALL_LINGUAS; do
577 GMOFILES="$GMOFILES $lang.gmo"
578 POFILES="$POFILES $lang.po"
581 dnl Make all variables we use known to autoconf.
584 AC_SUBST(DATADIRNAME)
588 AC_SUBST(PO_IN_DATADIR_TRUE)
589 AC_SUBST(PO_IN_DATADIR_FALSE)
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
604 AU_DEFUN([GLIB_GNU_GETTEXT],
605 [AC_REQUIRE([AC_PROG_CC])dnl
610 if test "$gt_cv_have_gettext" = "yes"; then
611 if test "x$ALL_LINGUAS" = "x"; then
614 AC_MSG_CHECKING(for catalogs to be installed)
616 for presentlang in $ALL_LINGUAS; do
618 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
619 desiredlanguages="$LINGUAS"
621 desiredlanguages="$ALL_LINGUAS"
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;;
633 if test $useit = yes; then
634 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
638 AC_MSG_RESULT($LINGUAS)
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
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.
651 if test -n "$ac_aux_dir"; then
652 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
654 if test -z "$MKINSTALLDIRS"; then
655 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
657 AC_SUBST(MKINSTALLDIRS)
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/"
666 posrcprefix="../$srcdir/"
672 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
673 < $srcdir/po/POTFILES.in > po/POTFILES
675 [[$0: This macro is deprecated. You should use upstream gettext instead.]])
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"`
692 localedir=`eval echo "${datadir}/locale"`
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])
702 dnl Now the definitions that aclocal will find
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($@)])
709 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
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
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
726 # Configure paths for GTK+
727 # Owen Taylor 1997-2001
729 # Version number used by aclocal, see `info automake Serials`.
730 # Increment on every change.
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
737 AC_DEFUN([AM_PATH_GTK_2_0],
739 dnl Get the cflags and libraries from pkg-config
741 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
742 , enable_gtktest=yes)
744 pkg_config_args=gtk+-2.0
749 pkg_config_args="$pkg_config_args gthread-2.0"
756 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
757 PKG_PROG_PKG_CONFIG([0.7])
759 min_gtk_version=ifelse([$1], ,2.0.0,$1)
760 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
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"
769 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
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"
788 CFLAGS="$CFLAGS $GTK_CFLAGS"
789 LIBS="$GTK_LIBS $LIBS"
791 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
792 dnl checks the results of pkg-config to some extent)
803 int major, minor, micro;
806 fclose (fopen ("conf.gtktest", "w"));
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, µ) != 3) {
811 printf("%s, bad version string\n", "$min_gtk_version");
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))
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");
830 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
831 (gtk_minor_version != GTK_MINOR_VERSION) ||
832 (gtk_micro_version != GTK_MICRO_VERSION))
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);
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)))
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");
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");
866 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
867 CFLAGS="$ac_save_CFLAGS"
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])
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"
880 if test -f conf.gtktest ; then
883 echo "*** Could not run GTK+ test program, checking why..."
884 ac_save_CFLAGS="$CFLAGS"
886 CFLAGS="$CFLAGS $GTK_CFLAGS"
887 LIBS="$LIBS $GTK_LIBS"
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"
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"
909 ifelse([$3], , :, [$3])
916 # Configure paths for GTK+
917 # Owen Taylor 1997-2001
919 # Version number used by aclocal, see `info automake Serials`.
920 # Increment on every change.
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
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
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])
935 pkg_config_args="gtk+-3.0 >= $min_gtk_version"
940 pkg_config_args="$pkg_config_args gthread-2.0"
947 PKG_PROG_PKG_CONFIG([0.16])
949 if test -z "$PKG_CONFIG"; then
953 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
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"
962 if $PKG_CONFIG $pkg_config_args; then
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"
981 CFLAGS="$CFLAGS $GTK_CFLAGS"
982 LIBS="$GTK_LIBS $LIBS"
984 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
985 dnl checks the results of pkg-config to some extent)
996 unsigned int major, minor, micro;
998 fclose (fopen ("conf.gtktest", "w"));
1000 if (sscanf("$min_gtk_version", "%u.%u.%u", &major, &minor, µ) != 3) {
1001 printf("%s, bad version string\n", "$min_gtk_version");
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))
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");
1020 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
1021 (gtk_minor_version != GTK_MINOR_VERSION) ||
1022 (gtk_micro_version != GTK_MICRO_VERSION))
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);
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)))
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");
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");
1056 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1057 CFLAGS="$ac_save_CFLAGS"
1058 LIBS="$ac_save_LIBS"
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])
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"
1070 if test -f conf.gtktest ; then
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"
1079 #include <gtk/gtk.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"
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"
1099 ifelse([$3], , :, [$3])
1101 AC_SUBST(GTK_CFLAGS)
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
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"
1115 PKG_PROG_PKG_CONFIG([0.16])
1116 AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR([No pkg-config found])])
1118 if $PKG_CONFIG $pkg_config_args ; then
1124 if test "x$target_found" = "xno"; then
1125 ifelse([$4],,[AC_MSG_ERROR([Backend $backend not found.])],[$4])
1127 ifelse([$3],,[:],[$3])
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
1138 case "$am__api_version" in
1140 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
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.])
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.])
1163 if test -z "$AM_DEFAULT_VERBOSITY"; then
1164 AM_DEFAULT_VERBOSITY=1
1166 AC_SUBST([AM_DEFAULT_VERBOSITY])
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)
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)
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 $< [$]@'
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'
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 $< [$]@'
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)
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])
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])
1241 AC_PATH_PROG(INTLTOOL_PERL, perl)
1242 if test -z "$INTLTOOL_PERL"; then
1243 AC_MSG_ERROR([perl not found])
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])
1250 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1251 AC_MSG_RESULT([$IT_PERL_VERSION])
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
1258 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1262 # Substitute ALL_LINGUAS so we can use it in po/Makefile
1263 AC_SUBST(ALL_LINGUAS)
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.
1275 AC_DEFUN([IT_PO_SUBDIR],
1276 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
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.])
1285 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1290 '"s|^| $ac_top_srcdir/|" \
1291 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1293 [sed '/^POTFILES =/,/[^\\]$/ {
1297 ' "$1/Makefile.in" >"$1/Makefile"]
1298 rm -f "$1/Makefile.tmp"
1299 mv "$1/stamp-it.tmp" "$1/stamp-it"
1304 # _IT_SUBST(VARIABLE)
1305 # -------------------
1306 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1308 AC_DEFUN([_IT_SUBST],
1311 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
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], ...)
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.
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
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.
1338 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1339 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
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])
1354 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1355 dnl serial 11 (pkg-config-0.29)
1357 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1358 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
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.
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.
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.
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
1381 dnl PKG_PREREQ(MIN-VERSION)
1382 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.
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])])
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])
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])])
1402 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
1403 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])
1419 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1420 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
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])
1432 ])dnl PKG_PROG_PKG_CONFIG
1434 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1435 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.
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
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
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 ],
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
1479 _pkg_short_errors_supported=no
1481 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
1484 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1485 dnl [ACTION-IF-NOT-FOUND])
1486 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
1498 AC_MSG_CHECKING([for $1])
1500 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1501 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
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.])
1507 if test $pkg_failed = yes; then
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`
1513 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1515 # Put the nasty error message in config.log where it belongs
1516 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1518 m4_default([$4], [AC_MSG_ERROR(
1519 [Package requirements ($2) were not met:
1523 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1524 installed software in a non-standard prefix.
1528 elif test $pkg_failed = untried; then
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
1537 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1540 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1541 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1542 AC_MSG_RESULT([yes])
1545 ])dnl PKG_CHECK_MODULES
1548 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1549 dnl [ACTION-IF-NOT-FOUND])
1550 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.
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
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
1570 dnl PKG_INSTALLDIR([DIRECTORY])
1571 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
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
1592 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
1593 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
1614 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1615 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1616 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
1624 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
1625 AS_VAR_COPY([$1], [pkg_cv_][$1])
1627 AS_VAR_IF([$1], [""], [$5], [$4])dnl
1630 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
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.
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.1], [],
1646 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
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], [])
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.1])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]))])
1666 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1668 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
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.
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/../..'.
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.
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
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.
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.
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.
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`
1718 # AM_CONDITIONAL -*- Autoconf -*-
1720 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
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.
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
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.]])
1751 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
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.
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...
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.
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
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=])
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
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
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
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`
1817 [case " $depcc " in #(
1818 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1821 [case " $depcc " in #(
1822 *\ -arch\ *\ -arch\ *) am__universal=true ;;
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.
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.
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
1840 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
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"
1850 # This depmode causes a compiler race in universal mode.
1851 test "$am__universal" = false || continue
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
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}
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
1898 am_cv_$1_dependencies_compiler_type=none
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])
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
1920 AC_DEFUN([AM_DEP_TRACK],
1921 [AC_ARG_ENABLE([dependency-tracking], [dnl
1923 [--enable-dependency-tracking],
1924 [do not reject slow dependency extractors])
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"
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
1940 # Generate code to set up dependency tracking. -*- Autoconf -*-
1942 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
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.
1948 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1949 # ------------------------------
1950 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
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])
1961 # Used to flag and report bootstrapping failures.
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 \
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=$?
1979 if test $am_rc -ne 0; then
1980 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
1981 for automatic dependency tracking. Try re-running configure with the
1982 '--disable-dependency-tracking' option to at least be able to build
1983 the package (albeit without support for automatic dependency tracking).])
1985 AS_UNSET([am_dirpart])
1986 AS_UNSET([am_filepart])
1989 rm -f conftest-deps.mk
1991 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1994 # AM_OUTPUT_DEPENDENCY_COMMANDS
1995 # -----------------------------
1996 # This macro should only be invoked once -- use via AC_REQUIRE.
1998 # This code is only required when automatic dependency tracking is enabled.
1999 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
2000 # order to bootstrap the dependency handling code.
2001 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2002 [AC_CONFIG_COMMANDS([depfiles],
2003 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2004 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
2006 # Do all the work for Automake. -*- Autoconf -*-
2008 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
2010 # This file is free software; the Free Software Foundation
2011 # gives unlimited permission to copy and/or distribute it,
2012 # with or without modifications, as long as this notice is preserved.
2014 # This macro actually does too much. Some checks are only needed if
2015 # your package does certain things. But this isn't really a big deal.
2017 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
2018 m4_define([AC_PROG_CC],
2019 m4_defn([AC_PROG_CC])
2023 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
2024 # AM_INIT_AUTOMAKE([OPTIONS])
2025 # -----------------------------------------------
2026 # The call with PACKAGE and VERSION arguments is the old style
2027 # call (pre autoconf-2.50), which is being phased out. PACKAGE
2028 # and VERSION should now be passed to AC_INIT and removed from
2029 # the call to AM_INIT_AUTOMAKE.
2030 # We support both call styles for the transition. After
2031 # the next Automake release, Autoconf can make the AC_INIT
2032 # arguments mandatory, and then we can depend on a new Autoconf
2033 # release and drop the old call support.
2034 AC_DEFUN([AM_INIT_AUTOMAKE],
2035 [AC_PREREQ([2.65])dnl
2036 dnl Autoconf wants to disallow AM_ names. We explicitly allow
2037 dnl the ones we care about.
2038 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
2039 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
2040 AC_REQUIRE([AC_PROG_INSTALL])dnl
2041 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2042 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2043 # is not polluted with repeated "-I."
2044 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
2045 # test to see if srcdir already configured
2046 if test -f $srcdir/config.status; then
2047 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
2051 # test whether we have cygpath
2052 if test -z "$CYGPATH_W"; then
2053 if (cygpath --version) >/dev/null 2>/dev/null; then
2054 CYGPATH_W='cygpath -w'
2059 AC_SUBST([CYGPATH_W])
2061 # Define the identity of the package.
2062 dnl Distinguish between old-style and new-style calls.
2064 [AC_DIAGNOSE([obsolete],
2065 [$0: two- and three-arguments forms are deprecated.])
2066 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
2067 AC_SUBST([PACKAGE], [$1])dnl
2068 AC_SUBST([VERSION], [$2])],
2069 [_AM_SET_OPTIONS([$1])dnl
2070 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
2072 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
2074 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
2075 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
2076 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
2078 _AM_IF_OPTION([no-define],,
2079 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
2080 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
2082 # Some tools Automake needs.
2083 AC_REQUIRE([AM_SANITY_CHECK])dnl
2084 AC_REQUIRE([AC_ARG_PROGRAM])dnl
2085 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
2086 AM_MISSING_PROG([AUTOCONF], [autoconf])
2087 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
2088 AM_MISSING_PROG([AUTOHEADER], [autoheader])
2089 AM_MISSING_PROG([MAKEINFO], [makeinfo])
2090 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2091 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
2092 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2093 # For better backward compatibility. To be removed once Automake 1.9.x
2094 # dies out for good. For more background, see:
2095 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
2096 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
2097 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
2098 # We need awk for the "check" target (and possibly the TAP driver). The
2099 # system "awk" is bad on some platforms.
2100 AC_REQUIRE([AC_PROG_AWK])dnl
2101 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2102 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2103 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
2104 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
2105 [_AM_PROG_TAR([v7])])])
2106 _AM_IF_OPTION([no-dependencies],,
2107 [AC_PROVIDE_IFELSE([AC_PROG_CC],
2108 [_AM_DEPENDENCIES([CC])],
2109 [m4_define([AC_PROG_CC],
2110 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
2111 AC_PROVIDE_IFELSE([AC_PROG_CXX],
2112 [_AM_DEPENDENCIES([CXX])],
2113 [m4_define([AC_PROG_CXX],
2114 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
2115 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
2116 [_AM_DEPENDENCIES([OBJC])],
2117 [m4_define([AC_PROG_OBJC],
2118 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
2119 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
2120 [_AM_DEPENDENCIES([OBJCXX])],
2121 [m4_define([AC_PROG_OBJCXX],
2122 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
2124 AC_REQUIRE([AM_SILENT_RULES])dnl
2125 dnl The testsuite driver may need to know about EXEEXT, so add the
2126 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
2127 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
2128 AC_CONFIG_COMMANDS_PRE(dnl
2129 [m4_provide_if([_AM_COMPILER_EXEEXT],
2130 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
2132 # POSIX will say in a future version that running "rm -f" with no argument
2133 # is OK; and we want to be able to make that assumption in our Makefile
2134 # recipes. So use an aggressive probe to check that the usage we want is
2135 # actually supported "in the wild" to an acceptable degree.
2136 # See automake bug#10828.
2137 # To make any issue more visible, cause the running configure to be aborted
2138 # by default if the 'rm' program in use doesn't match our expectations; the
2139 # user can still override this though.
2140 if rm -f && rm -fr && rm -rf; then : OK; else
2144 Your 'rm' program seems unable to run without file operands specified
2145 on the command line, even when the '-f' option is present. This is contrary
2146 to the behaviour of most rm programs out there, and not conforming with
2147 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
2149 Please tell bug-automake@gnu.org about your system, including the value
2150 of your $PATH and any error possibly output before this message. This
2151 can help us improve future automake versions.
2154 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
2155 echo 'Configuration will proceed anyway, since you have set the' >&2
2156 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
2160 Aborting the configuration process, to ensure you take notice of the issue.
2162 You can download and install GNU coreutils to get an 'rm' implementation
2163 that behaves properly: <https://www.gnu.org/software/coreutils/>.
2165 If you want to complete the configuration process using your problematic
2166 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
2167 to "yes", and re-run configure.
2170 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
2173 dnl The trailing newline in this macro's definition is deliberate, for
2174 dnl backward compatibility and to allow trailing 'dnl'-style comments
2175 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
2178 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
2179 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
2180 dnl mangled by Autoconf and run in a shell conditional statement.
2181 m4_define([_AC_COMPILER_EXEEXT],
2182 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
2184 # When config.status generates a header, we must update the stamp-h file.
2185 # This file resides in the same directory as the config header
2186 # that is generated. The stamp files are numbered to have different names.
2188 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
2189 # loop where config.status creates the headers, so we can generate
2190 # our stamp files there.
2191 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
2192 [# Compute $1's index in $config_headers.
2195 for _am_header in $config_headers :; do
2197 $_am_arg | $_am_arg:* )
2200 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2203 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2205 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2207 # This file is free software; the Free Software Foundation
2208 # gives unlimited permission to copy and/or distribute it,
2209 # with or without modifications, as long as this notice is preserved.
2211 # AM_PROG_INSTALL_SH
2212 # ------------------
2213 # Define $install_sh.
2214 AC_DEFUN([AM_PROG_INSTALL_SH],
2215 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2216 if test x"${install_sh+set}" != xset; then
2219 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2221 install_sh="\${SHELL} $am_aux_dir/install-sh"
2224 AC_SUBST([install_sh])])
2226 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
2228 # This file is free software; the Free Software Foundation
2229 # gives unlimited permission to copy and/or distribute it,
2230 # with or without modifications, as long as this notice is preserved.
2232 # Check whether the underlying file-system supports filenames
2233 # with a leading dot. For instance MS-DOS doesn't.
2234 AC_DEFUN([AM_SET_LEADING_DOT],
2235 [rm -rf .tst 2>/dev/null
2236 mkdir .tst 2>/dev/null
2237 if test -d .tst; then
2242 rmdir .tst 2>/dev/null
2243 AC_SUBST([am__leading_dot])])
2245 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
2248 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
2250 # This file is free software; the Free Software Foundation
2251 # gives unlimited permission to copy and/or distribute it,
2252 # with or without modifications, as long as this notice is preserved.
2254 # AM_MAINTAINER_MODE([DEFAULT-MODE])
2255 # ----------------------------------
2256 # Control maintainer-specific portions of Makefiles.
2257 # Default is to disable them, unless 'enable' is passed literally.
2258 # For symmetry, 'disable' may be passed as well. Anyway, the user
2259 # can override the default with the --enable/--disable switch.
2260 AC_DEFUN([AM_MAINTAINER_MODE],
2261 [m4_case(m4_default([$1], [disable]),
2262 [enable], [m4_define([am_maintainer_other], [disable])],
2263 [disable], [m4_define([am_maintainer_other], [enable])],
2264 [m4_define([am_maintainer_other], [enable])
2265 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
2266 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
2267 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
2268 AC_ARG_ENABLE([maintainer-mode],
2269 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
2270 am_maintainer_other[ make rules and dependencies not useful
2271 (and sometimes confusing) to the casual installer])],
2272 [USE_MAINTAINER_MODE=$enableval],
2273 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
2274 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
2275 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
2276 MAINT=$MAINTAINER_MODE_TRUE
2277 AC_SUBST([MAINT])dnl
2281 # Check to see how 'make' treats includes. -*- Autoconf -*-
2283 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2285 # This file is free software; the Free Software Foundation
2286 # gives unlimited permission to copy and/or distribute it,
2287 # with or without modifications, as long as this notice is preserved.
2291 # Check whether make has an 'include' directive that can support all
2292 # the idioms we need for our automatic dependency tracking code.
2293 AC_DEFUN([AM_MAKE_INCLUDE],
2294 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
2295 cat > confinc.mk << 'END'
2297 @echo this is the am__doit target >confinc.out
2302 # BSD make does it like this.
2303 echo '.include "confinc.mk" # ignored' > confmf.BSD
2304 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
2305 echo 'include confinc.mk # ignored' > confmf.GNU
2307 for s in GNU BSD; do
2308 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
2309 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
2310 ['0:this is the am__doit target'],
2312 [BSD], [am__include='.include' am__quote='"'],
2313 [am__include='include' am__quote=''])])
2314 if test "$am__include" != "#"; then
2315 _am_result="yes ($s style)"
2319 rm -f confinc.* confmf.*
2320 AC_MSG_RESULT([${_am_result}])
2321 AC_SUBST([am__include])])
2322 AC_SUBST([am__quote])])
2324 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
2326 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
2328 # This file is free software; the Free Software Foundation
2329 # gives unlimited permission to copy and/or distribute it,
2330 # with or without modifications, as long as this notice is preserved.
2332 # AM_MISSING_PROG(NAME, PROGRAM)
2333 # ------------------------------
2334 AC_DEFUN([AM_MISSING_PROG],
2335 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2336 $1=${$1-"${am_missing_run}$2"}
2339 # AM_MISSING_HAS_RUN
2340 # ------------------
2341 # Define MISSING if not defined so far and test if it is modern enough.
2342 # If it is, set am_missing_run to use it, otherwise, to nothing.
2343 AC_DEFUN([AM_MISSING_HAS_RUN],
2344 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2345 AC_REQUIRE_AUX_FILE([missing])dnl
2346 if test x"${MISSING+set}" != xset; then
2349 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2351 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2354 # Use eval to expand $SHELL
2355 if eval "$MISSING --is-lightweight"; then
2356 am_missing_run="$MISSING "
2359 AC_MSG_WARN(['missing' script is too old or missing])
2363 # Helper functions for option handling. -*- Autoconf -*-
2365 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2367 # This file is free software; the Free Software Foundation
2368 # gives unlimited permission to copy and/or distribute it,
2369 # with or without modifications, as long as this notice is preserved.
2371 # _AM_MANGLE_OPTION(NAME)
2372 # -----------------------
2373 AC_DEFUN([_AM_MANGLE_OPTION],
2374 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2376 # _AM_SET_OPTION(NAME)
2377 # --------------------
2378 # Set option NAME. Presently that only means defining a flag for this option.
2379 AC_DEFUN([_AM_SET_OPTION],
2380 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
2382 # _AM_SET_OPTIONS(OPTIONS)
2383 # ------------------------
2384 # OPTIONS is a space-separated list of Automake options.
2385 AC_DEFUN([_AM_SET_OPTIONS],
2386 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2388 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2389 # -------------------------------------------
2390 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2391 AC_DEFUN([_AM_IF_OPTION],
2392 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2394 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
2396 # This file is free software; the Free Software Foundation
2397 # gives unlimited permission to copy and/or distribute it,
2398 # with or without modifications, as long as this notice is preserved.
2402 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
2403 # to automatically call this.
2404 AC_DEFUN([_AM_PROG_CC_C_O],
2405 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2406 AC_REQUIRE_AUX_FILE([compile])dnl
2407 AC_LANG_PUSH([C])dnl
2409 [whether $CC understands -c and -o together],
2410 [am_cv_prog_cc_c_o],
2411 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
2412 # Make sure it works both with $CC and with simple cc.
2413 # Following AC_PROG_CC_C_O, we do the test twice because some
2414 # compilers refuse to overwrite an existing .o file with -o,
2415 # though they will create one.
2416 am_cv_prog_cc_c_o=yes
2418 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
2419 && test -f conftest2.$ac_objext; then
2422 am_cv_prog_cc_c_o=no
2426 rm -f core conftest*
2428 if test "$am_cv_prog_cc_c_o" != yes; then
2429 # Losing compiler, so override with the script.
2430 # FIXME: It is wrong to rewrite CC.
2431 # But if we don't then we get into trouble of one sort or another.
2432 # A longer-term fix would be to have automake use am__CC in this case,
2433 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2434 CC="$am_aux_dir/compile $CC"
2438 # For backward compatibility.
2439 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
2441 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2443 # This file is free software; the Free Software Foundation
2444 # gives unlimited permission to copy and/or distribute it,
2445 # with or without modifications, as long as this notice is preserved.
2447 # AM_RUN_LOG(COMMAND)
2448 # -------------------
2449 # Run COMMAND, save the exit status in ac_status, and log it.
2450 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
2451 AC_DEFUN([AM_RUN_LOG],
2452 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
2453 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
2455 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2456 (exit $ac_status); }])
2458 # Check to make sure that the build environment is sane. -*- Autoconf -*-
2460 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
2462 # This file is free software; the Free Software Foundation
2463 # gives unlimited permission to copy and/or distribute it,
2464 # with or without modifications, as long as this notice is preserved.
2468 AC_DEFUN([AM_SANITY_CHECK],
2469 [AC_MSG_CHECKING([whether build environment is sane])
2470 # Reject unsafe characters in $srcdir or the absolute working directory
2471 # name. Accept space and tab only in the latter.
2475 *[[\\\"\#\$\&\'\`$am_lf]]*)
2476 AC_MSG_ERROR([unsafe absolute working directory name]);;
2479 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2480 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
2483 # Do 'set' in a subshell so we don't clobber the current shell's
2484 # arguments. Must try -L first in case configure is actually a
2485 # symlink; some systems play weird games with the mod time of symlinks
2486 # (eg FreeBSD returns the mod time of the symlink's containing
2490 for am_try in 1 2; do
2491 echo "timestamp, slept: $am_has_slept" > conftest.file
2492 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2493 if test "$[*]" = "X"; then
2495 set X `ls -t "$srcdir/configure" conftest.file`
2497 if test "$[*]" != "X $srcdir/configure conftest.file" \
2498 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2500 # If neither matched, then we have a broken ls. This can happen
2501 # if, for instance, CONFIG_SHELL is bash and it inherits a
2502 # broken ls alias from the environment. This has actually
2503 # happened. Such a system could not be considered "sane".
2504 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2505 alias in your environment])
2507 if test "$[2]" = conftest.file || test $am_try -eq 2; then
2514 test "$[2]" = conftest.file
2520 AC_MSG_ERROR([newly created file is older than distributed files!
2521 Check your system clock])
2523 AC_MSG_RESULT([yes])
2524 # If we didn't sleep, we still need to ensure time stamps of config.status and
2525 # generated files are strictly newer.
2527 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2531 AC_CONFIG_COMMANDS_PRE(
2532 [AC_MSG_CHECKING([that generated files are newer than configure])
2533 if test -n "$am_sleep_pid"; then
2534 # Hide warnings about reused PIDs.
2535 wait $am_sleep_pid 2>/dev/null
2537 AC_MSG_RESULT([done])])
2541 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
2543 # This file is free software; the Free Software Foundation
2544 # gives unlimited permission to copy and/or distribute it,
2545 # with or without modifications, as long as this notice is preserved.
2547 # AM_SILENT_RULES([DEFAULT])
2548 # --------------------------
2549 # Enable less verbose build rules; with the default set to DEFAULT
2550 # ("yes" being less verbose, "no" or empty being verbose).
2551 AC_DEFUN([AM_SILENT_RULES],
2552 [AC_ARG_ENABLE([silent-rules], [dnl
2554 [--enable-silent-rules],
2555 [less verbose build output (undo: "make V=1")])
2557 [--disable-silent-rules],
2558 [verbose build output (undo: "make V=0")])dnl
2560 case $enable_silent_rules in @%:@ (((
2561 yes) AM_DEFAULT_VERBOSITY=0;;
2562 no) AM_DEFAULT_VERBOSITY=1;;
2563 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2566 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2567 dnl do not support nested variable expansions.
2568 dnl See automake bug#9928 and bug#10237.
2569 am_make=${MAKE-make}
2570 AC_CACHE_CHECK([whether $am_make supports nested variables],
2571 [am_cv_make_support_nested_variables],
2572 [if AS_ECHO([['TRUE=$(BAR$(V))
2578 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2579 am_cv_make_support_nested_variables=yes
2581 am_cv_make_support_nested_variables=no
2583 if test $am_cv_make_support_nested_variables = yes; then
2584 dnl Using '$V' instead of '$(V)' breaks IRIX make.
2586 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2588 AM_V=$AM_DEFAULT_VERBOSITY
2589 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2592 AM_SUBST_NOTMAKE([AM_V])dnl
2593 AC_SUBST([AM_DEFAULT_V])dnl
2594 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2595 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2597 AC_SUBST([AM_BACKSLASH])dnl
2598 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2601 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2603 # This file is free software; the Free Software Foundation
2604 # gives unlimited permission to copy and/or distribute it,
2605 # with or without modifications, as long as this notice is preserved.
2607 # AM_PROG_INSTALL_STRIP
2608 # ---------------------
2609 # One issue with vendor 'install' (even GNU) is that you can't
2610 # specify the program used to strip binaries. This is especially
2611 # annoying in cross-compiling environments, where the build's strip
2612 # is unlikely to handle the host's binaries.
2613 # Fortunately install-sh will honor a STRIPPROG variable, so we
2614 # always use install-sh in "make install-strip", and initialize
2615 # STRIPPROG with the value of the STRIP variable (set by the user).
2616 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2617 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2618 # Installed binaries are usually stripped using 'strip' when the user
2619 # run "make install-strip". However 'strip' might not be the right
2620 # tool to use in cross-compilation environments, therefore Automake
2621 # will honor the 'STRIP' environment variable to overrule this program.
2622 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2623 if test "$cross_compiling" != no; then
2624 AC_CHECK_TOOL([STRIP], [strip], :)
2626 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2627 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2629 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
2631 # This file is free software; the Free Software Foundation
2632 # gives unlimited permission to copy and/or distribute it,
2633 # with or without modifications, as long as this notice is preserved.
2635 # _AM_SUBST_NOTMAKE(VARIABLE)
2636 # ---------------------------
2637 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2638 # This macro is traced by Automake.
2639 AC_DEFUN([_AM_SUBST_NOTMAKE])
2641 # AM_SUBST_NOTMAKE(VARIABLE)
2642 # --------------------------
2643 # Public sister of _AM_SUBST_NOTMAKE.
2644 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2646 # Check how to create a tarball. -*- Autoconf -*-
2648 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
2650 # This file is free software; the Free Software Foundation
2651 # gives unlimited permission to copy and/or distribute it,
2652 # with or without modifications, as long as this notice is preserved.
2654 # _AM_PROG_TAR(FORMAT)
2655 # --------------------
2656 # Check how to create a tarball in format FORMAT.
2657 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2659 # Substitute a variable $(am__tar) that is a command
2660 # writing to stdout a FORMAT-tarball containing the directory
2662 # tardir=directory && $(am__tar) > result.tar
2664 # Substitute a variable $(am__untar) that extract such
2665 # a tarball read from stdin.
2666 # $(am__untar) < result.tar
2668 AC_DEFUN([_AM_PROG_TAR],
2669 [# Always define AMTAR for backward compatibility. Yes, it's still used
2670 # in the wild :-( We should find a proper way to deprecate it ...
2671 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2673 # We'll loop over all known methods to create a tar archive until one works.
2674 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2677 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2681 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2682 # There is notably a 21 bits limit for the UID and the GID. In fact,
2683 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2685 am_max_uid=2097151 # 2^21 - 1
2686 am_max_gid=$am_max_uid
2687 # The $UID and $GID variables are not portable, so we need to resort
2688 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
2689 # below are definitely unexpected, so allow the users to see them
2690 # (that is, avoid stderr redirection).
2691 am_uid=`id -u || echo unknown`
2692 am_gid=`id -g || echo unknown`
2693 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2694 if test $am_uid -le $am_max_uid; then
2695 AC_MSG_RESULT([yes])
2700 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2701 if test $am_gid -le $am_max_gid; then
2702 AC_MSG_RESULT([yes])
2711 [m4_fatal([Unknown tar format])])
2713 AC_MSG_CHECKING([how to create a $1 tar archive])
2715 # Go ahead even if we have the value already cached. We do so because we
2716 # need to set the values for the 'am__tar' and 'am__untar' variables.
2717 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2719 for _am_tool in $_am_tools; do
2722 for _am_tar in tar gnutar gtar; do
2723 AM_RUN_LOG([$_am_tar --version]) && break
2725 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2726 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2727 am__untar="$_am_tar -xf -"
2730 # Must skip GNU tar: if it does not support --format= it doesn't create
2731 # ustar tarball either.
2732 (tar --version) >/dev/null 2>&1 && continue
2733 am__tar='tar chf - "$$tardir"'
2734 am__tar_='tar chf - "$tardir"'
2735 am__untar='tar xf -'
2738 am__tar='pax -L -x $1 -w "$$tardir"'
2739 am__tar_='pax -L -x $1 -w "$tardir"'
2743 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2744 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2745 am__untar='cpio -i -H $1 -d'
2754 # If the value was cached, stop now. We just wanted to have am__tar
2755 # and am__untar set.
2756 test -n "${am_cv_prog_tar_$1}" && break
2758 # tar/untar a dummy directory, and stop if the command works.
2761 echo GrepMe > conftest.dir/file
2762 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2764 if test -s conftest.tar; then
2765 AM_RUN_LOG([$am__untar <conftest.tar])
2766 AM_RUN_LOG([cat conftest.dir/file])
2767 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2772 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2773 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2776 AC_SUBST([am__untar])
2779 m4_include([acinclude.m4])