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])
917 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
918 # serial 42 IT_PROG_INTLTOOL
919 AC_DEFUN([IT_PROG_INTLTOOL], [
921 AC_REQUIRE([AM_NLS])dnl
923 case "$am__api_version" in
925 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
931 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
932 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
933 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
934 if test -n "$1"; then
935 AC_MSG_CHECKING([for intltool >= $1])
936 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
937 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
938 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
941 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
942 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
943 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
944 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
945 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
948 if test -z "$AM_DEFAULT_VERBOSITY"; then
949 AM_DEFAULT_VERBOSITY=1
951 AC_SUBST([AM_DEFAULT_VERBOSITY])
953 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
954 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
955 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
956 AC_SUBST(INTLTOOL_V_MERGE)
957 AC_SUBST(INTLTOOL__v_MERGE_)
958 AC_SUBST(INTLTOOL__v_MERGE_0)
960 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
961 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
962 intltool__v_merge_options_0='-q'
963 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
964 AC_SUBST(intltool__v_merge_options_)
965 AC_SUBST(intltool__v_merge_options_0)
967 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
968 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
969 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
970 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
971 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
972 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
973 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
974 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
975 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
976 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
977 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
978 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
979 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
981 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
983 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
984 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
985 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
986 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
987 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
988 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
989 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
991 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
992 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
993 _IT_SUBST(INTLTOOL_KEYS_RULE)
994 _IT_SUBST(INTLTOOL_PROP_RULE)
995 _IT_SUBST(INTLTOOL_OAF_RULE)
996 _IT_SUBST(INTLTOOL_PONG_RULE)
997 _IT_SUBST(INTLTOOL_SERVER_RULE)
998 _IT_SUBST(INTLTOOL_SHEET_RULE)
999 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1000 _IT_SUBST(INTLTOOL_UI_RULE)
1001 _IT_SUBST(INTLTOOL_XAM_RULE)
1002 _IT_SUBST(INTLTOOL_KBD_RULE)
1003 _IT_SUBST(INTLTOOL_XML_RULE)
1004 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1005 _IT_SUBST(INTLTOOL_CAVES_RULE)
1006 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1007 _IT_SUBST(INTLTOOL_THEME_RULE)
1008 _IT_SUBST(INTLTOOL_SERVICE_RULE)
1009 _IT_SUBST(INTLTOOL_POLICY_RULE)
1011 # Check the gettext tools to make sure they are GNU
1012 AC_PATH_PROG(XGETTEXT, xgettext)
1013 AC_PATH_PROG(MSGMERGE, msgmerge)
1014 AC_PATH_PROG(MSGFMT, msgfmt)
1015 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1016 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1017 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1019 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1020 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1021 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1022 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1023 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1026 AC_PATH_PROG(INTLTOOL_PERL, perl)
1027 if test -z "$INTLTOOL_PERL"; then
1028 AC_MSG_ERROR([perl not found])
1030 AC_MSG_CHECKING([for perl >= 5.8.1])
1031 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1032 if test $? -ne 0; then
1033 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1035 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1036 AC_MSG_RESULT([$IT_PERL_VERSION])
1038 if test "x$2" != "xno-xml"; then
1039 AC_MSG_CHECKING([for XML::Parser])
1040 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1043 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1047 # Substitute ALL_LINGUAS so we can use it in po/Makefile
1048 AC_SUBST(ALL_LINGUAS)
1055 # IT_PO_SUBDIR(DIRNAME)
1056 # ---------------------
1057 # All po subdirs have to be declared with this macro; the subdir "po" is
1058 # declared by IT_PROG_INTLTOOL.
1060 AC_DEFUN([IT_PO_SUBDIR],
1061 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1063 dnl The following CONFIG_COMMANDS should be executed at the very end
1064 dnl of config.status.
1065 AC_CONFIG_COMMANDS_PRE([
1066 AC_CONFIG_COMMANDS([$1/stamp-it], [
1067 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1068 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1070 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1075 '"s|^| $ac_top_srcdir/|" \
1076 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1078 [sed '/^POTFILES =/,/[^\\]$/ {
1082 ' "$1/Makefile.in" >"$1/Makefile"]
1083 rm -f "$1/Makefile.tmp"
1084 mv "$1/stamp-it.tmp" "$1/stamp-it"
1089 # _IT_SUBST(VARIABLE)
1090 # -------------------
1091 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1093 AC_DEFUN([_IT_SUBST],
1096 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1101 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1102 # A hint is needed for aclocal from Automake <= 1.9.4:
1103 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
1106 # nls.m4 serial 5 (gettext-0.18)
1107 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
1108 dnl Foundation, Inc.
1109 dnl This file is free software; the Free Software Foundation
1110 dnl gives unlimited permission to copy and/or distribute it,
1111 dnl with or without modifications, as long as this notice is preserved.
1113 dnl This file can be used in projects which are not available under
1114 dnl the GNU General Public License or the GNU Library General Public
1115 dnl License but which still want to provide support for the GNU gettext
1117 dnl Please note that the actual code of the GNU gettext library is covered
1118 dnl by the GNU Library General Public License, and the rest of the GNU
1119 dnl gettext package is covered by the GNU General Public License.
1120 dnl They are *not* in the public domain.
1123 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1124 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1130 AC_MSG_CHECKING([whether NLS is requested])
1131 dnl Default is enabled NLS
1132 AC_ARG_ENABLE([nls],
1133 [ --disable-nls do not use Native Language Support],
1134 USE_NLS=$enableval, USE_NLS=yes)
1135 AC_MSG_RESULT([$USE_NLS])
1139 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1140 dnl serial 11 (pkg-config-0.29)
1142 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1143 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
1145 dnl This program is free software; you can redistribute it and/or modify
1146 dnl it under the terms of the GNU General Public License as published by
1147 dnl the Free Software Foundation; either version 2 of the License, or
1148 dnl (at your option) any later version.
1150 dnl This program is distributed in the hope that it will be useful, but
1151 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
1152 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1153 dnl General Public License for more details.
1155 dnl You should have received a copy of the GNU General Public License
1156 dnl along with this program; if not, write to the Free Software
1157 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1158 dnl 02111-1307, USA.
1160 dnl As a special exception to the GNU General Public License, if you
1161 dnl distribute this file as part of a program that contains a
1162 dnl configuration script generated by Autoconf, you may include it under
1163 dnl the same distribution terms that you use for the rest of that
1166 dnl PKG_PREREQ(MIN-VERSION)
1167 dnl -----------------------
1170 dnl Verify that the version of the pkg-config macros are at least
1171 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
1172 dnl installed version of pkg-config, this checks the developer's version
1173 dnl of pkg.m4 when generating configure.
1175 dnl To ensure that this macro is defined, also add:
1176 dnl m4_ifndef([PKG_PREREQ],
1177 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
1179 dnl See the "Since" comment for each macro you use to see what version
1180 dnl of the macros you require.
1181 m4_defun([PKG_PREREQ],
1182 [m4_define([PKG_MACROS_VERSION], [0.29])
1183 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
1184 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
1187 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
1188 dnl ----------------------------------
1191 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
1192 dnl first found in the path. Checks that the version of pkg-config found
1193 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
1194 dnl used since that's the first version where most current features of
1195 dnl pkg-config existed.
1196 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1197 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1198 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1199 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1200 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1201 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1202 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1204 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1205 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1207 if test -n "$PKG_CONFIG"; then
1208 _pkg_min_version=m4_default([$1], [0.9.0])
1209 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1210 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1211 AC_MSG_RESULT([yes])
1217 ])dnl PKG_PROG_PKG_CONFIG
1219 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1220 dnl -------------------------------------------------------------------
1223 dnl Check to see whether a particular set of modules exists. Similar to
1224 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
1226 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1227 dnl only at the first occurence in configure.ac, so if the first place
1228 dnl it's called might be skipped (such as if it is within an "if", you
1229 dnl have to call PKG_CHECK_EXISTS manually
1230 AC_DEFUN([PKG_CHECK_EXISTS],
1231 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1232 if test -n "$PKG_CONFIG" && \
1233 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1234 m4_default([$2], [:])
1235 m4_ifvaln([$3], [else
1239 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1240 dnl ---------------------------------------------
1241 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
1242 dnl pkg_failed based on the result.
1243 m4_define([_PKG_CONFIG],
1244 [if test -n "$$1"; then
1246 elif test -n "$PKG_CONFIG"; then
1247 PKG_CHECK_EXISTS([$3],
1248 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1249 test "x$?" != "x0" && pkg_failed=yes ],
1256 dnl _PKG_SHORT_ERRORS_SUPPORTED
1257 dnl ---------------------------
1258 dnl Internal check to see if pkg-config supports short errors.
1259 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1260 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1261 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1262 _pkg_short_errors_supported=yes
1264 _pkg_short_errors_supported=no
1266 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
1269 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1270 dnl [ACTION-IF-NOT-FOUND])
1271 dnl --------------------------------------------------------------
1274 dnl Note that if there is a possibility the first call to
1275 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
1276 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1277 AC_DEFUN([PKG_CHECK_MODULES],
1278 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1279 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1280 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1283 AC_MSG_CHECKING([for $1])
1285 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1286 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1288 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1289 and $1[]_LIBS to avoid the need to call pkg-config.
1290 See the pkg-config man page for more details.])
1292 if test $pkg_failed = yes; then
1294 _PKG_SHORT_ERRORS_SUPPORTED
1295 if test $_pkg_short_errors_supported = yes; then
1296 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1298 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1300 # Put the nasty error message in config.log where it belongs
1301 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1303 m4_default([$4], [AC_MSG_ERROR(
1304 [Package requirements ($2) were not met:
1308 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1309 installed software in a non-standard prefix.
1313 elif test $pkg_failed = untried; then
1315 m4_default([$4], [AC_MSG_FAILURE(
1316 [The pkg-config script could not be found or is too old. Make sure it
1317 is in your PATH or set the PKG_CONFIG environment variable to the full
1322 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1325 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1326 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1327 AC_MSG_RESULT([yes])
1330 ])dnl PKG_CHECK_MODULES
1333 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1334 dnl [ACTION-IF-NOT-FOUND])
1335 dnl ---------------------------------------------------------------------
1338 dnl Checks for existence of MODULES and gathers its build flags with
1339 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
1340 dnl and VARIABLE-PREFIX_LIBS from --libs.
1342 dnl Note that if there is a possibility the first call to
1343 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
1344 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
1346 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
1347 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1348 _save_PKG_CONFIG=$PKG_CONFIG
1349 PKG_CONFIG="$PKG_CONFIG --static"
1350 PKG_CHECK_MODULES($@)
1351 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
1352 ])dnl PKG_CHECK_MODULES_STATIC
1355 dnl PKG_INSTALLDIR([DIRECTORY])
1356 dnl -------------------------
1359 dnl Substitutes the variable pkgconfigdir as the location where a module
1360 dnl should install pkg-config .pc files. By default the directory is
1361 dnl $libdir/pkgconfig, but the default can be changed by passing
1362 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
1364 AC_DEFUN([PKG_INSTALLDIR],
1365 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1366 m4_pushdef([pkg_description],
1367 [pkg-config installation directory @<:@]pkg_default[@:>@])
1368 AC_ARG_WITH([pkgconfigdir],
1369 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1370 [with_pkgconfigdir=]pkg_default)
1371 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1372 m4_popdef([pkg_default])
1373 m4_popdef([pkg_description])
1374 ])dnl PKG_INSTALLDIR
1377 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
1378 dnl --------------------------------
1381 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
1382 dnl module should install arch-independent pkg-config .pc files. By
1383 dnl default the directory is $datadir/pkgconfig, but the default can be
1384 dnl changed by passing DIRECTORY. The user can override through the
1385 dnl --with-noarch-pkgconfigdir parameter.
1386 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1387 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1388 m4_pushdef([pkg_description],
1389 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1390 AC_ARG_WITH([noarch-pkgconfigdir],
1391 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1392 [with_noarch_pkgconfigdir=]pkg_default)
1393 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1394 m4_popdef([pkg_default])
1395 m4_popdef([pkg_description])
1396 ])dnl PKG_NOARCH_INSTALLDIR
1399 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1400 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1401 dnl -------------------------------------------
1404 dnl Retrieves the value of the pkg-config variable for the given module.
1405 AC_DEFUN([PKG_CHECK_VAR],
1406 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1407 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1409 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
1410 AS_VAR_COPY([$1], [pkg_cv_][$1])
1412 AS_VAR_IF([$1], [""], [$5], [$4])dnl
1415 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
1417 # This file is free software; the Free Software Foundation
1418 # gives unlimited permission to copy and/or distribute it,
1419 # with or without modifications, as long as this notice is preserved.
1421 # AM_AUTOMAKE_VERSION(VERSION)
1422 # ----------------------------
1423 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1424 # generated from the m4 files accompanying Automake X.Y.
1425 # (This private macro should not be called outside this file.)
1426 AC_DEFUN([AM_AUTOMAKE_VERSION],
1427 [am__api_version='1.16'
1428 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1429 dnl require some minimum version. Point them to the right macro.
1430 m4_if([$1], [1.16.1], [],
1431 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1434 # _AM_AUTOCONF_VERSION(VERSION)
1435 # -----------------------------
1436 # aclocal traces this macro to find the Autoconf version.
1437 # This is a private macro too. Using m4_define simplifies
1438 # the logic in aclocal, which can simply ignore this definition.
1439 m4_define([_AM_AUTOCONF_VERSION], [])
1441 # AM_SET_CURRENT_AUTOMAKE_VERSION
1442 # -------------------------------
1443 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1444 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1445 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1446 [AM_AUTOMAKE_VERSION([1.16.1])dnl
1447 m4_ifndef([AC_AUTOCONF_VERSION],
1448 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1449 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1451 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1453 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
1455 # This file is free software; the Free Software Foundation
1456 # gives unlimited permission to copy and/or distribute it,
1457 # with or without modifications, as long as this notice is preserved.
1459 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1460 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
1461 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1463 # Of course, Automake must honor this variable whenever it calls a
1464 # tool from the auxiliary directory. The problem is that $srcdir (and
1465 # therefore $ac_aux_dir as well) can be either absolute or relative,
1466 # depending on how configure is run. This is pretty annoying, since
1467 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1468 # source directory, any form will work fine, but in subdirectories a
1469 # relative path needs to be adjusted first.
1471 # $ac_aux_dir/missing
1472 # fails when called from a subdirectory if $ac_aux_dir is relative
1473 # $top_srcdir/$ac_aux_dir/missing
1474 # fails if $ac_aux_dir is absolute,
1475 # fails when called from a subdirectory in a VPATH build with
1476 # a relative $ac_aux_dir
1478 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1479 # are both prefixed by $srcdir. In an in-source build this is usually
1480 # harmless because $srcdir is '.', but things will broke when you
1481 # start a VPATH build or use an absolute $srcdir.
1483 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1484 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1485 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1486 # and then we would define $MISSING as
1487 # MISSING="\${SHELL} $am_aux_dir/missing"
1488 # This will work as long as MISSING is not called from configure, because
1489 # unfortunately $(top_srcdir) has no meaning in configure.
1490 # However there are other variables, like CC, which are often used in
1491 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1493 # Another solution, used here, is to always expand $ac_aux_dir to an
1494 # absolute PATH. The drawback is that using absolute paths prevent a
1495 # configured tree to be moved without reconfiguration.
1497 AC_DEFUN([AM_AUX_DIR_EXPAND],
1498 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1499 # Expand $ac_aux_dir to an absolute path.
1500 am_aux_dir=`cd "$ac_aux_dir" && pwd`
1503 # AM_CONDITIONAL -*- Autoconf -*-
1505 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
1507 # This file is free software; the Free Software Foundation
1508 # gives unlimited permission to copy and/or distribute it,
1509 # with or without modifications, as long as this notice is preserved.
1511 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1512 # -------------------------------------
1513 # Define a conditional.
1514 AC_DEFUN([AM_CONDITIONAL],
1515 [AC_PREREQ([2.52])dnl
1516 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1517 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1518 AC_SUBST([$1_TRUE])dnl
1519 AC_SUBST([$1_FALSE])dnl
1520 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1521 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1522 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1530 AC_CONFIG_COMMANDS_PRE(
1531 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1532 AC_MSG_ERROR([[conditional "$1" was never defined.
1533 Usually this means the macro was only invoked conditionally.]])
1536 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
1538 # This file is free software; the Free Software Foundation
1539 # gives unlimited permission to copy and/or distribute it,
1540 # with or without modifications, as long as this notice is preserved.
1543 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1544 # written in clear, in which case automake, when reading aclocal.m4,
1545 # will think it sees a *use*, and therefore will trigger all it's
1546 # C support machinery. Also note that it means that autoscan, seeing
1547 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1550 # _AM_DEPENDENCIES(NAME)
1551 # ----------------------
1552 # See how the compiler implements dependency checking.
1553 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1554 # We try a few techniques and use that to set a single cache variable.
1556 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1557 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1558 # dependency, and given that the user is not expected to run this macro,
1559 # just rely on AC_PROG_CC.
1560 AC_DEFUN([_AM_DEPENDENCIES],
1561 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1562 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1563 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1564 AC_REQUIRE([AM_DEP_TRACK])dnl
1566 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1567 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1568 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1569 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1570 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1571 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1572 [depcc="$$1" am_compiler_list=])
1574 AC_CACHE_CHECK([dependency style of $depcc],
1575 [am_cv_$1_dependencies_compiler_type],
1576 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1577 # We make a subdir and do the tests there. Otherwise we can end up
1578 # making bogus files that we don't know about and never remove. For
1579 # instance it was reported that on HP-UX the gcc test will end up
1580 # making a dummy file named 'D' -- because '-MD' means "put the output
1584 # Copy depcomp to subdir because otherwise we won't find it if we're
1585 # using a relative directory.
1586 cp "$am_depcomp" conftest.dir
1588 # We will build objects and dependencies in a subdirectory because
1589 # it helps to detect inapplicable dependency modes. For instance
1590 # both Tru64's cc and ICC support -MD to output dependencies as a
1591 # side effect of compilation, but ICC will put the dependencies in
1592 # the current directory while Tru64 will put them in the object
1596 am_cv_$1_dependencies_compiler_type=none
1597 if test "$am_compiler_list" = ""; then
1598 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1602 [case " $depcc " in #(
1603 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1606 [case " $depcc " in #(
1607 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1610 for depmode in $am_compiler_list; do
1611 # Setup a source with many dependencies, because some compilers
1612 # like to wrap large dependency lists on column 80 (with \), and
1613 # we should not choose a depcomp mode which is confused by this.
1615 # We need to recreate these files for each test, as the compiler may
1616 # overwrite some of them when testing with obscure command lines.
1617 # This happens at least with the AIX C compiler.
1619 for i in 1 2 3 4 5 6; do
1620 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1621 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1622 # Solaris 10 /bin/sh.
1623 echo '/* dummy */' > sub/conftst$i.h
1625 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1627 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1628 # mode. It turns out that the SunPro C++ compiler does not properly
1629 # handle '-M -o', and we need to detect this. Also, some Intel
1630 # versions had trouble with output in subdirs.
1631 am__obj=sub/conftest.${OBJEXT-o}
1632 am__minus_obj="-o $am__obj"
1635 # This depmode causes a compiler race in universal mode.
1636 test "$am__universal" = false || continue
1639 # After this tag, mechanisms are not by side-effect, so they'll
1640 # only be used when explicitly requested.
1641 if test "x$enable_dependency_tracking" = xyes; then
1647 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1648 # This compiler won't grok '-c -o', but also, the minuso test has
1649 # not run yet. These depmodes are late enough in the game, and
1650 # so weak that their functioning should not be impacted.
1651 am__obj=conftest.${OBJEXT-o}
1656 if depmode=$depmode \
1657 source=sub/conftest.c object=$am__obj \
1658 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1659 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1660 >/dev/null 2>conftest.err &&
1661 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1662 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1663 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1664 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1665 # icc doesn't choke on unknown options, it will just issue warnings
1666 # or remarks (even with -Werror). So we grep stderr for any message
1667 # that says an option was ignored or not supported.
1668 # When given -MP, icc 7.0 and 7.1 complain thusly:
1669 # icc: Command line warning: ignoring option '-M'; no argument required
1670 # The diagnosis changed in icc 8.0:
1671 # icc: Command line remark: option '-MP' not supported
1672 if (grep 'ignoring option' conftest.err ||
1673 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1674 am_cv_$1_dependencies_compiler_type=$depmode
1683 am_cv_$1_dependencies_compiler_type=none
1686 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1687 AM_CONDITIONAL([am__fastdep$1], [
1688 test "x$enable_dependency_tracking" != xno \
1689 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1695 # Choose a directory name for dependency files.
1696 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1697 AC_DEFUN([AM_SET_DEPDIR],
1698 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1699 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1705 AC_DEFUN([AM_DEP_TRACK],
1706 [AC_ARG_ENABLE([dependency-tracking], [dnl
1708 [--enable-dependency-tracking],
1709 [do not reject slow dependency extractors])
1711 [--disable-dependency-tracking],
1712 [speeds up one-time build])])
1713 if test "x$enable_dependency_tracking" != xno; then
1714 am_depcomp="$ac_aux_dir/depcomp"
1718 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1719 AC_SUBST([AMDEPBACKSLASH])dnl
1720 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1721 AC_SUBST([am__nodep])dnl
1722 _AM_SUBST_NOTMAKE([am__nodep])dnl
1725 # Generate code to set up dependency tracking. -*- Autoconf -*-
1727 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
1729 # This file is free software; the Free Software Foundation
1730 # gives unlimited permission to copy and/or distribute it,
1731 # with or without modifications, as long as this notice is preserved.
1733 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1734 # ------------------------------
1735 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1737 # Older Autoconf quotes --file arguments for eval, but not when files
1738 # are listed without --file. Let's play safe and only enable the eval
1739 # if we detect the quoting.
1740 # TODO: see whether this extra hack can be removed once we start
1741 # requiring Autoconf 2.70 or later.
1742 AS_CASE([$CONFIG_FILES],
1743 [*\'*], [eval set x "$CONFIG_FILES"],
1744 [*], [set x $CONFIG_FILES])
1746 # Used to flag and report bootstrapping failures.
1750 # Strip MF so we end up with the name of the file.
1751 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
1752 # Check whether this is an Automake generated Makefile which includes
1753 # dependency-tracking related rules and includes.
1754 # Grep'ing the whole file directly is not great: AIX grep has a line
1755 # limit of 2048, but all sed's we know have understand at least 4000.
1756 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
1758 am_dirpart=`AS_DIRNAME(["$am_mf"])`
1759 am_filepart=`AS_BASENAME(["$am_mf"])`
1760 AM_RUN_LOG([cd "$am_dirpart" \
1761 && sed -e '/# am--include-marker/d' "$am_filepart" \
1762 | $MAKE -f - am--depfiles]) || am_rc=$?
1764 if test $am_rc -ne 0; then
1765 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
1766 for automatic dependency tracking. Try re-running configure with the
1767 '--disable-dependency-tracking' option to at least be able to build
1768 the package (albeit without support for automatic dependency tracking).])
1770 AS_UNSET([am_dirpart])
1771 AS_UNSET([am_filepart])
1774 rm -f conftest-deps.mk
1776 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1779 # AM_OUTPUT_DEPENDENCY_COMMANDS
1780 # -----------------------------
1781 # This macro should only be invoked once -- use via AC_REQUIRE.
1783 # This code is only required when automatic dependency tracking is enabled.
1784 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
1785 # order to bootstrap the dependency handling code.
1786 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1787 [AC_CONFIG_COMMANDS([depfiles],
1788 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1789 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
1791 # Do all the work for Automake. -*- Autoconf -*-
1793 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
1795 # This file is free software; the Free Software Foundation
1796 # gives unlimited permission to copy and/or distribute it,
1797 # with or without modifications, as long as this notice is preserved.
1799 # This macro actually does too much. Some checks are only needed if
1800 # your package does certain things. But this isn't really a big deal.
1802 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1803 m4_define([AC_PROG_CC],
1804 m4_defn([AC_PROG_CC])
1808 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1809 # AM_INIT_AUTOMAKE([OPTIONS])
1810 # -----------------------------------------------
1811 # The call with PACKAGE and VERSION arguments is the old style
1812 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1813 # and VERSION should now be passed to AC_INIT and removed from
1814 # the call to AM_INIT_AUTOMAKE.
1815 # We support both call styles for the transition. After
1816 # the next Automake release, Autoconf can make the AC_INIT
1817 # arguments mandatory, and then we can depend on a new Autoconf
1818 # release and drop the old call support.
1819 AC_DEFUN([AM_INIT_AUTOMAKE],
1820 [AC_PREREQ([2.65])dnl
1821 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1822 dnl the ones we care about.
1823 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1824 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1825 AC_REQUIRE([AC_PROG_INSTALL])dnl
1826 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1827 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1828 # is not polluted with repeated "-I."
1829 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1830 # test to see if srcdir already configured
1831 if test -f $srcdir/config.status; then
1832 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1836 # test whether we have cygpath
1837 if test -z "$CYGPATH_W"; then
1838 if (cygpath --version) >/dev/null 2>/dev/null; then
1839 CYGPATH_W='cygpath -w'
1844 AC_SUBST([CYGPATH_W])
1846 # Define the identity of the package.
1847 dnl Distinguish between old-style and new-style calls.
1849 [AC_DIAGNOSE([obsolete],
1850 [$0: two- and three-arguments forms are deprecated.])
1851 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1852 AC_SUBST([PACKAGE], [$1])dnl
1853 AC_SUBST([VERSION], [$2])],
1854 [_AM_SET_OPTIONS([$1])dnl
1855 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1857 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1859 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1860 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1861 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1863 _AM_IF_OPTION([no-define],,
1864 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1865 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1867 # Some tools Automake needs.
1868 AC_REQUIRE([AM_SANITY_CHECK])dnl
1869 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1870 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1871 AM_MISSING_PROG([AUTOCONF], [autoconf])
1872 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1873 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1874 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1875 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1876 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1877 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1878 # For better backward compatibility. To be removed once Automake 1.9.x
1879 # dies out for good. For more background, see:
1880 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1881 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1882 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1883 # We need awk for the "check" target (and possibly the TAP driver). The
1884 # system "awk" is bad on some platforms.
1885 AC_REQUIRE([AC_PROG_AWK])dnl
1886 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1887 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1888 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1889 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1890 [_AM_PROG_TAR([v7])])])
1891 _AM_IF_OPTION([no-dependencies],,
1892 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1893 [_AM_DEPENDENCIES([CC])],
1894 [m4_define([AC_PROG_CC],
1895 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1896 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1897 [_AM_DEPENDENCIES([CXX])],
1898 [m4_define([AC_PROG_CXX],
1899 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1900 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1901 [_AM_DEPENDENCIES([OBJC])],
1902 [m4_define([AC_PROG_OBJC],
1903 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1904 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1905 [_AM_DEPENDENCIES([OBJCXX])],
1906 [m4_define([AC_PROG_OBJCXX],
1907 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1909 AC_REQUIRE([AM_SILENT_RULES])dnl
1910 dnl The testsuite driver may need to know about EXEEXT, so add the
1911 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1912 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1913 AC_CONFIG_COMMANDS_PRE(dnl
1914 [m4_provide_if([_AM_COMPILER_EXEEXT],
1915 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1917 # POSIX will say in a future version that running "rm -f" with no argument
1918 # is OK; and we want to be able to make that assumption in our Makefile
1919 # recipes. So use an aggressive probe to check that the usage we want is
1920 # actually supported "in the wild" to an acceptable degree.
1921 # See automake bug#10828.
1922 # To make any issue more visible, cause the running configure to be aborted
1923 # by default if the 'rm' program in use doesn't match our expectations; the
1924 # user can still override this though.
1925 if rm -f && rm -fr && rm -rf; then : OK; else
1929 Your 'rm' program seems unable to run without file operands specified
1930 on the command line, even when the '-f' option is present. This is contrary
1931 to the behaviour of most rm programs out there, and not conforming with
1932 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1934 Please tell bug-automake@gnu.org about your system, including the value
1935 of your $PATH and any error possibly output before this message. This
1936 can help us improve future automake versions.
1939 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1940 echo 'Configuration will proceed anyway, since you have set the' >&2
1941 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1945 Aborting the configuration process, to ensure you take notice of the issue.
1947 You can download and install GNU coreutils to get an 'rm' implementation
1948 that behaves properly: <https://www.gnu.org/software/coreutils/>.
1950 If you want to complete the configuration process using your problematic
1951 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1952 to "yes", and re-run configure.
1955 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1958 dnl The trailing newline in this macro's definition is deliberate, for
1959 dnl backward compatibility and to allow trailing 'dnl'-style comments
1960 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1963 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1964 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1965 dnl mangled by Autoconf and run in a shell conditional statement.
1966 m4_define([_AC_COMPILER_EXEEXT],
1967 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1969 # When config.status generates a header, we must update the stamp-h file.
1970 # This file resides in the same directory as the config header
1971 # that is generated. The stamp files are numbered to have different names.
1973 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1974 # loop where config.status creates the headers, so we can generate
1975 # our stamp files there.
1976 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1977 [# Compute $1's index in $config_headers.
1980 for _am_header in $config_headers :; do
1982 $_am_arg | $_am_arg:* )
1985 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1988 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1990 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
1992 # This file is free software; the Free Software Foundation
1993 # gives unlimited permission to copy and/or distribute it,
1994 # with or without modifications, as long as this notice is preserved.
1996 # AM_PROG_INSTALL_SH
1997 # ------------------
1998 # Define $install_sh.
1999 AC_DEFUN([AM_PROG_INSTALL_SH],
2000 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2001 if test x"${install_sh+set}" != xset; then
2004 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2006 install_sh="\${SHELL} $am_aux_dir/install-sh"
2009 AC_SUBST([install_sh])])
2011 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
2013 # This file is free software; the Free Software Foundation
2014 # gives unlimited permission to copy and/or distribute it,
2015 # with or without modifications, as long as this notice is preserved.
2017 # Check whether the underlying file-system supports filenames
2018 # with a leading dot. For instance MS-DOS doesn't.
2019 AC_DEFUN([AM_SET_LEADING_DOT],
2020 [rm -rf .tst 2>/dev/null
2021 mkdir .tst 2>/dev/null
2022 if test -d .tst; then
2027 rmdir .tst 2>/dev/null
2028 AC_SUBST([am__leading_dot])])
2030 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
2033 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
2035 # This file is free software; the Free Software Foundation
2036 # gives unlimited permission to copy and/or distribute it,
2037 # with or without modifications, as long as this notice is preserved.
2039 # AM_MAINTAINER_MODE([DEFAULT-MODE])
2040 # ----------------------------------
2041 # Control maintainer-specific portions of Makefiles.
2042 # Default is to disable them, unless 'enable' is passed literally.
2043 # For symmetry, 'disable' may be passed as well. Anyway, the user
2044 # can override the default with the --enable/--disable switch.
2045 AC_DEFUN([AM_MAINTAINER_MODE],
2046 [m4_case(m4_default([$1], [disable]),
2047 [enable], [m4_define([am_maintainer_other], [disable])],
2048 [disable], [m4_define([am_maintainer_other], [enable])],
2049 [m4_define([am_maintainer_other], [enable])
2050 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
2051 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
2052 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
2053 AC_ARG_ENABLE([maintainer-mode],
2054 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
2055 am_maintainer_other[ make rules and dependencies not useful
2056 (and sometimes confusing) to the casual installer])],
2057 [USE_MAINTAINER_MODE=$enableval],
2058 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
2059 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
2060 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
2061 MAINT=$MAINTAINER_MODE_TRUE
2062 AC_SUBST([MAINT])dnl
2066 # Check to see how 'make' treats includes. -*- Autoconf -*-
2068 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2070 # This file is free software; the Free Software Foundation
2071 # gives unlimited permission to copy and/or distribute it,
2072 # with or without modifications, as long as this notice is preserved.
2076 # Check whether make has an 'include' directive that can support all
2077 # the idioms we need for our automatic dependency tracking code.
2078 AC_DEFUN([AM_MAKE_INCLUDE],
2079 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
2080 cat > confinc.mk << 'END'
2082 @echo this is the am__doit target >confinc.out
2087 # BSD make does it like this.
2088 echo '.include "confinc.mk" # ignored' > confmf.BSD
2089 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
2090 echo 'include confinc.mk # ignored' > confmf.GNU
2092 for s in GNU BSD; do
2093 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
2094 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
2095 ['0:this is the am__doit target'],
2097 [BSD], [am__include='.include' am__quote='"'],
2098 [am__include='include' am__quote=''])])
2099 if test "$am__include" != "#"; then
2100 _am_result="yes ($s style)"
2104 rm -f confinc.* confmf.*
2105 AC_MSG_RESULT([${_am_result}])
2106 AC_SUBST([am__include])])
2107 AC_SUBST([am__quote])])
2109 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
2111 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
2113 # This file is free software; the Free Software Foundation
2114 # gives unlimited permission to copy and/or distribute it,
2115 # with or without modifications, as long as this notice is preserved.
2117 # AM_MISSING_PROG(NAME, PROGRAM)
2118 # ------------------------------
2119 AC_DEFUN([AM_MISSING_PROG],
2120 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2121 $1=${$1-"${am_missing_run}$2"}
2124 # AM_MISSING_HAS_RUN
2125 # ------------------
2126 # Define MISSING if not defined so far and test if it is modern enough.
2127 # If it is, set am_missing_run to use it, otherwise, to nothing.
2128 AC_DEFUN([AM_MISSING_HAS_RUN],
2129 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2130 AC_REQUIRE_AUX_FILE([missing])dnl
2131 if test x"${MISSING+set}" != xset; then
2134 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2136 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2139 # Use eval to expand $SHELL
2140 if eval "$MISSING --is-lightweight"; then
2141 am_missing_run="$MISSING "
2144 AC_MSG_WARN(['missing' script is too old or missing])
2148 # Helper functions for option handling. -*- Autoconf -*-
2150 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2152 # This file is free software; the Free Software Foundation
2153 # gives unlimited permission to copy and/or distribute it,
2154 # with or without modifications, as long as this notice is preserved.
2156 # _AM_MANGLE_OPTION(NAME)
2157 # -----------------------
2158 AC_DEFUN([_AM_MANGLE_OPTION],
2159 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2161 # _AM_SET_OPTION(NAME)
2162 # --------------------
2163 # Set option NAME. Presently that only means defining a flag for this option.
2164 AC_DEFUN([_AM_SET_OPTION],
2165 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
2167 # _AM_SET_OPTIONS(OPTIONS)
2168 # ------------------------
2169 # OPTIONS is a space-separated list of Automake options.
2170 AC_DEFUN([_AM_SET_OPTIONS],
2171 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2173 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2174 # -------------------------------------------
2175 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2176 AC_DEFUN([_AM_IF_OPTION],
2177 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2179 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
2181 # This file is free software; the Free Software Foundation
2182 # gives unlimited permission to copy and/or distribute it,
2183 # with or without modifications, as long as this notice is preserved.
2187 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
2188 # to automatically call this.
2189 AC_DEFUN([_AM_PROG_CC_C_O],
2190 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2191 AC_REQUIRE_AUX_FILE([compile])dnl
2192 AC_LANG_PUSH([C])dnl
2194 [whether $CC understands -c and -o together],
2195 [am_cv_prog_cc_c_o],
2196 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
2197 # Make sure it works both with $CC and with simple cc.
2198 # Following AC_PROG_CC_C_O, we do the test twice because some
2199 # compilers refuse to overwrite an existing .o file with -o,
2200 # though they will create one.
2201 am_cv_prog_cc_c_o=yes
2203 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
2204 && test -f conftest2.$ac_objext; then
2207 am_cv_prog_cc_c_o=no
2211 rm -f core conftest*
2213 if test "$am_cv_prog_cc_c_o" != yes; then
2214 # Losing compiler, so override with the script.
2215 # FIXME: It is wrong to rewrite CC.
2216 # But if we don't then we get into trouble of one sort or another.
2217 # A longer-term fix would be to have automake use am__CC in this case,
2218 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2219 CC="$am_aux_dir/compile $CC"
2223 # For backward compatibility.
2224 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
2226 # Copyright (C) 2001-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 # AM_RUN_LOG(COMMAND)
2233 # -------------------
2234 # Run COMMAND, save the exit status in ac_status, and log it.
2235 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
2236 AC_DEFUN([AM_RUN_LOG],
2237 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
2238 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
2240 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2241 (exit $ac_status); }])
2243 # Check to make sure that the build environment is sane. -*- Autoconf -*-
2245 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
2247 # This file is free software; the Free Software Foundation
2248 # gives unlimited permission to copy and/or distribute it,
2249 # with or without modifications, as long as this notice is preserved.
2253 AC_DEFUN([AM_SANITY_CHECK],
2254 [AC_MSG_CHECKING([whether build environment is sane])
2255 # Reject unsafe characters in $srcdir or the absolute working directory
2256 # name. Accept space and tab only in the latter.
2260 *[[\\\"\#\$\&\'\`$am_lf]]*)
2261 AC_MSG_ERROR([unsafe absolute working directory name]);;
2264 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2265 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
2268 # Do 'set' in a subshell so we don't clobber the current shell's
2269 # arguments. Must try -L first in case configure is actually a
2270 # symlink; some systems play weird games with the mod time of symlinks
2271 # (eg FreeBSD returns the mod time of the symlink's containing
2275 for am_try in 1 2; do
2276 echo "timestamp, slept: $am_has_slept" > conftest.file
2277 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2278 if test "$[*]" = "X"; then
2280 set X `ls -t "$srcdir/configure" conftest.file`
2282 if test "$[*]" != "X $srcdir/configure conftest.file" \
2283 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2285 # If neither matched, then we have a broken ls. This can happen
2286 # if, for instance, CONFIG_SHELL is bash and it inherits a
2287 # broken ls alias from the environment. This has actually
2288 # happened. Such a system could not be considered "sane".
2289 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2290 alias in your environment])
2292 if test "$[2]" = conftest.file || test $am_try -eq 2; then
2299 test "$[2]" = conftest.file
2305 AC_MSG_ERROR([newly created file is older than distributed files!
2306 Check your system clock])
2308 AC_MSG_RESULT([yes])
2309 # If we didn't sleep, we still need to ensure time stamps of config.status and
2310 # generated files are strictly newer.
2312 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2316 AC_CONFIG_COMMANDS_PRE(
2317 [AC_MSG_CHECKING([that generated files are newer than configure])
2318 if test -n "$am_sleep_pid"; then
2319 # Hide warnings about reused PIDs.
2320 wait $am_sleep_pid 2>/dev/null
2322 AC_MSG_RESULT([done])])
2326 # Copyright (C) 2009-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_SILENT_RULES([DEFAULT])
2333 # --------------------------
2334 # Enable less verbose build rules; with the default set to DEFAULT
2335 # ("yes" being less verbose, "no" or empty being verbose).
2336 AC_DEFUN([AM_SILENT_RULES],
2337 [AC_ARG_ENABLE([silent-rules], [dnl
2339 [--enable-silent-rules],
2340 [less verbose build output (undo: "make V=1")])
2342 [--disable-silent-rules],
2343 [verbose build output (undo: "make V=0")])dnl
2345 case $enable_silent_rules in @%:@ (((
2346 yes) AM_DEFAULT_VERBOSITY=0;;
2347 no) AM_DEFAULT_VERBOSITY=1;;
2348 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2351 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2352 dnl do not support nested variable expansions.
2353 dnl See automake bug#9928 and bug#10237.
2354 am_make=${MAKE-make}
2355 AC_CACHE_CHECK([whether $am_make supports nested variables],
2356 [am_cv_make_support_nested_variables],
2357 [if AS_ECHO([['TRUE=$(BAR$(V))
2363 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2364 am_cv_make_support_nested_variables=yes
2366 am_cv_make_support_nested_variables=no
2368 if test $am_cv_make_support_nested_variables = yes; then
2369 dnl Using '$V' instead of '$(V)' breaks IRIX make.
2371 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2373 AM_V=$AM_DEFAULT_VERBOSITY
2374 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2377 AM_SUBST_NOTMAKE([AM_V])dnl
2378 AC_SUBST([AM_DEFAULT_V])dnl
2379 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2380 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2382 AC_SUBST([AM_BACKSLASH])dnl
2383 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2386 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2388 # This file is free software; the Free Software Foundation
2389 # gives unlimited permission to copy and/or distribute it,
2390 # with or without modifications, as long as this notice is preserved.
2392 # AM_PROG_INSTALL_STRIP
2393 # ---------------------
2394 # One issue with vendor 'install' (even GNU) is that you can't
2395 # specify the program used to strip binaries. This is especially
2396 # annoying in cross-compiling environments, where the build's strip
2397 # is unlikely to handle the host's binaries.
2398 # Fortunately install-sh will honor a STRIPPROG variable, so we
2399 # always use install-sh in "make install-strip", and initialize
2400 # STRIPPROG with the value of the STRIP variable (set by the user).
2401 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2402 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2403 # Installed binaries are usually stripped using 'strip' when the user
2404 # run "make install-strip". However 'strip' might not be the right
2405 # tool to use in cross-compilation environments, therefore Automake
2406 # will honor the 'STRIP' environment variable to overrule this program.
2407 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2408 if test "$cross_compiling" != no; then
2409 AC_CHECK_TOOL([STRIP], [strip], :)
2411 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2412 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2414 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
2416 # This file is free software; the Free Software Foundation
2417 # gives unlimited permission to copy and/or distribute it,
2418 # with or without modifications, as long as this notice is preserved.
2420 # _AM_SUBST_NOTMAKE(VARIABLE)
2421 # ---------------------------
2422 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2423 # This macro is traced by Automake.
2424 AC_DEFUN([_AM_SUBST_NOTMAKE])
2426 # AM_SUBST_NOTMAKE(VARIABLE)
2427 # --------------------------
2428 # Public sister of _AM_SUBST_NOTMAKE.
2429 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2431 # Check how to create a tarball. -*- Autoconf -*-
2433 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
2435 # This file is free software; the Free Software Foundation
2436 # gives unlimited permission to copy and/or distribute it,
2437 # with or without modifications, as long as this notice is preserved.
2439 # _AM_PROG_TAR(FORMAT)
2440 # --------------------
2441 # Check how to create a tarball in format FORMAT.
2442 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2444 # Substitute a variable $(am__tar) that is a command
2445 # writing to stdout a FORMAT-tarball containing the directory
2447 # tardir=directory && $(am__tar) > result.tar
2449 # Substitute a variable $(am__untar) that extract such
2450 # a tarball read from stdin.
2451 # $(am__untar) < result.tar
2453 AC_DEFUN([_AM_PROG_TAR],
2454 [# Always define AMTAR for backward compatibility. Yes, it's still used
2455 # in the wild :-( We should find a proper way to deprecate it ...
2456 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2458 # We'll loop over all known methods to create a tar archive until one works.
2459 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2462 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2466 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2467 # There is notably a 21 bits limit for the UID and the GID. In fact,
2468 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2470 am_max_uid=2097151 # 2^21 - 1
2471 am_max_gid=$am_max_uid
2472 # The $UID and $GID variables are not portable, so we need to resort
2473 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
2474 # below are definitely unexpected, so allow the users to see them
2475 # (that is, avoid stderr redirection).
2476 am_uid=`id -u || echo unknown`
2477 am_gid=`id -g || echo unknown`
2478 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2479 if test $am_uid -le $am_max_uid; then
2480 AC_MSG_RESULT([yes])
2485 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2486 if test $am_gid -le $am_max_gid; then
2487 AC_MSG_RESULT([yes])
2496 [m4_fatal([Unknown tar format])])
2498 AC_MSG_CHECKING([how to create a $1 tar archive])
2500 # Go ahead even if we have the value already cached. We do so because we
2501 # need to set the values for the 'am__tar' and 'am__untar' variables.
2502 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2504 for _am_tool in $_am_tools; do
2507 for _am_tar in tar gnutar gtar; do
2508 AM_RUN_LOG([$_am_tar --version]) && break
2510 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2511 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2512 am__untar="$_am_tar -xf -"
2515 # Must skip GNU tar: if it does not support --format= it doesn't create
2516 # ustar tarball either.
2517 (tar --version) >/dev/null 2>&1 && continue
2518 am__tar='tar chf - "$$tardir"'
2519 am__tar_='tar chf - "$tardir"'
2520 am__untar='tar xf -'
2523 am__tar='pax -L -x $1 -w "$$tardir"'
2524 am__tar_='pax -L -x $1 -w "$tardir"'
2528 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2529 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2530 am__untar='cpio -i -H $1 -d'
2539 # If the value was cached, stop now. We just wanted to have am__tar
2540 # and am__untar set.
2541 test -n "${am_cv_prog_tar_$1}" && break
2543 # tar/untar a dummy directory, and stop if the command works.
2546 echo GrepMe > conftest.dir/file
2547 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2549 if test -s conftest.tar; then
2550 AM_RUN_LOG([$am__untar <conftest.tar])
2551 AM_RUN_LOG([cat conftest.dir/file])
2552 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2557 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2558 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2561 AC_SUBST([am__untar])
2564 m4_include([acinclude.m4])